summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2024-01-26 14:34:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-27 08:20:02 +0000
commit05d0b9eafb855dcf6ce5c3f641b5c155e274c833 (patch)
treed4b1c36e60dae916e83e4a334d3ef542a04bfe74 /meta
parent482ed7cd8035233dbe5aa6db1e606fa4b3f03948 (diff)
downloadpoky-05d0b9eafb855dcf6ce5c3f641b5c155e274c833.tar.gz
rpm: update 4.18.1 -> 4.19.1
Upstream has replaced autoconf with cmake, which necessitates a rewrite of the recipe and available options, and a rebase to cmake of 0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch Correct a mistake in 0001-Do-not-read-config-files-from-HOME.patch : the patch was removing the NULL marker at the end of function arguments, and 0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch was restoring it (in addition to the actual change the patch was making). Now both patches preserve the NULL terminator. (From OE-Core rev: 38549d462b399e3a63335f60a44c8bbced98639a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch12
-rw-r--r--meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch28
-rw-r--r--meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch42
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch12
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch52
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch19
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch12
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Duplicate-filename-before-passing-it-to-basename.patch40
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Fix-missing-basename-include-on-macOS.patch26
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch56
-rw-r--r--meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch24
-rw-r--r--meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch13
-rw-r--r--meta/recipes-devtools/rpm/files/0001-configure.ac-add-linux-gnux32-variant-to-triplet-han.patch28
-rw-r--r--meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch13
-rw-r--r--meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch26
-rw-r--r--meta/recipes-devtools/rpm/files/0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch35
-rw-r--r--meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch31
-rw-r--r--meta/recipes-devtools/rpm/files/0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch26
-rw-r--r--meta/recipes-devtools/rpm/files/0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch34
-rw-r--r--meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch19
-rw-r--r--meta/recipes-devtools/rpm/files/ea3187cfcf9cac87e5bc5e7db79b0338da9e355e.patch51
-rw-r--r--meta/recipes-devtools/rpm/files/fix-declaration.patch39
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.19.1.bb (renamed from meta/recipes-devtools/rpm/rpm_4.18.1.bb)73
23 files changed, 328 insertions, 383 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
index 9fa486dfd3..96fe57dfeb 100644
--- a/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
+++ b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
@@ -1,4 +1,4 @@
1From 93f219df68f3741ff63a294a16bcbe8deba1112f Mon Sep 17 00:00:00 2001 1From ecc45e3ae837ab50603088dcc8fd2f8e67a7ece6 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 9 Mar 2017 18:54:02 +0200 3Date: Thu, 9 Mar 2017 18:54:02 +0200
4Subject: [PATCH] Add a color setting for mips64_n32 binaries 4Subject: [PATCH] Add a color setting for mips64_n32 binaries
@@ -12,10 +12,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12 2 files changed, 6 insertions(+) 12 2 files changed, 6 insertions(+)
13 13
14diff --git a/build/rpmfc.c b/build/rpmfc.c 14diff --git a/build/rpmfc.c b/build/rpmfc.c
15index 26606378f..a16e3f4e9 100644 15index 4b67a9bae..ed7e4e623 100644
16--- a/build/rpmfc.c 16--- a/build/rpmfc.c
17+++ b/build/rpmfc.c 17+++ b/build/rpmfc.c
18@@ -646,6 +646,7 @@ exit: 18@@ -660,6 +660,7 @@ exit:
19 static const struct rpmfcTokens_s rpmfcTokens[] = { 19 static const struct rpmfcTokens_s rpmfcTokens[] = {
20 { "directory", RPMFC_INCLUDE }, 20 { "directory", RPMFC_INCLUDE },
21 21
@@ -23,7 +23,7 @@ index 26606378f..a16e3f4e9 100644
23 { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE }, 23 { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE },
24 { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE }, 24 { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE },
25 25
26@@ -1151,6 +1152,9 @@ static uint32_t getElfColor(const char *fn) 26@@ -1158,6 +1159,9 @@ static uint32_t getElfColor(const char *fn)
27 color = RPMFC_ELF32; 27 color = RPMFC_ELF32;
28 break; 28 break;
29 } 29 }
@@ -34,10 +34,10 @@ index 26606378f..a16e3f4e9 100644
34 if (elf) 34 if (elf)
35 elf_end(elf); 35 elf_end(elf);
36diff --git a/rpmrc.in b/rpmrc.in 36diff --git a/rpmrc.in b/rpmrc.in
37index 2975a3a0e..c7232b48b 100644 37index 8646a966b..7349fdfd3 100644
38--- a/rpmrc.in 38--- a/rpmrc.in
39+++ b/rpmrc.in 39+++ b/rpmrc.in
40@@ -139,6 +139,8 @@ archcolor: mipsr6el 1 40@@ -142,6 +142,8 @@ archcolor: mipsr6el 1
41 archcolor: mips64r6 2 41 archcolor: mips64r6 2
42 archcolor: mips64r6el 2 42 archcolor: mips64r6el 2
43 43
diff --git a/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch
new file mode 100644
index 0000000000..5053caae33
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch
@@ -0,0 +1,28 @@
1From ca4655f36c3c7883eb50381902890b23f0e8aaab Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Wed, 29 Nov 2023 14:06:15 +0100
4Subject: [PATCH] CMakeLists.txt: look for lua with pkg-config rather than
5 cmake modules
6
7Otherwise cmake will try to find libm, badly, and fail.
8
9Upstream-Status: Inappropriate [oe-core specific]
10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11
12---
13 CMakeLists.txt | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/CMakeLists.txt b/CMakeLists.txt
17index 7f0630453..d0ea565f3 100644
18--- a/CMakeLists.txt
19+++ b/CMakeLists.txt
20@@ -187,7 +187,7 @@ set(REQFUNCS
21 )
22
23 find_package(PkgConfig REQUIRED)
24-find_package(Lua 5.2 REQUIRED)
25+pkg_check_modules(LUA REQUIRED IMPORTED_TARGET lua>=5.2)
26 find_package(ZLIB REQUIRED)
27 find_package(BZip2)
28 find_package(Iconv)
diff --git a/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch
new file mode 100644
index 0000000000..db83b176b4
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch
@@ -0,0 +1,42 @@
1From 3c2e529c6cc1bae4bc94cbed7358c6e0cdd2de02 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 16 Jan 2024 13:43:36 +0100
4Subject: [PATCH] CMakeLists.txt: restore readline support as an explicit
5 option
6
7This was lost in autotools -> cmake transition. The particular
8reason to make it explicit is that readline is gpl version 3
9licensed, and in some builds components under that license
10need to be excluded.
11
12Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/2852]
13Signed-off-by: Alexander Kanavin <alex@linutronix.de>
14---
15 CMakeLists.txt | 7 ++++++-
16 1 file changed, 6 insertions(+), 1 deletion(-)
17
18diff --git a/CMakeLists.txt b/CMakeLists.txt
19index 0a474106e..89e27417f 100644
20--- a/CMakeLists.txt
21+++ b/CMakeLists.txt
22@@ -31,6 +31,7 @@ option(WITH_AUDIT "Build with audit support" ON)
23 option(WITH_FSVERITY "Build with fsverity support" OFF)
24 option(WITH_IMAEVM "Build with IMA support" OFF)
25 option(WITH_FAPOLICYD "Build with fapolicyd support" ON)
26+option(WITH_READLINE "Build with readline support" ON)
27
28 set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rpm" CACHE PATH "rpm home")
29 set(RPM_VENDOR "vendor" CACHE STRING "rpm vendor string")
30@@ -193,7 +194,11 @@ find_package(BZip2)
31 find_package(Iconv)
32
33 pkg_check_modules(POPT REQUIRED IMPORTED_TARGET popt)
34-pkg_check_modules(READLINE IMPORTED_TARGET readline)
35+
36+if (WITH_READLINE)
37+ pkg_check_modules(READLINE REQUIRED IMPORTED_TARGET readline)
38+endif()
39+
40 pkg_check_modules(ZSTD IMPORTED_TARGET libzstd>=1.3.8)
41 pkg_check_modules(LIBELF IMPORTED_TARGET libelf)
42 pkg_check_modules(LIBDW IMPORTED_TARGET libdw)
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
index 8440c3516d..df5543873c 100644
--- a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
@@ -1,4 +1,4 @@
1From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:00 2001 1From d77429bf20d138ec8ce577c0080cae1f1bc2aa6f Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 9 Jan 2017 18:52:11 +0200 3Date: Mon, 9 Jan 2017 18:52:11 +0200
4Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in 4Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
@@ -14,11 +14,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14 build/pack.c | 4 ---- 14 build/pack.c | 4 ----
15 1 file changed, 4 deletions(-) 15 1 file changed, 4 deletions(-)
16 16
17Index: git/build/pack.c 17diff --git a/build/pack.c b/build/pack.c
18=================================================================== 18index f7dac6d9a..f382c7da0 100644
19--- git.orig/build/pack.c 19--- a/build/pack.c
20+++ git/build/pack.c 20+++ b/build/pack.c
21@@ -709,10 +709,6 @@ static rpmRC packageBinary(rpmSpec spec, 21@@ -711,10 +711,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
22 headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); 22 headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
23 } 23 }
24 24
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 8fdc5edb10..b056d19741 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
@@ -1,4 +1,4 @@
1From 5fc560aaf1184d35d161f7d50dbb6323c90cc02d Mon Sep 17 00:00:00 2001 1From 7948f21e08bc7552b281ed0098a9c8099d2370cb Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 27 Feb 2017 09:43:30 +0200 3Date: Mon, 27 Feb 2017 09:43:30 +0200
4Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for 4Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
@@ -8,29 +8,28 @@ Upstream-Status: Denied [https://github.com/rpm-software-management/rpm/pull/263
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9 9
10--- 10---
11 configure.ac | 2 +- 11 CMakeLists.txt | 2 +-
12 macros.in | 2 +- 12 macros.in | 2 +-
13 rpm.am | 4 ++-- 13 2 files changed, 2 insertions(+), 2 deletions(-)
14 3 files changed, 4 insertions(+), 4 deletions(-)
15 14
16diff --git a/configure.ac b/configure.ac 15diff --git a/CMakeLists.txt b/CMakeLists.txt
17index e6676c581..ec28db9b6 100644 16index 2767915fb..7f0630453 100644
18--- a/configure.ac 17--- a/CMakeLists.txt
19+++ b/configure.ac 18+++ b/CMakeLists.txt
20@@ -942,7 +942,7 @@ else 19@@ -32,7 +32,7 @@ option(WITH_FSVERITY "Build with fsverity support" OFF)
21 usrprefix=$prefix 20 option(WITH_IMAEVM "Build with IMA support" OFF)
22 fi 21 option(WITH_FAPOLICYD "Build with fapolicyd support" ON)
23 22
24-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`" 23-set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib/rpm" CACHE PATH "rpm home")
25+RPMCONFIGDIR="`echo ${libdir}/rpm`" 24+set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rpm" CACHE PATH "rpm home")
26 AC_SUBST(RPMCONFIGDIR) 25 set(RPM_VENDOR "vendor" CACHE STRING "rpm vendor string")
27 26
28 AC_SUBST(OBJDUMP) 27 # Emulate libtool versioning. Before a public release:
29diff --git a/macros.in b/macros.in 28diff --git a/macros.in b/macros.in
30index a2411d784..735b74d99 100644 29index b49ffaad4..3acbe78f6 100644
31--- a/macros.in 30--- a/macros.in
32+++ b/macros.in 31+++ b/macros.in
33@@ -930,7 +930,7 @@ package or when debugging this package.\ 32@@ -969,7 +969,7 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\
34 %_sharedstatedir %{_prefix}/com 33 %_sharedstatedir %{_prefix}/com
35 %_localstatedir %{_prefix}/var 34 %_localstatedir %{_prefix}/var
36 %_lib lib 35 %_lib lib
@@ -39,20 +38,3 @@ index a2411d784..735b74d99 100644
39 %_includedir %{_prefix}/include 38 %_includedir %{_prefix}/include
40 %_infodir %{_datadir}/info 39 %_infodir %{_datadir}/info
41 %_mandir %{_datadir}/man 40 %_mandir %{_datadir}/man
42diff --git a/rpm.am b/rpm.am
43index 55b5b3935..5a51f102b 100644
44--- a/rpm.am
45+++ b/rpm.am
46@@ -1,10 +1,10 @@
47 # Internal binaries
48 ## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm
49-rpmlibexecdir = $(prefix)/lib/rpm
50+rpmlibexecdir = $(libdir)/rpm
51
52 # Host independent config files
53 ## HACK: it probably should be $(datadir)/rpm
54-rpmconfigdir = $(prefix)/lib/rpm
55+rpmconfigdir = $(libdir)/rpm
56
57 # Libtool version (current-revision-age) for all our libraries
58 rpm_version_info = 13:0:4
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
index fda64eefe0..6a18679da2 100644
--- a/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
@@ -1,35 +1,36 @@
1From 35381b6cd6c1b571bf7e6b0640de0f54dbf94386 Mon Sep 17 00:00:00 2001 1From 4f34994d9ad38d96976578a9d1a006f72e5aca50 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 10 Jan 2017 14:11:30 +0200 3Date: Tue, 10 Jan 2017 14:11:30 +0200
4Subject: [PATCH] Do not read config files from $HOME 4Subject: [PATCH] Do not read config files from $HOME
5 5
6Upstream-Status: Inappropriate [oe-core specific] 6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
8--- 9---
9 lib/rpmrc.c | 6 ++---- 10 lib/rpmrc.c | 6 ++----
10 1 file changed, 2 insertions(+), 4 deletions(-) 11 1 file changed, 2 insertions(+), 4 deletions(-)
11 12
12Index: git/lib/rpmrc.c 13diff --git a/lib/rpmrc.c b/lib/rpmrc.c
13=================================================================== 14index 269d490ac..f39dcfc11 100644
14--- git.orig/lib/rpmrc.c 15--- a/lib/rpmrc.c
15+++ git/lib/rpmrc.c 16+++ b/lib/rpmrc.c
16@@ -458,8 +458,7 @@ static void setDefaults(void) 17@@ -458,8 +458,7 @@ static void setDefaults(void)
17 if (!defrcfiles) { 18 if (!defrcfiles) {
18 defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", 19 defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
19 confdir, "/" RPMCANONVENDOR "/rpmrc", ":", 20 confdir, "/" RPM_VENDOR "/rpmrc", ":",
20- SYSCONFDIR "/rpmrc", ":", 21- SYSCONFDIR "/rpmrc", ":",
21- "~/.rpmrc", NULL); 22- "~/.rpmrc", NULL);
22+ SYSCONFDIR "/rpmrc", ":"); 23+ SYSCONFDIR "/rpmrc", NULL);
23 } 24 }
24 25
25 #ifndef MACROFILES 26 #ifndef MACROFILES
26@@ -471,8 +470,7 @@ static void setDefaults(void) 27@@ -471,8 +470,7 @@ static void setDefaults(void)
27 confdir, "/" RPMCANONVENDOR "/macros", ":", 28 confdir, "/" RPM_VENDOR "/macros", ":",
28 SYSCONFDIR "/rpm/macros.*", ":", 29 SYSCONFDIR "/rpm/macros.*", ":",
29 SYSCONFDIR "/rpm/macros", ":", 30 SYSCONFDIR "/rpm/macros", ":",
30- SYSCONFDIR "/rpm/%{_target}/macros", ":", 31- SYSCONFDIR "/rpm/%{_target}/macros", ":",
31- "~/.rpmmacros", NULL); 32- "~/.rpmmacros", NULL);
32+ SYSCONFDIR "/rpm/%{_target}/macros", ":"); 33+ SYSCONFDIR "/rpm/%{_target}/macros", NULL);
33 } 34 }
34 #else 35 #else
35 macrofiles = MACROFILES; 36 macrofiles = MACROFILES;
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
index ae24b663aa..318f65ed37 100644
--- a/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
@@ -1,4 +1,4 @@
1From a674b9cc7af448d7c6748bc163bf37dc14a57f09 Mon Sep 17 00:00:00 2001 1From 25beba1efc31901a3bb0b1b6f0604d6583dc0513 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 20 Jan 2017 13:32:06 +0200 3Date: Fri, 20 Jan 2017 13:32:06 +0200
4Subject: [PATCH] Do not reset the PATH environment variable before running 4Subject: [PATCH] Do not reset the PATH environment variable before running
@@ -13,11 +13,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13 lib/rpmscript.c | 2 +- 13 lib/rpmscript.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
15 15
16Index: git/lib/rpmscript.c 16diff --git a/lib/rpmscript.c b/lib/rpmscript.c
17=================================================================== 17index 36e37cf77..37ada014c 100644
18--- git.orig/lib/rpmscript.c 18--- a/lib/rpmscript.c
19+++ git/lib/rpmscript.c 19+++ b/lib/rpmscript.c
20@@ -231,7 +231,7 @@ static void doScriptExec(ARGV_const_t ar 20@@ -252,7 +252,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
21 if (ipath && ipath[5] != '%') 21 if (ipath && ipath[5] != '%')
22 path = ipath; 22 path = ipath;
23 23
diff --git a/meta/recipes-devtools/rpm/files/0001-Duplicate-filename-before-passing-it-to-basename.patch b/meta/recipes-devtools/rpm/files/0001-Duplicate-filename-before-passing-it-to-basename.patch
deleted file mode 100644
index f9b809d167..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-Duplicate-filename-before-passing-it-to-basename.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 3fa2ae78db9b31edb4c22f3b5cd36c6c972947f1 Mon Sep 17 00:00:00 2001
2From: Florian Festi <ffesti@redhat.com>
3Date: Wed, 26 Jul 2023 15:01:35 +0200
4Subject: [PATCH] Duplicate filename before passing it to basename
5
6basename is allowed change the string passed to it. While we don't need
7the filename after that just casting away the const seems a bit too
8hacky.
9
10Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/3fa2ae78db9b31edb4c22f3b5cd36c6c972947f1]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 tools/rpmuncompress.c | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
15
16diff --git a/tools/rpmuncompress.c b/tools/rpmuncompress.c
17index 58ddf5683..e13cc6a66 100644
18--- a/tools/rpmuncompress.c
19+++ b/tools/rpmuncompress.c
20@@ -98,7 +98,8 @@ static char *doUntar(const char *fn)
21 if (needtar) {
22 rasprintf(&buf, "%s '%s' | %s %s -", zipper, fn, tar, taropts);
23 } else if (at->compressed == COMPRESSED_GEM) {
24- const char *bn = basename(fn);
25+ char *tmp = xstrdup(fn);
26+ const char *bn = basename(tmp);
27 size_t nvlen = strlen(bn) - 3;
28 char *gem = rpmGetPath("%{__gem}", NULL);
29 char *gemspec = NULL;
30@@ -112,6 +113,7 @@ static char *doUntar(const char *fn)
31
32 free(gemspec);
33 free(gem);
34+ free(tmp);
35 } else {
36 rasprintf(&buf, "%s '%s'", zipper, fn);
37 }
38--
392.43.0
40
diff --git a/meta/recipes-devtools/rpm/files/0001-Fix-missing-basename-include-on-macOS.patch b/meta/recipes-devtools/rpm/files/0001-Fix-missing-basename-include-on-macOS.patch
deleted file mode 100644
index a93597a835..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-Fix-missing-basename-include-on-macOS.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From b2e67642fd8cb64d8cb1cca9e759396c1c10807d Mon Sep 17 00:00:00 2001
2From: Calvin Buckley <calvin@cmpct.info>
3Date: Tue, 11 Jul 2023 19:22:41 -0300
4Subject: [PATCH] Fix missing basename include on macOS
5
6Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/b2e67642fd8cb64d8cb1cca9e759396c1c10807d]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 tools/rpmuncompress.c | 1 +
10 1 file changed, 1 insertion(+)
11
12diff --git a/tools/rpmuncompress.c b/tools/rpmuncompress.c
13index bd4146d54..58ddf5683 100644
14--- a/tools/rpmuncompress.c
15+++ b/tools/rpmuncompress.c
16@@ -1,6 +1,7 @@
17 #include "system.h"
18
19 #include <popt.h>
20+#include <libgen.h>
21 #include <errno.h>
22 #include <stdio.h>
23 #include <string.h>
24--
252.43.0
26
diff --git a/meta/recipes-devtools/rpm/files/0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch b/meta/recipes-devtools/rpm/files/0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch
new file mode 100644
index 0000000000..8e73e07704
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch
@@ -0,0 +1,56 @@
1From 1b3a182f38895de5ea8dda5a77867345845fb967 Mon Sep 17 00:00:00 2001
2From: Panu Matilainen <pmatilai@redhat.com>
3Date: Mon, 18 Dec 2023 12:25:04 +0200
4Subject: [PATCH] Fix unconditional dependency on non-POSIX GLOB_ONLYDIR flag
5
6This regressed when we axed our internal glob copy in commit
766fa46c006bae0f28d93238b8f7f1c923645eee5. Luckily GLOB_ONLYDIR is only
8an optimization so we can just skip it if not available.
9
10Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/57f3711846f44da0f37cbc5dd66e8fba80a3bee1]
11Signed-off-by: Alexander Kanavin <alex@linutronix.de>
12---
13 CMakeLists.txt | 1 +
14 config.h.in | 1 +
15 rpmio/rpmglob.c | 2 ++
16 3 files changed, 4 insertions(+)
17
18diff --git a/CMakeLists.txt b/CMakeLists.txt
19index d0ea565f3..0a474106e 100644
20--- a/CMakeLists.txt
21+++ b/CMakeLists.txt
22@@ -351,6 +351,7 @@ if (LIBDW_FOUND)
23 set(HAVE_LIBDW 1)
24 endif()
25
26+check_symbol_exists(GLOB_ONLYDIR "glob.h" HAVE_GLOB_ONLYDIR)
27 check_symbol_exists(major "sys/sysmacros.h" MAJOR_IN_SYSMACROS)
28 if (NOT MAJOR_IN_SYSMACROS)
29 check_symbol_exists(major "sys/mkdev.h" MAJOR_IN_MKDEV)
30diff --git a/config.h.in b/config.h.in
31index cb97827d0..ab1757a9a 100644
32--- a/config.h.in
33+++ b/config.h.in
34@@ -100,6 +100,7 @@
35 #cmakedefine HAVE_ZSTD @HAVE_ZSTD@
36 #cmakedefine HAVE___PROGNAME @HAVE___PROGNAME@
37 #cmakedefine HAVE___SECURE_GETENV @HAVE___SECURE_GETENV@
38+#cmakedefine HAVE_GLOB_ONLYDIR @HAVE_GLOB_ONLYDIR@
39 #cmakedefine MAJOR_IN_MKDEV @MAJOR_IN_MKDEV@
40 #cmakedefine MAJOR_IN_SYSMACROS @MAJOR_IN_SYSMACROS@
41 #cmakedefine RUNDIR @rundir@
42diff --git a/rpmio/rpmglob.c b/rpmio/rpmglob.c
43index 8276eddb4..243568766 100644
44--- a/rpmio/rpmglob.c
45+++ b/rpmio/rpmglob.c
46@@ -84,8 +84,10 @@ int rpmGlobPath(const char * pattern, rpmglobFlags flags,
47 gflags |= GLOB_BRACE;
48 if (home != NULL && strlen(home) > 0)
49 gflags |= GLOB_TILDE;
50+#if HAVE_GLOB_ONLYDIR
51 if (dir_only)
52 gflags |= GLOB_ONLYDIR;
53+#endif
54 if (flags & RPMGLOB_NOCHECK)
55 gflags |= GLOB_NOCHECK;
56
diff --git a/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
index bd3314a90f..fc89b44132 100644
--- a/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
+++ b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
@@ -1,4 +1,4 @@
1From a89daa75ac970d8e247edc762d1181e9a5b0c5d0 Mon Sep 17 00:00:00 2001 1From 82e6d1ad126df88c58120a31fc025691039db7f3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 17 Jan 2017 14:07:17 +0200 3Date: Tue, 17 Jan 2017 14:07:17 +0200
4Subject: [PATCH] When cross-installing, execute package scriptlets without 4Subject: [PATCH] When cross-installing, execute package scriptlets without
@@ -24,24 +24,16 @@ Amended 2018-07-03 by Olof Johansson <olofjn@axis.com>:
24 24
25Upstream-Status: Inappropriate [oe-core specific] 25Upstream-Status: Inappropriate [oe-core specific]
26Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 26Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
27
27--- 28---
28 lib/rpmscript.c | 11 ++++++++--- 29 lib/rpmscript.c | 11 ++++++++---
29 1 file changed, 8 insertions(+), 3 deletions(-) 30 1 file changed, 8 insertions(+), 3 deletions(-)
30 31
31Index: git/lib/rpmscript.c 32diff --git a/lib/rpmscript.c b/lib/rpmscript.c
32=================================================================== 33index b18f851a3..36e37cf77 100644
33--- git.orig/lib/rpmscript.c 34--- a/lib/rpmscript.c
34+++ git/lib/rpmscript.c 35+++ b/lib/rpmscript.c
35@@ -18,7 +18,7 @@ 36@@ -448,8 +448,7 @@ exit:
36 #include "rpmio/rpmio_internal.h"
37
38 #include "lib/rpmplugins.h" /* rpm plugins hooks */
39-
40+#include "lib/rpmchroot.h" /* rpmChrootOut */
41 #include "debug.h"
42
43 struct scriptNextFileFunc_s {
44@@ -427,8 +427,7 @@ exit:
45 Fclose(out); /* XXX dup'd STDOUT_FILENO */ 37 Fclose(out); /* XXX dup'd STDOUT_FILENO */
46 38
47 if (fn) { 39 if (fn) {
@@ -51,7 +43,7 @@ Index: git/lib/rpmscript.c
51 free(fn); 43 free(fn);
52 } 44 }
53 free(mline); 45 free(mline);
54@@ -462,7 +461,13 @@ rpmRC rpmScriptRun(rpmScript script, int 46@@ -483,7 +482,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
55 47
56 if (rc != RPMRC_FAIL) { 48 if (rc != RPMRC_FAIL) {
57 if (script_type & RPMSCRIPTLET_EXEC) { 49 if (script_type & RPMSCRIPTLET_EXEC) {
diff --git a/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch b/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch
index 64433abb6a..5820b2e7e5 100644
--- a/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch
+++ b/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch
@@ -1,4 +1,4 @@
1From 2d351c666f09cc1b9e368422653fb42ac8b86249 Mon Sep 17 00:00:00 2001 1From ebe65b0e8622c37463697dcec779a42290c33810 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de> 2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 31 Aug 2021 10:37:05 +0200 3Date: Tue, 31 Aug 2021 10:37:05 +0200
4Subject: [PATCH] build/pack.c: do not insert payloadflags into .rpm metadata 4Subject: [PATCH] build/pack.c: do not insert payloadflags into .rpm metadata
@@ -9,15 +9,16 @@ host to the next and breaks reproducibility for .rpm).
9 9
10Upstream-Status: Inappropriate [oe-core specific] 10Upstream-Status: Inappropriate [oe-core specific]
11Signed-off-by: Alexander Kanavin <alex@linutronix.de> 11Signed-off-by: Alexander Kanavin <alex@linutronix.de>
12
12--- 13---
13 build/pack.c | 2 +- 14 build/pack.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 15 1 file changed, 1 insertion(+), 1 deletion(-)
15 16
16Index: git/build/pack.c 17diff --git a/build/pack.c b/build/pack.c
17=================================================================== 18index f382c7da0..0889dd993 100644
18--- git.orig/build/pack.c 19--- a/build/pack.c
19+++ git/build/pack.c 20+++ b/build/pack.c
20@@ -328,7 +328,7 @@ static char *getIOFlags(Package pkg) 21@@ -330,7 +330,7 @@ static char *getIOFlags(Package pkg)
21 headerPutString(pkg->header, RPMTAG_PAYLOADCOMPRESSOR, compr); 22 headerPutString(pkg->header, RPMTAG_PAYLOADCOMPRESSOR, compr);
22 buf = xstrdup(rpmio_flags); 23 buf = xstrdup(rpmio_flags);
23 buf[s - rpmio_flags] = '\0'; 24 buf[s - rpmio_flags] = '\0';
diff --git a/meta/recipes-devtools/rpm/files/0001-configure.ac-add-linux-gnux32-variant-to-triplet-han.patch b/meta/recipes-devtools/rpm/files/0001-configure.ac-add-linux-gnux32-variant-to-triplet-han.patch
deleted file mode 100644
index 29b6686a94..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-configure.ac-add-linux-gnux32-variant-to-triplet-han.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 8f51462d41d8fe942d5d0a06f08d47f625141995 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Thu, 4 Aug 2022 12:15:08 +0200
4Subject: [PATCH] configure.ac: add linux-gnux32 variant to triplet handling
5
6x32 is a 64 bit x86 ABI with 32 bit pointers.
7
8Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/2143]
9Signed-off-by: Alexander Kanavin <alex@linutronix.de>
10---
11 configure.ac | 4 ++++
12 1 file changed, 4 insertions(+)
13
14Index: git/configure.ac
15===================================================================
16--- git.orig/configure.ac
17+++ git/configure.ac
18@@ -903,6 +903,10 @@ if echo "$host_os" | grep '.*-gnux32$' >
19 host_os=`echo "${host_os}" | sed 's/-gnux32$//'`
20 host_os_gnu=-gnux32
21 fi
22+if echo "$host_os" | grep '.*-gnux32$' > /dev/null ; then
23+ host_os=`echo "${host_os}" | sed 's/-gnux32$//'`
24+ host_os_gnu=-gnux32
25+fi
26 if echo "$host_os" | grep '.*-gnu$' > /dev/null ; then
27 host_os=`echo "${host_os}" | sed 's/-gnu$//'`
28 fi
diff --git a/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch b/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
index 82e6567dc7..8b9f1f7294 100644
--- a/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
+++ b/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
@@ -1,4 +1,4 @@
1From 1ed066fc6fa7d7afffe3545c4e3ea937529e6c49 Mon Sep 17 00:00:00 2001 1From bfceae7386b5fec108f98ad59ad96e57aecb08d3 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com> 2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 7 May 2020 17:40:58 +0800 3Date: Thu, 7 May 2020 17:40:58 +0800
4Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32 4Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
@@ -27,15 +27,16 @@ Fixed by performing a 'last-in-wins' resolution when "neither is preferred".
27Upstream-Status: Submitted <https://github.com/rpm-software-management/rpm/issues/193> 27Upstream-Status: Submitted <https://github.com/rpm-software-management/rpm/issues/193>
28 28
29Signed-off-by: Changqing Li <changqing.li@windriver.com> 29Signed-off-by: Changqing Li <changqing.li@windriver.com>
30
30--- 31---
31 lib/transaction.c | 13 ++++++++++++- 32 lib/transaction.c | 13 ++++++++++++-
32 1 file changed, 12 insertions(+), 1 deletion(-) 33 1 file changed, 12 insertions(+), 1 deletion(-)
33 34
34Index: git/lib/transaction.c 35diff --git a/lib/transaction.c b/lib/transaction.c
35=================================================================== 36index 70d2587ac..b89b30060 100644
36--- git.orig/lib/transaction.c 37--- a/lib/transaction.c
37+++ git/lib/transaction.c 38+++ b/lib/transaction.c
38@@ -402,7 +402,18 @@ static int handleColorConflict(rpmts ts, 39@@ -400,7 +400,18 @@ static int handleColorConflict(rpmts ts,
39 rpmfsSetAction(ofs, ofx, FA_CREATE); 40 rpmfsSetAction(ofs, ofx, FA_CREATE);
40 rpmfsSetAction(fs, fx, FA_SKIPCOLOR); 41 rpmfsSetAction(fs, fx, FA_SKIPCOLOR);
41 rConflicts = 0; 42 rConflicts = 0;
diff --git a/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch b/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch
index a6c58699d3..388694d234 100644
--- a/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch
+++ b/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch
@@ -1,4 +1,7 @@
1perl: disable auto requires 1From 7894b508a61bb87f05f7eb0a1e912a2422f4fcd2 Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@windriver.com>
3Date: Tue, 15 Aug 2017 16:41:57 -0500
4Subject: [PATCH] perl: disable auto requires
2 5
3When generating automatic requirements, it's possible for perl scripts to 6When generating automatic requirements, it's possible for perl scripts to
4declare 'optional' dependencies. These seem to often be incorrect and will 7declare 'optional' dependencies. These seem to often be incorrect and will
@@ -10,19 +13,24 @@ Upstream-Status: Inappropriate [OE specific configuration]
10 13
11Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 14Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
12 15
13Index: git/fileattrs/perl.attr 16---
14=================================================================== 17 fileattrs/perl.attr | 2 +-
15--- git.orig/fileattrs/perl.attr 18 fileattrs/perllib.attr | 2 +-
16+++ git/fileattrs/perl.attr 19 2 files changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/fileattrs/perl.attr b/fileattrs/perl.attr
22index 0daef58d5..81ddf5305 100644
23--- a/fileattrs/perl.attr
24+++ b/fileattrs/perl.attr
17@@ -1,3 +1,3 @@ 25@@ -1,3 +1,3 @@
18-%__perl_requires %{_rpmconfigdir}/perl.req 26-%__perl_requires %{_rpmconfigdir}/perl.req
19+#__perl_requires %{_rpmconfigdir}/perl.req 27+#__perl_requires %{_rpmconfigdir}/perl.req
20 %__perl_magic ^.*[Pp]erl .*$ 28 %__perl_magic ^.*[Pp]erl .*$
21 %__perl_flags exeonly 29 %__perl_flags exeonly
22Index: git/fileattrs/perllib.attr 30diff --git a/fileattrs/perllib.attr b/fileattrs/perllib.attr
23=================================================================== 31index fcad48099..495a28927 100644
24--- git.orig/fileattrs/perllib.attr 32--- a/fileattrs/perllib.attr
25+++ git/fileattrs/perllib.attr 33+++ b/fileattrs/perllib.attr
26@@ -1,5 +1,5 @@ 34@@ -1,5 +1,5 @@
27 %__perllib_provides %{_rpmconfigdir}/perl.prov 35 %__perllib_provides %{_rpmconfigdir}/perl.prov
28-%__perllib_requires %{_rpmconfigdir}/perl.req 36-%__perllib_requires %{_rpmconfigdir}/perl.req
diff --git a/meta/recipes-devtools/rpm/files/0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch b/meta/recipes-devtools/rpm/files/0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch
deleted file mode 100644
index d0e637191a..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 6ef189c45b763aedac5ef57ed6a5fc125fa95b41 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 3 Mar 2023 09:54:48 -0800
4Subject: [PATCH] python: Use Py_hash_t instead of long in hdr_hash
5
6Fixes
7python/header-py.c:744:2: error: incompatible function pointer types initializing 'hashfunc' (aka 'int (*)(struct _object *)') with an expression of type 'long (PyObject *)' (aka 'long (struct _object *)') [-Wincompatible-function-pointer-types]
8| hdr_hash, /* tp_hash */
9| ^~~~~~~~
10
11Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/2409]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 python/header-py.c | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/python/header-py.c b/python/header-py.c
18index 0aed0c9267..c15503f359 100644
19--- a/python/header-py.c
20+++ b/python/header-py.c
21@@ -316,9 +316,9 @@ static PyObject * hdr_dsOfHeader(PyObject * s)
22 "(Oi)", s, RPMTAG_NEVR);
23 }
24
25-static long hdr_hash(PyObject * h)
26+static Py_hash_t hdr_hash(PyObject * h)
27 {
28- return (long) h;
29+ return (Py_hash_t) h;
30 }
31
32 static PyObject * hdr_reduce(hdrObject *s)
33--
342.39.2
35
diff --git a/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch b/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
index 2fe96a839c..89c23f8197 100644
--- a/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
+++ b/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
@@ -1,7 +1,7 @@
1From 383c0b097b7eba16801a9e3c4b8e36a4b6de74ab Mon Sep 17 00:00:00 2001 1From e53c0e2586bc6f4677db3c6898a6428283a6b785 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 20 Jan 2017 13:33:05 +0200 3Date: Fri, 20 Jan 2017 13:33:05 +0200
4Subject: [PATCH 2/2] Add support for prefixing /etc from RPM_ETCCONFIGDIR 4Subject: [PATCH] Add support for prefixing /etc from RPM_ETCCONFIGDIR
5 environment variable 5 environment variable
6 6
7This is needed so that rpm can pick up target-specific configuration 7This is needed so that rpm can pick up target-specific configuration
@@ -9,15 +9,16 @@ from target rootfs instead of its own native sysroot.
9 9
10Upstream-Status: Inappropriate [oe-core specific] 10Upstream-Status: Inappropriate [oe-core specific]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12
12--- 13---
13 lib/rpmrc.c | 19 ++++++++++++++----- 14 lib/rpmrc.c | 19 ++++++++++++++-----
14 1 file changed, 14 insertions(+), 5 deletions(-) 15 1 file changed, 14 insertions(+), 5 deletions(-)
15 16
16Index: git/lib/rpmrc.c 17diff --git a/lib/rpmrc.c b/lib/rpmrc.c
17=================================================================== 18index f39dcfc11..f27f88753 100644
18--- git.orig/lib/rpmrc.c 19--- a/lib/rpmrc.c
19+++ git/lib/rpmrc.c 20+++ b/lib/rpmrc.c
20@@ -455,10 +455,14 @@ const char * lookupInDefaultTable(const 21@@ -455,10 +455,14 @@ const char * lookupInDefaultTable(const char * name,
21 static void setDefaults(void) 22 static void setDefaults(void)
22 { 23 {
23 const char *confdir = rpmConfigDir(); 24 const char *confdir = rpmConfigDir();
@@ -27,26 +28,26 @@ Index: git/lib/rpmrc.c
27+ 28+
28 if (!defrcfiles) { 29 if (!defrcfiles) {
29 defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", 30 defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
30 confdir, "/" RPMCANONVENDOR "/rpmrc", ":", 31 confdir, "/" RPM_VENDOR "/rpmrc", ":",
31- SYSCONFDIR "/rpmrc", ":"); 32- SYSCONFDIR "/rpmrc", NULL);
32+ etcconfdir, SYSCONFDIR "/rpmrc", ":", NULL); 33+ etcconfdir, SYSCONFDIR "/rpmrc", NULL);
33 } 34 }
34 35
35 #ifndef MACROFILES 36 #ifndef MACROFILES
36@@ -468,9 +472,9 @@ static void setDefaults(void) 37@@ -468,9 +472,9 @@ static void setDefaults(void)
37 confdir, "/platform/%{_target}/macros", ":", 38 confdir, "/platform/%{_target}/macros", ":",
38 confdir, "/fileattrs/*.attr", ":", 39 confdir, "/fileattrs/*.attr", ":",
39 confdir, "/" RPMCANONVENDOR "/macros", ":", 40 confdir, "/" RPM_VENDOR "/macros", ":",
40- SYSCONFDIR "/rpm/macros.*", ":", 41- SYSCONFDIR "/rpm/macros.*", ":",
41- SYSCONFDIR "/rpm/macros", ":", 42- SYSCONFDIR "/rpm/macros", ":",
42- SYSCONFDIR "/rpm/%{_target}/macros", ":"); 43- SYSCONFDIR "/rpm/%{_target}/macros", NULL);
43+ etcconfdir, SYSCONFDIR "/rpm/macros.*", ":", 44+ etcconfdir, SYSCONFDIR "/rpm/macros.*", ":",
44+ etcconfdir, SYSCONFDIR "/rpm/macros", ":", 45+ etcconfdir, SYSCONFDIR "/rpm/macros", ":",
45+ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", ":", NULL); 46+ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", NULL);
46 } 47 }
47 #else 48 #else
48 macrofiles = MACROFILES; 49 macrofiles = MACROFILES;
49@@ -997,7 +1001,11 @@ static void read_auxv(void) 50@@ -1114,7 +1118,11 @@ static void read_auxv(void)
50 */ 51 */
51 static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) 52 static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
52 { 53 {
@@ -59,7 +60,7 @@ Index: git/lib/rpmrc.c
59 static struct utsname un; 60 static struct utsname un;
60 char * chptr; 61 char * chptr;
61 canonEntry canon; 62 canonEntry canon;
62@@ -1307,6 +1315,7 @@ static void defaultMachine(rpmrcCtx ctx, 63@@ -1434,6 +1442,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
63 64
64 if (arch) *arch = un.machine; 65 if (arch) *arch = un.machine;
65 if (os) *os = un.sysname; 66 if (os) *os = un.sysname;
diff --git a/meta/recipes-devtools/rpm/files/0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch b/meta/recipes-devtools/rpm/files/0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch
new file mode 100644
index 0000000000..e7f0adc70c
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch
@@ -0,0 +1,26 @@
1From 4e388caabf0906f09d697b8d08623a022f7270b2 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Wed, 29 Nov 2023 14:09:06 +0100
4Subject: [PATCH] docs/CMakeLists.txt: do not install non-existent docs/html
5
6Building html would require doxygen-native.
7
8Upstream-Status: Inappropriate [oe-core specific]
9Signed-off-by: Alexander Kanavin <alex@linutronix.de>
10
11---
12 docs/CMakeLists.txt | 1 -
13 1 file changed, 1 deletion(-)
14
15diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
16index 52dce7b4e..c01ff7757 100644
17--- a/docs/CMakeLists.txt
18+++ b/docs/CMakeLists.txt
19@@ -18,7 +18,6 @@ if (DOXYGEN_FOUND)
20 elseif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html/index.html)
21 set(doxsrc ${CMAKE_CURRENT_SOURCE_DIR})
22 endif()
23-install(DIRECTORY ${doxsrc}/html/ DESTINATION ${CMAKE_INSTALL_DOCDIR}/API)
24
25 install(FILES
26 README.md
diff --git a/meta/recipes-devtools/rpm/files/0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch b/meta/recipes-devtools/rpm/files/0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch
new file mode 100644
index 0000000000..3d4b09bedb
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch
@@ -0,0 +1,34 @@
1From f78e05544fb5ae9ef688963f19666f1af34c3d5c Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 16 Jan 2024 09:59:26 +0100
4Subject: [PATCH] rpmio/rpmglob.c: avoid using GLOB_BRACE if undefined by C
5 library
6
7This addresses musl failures; if there is code out there relying on
8those braces, it needs to be fixed when used on musl.
9
10This is unlikely to be trivially fixable upstream.
11
12Upstream-Status: Inappropriate [reported at https://github.com/rpm-software-management/rpm/issues/2844]
13Signed-off-by: Alexander Kanavin <alex@linutronix.de>
14---
15 rpmio/rpmglob.c | 6 ++++++
16 1 file changed, 6 insertions(+)
17
18diff --git a/rpmio/rpmglob.c b/rpmio/rpmglob.c
19index 243568766..43c27074a 100644
20--- a/rpmio/rpmglob.c
21+++ b/rpmio/rpmglob.c
22@@ -33,6 +33,12 @@
23
24 #include "debug.h"
25
26+/* Don't fail if the standard C library
27++ * doesn't provide brace expansion */
28+#ifndef GLOB_BRACE
29+#define GLOB_BRACE 0
30+#endif
31+
32 /* Return 1 if pattern contains a magic char, see glob(7) for a list */
33 static int ismagic(const char *pattern)
34 {
diff --git a/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch b/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
index 9dbe7125de..b3d57cc870 100644
--- a/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
+++ b/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
@@ -1,4 +1,4 @@
1From 989e425d416474c191b020d0825895e3df4bd033 Mon Sep 17 00:00:00 2001 1From 0005ab544230020e854e9709b2bc0501702c2968 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 10 Jan 2019 18:14:18 +0100 3Date: Thu, 10 Jan 2019 18:14:18 +0100
4Subject: [PATCH] rpmscript.c: change logging level around scriptlets to INFO 4Subject: [PATCH] rpmscript.c: change logging level around scriptlets to INFO
@@ -9,15 +9,16 @@ irrelevant noise to rootfs logs.
9 9
10Upstream-Status: Inappropriate [oe-core specific] 10Upstream-Status: Inappropriate [oe-core specific]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12
12--- 13---
13 lib/rpmscript.c | 8 ++++---- 14 lib/rpmscript.c | 8 ++++----
14 1 file changed, 4 insertions(+), 4 deletions(-) 15 1 file changed, 4 insertions(+), 4 deletions(-)
15 16
16Index: git/lib/rpmscript.c 17diff --git a/lib/rpmscript.c b/lib/rpmscript.c
17=================================================================== 18index 37ada014c..bab0c97a6 100644
18--- git.orig/lib/rpmscript.c 19--- a/lib/rpmscript.c
19+++ git/lib/rpmscript.c 20+++ b/lib/rpmscript.c
20@@ -270,7 +270,7 @@ static char * writeScript(const char *cm 21@@ -291,7 +291,7 @@ static char * writeScript(const char *cmd, const char *script)
21 if (Ferror(fd)) 22 if (Ferror(fd))
22 goto exit; 23 goto exit;
23 24
@@ -26,7 +27,7 @@ Index: git/lib/rpmscript.c
26 static const char set_x[] = "set -x\n"; 27 static const char set_x[] = "set -x\n";
27 /* Assume failures will be caught by the write below */ 28 /* Assume failures will be caught by the write below */
28 Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd); 29 Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
29@@ -302,7 +302,7 @@ static rpmRC runExtScript(rpmPlugins plu 30@@ -323,7 +323,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
30 char *mline = NULL; 31 char *mline = NULL;
31 rpmRC rc = RPMRC_FAIL; 32 rpmRC rc = RPMRC_FAIL;
32 33
@@ -35,7 +36,7 @@ Index: git/lib/rpmscript.c
35 36
36 if (script) { 37 if (script) {
37 fn = writeScript(*argvp[0], script); 38 fn = writeScript(*argvp[0], script);
38@@ -354,7 +354,7 @@ static rpmRC runExtScript(rpmPlugins plu 39@@ -375,7 +375,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
39 sname, strerror(errno)); 40 sname, strerror(errno));
40 goto exit; 41 goto exit;
41 } else if (pid == 0) {/* Child */ 42 } else if (pid == 0) {/* Child */
@@ -44,7 +45,7 @@ Index: git/lib/rpmscript.c
44 sname, *argvp[0], (unsigned)getpid()); 45 sname, *argvp[0], (unsigned)getpid());
45 46
46 fclose(in); 47 fclose(in);
47@@ -397,7 +397,7 @@ static rpmRC runExtScript(rpmPlugins plu 48@@ -418,7 +418,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
48 reaped = waitpid(pid, &status, 0); 49 reaped = waitpid(pid, &status, 0);
49 } while (reaped == -1 && errno == EINTR); 50 } while (reaped == -1 && errno == EINTR);
50 51
diff --git a/meta/recipes-devtools/rpm/files/ea3187cfcf9cac87e5bc5e7db79b0338da9e355e.patch b/meta/recipes-devtools/rpm/files/ea3187cfcf9cac87e5bc5e7db79b0338da9e355e.patch
deleted file mode 100644
index 470dda1dcf..0000000000
--- a/meta/recipes-devtools/rpm/files/ea3187cfcf9cac87e5bc5e7db79b0338da9e355e.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From ea3187cfcf9cac87e5bc5e7db79b0338da9e355e Mon Sep 17 00:00:00 2001
2From: Panu Matilainen <pmatilai@redhat.com>
3Date: Mon, 26 Jun 2023 12:45:09 +0300
4Subject: [PATCH] Don't muck with per-process global sqlite configuration from
5 the db backend
6
7sqlite3_config() affects all in-process uses of sqlite. librpm being a
8low-level library, it has no business whatsoever making such decisions
9for the applications running on top of it. Besides that, the callback can
10easily end up pointing to an already closed database, causing an
11innocent API user to crash in librpm on an entirely unrelated error on
12some other database. "Oops."
13
14The sqlite API doesn't seem to provide any per-db or non-global context
15for logging errors, thus we can only remove the call and let sqlite output
16errors the way it pleases (print through stderr, presumably).
17
18Thanks to Jan Palus for spotting and reporting!
19
20Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/ea3187cfcf9cac87e5bc5e7db79b0338da9e355e]
21Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
22---
23 lib/backend/sqlite.c | 8 --------
24 1 file changed, 8 deletions(-)
25
26diff --git a/lib/backend/sqlite.c b/lib/backend/sqlite.c
27index 5a029d575a..b612732267 100644
28--- a/lib/backend/sqlite.c
29+++ b/lib/backend/sqlite.c
30@@ -44,13 +44,6 @@ static void rpm_match3(sqlite3_context *sctx, int argc, sqlite3_value **argv)
31 sqlite3_result_int(sctx, match);
32 }
33
34-static void errCb(void *data, int err, const char *msg)
35-{
36- rpmdb rdb = data;
37- rpmlog(RPMLOG_WARNING, "%s: %s: %s\n",
38- rdb->db_descr, sqlite3_errstr(err), msg);
39-}
40-
41 static int dbiCursorReset(dbiCursor dbc)
42 {
43 if (dbc->stmt) {
44@@ -170,7 +163,6 @@ static int sqlite_init(rpmdb rdb, const char * dbhome)
45 * the "database is locked" errors at every cost
46 */
47 sqlite3_busy_timeout(sdb, 10000);
48- sqlite3_config(SQLITE_CONFIG_LOG, errCb, rdb);
49
50 sqlexec(sdb, "PRAGMA secure_delete = OFF");
51 sqlexec(sdb, "PRAGMA case_sensitive_like = ON");
diff --git a/meta/recipes-devtools/rpm/files/fix-declaration.patch b/meta/recipes-devtools/rpm/files/fix-declaration.patch
deleted file mode 100644
index e5c84ebd49..0000000000
--- a/meta/recipes-devtools/rpm/files/fix-declaration.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From b960c0b43a080287a7c13533eeb2d9f288db1414 Mon Sep 17 00:00:00 2001
2From: Florian Festi <ffesti@redhat.com>
3Date: Thu, 16 Mar 2023 19:05:04 +0100
4Subject: [PATCH] Fix compiler error on clang
5
6Turns out variable declarations are not allowed after a label, even in
7C99. And while some compilers don't seem to care others do.
8
9Moving the declaration of mayopen to the start of the function to avoid
10this problem.
11
12Resolves: #2435
13Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/b960c0b43a080287a7c13533eeb2d9f288db1414]
14Signed-off-by: Alexander Kanavin <alex@linutronix.de>
15---
16 lib/fsm.c | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19diff --git a/lib/fsm.c b/lib/fsm.c
20index 5671ac642d..183293edb0 100644
21--- a/lib/fsm.c
22+++ b/lib/fsm.c
23@@ -879,6 +879,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
24 int nodigest = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOFILEDIGEST) ? 1 : 0;
25 int nofcaps = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOCAPS) ? 1 : 0;
26 int firstlinkfile = -1;
27+ int mayopen = 0;
28 char *tid = NULL;
29 struct filedata_s *fdata = xcalloc(fc, sizeof(*fdata));
30 struct filedata_s *firstlink = NULL;
31@@ -1016,7 +1017,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
32
33 setmeta:
34 /* Special files require path-based ops */
35- int mayopen = S_ISREG(fp->sb.st_mode) || S_ISDIR(fp->sb.st_mode);
36+ mayopen = S_ISREG(fp->sb.st_mode) || S_ISDIR(fp->sb.st_mode);
37 if (!rc && fd == -1 && mayopen) {
38 int flags = O_RDONLY;
39 /* Only follow safe symlinks, and never on temporary files */
diff --git a/meta/recipes-devtools/rpm/rpm_4.18.1.bb b/meta/recipes-devtools/rpm/rpm_4.19.1.bb
index 3e85cbb8ef..af11dec5ef 100644
--- a/meta/recipes-devtools/rpm/rpm_4.18.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.19.1.bb
@@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org"
24LICENSE = "GPL-2.0-only" 24LICENSE = "GPL-2.0-only"
25LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f" 25LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f"
26 26
27SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.18.x;protocol=https \ 27SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.19.x;protocol=https \
28 file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \ 28 file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
29 file://0001-Do-not-read-config-files-from-HOME.patch \ 29 file://0001-Do-not-read-config-files-from-HOME.patch \
30 file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \ 30 file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
@@ -36,58 +36,51 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.18.x;protoc
36 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ 36 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
37 file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \ 37 file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
38 file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \ 38 file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \
39 file://0001-configure.ac-add-linux-gnux32-variant-to-triplet-han.patch \ 39 file://0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch \
40 file://0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch \ 40 file://0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch \
41 file://fix-declaration.patch \ 41 file://0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch \
42 file://ea3187cfcf9cac87e5bc5e7db79b0338da9e355e.patch \ 42 file://0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch \
43 file://0001-Duplicate-filename-before-passing-it-to-basename.patch \ 43 file://0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch \
44 file://0001-Fix-missing-basename-include-on-macOS.patch \
45 " 44 "
46 45
47PE = "1" 46PE = "1"
48SRCREV = "4588bc3f994338502d2770ad24cbfcdaa6c335ec" 47SRCREV = "98b301ebb44fb5cabb56fc24bc3aaa437c47c038"
49 48
50S = "${WORKDIR}/git" 49S = "${WORKDIR}/git"
51 50
52DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3" 51DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3 sqlite3 zstd"
53DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native" 52DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native"
54 53
55inherit autotools gettext pkgconfig python3native 54EXTRA_OECMAKE:append:libc-musl = " -DENABLE_NLS=OFF -DENABLE_OPENMP=OFF"
56export PYTHON_ABI
57
58AUTOTOOLS_AUXDIR = "${S}/build-aux"
59
60# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
61EXTRA_AUTORECONF:append = " --exclude=gnu-configize"
62
63# Vendor is detected differently on x86 and aarch64 hosts and can feed into target packages
64EXTRA_OECONF:append = " --enable-python --with-crypto=libgcrypt --with-vendor=pc"
65EXTRA_OECONF:append:libc-musl = " --disable-nls --disable-openmp"
66 55
67# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs 56# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
68# --localstatedir prevents rpm from writing its database to native sysroot when building images 57# --localstatedir prevents rpm from writing its database to native sysroot when building images
69# Forcibly disable plugins for native/nativesdk, as the inhibit and prioreset 58EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var"
70# plugins both behave badly inside builds. 59EXTRA_OECMAKE:append:class-nativesdk = " -DCMAKE_INSTALL_FULL_SYSCONFDIR=/etc"
71EXTRA_OECONF:append:class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" 60
72EXTRA_OECONF:append:class-nativesdk = " --sysconfdir=/etc --disable-plugins" 61inherit cmake gettext pkgconfig python3targetconfig
62OECMAKE_GENERATOR = "Unix Makefiles"
73 63
74BBCLASSEXTEND = "native nativesdk" 64BBCLASSEXTEND = "native nativesdk"
75 65
76PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)} sqlite zstd" 66PACKAGECONFIG ??= "internal-openpgp"
77# The inhibit plugin serves no purpose outside of the target
78PACKAGECONFIG:remove:class-native = "inhibit"
79PACKAGECONFIG:remove:class-nativesdk = "inhibit"
80 67
81PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" 68PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF"
82PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus" 69PACKAGECONFIG[testsuite] = "-DENABLE_TESTSUITE=ON,-DENABLE_TESTSUITE=OFF"
83PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive"
84PACKAGECONFIG[sqlite] = "--enable-sqlite=yes,--enable-sqlite=no,sqlite3"
85PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
86PACKAGECONFIG[ndb] = "--enable-ndb,--disable-ndb"
87PACKAGECONFIG[bdb-ro] = "--enable-bdb-ro,--disable-bdb-ro"
88PACKAGECONFIG[zstd] = "--enable-zstd=yes,--enable-zstd=no,zstd"
89 70
90ASNEEDED = "" 71# Deprecated! https://fedoraproject.org/wiki/Changes/RpmSequoia
72PACKAGECONFIG[internal-openpgp] = "-DWITH_INTERNAL_OPENPGP=ON,-DWITH_INTERNAL_OPENPGP=OFF"
73
74PACKAGECONFIG[cap] = "-DWITH_CAP=ON,-DWITH_CAP=OFF"
75PACKAGECONFIG[acl] = "-DWITH_ACL=ON,-DWITH_ACL=OFF"
76PACKAGECONFIG[archive] = "-DWITH_ARCHIVE=ON,-DWITH_ARCHIVE=OFF,libarchive"
77PACKAGECONFIG[selinux] = "-DWITH_SELINUX=ON,-DWITH_SELINUX=OFF"
78PACKAGECONFIG[dbus] = "-DWITH_DBUS=ON,-DWITH_DBUS=OFF"
79PACKAGECONFIG[audit] = "-DWITH_AUDIT=ON,-DWITH_AUDIT=OFF"
80PACKAGECONFIG[fsverity] = "-DWITH_FSVERITY=ON,-DWITH_FSVERITY=OFF"
81PACKAGECONFIG[imaevm] = "-DWITH_IMAEVM=ON,-DWITH_IMAEVM=OFF"
82PACKAGECONFIG[fapolicyd] = "-DWITH_FAPOLICYD=ON,-DWITH_FAPOLICYD=OFF"
83PACKAGECONFIG[readline] = "-DWITH_READLINE=ON,-DWITH_READLINE=OFF,readline"
91 84
92# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in 85# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
93# libmagic also has sysroot path contamination, so override it 86# libmagic also has sysroot path contamination, so override it
@@ -105,10 +98,6 @@ WRAPPER_TOOLS = " \
105 ${libdir}/rpm/rpmdeps \ 98 ${libdir}/rpm/rpmdeps \
106" 99"
107 100
108do_configure:prepend() {
109 mkdir -p ${S}/build-aux
110}
111
112do_install:append:class-native() { 101do_install:append:class-native() {
113 for tool in ${WRAPPER_TOOLS}; do 102 for tool in ${WRAPPER_TOOLS}; do
114 test -x ${D}$tool && create_wrapper ${D}$tool \ 103 test -x ${D}$tool && create_wrapper ${D}$tool \
@@ -143,6 +132,7 @@ do_install:append:class-nativesdk() {
143 132
144do_install:append () { 133do_install:append () {
145 sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ 134 sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
135 -e 's:${STAGING_DIR_NATIVE}/::g' \
146 ${D}/${libdir}/rpm/macros 136 ${D}/${libdir}/rpm/macros
147 137
148} 138}
@@ -166,6 +156,7 @@ FILES:${PN}-build = "\
166 ${libdir}/rpm/check-* \ 156 ${libdir}/rpm/check-* \
167 ${libdir}/rpm/sepdebugcrcfix \ 157 ${libdir}/rpm/sepdebugcrcfix \
168 ${libdir}/rpm/find-lang.sh \ 158 ${libdir}/rpm/find-lang.sh \
159 ${libdir}/rpm/sysusers.sh \
169 ${libdir}/rpm/*provides* \ 160 ${libdir}/rpm/*provides* \
170 ${libdir}/rpm/*requires* \ 161 ${libdir}/rpm/*requires* \
171 ${libdir}/rpm/*deps* \ 162 ${libdir}/rpm/*deps* \