Skip to contentSkip to conversation

package/rpm: bump to version 4.20.1

PATCH New James Knight 1 participant 1 message Jul 1, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/rpm: bump to version 4.20.1

The most recent release of RPM is v4.20.1 [1].

- As of 4.19, RPM uses the CMake build system; updating to support.
- The rpm2archive tool is now a required component to build.
- COPYING file was updated [2] to new address; no license change.
- The removed patch set is part of this upstream release.
- Adding a patch to deal with a CMake setup issue (fixed upstream).
- Adding a patch to support musl without brace expansion support.

[1]: https://rpm.org/wiki/Releases/4.20.1
[2]: https://github.com/rpm-software-management/rpm/commit/593d94ddc490a424eef31cbcf90d4ca659448354

---

$ cat rpm.config
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_LUA=y
BR2_PACKAGE_LUA_5_4=y
BR2_PACKAGE_RPM=y
$ ./utils/test-pkg -c rpm.config -p rpm -a
                             arm-aarch64 [ 1/40]: OK
                   bootlin-aarch64-glibc [ 2/40]: OK
               bootlin-arcle-hs38-uclibc [ 3/40]: OK
                    bootlin-armv5-uclibc [ 4/40]: OK
                     bootlin-armv7-glibc [ 5/40]: OK
                      bootlin-armv7-musl [ 6/40]: OK
                   bootlin-armv7m-uclibc [ 7/40]: SKIPPED
                bootlin-m68k-5208-uclibc [ 8/40]: SKIPPED
               bootlin-m68k-68040-uclibc [ 9/40]: OK
             bootlin-microblazeel-uclibc [10/40]: OK
                   bootlin-mipsel-uclibc [11/40]: OK
                bootlin-mipsel32r6-glibc [12/40]: OK
                 bootlin-openrisc-uclibc [13/40]: OK
           bootlin-powerpc-e500mc-uclibc [14/40]: OK
        bootlin-powerpc64le-power8-glibc [15/40]: OK
                   bootlin-riscv32-glibc [16/40]: OK
                   bootlin-riscv64-glibc [17/40]: OK
                    bootlin-riscv64-musl [18/40]: OK
                 bootlin-s390x-z13-glibc [19/40]: OK
                      bootlin-sh4-uclibc [20/40]: OK
                    bootlin-sparc-uclibc [21/40]: OK
                   bootlin-sparc64-glibc [22/40]: OK
                    bootlin-x86-64-glibc [23/40]: OK
                     bootlin-x86-64-musl [24/40]: OK
                   bootlin-x86-64-uclibc [25/40]: OK
                   bootlin-x86-i686-musl [26/40]: OK
                   bootlin-xtensa-uclibc [27/40]: OK
                            br-arm-basic [28/40]: SKIPPED
                    br-arm-full-nothread [29/40]: SKIPPED
                      br-arm-full-static [30/40]: SKIPPED
                   br-i386-pentium4-full [31/40]: OK
                      br-mips64-n64-full [32/40]: OK
                 br-mips64r6-el-hf-glibc [33/40]: OK
               br-powerpc-603e-basic-cpp [34/40]: SKIPPED
               br-powerpc64-power7-glibc [35/40]: OK
                       linaro-aarch64-be [36/40]: OK
                          linaro-aarch64 [37/40]: OK
                              linaro-arm [38/40]: OK
                           sourcery-mips [39/40]: OK
                         sourcery-mips64 [40/40]: OK
40 builds, 6 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
---
 Config.in.legacy                              |   6 +
 .../0001-fix-var-declare-in-label-error.patch |  40 ------
 ...3.2-compatible-object-hash-slot-type.patch |  58 ---------
 ...ix-missing-basename-include-on-macOS.patch |  26 ----
 ...ix-check_c_compiler_flag-cmake-tests.patch |  28 ++++
 ...rted-brace-expansion-support-for-mus.patch |  38 ++++++
 package/rpm/Config.in                         |  23 +---
 package/rpm/rpm.hash                          |   6 +-
 package/rpm/rpm.mk                            | 121 +++++++++++-------
 9 files changed, 154 insertions(+), 192 deletions(-)
 delete mode 100644 package/rpm/0001-fix-var-declare-in-label-error.patch
 delete mode 100644 package/rpm/0002-Use-Python-3.2-compatible-object-hash-slot-type.patch
 delete mode 100644 package/rpm/0003-Fix-missing-basename-include-on-macOS.patch
 create mode 100644 package/rpm/001-Fix-check_c_compiler_flag-cmake-tests.patch
 create mode 100644 package/rpm/002-suppress-unsupported-brace-expansion-support-for-mus.patch
