-
Notifications
You must be signed in to change notification settings - Fork 93
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-pgp-keys: New plugin for detecting expired PGP keys #1592
base: main
Are you sure you want to change the base?
Conversation
I looked into the source code. It's a rewrite of the new "expired-gpg-keys" plugin from DNF4 to libdnf5. And here's the problem. The original plugin is in Python. It is not part of the libdnf library -> this makes it ignored by users using libdnf directly - This PR implements the The How to get out of this? |
That's a good point Jarek, I wasn't thinking about non-CLI users here. I will rework the plugin as you've suggested, thanks for that! |
daa8582
to
e88960d
Compare
Looking at the expiriation date will miss what I think is the more common issue just now: all the obsolete SHA1 based signatures that will fail in various other ways. Sequoia generally defers this checking to verify rather than import time, but you might want to additionally call pgpPubKeyLint() on the key material to catch at least some of those issues too. |
e88960d
to
770c1b2
Compare
a4a55fd
to
76a04e7
Compare
I performed some manual testing, and everything appears to be working as expected. One potential minor issue is that when GPG keys are available remotely (e.g., Copr keys), users always see output about downloading the keys, like this:
This happens because the |
This PR also adds a new libdnf5 workflow hook at the |
How to test: If the plugin is enabled and any COPR repository is enabled on your system, you can test it by faketiming the system date and disabling
CI tests will be delivered in a follow-up PR. |
PR adds new virtual methods to the public class API. This breaks the ABI. Yes, I know, we need to add some new hooks for plugins from time to time. It wasn't clear in the beginning where all the hooks should be placed. At least we should increase the But the ABI for C++ plugins will remain broken. So I'm thinking about methods to solve this problem. And right now I got one idea. How about instead of adding a new virtual method to the base class, create a new class that inherits from the base class and add the virtual method to the new class. |
76a04e7
to
fc0b546
Compare
The only failing CI test seems to be about updating the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Nice work. I wrote comments what still needs to be resolved.
New hook to be called right after resolving the goal.
Workaround for: #1192
As we've agreed on introducing breaking changes only with major versions of API, dropping the minor version difference check.
Instead of always hardcoding the latest API version in the plugin, we should define the minimum API version the plugin is compatible with.
fc0b546
to
ca74f15
Compare
Based on the implementation from rpm-software-management/dnf-plugins-core#533.
Workaround for: #1192.