diff mbox series

[v3] rpm: 6.0.2 -> 6.1.0

Message ID 20261119140122.4072304-1-sumanth.gavini@windriver.com
State Under Review
Headers show
Series [v3] rpm: 6.0.2 -> 6.1.0 | expand

Commit Message

Sumanth Gavini Nov. 19, 2026, 2:01 p.m. UTC
* Switch SRC_URI to the rpm-6.1.x branch.
* COPYING checksum changed, upstream added an SPDX clarification.
  The license is unchanged.
* rpm-setup-autosign moved from ${libdir}/rpm to ${bindir}, add it to
  rpm-build. rpmuncompress moved too and stays in the rpm package.
* Refresh 0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch,
  it applied with fuzz 2 after upstream added the WITH_WEBSITE option.
  The other patches apply cleanly.
* Add 0001-lib-headerfmt.cc-Remove-format-module.patch, 6.1.0 uses
  std::format() in lib/headerfmt.cc and there is no <format> before
  gcc 13, so the build fails on hosts such as Debian 12 (gcc 12.2).
  Same workaround as for tools/elfdeps.cc.

License-Update: COPYING now has an SPDX clarification note, license unchanged

Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
---
* v3: add 0001-lib-headerfmt.cc-Remove-format-module.patch, <format> is
      not available before gcc 13 (Debian 12 autobuilder failure).

* v2: add License-Update tag to the commit message for the COPYING
      checksum change (patchtest). No other changes.
 ...lib-rpm-as-the-installation-path-for.patch | 11 +++--
 ...ib-headerfmt.cc-Remove-format-module.patch | 42 +++++++++++++++++++
 .../rpm/{rpm_6.0.2.bb => rpm_6.1.0.bb}        |  8 ++--
 3 files changed, 55 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-devtools/rpm/files/0001-lib-headerfmt.cc-Remove-format-module.patch
 rename meta/recipes-devtools/rpm/{rpm_6.0.2.bb => rpm_6.1.0.bb} (96%)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
index 309320cf43..ecb222592c 100644
--- a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -11,6 +11,10 @@  Updated for rpm 6.0.2:
 Remove the changes for macros.in since it doesn't work for rpmbuild, rpmbuild
 is like cross build, will define the values in package_rpm.bbclass.
 
+Refreshed for rpm 6.1.0:
+Update the context for the new WITH_WEBSITE option line, no functional
+change.
+
 Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
 Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
 ---
@@ -18,14 +22,15 @@  Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index de0b578a6..9a3aba071 100644
+index e2a1c5c0b..7e821b1ee 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -41,7 +41,7 @@ option(WITH_LIBELF "Build with libelf support" ON)
- option(WITH_LIBLZMA "Build with liblzma support" ON)
+@@ -41,7 +41,7 @@ option(WITH_LIBLZMA "Build with liblzma support" ON)
  option(WITH_DOXYGEN "Build API docs with doxygen" OFF)
+ option(WITH_WEBSITE "Build standalone website" OFF)
  
 -set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib/rpm" CACHE PATH "rpm home")
 +set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rpm" CACHE PATH "rpm home")
  set(RPM_MACROSDIR "${RPM_CONFIGDIR}/macros.d")
  set(RPM_VENDOR "vendor" CACHE STRING "rpm vendor string")
+ 
diff --git a/meta/recipes-devtools/rpm/files/0001-lib-headerfmt.cc-Remove-format-module.patch b/meta/recipes-devtools/rpm/files/0001-lib-headerfmt.cc-Remove-format-module.patch
new file mode 100644
index 0000000000..895e305a9d
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-lib-headerfmt.cc-Remove-format-module.patch
@@ -0,0 +1,42 @@ 
+From b956b03412ff099c7bf2858ece95f856ebbb10f5 Mon Sep 17 00:00:00 2001
+From: Sumanth Gavini <sumanth.gavini@windriver.com>
+Date: Thu, 19 Nov 2026 13:44:22 +0000
+Subject: [PATCH] lib/headerfmt.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 Debian 12 (gcc 12.2) and Ubuntu 22.04. rpm 6.1.0 uses
+std::format() in formatValue() since upstream commit 18a4d495e ("Eliminate
+variable length array (VLA) use in headerFormat()"), same as
+tools/elfdeps.cc which is already handled by
+0001-tools-elfdeps.cc-Remove-format-module.patch.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
+---
+ lib/headerfmt.cc | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/lib/headerfmt.cc b/lib/headerfmt.cc
+index a188d052b..132cb02da 100644
+--- a/lib/headerfmt.cc
++++ b/lib/headerfmt.cc
+@@ -4,7 +4,6 @@
+ 
+ #include "system.h"
+ 
+-#include <format>
+ #include <string>
+ #include <unordered_map>
+ 
+@@ -741,7 +740,7 @@ static bool formatValue(headerSprintfArgs hsa, sprintfTag tag, int element)
+     /* Handle field width + justification formatting if specified */
+     if (tag->format && *tag->format) {
+ 	char *tval = NULL;
+-	const std::string fmtbuf = std::format("%{}s", tag->format);
++	const std::string fmtbuf = std::string("%") + tag->format + "s";
+ 
+ 	rasprintf(&tval, fmtbuf.c_str(), val);
+ 	free(val);
+-- 
+2.54.0
+
diff --git a/meta/recipes-devtools/rpm/rpm_6.0.2.bb b/meta/recipes-devtools/rpm/rpm_6.1.0.bb
similarity index 96%
rename from meta/recipes-devtools/rpm/rpm_6.0.2.bb
rename to meta/recipes-devtools/rpm/rpm_6.1.0.bb
index c27f58a0e8..e661c50b8c 100644
--- a/meta/recipes-devtools/rpm/rpm_6.0.2.bb
+++ b/meta/recipes-devtools/rpm/rpm_6.1.0.bb
@@ -22,9 +22,9 @@  HOMEPAGE = "http://www.rpm.org"
 
 # libraries are also LGPL - how to express this?
 LICENSE = "GPL-2.0-only"
-LIC_FILES_CHKSUM = "file://COPYING;md5=066ecde17828e5c8911ec9eae8be78f4"
+LIC_FILES_CHKSUM = "file://COPYING;md5=173bb5fcd0680812f4771daa00511604"
 
-SRC_URI = "git://github.com/rpm-software-management/rpm;protocol=https;branch=rpm-6.0.x;tag=${BP}-release \
+SRC_URI = "git://github.com/rpm-software-management/rpm;protocol=https;branch=rpm-6.1.x;tag=${BP}-release \
            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,12 +38,13 @@  SRC_URI = "git://github.com/rpm-software-management/rpm;protocol=https;branch=rp
            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-tools-elfdeps.cc-Remove-format-module.patch \
+           file://0001-lib-headerfmt.cc-Remove-format-module.patch \
            file://0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch \
            file://0003-Do-not-install-the-pkgconfig-dependency-generator.patch \
            "
 
 PE = "1"
-SRCREV = "a7f89afb57a98f6419d0eff35ca792198293b682"
+SRCREV = "f832c7e69945248dd5bcfcacfd10c176ee300fa2"
 
 DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3 sqlite3 zstd scdoc-native"
 DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native"
@@ -183,6 +184,7 @@  FILES:${PN}-build = "\
     ${libdir}/rpm/mkinstalldirs \
     ${libdir}/rpm/macros.p* \
     ${libdir}/rpm/fileattrs/* \
+    ${bindir}/rpm-setup-autosign \
     ${libdir}/rpm/rpm-setup-autosign \
 "