Config.in.legacy +6 -0
index 23d7da13b4..0a2db9dd76 100644
@@ -146,6 +146,12 @@ endif
 
 comment "Legacy options removed in 2025.08"
 
+config BR2_PACKAGE_RPM_RPM2ARCHIVE
+	bool "rpm2archive option has been removed"
+	select BR2_LEGACY
+	help
+	  rpm2archive is no longer optional in upstream.
+
 config BR2_PACKAGE_LIBWEBSOCK
 	bool "libwebsock has been removed"
 	select BR2_LEGACY
package/rpm/0001-fix-var-declare-in-label-error.patch deleted +0 -40
deleted file mode 100644
index 648040c663..0000000000
@@ -1,40 +0,0 @@
-From b960c0b43a080287a7c13533eeb2d9f288db1414 Mon Sep 17 00:00:00 2001
-From: Florian Festi <[email protected]>
-Date: Thu, 16 Mar 2023 19:05:04 +0100
-Subject: [PATCH] Fix compiler error on clang
-
-Turns out variable declarations are not allowed after a label, even in
-C99. And while some compilers don't seem to care others do.
-
-Moving the declaration of mayopen to the start of the function to avoid
-this problem.
-
-Resolves: #2435
-
-Upstream: b960c0b43a080287a7c13533eeb2d9f288db1414
-Signed-off-by: James Knight <[email protected]>
----
- lib/fsm.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/lib/fsm.c b/lib/fsm.c
-index 5671ac642d..183293edb0 100644
---- a/lib/fsm.c
-+++ b/lib/fsm.c
-@@ -879,6 +879,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
-     int nodigest = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOFILEDIGEST) ? 1 : 0;
-     int nofcaps = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOCAPS) ? 1 : 0;
-     int firstlinkfile = -1;
-+    int mayopen = 0;
-     char *tid = NULL;
-     struct filedata_s *fdata = xcalloc(fc, sizeof(*fdata));
-     struct filedata_s *firstlink = NULL;
-@@ -1016,7 +1017,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
- 
- setmeta:
- 	    /* Special files require path-based ops */
--	    int mayopen = S_ISREG(fp->sb.st_mode) || S_ISDIR(fp->sb.st_mode);
-+	    mayopen = S_ISREG(fp->sb.st_mode) || S_ISDIR(fp->sb.st_mode);
- 	    if (!rc && fd == -1 && mayopen) {
- 		int flags = O_RDONLY;
- 		/* Only follow safe symlinks, and never on temporary files */
package/rpm/0002-Use-Python-3.2-compatible-object-hash-slot-type.patch deleted +0 -58

58 lines not on this page · raw message

package/rpm/0003-Fix-missing-basename-include-on-macOS.patch deleted +0 -26
deleted file mode 100644
index ec920612e2..0000000000
@@ -1,26 +0,0 @@
-From f510770a214bd2e8144a39868c34cd568179599e Mon Sep 17 00:00:00 2001
-From: Calvin Buckley <[email protected]>
-Date: Tue, 11 Jul 2023 19:22:41 -0300
-Subject: [PATCH] Fix missing basename include on macOS
-
-Upstream: b2e67642fd8cb64d8cb1cca9e759396c1c10807d
-Signed-off-by: Thomas Petazzoni <[email protected]>
----
- tools/rpmuncompress.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tools/rpmuncompress.c b/tools/rpmuncompress.c
-index bd4146d54..58ddf5683 100644
---- a/tools/rpmuncompress.c
-+++ b/tools/rpmuncompress.c
-@@ -1,6 +1,7 @@
- #include "system.h"
- 
- #include <popt.h>
-+#include <libgen.h>
- #include <errno.h>
- #include <stdio.h>
- #include <string.h>
--- 
-2.49.0
-
package/rpm/001-Fix-check_c_compiler_flag-cmake-tests.patch new file +28 -0
new file mode 100644
index 0000000000..341c8005fd
@@ -0,0 +1,28 @@
+From e1d7046ba6662eac9e5e7638e484eb792afa36cc Mon Sep 17 00:00:00 2001
+From: Mike Gorse <[email protected]>
+Date: Sat, 22 Mar 2025 18:09:31 -0500
+Subject: [PATCH] Fix check_c_compiler_flag cmake tests
+
+Check_c_compiler_flag sets a cache variable, so CACHE needs to be passed
+in order to reset it for the next use.
+
+Upstream: https://github.com/rpm-software-management/rpm/commit/e1d7046ba6662eac9e5e7638e484eb792afa36cc
+See-also: https://github.com/rpm-software-management/rpm/commit/e14502834fe6a9c6c9a439401ac3d2c8fd979267
+Signed-off-by: James Knight <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 53d962d9bc..8e6bf65701 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -432,7 +432,7 @@ foreach (flag -fno-strict-overflow -fno-delete-null-pointer-checks -fhardened)
+ 	if (found)
+ 		add_compile_options(${flag})
+ 	endif()
+-	unset(found)
++	unset(found CACHE)
+ endforeach()
+ 
+ # generated sources
package/rpm/002-suppress-unsupported-brace-expansion-support-for-mus.patch new file +38 -0
new file mode 100644
index 0000000000..2719cae795
@@ -0,0 +1,38 @@
+From 5ce7becd933383ed9515310f86fc51553cca43b7 Mon Sep 17 00:00:00 2001
+From: James Knight <[email protected]>
+Date: Tue, 1 Jul 2025 08:56:39 -0400
+Subject: [PATCH 1/1] suppress unsupported brace expansion support for musl
+
+rpm has refactored its glob-related implementation to rely on GNU
+glob(3), which means brace expansion no longer works for musl.
+Configuring this define allows musl environments to still be able to use
+rpm; however, without brace expansion support.
+
+Upstream: https://github.com/rpm-software-management/rpm/issues/2844
+Signed-off-by: James Knight <[email protected]>
+---
+ rpmio/rpmglob.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/rpmio/rpmglob.c b/rpmio/rpmglob.c
+index eb439cad8..15a51ccb9 100644
+--- a/rpmio/rpmglob.c
++++ b/rpmio/rpmglob.c
+@@ -33,6 +33,14 @@
+ 
+ #include "debug.h"
+ 
++// rpm has refactored its glob-related implementation to rely on GNU glob(3)
++// which means brace expansion no longer works for musl. Configuring this
++// define allows musl environments to still be able to use rpm; however,
++// without brace expansion support.
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+ /* Return 1 if pattern contains a magic char, see glob(7) for a list */
+ static int ismagic(const char *pattern)
+ {
+-- 
+2.49.0
+
package/rpm/Config.in +5 -18
index 8730e15200..6d10995148 100644
@@ -1,6 +1,6 @@
-comment "rpm needs a toolchain w/ dynamic library, threads and lua >= 5.3"
+comment "rpm needs a toolchain w/ dynamic library, threads, lua >= 5.3 and wchar"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \
-		|| !BR2_PACKAGE_LUA || BR2_PACKAGE_LUA_5_1
+		|| !BR2_PACKAGE_LUA || BR2_PACKAGE_LUA_5_1 || !BR2_USE_WCHAR
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	depends on BR2_USE_MMU
 
@@ -11,26 +11,13 @@ config BR2_PACKAGE_RPM
 	depends on BR2_PACKAGE_LUA && !BR2_PACKAGE_LUA_5_1
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
+	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_FILE
+	select BR2_PACKAGE_LIBARCHIVE
+	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_POPT
 	select BR2_PACKAGE_ZLIB
 	help
 	  The RPM Package Manager (RPM).
 
 	  http://www.rpm.org/
-
-if BR2_PACKAGE_RPM
-
-comment "rpm2archive support needs a toolchain w/ wchar"
-	depends on !BR2_USE_WCHAR
-
-config BR2_PACKAGE_RPM_RPM2ARCHIVE
-	bool "rpm2archive command"
-	default y
-	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_LIBARCHIVE
-	help
-	  Enable rpm2archive
-
-endif
package/rpm/rpm.hash +3 -3
index fd03f062bc..0013a74b63 100644
@@ -1,5 +1,5 @@
-# From https://rpm.org/wiki/Releases/4.18.1.html
-sha256  37f3b42c0966941e2ad3f10fde3639824a6591d07197ba8fd0869ca0779e1f56  rpm-4.18.1.tar.bz2
+# From https://rpm.org/wiki/Releases/4.20.1.html
+sha256  52647e12638364533ab671cbc8e485c96f9f08889d93fe0ed104a6632661124f  rpm-4.20.1.tar.bz2
 
 # Hash for license file
-sha256  171d94d9f1641316bff7f157a903237dc69cdb5fca405fed8c832c76ed8370f9  COPYING
+sha256  f4af48a570b4ac09fce37fbaaa80324565405bb07d257070f509bdaf9994b73b  COPYING
package/rpm/rpm.mk +74 -47

196 lines not on this page · raw message

Signature · 6 lines
2.49.0.windows.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot