Skip to contentSkip to conversation

signing-keys: add RDEPENDS to signing-keys from specific provider

PATCH In review [email protected] 2 participants 3 messages Jun 18, 2022 – Jun 19, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 signing-keys: add RDEPENDS to signing-keys from specific provider

Specific provider (ie. RPM or IPK) does "provide" just itself as a package to the system. This will cause the "-dev" package, which refers to the generic signing-keys and not the provider specific, to miss the dependency.

Error case (RPM) when populating sdk:

Error:
Problem: conflicting requests
- nothing provides signing-keys = 1.0-r0 needed by signing-keys-dev-1.0-r0.noarch
(try to add '--skip-broken' to skip uninstallable packages)

Examining signing-keys-rpm packages in PROVIDES we have indeed:
signing-keys-rpm = 1.0-r0

But in signing-keys-dev: in REQUIRES:
signing-keys-1.0-r0

This MR will fix the situation bringing the specific provider PROVIDES to include also the generic package (RPM example):
signing-keys
signing-keys-rpm = 1.0-r0

Likely another way could be also to change the requirement for dev or just allow empty packages as well.

---
 meta/recipes-core/meta/signing-keys.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-core/meta/signing-keys.bb +4 -0
index 03463f95f56..d0602cf82af 100644
@@ -18,6 +18,10 @@ FILES:${PN}-rpm = "${sysconfdir}/pki/rpm-gpg"
 FILES:${PN}-ipk = "${sysconfdir}/pki/ipk-gpg"
 FILES:${PN}-packagefeed = "${sysconfdir}/pki/packagefeed-gpg"
 
+RPROVIDES:${PN}-rpm += "${PN}"
+RPROVIDES:${PN}-ipk += "${PN}"
+RPROVIDES:${PN}-packagefeed += "${PN}"
+
 python do_get_public_keys () {
     from oe.gpg_sign import get_signer
 
Signature · 1 line
2.35.3
#1 lore raw
Quoted 8 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Federico Pellegrin
Sent: den 18 juni 2022 07:23
To: [email protected]
Cc: Federico Pellegrin <[email protected]>
Subject: [poky][PATCH] signing-keys: add RDEPENDS to signing-keys from specific provider

Poky is made up of multiple repositories. Patches for meta should go to the [email protected] mailing list (this is documented in README.md).

Quoted 39 lines

Specific provider (ie. RPM or IPK) does "provide" just itself as a package to the system. This will cause the "-dev" package, which refers to the generic signing-keys and not the provider specific, to miss the dependency.

Error case (RPM) when populating sdk:

Error:
Problem: conflicting requests
- nothing provides signing-keys = 1.0-r0 needed by signing-keys-dev-1.0-
r0.noarch
(try to add '--skip-broken' to skip uninstallable packages)

Examining signing-keys-rpm packages in PROVIDES we have indeed:
signing-keys-rpm = 1.0-r0

But in signing-keys-dev: in REQUIRES:
signing-keys-1.0-r0

This MR will fix the situation bringing the specific provider PROVIDES to include also the generic package (RPM example):
signing-keys
signing-keys-rpm = 1.0-r0

Likely another way could be also to change the requirement for dev or just allow empty packages as well.

---
 meta/recipes-core/meta/signing-keys.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes- renamed from meta/recipes-core/meta/signing-keys.bb +0 -0

core/meta/signing-keys.bb
index 03463f95f56..d0602cf82af 100644

meta/recipes-core/meta/signing-keys.bb FILES:${PN}-rpm = "${sysconfdir}/pki/rpm-gpg" · line 23

Quoted 6 lines
meta/recipes-core/meta/signing-keys.bb +3 -0
@@ -18,6 +18,10 @@ FILES:${PN}-rpm = "${sysconfdir}/pki/rpm-gpg"
 FILES:${PN}-ipk = "${sysconfdir}/pki/ipk-gpg"
 FILES:${PN}-packagefeed = "${sysconfdir}/pki/packagefeed-gpg"
 
+RPROVIDES:${PN}-rpm += "${PN}"
+RPROVIDES:${PN}-ipk += "${PN}"
+RPROVIDES:${PN}-packagefeed += "${PN}"

This is incorrect. The correct thing to do is to instead remove the dependency from ${PN}-dev on ${PN}, i.e.:

RDEPENDS:${PN}-dev = ""

Quoted 6 lines
meta/recipes-core/meta/signing-keys.bb +1 -1
+
 python do_get_public_keys () {
     from oe.gpg_sign import get_signer
 
--

2.35.3

//Peter

#2 lore raw

Hi Peter,
Many thanks for your feedback!

Il giorno dom 19 giu 2022 alle ore 15:06 Peter Kjellerstedt < [email protected]> ha scritto:

Quoted 10 lines

meta/recipes-core/meta/signing-keys.bb FILES:${PN}-rpm = "${sysconfdir}/pki/rpm-gpg" · line 23

Quoted 3 lines
meta/recipes-core/meta/signing-keys.bb +3 -0
+RPROVIDES:${PN}-rpm += "${PN}"
+RPROVIDES:${PN}-ipk += "${PN}"
+RPROVIDES:${PN}-packagefeed += "${PN}"

This is incorrect. The correct thing to do is to instead remove the dependency from ${PN}-dev on ${PN}, i.e.:

RDEPENDS:${PN}-dev = ""

Thanks for the correction. Indeed as per commit comment I was a bit unsure which way would be correct (or better).

I'll send now (hopefully to the right address!) a v2 of the patch. I've tried your better solution locally and works of course very fine.

Thanks again and a v2 in a few moments,

Cheers,
Federico