Skip to content

Conversation

@jlebon
Copy link
Contributor

@jlebon jlebon commented Apr 8, 2019

librpm allows packages signed with subkeys, so we should support this
too.

@cgwalters
Copy link
Collaborator

Quickly glanced at the dnf code; looks like it does something quite similar.

LGTM!

@jlebon
Copy link
Contributor Author

jlebon commented Apr 11, 2019

☎️ Ping?

subkeys = rpmGetSubkeys(pubkey, &nsubkeys);
for (gint i = 0; i < nsubkeys; i++) {
rpmPubkey subkey = subkeys[i];
if (rpmKeyringAddKey(keyring, subkey) < 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

In DNF only subkeys that pass the test subkey.can_sign are added. Please could you explain what exactly the code should do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This patch essentially matches what librpm does (see loadKeyringFromFiles()). In a quick scan, it's not clear whether librpm makes the same distinction. If not, I think this is something we'd need to fix there anyway, right? Is there anyone from the rpm team we can check with?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jlebon I looked into librpm. And yes, librpm does the same as this patch. I've been thinking about it. I will merge the PR. There is a plan to create GPG API in libdnf. So I hope to clarification during this work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great, WFM!

Copy link
Contributor

Choose a reason for hiding this comment

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

@jlebon Wait? You want to make other changes to PR? Please set Labels to ready for review when the PR is ready.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, I meant Works For Me :)

I don't have access to set labels, but the PR is ready.

Copy link
Contributor

Choose a reason for hiding this comment

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

I read Wait For Me instead of Works for me :-)

librpm allows packages signed with subkeys, so we should support this
too.
@jrohel jrohel merged commit 8a6b583 into rpm-software-management:master Apr 26, 2019
jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Apr 26, 2019
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Apr 28, 2019
See #1094 (comment)
and rpm-software-management/libdnf#711.

Update submodule: libdnf

Closes: #1819
Approved by: cgwalters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants