public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH v7 1/6] signing-keys.bb: Fix DISTRO_CODENAME truncation
@ 2026-03-30  9:58 Adam Duskett
  2026-03-30  9:58 ` [PATCH v7 2/6] libtoml11: new recipe Adam Duskett
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Adam Duskett @ 2026-03-30  9:58 UTC (permalink / raw)
  To: openembedded-core; +Cc: Adam Duskett

If DISTRO_CODENAME is not set in the environment, bash quietly
drops the string resulting in a key such as PACKAGEFEED-GPG-KEY-defaultsetup-

However, when python calls self.d.getVar('DISTRO_CODENAME'), the resulting
string is 'None', leading to a configuration file pointing to a key such
as PACKAGEFEED-GPG-KEY-defaultsetup-None

Add a default value in signing-keys.bb to set DISTRO_CODENAME to None if
DISTRO_CODENAME is not set.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
 meta/recipes-core/meta/signing-keys.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-core/meta/signing-keys.bb b/meta/recipes-core/meta/signing-keys.bb
index 94f4032911..c7713ed4a6 100644
--- a/meta/recipes-core/meta/signing-keys.bb
+++ b/meta/recipes-core/meta/signing-keys.bb
@@ -45,6 +45,10 @@ addtask get_public_keys before do_install
 do_get_public_keys[depends] += "gnupg-native:do_populate_sysroot"
 
 do_install () {
+    # Python evalutes an empty DISTRO_CODENAME to "None" which would cause mismatched files
+    # as the update config file would show GPG-KEY-${DISTRO}-None but the filename is
+    # installed as GPG-KEY-${DISTRO}-
+    DISTRO_CODENAME="${DISTRO_CODENAME:-None}"
     if [ -f "${B}/rpm-key" ]; then
         install -D -m 0644 "${B}/rpm-key" "${D}${sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
     fi
@@ -57,6 +61,7 @@ do_install () {
 }
 
 do_deploy () {
+    DISTRO_CODENAME="${DISTRO_CODENAME:-None}"
     if [ -f "${B}/rpm-key" ]; then
         install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
     fi
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-04-01 13:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-30  9:58 [PATCH v7 1/6] signing-keys.bb: Fix DISTRO_CODENAME truncation Adam Duskett
2026-03-30  9:58 ` [PATCH v7 2/6] libtoml11: new recipe Adam Duskett
2026-03-30  9:58 ` [PATCH v7 3/6] libsolv: explicitly enable comps for rpm packageconfig Adam Duskett
2026-03-30  9:58 ` [PATCH v7 4/6] librepo: add PACKAGECONFIG[sequoia] Adam Duskett
2026-03-30  9:58 ` [PATCH v7 5/6] dnf: Upgrade to 5.4.0.0 Adam Duskett
2026-04-01 13:54   ` [OE-core] " Mathieu Dubois-Briand
2026-04-01 13:56     ` Mathieu Dubois-Briand
2026-03-30  9:58 ` [PATCH v7 6/6] libdnf: remove recipe Adam Duskett
2026-03-31  7:56 ` [OE-core] [PATCH v7 1/6] signing-keys.bb: Fix DISTRO_CODENAME truncation Mathieu Dubois-Briand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox