-
Notifications
You must be signed in to change notification settings - Fork 140
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
Fix build with rpm >= 4.19 #1601
Fix build with rpm >= 4.19 #1601
Conversation
These APIs have been obsolete for years and now removed in rpm 4.19. Luckily the usage here is entirely redundant, rpmKeyringAddKey() checks for duplicates and that case is even handled in this code.
…le() These APIs have been obsolete for years and now removed in rpm 4.19. This was always a rather strange way to go at verifying a package, but now also wholly redundant because the signature are already verified by rpmcliVerifySignatures().
Hmm, actually the rpmReadPackageFile() call is also totally redundant here, because it's now only used for checking digests. Which could be just as well left for rpmcliVerifySignatures() (but currently isn't because this is supposed to be about checking signatures only). |
The last two commits can be merged if you prefer that, but left them separate for now as that may make it easier to see what's going on. |
Just FWIW, we're building the rpm 4.19 alpha in Fedora initially with these APIs brought back, so take your time reviewing this. I get that this is a somewhat touchy area. |
libdnf/dnf-keyring.cpp
Outdated
@@ -271,7 +270,7 @@ dnf_keyring_check_untrusted_file(rpmKeyring keyring, | |||
g_set_error_literal(error, DNF_ERROR, DNF_ERROR_INTERNAL_ERROR, "failed to set keyring"); | |||
goto out; | |||
} | |||
rpmtsSetVfyLevel(ts, RPMSIG_SIGNATURE_TYPE); | |||
rpmtsSetVfyLevel(ts, RPMSIG_SIGNATURE_TYPE|RPMSIG_DIGEST_TYPE); |
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.
I've dropped the last commit related to the discussed change for now and we could deliver it as a separate PR then. |
Remove uses of long obsoleted APIs which have been removed in rpm 4.19. Besides obsolete, this is just redundant fluff as well because the surrounding code already takes care of it all.