diff options
Diffstat (limited to 'meta/recipes-devtools/rpm')
22 files changed, 380 insertions, 647 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 ac6dcaf101..25aa69d7da 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 e3eff024826550aec4a6a5baef7210a29faf299d Mon Sep 17 00:00:00 2001 +From f4cf90b5a298d6a3199e8b4c07f520aaf593ce2b Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Thu, 9 Mar 2017 18:54:02 +0200 Subject: [PATCH] Add a color setting for mips64_n32 binaries @@ -6,15 +6,15 @@ Subject: [PATCH] Add a color setting for mips64_n32 binaries Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- - build/rpmfc.c | 1 + + build/rpmfc.c | 4 ++++ rpmrc.in | 2 ++ - 2 files changed, 3 insertions(+) + 2 files changed, 6 insertions(+) diff --git a/build/rpmfc.c b/build/rpmfc.c -index d38a10916..c8e2f876a 100644 +index 4b67a9bae..ed7e4e623 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c -@@ -622,6 +622,7 @@ exit: +@@ -660,6 +660,7 @@ exit: static const struct rpmfcTokens_s rpmfcTokens[] = { { "directory", RPMFC_INCLUDE }, @@ -22,11 +22,21 @@ index d38a10916..c8e2f876a 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; + break; + } ++ if (ehdr.e_machine == EM_MIPS || ehdr.e_machine == EM_MIPS_RS3_LE) ++ if (ehdr.e_flags & EF_MIPS_ABI2) ++ color = RPMFC_ELFMIPSN32; + } + if (elf) + elf_end(elf); diff --git a/rpmrc.in b/rpmrc.in -index abc08fc31..f5bc820d8 100644 +index 8646a966b..7349fdfd3 100644 --- a/rpmrc.in +++ b/rpmrc.in -@@ -133,6 +133,8 @@ archcolor: mipsr6el 1 +@@ -142,6 +142,8 @@ archcolor: mipsr6el 1 archcolor: mips64r6 2 archcolor: mips64r6el 2 @@ -35,6 +45,3 @@ index abc08fc31..f5bc820d8 100644 archcolor: m68k 1 archcolor: m68kmint 1 --- -2.11.0 - diff --git a/meta/recipes-devtools/rpm/files/0001-Bump-up-the-limit-of-signature-header-to-64MB.patch b/meta/recipes-devtools/rpm/files/0001-Bump-up-the-limit-of-signature-header-to-64MB.patch deleted file mode 100644 index 0a19c12a7a..0000000000 --- a/meta/recipes-devtools/rpm/files/0001-Bump-up-the-limit-of-signature-header-to-64MB.patch +++ /dev/null @@ -1,62 +0,0 @@ -From e8bf0eba7143abb6e69db82ee747a0c6790dd00a Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Wed, 3 Jun 2020 10:25:24 +0800 -Subject: [PATCH] Bump up the limit of signature header to 64MB - -Since commits [Place file signatures into the signature header where they -belong][1] applied, run `rpm -Kv **.rpm' failed if signature header -is larger than 64KB. Here are steps: - -1) A unsigned rpm package, the size is 227560 bytes -$ ls -al xz-src-5.2.5-r0.corei7_64.rpm --rw-------. 1 mockbuild 1000 227560 Jun 3 09:59 - -2) Sign the rpm package -$ rpmsign --addsign ... xz-src-5.2.5-r0.corei7_64.rpm - -3) The size of signed rpm is 312208 bytes -$ ls -al xz-src-5.2.5-r0.corei7_64.rpm --rw-------. 1 mockbuild 1000 312208 Jun 3 09:48 - -4) Run `rpm -Kv' failed with signature hdr data out of range -$ rpm -Kv xz-src-5.2.5-r0.corei7_64.rpm -xz-src-5.2.5-r0.corei7_64.rpm: -error: xz-src-5.2.5-r0.corei7_64.rpm: signature hdr data: BAD, no. of -bytes(88864) out of range - -From 1) and 3), the size of signed rpm package increased -312208 - 227560 = 84648, so the check of dl_max (64KB,65536) -is not enough. - -As [1] said: - - This also means the signature header can be MUCH bigger than ever - before,so bump up the limit (to 64MB, arbitrary something for now) - -So [1] missed to multiply by 1024. - -[1] https://github.com/rpm-software-management/rpm/commit/f558e886050c4e98f6cdde391df679a411b3f62c - -Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/486579912381ede82172dc6d0ff3941a6d0536b5] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - lib/header.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/header.c b/lib/header.c -index 9ec7ed0..cbf6890 100644 ---- a/lib/header.c -+++ b/lib/header.c -@@ -1906,7 +1906,7 @@ rpmRC hdrblobRead(FD_t fd, int magic, int exact_size, rpmTagVal regionTag, hdrbl - - if (regionTag == RPMTAG_HEADERSIGNATURES) { - il_max = 32; -- dl_max = 64 * 1024; -+ dl_max = 64 * 1024 * 1024; - } - - memset(block, 0, sizeof(block)); --- -2.25.4 - 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..e4edc884b1 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch @@ -0,0 +1,27 @@ +From c39a074ff3c4d21c100d387661c7d725b5eae7b0 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Wed, 29 Nov 2023 14:06:15 +0100 +Subject: [PATCH] CMakeLists.txt: look for lua with pkg-config rather than + cmake modules + +Otherwise cmake will try to find libm, badly, and fail. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4a383ceba..ed847c09a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,7 +190,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) 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 4029233fb7..d0ed711086 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 f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:00 2001 +From 86e585cc0dd06dfa20f584af8b59d52a59accb45 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Mon, 9 Jan 2017 18:52:11 +0200 Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in @@ -9,16 +9,15 @@ hand produces rpms that way by design. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- build/pack.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/pack.c b/build/pack.c -index e6cec1816..810cd7351 100644 +index f7dac6d9a..f382c7da0 100644 --- a/build/pack.c +++ b/build/pack.c -@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch +@@ -711,10 +711,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 52440d6818..b571a0ae8c 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 2f3d1619b6510bc131c4375827caf912559f0fa2 Mon Sep 17 00:00:00 2001 +From 73d6841d9ef2a8ac7bd63f9645a3efe8038dfdd4 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for @@ -6,31 +6,29 @@ Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for Upstream-Status: Denied [https://github.com/rpm-software-management/rpm/pull/263] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- - configure.ac | 2 +- - macros.in | 2 +- - rpm.am | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) + CMakeLists.txt | 2 +- + macros.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/configure.ac b/configure.ac -index d3aeab86e..1a1f3f91f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1086,7 +1086,7 @@ else - usrprefix=$prefix - fi +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7808115c1..4a383ceba 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) --RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`" -+RPMCONFIGDIR="`echo ${libdir}/rpm`" - AC_SUBST(RPMCONFIGDIR) +-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_VENDOR "vendor" CACHE STRING "rpm vendor string") - AC_SUBST(OBJDUMP) + # Emulate libtool versioning. Before a public release: diff --git a/macros.in b/macros.in -index fe9803aad..d128675bf 100644 +index b49ffaad4..3acbe78f6 100644 --- a/macros.in +++ b/macros.in -@@ -985,7 +985,7 @@ package or when debugging this package.\ +@@ -969,7 +969,7 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\ %_sharedstatedir %{_prefix}/com %_localstatedir %{_prefix}/var %_lib lib @@ -39,20 +37,3 @@ index fe9803aad..d128675bf 100644 %_includedir %{_prefix}/include %_infodir %{_datadir}/info %_mandir %{_datadir}/man -diff --git a/rpm.am b/rpm.am -index 40b4ec55f..3139ce8f6 100644 ---- a/rpm.am -+++ b/rpm.am -@@ -1,10 +1,10 @@ - # Internal binaries - ## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm --rpmlibexecdir = $(prefix)/lib/rpm -+rpmlibexecdir = $(libdir)/rpm - - # Host independent config files - ## HACK: it probably should be $(datadir)/rpm --rpmconfigdir = $(prefix)/lib/rpm -+rpmconfigdir = $(libdir)/rpm - - # Libtool version (current-revision-age) for all our libraries - rpm_version_info = 9:1:0 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 96eb418952..796088df53 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 35381b6cd6c1b571bf7e6b0640de0f54dbf94386 Mon Sep 17 00:00:00 2001 +From e210458d125793915abce30420d866a30305c37a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 10 Jan 2017 14:11:30 +0200 Subject: [PATCH] Do not read config files from $HOME @@ -10,29 +10,26 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/rpmrc.c b/lib/rpmrc.c -index 4ed991321..19fe80f98 100644 +index 9437a0ff1..483585ae4 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c -@@ -458,8 +458,7 @@ static void setDefaults(void) +@@ -459,8 +459,7 @@ static void setDefaults(void) if (!defrcfiles) { defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", - confdir, "/" RPMCANONVENDOR "/rpmrc", ":", + confdir, "/" RPM_VENDOR "/rpmrc", ":", - SYSCONFDIR "/rpmrc", ":", - "~/.rpmrc", NULL); -+ SYSCONFDIR "/rpmrc", ":"); ++ SYSCONFDIR "/rpmrc", NULL); } #ifndef MACROFILES -@@ -471,8 +470,7 @@ static void setDefaults(void) - confdir, "/" RPMCANONVENDOR "/macros", ":", +@@ -472,8 +471,7 @@ static void setDefaults(void) + confdir, "/" RPM_VENDOR "/macros", ":", SYSCONFDIR "/rpm/macros.*", ":", SYSCONFDIR "/rpm/macros", ":", - SYSCONFDIR "/rpm/%{_target}/macros", ":", - "~/.rpmmacros", NULL); -+ SYSCONFDIR "/rpm/%{_target}/macros", ":"); ++ SYSCONFDIR "/rpm/%{_target}/macros", NULL); } #else macrofiles = MACROFILES; --- -2.11.0 - 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 41cdf6ed77..328fbf86ac 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 a674b9cc7af448d7c6748bc163bf37dc14a57f09 Mon Sep 17 00:00:00 2001 +From a8fe7a7a2e41c9f127ed26407d57076babcb89e8 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 20 Jan 2017 13:32:06 +0200 Subject: [PATCH] Do not reset the PATH environment variable before running @@ -8,16 +8,15 @@ We add lots of native stuff into it and scriptlets rely on that. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- lib/rpmscript.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 6a31e0d..2b0e438 100644 +index 57689bb68..7b7e26606 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c -@@ -184,7 +184,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes, +@@ -252,7 +252,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-Fix-build-with-musl-C-library.patch b/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch deleted file mode 100644 index 0b1d6298a9..0000000000 --- a/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch +++ /dev/null @@ -1,48 +0,0 @@ -From d076de030deb9cafd9b2e82be5d506cebdefad0b Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Mon, 27 Feb 2017 14:43:21 +0200 -Subject: [PATCH 1/9] Fix build with musl C library. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - configure.ac | 3 ++- - rpmio/digest_nss.c | 1 + - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index c04a2e8d1..c9d9ac16d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -255,6 +255,7 @@ AC_SEARCH_LIBS(dlopen, [dl]) - # Check for libelf library. Prefer external, otherwise none. - WITH_LIBELF_LIB= - AC_CHECK_HEADER([libelf.h]) -+AC_CHECK_HEADERS([error.h], [WITH_ERROR_H=yes]) - AC_CHECK_HEADERS([gelf.h], [ - AC_CHECK_LIB(elf, gelf_getvernaux, [ - AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).]) -@@ -263,7 +264,7 @@ AC_CHECK_HEADERS([gelf.h], [ - ]) - ]) - AC_SUBST(WITH_LIBELF_LIB) --AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes]) -+AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes && test "$WITH_ERROR_H" = yes]) - - AC_CHECK_HEADERS([dwarf.h], [ - WITH_LIBDWARF=yes -diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c -index 992d9acf6..e11920e3e 100644 ---- a/rpmio/digest_nss.c -+++ b/rpmio/digest_nss.c -@@ -1,5 +1,6 @@ - #include "system.h" - -+#include <signal.h> - #include <pthread.h> - #include <nss.h> - #include <sechash.h> --- -2.14.2 - diff --git a/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch b/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch deleted file mode 100644 index 734e38bb39..0000000000 --- a/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 2d53d1e308a5bd15a16cc289fa7e1f264ea706be Mon Sep 17 00:00:00 2001 -From: Panu Matilainen <pmatilai@redhat.com> -Date: Tue, 26 Jun 2018 10:46:14 +0300 -Subject: [PATCH] Rip out partial support for unused MD2 and RIPEMD160 digests - -Inspired by #453, adding configure-checks for unused digests algorithms -seems nonsensical, at no point in rpm history have these algorithms been -used for anything in rpm so there's not even backward compatibility to -care about. So the question becomes why do we appear to have (some) -support for those unused algorithms? So lets don't, problem solved... - -Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/ff4b9111aeba01dd025dd133ce617fb80f7398a0] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - rpmio/digest_beecrypt.c | 7 ------- - rpmio/digest_nss.c | 2 -- - rpmio/digest_openssl.c | 6 ------ - 3 files changed, 15 deletions(-) - -diff --git a/rpmio/digest_beecrypt.c b/rpmio/digest_beecrypt.c -index 597027e25..653a39491 100644 ---- a/rpmio/digest_beecrypt.c -+++ b/rpmio/digest_beecrypt.c -@@ -132,10 +132,6 @@ DIGEST_CTX rpmDigestInit(int hashalgo, rpmDigestFlags flags) - ctx->Digest = (void *) sha512Digest; - break; - #endif -- case PGPHASHALGO_RIPEMD160: -- case PGPHASHALGO_MD2: -- case PGPHASHALGO_TIGER192: -- case PGPHASHALGO_HAVAL_5_160: - default: - free(ctx); - return NULL; -@@ -292,9 +288,6 @@ static int pgpVerifySigRSA(pgpDigAlg pgpkey, pgpDigAlg pgpsig, uint8_t *hash, si - case PGPHASHALGO_SHA1: - prefix = "3021300906052b0e03021a05000414"; - break; -- case PGPHASHALGO_MD2: -- prefix = "3020300c06082a864886f70d020205000410"; -- break; - case PGPHASHALGO_SHA256: - prefix = "3031300d060960864801650304020105000420"; - break; -diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c -index e11920e3e..b3d2b5595 100644 ---- a/rpmio/digest_nss.c -+++ b/rpmio/digest_nss.c -@@ -117,7 +117,6 @@ static HASH_HashType getHashType(int hashalgo) - { - switch (hashalgo) { - case PGPHASHALGO_MD5: return HASH_AlgMD5; -- case PGPHASHALGO_MD2: return HASH_AlgMD2; - case PGPHASHALGO_SHA1: return HASH_AlgSHA1; - #ifdef SHA224_LENGTH - case PGPHASHALGO_SHA224: return HASH_AlgSHA224; -@@ -217,7 +216,6 @@ static SECOidTag getHashAlg(unsigned int hashalgo) - { - switch (hashalgo) { - case PGPHASHALGO_MD5: return SEC_OID_MD5; -- case PGPHASHALGO_MD2: return SEC_OID_MD2; - case PGPHASHALGO_SHA1: return SEC_OID_SHA1; - #ifdef SHA224_LENGTH - case PGPHASHALGO_SHA224: return SEC_OID_SHA224; -diff --git a/rpmio/digest_openssl.c b/rpmio/digest_openssl.c -index 18e52a724..0ae48dd1d 100644 ---- a/rpmio/digest_openssl.c -+++ b/rpmio/digest_openssl.c -@@ -172,12 +172,6 @@ static const EVP_MD *getEVPMD(int hashalgo) - case PGPHASHALGO_SHA1: - return EVP_sha1(); - -- case PGPHASHALGO_RIPEMD160: -- return EVP_ripemd160(); -- -- case PGPHASHALGO_MD2: -- return EVP_md2(); -- - case PGPHASHALGO_SHA256: - return EVP_sha256(); - 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 4020a31092..e4251a1a73 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 a89daa75ac970d8e247edc762d1181e9a5b0c5d0 Mon Sep 17 00:00:00 2001 +From 34c0d3263f3e0b366a2320e0823f46673f7ba928 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> 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 <alex.kanavin@gmail.com> 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index cc98c4885..f8bd3df04 100644 +index 3f6313278..57689bb68 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c -@@ -394,8 +394,7 @@ exit: +@@ -448,8 +448,7 @@ exit: Fclose(out); /* XXX dup'd STDOUT_FILENO */ if (fn) { @@ -42,21 +42,18 @@ index cc98c4885..f8bd3df04 100644 free(fn); } free(mline); -@@ -428,7 +427,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, +@@ -483,7 +482,13 @@ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, if (rc != RPMRC_FAIL) { if (script_type & RPMSCRIPTLET_EXEC) { -- rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); +- rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); + if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) { + rpmChrootOut(); -+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); ++ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); + rpmChrootIn(); + } else { -+ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); ++ rc = runExtScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); + } } else { - rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, &script->nextFileFunc); + rc = runLuaScript(plugins, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, script->nextFileFunc); } --- -2.11.0 - 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 new file mode 100644 index 0000000000..2f6397aa8a --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch @@ -0,0 +1,28 @@ +From ae4fdd8e8d052835973e6ff4b7550f93bde30a98 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Tue, 31 Aug 2021 10:37:05 +0200 +Subject: [PATCH] build/pack.c: do not insert payloadflags into .rpm metadata + +The flags look like '19T56' where 19 is the compression level +(deterministic), and 56 is the amount of threads (varies from one +host to the next and breaks reproducibility for .rpm). + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + build/pack.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/pack.c b/build/pack.c +index f382c7da0..0889dd993 100644 +--- a/build/pack.c ++++ b/build/pack.c +@@ -330,7 +330,7 @@ static char *getIOFlags(Package pkg) + headerPutString(pkg->header, RPMTAG_PAYLOADCOMPRESSOR, compr); + buf = xstrdup(rpmio_flags); + buf[s - rpmio_flags] = '\0'; +- headerPutString(pkg->header, RPMTAG_PAYLOADFLAGS, buf+1); ++ headerPutString(pkg->header, RPMTAG_PAYLOADFLAGS, ""); + free(buf); + } + exit: 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 6678c105cd..98e52da3a8 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 1ed066fc6fa7d7afffe3545c4e3ea937529e6c49 Mon Sep 17 00:00:00 2001 +From b04ecb793a3c859985eead5e261785b27a4c4a20 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Thu, 7 May 2020 17:40:58 +0800 Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32 @@ -32,10 +32,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/transaction.c b/lib/transaction.c -index 67b9db5..82386b8 100644 +index 70d2587ac..b89b30060 100644 --- a/lib/transaction.c +++ b/lib/transaction.c -@@ -391,7 +391,18 @@ static int handleColorConflict(rpmts ts, +@@ -400,7 +400,18 @@ static int handleColorConflict(rpmts ts, rpmfsSetAction(ofs, ofx, FA_CREATE); rpmfsSetAction(fs, fx, FA_SKIPCOLOR); rConflicts = 0; @@ -55,6 +55,3 @@ index 67b9db5..82386b8 100644 } } --- -2.7.4 - 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..55108e7f1c 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 @@ -perl: disable auto requires +From 58bf006646a063837c46b695f7e7ebb69bee7238 Mon Sep 17 00:00:00 2001 +From: Mark Hatle <mark.hatle@windriver.com> +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 @@ -9,20 +12,24 @@ generation. This matches the behavior from the previous RPM5 implementation. Upstream-Status: Inappropriate [OE specific configuration] Signed-off-by: Mark Hatle <mark.hatle@windriver.com> +--- + fileattrs/perl.attr | 2 +- + fileattrs/perllib.attr | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -Index: git/fileattrs/perl.attr -=================================================================== ---- git.orig/fileattrs/perl.attr -+++ git/fileattrs/perl.attr +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 -Index: git/fileattrs/perllib.attr -=================================================================== ---- git.orig/fileattrs/perllib.attr -+++ git/fileattrs/perllib.attr +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 diff --git a/meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch b/meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch deleted file mode 100644 index 6454785254..0000000000 --- a/meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 0066b862bb3a09f39295abd5d972a53ac8dc1555 Mon Sep 17 00:00:00 2001 -From: Peter Bergin <peter@berginkonsult.se> -Date: Wed, 19 Sep 2018 15:12:31 +0200 -Subject: [PATCH] rpm/rpmio.c: restrict virtual memory usage if limit set - -A solution to avoid OOM situation when the virtual memory is restricted -for a user (ulimit -v). As the lzopen_internal function is run in parallel -one instance per CPU thread the available virtual memory is limited per -CPU thread. - -Upstream-Status: Pending [merge of multithreading patches to upstream] - -Signed-off-by: Peter Bergin <peter@berginkonsult.se> ---- - rpmio/rpmio.c | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c -index e051c98..b3c56b6 100644 ---- a/rpmio/rpmio.c -+++ b/rpmio/rpmio.c -@@ -845,6 +845,40 @@ static LZFILE *lzopen_internal(const char *mode, int fd, int xz) - } - #endif - -+ struct rlimit virtual_memory; -+ getrlimit(RLIMIT_AS, &virtual_memory); -+ if (virtual_memory.rlim_cur != RLIM_INFINITY) { -+ const uint64_t virtual_memlimit = virtual_memory.rlim_cur; -+ const uint64_t virtual_memlimit_per_cpu_thread = -+ virtual_memlimit / lzma_cputhreads(); -+ uint64_t memory_usage_virt; -+ rpmlog(RPMLOG_NOTICE, "XZ: virtual memory restricted to %lu and " -+ "per CPU thread %lu\n", virtual_memlimit, virtual_memlimit_per_cpu_thread); -+ /* keep reducing the number of compression threads until memory -+ usage falls below the limit per CPU thread*/ -+ while ((memory_usage_virt = lzma_stream_encoder_mt_memusage(&mt_options)) > -+ virtual_memlimit_per_cpu_thread) { -+ /* If number of threads goes down to zero lzma_stream_encoder will -+ * will return UINT64_MAX. We must check here to avoid an infinite loop. -+ * If we get into situation that one thread requires more virtual memory -+ * than available we set one thread, print error message and try anyway. */ -+ if (--mt_options.threads == 0) { -+ mt_options.threads = 1; -+ rpmlog(RPMLOG_WARNING, -+ "XZ: Could not adjust number of threads to get below " -+ "virtual memory limit %lu. usage %lu\n", -+ virtual_memlimit_per_cpu_thread, memory_usage_virt); -+ break; -+ } -+ } -+ if (threads != (int)mt_options.threads) -+ rpmlog(RPMLOG_NOTICE, -+ "XZ: Adjusted the number of threads from %d to %d to not " -+ "exceed the memory usage limit of %lu bytes\n", -+ threads, mt_options.threads, virtual_memlimit); -+ -+ } -+ - ret = lzma_stream_encoder_mt(&lzfile->strm, &mt_options); - } - #endif --- -2.7.4 - diff --git a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch deleted file mode 100644 index d8d338792d..0000000000 --- a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Mon, 18 Nov 2019 16:22:56 +0100 -Subject: [PATCH] rpmfc.c: do not run file classification in parallel - -This is causing freezes with libmagic when the file in question is compressed: -https://github.com/rpm-software-management/rpm/issues/756 - -Upstream-Status: Inappropriate [upstream wants a proper fix] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - build/rpmfc.c | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/build/rpmfc.c b/build/rpmfc.c -index 3db7a9352..17afdd57a 100644 ---- a/build/rpmfc.c -+++ b/build/rpmfc.c -@@ -680,7 +680,6 @@ static void rpmfcAttributes(rpmfc fc, int ix, const char *ftype, const char *ful - /* Add attributes on libmagic type & path pattern matches */ - if (matches(&(*attr)->incl, ftype, path, is_executable)) { - argvAddTokens(&fc->fattrs[ix], (*attr)->name); -- #pragma omp critical(fahash) - fattrHashAddEntry(fc->fahash, attr-fc->atypes, ix); - } - } -@@ -1105,7 +1104,6 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) - /* Build (sorted) file class dictionary. */ - fc->cdict = rpmstrPoolCreate(); - -- #pragma omp parallel - { - /* libmagic is not thread-safe, each thread needs to a private handle */ - magic_t ms = magic_open(msflags); -@@ -1113,15 +1111,12 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) - if (ms == NULL) { - rpmlog(RPMLOG_ERR, _("magic_open(0x%x) failed: %s\n"), - msflags, strerror(errno)); -- #pragma omp cancel parallel - } - - if (magic_load(ms, NULL) == -1) { - rpmlog(RPMLOG_ERR, _("magic_load failed: %s\n"), magic_error(ms)); -- #pragma omp cancel parallel - } - -- #pragma omp for ordered reduction(+:nerrors) - for (int ix = 0; ix < fc->nfiles; ix++) { - rpmsid ftypeId; - const char * ftype; -@@ -1185,14 +1180,11 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) - fc->fcolor[ix] = fcolor; - - /* Add to file class dictionary and index array */ -- #pragma omp ordered - if (fcolor != RPMFC_WHITE && (fcolor & RPMFC_INCLUDE)) { - ftypeId = rpmstrPoolId(fc->cdict, ftype, 1); -- #pragma omp atomic - fc->fknown++; - } else { - ftypeId = rpmstrPoolId(fc->cdict, "", 1); -- #pragma omp atomic - fc->fwhite++; - } - /* Pool id's start from 1, for headers we want it from 0 */ diff --git a/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch b/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch deleted file mode 100644 index 8842e3ebd7..0000000000 --- a/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6878a83f9bac015c64d83cee42530a20a264cc5a Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Tue, 7 Jan 2020 12:02:06 +0100 -Subject: [PATCH] rpmplugins.c: call dlerror() prior to dlsym() - -This is the recommended way in the manpage; if there is -a lingering error from an unrelated dl*() call that was -never obtained via dlerror(), it needs to be cleared -prior to calling dlsym(). - -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/998] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - lib/rpmplugins.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/lib/rpmplugins.c b/lib/rpmplugins.c -index 65e684e84..b950f85cf 100644 ---- a/lib/rpmplugins.c -+++ b/lib/rpmplugins.c -@@ -68,6 +68,8 @@ static rpmPlugin rpmPluginNew(const char *name, const char *path, - - /* make sure the plugin has the supported hooks flag */ - hooks_name = rstrscat(NULL, name, "_hooks", NULL); -+ /* clear out any old errors that weren't fetched */ -+ dlerror(); - hooks = dlsym(handle, hooks_name); - if ((error = dlerror()) != NULL) { - rpmlog(RPMLOG_ERR, _("Failed to resolve symbol %s: %s\n"), 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 b3dbc319b6..c5caa7dc5e 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 @@ -From 383c0b097b7eba16801a9e3c4b8e36a4b6de74ab Mon Sep 17 00:00:00 2001 +From d7143dc4e75c8bcc5cc4c852a4b972942b7e4d07 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 20 Jan 2017 13:33:05 +0200 -Subject: [PATCH 2/2] Add support for prefixing /etc from RPM_ETCCONFIGDIR +Subject: [PATCH] Add support for prefixing /etc from RPM_ETCCONFIGDIR environment variable This is needed so that rpm can pick up target-specific configuration @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/rpmrc.c b/lib/rpmrc.c -index 19fe80f98..6b27b3941 100644 +index 483585ae4..ea858c290 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c -@@ -455,10 +455,14 @@ const char * lookupInDefaultTable(const char * name, +@@ -456,10 +456,14 @@ const char * lookupInDefaultTable(const char * name, static void setDefaults(void) { const char *confdir = rpmConfigDir(); @@ -27,26 +27,26 @@ index 19fe80f98..6b27b3941 100644 + if (!defrcfiles) { defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", - confdir, "/" RPMCANONVENDOR "/rpmrc", ":", -- SYSCONFDIR "/rpmrc", ":"); -+ etcconfdir, SYSCONFDIR "/rpmrc", ":", NULL); + confdir, "/" RPM_VENDOR "/rpmrc", ":", +- SYSCONFDIR "/rpmrc", NULL); ++ etcconfdir, SYSCONFDIR "/rpmrc", NULL); } #ifndef MACROFILES -@@ -468,9 +472,9 @@ static void setDefaults(void) +@@ -469,9 +473,9 @@ static void setDefaults(void) confdir, "/platform/%{_target}/macros", ":", confdir, "/fileattrs/*.attr", ":", - confdir, "/" RPMCANONVENDOR "/macros", ":", + confdir, "/" RPM_VENDOR "/macros", ":", - SYSCONFDIR "/rpm/macros.*", ":", - SYSCONFDIR "/rpm/macros", ":", -- SYSCONFDIR "/rpm/%{_target}/macros", ":"); +- SYSCONFDIR "/rpm/%{_target}/macros", NULL); + etcconfdir, SYSCONFDIR "/rpm/macros.*", ":", + etcconfdir, SYSCONFDIR "/rpm/macros", ":", -+ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", ":", NULL); ++ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", NULL); } #else macrofiles = MACROFILES; -@@ -989,7 +993,11 @@ static void read_auxv(void) +@@ -1115,7 +1119,11 @@ static void read_auxv(void) */ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) { @@ -59,7 +59,7 @@ index 19fe80f98..6b27b3941 100644 static struct utsname un; char * chptr; canonEntry canon; -@@ -1286,6 +1294,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) +@@ -1435,6 +1443,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) if (arch) *arch = un.machine; if (os) *os = un.sysname; @@ -67,6 +67,3 @@ index 19fe80f98..6b27b3941 100644 } static --- -2.11.0 - 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..23dce30086 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch @@ -0,0 +1,34 @@ +From 29c2a0c18b0c773128bf62c611b4c53fe4471105 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Tue, 16 Jan 2024 09:59:26 +0100 +Subject: [PATCH] rpmio/rpmglob.c: avoid using GLOB_BRACE if undefined by C + library + +This addresses musl failures; if there is code out there relying on +those braces, it needs to be fixed when used on musl. + +This is unlikely to be trivially fixable upstream. + +Upstream-Status: Inappropriate [reported at https://github.com/rpm-software-management/rpm/issues/2844] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + rpmio/rpmglob.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/rpmio/rpmglob.c b/rpmio/rpmglob.c +index 243568766..43c27074a 100644 +--- a/rpmio/rpmglob.c ++++ b/rpmio/rpmglob.c +@@ -33,6 +33,12 @@ + + #include "debug.h" + ++/* Don't fail if the standard C library +++ * doesn't provide brace expansion */ ++#ifndef GLOB_BRACE ++#define GLOB_BRACE 0 ++#endif ++ + /* Return 1 if pattern contains a magic char, see glob(7) for a list */ + static int ismagic(const char *pattern) + { diff --git a/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch b/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch deleted file mode 100644 index 4ac5c38f06..0000000000 --- a/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5141d50d7b3d3c209a22c53deedb4ceef014401d Mon Sep 17 00:00:00 2001 -From: Peter Kjellerstedt <pkj@axis.com> -Date: Mon, 15 May 2017 10:21:08 +0200 -Subject: [PATCH 09/15] Do not require that ELF binaries are executable to be - identifiable - -There is nothing that requires, e.g., a DSO to be executable, but it -is still an ELF binary and should be identified as such. - -Upstream probably expects all ELF binaries to be marked as executable, -but rather than imposing such a limitation for OE, allow any file to -be identified as an ELF binary regardless of whether it is executable -or not. - -Upstream-Status: Inappropriate -Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> - ---- - fileattrs/elf.attr | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/fileattrs/elf.attr b/fileattrs/elf.attr -index 5805dd0ee..3516f309d 100644 ---- a/fileattrs/elf.attr -+++ b/fileattrs/elf.attr -@@ -1,4 +1,3 @@ - %__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private} - %__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private} - %__elf_magic ^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$ --%__elf_flags exeonly --- -2.14.2 - 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 43e9859ef3..732202c46f 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 989e425d416474c191b020d0825895e3df4bd033 Mon Sep 17 00:00:00 2001 +From f01d9c24bb86bc47ad2453483518dbb25953cac7 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> 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 <alex.kanavin@gmail.com> 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 2b0e43862..e319673f1 100644 +index 7b7e26606..1dcd23be5 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c -@@ -226,7 +226,7 @@ static char * writeScript(const char *cmd, const char *script) +@@ -291,7 +291,7 @@ static char * writeScript(const char *cmd, const char *script) if (Ferror(fd)) goto exit; @@ -26,7 +26,7 @@ index 2b0e43862..e319673f1 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); -@@ -258,7 +258,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, +@@ -323,7 +323,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, char *mline = NULL; rpmRC rc = RPMRC_FAIL; @@ -35,7 +35,7 @@ index 2b0e43862..e319673f1 100644 if (script) { fn = writeScript(*argvp[0], script); -@@ -310,7 +310,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, +@@ -375,7 +375,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 2b0e43862..e319673f1 100644 sname, *argvp[0], (unsigned)getpid()); fclose(in); -@@ -353,7 +353,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, +@@ -418,7 +418,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.15.1.bb b/meta/recipes-devtools/rpm/rpm_4.15.1.bb deleted file mode 100644 index cbe1acffe2..0000000000 --- a/meta/recipes-devtools/rpm/rpm_4.15.1.bb +++ /dev/null @@ -1,151 +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" -LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a" - -SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \ - 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-Fix-build-with-musl-C-library.patch \ - file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \ - file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \ - file://0001-perl-disable-auto-reqs.patch \ - file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \ - file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ - file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \ - file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \ - file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \ - file://0001-Bump-up-the-limit-of-signature-header-to-64MB.patch \ - " - -PE = "1" -SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3" - -S = "${WORKDIR}/git" - -DEPENDS = "openssl libarchive db file popt xz bzip2 dbus elfutils python3" -DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native" - -inherit autotools gettext pkgconfig python3native -export PYTHON_ABI - -# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe -EXTRA_AUTORECONF_append = " --exclude=gnu-configize" - -EXTRA_OECONF_append = " --without-lua --enable-python --with-crypto=openssl" -EXTRA_OECONF_append_libc-musl = " --disable-nls --disable-openmp" - -# --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 -# -# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled. -# Also disable plugins by default for native. -EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" -EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" - -BBCLASSEXTEND = "native nativesdk" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" - -ASNEEDED = "" - -# 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 - 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() { - for tool in ${WRAPPER_TOOLS}; do - create_wrapper ${D}$tool \ - RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ - RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \ - MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \ - RPM_NO_CHROOT_FOR_SCRIPTS=1 - done - - rm -rf ${D}/var -} - -# 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 () { - sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ - ${D}/${libdir}/rpm/macros - - sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \ - ${D}${libdir}/rpm/pythondistdeps.py -} - -FILES_${PN} += "${libdir}/rpm-plugins/*.so \ - " - -FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ - " - -PACKAGES += "python3-rpm" -PROVIDES += "python3-rpm" -FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" - -# rpm 5.x was packaging the rpm build tools separately -RPROVIDES_${PN} += "rpm-build" - -RDEPENDS_${PN} = "bash perl python3-core" - -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 -} diff --git a/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb b/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb new file mode 100644 index 0000000000..0802f26295 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm_4.19.1.1.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.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 \ + " + +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} \ + " |