Commit 8eadf44
Stop importing subkeys to RPM >= 5.99.90
It was reported that rpmKeyringAddKey() fails to import separate
subkeys in RPM 6 with rpm-sequoia
<https://bugzilla.redhat.com/show_bug.cgi?id=2372978>. Observed in
packagekit and microdnf with rpm-libs-5.99.92-1.fc44.x86_64 and
rpm-sequoia-1.9.0-2.fc43.x86_64:
packagekitd[1862782]: failed to add subkeys for /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-10-primary to rpmdb
packagekitd[1862782]: failed to add subkeys for /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-13-secondary to rpmdb
packagekitd[1862782]: failed to add subkeys for /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-14-secondary to rpmdb
The failure comes from librpm's rpmKeyringAddKey()
→ rpmKeyringModify() → rpmPubkeyMerge() → pgpPubkeyMerge() when adding
the first subkey of the keyfile into a keyring by libdnf in
dnf_keyring_add_public_key() at libdnf/dnf-keyring.cpp:137.
pgpPubkeyMerge() is implemented in rpm-sequoia.
It was confirme by RPM developers that RPM started to automatically
add subkeys to a keyring when the primary key is added and that it
does not expect standalone subkeys any more. This change happended
in 5.99.90.
This patch stops passing standalone subkeys to rpmKeyringAddKey() on
RPM >= 5.99.90.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=23729781 parent 6a127ae commit 8eadf44
3 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
| |||
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
| 151 | + | |
147 | 152 | | |
148 | 153 | | |
149 | 154 | | |
| |||
0 commit comments