Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expired-gpg-keys: new plugin to detect expired GPG keys #533

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FrostyX
Copy link
Member

@FrostyX FrostyX commented May 11, 2024

@FrostyX
Copy link
Member Author

FrostyX commented May 11, 2024

The implementation is of course not great (not using logger, not using _, etc) but as a proof of concept it works. What do you think of this approach as a temporary workaround until rpm-software-management/dnf#2075 gets properly fixed?

@jan-kolarik
Copy link
Member

Hi and thanks a lot for working on this! I'm planning to dig into it this week. Additionally, some related work appeared recently on the RPM side (link), so I'll also check that one as it might significantly affect the current situation of handling expired keys.

@jan-kolarik jan-kolarik self-requested a review May 14, 2024 11:27
@FrostyX
Copy link
Member Author

FrostyX commented May 14, 2024

Hello @jan-kolarik, I am glad to hear that.

Additionally, some related work appeared recently on the RPM side (rpm-software-management/rpm#3083), so I'll also check that one as it might significantly affect the current situation of handling expired keys.

I noticed the RPM PR just a couple of minutes after proposing this plugin, and at first, I was mad at myself because I thought this plugin was a wasted effort. But I don't think so anymore.

I suppose the RPM change won't land into any currently stable Fedora version but rather only in something like F41+? That's just my unsubstantiated assumption, we should get the correct information on this. But if true, any DNF fix based on the new RPM code won't be available to the users for many months. So maybe having this workaround will be useful in the meantime, what do you think?

Hi and thanks a lot for working on this! I'm planning to dig into it this week.

Feel free to take the code from this PR and make it production-ready.

Edit: I sent you an invite to be a collaborator to my dnf-plugins-core repository, so you can push directly to this PR if you want to.

"""
Is the GPG key expired?
"""
days = 365 * 5 - 30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be much more convenient:

$ rpm -q gpg-pubkey-8ddfd64b-65de01d8 --qf '%{DESCRIPTION}' | gpg --show-keys --with-colon | head -1 | cut -d: -f 7
1866728280
$ date --date @1866728280
Ne 25. února 2029, 16:38:00 CET

I think that we can expect gpg exists everywhere, or simply error out and claiming user should install it.

@jan-kolarik
Copy link
Member

I'll check back probably next week. For now, I can say this seems to be the direction we want to take, but we need to agree on it as a team and decide whether to implement it as core functionality or leave it as a plugin.

@jan-kolarik
Copy link
Member

Following-up on the comment from the dnf5 issue, we are planning to start integrating the work based on this PR into dnf4 and dnf5, probably during the next sprint (next week).

@FrostyX
Copy link
Member Author

FrostyX commented Jun 6, 2024

Perfect, I am glad to hear that @jan-kolarik. Please close the PR once it is no longer relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

None yet

3 participants