rpm: 4.20.1 -> 6.0.1
v2 cover rpm: 4.20.1 -> 6.0.1
From: Robert Yang <[email protected]>
* V2
The V1 was incorrect, now update it really.
// Robert
The following changes since commit 983cb2171e53564bc9dd188136439f3e2ad9e188:
scripts/oe-git-archive: Ensure new push parameter is specified (2026-01-16 11:59:55 +0000)
are available in the Git repository at:
https://github.com/robertlinux/yocto rbt/rpm
https://github.com/robertlinux/yocto/tree/rbt/rpm
for you to fetch changes up to c75310f8f8162bcca3c24dcaf9230cbbdec3f399:
rpm: 4.20.1 -> 6.0.1 (2026-01-18 22:01:38 -0800)
----------------------------------------------------------------
Robert Yang (2):
createrepo-c: Backport a patch to build with rpm 6.0.1
rpm: 4.20.1 -> 6.0.1
...G_SHA1HEADER-instead-of-RPMTAG_HDRID.patch | 50 +++++++++++++++++++
.../createrepo-c/createrepo-c_1.2.1.bb | 1 +
...olor-setting-for-mips64_n32-binaries.patch | 21 ++++----
...akeLists.txt-Fix-checking-for-CFLAGS.patch | 46 -----------------
...satisfiable-dependency-when-building.patch | 17 ++++---
...1-Do-not-read-config-files-from-HOME.patch | 17 ++++---
...-PATH-environment-variable-before-ru.patch | 15 +++---
...lling-execute-package-scriptlets-wit.patch | 11 ++--
...not-insert-payloadflags-into-.rpm-me.patch | 17 ++++---
....c-fix-file-conflicts-for-MIPS64-N32.patch | 17 ++++---
...kgverify_level-to-digest-as-RCPM-4.2.patch | 34 +++++++++++++
.../0001-macros.in-Set-_rpmformat-to-4.patch | 31 ++++++++++++
...ools-elfdeps.cc-Remove-format-module.patch | 37 ++++++++++++++
...prefixing-etc-from-RPM_ETCCONFIGDIR-.patch | 25 ++++++----
...avoid-using-GLOB_BRACE-if-undefined-.patch | 13 +++--
...ge-logging-level-around-scriptlets-t.patch | 13 ++---
.../rpm/{rpm_4.20.1.bb => rpm_6.0.1.bb} | 13 +++--
17 files changed, 257 insertions(+), 121 deletions(-)
create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c/0001-Use-RPMTAG_SHA1HEADER-instead-of-RPMTAG_HDRID.patch
delete mode 100644 meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch
create mode 100644 meta/recipes-devtools/rpm/files/0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch
create mode 100644 meta/recipes-devtools/rpm/files/0001-macros.in-Set-_rpmformat-to-4.patch
create mode 100644 meta/recipes-devtools/rpm/files/0001-tools-elfdeps.cc-Remove-format-module.patch
rename meta/recipes-devtools/rpm/{rpm_4.20.1.bb => rpm_6.0.1.bb} (94%)Signature · 1 line
2.49.0
PATCH v2 1/2 createrepo-c: Backport a patch to build with rpm 6.0.1
From: Robert Yang <[email protected]>
Fixed:createrepo_c/src/parsehdr.c:669:71: error: ‘RPMTAG_HDRID’ undeclared (first use in this function)
--- ...G_SHA1HEADER-instead-of-RPMTAG_HDRID.patch | 50 +++++++++++++++++++ .../createrepo-c/createrepo-c_1.2.1.bb | 1 + 2 files changed, 51 insertions(+) create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c/0001-Use-RPMTAG_SHA1HEADER-instead-of-RPMTAG_HDRID.patch
meta/recipes-devtools/createrepo-c/createrepo-c/0001-Use-RPMTAG_SHA1HEADER-instead-of-RPMTAG_HDRID.patch new file +50 -0
@@ -0,0 +1,50 @@ +From 4e37bc582b1673ff767dbd0b570ef1c8871d3e8c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]> +Date: Tue, 22 Jul 2025 15:10:40 +0200 +Subject: [PATCH] Use RPMTAG_SHA1HEADER instead of RPMTAG_HDRID +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building against rpm-5.99.91 failed: + + /home/test/createrepo_c/src/parsehdr.c: In function ‘cr_package_from_header’: + /home/test/createrepo_c/src/parsehdr.c:669:71: error: ‘RPMTAG_HDRID’ undeclared (first use in this function); did you mean ‘RPMTAG_CVSID’? + 669 | headerGetString(hdr, RPMTAG_HDRID)); + | ^~~~~~~~~~~~ + | RPMTAG_CVSID + +RPM intentionally removed RPMTAG_HDRID tag alias in commit +79ba4a3c41702e46edd5a4ce7e17a1f3361eb0e7 ("Drop irrepairable pkgid and +hdrid tag aliases, rename SOURCEPKGID to go"). + +This patch fixes building against RPMv6 by using RPMTAG_SHA1HEADER +which RPMTAG_HDRID was aliased to. RPMTAG_SHA1HEADER has existed in +RPM since the year 2001. RPMTAG_HDRID was an alias to +RPMTAG_SHA1HEADER all the time RPMTAG_HDRID existed. + +In the features we should look for another digest header RPMv6 +packages will use. + +Upstream-Status: Backport [4e37bc582b1673ff767dbd0b570ef1c8871d3e8c] +Signed-off-by: Robert Yang <[email protected]> +--- + src/parsehdr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/parsehdr.c b/src/parsehdr.c +index 2b75e99..180e4ae 100644 +--- a/src/parsehdr.c ++++ b/src/parsehdr.c +@@ -666,7 +666,7 @@ cr_package_from_header(Header hdr, + + if (hdrrflags & CR_HDRR_LOADHDRID) + pkg->hdrid = cr_safe_string_chunk_insert(pkg->chunk, +- headerGetString(hdr, RPMTAG_HDRID)); ++ headerGetString(hdr, RPMTAG_SHA1HEADER)); + + if (hdrrflags & CR_HDRR_LOADSIGNATURES) { + rpmtd gpgtd = rpmtdNew(); +-- +2.49.0 +
meta/recipes-devtools/createrepo-c/createrepo-c_1.2.1.bb +1 -0
@@ -11,6 +11,7 @@ SRC_URI = "git://github.com/rpm-software-management/createrepo_c;branch=master;p file://0002-Use-IMPORTED_TARGET-for-3rd-party-dependencies.patch \ file://0003-Don-t-try-to-use-imported-targets-of-turned-off-depe.patch \ file://0004-cmake-Allow-builds-without-Doxygen-being-present-wit.patch \ + file://0001-Use-RPMTAG_SHA1HEADER-instead-of-RPMTAG_HDRID.patch \ " SRCREV = "8c6e6f88df86d1e34ca26d3835d77a2816326414"
Signature · 1 line
2.49.0
PATCH v2 2/2 rpm: 4.20.1 -> 6.0.1
In reply to [email protected]From: Robert Yang <[email protected]>
* Add a tag to SRC_URI so that there will be errors when only change the filename during upgrade it, as suggested by Alexander.
* Rebase the following patch:
- 0001-Add-a-color-setting-for-mips64_n32-binaries.patch
- 0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
- 0001-Do-not-read-config-files-from-HOME.patch
- 0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
- 0001-When-cross-installing-execute-package-scriptlets-wit.patch
- 0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch
- 0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
- 0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
- 0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch
- 0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
* Remove backported patch 0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch
* Add the following 3 patches:
- 0001-tools-elfdeps.cc-Remove-format-module.patch
There is no format until gcc 13.1, so remove the format module to make it work on hosts such as Ubuntu 22.04.
- 0001-macros.in-Set-_rpmformat-to-4.patch
Fixed:
error: External dependency generator is incompatible with v6 packages
- 0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch Fixed:
GPG check FAILED
* Add scdoc-native to DEPENDS to fix do_configure error for both native and target:
Could not find SCDOC using the following names: scdoc
Note, both target and native need scdoc-native.
* Add bash to RDEPENDS:${PN} to fix:
ERROR: rpm-1_6.0.1-r0 do_package_qa: QA Issue: /usr/lib/rpm/rpm-setup-autosign contained in package rpm requires /bin/bash, but no providers found in RDEPENDS:rpm? [file-rdeps]
* Test info:
PACKAGE_CLASSES = "package_rpm"
$ bitbake core-image-sato world
---
...olor-setting-for-mips64_n32-binaries.patch | 21 +++++----
...akeLists.txt-Fix-checking-for-CFLAGS.patch | 46 -------------------
...satisfiable-dependency-when-building.patch | 17 ++++---
...1-Do-not-read-config-files-from-HOME.patch | 17 ++++---
...-PATH-environment-variable-before-ru.patch | 15 +++---
...lling-execute-package-scriptlets-wit.patch | 11 +++--
...not-insert-payloadflags-into-.rpm-me.patch | 17 ++++---
....c-fix-file-conflicts-for-MIPS64-N32.patch | 17 ++++---
...kgverify_level-to-digest-as-RCPM-4.2.patch | 34 ++++++++++++++
.../0001-macros.in-Set-_rpmformat-to-4.patch | 31 +++++++++++++
...ools-elfdeps.cc-Remove-format-module.patch | 37 +++++++++++++++
...prefixing-etc-from-RPM_ETCCONFIGDIR-.patch | 25 +++++-----
...avoid-using-GLOB_BRACE-if-undefined-.patch | 13 ++++--
...ge-logging-level-around-scriptlets-t.patch | 13 +++---
.../rpm/{rpm_4.20.1.bb => rpm_6.0.1.bb} | 13 ++++--
15 files changed, 206 insertions(+), 121 deletions(-)
delete mode 100644 meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch
create mode 100644 meta/recipes-devtools/rpm/files/0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch
create mode 100644 meta/recipes-devtools/rpm/files/0001-macros.in-Set-_rpmformat-to-4.patch
create mode 100644 meta/recipes-devtools/rpm/files/0001-tools-elfdeps.cc-Remove-format-module.patch
rename meta/recipes-devtools/rpm/{rpm_4.20.1.bb => rpm_6.0.1.bb} (94%)meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch +12 -9
@@ -5,16 +5,19 @@ Subject: [PATCH] Add a color setting for mips64_n32 binaries Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + +Rebased to 6.0.1 +Signed-off-by: Robert Yang <[email protected]> --- - build/rpmfc.c | 4 ++++ + build/rpmfc.cc | 4 ++++ rpmrc.in | 2 ++ 2 files changed, 6 insertions(+) -diff --git a/build/rpmfc.c b/build/rpmfc.c -index 86dd36d14..df421a23f 100644 ---- a/build/rpmfc.c -+++ b/build/rpmfc.c -@@ -716,6 +716,7 @@ static int rpmfcHelper(rpmfc fc, int *fnx, int nfn, const char *proto, +diff --git a/build/rpmfc.cc b/build/rpmfc.cc +index 833e56fa8..d50a3407f 100644 +--- a/build/rpmfc.cc ++++ b/build/rpmfc.cc +@@ -690,6 +690,7 @@ static int rpmfcHelper(rpmfc fc, int *fnx, int nfn, const char *proto, static const struct rpmfcTokens_s rpmfcTokens[] = { { "directory", RPMFC_INCLUDE },
@@ -22,7 +25,7 @@ index 86dd36d14..df421a23f 100644 { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE }, { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE }, -@@ -1258,6 +1259,9 @@ static uint32_t getElfColor(const char *fn) +@@ -1191,6 +1192,9 @@ static uint32_t getElfColor(const char *fn) color = 0; break; }
@@ -33,10 +36,10 @@ index 86dd36d14..df421a23f 100644 if (elf) elf_end(elf); diff --git a/rpmrc.in b/rpmrc.in -index 8646a966b..7349fdfd3 100644 +index 8fd0d7ee1..4cc52ceb3 100644 --- a/rpmrc.in +++ b/rpmrc.in -@@ -142,6 +142,8 @@ archcolor: mipsr6el 1 +@@ -152,6 +152,8 @@ archcolor: mipsr6el 1 archcolor: mips64r6 2 archcolor: mips64r6el 2
meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch deleted +0 -46
46 lines not on this page · raw message
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +10 -7
@@ -9,16 +9,19 @@ hand produces rpms that way by design. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + +Rebased to 6.0.1 +Signed-off-by: Robert Yang <[email protected]> --- - build/pack.c | 4 ---- + build/pack.cc | 4 ---- 1 file changed, 4 deletions(-) -diff --git a/build/pack.c b/build/pack.c -index eb9c7b3f1..fb1f1bed8 100644 ---- a/build/pack.c -+++ b/build/pack.c -@@ -712,10 +712,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch - headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); +diff --git a/build/pack.cc b/build/pack.cc +index 49c9d0a58..b1cda6d75 100644 +--- a/build/pack.cc ++++ b/build/pack.cc +@@ -805,10 +805,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + headerPutBin(pkg->header, RPMTAG_SOURCESIGMD5, spec->sourcePkgId,16); } - if (cheating) {
meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch +10 -7
@@ -5,15 +5,18 @@ Subject: [PATCH] Do not read config files from $HOME Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + +Rebased to 6.0.1 +Signed-off-by: Robert Yang <[email protected]> --- - lib/rpmrc.c | 6 ++---- + lib/rpmrc.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -diff --git a/lib/rpmrc.c b/lib/rpmrc.c -index 5d778b8b7..dc8d42aeb 100644 ---- a/lib/rpmrc.c -+++ b/lib/rpmrc.c -@@ -485,8 +485,7 @@ static void setDefaults(void) +diff --git a/lib/rpmrc.cc b/lib/rpmrc.cc +index 2b3baeddc..cea6f4bc5 100644 +--- a/lib/rpmrc.cc ++++ b/lib/rpmrc.cc +@@ -390,8 +390,7 @@ static void setDefaults(void) if (!defrcfiles) { defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", confdir, "/" RPM_VENDOR "/rpmrc", ":",
@@ -23,7 +26,7 @@ index 5d778b8b7..dc8d42aeb 100644 } /* macrofiles may be pre-set from --macros */ -@@ -498,8 +497,7 @@ static void setDefaults(void) +@@ -403,8 +402,7 @@ static void setDefaults(void) confdir, "/" RPM_VENDOR "/macros", ":", SYSCONFDIR "/rpm/macros.*", ":", SYSCONFDIR "/rpm/macros", ":",
meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch +9 -6
@@ -8,15 +8,18 @@ We add lots of native stuff into it and scriptlets rely on that. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + +Rebased to 6.0.1 +Signed-off-by: Robert Yang <[email protected]> --- - lib/rpmscript.c | 2 +- + lib/rpmscript.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 060fd8124..4dc6466a8 100644 ---- a/lib/rpmscript.c -+++ b/lib/rpmscript.c -@@ -251,7 +251,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes, +diff --git a/lib/rpmscript.cc b/lib/rpmscript.cc +index b75a62085..2d7a4c889 100644 +--- a/lib/rpmscript.cc ++++ b/lib/rpmscript.cc +@@ -260,7 +260,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes, if (ipath && ipath[5] != '%') path = ipath;
meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch +6 -5
@@ -26,15 +26,16 @@ Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> Rebased to 4.20.1 +Rebased to 6.0.1 Signed-off-by: Robert Yang <[email protected]> --- - lib/rpmscript.c | 9 +++++++-- + lib/rpmscript.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) -diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index eb14870b3..1785e8f30 100644 ---- a/lib/rpmscript.c -+++ b/lib/rpmscript.c +diff --git a/lib/rpmscript.cc b/lib/rpmscript.cc +index b75a62085..7d667b7f5 100644 +--- a/lib/rpmscript.cc ++++ b/lib/rpmscript.cc @@ -456,8 +456,7 @@ exit: Fclose(out); /* XXX dup'd STDOUT_FILENO */
meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch +10 -7
@@ -1,7 +1,7 @@ From e688eb54fd54d65181e94b854b3568d99cbf3a24 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Tue, 31 Aug 2021 10:37:05 +0200 -Subject: [PATCH] build/pack.c: do not insert payloadflags into .rpm metadata +Subject: [PATCH] build/pack.cc: do not insert payloadflags into .rpm metadata The flags look like '19T56' where 19 is the compression level (deterministic), and 56 is the amount of threads (varies from one
@@ -9,15 +9,18 @@ host to the next and breaks reproducibility for .rpm). Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + +Rebased to 6.0.1 +Signed-off-by: Robert Yang <[email protected]> --- - build/pack.c | 2 +- + build/pack.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/build/pack.c b/build/pack.c -index fb1f1bed8..45885a6ac 100644 ---- a/build/pack.c -+++ b/build/pack.c -@@ -330,7 +330,7 @@ static char *getIOFlags(Package pkg) +diff --git a/build/pack.cc b/build/pack.cc +index b1cda6d75..1425d27ba 100644 +--- a/build/pack.cc ++++ b/build/pack.cc +@@ -338,7 +338,7 @@ static char *getIOFlags(Package pkg) headerPutString(pkg->header, RPMTAG_PAYLOADCOMPRESSOR, compr); buf = xstrdup(rpmio_flags); buf[s - rpmio_flags] = '\0';
meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch +10 -7
@@ -1,7 +1,7 @@ From ad530868e37f09e9236c085d25a834304750704b Mon Sep 17 00:00:00 2001 From: Changqing Li <[email protected]> Date: Thu, 7 May 2020 17:40:58 +0800 -Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32 +Subject: [PATCH] lib/transaction.cc: fix file conflicts for MIPS64 N32 This patch is from: https://github.com/rpm-software-management/rpm/issues/193
@@ -27,15 +27,18 @@ Fixed by performing a 'last-in-wins' resolution when "neither is preferred". Upstream-Status: Submitted <https://github.com/rpm-software-management/rpm/issues/193> Signed-off-by: Changqing Li <[email protected]> + +Rebased to 6.0.1 +Signed-off-by: Robert Yang <[email protected]> --- - lib/transaction.c | 13 ++++++++++++- + lib/transaction.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -diff --git a/lib/transaction.c b/lib/transaction.c -index 5e4414d2a..b1c55bd44 100644 ---- a/lib/transaction.c -+++ b/lib/transaction.c -@@ -400,7 +400,18 @@ static int handleColorConflict(rpmts ts, +diff --git a/lib/transaction.cc b/lib/transaction.cc +index de7cdabb2..697268733 100644 +--- a/lib/transaction.cc ++++ b/lib/transaction.cc +@@ -375,7 +375,18 @@ static int handleColorConflict(rpmts ts, rpmfsSetAction(ofs, ofx, FA_CREATE); rpmfsSetAction(fs, fx, FA_SKIPCOLOR); rConflicts = 0;
meta/recipes-devtools/rpm/files/0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 1cb53934b83b794c319813106c9f12d75cce66d2 Mon Sep 17 00:00:00 2001 +From: Robert Yang <[email protected]> +Date: Sun, 18 Jan 2026 19:24:42 -0800 +Subject: [PATCH] macros.in: Set _pkgverify_level to digest as RPM 4.20.1 + +Fixed: +$ bitbake core-image-minimal +Package bash-5.3-r0.16.x86_64_v3.rpm is not signed +GPG check FAILED + +Set _pkgverify_level to digest as RPM 4.20.1 can fix the problem. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Robert Yang <[email protected]> +--- + macros.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/macros.in b/macros.in +index 38066f00c..7fe00ad09 100644 +--- a/macros.in ++++ b/macros.in +@@ -680,7 +680,7 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\ + # signature require valid signature(s) + # digest require valid digest(s) + # none traditional rpm behavior, nothing required +-%_pkgverify_level all ++%_pkgverify_level digest + + # Disabler flags for package verification (similar to vsflags) + # Set to 0x0 for full compatibility with v4 packages. +-- +2.49.0 +
meta/recipes-devtools/rpm/files/0001-macros.in-Set-_rpmformat-to-4.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 2157e779dd7027f2b5195f5326a06ccde878773f Mon Sep 17 00:00:00 2001 +From: Robert Yang <[email protected]> +Date: Thu, 15 Jan 2026 21:47:06 -0800 +Subject: [PATCH] macros.in: Set _rpmformat to 4 + +Fixed: +$ bitbake core-image-minimal +error: External dependency generator is incompatible with v6 packages + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Robert Yang <[email protected]> +--- + macros.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/macros.in b/macros.in +index da3a6bc4e..08e0033d9 100644 +--- a/macros.in ++++ b/macros.in +@@ -262,7 +262,7 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\ + %_rpmfilename %{_build_name_fmt} + + # Which rpm format go generate (4 or 6) +-%_rpmformat 6 ++%_rpmformat 4 + + # The directory where sources/patches from a source package will be + # installed. This is also where sources/patches are found when building. +-- +2.49.0 +
meta/recipes-devtools/rpm/files/0001-tools-elfdeps.cc-Remove-format-module.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 3536ef6bb74144cf9dce10200cd62c2ad9f7cae4 Mon Sep 17 00:00:00 2001 +From: Robert Yang <[email protected]> +Date: Thu, 15 Jan 2026 19:36:17 -0800 +Subject: [PATCH] tools/elfdeps.cc: Remove format module + +There is no format until gcc 13.1, so remove the format module to make it work +on hosts such as Ubuntu 22.04. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Robert Yang <[email protected]> +--- + tools/elfdeps.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/tools/elfdeps.cc b/tools/elfdeps.cc +index 17884b24e..33ff8d740 100644 +--- a/tools/elfdeps.cc ++++ b/tools/elfdeps.cc +@@ -1,6 +1,5 @@ + #include "system.h" + +-#include <format> + #include <string> + #include <vector> + +@@ -105,7 +104,7 @@ static void addSoDep(std::vector<std::string> & deps, + if (ver.empty() && marker.empty()) { + addDep(deps, soname); + } else { +- auto dep = std::format("{}({}){}", soname, ver, marker); ++ std::string dep = soname + "(" + ver + ")" + marker; + addDep(deps, dep); + } + } +-- +2.49.0 +
meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch +14 -11
@@ -9,15 +9,18 @@ from target rootfs instead of its own native sysroot. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + +Rebased to 6.0.1 +Signed-off-by: Robert Yang <[email protected]> --- - lib/rpmrc.c | 18 +++++++++++++----- + lib/rpmrc.cc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) -diff --git a/lib/rpmrc.c b/lib/rpmrc.c -index dc8d42aeb..3f2996850 100644 ---- a/lib/rpmrc.c -+++ b/lib/rpmrc.c -@@ -481,11 +481,14 @@ static void setDefaults(void) +diff --git a/lib/rpmrc.cc b/lib/rpmrc.cc +index cea6f4bc5..e6cf21e1b 100644 +--- a/lib/rpmrc.cc ++++ b/lib/rpmrc.cc +@@ -386,11 +386,14 @@ static void setDefaults(void) userrc = xstrdup(oldrc); } }
@@ -33,7 +36,7 @@ index dc8d42aeb..3f2996850 100644 } /* macrofiles may be pre-set from --macros */ -@@ -495,9 +498,9 @@ static void setDefaults(void) +@@ -400,9 +403,9 @@ static void setDefaults(void) confdir, "/platform/%{_target}/macros", ":", confdir, "/fileattrs/*.attr", ":", confdir, "/" RPM_VENDOR "/macros", ":",
@@ -46,7 +49,7 @@ index dc8d42aeb..3f2996850 100644 } free(usermacros); -@@ -1142,7 +1145,11 @@ static void read_auxv(void) +@@ -1048,7 +1051,11 @@ static void read_auxv(void) */ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) {
@@ -55,11 +58,11 @@ index dc8d42aeb..3f2996850 100644 + if (etcconfdir == NULL) + etcconfdir = ""; + -+ const char * const platform_path = rstrscat(NULL, etcconfdir, SYSCONFDIR "/rpm/platform", NULL); ++ char * const platform_path = rstrscat(NULL, etcconfdir, SYSCONFDIR "/rpm/platform", NULL); static struct utsname un; char * chptr; - canonEntry canon; -@@ -1462,6 +1469,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) + int rc; +@@ -1378,6 +1385,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) if (arch) *arch = un.machine; if (os) *os = un.sysname;
meta/recipes-devtools/rpm/files/0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch +8 -5
@@ -1,7 +1,7 @@ From d8972ff7fa0a30e199144ba135223bf561874e01 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Tue, 16 Jan 2024 09:59:26 +0100 -Subject: [PATCH] rpmio/rpmglob.c: avoid using GLOB_BRACE if undefined by C +Subject: [PATCH] rpmio/rpmglob.cc: avoid using GLOB_BRACE if undefined by C library This addresses musl failures; if there is code out there relying on
@@ -11,14 +11,17 @@ This is unlikely to be trivially fixable upstream. Upstream-Status: Inappropriate [reported at https://github.com/rpm-software-management/rpm/issues/2844] Signed-off-by: Alexander Kanavin <[email protected]> + +Rebased to 6.0.1 +Signed-off-by: Robert Yang <[email protected]> --- - rpmio/rpmglob.c | 6 ++++++ + rpmio/rpmglob.cc | 6 ++++++ 1 file changed, 6 insertions(+) -diff --git a/rpmio/rpmglob.c b/rpmio/rpmglob.c +diff --git a/rpmio/rpmglob.cc b/rpmio/rpmglob.cc index eb439cad8..1eef0b851 100644 ---- a/rpmio/rpmglob.c -+++ b/rpmio/rpmglob.c +--- a/rpmio/rpmglob.cc ++++ b/rpmio/rpmglob.cc @@ -33,6 +33,12 @@ #include "debug.h"
meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch +7 -6
@@ -1,7 +1,7 @@ From 452b696ea3e1975ea30cf7a92678aa4b316e6300 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Thu, 10 Jan 2019 18:14:18 +0100 -Subject: [PATCH] rpmscript.c: change logging level around scriptlets to INFO +Subject: [PATCH] rpmscript.cc: change logging level around scriptlets to INFO from DEBUG That way we can debug scriptlet failures without writing lots of
@@ -11,15 +11,16 @@ Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> Rebased to 4.20.1 +Rebased to 6.0.1 Signed-off-by: Robert Yang <[email protected]> --- - lib/rpmscript.c | 8 ++++---- + lib/rpmscript.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index e9f288ae0..f0c628708 100644 ---- a/lib/rpmscript.c -+++ b/lib/rpmscript.c +diff --git a/lib/rpmscript.cc b/lib/rpmscript.cc +index fe5fc9138..861fd8ca8 100644 +--- a/lib/rpmscript.cc ++++ b/lib/rpmscript.cc @@ -299,7 +299,7 @@ static char * writeScript(const char *cmd, const char *script) if (Ferror(fd)) goto exit;
meta/recipes-devtools/rpm/rpm_6.0.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.20.1.bb +8 -5
@@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=066ecde17828e5c8911ec9eae8be78f4" -SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.20.x;protocol=https \ +SRC_URI = "git://github.com/rpm-software-management/rpm;branch=${BPN}-6.0.x;tag=${BP}-release;protocol=https \ file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \ file://0001-Do-not-read-config-files-from-HOME.patch \ file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
@@ -38,13 +38,15 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.20.x;protoc file://0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch \ file://0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch \ file://0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch \ - file://0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch \ + file://0001-tools-elfdeps.cc-Remove-format-module.patch \ + file://0001-macros.in-Set-_rpmformat-to-4.patch \ + file://0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch \ " PE = "1" -SRCREV = "c8dc5ea575a2e9c1488036d12f4b75f6a5a49120" +SRCREV = "58a917a6c5e24e9e8a01976c17d2eee06249b9b6" -DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3 sqlite3 zstd" +DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3 sqlite3 zstd scdoc-native" DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native" EXTRA_OECMAKE:append = " -D__CURL:FILEPATH=curl"
@@ -52,7 +54,7 @@ EXTRA_OECMAKE:append:libc-musl = " -DENABLE_NLS=OFF -DENABLE_OPENMP=OFF" # --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs # --localstatedir prevents rpm from writing its database to native sysroot when building images -EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var" +EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DLIBELF_FOUND=False" EXTRA_OECMAKE:append:class-nativesdk = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_FULL_SYSCONFDIR=/etc" inherit cmake gettext pkgconfig python3targetconfig
@@ -194,6 +196,7 @@ PROVIDES += "python3-rpm" FILES:python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/* ${PYTHON_SITEPACKAGES_DIR}/rpm-*.egg-info" RDEPENDS:${PN}-build = "bash perl python3-core debugedit" +RDEPENDS:${PN} += "bash" PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
Signature · 1 line
2.49.0
Quoted 3 lines · On Mon, 19 Jan 2026 at 07:09, <[email protected]> wrote:
- 0001-macros.in-Set-_rpmformat-to-4.patch
Fixed:
error: External dependency generator is incompatible with v6 packages
This one is creating technical debt. I can imagine support for v4 packages will be dropped at some not-too-distant point. We've had this deprecation warning for a long time, but it looks like the matter is becoming more pressing now. Can you look into it?
Quoted 7 lines
- 0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch Fixed:
GPG check FAILED* Add scdoc-native to DEPENDS to fix
do_configureerror for both native and target:
Could not find SCDOC using the following names: scdoc
Is this a hard dependency? Is there a cmake switch to turn it off?
Quoted 6 lines
Note, both target and native need scdoc-native.
* Add bash to RDEPENDS:${PN} to fix:
ERROR: rpm-1_6.0.1-r0do_package_qa: QA Issue:/usr/lib/rpm/rpm-setup-autosigncontained in package rpm requires/bin/bash, but no providers found in RDEPENDS:rpm? [file-rdeps]
All things that depend on bash are specifically placed into ${PN}-build, so that the main package will not pull in gplv3 licensed items. I can imagine this will fail in no-gpl3 tests too.
meta/recipes-devtools/rpm/rpm_6.0.1.bb EXTRA_OECMAKE:append:libc-musl = " -DENABLE_NLS=OFF -DENABLE_OPENMP=OFF" · line 57
Quoted 2 lines
meta/recipes-devtools/rpm/rpm_6.0.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.20.1.bb +1
-1-EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var" +EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DLIBELF_FOUND=False"
Addition of LIBELF_FOUND=False is not explained. Also I think it can be easily provided?
Otherwise, looks good, thanks for working on it!
Alex
Hi Alexender,
Quoted 9 lines · Alexander Kanavin
Quoted 3 lines · On Mon, 19 Jan 2026 at 07:09, <[email protected]> wrote:
- 0001-macros.in-Set-_rpmformat-to-4.patch
Fixed:
error: External dependency generator is incompatible with v6 packagesThis one is creating technical debt. I can imagine support for v4 packages will be dropped at some not-too-distant point. We've had this deprecation warning for a long time, but it looks like the matter is becoming more pressing now. Can you look into it?
OK, I will look into it.
Quoted 10 lines
Quoted 8 lines
- 0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch Fixed:
GPG check FAILED* Add scdoc-native to DEPENDS to fix
do_configureerror for both native and target:
Could not find SCDOC using the following names: scdocIs this a hard dependency? Is there a cmake switch to turn it off?
I will check and fix that.
Quoted 11 lines
Quoted 7 lines
Note, both target and native need scdoc-native.
* Add bash to RDEPENDS:${PN} to fix:
ERROR: rpm-1_6.0.1-r0do_package_qa: QA Issue:/usr/lib/rpm/rpm-setup-autosigncontained in package rpm requires/bin/bash, but no providers found in RDEPENDS:rpm? [file-rdeps]All things that depend on bash are specifically placed into ${PN}-build, so that the main package will not pull in gplv3 licensed items. I can imagine this will fail in no-gpl3 tests too.
I will move it into rpm-build.
Quoted 6 lines
meta/recipes-devtools/rpm/rpm_6.0.1.bb EXTRA_OECMAKE:append:libc-musl = " -DENABLE_NLS=OFF -DENABLE_OPENMP=OFF" · line 57
Quoted 3 lines
meta/recipes-devtools/rpm/rpm_6.0.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.20.1.bb +1
-1-EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var" +EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DLIBELF_FOUND=False"Addition of LIBELF_FOUND=False is not explained. Also I think it can be easily provided?
Good catch, we don't need this change, it has been fixed via 0001-tools-elfdeps.cc-Remove-format-module.patch
// Robert
Quoted 4 lines
Otherwise, looks good, thanks for working on it!
Alex
Quoted 8 lines · Robert Yang
Hi Alexender,
Quoted 5 lines · Alexander Kanavin
Quoted 3 lines · On Mon, 19 Jan 2026 at 07:09, <[email protected]> wrote:
- 0001-macros.in-Set-_rpmformat-to-4.patch
Fixed:
error: External dependency generator is incompatible with v6 packages
Quoted 6 lines
Quoted 4 lines
This one is creating technical debt. I can imagine support for v4 packages will be dropped at some not-too-distant point. We've had this deprecation warning for a long time, but it looks like the matter is becoming more pressing now. Can you look into it?
OK, I will look into it.
I checked the history, the external dependency is for rpm per file dependency, but that function hasn't been used any more since 2012:
===========
commit be40f6d0bb80274366af00461112af65687a4de8
Author: Richard Purdie <[email protected]> Date: Thu Feb 9 09:51:10 2012 +0000
package_rpm.bbclass: Optimise per file dependency handling
===========
And back to 2010:
===========
commit 84f7f70308eed0ac96abeb5a762e9b7765e5db91
Author: Mark Hatle <[email protected]> Date: Mon Aug 30 16:44:31 2010 -0500
package_rpm: Enable per file dependencies
===========
The per file dependency was for creating the rpm, but Richard disabled that in 2012, and there were no complains or updates in the past 13 years.
I think we can remove that code safely, then we can move to rpm 6.
I will send a V3 for it if no objections.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
- 0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch Fixed:
GPG check FAILED
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
* Add scdoc-native to DEPENDS to fix
do_configureerror for both native and target:
Could not find SCDOC using the following names: scdocIs this a hard dependency? Is there a cmake switch to turn it off?
I will check and fix that.
Yes, it's a hard dependency since the man pages in *man/* are scdoc sources.
// Robert
Quoted 33 lines
Quoted 4 lines
Quoted 4 lines
Note, both target and native need scdoc-native.
Quoted 8 lines
Quoted 4 lines
* Add bash to RDEPENDS:${PN} to fix:
ERROR: rpm-1_6.0.1-r0do_package_qa: QA Issue:/usr/lib/rpm/rpm-setup-autosign contained in package rpm requires/bin/bash, but no providers found in RDEPENDS:rpm? [file-rdeps]All things that depend on bash are specifically placed into ${PN}-build, so that the main package will not pull in gplv3 licensed items. I can imagine this will fail in no-gpl3 tests too.
I will move it into rpm-build.
Quoted 8 lines
Quoted 5 lines
-EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc - DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var" +EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc - DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DLIBELF_FOUND=False"
Addition of LIBELF_FOUND=False is not explained. Also I think it can be easily provided?
Good catch, we don't need this change, it has been fixed via 0001-tools- elfdeps.cc-Remove-format-module.patch
// Robert
Quoted 4 lines
Otherwise, looks good, thanks for working on it!
Alex