From ea9c2cfb6901251b95e07e052616a512b91ea0c7 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 4 Dec 2024 07:49:19 +0100 Subject: rpm: update 4.19.1.1 -> 4.20.0 With this release, as expected, deprecated openpgp support has been fully removed and replaced with sequoia: https://github.com/rpm-software-management/rpm-sequoia/ Alas, it's written in rust, and has no recipe, so for now signing rpm packages has to be disabled. Remove package name parameter to %prep in source archiving, as it's been dropped in the new rpm, and wasn't needed to begin with. Drop 0001-perl-disable-auto-reqs.patch (files removed upstream). (From OE-Core rev: 8c15b4577d5e554cc2dd5adfb88b816894b05a9a) Signed-off-by: Alexander Kanavin Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- ...d-a-color-setting-for-mips64_n32-binaries.patch | 10 +- ...txt-look-for-lua-with-pkg-config-rather-t.patch | 10 +- ...txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch | 9 +- ...an-unsatisfiable-dependency-when-building.patch | 6 +- ...code-lib-rpm-as-the-installation-path-for.patch | 18 +- .../0001-Do-not-read-config-files-from-HOME.patch | 20 +-- ...t-the-PATH-environment-variable-before-ru.patch | 6 +- ...installing-execute-package-scriptlets-wit.patch | 8 +- ...c-do-not-insert-payloadflags-into-.rpm-me.patch | 4 +- ...ction.c-fix-file-conflicts-for-MIPS64-N32.patch | 4 +- .../rpm/files/0001-perl-disable-auto-reqs.patch | 39 ---- ...-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch | 32 ++-- ...ob.c-avoid-using-GLOB_BRACE-if-undefined-.patch | 4 +- ...-change-logging-level-around-scriptlets-t.patch | 12 +- meta/recipes-devtools/rpm/rpm_4.19.1.1.bb | 198 --------------------- meta/recipes-devtools/rpm/rpm_4.20.0.bb | 197 ++++++++++++++++++++ 16 files changed, 267 insertions(+), 310 deletions(-) delete mode 100644 meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch delete mode 100644 meta/recipes-devtools/rpm/rpm_4.19.1.1.bb create mode 100644 meta/recipes-devtools/rpm/rpm_4.20.0.bb (limited to 'meta/recipes-devtools/rpm') 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 25aa69d7da..769d7b3409 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 @@ -From f4cf90b5a298d6a3199e8b4c07f520aaf593ce2b Mon Sep 17 00:00:00 2001 +From 38e38437e83ed961dc1fa6d5b534bbdaae5b535e Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 9 Mar 2017 18:54:02 +0200 Subject: [PATCH] Add a color setting for mips64_n32 binaries @@ -11,10 +11,10 @@ Signed-off-by: Alexander Kanavin 2 files changed, 6 insertions(+) diff --git a/build/rpmfc.c b/build/rpmfc.c -index 4b67a9bae..ed7e4e623 100644 +index 86dd36d14..df421a23f 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c -@@ -660,6 +660,7 @@ exit: +@@ -716,6 +716,7 @@ static int rpmfcHelper(rpmfc fc, int *fnx, int nfn, const char *proto, static const struct rpmfcTokens_s rpmfcTokens[] = { { "directory", RPMFC_INCLUDE }, @@ -22,8 +22,8 @@ index 4b67a9bae..ed7e4e623 100644 { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE }, { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE }, -@@ -1158,6 +1159,9 @@ static uint32_t getElfColor(const char *fn) - color = RPMFC_ELF32; +@@ -1258,6 +1259,9 @@ static uint32_t getElfColor(const char *fn) + color = 0; break; } + if (ehdr.e_machine == EM_MIPS || ehdr.e_machine == EM_MIPS_RS3_LE) 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 index e4edc884b1..83552dd5c2 100644 --- 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 @@ -1,4 +1,4 @@ -From c39a074ff3c4d21c100d387661c7d725b5eae7b0 Mon Sep 17 00:00:00 2001 +From 99d02b8e8ce2c93c10a7924cd7571b76b0f45eb1 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 29 Nov 2023 14:06:15 +0100 Subject: [PATCH] CMakeLists.txt: look for lua with pkg-config rather than @@ -13,15 +13,15 @@ Signed-off-by: Alexander Kanavin 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4a383ceba..ed847c09a 100644 +index 9a3aba071..08dabffd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -190,7 +190,7 @@ set(REQFUNCS +@@ -196,7 +196,7 @@ set(REQFUNCS ) find_package(PkgConfig REQUIRED) -find_package(Lua 5.2 REQUIRED) +pkg_check_modules(LUA REQUIRED IMPORTED_TARGET lua>=5.2) find_package(ZLIB REQUIRED) - find_package(BZip2) - find_package(Iconv) + if (WITH_BZIP2) + find_package(BZip2 REQUIRED) diff --git a/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch index 1bd83e7bef..7db643871f 100644 --- a/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch +++ b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch @@ -1,4 +1,4 @@ -From fea9cea49aa0844de14126e54d05b91ba619427f Mon Sep 17 00:00:00 2001 +From cb5355da9b47166253dbe5ab3215e433b55068d1 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Fri, 26 Jul 2024 17:18:30 +0800 Subject: [PATCH] CMakeLists.txt: set libdir to ${CMAKE_INSTALL_FULL_LIBDIR} in @@ -36,10 +36,10 @@ Signed-off-by: Yi Zhao 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index ed847c09a1..385b5040c6 100644 +index 08dabffd3..1b7661139 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -84,7 +84,7 @@ function(makemacros) +@@ -96,7 +96,7 @@ function(makemacros) set(sysconfdir "${CMAKE_INSTALL_FULL_SYSCONFDIR}") set(sharedstatedir "${CMAKE_INSTALL_FULL_SHAREDSTATEDIR}") set(localstatedir "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}") @@ -48,6 +48,3 @@ index ed847c09a1..385b5040c6 100644 set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") set(oldincludedir "${CMAKE_INSTALL_FULL_OLDINCLUDEDIR}") set(infodir "\${prefix}/${CMAKE_INSTALL_INFODIR}") --- -2.25.1 - 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 d0ed711086..96a5e14999 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 @@ -From 86e585cc0dd06dfa20f584af8b59d52a59accb45 Mon Sep 17 00:00:00 2001 +From dc40261464de1a1799704967906f5bd113b53793 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 9 Jan 2017 18:52:11 +0200 Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin 1 file changed, 4 deletions(-) diff --git a/build/pack.c b/build/pack.c -index f7dac6d9a..f382c7da0 100644 +index eb9c7b3f1..fb1f1bed8 100644 --- a/build/pack.c +++ b/build/pack.c -@@ -711,10 +711,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch +@@ -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/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 b571a0ae8c..6a44f4f22d 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 @@ -From 73d6841d9ef2a8ac7bd63f9645a3efe8038dfdd4 Mon Sep 17 00:00:00 2001 +From 651310691a8a41ab3a766545c53b69e6e0c4f88d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for @@ -12,24 +12,24 @@ Signed-off-by: Alexander Kanavin 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7808115c1..4a383ceba 100644 +index de0b578a6..9a3aba071 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -33,7 +33,7 @@ option(WITH_IMAEVM "Build with IMA support" OFF) - option(WITH_FAPOLICYD "Build with fapolicyd support" ON) - option(WITH_READLINE "Build with readline support" ON) +@@ -41,7 +41,7 @@ option(WITH_LIBELF "Build with libelf support" ON) + option(WITH_LIBLZMA "Build with liblzma support" ON) + option(WITH_DOXYGEN "Build API docs with doxygen" 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") - # Emulate libtool versioning. Before a public release: diff --git a/macros.in b/macros.in -index b49ffaad4..3acbe78f6 100644 +index 4d3e8afdc..66e31320f 100644 --- a/macros.in +++ b/macros.in -@@ -969,7 +969,7 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\ - %_sharedstatedir %{_prefix}/com +@@ -964,7 +964,7 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\ + %_sharedstatedir %{_var}/lib %_localstatedir %{_prefix}/var %_lib lib -%_libdir %{_exec_prefix}/%{_lib} 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 796088df53..bfc9a74b6c 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,4 +1,4 @@ -From e210458d125793915abce30420d866a30305c37a Mon Sep 17 00:00:00 2001 +From 874679725c443e5d73e3a33d1158ab25442c8a5f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 10 Jan 2017 14:11:30 +0200 Subject: [PATCH] Do not read config files from $HOME @@ -10,26 +10,26 @@ Signed-off-by: Alexander Kanavin 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/rpmrc.c b/lib/rpmrc.c -index 9437a0ff1..483585ae4 100644 +index 5d778b8b7..dc8d42aeb 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c -@@ -459,8 +459,7 @@ static void setDefaults(void) +@@ -485,8 +485,7 @@ static void setDefaults(void) if (!defrcfiles) { defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", confdir, "/" RPM_VENDOR "/rpmrc", ":", - SYSCONFDIR "/rpmrc", ":", -- "~/.rpmrc", NULL); +- userrc, NULL); + SYSCONFDIR "/rpmrc", NULL); } - #ifndef MACROFILES -@@ -472,8 +471,7 @@ static void setDefaults(void) - confdir, "/" RPM_VENDOR "/macros", ":", + /* macrofiles may be pre-set from --macros */ +@@ -498,8 +497,7 @@ static void setDefaults(void) + confdir, "/" RPM_VENDOR "/macros", ":", SYSCONFDIR "/rpm/macros.*", ":", SYSCONFDIR "/rpm/macros", ":", - SYSCONFDIR "/rpm/%{_target}/macros", ":", -- "~/.rpmmacros", NULL); +- usermacros, NULL); + SYSCONFDIR "/rpm/%{_target}/macros", NULL); } - #else - macrofiles = MACROFILES; + + free(usermacros); 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 328fbf86ac..d3263896ef 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 @@ -From a8fe7a7a2e41c9f127ed26407d57076babcb89e8 Mon Sep 17 00:00:00 2001 +From 4cf76bb57d3480420e734da99a5c839ac3a9976a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 20 Jan 2017 13:32:06 +0200 Subject: [PATCH] Do not reset the PATH environment variable before running @@ -13,10 +13,10 @@ Signed-off-by: Alexander Kanavin 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 57689bb68..7b7e26606 100644 +index 060fd8124..4dc6466a8 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c -@@ -252,7 +252,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes, +@@ -251,7 +251,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes, if (ipath && ipath[5] != '%') path = ipath; 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 e4251a1a73..fc6d7e0d29 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 @@ -From 34c0d3263f3e0b366a2320e0823f46673f7ba928 Mon Sep 17 00:00:00 2001 +From 3603cf181b69ab1e0077dcd8a124e669dcb9dd9c Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 17 Jan 2017 14:07:17 +0200 Subject: [PATCH] When cross-installing, execute package scriptlets without @@ -29,10 +29,10 @@ Signed-off-by: Alexander Kanavin 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 3f6313278..57689bb68 100644 +index 097c9055a..060fd8124 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c -@@ -448,8 +448,7 @@ exit: +@@ -447,8 +447,7 @@ exit: Fclose(out); /* XXX dup'd STDOUT_FILENO */ if (fn) { @@ -42,7 +42,7 @@ index 3f6313278..57689bb68 100644 free(fn); } free(mline); -@@ -483,7 +482,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, +@@ -482,7 +481,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, if (rc != RPMRC_FAIL) { 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 2f6397aa8a..0c29e5543a 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 @@ -From ae4fdd8e8d052835973e6ff4b7550f93bde30a98 Mon Sep 17 00:00:00 2001 +From e688eb54fd54d65181e94b854b3568d99cbf3a24 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 31 Aug 2021 10:37:05 +0200 Subject: [PATCH] build/pack.c: do not insert payloadflags into .rpm metadata @@ -14,7 +14,7 @@ Signed-off-by: Alexander Kanavin 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pack.c b/build/pack.c -index f382c7da0..0889dd993 100644 +index fb1f1bed8..45885a6ac 100644 --- a/build/pack.c +++ b/build/pack.c @@ -330,7 +330,7 @@ static char *getIOFlags(Package pkg) 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 98e52da3a8..7d443ccc6c 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 @@ -From b04ecb793a3c859985eead5e261785b27a4c4a20 Mon Sep 17 00:00:00 2001 +From ad530868e37f09e9236c085d25a834304750704b Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 7 May 2020 17:40:58 +0800 Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32 @@ -32,7 +32,7 @@ Signed-off-by: Changqing Li 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/transaction.c b/lib/transaction.c -index 70d2587ac..b89b30060 100644 +index 5e4414d2a..b1c55bd44 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -400,7 +400,18 @@ static int handleColorConflict(rpmts ts, 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 deleted file mode 100644 index 55108e7f1c..0000000000 --- a/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 58bf006646a063837c46b695f7e7ebb69bee7238 Mon Sep 17 00:00:00 2001 -From: Mark Hatle -Date: Tue, 15 Aug 2017 16:41:57 -0500 -Subject: [PATCH] perl: disable auto requires - -When generating automatic requirements, it's possible for perl scripts to -declare 'optional' dependencies. These seem to often be incorrect and will -cause installation failures in OE. Instead of fixing the perl scripts, it -was decided it is better to simply disable the automatic dependency -generation. This matches the behavior from the previous RPM5 implementation. - -Upstream-Status: Inappropriate [OE specific configuration] - -Signed-off-by: Mark Hatle ---- - fileattrs/perl.attr | 2 +- - fileattrs/perllib.attr | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fileattrs/perl.attr b/fileattrs/perl.attr -index 0daef58d5..81ddf5305 100644 ---- a/fileattrs/perl.attr -+++ b/fileattrs/perl.attr -@@ -1,3 +1,3 @@ --%__perl_requires %{_rpmconfigdir}/perl.req -+#__perl_requires %{_rpmconfigdir}/perl.req - %__perl_magic ^.*[Pp]erl .*$ - %__perl_flags exeonly -diff --git a/fileattrs/perllib.attr b/fileattrs/perllib.attr -index fcad48099..495a28927 100644 ---- a/fileattrs/perllib.attr -+++ b/fileattrs/perllib.attr -@@ -1,5 +1,5 @@ - %__perllib_provides %{_rpmconfigdir}/perl.prov --%__perllib_requires %{_rpmconfigdir}/perl.req -+#__perllib_requires %{_rpmconfigdir}/perl.req - %__perllib_magic ^Perl[[:digit:]] module source.* - %__perllib_path \\.pm$ - %__perllib_flags magic_and_path 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 c5caa7dc5e..082fb343c2 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,4 +1,4 @@ -From d7143dc4e75c8bcc5cc4c852a4b972942b7e4d07 Mon Sep 17 00:00:00 2001 +From 7cc1c8cfcc620dec284204be0ae4416fd9fed95d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 20 Jan 2017 13:33:05 +0200 Subject: [PATCH] Add support for prefixing /etc from RPM_ETCCONFIGDIR @@ -10,21 +10,21 @@ from target rootfs instead of its own native sysroot. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin --- - lib/rpmrc.c | 19 ++++++++++++++----- - 1 file changed, 14 insertions(+), 5 deletions(-) + lib/rpmrc.c | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/rpmrc.c b/lib/rpmrc.c -index 483585ae4..ea858c290 100644 +index dc8d42aeb..3f2996850 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c -@@ -456,10 +456,14 @@ const char * lookupInDefaultTable(const char * name, - static void setDefaults(void) - { - const char *confdir = rpmConfigDir(); +@@ -481,11 +481,14 @@ static void setDefaults(void) + userrc = xstrdup(oldrc); + } + } + const char *etcconfdir = getenv("RPM_ETCCONFIGDIR"); + if (etcconfdir == NULL) + etcconfdir = ""; -+ + if (!defrcfiles) { defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", confdir, "/" RPM_VENDOR "/rpmrc", ":", @@ -32,11 +32,11 @@ index 483585ae4..ea858c290 100644 + etcconfdir, SYSCONFDIR "/rpmrc", NULL); } - #ifndef MACROFILES -@@ -469,9 +473,9 @@ static void setDefaults(void) + /* macrofiles may be pre-set from --macros */ +@@ -495,9 +498,9 @@ static void setDefaults(void) confdir, "/platform/%{_target}/macros", ":", confdir, "/fileattrs/*.attr", ":", - confdir, "/" RPM_VENDOR "/macros", ":", + confdir, "/" RPM_VENDOR "/macros", ":", - SYSCONFDIR "/rpm/macros.*", ":", - SYSCONFDIR "/rpm/macros", ":", - SYSCONFDIR "/rpm/%{_target}/macros", NULL); @@ -44,9 +44,9 @@ index 483585ae4..ea858c290 100644 + etcconfdir, SYSCONFDIR "/rpm/macros", ":", + etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", NULL); } - #else - macrofiles = MACROFILES; -@@ -1115,7 +1119,11 @@ static void read_auxv(void) + + free(usermacros); +@@ -1142,7 +1145,11 @@ static void read_auxv(void) */ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) { @@ -59,7 +59,7 @@ index 483585ae4..ea858c290 100644 static struct utsname un; char * chptr; canonEntry canon; -@@ -1435,6 +1443,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) +@@ -1462,6 +1469,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) if (arch) *arch = un.machine; if (os) *os = un.sysname; 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 index 23dce30086..00fe19108e 100644 --- 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 @@ -1,4 +1,4 @@ -From 29c2a0c18b0c773128bf62c611b4c53fe4471105 Mon Sep 17 00:00:00 2001 +From d8972ff7fa0a30e199144ba135223bf561874e01 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 16 Jan 2024 09:59:26 +0100 Subject: [PATCH] rpmio/rpmglob.c: avoid using GLOB_BRACE if undefined by C @@ -16,7 +16,7 @@ Signed-off-by: Alexander Kanavin 1 file changed, 6 insertions(+) diff --git a/rpmio/rpmglob.c b/rpmio/rpmglob.c -index 243568766..43c27074a 100644 +index eb439cad8..1eef0b851 100644 --- a/rpmio/rpmglob.c +++ b/rpmio/rpmglob.c @@ -33,6 +33,12 @@ 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 732202c46f..278fa38bad 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 @@ -From f01d9c24bb86bc47ad2453483518dbb25953cac7 Mon Sep 17 00:00:00 2001 +From 452b696ea3e1975ea30cf7a92678aa4b316e6300 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 10 Jan 2019 18:14:18 +0100 Subject: [PATCH] rpmscript.c: change logging level around scriptlets to INFO @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 7b7e26606..1dcd23be5 100644 +index 4dc6466a8..6d3c19d01 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c -@@ -291,7 +291,7 @@ static char * writeScript(const char *cmd, const char *script) +@@ -290,7 +290,7 @@ static char * writeScript(const char *cmd, const char *script) if (Ferror(fd)) goto exit; @@ -26,7 +26,7 @@ index 7b7e26606..1dcd23be5 100644 static const char set_x[] = "set -x\n"; /* Assume failures will be caught by the write below */ Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd); -@@ -323,7 +323,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, +@@ -322,7 +322,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, char *mline = NULL; rpmRC rc = RPMRC_FAIL; @@ -35,7 +35,7 @@ index 7b7e26606..1dcd23be5 100644 if (script) { fn = writeScript(*argvp[0], script); -@@ -375,7 +375,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, +@@ -374,7 +374,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, sname, strerror(errno)); goto exit; } else if (pid == 0) {/* Child */ @@ -44,7 +44,7 @@ index 7b7e26606..1dcd23be5 100644 sname, *argvp[0], (unsigned)getpid()); fclose(in); -@@ -418,7 +418,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, +@@ -417,7 +417,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, reaped = waitpid(pid, &status, 0); } while (reaped == -1 && errno == EINTR); diff --git a/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb b/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb deleted file mode 100644 index 9330323797..0000000000 --- a/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb +++ /dev/null @@ -1,198 +0,0 @@ -SUMMARY = "The RPM package management system" -DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ -package management system capable of installing, uninstalling, \ -verifying, querying, and updating software packages. Each software \ -package consists of an archive of files along with information about \ -the package like its version, a description, etc." - -SUMMARY:${PN}-dev = "Development files for manipulating RPM packages" -DESCRIPTION:${PN}-dev = "This package contains the RPM C library and header files. These \ -development files will simplify the process of writing programs that \ -manipulate RPM packages and databases. These files are intended to \ -simplify the process of creating graphical package managers or any \ -other tools that need an intimate knowledge of RPM packages in order \ -to function." - -SUMMARY:python3-rpm = "Python bindings for apps which will manupulate RPM packages" -DESCRIPTION:python3-rpm = "The python3-rpm package contains a module that permits applications \ -written in the Python programming language to use the interface \ -supplied by the RPM Package Manager libraries." - -HOMEPAGE = "http://www.rpm.org" - -# libraries are also LGPL - how to express this? -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f" - -SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.19.x;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 \ - file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \ - file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \ - file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \ - file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \ - file://0001-perl-disable-auto-reqs.patch \ - file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ - file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \ - file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \ - 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 \ - " - -PE = "1" -SRCREV = "13b4521341781293c41ac898aa9c2d2f6bc1f21d" - -S = "${WORKDIR}/git" - -DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3 sqlite3 zstd" -DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native" - -EXTRA_OECMAKE:append = " -D__CURL:FILEPATH=curl" -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-nativesdk = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_FULL_SYSCONFDIR=/etc" - -inherit cmake gettext pkgconfig python3targetconfig -OECMAKE_GENERATOR = "Unix Makefiles" - -BBCLASSEXTEND = "native nativesdk" - -PACKAGECONFIG ??= "internal-openpgp" - -PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF" -PACKAGECONFIG[testsuite] = "-DENABLE_TESTSUITE=ON,-DENABLE_TESTSUITE=OFF" - -# Deprecated! https://fedoraproject.org/wiki/Changes/RpmSequoia -PACKAGECONFIG[internal-openpgp] = "-DWITH_INTERNAL_OPENPGP=ON,-DWITH_INTERNAL_OPENPGP=OFF" - -PACKAGECONFIG[cap] = "-DWITH_CAP=ON,-DWITH_CAP=OFF" -PACKAGECONFIG[acl] = "-DWITH_ACL=ON,-DWITH_ACL=OFF" -PACKAGECONFIG[archive] = "-DWITH_ARCHIVE=ON,-DWITH_ARCHIVE=OFF,libarchive" -PACKAGECONFIG[selinux] = "-DWITH_SELINUX=ON,-DWITH_SELINUX=OFF,libselinux" -PACKAGECONFIG[dbus] = "-DWITH_DBUS=ON,-DWITH_DBUS=OFF" -PACKAGECONFIG[audit] = "-DWITH_AUDIT=ON,-DWITH_AUDIT=OFF,audit" -PACKAGECONFIG[fsverity] = "-DWITH_FSVERITY=ON,-DWITH_FSVERITY=OFF" -PACKAGECONFIG[imaevm] = "-DWITH_IMAEVM=ON,-DWITH_IMAEVM=OFF,ima-evm-utils" -PACKAGECONFIG[fapolicyd] = "-DWITH_FAPOLICYD=ON,-DWITH_FAPOLICYD=OFF" -PACKAGECONFIG[readline] = "-DWITH_READLINE=ON,-DWITH_READLINE=OFF,readline" - -# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in -# libmagic also has sysroot path contamination, so override it - -WRAPPER_TOOLS = " \ - ${bindir}/rpm \ - ${bindir}/rpm2archive \ - ${bindir}/rpm2cpio \ - ${bindir}/rpmbuild \ - ${bindir}/rpmdb \ - ${bindir}/rpmgraph \ - ${bindir}/rpmkeys \ - ${bindir}/rpmsign \ - ${bindir}/rpmspec \ - ${libdir}/rpm/rpmdeps \ -" - -do_install:append:class-native() { - for tool in ${WRAPPER_TOOLS}; do - test -x ${D}$tool && create_wrapper ${D}$tool \ - RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ - MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ - RPM_NO_CHROOT_FOR_SCRIPTS=1 - done -} - -do_install:append:class-nativesdk() { - rm -rf ${D}/var - - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d - cat <<- EOF > ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh - export RPM_CONFIGDIR="${libdir}/rpm" - export RPM_ETCCONFIGDIR="${SDKPATHNATIVE}" - export RPM_NO_CHROOT_FOR_SCRIPTS=1 - EOF -} - -# Rpm's make install creates var/tmp which clashes with base-files packaging -do_install:append:class-target() { - rm -rf ${D}/var -} -do_install:append:class-nativesdk() { - rm -rf ${D}${SDKPATHNATIVE}/var - # Ensure find-debuginfo is located correctly inside SDK - mkdir -p ${D}${libdir}/rpm - echo "%__find_debuginfo ${SDKPATHNATIVE}/usr/bin/find-debuginfo" >> ${D}${libdir}/rpm/macros -} - -do_install:append () { - sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ - -e 's:${STAGING_DIR_NATIVE}/::g' \ - ${D}/${libdir}/rpm/macros - sed -i -e 's:${RECIPE_SYSROOT}/::g' \ - ${D}/${libdir}/cmake/rpm/rpm-targets.cmake - -} - -FILES:${PN} += "${libdir}/rpm-plugins/*.so \ - " -FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/rpm.sh" - -FILES:${PN}-dev += "${libdir}/rpm-plugins/*.la \ - " -PACKAGE_BEFORE_PN += "${PN}-build ${PN}-sign ${PN}-archive" - -RRECOMMENDS:${PN} += "rpm-sign rpm-archive" - -FILES:${PN}-build = "\ - ${bindir}/rpmbuild \ - ${bindir}/gendiff \ - ${bindir}/rpmspec \ - ${libdir}/librpmbuild.so.* \ - ${libdir}/rpm/brp-* \ - ${libdir}/rpm/check-* \ - ${libdir}/rpm/sepdebugcrcfix \ - ${libdir}/rpm/find-lang.sh \ - ${libdir}/rpm/sysusers.sh \ - ${libdir}/rpm/*provides* \ - ${libdir}/rpm/*requires* \ - ${libdir}/rpm/*deps* \ - ${libdir}/rpm/*.prov \ - ${libdir}/rpm/*.req \ - ${libdir}/rpm/config.* \ - ${libdir}/rpm/mkinstalldirs \ - ${libdir}/rpm/macros.p* \ - ${libdir}/rpm/fileattrs/* \ -" - -FILES:${PN}-sign = "\ - ${bindir}/rpmsign \ - ${libdir}/librpmsign.so.* \ -" - -FILES:${PN}-archive = "\ - ${bindir}/rpm2archive \ -" - -PACKAGES += "python3-rpm" -PROVIDES += "python3-rpm" -FILES:python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/* ${PYTHON_SITEPACKAGES_DIR}/rpm-*.egg-info" - -RDEPENDS:${PN}-build = "bash perl python3-core debugedit" - -PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess" - -# Do not specify a sysroot when compiling on a target. -rpm_package_preprocess () { - sed -i -e 's:--sysroot[^ ]*::g' \ - ${PKGD}/${libdir}/rpm/macros -} - -SSTATE_HASHEQUIV_FILEMAP = " \ - populate_sysroot:*/rpm/macros:${TMPDIR} \ - populate_sysroot:*/rpm/macros:${COREBASE} \ - " diff --git a/meta/recipes-devtools/rpm/rpm_4.20.0.bb b/meta/recipes-devtools/rpm/rpm_4.20.0.bb new file mode 100644 index 0000000000..ec4276d16e --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm_4.20.0.bb @@ -0,0 +1,197 @@ +SUMMARY = "The RPM package management system" +DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ +package management system capable of installing, uninstalling, \ +verifying, querying, and updating software packages. Each software \ +package consists of an archive of files along with information about \ +the package like its version, a description, etc." + +SUMMARY:${PN}-dev = "Development files for manipulating RPM packages" +DESCRIPTION:${PN}-dev = "This package contains the RPM C library and header files. These \ +development files will simplify the process of writing programs that \ +manipulate RPM packages and databases. These files are intended to \ +simplify the process of creating graphical package managers or any \ +other tools that need an intimate knowledge of RPM packages in order \ +to function." + +SUMMARY:python3-rpm = "Python bindings for apps which will manupulate RPM packages" +DESCRIPTION:python3-rpm = "The python3-rpm package contains a module that permits applications \ +written in the Python programming language to use the interface \ +supplied by the RPM Package Manager libraries." + +HOMEPAGE = "http://www.rpm.org" + +# libraries are also LGPL - how to express this? +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f" + +SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.20.x;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 \ + file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \ + file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \ + file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \ + file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \ + file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ + file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \ + file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \ + 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 \ + " + +PE = "1" +SRCREV = "b3323786668cf99bc9aed7e60ccdab0bc25e19da" + +S = "${WORKDIR}/git" + +DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3 sqlite3 zstd" +DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native" + +EXTRA_OECMAKE:append = " -D__CURL:FILEPATH=curl" +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-nativesdk = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_FULL_SYSCONFDIR=/etc" + +inherit cmake gettext pkgconfig python3targetconfig +OECMAKE_GENERATOR = "Unix Makefiles" + +BBCLASSEXTEND = "native nativesdk" + +PACKAGECONFIG ??= "" + +PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF" +PACKAGECONFIG[testsuite] = "-DENABLE_TESTSUITE=ON,-DENABLE_TESTSUITE=OFF" + +# has replaced openpgp support and is written in rust: https://fedoraproject.org/wiki/Changes/RpmSequoia +PACKAGECONFIG[sequoia] = "-DWITH_SEQUOIA=ON,-DWITH_SEQUOIA=OFF,rpm-sequoia" + +PACKAGECONFIG[cap] = "-DWITH_CAP=ON,-DWITH_CAP=OFF" +PACKAGECONFIG[acl] = "-DWITH_ACL=ON,-DWITH_ACL=OFF" +PACKAGECONFIG[archive] = "-DWITH_ARCHIVE=ON,-DWITH_ARCHIVE=OFF,libarchive" +PACKAGECONFIG[selinux] = "-DWITH_SELINUX=ON,-DWITH_SELINUX=OFF,libselinux" +PACKAGECONFIG[dbus] = "-DWITH_DBUS=ON,-DWITH_DBUS=OFF" +PACKAGECONFIG[audit] = "-DWITH_AUDIT=ON,-DWITH_AUDIT=OFF,audit" +PACKAGECONFIG[fsverity] = "-DWITH_FSVERITY=ON,-DWITH_FSVERITY=OFF" +PACKAGECONFIG[imaevm] = "-DWITH_IMAEVM=ON,-DWITH_IMAEVM=OFF,ima-evm-utils" +PACKAGECONFIG[fapolicyd] = "-DWITH_FAPOLICYD=ON,-DWITH_FAPOLICYD=OFF" +PACKAGECONFIG[readline] = "-DWITH_READLINE=ON,-DWITH_READLINE=OFF,readline" + +# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in +# libmagic also has sysroot path contamination, so override it + +WRAPPER_TOOLS = " \ + ${bindir}/rpm \ + ${bindir}/rpm2archive \ + ${bindir}/rpm2cpio \ + ${bindir}/rpmbuild \ + ${bindir}/rpmdb \ + ${bindir}/rpmgraph \ + ${bindir}/rpmkeys \ + ${bindir}/rpmsign \ + ${bindir}/rpmspec \ + ${libdir}/rpm/rpmdeps \ +" + +do_install:append:class-native() { + for tool in ${WRAPPER_TOOLS}; do + test -x ${D}$tool && create_wrapper ${D}$tool \ + RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ + RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ + MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ + RPM_NO_CHROOT_FOR_SCRIPTS=1 + done +} + +do_install:append:class-nativesdk() { + rm -rf ${D}/var + + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + cat <<- EOF > ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh + export RPM_CONFIGDIR="${libdir}/rpm" + export RPM_ETCCONFIGDIR="${SDKPATHNATIVE}" + export RPM_NO_CHROOT_FOR_SCRIPTS=1 + EOF +} + +# Rpm's make install creates var/tmp which clashes with base-files packaging +do_install:append:class-target() { + rm -rf ${D}/var +} +do_install:append:class-nativesdk() { + rm -rf ${D}${SDKPATHNATIVE}/var + # Ensure find-debuginfo is located correctly inside SDK + mkdir -p ${D}${libdir}/rpm + echo "%__find_debuginfo ${SDKPATHNATIVE}/usr/bin/find-debuginfo" >> ${D}${libdir}/rpm/macros +} + +do_install:append () { + sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${STAGING_DIR_NATIVE}/::g' \ + ${D}/${libdir}/rpm/macros + sed -i -e 's:${RECIPE_SYSROOT}/::g' \ + ${D}/${libdir}/cmake/rpm/rpm-targets.cmake + +} + +FILES:${PN} += "${libdir}/rpm-plugins/*.so \ + " +FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/rpm.sh" + +FILES:${PN}-dev += "${libdir}/rpm-plugins/*.la \ + " +PACKAGE_BEFORE_PN += "${PN}-build ${PN}-sign ${PN}-archive" + +RRECOMMENDS:${PN} += "rpm-sign rpm-archive" + +FILES:${PN}-build = "\ + ${bindir}/rpmbuild \ + ${bindir}/gendiff \ + ${bindir}/rpmspec \ + ${libdir}/librpmbuild.so.* \ + ${libdir}/rpm/brp-* \ + ${libdir}/rpm/check-* \ + ${libdir}/rpm/sepdebugcrcfix \ + ${libdir}/rpm/find-lang.sh \ + ${libdir}/rpm/sysusers.sh \ + ${libdir}/rpm/*provides* \ + ${libdir}/rpm/*requires* \ + ${libdir}/rpm/*deps* \ + ${libdir}/rpm/*.prov \ + ${libdir}/rpm/*.req \ + ${libdir}/rpm/config.* \ + ${libdir}/rpm/mkinstalldirs \ + ${libdir}/rpm/macros.p* \ + ${libdir}/rpm/fileattrs/* \ +" + +FILES:${PN}-sign = "\ + ${bindir}/rpmsign \ + ${libdir}/librpmsign.so.* \ +" + +FILES:${PN}-archive = "\ + ${bindir}/rpm2archive \ +" + +PACKAGES += "python3-rpm" +PROVIDES += "python3-rpm" +FILES:python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/* ${PYTHON_SITEPACKAGES_DIR}/rpm-*.egg-info" + +RDEPENDS:${PN}-build = "bash perl python3-core debugedit" + +PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess" + +# Do not specify a sysroot when compiling on a target. +rpm_package_preprocess () { + sed -i -e 's:--sysroot[^ ]*::g' \ + ${PKGD}/${libdir}/rpm/macros +} + +SSTATE_HASHEQUIV_FILEMAP = " \ + populate_sysroot:*/rpm/macros:${TMPDIR} \ + populate_sysroot:*/rpm/macros:${COREBASE} \ + " -- cgit v1.2.3-54-g00ecf