diff options
Diffstat (limited to 'meta/recipes-devtools/rpm')
92 files changed, 1349 insertions, 5503 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 new file mode 100644 index 0000000000..331ea849e6 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch @@ -0,0 +1,48 @@ +From 5492ac3c716020a27a25253bbffe810db43202bf 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 + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> + +--- + build/rpmfc.c | 4 ++++ + rpmrc.in | 2 ++ + 2 files changed, 6 insertions(+) + +diff --git a/build/rpmfc.c b/build/rpmfc.c +index 10c380ee9..b7655aa93 100644 +--- a/build/rpmfc.c ++++ b/build/rpmfc.c +@@ -639,6 +639,7 @@ exit: + static const struct rpmfcTokens_s rpmfcTokens[] = { + { "directory", RPMFC_INCLUDE }, + ++ { "N32 MIPS64", RPMFC_ELFMIPSN32|RPMFC_INCLUDE }, + { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE }, + { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE }, + +@@ -1149,6 +1150,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; + elf_end(elf); + } + close(fd); +diff --git a/rpmrc.in b/rpmrc.in +index 5bd9ba3e5..f15bb8dad 100644 +--- a/rpmrc.in ++++ b/rpmrc.in +@@ -137,6 +137,8 @@ archcolor: mipsr6el 1 + archcolor: mips64r6 2 + archcolor: mips64r6el 2 + ++archcolor: mips64_n32 4 ++ + archcolor: m68k 1 + + archcolor: m68kmint 1 diff --git a/meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch b/meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch new file mode 100644 index 0000000000..044b4dd2a0 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch @@ -0,0 +1,57 @@ +From 9a6871126f472feea057d5f803505ec8cc78f083 Mon Sep 17 00:00:00 2001 +From: Panu Matilainen <pmatilai@redhat.com> +Date: Thu, 30 Sep 2021 09:56:20 +0300 +Subject: [PATCH 1/3] Refactor pgpDigParams construction to helper function + +No functional changes, just to reduce code duplication and needed by +the following commits. + +CVE: CVE-2021-3521 +Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/9f03f42e2] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + rpmio/rpmpgp.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c +index d0688ebe9a..e472b5320f 100644 +--- a/rpmio/rpmpgp.c ++++ b/rpmio/rpmpgp.c +@@ -1041,6 +1041,13 @@ unsigned int pgpDigParamsAlgo(pgpDigParams digp, unsigned int algotype) + return algo; + } + ++static pgpDigParams pgpDigParamsNew(uint8_t tag) ++{ ++ pgpDigParams digp = xcalloc(1, sizeof(*digp)); ++ digp->tag = tag; ++ return digp; ++} ++ + int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype, + pgpDigParams * ret) + { +@@ -1058,8 +1065,7 @@ int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype, + if (pkttype && pkt.tag != pkttype) { + break; + } else { +- digp = xcalloc(1, sizeof(*digp)); +- digp->tag = pkt.tag; ++ digp = pgpDigParamsNew(pkt.tag); + } + } + +@@ -1105,8 +1111,7 @@ int pgpPrtParamsSubkeys(const uint8_t *pkts, size_t pktlen, + digps = xrealloc(digps, alloced * sizeof(*digps)); + } + +- digps[count] = xcalloc(1, sizeof(**digps)); +- digps[count]->tag = PGPTAG_PUBLIC_SUBKEY; ++ digps[count] = pgpDigParamsNew(PGPTAG_PUBLIC_SUBKEY); + /* Copy UID from main key to subkey */ + digps[count]->userid = xstrdup(mainkey->userid); + +-- +2.17.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 new file mode 100644 index 0000000000..4029233fb7 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch @@ -0,0 +1,31 @@ +From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 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 + a short-circuited way. + +Upstream permits short-circuiting only for local testing; Yocto on the other +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 +--- a/build/pack.c ++++ b/build/pack.c +@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); + } + +- if (cheating) { +- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); +- } +- + if ((rc = getPkgFilename(pkg->header, filename))) + return rc; + 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 new file mode 100644 index 0000000000..6d236ac400 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch @@ -0,0 +1,58 @@ +From 8d013fe154a162305f76141151baf767dd04b598 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 + default configuration and macros. + +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(-) + +diff --git a/configure.ac b/configure.ac +index eb7d6941b..10a889b5d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -871,7 +871,7 @@ else + usrprefix=$prefix + fi + +-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`" ++RPMCONFIGDIR="`echo ${libdir}/rpm`" + AC_SUBST(RPMCONFIGDIR) + + AC_SUBST(OBJDUMP) +diff --git a/macros.in b/macros.in +index a1f795e5f..689e784ef 100644 +--- a/macros.in ++++ b/macros.in +@@ -933,7 +933,7 @@ package or when debugging this package.\ + %_sharedstatedir %{_prefix}/com + %_localstatedir %{_prefix}/var + %_lib lib +-%_libdir %{_exec_prefix}/%{_lib} ++%_libdir @libdir@ + %_includedir %{_prefix}/include + %_infodir %{_datadir}/info + %_mandir %{_datadir}/man +diff --git a/rpm.am b/rpm.am +index 7b57f433b..9bbb9ee96 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 = 11:0:2 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 new file mode 100644 index 0000000000..96eb418952 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch @@ -0,0 +1,38 @@ +From 35381b6cd6c1b571bf7e6b0640de0f54dbf94386 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 + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + lib/rpmrc.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/lib/rpmrc.c b/lib/rpmrc.c +index 4ed991321..19fe80f98 100644 +--- a/lib/rpmrc.c ++++ b/lib/rpmrc.c +@@ -458,8 +458,7 @@ static void setDefaults(void) + if (!defrcfiles) { + defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", + confdir, "/" RPMCANONVENDOR "/rpmrc", ":", +- SYSCONFDIR "/rpmrc", ":", +- "~/.rpmrc", NULL); ++ SYSCONFDIR "/rpmrc", ":"); + } + + #ifndef MACROFILES +@@ -471,8 +470,7 @@ static void setDefaults(void) + confdir, "/" RPMCANONVENDOR "/macros", ":", + SYSCONFDIR "/rpm/macros.*", ":", + SYSCONFDIR "/rpm/macros", ":", +- SYSCONFDIR "/rpm/%{_target}/macros", ":", +- "~/.rpmmacros", NULL); ++ SYSCONFDIR "/rpm/%{_target}/macros", ":"); + } + #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 new file mode 100644 index 0000000000..41cdf6ed77 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch @@ -0,0 +1,28 @@ +From a674b9cc7af448d7c6748bc163bf37dc14a57f09 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 + scriptlets. + +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 +--- a/lib/rpmscript.c ++++ b/lib/rpmscript.c +@@ -184,7 +184,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes, + if (ipath && ipath[5] != '%') + path = ipath; + +- xx = setenv("PATH", path, 1); ++ //xx = setenv("PATH", path, 1); + free(ipath); + } + 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 new file mode 100644 index 0000000000..734e38bb39 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch @@ -0,0 +1,81 @@ +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 new file mode 100644 index 0000000000..4020a31092 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch @@ -0,0 +1,62 @@ +From a89daa75ac970d8e247edc762d1181e9a5b0c5d0 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 + chrooting into destination rootfs + +This is triggered only when RPM_NO_CHROOT_FOR_SCRIPTS environment variable is defined. +Otherwise they will trigger an explosion of failures, obviously. + +Amended 2018-07-03 by Olof Johansson <olofjn@axis.com>: + + Remove leaking temporary scriptlet files + + Since we tell dnf to run rpm with debug output, this will result in rpm not + cleaning up written temporary scriptlet files (same flag controls both + behaviors). This wouldn't have been a problem since we normally would use the + target sysroot also for temporary files, but we need to chroot out to be able + to actually run the rpm scriptlets (purpose of this patch), so the temporary + files are written to the host's /var/tmp/ directory, causing a gradual + resource leakage on the host system for every RPM based do_rootfs task + executed. + + Signed-off-by: Olof Johansson <olofjn@axis.com> + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + lib/rpmscript.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/lib/rpmscript.c b/lib/rpmscript.c +index cc98c4885..f8bd3df04 100644 +--- a/lib/rpmscript.c ++++ b/lib/rpmscript.c +@@ -394,8 +394,7 @@ exit: + Fclose(out); /* XXX dup'd STDOUT_FILENO */ + + if (fn) { +- if (!rpmIsDebug()) +- unlink(fn); ++ unlink(fn); + free(fn); + } + free(mline); +@@ -428,7 +427,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); ++ if (getenv("RPM_NO_CHROOT_FOR_SCRIPTS") != NULL) { ++ rpmChrootOut(); ++ 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); ++ } + } else { + 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..79b168257e --- /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 2d351c666f09cc1b9e368422653fb42ac8b86249 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 932cb213e..b45d0726f 100644 +--- a/build/pack.c ++++ b/build/pack.c +@@ -328,7 +328,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-docs-do-not-build-manpages-requires-pandoc.patch b/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch new file mode 100644 index 0000000000..ced52d1007 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch @@ -0,0 +1,26 @@ +From 9bf1693092385eba9841614613313010221ca01f Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Tue, 29 Jun 2021 20:11:26 +0200 +Subject: [PATCH] docs: do not build manpages (requires pandoc) + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + docs/Makefile.am | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/docs/Makefile.am b/docs/Makefile.am +index 5a6bd203a..6257767fd 100644 +--- a/docs/Makefile.am ++++ b/docs/Makefile.am +@@ -1,7 +1,5 @@ + ## Process this file with automake to produce Makefile.in + +-SUBDIRS = man +- + EXTRA_DIST = + + EXTRA_DIST += \ +-- +2.32.0 + 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 new file mode 100644 index 0000000000..6678c105cd --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch @@ -0,0 +1,60 @@ +From 1ed066fc6fa7d7afffe3545c4e3ea937529e6c49 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 + +This patch is from: +https://github.com/rpm-software-management/rpm/issues/193 + +Error: Transaction check error: + file /sbin/ldconfig conflicts between attempted installs of +ldconfig-2.31+git0+71f2b249a2-r0.mips64_n32 and +lib32-ldconfig-2.31+git0+71f2b249a2-r0.mips32r2 +... + +This was because: +transactions_color = 001 (ELF32) & 010 (ELF64) & 100 (ELF32 N32 MIPS64) +FColor = Current file color (001) & transaction_color (111) +oFcolor = Previous file color (100) & transaction_color (111) + +In handleColorConflict, it only deal with conditons "new preferred" or +"old preferred". But not deal with the situation where neither is the +preferred type. so for tri-lib system, like mips64/mips64 n32/mips(32), +"Transaction check error" occurred. + +Fixed by performing a 'last-in-wins' resolution when "neither is preferred". + +Upstream-Status: Submitted <https://github.com/rpm-software-management/rpm/issues/193> + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + lib/transaction.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/lib/transaction.c b/lib/transaction.c +index 67b9db5..82386b8 100644 +--- a/lib/transaction.c ++++ b/lib/transaction.c +@@ -391,7 +391,18 @@ static int handleColorConflict(rpmts ts, + rpmfsSetAction(ofs, ofx, FA_CREATE); + rpmfsSetAction(fs, fx, FA_SKIPCOLOR); + rConflicts = 0; +- } ++ }else { ++ /* ++ * If neither is already skipped, we skip the old one, and ++ * install the new one (last in wins). ++ */ ++ if (ofs && !XFA_SKIPPING(rpmfsGetAction(ofs, ofx)) && ++ fs && !XFA_SKIPPING(rpmfsGetAction(fs, fx))) { ++ rpmfsSetAction(ofs, ofx, FA_SKIPCOLOR); ++ rpmfsSetAction(fs, fx, FA_CREATE); ++ } ++ rConflicts = 0; ++ } + } + } + +-- +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 new file mode 100644 index 0000000000..a6c58699d3 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch @@ -0,0 +1,32 @@ +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 <mark.hatle@windriver.com> + +Index: git/fileattrs/perl.attr +=================================================================== +--- git.orig/fileattrs/perl.attr ++++ git/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 +@@ -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/0001-tools-Add-error.h-for-non-glibc-case.patch b/meta/recipes-devtools/rpm/files/0001-tools-Add-error.h-for-non-glibc-case.patch new file mode 100644 index 0000000000..9783396639 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-tools-Add-error.h-for-non-glibc-case.patch @@ -0,0 +1,71 @@ +From 9b9d717f484ec913cdd3804e43489b3dc18bd77c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 31 Oct 2020 22:14:05 -0700 +Subject: [PATCH] tools: Add error.h for non-glibc case + +error is glibc specific API, so this patch will mostly not accepted +upstream given that elfutils has been closely tied to glibc + +Upstream-Status: Inappropriate [workaround for musl] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + tools/elfdeps.c | 6 +++++- + tools/error.h | 27 +++++++++++++++++++++++++++ + 2 files changed, 32 insertions(+), 1 deletion(-) + create mode 100644 tools/error.h + +diff --git a/tools/elfdeps.c b/tools/elfdeps.c +index d205935bb..3a8945b33 100644 +--- a/tools/elfdeps.c ++++ b/tools/elfdeps.c +@@ -5,10 +5,14 @@ + #include <unistd.h> + #include <stdlib.h> + #include <fcntl.h> +-#include <error.h> + #include <errno.h> + #include <popt.h> + #include <gelf.h> ++#ifdef __GLIBC__ ++#include <error.h> ++#else ++#include "error.h" ++#endif + + #include <rpm/rpmstring.h> + #include <rpm/argv.h> +diff --git a/tools/error.h b/tools/error.h +new file mode 100644 +index 000000000..ef06827a0 +--- /dev/null ++++ b/tools/error.h +@@ -0,0 +1,27 @@ ++#ifndef _ERROR_H_ ++#define _ERROR_H_ ++ ++#include <stdarg.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <errno.h> ++ ++static unsigned int error_message_count = 0; ++ ++static inline void error(int status, int errnum, const char* format, ...) ++{ ++ va_list ap; ++ fprintf(stderr, "%s: ", program_invocation_name); ++ va_start(ap, format); ++ vfprintf(stderr, format, ap); ++ va_end(ap); ++ if (errnum) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ fprintf(stderr, "\n"); ++ error_message_count++; ++ if (status) ++ exit(status); ++} ++ ++#endif /* _ERROR_H_ */ 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 new file mode 100644 index 0000000000..b3dbc319b6 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch @@ -0,0 +1,72 @@ +From 383c0b097b7eba16801a9e3c4b8e36a4b6de74ab 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 + environment variable + +This is needed so that rpm can pick up target-specific configuration +from target rootfs instead of its own native sysroot. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + lib/rpmrc.c | 19 ++++++++++++++----- + 1 file changed, 14 insertions(+), 5 deletions(-) + +diff --git a/lib/rpmrc.c b/lib/rpmrc.c +index 19fe80f98..6b27b3941 100644 +--- a/lib/rpmrc.c ++++ b/lib/rpmrc.c +@@ -455,10 +455,14 @@ const char * lookupInDefaultTable(const char * name, + static void setDefaults(void) + { + const char *confdir = rpmConfigDir(); ++ const char *etcconfdir = getenv("RPM_ETCCONFIGDIR"); ++ if (etcconfdir == NULL) ++ etcconfdir = ""; ++ + if (!defrcfiles) { + defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", + confdir, "/" RPMCANONVENDOR "/rpmrc", ":", +- SYSCONFDIR "/rpmrc", ":"); ++ etcconfdir, SYSCONFDIR "/rpmrc", ":", NULL); + } + + #ifndef MACROFILES +@@ -468,9 +472,9 @@ static void setDefaults(void) + confdir, "/platform/%{_target}/macros", ":", + confdir, "/fileattrs/*.attr", ":", + confdir, "/" RPMCANONVENDOR "/macros", ":", +- SYSCONFDIR "/rpm/macros.*", ":", +- SYSCONFDIR "/rpm/macros", ":", +- SYSCONFDIR "/rpm/%{_target}/macros", ":"); ++ etcconfdir, SYSCONFDIR "/rpm/macros.*", ":", ++ etcconfdir, SYSCONFDIR "/rpm/macros", ":", ++ etcconfdir, SYSCONFDIR "/rpm/%{_target}/macros", ":", NULL); + } + #else + macrofiles = MACROFILES; +@@ -989,7 +993,11 @@ static void read_auxv(void) + */ + static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) + { +- const char * const platform_path = SYSCONFDIR "/rpm/platform"; ++ const char *etcconfdir = getenv("RPM_ETCCONFIGDIR"); ++ if (etcconfdir == NULL) ++ etcconfdir = ""; ++ ++ const char * const platform_path = rstrscat(NULL, etcconfdir, SYSCONFDIR "/rpm/platform", NULL); + static struct utsname un; + char * chptr; + canonEntry canon; +@@ -1286,6 +1294,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) + + if (arch) *arch = un.machine; + if (os) *os = un.sysname; ++ free(platform_path); + } + + static +-- +2.11.0 + diff --git a/meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch b/meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch new file mode 100644 index 0000000000..683b57d455 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch @@ -0,0 +1,64 @@ +From c4b1bee51bbdd732b94b431a951481af99117703 Mon Sep 17 00:00:00 2001 +From: Panu Matilainen <pmatilai@redhat.com> +Date: Thu, 30 Sep 2021 09:51:10 +0300 +Subject: [PATCH 2/3] Process MPI's from all kinds of signatures + +No immediate effect but needed by the following commits. + +CVE: CVE-2021-3521 +Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/b5e8bc74b] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +--- + rpmio/rpmpgp.c | 13 +++++-------- + 1 file changed, 5 insertions(+), 8 deletions(-) + +diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c +index 25f67048fd..509e777e6d 100644 +--- a/rpmio/rpmpgp.c ++++ b/rpmio/rpmpgp.c +@@ -543,7 +543,7 @@ pgpDigAlg pgpDigAlgFree(pgpDigAlg alg) + return NULL; + } + +-static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype, ++static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, + const uint8_t *p, const uint8_t *h, size_t hlen, + pgpDigParams sigp) + { +@@ -556,10 +556,8 @@ static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype, + int mpil = pgpMpiLen(p); + if (pend - p < mpil) + break; +- if (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT) { +- if (sigalg->setmpi(sigalg, i, p)) +- break; +- } ++ if (sigalg->setmpi(sigalg, i, p)) ++ break; + p += mpil; + } + +@@ -619,7 +617,7 @@ static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, + } + + p = ((uint8_t *)v) + sizeof(*v); +- rc = pgpPrtSigParams(tag, v->pubkey_algo, v->sigtype, p, h, hlen, _digp); ++ rc = pgpPrtSigParams(tag, v->pubkey_algo, p, h, hlen, _digp); + } break; + case 4: + { pgpPktSigV4 v = (pgpPktSigV4)h; +@@ -677,8 +675,7 @@ static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, + p += 2; + if (p > hend) + return 1; +- +- rc = pgpPrtSigParams(tag, v->pubkey_algo, v->sigtype, p, h, hlen, _digp); ++ rc = pgpPrtSigParams(tag, v->pubkey_algo, p, h, hlen, _digp); + } break; + default: + rpmlog(RPMLOG_WARNING, _("Unsupported version of signature: V%d\n"), version); +-- +2.17.1 + diff --git a/meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch b/meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch new file mode 100644 index 0000000000..a5ec802501 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch @@ -0,0 +1,329 @@ +From 07676ca03ad8afcf1ca95a2353c83fbb1d970b9b Mon Sep 17 00:00:00 2001 +From: Panu Matilainen <pmatilai@redhat.com> +Date: Thu, 30 Sep 2021 09:59:30 +0300 +Subject: [PATCH 3/3] Validate and require subkey binding signatures on PGP + public keys + +All subkeys must be followed by a binding signature by the primary key +as per the OpenPGP RFC, enforce the presence and validity in the parser. + +The implementation is as kludgey as they come to work around our +simple-minded parser structure without touching API, to maximise +backportability. Store all the raw packets internally as we decode them +to be able to access previous elements at will, needed to validate ordering +and access the actual data. Add testcases for manipulated keys whose +import previously would succeed. + +Depends on the two previous commits: +7b399fcb8f52566e6f3b4327197a85facd08db91 and +236b802a4aa48711823a191d1b7f753c82a89ec5 + +Fixes CVE-2021-3521. + +Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/bd36c5dc9] +CVE:CVE-2021-3521 + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +--- + rpmio/rpmpgp.c | 99 +++++++++++++++++-- + tests/Makefile.am | 3 + + tests/data/keys/CVE-2021-3521-badbind.asc | 25 +++++ + .../data/keys/CVE-2021-3521-nosubsig-last.asc | 25 +++++ + tests/data/keys/CVE-2021-3521-nosubsig.asc | 37 +++++++ + tests/rpmsigdig.at | 28 ++++++ + 6 files changed, 209 insertions(+), 8 deletions(-) + create mode 100644 tests/data/keys/CVE-2021-3521-badbind.asc + create mode 100644 tests/data/keys/CVE-2021-3521-nosubsig-last.asc + create mode 100644 tests/data/keys/CVE-2021-3521-nosubsig.asc + +diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c +index 509e777e6d..371ad4d9b6 100644 +--- a/rpmio/rpmpgp.c ++++ b/rpmio/rpmpgp.c +@@ -1061,33 +1061,116 @@ static pgpDigParams pgpDigParamsNew(uint8_t tag) + return digp; + } + ++static int hashKey(DIGEST_CTX hash, const struct pgpPkt *pkt, int exptag) ++{ ++ int rc = -1; ++ if (pkt->tag == exptag) { ++ uint8_t head[] = { ++ 0x99, ++ (pkt->blen >> 8), ++ (pkt->blen ), ++ }; ++ ++ rpmDigestUpdate(hash, head, 3); ++ rpmDigestUpdate(hash, pkt->body, pkt->blen); ++ rc = 0; ++ } ++ return rc; ++} ++ ++static int pgpVerifySelf(pgpDigParams key, pgpDigParams selfsig, ++ const struct pgpPkt *all, int i) ++{ ++ int rc = -1; ++ DIGEST_CTX hash = NULL; ++ ++ switch (selfsig->sigtype) { ++ case PGPSIGTYPE_SUBKEY_BINDING: ++ hash = rpmDigestInit(selfsig->hash_algo, 0); ++ if (hash) { ++ rc = hashKey(hash, &all[0], PGPTAG_PUBLIC_KEY); ++ if (!rc) ++ rc = hashKey(hash, &all[i-1], PGPTAG_PUBLIC_SUBKEY); ++ } ++ break; ++ default: ++ /* ignore types we can't handle */ ++ rc = 0; ++ break; ++ } ++ ++ if (hash && rc == 0) ++ rc = pgpVerifySignature(key, selfsig, hash); ++ ++ rpmDigestFinal(hash, NULL, NULL, 0); ++ ++ return rc; ++} ++ + int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype, + pgpDigParams * ret) + { + const uint8_t *p = pkts; + const uint8_t *pend = pkts + pktlen; + pgpDigParams digp = NULL; +- struct pgpPkt pkt; ++ pgpDigParams selfsig = NULL; ++ int i = 0; ++ int alloced = 16; /* plenty for normal cases */ ++ struct pgpPkt *all = xmalloc(alloced * sizeof(*all)); + int rc = -1; /* assume failure */ ++ int expect = 0; ++ int prevtag = 0; + + while (p < pend) { +- if (decodePkt(p, (pend - p), &pkt)) ++ struct pgpPkt *pkt = &all[i]; ++ if (decodePkt(p, (pend - p), pkt)) + break; + + if (digp == NULL) { +- if (pkttype && pkt.tag != pkttype) { ++ if (pkttype && pkt->tag != pkttype) { + break; + } else { +- digp = pgpDigParamsNew(pkt.tag); ++ digp = pgpDigParamsNew(pkt->tag); + } + } + +- if (pgpPrtPkt(&pkt, digp)) ++ if (expect) { ++ if (pkt->tag != expect) ++ break; ++ selfsig = pgpDigParamsNew(pkt->tag); ++ } ++ if (pgpPrtPkt(pkt, selfsig ? selfsig : digp)) + break; + +- p += (pkt.body - pkt.head) + pkt.blen; +- if (pkttype == PGPTAG_SIGNATURE) +- break; ++ if (selfsig) { ++ /* subkeys must be followed by binding signature */ ++ if (prevtag == PGPTAG_PUBLIC_SUBKEY) { ++ if (selfsig->sigtype != PGPSIGTYPE_SUBKEY_BINDING) ++ break; ++ } ++ ++ int xx = pgpVerifySelf(digp, selfsig, all, i); ++ ++ selfsig = pgpDigParamsFree(selfsig); ++ if (xx) ++ break; ++ expect = 0; ++ } ++ ++ if (pkt->tag == PGPTAG_PUBLIC_SUBKEY) ++ expect = PGPTAG_SIGNATURE; ++ prevtag = pkt->tag; ++ ++ i++; ++ p += (pkt->body - pkt->head) + pkt->blen; ++ if (pkttype == PGPTAG_SIGNATURE) ++ break; ++ ++ if (alloced <= i) { ++ alloced *= 2; ++ all = xrealloc(all, alloced * sizeof(*all)); ++ } ++ + } + + rc = (digp && (p == pend)) ? 0 : -1; +diff --git a/tests/Makefile.am b/tests/Makefile.am +index a41ce10de8..7bb23247f1 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -107,6 +107,9 @@ EXTRA_DIST += data/SPECS/hello-config-buildid.spec + EXTRA_DIST += data/SPECS/hello-cd.spec + EXTRA_DIST += data/keys/rpm.org-rsa-2048-test.pub + EXTRA_DIST += data/keys/rpm.org-rsa-2048-test.secret ++EXTRA_DIST += data/keys/CVE-2021-3521-badbind.asc ++EXTRA_DIST += data/keys/CVE-2022-3521-nosubsig.asc ++EXTRA_DIST += data/keys/CVE-2022-3521-nosubsig-last.asc + EXTRA_DIST += data/macros.testfile + EXTRA_DIST += data/macros.debug + EXTRA_DIST += data/SOURCES/foo.c +diff --git a/tests/data/keys/CVE-2021-3521-badbind.asc b/tests/data/keys/CVE-2021-3521-badbind.asc +new file mode 100644 +index 0000000000..aea00f9d7a +--- /dev/null ++++ b/tests/data/keys/CVE-2021-3521-badbind.asc +@@ -0,0 +1,25 @@ ++-----BEGIN PGP PUBLIC KEY BLOCK----- ++Version: rpm-4.17.90 (NSS-3) ++ ++mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g ++HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY ++91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8 ++eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas ++7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ ++1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl ++c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK ++CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf ++Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB ++BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr ++XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX ++fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq +++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN ++BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY ++zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz ++iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6 ++Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c ++KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m ++L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAE= ++=WCfs ++-----END PGP PUBLIC KEY BLOCK----- ++ +diff --git a/tests/data/keys/CVE-2021-3521-nosubsig-last.asc b/tests/data/keys/CVE-2021-3521-nosubsig-last.asc +new file mode 100644 +index 0000000000..aea00f9d7a +--- /dev/null ++++ b/tests/data/keys/CVE-2021-3521-nosubsig-last.asc +@@ -0,0 +1,25 @@ ++-----BEGIN PGP PUBLIC KEY BLOCK----- ++Version: rpm-4.17.90 (NSS-3) ++ ++mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g ++HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY ++91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8 ++eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas ++7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ ++1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl ++c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK ++CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf ++Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB ++BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr ++XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX ++fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq +++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN ++BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY ++zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz ++iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6 ++Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c ++KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m ++L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAE= ++=WCfs ++-----END PGP PUBLIC KEY BLOCK----- ++ +diff --git a/tests/data/keys/CVE-2021-3521-nosubsig.asc b/tests/data/keys/CVE-2021-3521-nosubsig.asc +new file mode 100644 +index 0000000000..3a2e7417f8 +--- /dev/null ++++ b/tests/data/keys/CVE-2021-3521-nosubsig.asc +@@ -0,0 +1,37 @@ ++-----BEGIN PGP PUBLIC KEY BLOCK----- ++Version: rpm-4.17.90 (NSS-3) ++ ++mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g ++HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY ++91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8 ++eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas ++7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ ++1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl ++c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK ++CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf ++Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB ++BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr ++XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX ++fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq +++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN ++BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY ++zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz ++iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6 ++Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c ++KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m ++L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAG5AQ0EWOY5GAEIAKT68NmshdC4 ++VcRhOhlXBvZq23NtskkKoPvW+ZlMuxbRDG48pGBtxhjOngriVUGceEWsXww5Q7En ++uRBYglkxkW34ENym0Ji6tsPYfhbbG+dZWKIL4vMIzPOIwlPrXrm558vgkdMM/ELZ ++8WIz3KtzvYubKUk2Qz+96lPXbwnlC/SBFRpBseJC5LoOb/5ZGdR/HeLz1JXiacHF ++v9Nr3cZWqg5yJbDNZKfASdZgC85v3kkvhTtzknl//5wqdAMexbuwiIh2xyxbO+B/ ++qqzZFrVmu3sV2Tj5lLZ/9p1qAuEM7ULbixd/ld8yTmYvQ4bBlKv2bmzXtVfF+ymB ++Tm6BzyQEl/MAEQEAAYkBHwQYAQgACQUCWOY5GAIbDAAKCRBDRFkeGWTF/PANB/9j ++mifmj6z/EPe0PJFhrpISt9PjiUQCt0IPtiL5zKAkWjHePIzyi+0kCTBF6DDLFxos ++3vN4bWnVKT1kBhZAQlPqpJTg+m74JUYeDGCdNx9SK7oRllATqyu+5rncgxjWVPnQ ++zu/HRPlWJwcVFYEVXYL8xzfantwQTqefjmcRmBRdA2XJITK+hGWwAmrqAWx+q5xX ++Pa8wkNMxVzNS2rUKO9SoVuJ/wlUvfoShkJ/VJ5HDp3qzUqncADfdGN35TDzscngQ ++gHvnMwVBfYfSCABV1hNByoZcc/kxkrWMmsd/EnIyLd1Q1baKqc3cEDuC6E6/o4yJ ++E4XX4jtDmdZPreZALsiB ++=rRop ++-----END PGP PUBLIC KEY BLOCK----- ++ +diff --git a/tests/rpmsigdig.at b/tests/rpmsigdig.at +index 8e7c759b8f..e2d30a7f1b 100644 +--- a/tests/rpmsigdig.at ++++ b/tests/rpmsigdig.at +@@ -2,6 +2,34 @@ + + AT_BANNER([RPM signatures and digests]) + ++AT_SETUP([rpmkeys --import invalid keys]) ++AT_KEYWORDS([rpmkeys import]) ++RPMDB_INIT ++ ++AT_CHECK([ ++runroot rpmkeys --import /data/keys/CVE-2021-3521-badbind.asc ++], ++[1], ++[], ++[error: /data/keys/CVE-2021-3521-badbind.asc: key 1 import failed.] ++) ++AT_CHECK([ ++runroot rpmkeys --import /data/keys/CVE-2021-3521-nosubsig.asc ++], ++[1], ++[], ++[error: /data/keys/CVE-2021-3521-nosubsig.asc: key 1 import failed.] ++) ++ ++AT_CHECK([ ++runroot rpmkeys --import /data/keys/CVE-2021-3521-nosubsig-last.asc ++], ++[1], ++[], ++[error: /data/keys/CVE-2021-3521-nosubsig-last.asc: key 1 import failed.] ++) ++AT_CLEANUP ++ + # ------------------------------ + # Test pre-built package verification + AT_SETUP([rpmkeys -Kv <unsigned> 1]) +-- +2.17.1 + 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 new file mode 100644 index 0000000000..43e9859ef3 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch @@ -0,0 +1,55 @@ +From 989e425d416474c191b020d0825895e3df4bd033 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 + from DEBUG + +That way we can debug scriptlet failures without writing lots of +irrelevant noise to rootfs logs. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + lib/rpmscript.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/lib/rpmscript.c b/lib/rpmscript.c +index 2b0e43862..e319673f1 100644 +--- a/lib/rpmscript.c ++++ b/lib/rpmscript.c +@@ -226,7 +226,7 @@ static char * writeScript(const char *cmd, const char *script) + if (Ferror(fd)) + goto exit; + +- if (rpmIsDebug() && (rstreq(cmd, "/bin/sh") || rstreq(cmd, "/bin/bash"))) { ++ if (rpmIsVerbose() && (rstreq(cmd, "/bin/sh") || rstreq(cmd, "/bin/bash"))) { + 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, + char *mline = NULL; + rpmRC rc = RPMRC_FAIL; + +- rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname); ++ rpmlog(RPMLOG_INFO, "%s: scriptlet start\n", sname); + + if (script) { + fn = writeScript(*argvp[0], script); +@@ -310,7 +310,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, + sname, strerror(errno)); + goto exit; + } else if (pid == 0) {/* Child */ +- rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n", ++ rpmlog(RPMLOG_INFO, "%s: execv(%s) pid %d\n", + sname, *argvp[0], (unsigned)getpid()); + + fclose(in); +@@ -353,7 +353,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, + reaped = waitpid(pid, &status, 0); + } while (reaped == -1 && errno == EINTR); + +- rpmlog(RPMLOG_DEBUG, "%s: waitpid(%d) rc %d status %x\n", ++ rpmlog(RPMLOG_INFO, "%s: waitpid(%d) rc %d status %x\n", + sname, (unsigned)pid, (unsigned)reaped, status); + + if (reaped < 0) { diff --git a/meta/recipes-devtools/rpm/files/environment.d-rpm.sh b/meta/recipes-devtools/rpm/files/environment.d-rpm.sh new file mode 100644 index 0000000000..9b669a18d1 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/environment.d-rpm.sh @@ -0,0 +1 @@ +export RPM_CONFIGDIR="$OECORE_NATIVE_SYSROOT/usr/lib/rpm" diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch deleted file mode 100644 index b877870411..0000000000 --- a/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch +++ /dev/null @@ -1,20 +0,0 @@ -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Saul Wold <sgw@linux.intel.com> -Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> - -diff --git a/python/rpmmodule.c b/python/rpmmodule.c -index a4fe217..728c66c 100644 ---- a/python/rpmmodule.c -+++ b/python/rpmmodule.c -@@ -396,6 +396,10 @@ static int initModule(PyObject *m) - REGISTER_ENUM(RPMSENSE_STRONG); - REGISTER_ENUM(RPMSENSE_CONFIG); - -+#if defined(RPM_VENDOR_OE) -+ REGISTER_ENUM(RPMSENSE_MISSINGOK); -+#endif -+ - REGISTER_ENUM(RPMTRANS_FLAG_TEST); - REGISTER_ENUM(RPMTRANS_FLAG_BUILD_PROBS); - REGISTER_ENUM(RPMTRANS_FLAG_NOSCRIPTS); diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch deleted file mode 100644 index 7a646de373..0000000000 --- a/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch +++ /dev/null @@ -1,23 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Saul Wold <sgw@linux.intel.com> -Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> - - -Index: rpm-4.11.2/build/pack.c -=================================================================== ---- rpm-4.11.2.orig/build/pack.c -+++ rpm-4.11.2/build/pack.c -@@ -571,9 +571,9 @@ rpmRC packageBinaries(rpmSpec spec, cons - headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); - } - -- if (cheating) { -- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); -- } -+// if (cheating) { -+// (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); -+// } - - { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL); - char *binRpm, *binDir; diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch deleted file mode 100644 index be0626c8b3..0000000000 --- a/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch +++ /dev/null @@ -1,19 +0,0 @@ -Upstream-Status: Inappropriate [OE-Core specific] - -Signed-off-by: Saul Wold <sgw@linux.intel.com> -Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> - - -diff --git a/installplatform b/installplatform -index 8c3eba0..fa15e91 100755 ---- a/installplatform -+++ b/installplatform -@@ -112,7 +112,7 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do - [ -z "$CANONARCH" ] && continue - - if [ "$OS" = "linux" ] && [ "$CANONCOLOR" = 3 ]; then -- LIB=${LIB}64 -+ LIB=${LIB} - fi - - PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}" diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh b/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh deleted file mode 100755 index 083b174f17..0000000000 --- a/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -[ $# -ge 1 ] || { - cat > /dev/null - exit 0 -} - -case $1 in --R|--requires) - shift - grep "/usr/\(lib[^/]*\|share\)/python[^/]*/" >/dev/null && echo "python" - exit 0 - ;; -esac - -exit 0 diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch deleted file mode 100644 index 2640e54b5b..0000000000 --- a/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch +++ /dev/null @@ -1,26 +0,0 @@ - -Disable configuring the db3 directory since we will be using the -external DB provided as part of OE-Core already, no need to have -duplicate database code. - -Upstream-Status: Inappropriate [OE-Core Specific] - -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: rpm-4.11.2/configure.ac -=================================================================== ---- rpm-4.11.2.orig/configure.ac -+++ rpm-4.11.2/configure.ac -@@ -825,9 +825,9 @@ AC_SUBST(RPMCONFIGDIR) - - AC_SUBST(OBJDUMP) - --if test "$with_external_db" = no; then -- AC_CONFIG_SUBDIRS(db3) --fi -+#if test "$with_external_db" = no; then -+# AC_CONFIG_SUBDIRS(db3) -+#fi - - AM_CONDITIONAL([WITH_INTERNAL_DB],[test "$with_external_db" = no]) - AM_CONDITIONAL([DOXYGEN],[test "$DOXYGEN" != no]) diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch deleted file mode 100644 index f1ecab7b0e..0000000000 --- a/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch +++ /dev/null @@ -1,23 +0,0 @@ -Upstream-Status: Pending - -Signed-off-by: Saul Wold <sgw@linux.intel.com> -Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> - - -Index: rpm-4.11.2/build/files.c -=================================================================== ---- rpm-4.11.2.orig/build/files.c -+++ rpm-4.11.2/build/files.c -@@ -1321,12 +1321,6 @@ static rpmRC addFile(FileList fl, const - } - } - -- /* Error out when a non-directory is specified as one in spec */ -- if (fl->cur.isDir && (statp == &statbuf) && !S_ISDIR(statp->st_mode)) { -- rpmlog(RPMLOG_ERR, _("Not a directory: %s\n"), diskPath); -- goto exit; -- } -- - /* Don't recurse into explicit %dir, don't double-recurse from fts */ - if ((fl->cur.isDir != 1) && (statp == &statbuf) && S_ISDIR(statp->st_mode)) { - return recurseDir(fl, diskPath); diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch deleted file mode 100644 index 9333dea441..0000000000 --- a/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch +++ /dev/null @@ -1,194 +0,0 @@ -Upstream-Status: Inappropriate [OE-Core] - -Signed-off-by: Saul Wold <sgw@linux.intel.com> -Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> - - -Index: rpm-4.11.2/lib/psm.c -=================================================================== ---- rpm-4.11.2.orig/lib/psm.c -+++ rpm-4.11.2/lib/psm.c -@@ -421,7 +421,8 @@ static rpmRC runScript(rpmpsm psm, ARGV_ - - rpmswEnter(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); - rc = rpmScriptRun(script, arg1, arg2, sfd, -- prefixes, warn_only, selinux); -+ prefixes, warn_only, selinux, rpmtsRootDir(psm->ts) ); -+ - rpmswExit(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); - - /* Map warn-only errors to "notfound" for script stop callback */ -@@ -958,15 +959,49 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg - case PSM_DESTROY: - break; - case PSM_SCRIPT: /* Run current package scriptlets. */ -+#ifdef RPM_VENDOR_OE -+ { -+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); -+ if (scriptletWrapper && *scriptletWrapper) -+ (void) rpmChrootOut(); -+#endif -+ - rc = runInstScript(psm); -+#ifdef RPM_VENDOR_OE -+ if (scriptletWrapper && *scriptletWrapper) -+ (void) rpmChrootIn(); -+ } -+#endif - break; - case PSM_TRIGGERS: - /* Run triggers in other package(s) this package sets off. */ -+#ifdef RPM_VENDOR_OE -+ { -+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); -+ if (scriptletWrapper && *scriptletWrapper) -+ (void) rpmChrootOut(); -+#endif - rc = runTriggers(psm); -+#ifdef RPM_VENDOR_OE -+ if (scriptletWrapper && *scriptletWrapper) -+ (void) rpmChrootIn(); -+ } -+#endif - break; - case PSM_IMMED_TRIGGERS: - /* Run triggers in this package other package(s) set off. */ -+#ifdef RPM_VENDOR_OE -+ { -+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); -+ if (scriptletWrapper && *scriptletWrapper) -+ (void) rpmChrootOut(); -+#endif - rc = runImmedTriggers(psm); -+#ifdef RPM_VENDOR_OE -+ if (scriptletWrapper && *scriptletWrapper) -+ (void) rpmChrootIn(); -+ } -+#endif - break; - - case PSM_RPMDB_ADD: { -Index: rpm-4.11.2/lib/rpmscript.c -=================================================================== ---- rpm-4.11.2.orig/lib/rpmscript.c -+++ rpm-4.11.2/lib/rpmscript.c -@@ -92,7 +92,7 @@ static rpmRC runLuaScript(int selinux, A - static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin"; - - static void doScriptExec(int selinux, ARGV_const_t argv, ARGV_const_t prefixes, -- FD_t scriptFd, FD_t out) -+ FD_t scriptFd, FD_t out, char * rootDir ) - { - int pipes[2]; - int flag; -@@ -158,13 +158,12 @@ static void doScriptExec(int selinux, AR - setenv("RPM_INSTALL_PREFIX", *pf, 1); - } - } -- -- if (chdir("/") == 0) { -+ if (chdir(rootDir) == 0) { - /* XXX Don't mtrace into children. */ - unsetenv("MALLOC_CHECK_"); - - /* Permit libselinux to do the scriptlet exec. */ -- if (selinux == 1) { -+ if (selinux == 1) { - xx = rpm_execcon(0, argv[0], argv, environ); - } - -@@ -175,12 +174,12 @@ static void doScriptExec(int selinux, AR - _exit(127); /* exit 127 for compatibility with bash(1) */ - } - --static char * writeScript(const char *cmd, const char *script) -+static char * writeScript(const char *cmd, const char *script, char * rootDir) - { - char *fn = NULL; - size_t slen = strlen(script); - int ok = 0; -- FD_t fd = rpmMkTempFile("/", &fn); -+ FD_t fd = rpmMkTempFile(rootDir, &fn); - - if (Ferror(fd)) - goto exit; -@@ -204,7 +203,7 @@ exit: - */ - static rpmRC runExtScript(int selinux, ARGV_const_t prefixes, - const char *sname, rpmlogLvl lvl, FD_t scriptFd, -- ARGV_t * argvp, const char *script, int arg1, int arg2) -+ ARGV_t * argvp, const char *script, int arg1, int arg2,char * rootDir) - { - FD_t out = NULL; - char * fn = NULL; -@@ -215,7 +214,7 @@ static rpmRC runExtScript(int selinux, A - rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname); - - if (script) { -- fn = writeScript(*argvp[0], script); -+ fn = writeScript(*argvp[0], script, rootDir); - if (fn == NULL) { - rpmlog(RPMLOG_ERR, - _("Couldn't create temporary file for %s: %s\n"), -@@ -258,7 +257,7 @@ static rpmRC runExtScript(int selinux, A - } else if (pid == 0) {/* Child */ - rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n", - sname, *argvp[0], (unsigned)getpid()); -- doScriptExec(selinux, *argvp, prefixes, scriptFd, out); -+ doScriptExec(selinux, *argvp, prefixes, scriptFd, out, rootDir); - } - - do { -@@ -297,13 +296,27 @@ exit: - } - - rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, -- ARGV_const_t prefixes, int warn_only, int selinux) -+ ARGV_const_t prefixes, int warn_only, int selinux, char * rootDir) - { - ARGV_t args = NULL; - rpmlogLvl lvl = warn_only ? RPMLOG_WARNING : RPMLOG_ERR; - rpmRC rc; -- -- if (script == NULL) return RPMRC_OK; -+#ifdef RPM_VENDOR_OE -+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); -+#endif -+ -+ if (script == NULL) return RPMRC_OK; -+#ifdef RPM_VENDOR_OE -+ if (scriptletWrapper && *scriptletWrapper) { -+ argvAdd(&args, scriptletWrapper); -+ -+ if ( rootDir ) { -+ argvAdd(&args, rootDir); -+ } else { -+ argvAdd(&args, "/"); -+ } -+ } -+#endif - - /* construct a new argv as we can't modify the one from header */ - if (script->args) { -@@ -315,7 +328,7 @@ rpmRC rpmScriptRun(rpmScript script, int - if (rstreq(args[0], "<lua>")) { - rc = runLuaScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2); - } else { -- rc = runExtScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2); -+ rc = runExtScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, rootDir); - } - argvFree(args); - -Index: rpm-4.11.2/lib/rpmscript.h -=================================================================== ---- rpm-4.11.2.orig/lib/rpmscript.h -+++ rpm-4.11.2/lib/rpmscript.h -@@ -29,7 +29,7 @@ rpmScript rpmScriptFree(rpmScript script - - RPM_GNUC_INTERNAL - rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd, -- ARGV_const_t prefixes, int warn_only, int selinux); -+ ARGV_const_t prefixes, int warn_only, int selinux, char * rootDir); - - RPM_GNUC_INTERNAL - rpmTagVal rpmScriptTag(rpmScript script); diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch deleted file mode 100644 index 3da608573a..0000000000 --- a/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch +++ /dev/null @@ -1,384 +0,0 @@ - -Upstream-Status: Pending - -Signed-off-by: Saul Wold <sgw@linux.intel.com> -Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> - -diff --git a/build/pack.c b/build/pack.c -index b6b2bea..5c3d8df 100644 ---- a/build/pack.c -+++ b/build/pack.c -@@ -273,8 +273,10 @@ static rpmTagVal depevrtags[] = { - RPMTAG_CONFLICTVERSION, - RPMTAG_ORDERVERSION, - RPMTAG_TRIGGERVERSION, -- RPMTAG_SUGGESTSVERSION, -- RPMTAG_ENHANCESVERSION, -+ RPMTAG_SUGGESTVERSION, -+ RPMTAG_ENHANCEVERSION, -+ RPMTAG_RECOMMENDVERSION, -+ RPMTAG_SUPPLEMENTVERSION, - 0 - }; - -diff --git a/build/parsePreamble.c b/build/parsePreamble.c -index 5772bef..cbbbee3 100644 ---- a/build/parsePreamble.c -+++ b/build/parsePreamble.c -@@ -821,6 +821,10 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag, - } - /* fallthrough */ - case RPMTAG_PREREQ: -+ case RPMTAG_RECOMMENDFLAGS: -+ case RPMTAG_SUGGESTFLAGS: -+ case RPMTAG_SUPPLEMENTFLAGS: -+ case RPMTAG_ENHANCEFLAGS: - case RPMTAG_CONFLICTFLAGS: - case RPMTAG_OBSOLETEFLAGS: - case RPMTAG_PROVIDEFLAGS: -@@ -922,6 +926,10 @@ static struct PreambleRec_s const preambleList[] = { - {RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")}, - {RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")}, - {RPMTAG_REQUIREFLAGS, 2, 0, LEN_AND_STR("requires")}, -+ {RPMTAG_RECOMMENDFLAGS, 0, 0, LEN_AND_STR("recommends")}, -+ {RPMTAG_SUGGESTFLAGS, 0, 0, LEN_AND_STR("suggests")}, -+ {RPMTAG_SUPPLEMENTFLAGS, 0, 0, LEN_AND_STR("supplements")}, -+ {RPMTAG_ENHANCEFLAGS, 0, 0, LEN_AND_STR("enhances")}, - {RPMTAG_PREREQ, 2, 1, LEN_AND_STR("prereq")}, - {RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")}, - {RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")}, -diff --git a/build/parseReqs.c b/build/parseReqs.c -index ba080a1..1427111 100644 ---- a/build/parseReqs.c -+++ b/build/parseReqs.c -@@ -61,6 +61,18 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN, - nametag = RPMTAG_REQUIRENAME; - tagflags |= RPMSENSE_ANY; - break; -+ case RPMTAG_RECOMMENDFLAGS: -+ nametag = RPMTAG_RECOMMENDNAME; -+ break; -+ case RPMTAG_SUGGESTFLAGS: -+ nametag = RPMTAG_SUGGESTNAME; -+ break; -+ case RPMTAG_SUPPLEMENTFLAGS: -+ nametag = RPMTAG_SUPPLEMENTNAME; -+ break; -+ case RPMTAG_ENHANCEFLAGS: -+ nametag = RPMTAG_ENHANCENAME; -+ break; - case RPMTAG_PROVIDEFLAGS: - nametag = RPMTAG_PROVIDENAME; - break; -diff --git a/build/reqprov.c b/build/reqprov.c -index a368f42..c270af6 100644 ---- a/build/reqprov.c -+++ b/build/reqprov.c -@@ -81,6 +81,30 @@ int addReqProv(Package pkg, rpmTagVal tagN, - extra = Flags & RPMSENSE_TRIGGER; - dsp = &pkg->triggers; - break; -+ case RPMTAG_RECOMMENDNAME: -+ versiontag = RPMTAG_RECOMMENDVERSION; -+ flagtag = RPMTAG_RECOMMENDFLAGS; -+ extra = Flags & _ALL_REQUIRES_MASK; -+ dsp = &pkg->recommends; -+ break; -+ case RPMTAG_SUGGESTNAME: -+ versiontag = RPMTAG_SUGGESTVERSION; -+ flagtag = RPMTAG_SUGGESTFLAGS; -+ extra = Flags & _ALL_REQUIRES_MASK; -+ dsp = &pkg->suggests; -+ break; -+ case RPMTAG_SUPPLEMENTNAME: -+ versiontag = RPMTAG_SUPPLEMENTVERSION; -+ flagtag = RPMTAG_SUPPLEMENTFLAGS; -+ extra = Flags & _ALL_REQUIRES_MASK; -+ dsp = &pkg->supplements; -+ break; -+ case RPMTAG_ENHANCENAME: -+ versiontag = RPMTAG_ENHANCEVERSION; -+ flagtag = RPMTAG_ENHANCEFLAGS; -+ extra = Flags & _ALL_REQUIRES_MASK; -+ dsp = &pkg->enhances; -+ break; - case RPMTAG_REQUIRENAME: - default: - tagN = RPMTAG_REQUIRENAME; -diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h -index a9e4c7c..0a1977f 100644 ---- a/build/rpmbuild_internal.h -+++ b/build/rpmbuild_internal.h -@@ -93,6 +93,10 @@ struct Package_s { - rpmds ds; /*!< Requires: N = EVR */ - rpmds requires; - rpmds provides; -+ rpmds recommends; -+ rpmds suggests; -+ rpmds supplements; -+ rpmds enhances; - rpmds conflicts; - rpmds obsoletes; - rpmds triggers; -diff --git a/build/spec.c b/build/spec.c -index 703ec78..7ae2120 100644 ---- a/build/spec.c -+++ b/build/spec.c -@@ -139,6 +139,11 @@ static Package freePackage(Package pkg) - pkg->ds = rpmdsFree(pkg->ds); - pkg->requires = rpmdsFree(pkg->requires); - pkg->provides = rpmdsFree(pkg->provides); -+ pkg->recommends = rpmdsFree(pkg->recommends); -+ pkg->suggests = rpmdsFree(pkg->suggests); -+ pkg->supplements = rpmdsFree(pkg->supplements); -+ pkg->enhances = rpmdsFree(pkg->enhances); -+ - pkg->conflicts = rpmdsFree(pkg->conflicts); - pkg->obsoletes = rpmdsFree(pkg->obsoletes); - pkg->triggers = rpmdsFree(pkg->triggers); -diff --git a/lib/rpmds.c b/lib/rpmds.c -index 7a51167..1e5dda0 100644 ---- a/lib/rpmds.c -+++ b/lib/rpmds.c -@@ -52,6 +52,22 @@ static int dsType(rpmTagVal tag, - t = "Requires"; - evr = RPMTAG_REQUIREVERSION; - f = RPMTAG_REQUIREFLAGS; -+ } else if (tag == RPMTAG_SUPPLEMENTNAME) { -+ t = "Supplements"; -+ evr = RPMTAG_SUPPLEMENTVERSION; -+ f = RPMTAG_SUPPLEMENTFLAGS; -+ } else if (tag == RPMTAG_ENHANCENAME) { -+ t = "Enhances"; -+ evr = RPMTAG_ENHANCEVERSION; -+ f = RPMTAG_ENHANCEFLAGS; -+ } else if (tag == RPMTAG_RECOMMENDNAME) { -+ t = "Recommends"; -+ evr = RPMTAG_RECOMMENDVERSION; -+ f = RPMTAG_RECOMMENDFLAGS; -+ } else if (tag == RPMTAG_SUGGESTNAME) { -+ t = "Suggests"; -+ evr = RPMTAG_SUGGESTVERSION; -+ f = RPMTAG_SUGGESTFLAGS; - } else if (tag == RPMTAG_CONFLICTNAME) { - t = "Conflicts"; - evr = RPMTAG_CONFLICTVERSION; -diff --git a/lib/rpmtag.h b/lib/rpmtag.h -index 64b03f1..b943229 100644 ---- a/lib/rpmtag.h -+++ b/lib/rpmtag.h -@@ -217,14 +217,14 @@ typedef enum rpmTag_e { - RPMTAG_PRETRANSPROG = 1153, /* s[] */ - RPMTAG_POSTTRANSPROG = 1154, /* s[] */ - RPMTAG_DISTTAG = 1155, /* s */ -- RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemented) */ --#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemented) */ -- RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension (unimplemented) */ -- RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension (unimplemented) */ -- RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder (unimplemented) */ --#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] (unimplemented) */ -- RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder (unimplemented) */ -- RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension placeholder (unimplemented) */ -+ RPMTAG_OLDSUGGESTSNAME = 1156, /* s[] (unimplemented) */ -+#define RPMTAG_OLDSUGGESTS RPMTAG_OLDSUGGESTSNAME /* s[] (unimplemented) */ -+ RPMTAG_OLDSUGGESTSVERSION = 1157, /* s[] (unimplemented) */ -+ RPMTAG_OLDSUGGESTSFLAGS = 1158, /* i[] (unimplemented) */ -+ RPMTAG_OLDENHANCESNAME = 1159, /* s[] (unimplemented) */ -+#define RPMTAG_OLDENHANCES RPMTAG_OLDENHANCESNAME /* s[] (unimplemented) */ -+ RPMTAG_OLDENHANCESVERSION = 1160, /* s[] (unimplemented) */ -+ RPMTAG_OLDENHANCESFLAGS = 1161, /* i[] (unimplemented) */ - RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */ - RPMTAG_CVSID = 1163, /* s (unimplemented) */ - #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ -@@ -261,6 +261,7 @@ typedef enum rpmTag_e { - RPMTAG_BUILDOBSOLETES = 1194, /* internal (unimplemented) */ - RPMTAG_DBINSTANCE = 1195, /* i extension */ - RPMTAG_NVRA = 1196, /* s extension */ -+ - /* tags 1997-4999 reserved */ - RPMTAG_FILENAMES = 5000, /* s[] extension */ - RPMTAG_FILEPROVIDE = 5001, /* s[] extension */ -@@ -307,6 +308,26 @@ typedef enum rpmTag_e { - RPMTAG_OBSOLETENEVRS = 5043, /* s[] extension */ - RPMTAG_CONFLICTNEVRS = 5044, /* s[] extension */ - RPMTAG_FILENLINKS = 5045, /* i[] extension */ -+ RPMTAG_RECOMMENDNAME = 5046, /* s[] */ -+#define RPMTAG_RECOMMENDS RPMTAG_RECOMMENDNAME /* s[] */ -+ RPMTAG_RECOMMENDVERSION = 5047, /* s[] */ -+ RPMTAG_RECOMMENDFLAGS = 5048, /* i[] */ -+ RPMTAG_SUGGESTNAME = 5049, /* s[] */ -+#define RPMTAG_SUGGESTS RPMTAG_SUGGESTNAME /* s[] */ -+ RPMTAG_SUGGESTVERSION = 5050, /* s[] extension */ -+ RPMTAG_SUGGESTFLAGS = 5051, /* i[] extension */ -+ RPMTAG_SUPPLEMENTNAME = 5052, /* s[] */ -+#define RPMTAG_SUPPLEMENTS RPMTAG_SUPPLEMENTNAME /* s[] */ -+ RPMTAG_SUPPLEMENTVERSION = 5053, /* s[] */ -+ RPMTAG_SUPPLEMENTFLAGS = 5054, /* i[] */ -+ RPMTAG_ENHANCENAME = 5055, /* s[] */ -+#define RPMTAG_ENHANCES RPMTAG_ENHANCENAME /* s[] */ -+ RPMTAG_ENHANCEVERSION = 5056, /* s[] */ -+ RPMTAG_ENHANCEFLAGS = 5057, /* i[] */ -+ RPMTAG_RECOMMENDNEVRS = 5058, /* s[] extension */ -+ RPMTAG_SUGGESTNEVRS = 5059, /* s[] extension */ -+ RPMTAG_SUPPLEMENTNEVRS = 5060, /* s[] extension */ -+ RPMTAG_ENHANCENEVRS = 5061, /* s[] extension */ - - RPMTAG_FIRSTFREE_TAG /*!< internal */ - } rpmTag; -diff --git a/lib/tagexts.c b/lib/tagexts.c -index 29b2bae..e940310 100644 ---- a/lib/tagexts.c -+++ b/lib/tagexts.c -@@ -761,6 +761,26 @@ static int requirenevrsTag(Header h, rpmtd td, headerGetFlags hgflags) - return depnevrsTag(h, td, hgflags, RPMTAG_REQUIRENAME); - } - -+static int recommendnevrsTag(Header h, rpmtd td, headerGetFlags hgflags) -+{ -+ return depnevrsTag(h, td, hgflags, RPMTAG_RECOMMENDNAME); -+} -+ -+static int suggestnevrsTag(Header h, rpmtd td, headerGetFlags hgflags) -+{ -+ return depnevrsTag(h, td, hgflags, RPMTAG_SUGGESTNAME); -+} -+ -+static int supplementnevrsTag(Header h, rpmtd td, headerGetFlags hgflags) -+{ -+ return depnevrsTag(h, td, hgflags, RPMTAG_SUPPLEMENTNAME); -+} -+ -+static int enhancenevrsTag(Header h, rpmtd td, headerGetFlags hgflags) -+{ -+ return depnevrsTag(h, td, hgflags, RPMTAG_ENHANCENAME); -+} -+ - static int providenevrsTag(Header h, rpmtd td, headerGetFlags hgflags) - { - return depnevrsTag(h, td, hgflags, RPMTAG_PROVIDENAME); -@@ -823,6 +843,10 @@ static const struct headerTagFunc_s rpmHeaderTagExtensions[] = { - { RPMTAG_EPOCHNUM, epochnumTag }, - { RPMTAG_INSTFILENAMES, instfilenamesTag }, - { RPMTAG_REQUIRENEVRS, requirenevrsTag }, -+ { RPMTAG_RECOMMENDNEVRS, recommendnevrsTag}, -+ { RPMTAG_SUGGESTNEVRS, suggestnevrsTag}, -+ { RPMTAG_SUPPLEMENTNEVRS, supplementnevrsTag}, -+ { RPMTAG_ENHANCENEVRS, enhancenevrsTag}, - { RPMTAG_PROVIDENEVRS, providenevrsTag }, - { RPMTAG_OBSOLETENEVRS, obsoletenevrsTag }, - { RPMTAG_CONFLICTNEVRS, conflictnevrsTag }, -diff --git a/rpmpopt.in b/rpmpopt.in -index 805599e..036ab4e 100644 ---- a/rpmpopt.in -+++ b/rpmpopt.in -@@ -67,6 +67,19 @@ rpm alias --requires --qf \ - --POPTdesc=$"list capabilities required by package(s)" - rpm alias -R --requires - -+rpm alias --recommends --qf \ -+ "[%|VERBOSE?{%{RECOMMENDFLAGS:deptype}: }:{}|%{RECOMMENDNEVRS}\n]" \ -+ --POPTdesc=$"list capabilities recommended by package(s)" -+rpm alias --suggests --qf \ -+ "[%|VERBOSE?{%{SUGGESTFLAGS:deptype}: }:{}|%{SUGGESTNEVRS}\n]" \ -+ --POPTdesc=$"list capabilities suggested by package(s)" -+rpm alias --supplements --qf \ -+ "[%|VERBOSE?{%{SUPPLEMENTFLAGS:deptype}: }:{}|%{SUPPLEMENTNEVRS}\n]" \ -+ --POPTdesc=$"list capabilities supplemented by package(s)" -+rpm alias --enhances --qf \ -+ "[%|VERBOSE?{%{ENHANCEFLAGS:deptype}: }:{}|%{ENHANCENEVRS}\n]" \ -+ --POPTdesc=$"list capabilities enhanced by package(s)" -+ - rpm alias --info --qf '\ - Name : %{NAME}\n\ - %|EPOCH?{Epoch : %{EPOCH}\n}|\ -diff --git a/tests/data/SPECS/deptest.spec b/tests/data/SPECS/deptest.spec -index cb4cbbd..7c47f6d 100644 ---- a/tests/data/SPECS/deptest.spec -+++ b/tests/data/SPECS/deptest.spec -@@ -10,6 +10,10 @@ BuildArch: noarch - %{?provs:Provides: %{provs}} - %{?cfls:Conflicts: %{cfls}} - %{?obs:Obsoletes: %{obs}} -+%{?recs:Recommends: %{recs}} -+%{?sugs:Suggests: %{sugs}} -+%{?sups:Supplements: %{sups}} -+%{?ens:Enhances: %{ens}} - - %description - %{summary} -diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at -index 6230903..c4c954c 100644 ---- a/tests/rpmbuild.at -+++ b/tests/rpmbuild.at -@@ -185,3 +185,25 @@ lrwxrwxrwx /opt/globtest/linkgood - ], - []) - AT_CLEANUP -+ -+# ------------------------------ -+# Check if weak and reverse requires can be built -+AT_SETUP([Weak and reverse requires]) -+AT_KEYWORDS([build]) -+AT_CHECK([ -+ -+runroot rpmbuild -bb --quiet \ -+ --define "pkg weakdeps" \ -+ --define "recs foo > 1.2.3" \ -+ --define "sugs bar >= 0.1.2" \ -+ --define "sups baz" \ -+ --define "ens zap = 3" \ -+ /data/SPECS/deptest.spec -+ -+runroot rpm -qp --qf "[%{supplementname}\n]" /build/RPMS/noarch/deptest-weakdeps-1.0-1.noarch.rpm -+], -+[0], -+[baz -+], -+[ignore]) -+AT_CLEANUP -diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at -index 13131e2..80cca63 100644 ---- a/tests/rpmgeneral.at -+++ b/tests/rpmgeneral.at -@@ -79,6 +79,11 @@ DISTTAG - DISTURL - DSAHEADER - E -+ENHANCEFLAGS -+ENHANCENAME -+ENHANCENEVRS -+ENHANCES -+ENHANCEVERSION - EPOCH - EPOCHNUM - EVR -@@ -199,6 +204,11 @@ PROVIDES - PROVIDEVERSION - PUBKEYS - R -+RECOMMENDFLAGS -+RECOMMENDNAME -+RECOMMENDNEVRS -+RECOMMENDS -+RECOMMENDVERSION - RECONTEXTS - RELEASE - REMOVETID -@@ -219,7 +229,17 @@ SOURCE - SOURCEPACKAGE - SOURCEPKGID - SOURCERPM -+SUGGESTFLAGS -+SUGGESTNAME -+SUGGESTNEVRS -+SUGGESTS -+SUGGESTVERSION - SUMMARY -+SUPPLEMENTFLAGS -+SUPPLEMENTNAME -+SUPPLEMENTNEVRS -+SUPPLEMENTS -+SUPPLEMENTVERSION - TRIGGERCONDS - TRIGGERFLAGS - TRIGGERINDEX diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch deleted file mode 100644 index 8d84cf8a11..0000000000 --- a/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch +++ /dev/null @@ -1,38 +0,0 @@ - -Use pkgconfig to get the correct include paths - -Upstream-Status: Pending - -Signed-off-by: Saul Wold <sgw@linux.intel.com> -Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> - -diff --git a/configure.ac b/configure.ac -index e97f727..8179f44 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -540,10 +540,10 @@ esac], - - AS_IF([test "$enable_python" = yes],[ - AM_PATH_PYTHON([2.6],[ -- WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_inc())'` -+ WITH_PYTHON_INCLUDE=$(${PKG_CONFIG} --cflags-only-I python) - WITH_PYTHON_SUBPACKAGE=1 - save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS -I$WITH_PYTHON_INCLUDE" -+ CPPFLAGS="$CPPFLAGS $WITH_PYTHON_INCLUDE" - AC_CHECK_HEADER([Python.h],[], - [AC_MSG_ERROR([missing Python.h]) - ]) -diff --git a/python/Makefile.am b/python/Makefile.am -index fff51ae..f37cb9d 100644 ---- a/python/Makefile.am -+++ b/python/Makefile.am -@@ -4,7 +4,7 @@ EXTRA_DIST = rpm/__init__.py rpm/transaction.py - - AM_CPPFLAGS = -I$(top_builddir)/include/ - AM_CPPFLAGS += -I$(top_srcdir)/python --AM_CPPFLAGS += -I@WITH_PYTHON_INCLUDE@ -+AM_CPPFLAGS += @WITH_PYTHON_INCLUDE@ - - pkgpyexec_LTLIBRARIES = _rpmmodule.la _rpmbmodule.la _rpmsmodule.la - pkgpyexec_DATA = rpm/__init__.py rpm/transaction.py diff --git a/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch b/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch deleted file mode 100644 index 23bc3361d9..0000000000 --- a/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 64851c6622aff64787a9fcea26cccde183b7c743 Mon Sep 17 00:00:00 2001 -From: "Roy.Li" <rongqing.li@windriver.com> -Date: Tue, 11 Nov 2014 16:28:22 +0800 -Subject: [PATCH] using poptParseArgvString to parse the - _gpg_check_password_cmd - -Upstream-Status: Pending - -Both __gpg_check_password_cmd and __gpg_sign_cmd include "%{_gpg_name}", but -strace shows that gpg_name has a quote when run _gpg_check_password, -but not when run __gpg_sign_cmd; for example, if gpg_name is "tester" - - execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose", - "--passphrase-fd", "3", "-u", "\"tester\"", "-so", "-"], [/* 20 vars */]) = 0 - - execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose", "--no-armor", - "--passphrase-fd", "3", "--no-secmem-warning", "-u", "tester", "-sbo"..,) = 0 - -it can be fixed by removing the quote around %{gpg_name} when define -__gpg_check_password_cmd in macros/macros, like below, but if gpg_name includes -space, it will not work. - - %__gpg_check_password_cmd %{__gpg} \ - gpg --batch --no-verbose --passphrase-fd 3 -u %{_gpg_name} -so - - -The poptParseArgvString function is used to parse _gpg_sign_cmd, so using -poptParseArgvString to parse __gpg_check_password_cmd to fix this issue. - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - rpmdb/signature.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/rpmdb/signature.c b/rpmdb/signature.c -index c35e0ab..016e8d1 100644 ---- a/rpmdb/signature.c -+++ b/rpmdb/signature.c -@@ -529,7 +529,7 @@ int rpmCheckPassPhrase(const char * passPhrase) - (void) setenv("GNUPGHOME", gpg_path, 1); - - cmd = rpmExpand("%{?__gpg_check_password_cmd}", NULL); -- rc = argvSplit(&av, cmd, NULL); -+ rc = poptParseArgvString(cmd, NULL, (const char ***)&av); - if (!rc) - rc = execve(av[0], (char *const *)av+1, environ); - --- -1.9.1 - diff --git a/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch b/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch deleted file mode 100644 index 7894a4263d..0000000000 --- a/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch +++ /dev/null @@ -1,29 +0,0 @@ -configure.ac: search for both gpg2 and gpg - -On some platforms the GnuPG binary is named 'gpg2' whereas others have 'gpg'. -This patch increases compatibility by searching for 'gpg' in addition to -'gpg2'. - -Upstream-Status: Pending - -Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 6746b4c..f6922ae 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -562,7 +562,7 @@ AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH) - AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH) - AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH) - AC_PATH_PROG(__GIT, git, %{_bindir}/git, $MYPATH) --AC_PATH_PROG(__GPG, gpg2, %{_bindir}/gpg2, $MYPATH) -+AC_PATH_PROGS(__GPG, [gpg2 gpg], %{_bindir}/gpg2, $MYPATH) - AC_PATH_PROG(__GSR, gsr, %{_bindir}/gsr, $MYPATH) - AC_PATH_PROG(__GST_INSPECT, gst-inspect-0.10, %{_bindir}/gst-inspect-0.10, $MYPATH) - AC_PATH_PROG(__GZIP, gzip, /bin/gzip, $MYPATH) --- -2.1.4 - diff --git a/meta/recipes-devtools/rpm/rpm/dbconvert.patch b/meta/recipes-devtools/rpm/rpm/dbconvert.patch deleted file mode 100644 index 1fdbf0908a..0000000000 --- a/meta/recipes-devtools/rpm/rpm/dbconvert.patch +++ /dev/null @@ -1,27 +0,0 @@ -Upstream-Status: Inappropriate - -Hack to prevent unneeded demo app from building on older libc -where it will break the build - -Index: rpm-5.4.14/tools/Makefile.am -=================================================================== ---- rpm-5.4.14.orig/tools/Makefile.am -+++ rpm-5.4.14/tools/Makefile.am -@@ -29,7 +29,7 @@ EXTRA_PROGRAMS = nix-copy-closure nix-en - xiu-instantiate xiu-store - noinst_PROGRAMS = - --EXTRA_PROGRAMS += augtool cudftool dbconvert debugedit \ -+EXTRA_PROGRAMS += augtool cudftool debugedit \ - nix-build nix-channel nix-collect-garbage \ - nix-log2xml nix-prefetch-url nix-pull nix-push \ - xiu-echo xiu-hash \ -@@ -64,7 +64,7 @@ pkgbin_PROGRAMS = \ - rpmcache rpmdigest rpmrepo rpmspecdump \ - rpmcmp rpmdeps rpmdeps-oecore sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ - if WITH_DB --pkgbin_PROGRAMS += dbconvert -+pkgbin_PROGRAMS += - endif - dist_man_MANS = rpmgrep.1 - diff --git a/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch b/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch deleted file mode 100644 index beef5edd9d..0000000000 --- a/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch +++ /dev/null @@ -1,98 +0,0 @@ -During the recalculation of the buildid, it's necessary to change the word -back to the original endian. However, if we do this in-place, we've also -affected the headers that we're also working on. The side effect of this is -we can no longer rely on 'sh_type' as it may have been changed. - -This patch ensures that any time we translate the loaded data to the machine -format, we only do it in a backup copy and never the original copy. - -Note: in all other places a backup copy was used, just not buildid processing. - -Also the process (...) function was modified to verify the data is not -NULL as well. This is an extra check and is not strictly necessary. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/tools/debugedit.c -=================================================================== ---- rpm-5.4.14.orig/tools/debugedit.c -+++ rpm-5.4.14/tools/debugedit.c -@@ -1445,21 +1445,24 @@ handle_build_id (DSO *dso, Elf_Data *bui - auto inline void process (const void *data, size_t size) - { - memchunk chunk = { .data = (void *) data, .size = size }; -- hashFunctionContextUpdateMC (&ctx, &chunk); -+ if (data != NULL && size != 0) -+ hashFunctionContextUpdateMC (&ctx, &chunk); - } - union - { - GElf_Ehdr ehdr; - GElf_Phdr phdr; - GElf_Shdr shdr; -- } u; -- Elf_Data x = { .d_version = EV_CURRENT, .d_buf = &u }; -+ } u1, u2; -+ Elf_Data src = { .d_version = EV_CURRENT, .d_buf = &u1 }; -+ Elf_Data dest = { .d_version = EV_CURRENT, .d_buf = &u2 }; - -- x.d_type = ELF_T_EHDR; -- x.d_size = sizeof u.ehdr; -- u.ehdr = dso->ehdr; -- u.ehdr.e_phoff = u.ehdr.e_shoff = 0; -- if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL) -+ src.d_type = ELF_T_EHDR; -+ src.d_size = sizeof u1.ehdr; -+ dest.d_size = sizeof u2.ehdr; -+ u1.ehdr = dso->ehdr; -+ u1.ehdr.e_phoff = u1.ehdr.e_shoff = 0; -+ if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL) - { - bad: - fprintf (stderr, "Failed to compute header checksum: %s\n", -@@ -1467,29 +1470,31 @@ handle_build_id (DSO *dso, Elf_Data *bui - exit (1); - } - -- x.d_type = ELF_T_PHDR; -- x.d_size = sizeof u.phdr; -+ src.d_type = ELF_T_PHDR; -+ src.d_size = sizeof u1.phdr; -+ dest.d_size = sizeof u2.phdr; - for (i = 0; i < dso->ehdr.e_phnum; ++i) - { -- if (gelf_getphdr (dso->elf, i, &u.phdr) == NULL) -+ if (gelf_getphdr (dso->elf, i, &u1.phdr) == NULL) - goto bad; -- if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL) -+ if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL) - goto bad; -- process (x.d_buf, x.d_size); -+ process (dest.d_buf, dest.d_size); - } - -- x.d_type = ELF_T_SHDR; -- x.d_size = sizeof u.shdr; -+ src.d_type = ELF_T_SHDR; -+ src.d_size = sizeof u1.shdr; -+ dest.d_size = sizeof u2.shdr; - for (i = 0; i < dso->ehdr.e_shnum; ++i) - if (dso->scn[i] != NULL) - { -- u.shdr = dso->shdr[i]; -- u.shdr.sh_offset = 0; -- if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL) -+ u1.shdr = dso->shdr[i]; -+ u1.shdr.sh_offset = 0; -+ if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL) - goto bad; -- process (x.d_buf, x.d_size); -+ process (dest.d_buf, dest.d_size); - -- if (u.shdr.sh_type != SHT_NOBITS) -+ if (u1.shdr.sh_type != SHT_NOBITS) - { - Elf_Data *d = elf_rawdata (dso->scn[i], NULL); - if (d == NULL) diff --git a/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch b/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch deleted file mode 100644 index f7c31006b4..0000000000 --- a/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch +++ /dev/null @@ -1,65 +0,0 @@ -debugedit: fix segment fault while file's bss offset have a large number - -While ELF_C_RDWR_MMAP was used, elf_begin invoked mmap() to map file -into memory. While the file's bss Offset has a large number, elf_update -caculated file size by __elf64_updatenull_wrlock and the size was -enlarged. - -In this situation, elf_update invoked ftruncate to enlarge the file, -and memory size (elf->maximum_size) also was incorrectly updated. -There was segment fault in elf_end which invoked munmap with the -length is the enlarged file size, not the mmap's length. - -Before the above operations, invoke elf_begin/elf_update/elf_end -with ELF_C_RDWR and ELF_F_LAYOUT set to enlarge the above file, it -could make sure the file is safe for the following elf operations. - -Upstream-Status: Pending -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - tools/debugedit.c | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -Index: rpm-5.4.14/tools/debugedit.c -=================================================================== ---- rpm-5.4.14.orig/tools/debugedit.c -+++ rpm-5.4.14/tools/debugedit.c -@@ -1525,6 +1525,28 @@ handle_build_id (DSO *dso, Elf_Data *bui - } - } - -+/* It avoided the segment fault while file's bss offset have a large number. -+ See https://bugzilla.redhat.com/show_bug.cgi?id=1019707 -+ https://bugzilla.redhat.com/show_bug.cgi?id=1020842 for detail. */ -+void valid_file(int fd) -+{ -+ Elf *elf = elf_begin (fd, ELF_C_RDWR, NULL); -+ if (elf == NULL) -+ { -+ error (1, 0, "elf_begin: %s", elf_errmsg (-1)); -+ return; -+ } -+ -+ elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT); -+ -+ if (elf_update (elf, ELF_C_WRITE) < 0) -+ error (1, 0, "elf_update: %s", elf_errmsg (-1)); -+ -+ elf_end (elf); -+ -+ return; -+} -+ - int - main (int argc, char *argv[]) - { -@@ -1621,6 +1643,9 @@ main (int argc, char *argv[]) - exit (1); - } - -+ /* Make sure the file is valid. */ -+ valid_file(fd); -+ - dso = fdopen_dso (fd, file); - if (dso == NULL) - exit (1); diff --git a/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch deleted file mode 100644 index 976af486fb..0000000000 --- a/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch +++ /dev/null @@ -1,21 +0,0 @@ -Some options checked in this loop are needing linking to find out -if the option can be used or not e.g. -fstack-protector which needs -libssp to be staged and available for compiler to link against -Therefore we change the compile only check to compile and link check - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending - -Index: rpm-5.4.14/configure.ac -=================================================================== ---- rpm-5.4.14.orig/configure.ac -+++ rpm-5.4.14/configure.ac -@@ -201,7 +201,7 @@ dnl # GNU GCC (usually "gcc") - my_save_cflags="$CFLAGS" - CFLAGS=$c - AC_MSG_CHECKING([whether GCC supports $c]) -- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])], - [AC_MSG_RESULT([yes])] - [my_cflags=$c], - [AC_MSG_RESULT([no])] diff --git a/meta/recipes-devtools/rpm/rpm/header-include-fix.patch b/meta/recipes-devtools/rpm/rpm/header-include-fix.patch deleted file mode 100644 index 5ffb187ff3..0000000000 --- a/meta/recipes-devtools/rpm/rpm/header-include-fix.patch +++ /dev/null @@ -1,26 +0,0 @@ -Upstream-Status: Pending - -Index: rpm-5.4.14/rpmdb/rpmdb.h -=================================================================== ---- rpm-5.4.14.orig/rpmdb/rpmdb.h -+++ rpm-5.4.14/rpmdb/rpmdb.h -@@ -9,6 +9,7 @@ - - #include <assert.h> - #include <mire.h> -+#include <errno.h> - - #include <rpmtypes.h> - #include <rpmtag.h> /* XXX Header typedef */ -Index: rpm-5.4.14/rpmdb/rpmtag.h -=================================================================== ---- rpm-5.4.14.orig/rpmdb/rpmtag.h -+++ rpm-5.4.14/rpmdb/rpmtag.h -@@ -7,6 +7,7 @@ - - #include <rpmiotypes.h> - #include <rpmsw.h> -+#include <stdint.h> - - #ifdef __cplusplus - extern "C" { diff --git a/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch b/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch deleted file mode 100644 index 8fab9eb42f..0000000000 --- a/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch +++ /dev/null @@ -1,33 +0,0 @@ -rpm: Resolve parallel install issue when installing lua - -When lua is being installed on some systems that are being run with high levels -of parallelization there are cases where install-data-am and install-exec-hook -are processed at the same or a very short time apart. This causes -install-pkgbinPROGRAMS, which is a dependency of both, to be run at around the -same time This sometimes causes file contention and will sometimes be in a state -where install-exec-hook is looking for a file that is being installed or both -install-pkgbinPROGRAMS being run are installing the same file and fail because -it cannon create a new file. - -This patch allows install-exec-hook to be called by install-data-am instead of -install-exec-am. It also removed the dependency in install-data-hook on -install-pkgbinPROGRAMS. This means install-pkgbinPROGRAMS will only be run once -so there whould be any file contention. - -Upstream-Status: Pending - -Signed-off-by: Morgan Little <morgan.little@windriver.com> - -Index: rpm-5.4.14/lua/Makefile.am -=================================================================== ---- rpm-5.4.14.orig/lua/Makefile.am -+++ rpm-5.4.14/lua/Makefile.am -@@ -326,7 +326,7 @@ clean-local: - # XXX Build & install as rpmlua/rpmluac with hardlinks to lua/luac post install. - # XXX CVS has lua/luac sub-directories in the Attic that collide with the - # XXX lua/luac executable names when using cvs update. --install-exec-hook: install-pkgbinPROGRAMS -+install-data-hook: - mkdir -p $(DESTDIR)$(pkgbindir) - $(__RM) -f $(DESTDIR)$(pkgbindir)/lua - $(__LN) $(DESTDIR)$(pkgbindir)/rpmlua $(DESTDIR)$(pkgbindir)/lua diff --git a/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch b/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch deleted file mode 100644 index 410623fab2..0000000000 --- a/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch +++ /dev/null @@ -1,14 +0,0 @@ -Don't put LDFLAGS into the Libs.private, all it generally contains is a linker -hash selection (harmless) and the absolute path to the libdir in the sysroot -(actively harmful). - -Upstream-Status: Pending -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/scripts/rpm.pc.in b/scripts/rpm.pc.in -index 8293471..2ea469c 100644 ---- a/scripts/rpm.pc.in -+++ b/scripts/rpm.pc.in -@@ -17 +17 @@ Libs: -L${libdir} -lrpmbuild${suffix} -lrpm${suffix} -lrpmdb${suffix} -lrpmio${s --Libs.private: @LDFLAGS@ @LIBS@ -+Libs.private: @LIBS@ diff --git a/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh b/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh deleted file mode 100755 index b72c9f0265..0000000000 --- a/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -: ${RPMDEPS:=rpmdeps} - -process() { - while read file_name ; do - printf "%s\t" ${file_name} - if [ ! -d $file_name ]; then - printf "%s " $($RPMDEPS $1 $file_name | sed -e 's,rpmlib(.*,,' -e 's,\([<>\=]\+ \+[^ ]*\),(\1),g') - fi - printf "\n" - done -} - -usage() { - echo "$0 {-P|--provides} {-R|--requires} FILE ..." -} - -while [ $# -gt 0 ]; do - case "$1" in - --rpmdeps) - RPMDEPS=$2 - shift - shift - ;; - -R|--requires) - process_type=--requires - shift - ;; - -P|--provides) - process_type=--provides - shift - ;; - *) - break; - ;; - esac -done - -if [ -z "$process_type" ]; then - usage - exit 1 -fi - -if [ $# -gt 0 ]; then - find "$@" | process $process_type - exit $? -fi - -process $process_type diff --git a/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch b/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch deleted file mode 100644 index a538a60bb9..0000000000 --- a/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch +++ /dev/null @@ -1,33 +0,0 @@ -rpmmodule.c: Export a few additional RPMSENSE values - -We want to see the RPMSENSE_SCRIPT values for use with SMART. We also -want to see the MISSINGOK value so we can avoid recommended packages causing -failures. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/python/rpmmodule.c -=================================================================== ---- rpm-5.4.14.orig/python/rpmmodule.c -+++ rpm-5.4.14/python/rpmmodule.c -@@ -494,12 +494,16 @@ void init_rpm(void) - REGISTER_ENUM(RPMSENSE_EQUAL); - REGISTER_ENUM(RPMSENSE_NOTEQUAL); - REGISTER_ENUM(RPMSENSE_FIND_REQUIRES); --#if defined(RPM_VENDOR_MANDRIVA) -+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE) - REGISTER_ENUM(RPMSENSE_PREREQ); - REGISTER_ENUM(RPMSENSE_SCRIPT_PRE); - REGISTER_ENUM(RPMSENSE_SCRIPT_POST); - REGISTER_ENUM(RPMSENSE_SCRIPT_PREUN); -- REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN) -+ REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN); -+#endif -+ -+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE) -+ REGISTER_ENUM(RPMSENSE_MISSINGOK); - #endif - - REGISTER_ENUM(RPMDEPS_FLAG_NOUPGRADE); diff --git a/meta/recipes-devtools/rpm/rpm/pythondeps.sh b/meta/recipes-devtools/rpm/rpm/pythondeps.sh deleted file mode 100755 index 083b174f17..0000000000 --- a/meta/recipes-devtools/rpm/rpm/pythondeps.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -[ $# -ge 1 ] || { - cat > /dev/null - exit 0 -} - -case $1 in --R|--requires) - shift - grep "/usr/\(lib[^/]*\|share\)/python[^/]*/" >/dev/null && echo "python" - exit 0 - ;; -esac - -exit 0 diff --git a/meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch b/meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch deleted file mode 100644 index b107e8f047..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 08105acda1da63d32fbb18596a3d6c3e0aa106d1 Mon Sep 17 00:00:00 2001 -From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> -Date: Wed, 10 Jun 2015 14:36:56 +0000 -Subject: [PATCH 2/2] rpm: CVE-2013-6435 - -Upstream-Status: Backport - -Reference: -https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2013-6435 - -Description: -It was found that RPM wrote file contents to the target installation -directory under a temporary name, and verified its cryptographic signature -only after the temporary file has been written completely. Under certain -conditions, the system interprets the unverified temporary file contents -and extracts commands from it. This could allow an attacker to modify -signed RPM files in such a way that they would execute code chosen -by the attacker during package installation. - -Original Patch: -https://bugzilla.redhat.com/attachment.cgi?id=956207 - -Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> ---- - lib/fsm.c | 2 +- - rpmio/rpmio.c | 18 ++++++++++++++---- - 2 files changed, 15 insertions(+), 5 deletions(-) - -diff --git a/lib/fsm.c b/lib/fsm.c -index 1ee7e67..094eb1d 100644 ---- a/lib/fsm.c -+++ b/lib/fsm.c -@@ -726,7 +726,7 @@ static int expandRegular(FSM_t fsm, rpmpsm psm, rpmcpio_t archive, int nodigest) - { - FD_t wfd = NULL; - const struct stat * st = &fsm->sb; -- rpm_loff_t left = st->st_size; -+ rpm_loff_t left = rpmfiFSizeIndex(fsmGetFi(fsm), fsm->ix); - const unsigned char * fidigest = NULL; - pgpHashAlgo digestalgo = 0; - int rc = 0; -diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c -index cd223e8..0b12e31 100644 ---- a/rpmio/rpmio.c -+++ b/rpmio/rpmio.c -@@ -1309,15 +1309,19 @@ int Fclose(FD_t fd) - * - bzopen: [1-9] is block size (modulo 100K) - * - bzopen: 's' is smallmode - * - HACK: '.' terminates, rest is type of I/O -+ * - 'U' sets *mode to zero (no permissions) instead of 0666 - */ - static void cvtfmode (const char *m, - char *stdio, size_t nstdio, - char *other, size_t nother, -- const char **end, int * f) -+ const char **end, int *f, mode_t *mode) - { - int flags = 0; - char c; - -+ if (mode) -+ *mode = 0666; -+ - switch (*m) { - case 'a': - flags |= O_WRONLY | O_CREAT | O_APPEND; -@@ -1357,6 +1361,10 @@ static void cvtfmode (const char *m, - if (--nstdio > 0) *stdio++ = c; - continue; - break; -+ case 'U': -+ if (mode) -+ *mode = 0; -+ break; - default: - if (--nother > 0) *other++ = c; - continue; -@@ -1385,7 +1393,8 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n", fd, fmode, fdbg(fd)); - if (fd == NULL || fmode == NULL) - return NULL; - -- cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, NULL); -+ cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, NULL, -+ NULL); - if (stdio[0] == '\0') - return NULL; - zstdio[0] = '\0'; -@@ -1436,7 +1445,7 @@ FD_t Fopen(const char *path, const char *fmode) - { - char stdio[20], other[20]; - const char *end = NULL; -- mode_t perms = 0666; -+ mode_t perms; - int flags = 0; - FD_t fd; - -@@ -1444,7 +1453,8 @@ FD_t Fopen(const char *path, const char *fmode) - return NULL; - - stdio[0] = '\0'; -- cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, &flags); -+ cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, &flags, -+ &perms); - if (stdio[0] == '\0') - return NULL; - --- -1.8.4.5 - diff --git a/meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch b/meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch deleted file mode 100644 index bf1795ca49..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 71c812edf1431a9967bd99ba6ffa6ab89eb7ec7c Mon Sep 17 00:00:00 2001 -From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> -Date: Wed, 10 Jun 2015 12:56:55 +0000 -Subject: [PATCH 1/2] rpm: CVE-2014-8118 - -Upstream-Status: Backport - -Reference: -https://bugzilla.redhat.com/show_bug.cgi?id=1168715 - -Description: -It was found that RPM could encounter an integer overflow, -leading to a stack-based overflow, while parsing a crafted -CPIO header in the payload section of an RPM file. This could -allow an attacker to modify signed RPM files in such a way that -they would execute code chosen by the attacker during package -installation. - -Original Patch: -https://bugzilla.redhat.com/attachment.cgi?id=962159 - -Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> ---- - lib/cpio.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/lib/cpio.c b/lib/cpio.c -index 382eeb6..74ddd9c 100644 ---- a/lib/cpio.c -+++ b/lib/cpio.c -@@ -296,6 +296,9 @@ int rpmcpioHeaderRead(rpmcpio_t cpio, char ** path, struct stat * st) - st->st_rdev = makedev(major, minor); - - GET_NUM_FIELD(hdr.namesize, nameSize); -+ if (nameSize <= 0 || nameSize > 4096) { -+ return CPIOERR_BAD_HEADER; -+ } - - *path = xmalloc(nameSize + 1); - read = Fread(*path, nameSize, 1, cpio->fd); --- -1.8.4.5 - diff --git a/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch b/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch deleted file mode 100644 index 8771235d30..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch +++ /dev/null @@ -1,25 +0,0 @@ -Remove the sanity checking from the rpm autogen.sh. This is required because -we may have slightly different, but yet compatible versions. If we do end -up breaking things, we'll deal with it at that time. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/syck/autogen.sh -=================================================================== ---- rpm-5.4.14.orig/syck/autogen.sh -+++ rpm-5.4.14/syck/autogen.sh -@@ -34,12 +34,6 @@ libtoolize () { - eval $_libtoolize $_libtoolize_args - } - --# requirements sanity check --[ "`automake --version | head -1`" != "$AMV" ] && echo "$USAGE" # && exit 1 --[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" # && exit 1 --[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1 --[ "`gettextize --version | head -1 | sed -e 's;^.*/\\(gettextize\\);\\1;'`" != "$GTT" ] && echo "$USAGE" # && exit 1 -- - echo "---> generate files via GNU libtool (libtoolize)" - libtoolize --quiet --copy --force --install - echo "---> generate files via GNU autoconf (aclocal, autoheader)" diff --git a/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch b/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch deleted file mode 100644 index 41ab498a0f..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch +++ /dev/null @@ -1,136 +0,0 @@ -lib/rpmrc.c: Update --target processing to support full GNU canonical arch - -Prior to this patch, when using --target, RPM supported the format: - <arch> - <arch>-<os> - <arch>-<os>-gnu - <arch>-<arbitrary items>-<os> - <arch>-<arbitrary items>-<os>-gnu - -This patch changes the list of supported items to: - <arch> - <arch>-<os> - <arch>-<os>-gnu - <arch>-<vendor>-<os> - <arch>-<vendor>-<os>-<extension> - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/lib/rpmrc.c -=================================================================== ---- rpm-5.4.14.orig/lib/rpmrc.c -+++ rpm-5.4.14/lib/rpmrc.c -@@ -925,8 +925,8 @@ static void getMachineInfo(int type, /*@ - - static void rpmRebuildTargetVars(const char ** target, const char ** canontarget) - { -- -- char *ca = NULL, *co = NULL, *ct = NULL; -+ /* ca = arch, cv = vendor, co = os, ce = extension, ct = canon target */ -+ char *ca = NULL, *cv = NULL, *co = NULL, *ce = NULL, *ct = NULL; - int x; - - /* Rebuild the compat table to recalculate the current target arch. */ -@@ -936,23 +936,60 @@ static void rpmRebuildTargetVars(const c - rpmSetTables(RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS); - - if (target && *target) { -+ /* GNU canonical format is: -+ * <arch>-<vendor>-<os>[-extension] -+ * -+ * We support the both the GNU canonical format -+ * as well as the traditional RPM formats: -+ * <arch> -+ * <arch>-<os>[-gnu] -+ */ - char *c; - /* Set arch and os from specified build target */ - ca = xstrdup(*target); -- if ((c = strchr(ca, '-')) != NULL) { -+ if ((c = strchr(ca, '-')) == NULL) { -+ /* Format is <arch> */ -+ ; -+ } else { - *c++ = '\0'; -- -- if ((co = strrchr(c, '-')) == NULL) { -- co = c; -+ cv = c; -+ -+ if ((c = strchr(c, '-')) == NULL) { -+ /* Format is <arch>-<os> */ -+ co = cv; -+ cv = NULL; - } else { -- if (!xstrcasecmp(co, "-gnu")) -- *co = '\0'; -- if ((co = strrchr(c, '-')) == NULL) -- co = c; -- else -- co++; -+ *c++ = '\0'; -+ co = c; -+ -+ if ((c = strchr(c, '-')) == NULL) { -+ /* Might be: -+ * <arch>-<vendor>-<os> -+ * <arch>-<os>-gnu -+ */ -+ if (!xstrcasecmp(co, "gnu")) { -+ /* Format was <arch>-<os>-gnu */ -+ ce = co; -+ co = cv; -+ cv = NULL; -+ } -+ } else { -+ /* Format was <arch>-<vendor>-<os>-<extension> */ -+ *c++ = '\0'; -+ ce = c; -+ } - } -+ if (cv != NULL) cv = xstrdup(cv); - if (co != NULL) co = xstrdup(co); -+ if (ce != NULL) { -+ /* We need to prefix it with a "-" */ -+ char * lce = NULL; -+ -+ lce = xmalloc(strlen(ce) + sizeof("-")); -+ sprintf(lce, "-%s", ce); -+ -+ ce = lce; -+ } - } - } else { - const char *a = NULL; -@@ -995,8 +1032,16 @@ static void rpmRebuildTargetVars(const c - addMacro(NULL, "_target", NULL, ct, RMIL_RPMRC); - delMacro(NULL, "_target_cpu"); - addMacro(NULL, "_target_cpu", NULL, ca, RMIL_RPMRC); -+ if (cv) { -+ delMacro(NULL, "_target_vendor"); -+ addMacro(NULL, "_target_vendor", NULL, cv, RMIL_RPMRC); -+ } - delMacro(NULL, "_target_os"); - addMacro(NULL, "_target_os", NULL, co, RMIL_RPMRC); -+ if (ce) { -+ delMacro(NULL, "_gnu"); -+ addMacro(NULL, "_gnu", NULL, ce, RMIL_RPMRC); -+ } - - if (canontarget) - *canontarget = ct; -@@ -1004,8 +1049,12 @@ static void rpmRebuildTargetVars(const c - ct = _free(ct); - ca = _free(ca); - /*@-usereleased@*/ -+ cv = _free(cv); -+ /*@-usereleased@*/ - co = _free(co); - /*@=usereleased@*/ -+ ce = _free(ce); -+ /*@-usereleased@*/ - } - - void rpmFreeRpmrc(void) diff --git a/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch b/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch deleted file mode 100644 index 3d8d645a77..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch +++ /dev/null @@ -1,96 +0,0 @@ -rpm: check if the argument(rootpath) exists or be writable - -When user execute the command "rpm -qai --root=$dir",if $dir doesn't -exist or is unwritable as result of making a typo in rootpath,then -it will create dirent $dir and subdirectory. -So we should add the check function to fix it before creating relational -subdirectory,and warn the incorrect rootpath to user. It just checks the -rootpath reasonableness when the user input the argument(--root=/-r=). - -Upstream-Status: Pending - -Signed-off-by: Zhixiong Chi <zchi@windriver.com> ---- - rpmqv.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 45 insertions(+) - -diff --git a/rpmqv.c b/rpmqv.c -index 40c42bd..88d85ab 100644 ---- a/rpmqv.c -+++ b/rpmqv.c -@@ -206,6 +206,8 @@ static struct poptOption optionsTable[] = { - POPT_TABLEEND - }; - -+static int _rpmqv_rootpath_state = 0; -+ - #ifdef __MINT__ - /* MiNT cannot dynamically increase the stack. */ - long _stksize = 64 * 1024L; -@@ -427,6 +429,41 @@ static void integrity_check(const char *progname, enum modes progmode_num) - } - #endif - -+/*check if the rootdir is writable or exists */ -+int access_file(const char *rootdir) -+{ -+ int ret,rootdir_len; -+ -+ if(rootdir == NULL) { -+ return -1; -+ } -+ -+ rootdir_len = strlen(rootdir); -+ /*make sure that dirent argument trailing is "/" */ -+ if(!(rootdir_len && rootdir[rootdir_len - 1] == '/')){ -+ char *t = (char *)malloc(rootdir_len + 2); -+ *t = '\0'; -+ (void)stpcpy(stpcpy(t,rootdir),"/"); -+ ret = access(t,F_OK|W_OK); -+ free(t); -+ }else{ -+ ret = access(rootdir,F_OK|W_OK); -+ } -+ return ret; -+} -+ -+/*check if input the argument "--root/-r" */ -+void check_argument_root(int argc,char * const argv[]) -+{ -+ int i; -+ for (i = 0; i < argc; i++) { -+ if(strncmp(argv[i],"--root=",7) == 0 || strncmp(argv[i],"-r=",3) == 0) { -+ _rpmqv_rootpath_state = 1; -+ break; -+ } -+ } -+} -+ - /*@-bounds@*/ /* LCL: segfault */ - /*@-mods@*/ /* FIX: shrug */ - #if !defined(__GLIBC__) && !defined(__LCLINT__) -@@ -476,6 +513,8 @@ int main(int argc, const char ** argv) - int xx; - #endif - -+ check_argument_root(argc,(char *const *)argv); -+ - #if !defined(__GLIBC__) && !defined(__LCLINT__) - environ = envp; - #else -@@ -715,6 +754,12 @@ int main(int argc, const char ** argv) - argerror(_("arguments to --root (-r) must begin with a /")); - break; - } -+ if (_rpmqv_rootpath_state) { -+ if (access_file(rpmioRootDir)) { -+ fprintf(stderr, _("Invalid directory:%s, ensure it exists or be writable\n"),rpmioRootDir); -+ exit(EXIT_FAILURE); -+ } -+ } - } - - #if defined(RPM_VENDOR_OPENPKG) /* integrity-checking */ --- -1.9.1 - diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch b/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch deleted file mode 100644 index c869376538..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch +++ /dev/null @@ -1,19 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -Change cache size to reduce the usage of disk space from 62MB to 26MB. - -Signed-off-by: Mei Lei <lei.mei@intel.com> - -Index: rpm-5.4.14/rpmdb/DB_CONFIG.in -=================================================================== ---- rpm-5.4.14.orig/rpmdb/DB_CONFIG.in -+++ rpm-5.4.14/rpmdb/DB_CONFIG.in -@@ -29,7 +29,7 @@ set_thread_count 64 - - # ================ Memory Pool - #XXX initializing dbenv with set_cachesize has unimplemented prerequsites --#set_cachesize 0 1048576 0 -+set_cachesize 0 1048576 0 - set_mp_mmapsize 268435456 - - # ================ Locking diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch b/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch deleted file mode 100644 index 77020a34d6..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch +++ /dev/null @@ -1,162 +0,0 @@ -Support both db5 and db6. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm/configure.ac -=================================================================== ---- rpm.orig/configure.ac -+++ rpm/configure.ac -@@ -547,8 +547,6 @@ else - MYPATH=$PATH - fi - --DBXY=db60 -- - AC_PATH_PROG(__BASH, bash, %{_bindir}/bash, $MYPATH) - AC_PATH_PROG(__BZIP2, bzip2, %{_bindir}/bzip2, $MYPATH) - AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH) -@@ -560,22 +558,6 @@ AC_PATH_PROG(__CMAKE, cmake, %{_bindir}/ - AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH) - AC_PATH_PROG(__CURL, curl, %{_bindir}/curl, $MYPATH) - AC_PATH_PROG(__CVS, cvs, %{_bindir}/cvs, $MYPATH) --AC_PATH_PROG(__DB_ARCHIVE, ${DBXY}_archive, %{_bindir}/${DBXY}_archive, $MYPATH) --AC_PATH_PROG(__DB_CHECKPOINT, ${DBXY}_checkpoint, %{_bindir}/${DBXY}_checkpoint, $MYPATH) --AC_PATH_PROG(__DB_DEADLOCK, ${DBXY}_deadlock, %{_bindir}/${DBXY}_deadlock, $MYPATH) --AC_PATH_PROG(__DB_DUMP, ${DBXY}_dump, %{_bindir}/${DBXY}_dump, $MYPATH) --AC_PATH_PROG(__DB_HOTBACKUP, ${DBXY}_hotbackup, %{_bindir}/${DBXY}_hotbackup, $MYPATH) --AC_PATH_PROG(__DB_LOAD, ${DBXY}_load, %{_bindir}/${DBXY}_load, $MYPATH) --AC_PATH_PROG(__DB_LOG_VERIFY, ${DBXY}_log_verify, %{_bindir}/${DBXY}_log_verify, $MYPATH) --AC_PATH_PROG(__DB_PRINTLOG, ${DBXY}_printlog, %{_bindir}/${DBXY}_printlog, $MYPATH) --AC_PATH_PROG(__DB_RECOVER, ${DBXY}_recover, %{_bindir}/${DBXY}_recover, $MYPATH) --AC_PATH_PROG(__DB_REPLICATE, ${DBXY}_replicate, %{_bindir}/${DBXY}_replicate, $MYPATH) --AC_PATH_PROG(__DBSQL, ${DBXY}sql, %{_bindir}/${DBXY}sql, $MYPATH) --AC_PATH_PROG(__DB_SQL_CODEGEN, ${DBXY}_sql_codegen, %{_bindir}/${DBXY}_sql_codegen, $MYPATH) --AC_PATH_PROG(__DB_STAT, ${DBXY}_stat, %{_bindir}/${DBXY}_stat, $MYPATH) --AC_PATH_PROG(__DB_TUNER, ${DBXY}_tuner, %{_bindir}/${DBXY}_tuner, $MYPATH) --AC_PATH_PROG(__DB_UPGRADE, ${DBXY}_upgrade, %{_bindir}/${DBXY}_upgrade, $MYPATH) --AC_PATH_PROG(__DB_VERIFY, ${DBXY}_verify, %{_bindir}/${DBXY}_verify, $MYPATH) - AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH) - AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH) - AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH) -@@ -1604,13 +1586,18 @@ RPM_CHECK_LIB( - - dnl # Berkeley-DB & SQLite - DBLIBSRCS="" -+DBXY=db -+ - # XXX won't handle --includedir override --CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}" -+CPPFLAGS_save="${CPPFLAGS}" -+CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-6.0" -+with_db_save="${with_db}" - RPM_CHECK_LIB( - [Berkeley-DB], [db], - [db-6.0], [db_create], [db.h], -- [yes,external], [db3], -+ [yes,external], [db6], - [ DBLIBSRCS="$DBLIBSRCS db3.c" -+ DBXY=db60 - AM_CONDITIONAL(WITH_DB, [ true ]) - AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ]) - if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then -@@ -1619,10 +1606,32 @@ RPM_CHECK_LIB( - WITH_DB_SUBDIR="" - fi - ], -- [ AM_CONDITIONAL(WITH_DB, [ false ]) -- AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ]) -+ [ # Reset a few variables to fresh -+ with_db="${with_db_save}" -+ CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-5.3" -+ RPM_CHECK_LIB( -+ [Berkeley-DB], [db], -+ [db-5.3], [db_create], [db.h], -+ [yes,external], [db53], -+ [ DBLIBSRCS="$DBLIBSRCS db3.c" -+ DBXY=db53 -+ AM_CONDITIONAL(WITH_DB, [ true ]) -+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ]) -+ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then -+ AC_DEFINE(HAVE_DB_H, 1, [Have <db.h> header]) -+ else -+ WITH_DB_SUBDIR="" -+ fi -+ ], -+ [ AM_CONDITIONAL(WITH_DB, [ false ]) -+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ]) -+ ]) - ]) - -+if test ".$ac_cv_lib_db_6_0_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then -+ CPPFLAGS="${CPPFLAGS_save}" -+fi -+ - dnl # Sqlite external - RPM_CHECK_LIB( - [SQLite], [sqlite], -@@ -1633,10 +1642,11 @@ RPM_CHECK_LIB( - - dnl # Sqlite 3.7.0.1 from db-5.1.19 - dnl XXX error: `db3' is already registered with AC_CONFIG_SUBDIRS. -+if test ".$ac_cv_lib_db_6_0_db_create" = .yes; then - RPM_CHECK_LIB( - [Berkeley-DB (+SQLite3)], [dbsql], - [db_sql-6.0], [sqlite3_open], [dbsql.h], -- [yes,external], [db3/sql], -+ [yes,external], [db6/sql], - [ - AM_CONDITIONAL(WITH_DBSQL, [ true ]) - AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library]) -@@ -1650,12 +1660,50 @@ RPM_CHECK_LIB( - ], [ - AM_CONDITIONAL(WITH_DBSQL, [ false ]) - ]) -+elif test ".$ac_cv_lib_db_5_3_db_create" = .yes; then -+RPM_CHECK_LIB( -+ [Berkeley-DB (+SQLite3)], [dbsql], -+ [db_sql-5.3], [sqlite3_open], [dbsql.h], -+ [yes,external], [db53/sql], -+ [ -+ AM_CONDITIONAL(WITH_DBSQL, [ true ]) -+ AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library]) -+ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then -+ WITH_DB_CPPFLAGS="${WITH_DB_CPPFLAGS} -I\$(top_srcdir)/db/sql/generated" -+ WITH_DB_LIBS="${WITH_DBSQL_LIBS}" -+ DBLIBSRCS="$DBLIBSRCS sqlite.c" -+ else -+ WITH_DBSQL_SUBDIR="" -+ fi -+ ], [ -+ AM_CONDITIONAL(WITH_DBSQL, [ false ]) -+ ]) -+else -+AM_CONDITIONAL(WITH_DBSQL, [ false ]) -+fi - - DBLIBOBJS=`echo $DBLIBSRCS | sed -e "s/\.c/\.lo/g"` - - AC_SUBST(DBLIBSRCS) - AC_SUBST(DBLIBOBJS) - -+AC_PATH_PROG(__DB_ARCHIVE, ${DBXY}_archive, %{_bindir}/${DBXY}_archive, $MYPATH) -+AC_PATH_PROG(__DB_CHECKPOINT, ${DBXY}_checkpoint, %{_bindir}/${DBXY}_checkpoint, $MYPATH) -+AC_PATH_PROG(__DB_DEADLOCK, ${DBXY}_deadlock, %{_bindir}/${DBXY}_deadlock, $MYPATH) -+AC_PATH_PROG(__DB_DUMP, ${DBXY}_dump, %{_bindir}/${DBXY}_dump, $MYPATH) -+AC_PATH_PROG(__DB_HOTBACKUP, ${DBXY}_hotbackup, %{_bindir}/${DBXY}_hotbackup, $MYPATH) -+AC_PATH_PROG(__DB_LOAD, ${DBXY}_load, %{_bindir}/${DBXY}_load, $MYPATH) -+AC_PATH_PROG(__DB_LOG_VERIFY, ${DBXY}_log_verify, %{_bindir}/${DBXY}_log_verify, $MYPATH) -+AC_PATH_PROG(__DB_PRINTLOG, ${DBXY}_printlog, %{_bindir}/${DBXY}_printlog, $MYPATH) -+AC_PATH_PROG(__DB_RECOVER, ${DBXY}_recover, %{_bindir}/${DBXY}_recover, $MYPATH) -+AC_PATH_PROG(__DB_REPLICATE, ${DBXY}_replicate, %{_bindir}/${DBXY}_replicate, $MYPATH) -+AC_PATH_PROG(__DBSQL, ${DBXY}sql, %{_bindir}/${DBXY}sql, $MYPATH) -+AC_PATH_PROG(__DB_SQL_CODEGEN, ${DBXY}_sql_codegen, %{_bindir}/${DBXY}_sql_codegen, $MYPATH) -+AC_PATH_PROG(__DB_STAT, ${DBXY}_stat, %{_bindir}/${DBXY}_stat, $MYPATH) -+AC_PATH_PROG(__DB_TUNER, ${DBXY}_tuner, %{_bindir}/${DBXY}_tuner, $MYPATH) -+AC_PATH_PROG(__DB_UPGRADE, ${DBXY}_upgrade, %{_bindir}/${DBXY}_upgrade, $MYPATH) -+AC_PATH_PROG(__DB_VERIFY, ${DBXY}_verify, %{_bindir}/${DBXY}_verify, $MYPATH) -+ - AC_ARG_WITH(db-largefile, AS_HELP_STRING([--with-db-largefile], [build Berkeley-DB with LARGEFILE support])) - AC_ARG_WITH(db-mutex, AS_HELP_STRING([--with-db-mutex=ARG], [build Berkeley-DB with MUTEX type ARG])) - diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch b/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch deleted file mode 100644 index 16b8e30a1d..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch +++ /dev/null @@ -1,77 +0,0 @@ -In certain cases with BerkleyDB 5.3.x we are getting the error: - -db3.c:1443: dbcursor->pget(-30999): BDB0063 DB_BUFFER_SMALL: User memory too small for return value - -See https://bugs.launchpad.net/rpm/+bug/934420 for more information. - -It appears to be some type of a bug in the BerkleyDB 5.3.x. In an attempt -to workaround the problem, when we encounter this situation we attempt -to adjust the size of the mmap buffer until the call works, or we -end up trying 10 times. The new size is either the updated vp->size -from the failed pget call, or the previous size + 1024. - -If DBI debugging is enabled, additional diagnostics are printed, otherwise -a basic retry and success message is added to show that the failure was -resolved. - -Upstream-Status: Inappropriate (workaround) - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/rpmdb/rpmdb.c -=================================================================== ---- rpm-5.4.14.orig/rpmdb/rpmdb.c -+++ rpm-5.4.14/rpmdb/rpmdb.c -@@ -2212,8 +2212,12 @@ static int rpmmiGet(dbiIndex dbi, DBC * - vp->flags |= DB_DBT_USERMEM; - rc = dbiGet(dbi, dbcursor, kp, vp, flags); - if (rc == DB_BUFFER_SMALL) { -+ int retry = 0; -+ size_t origlen = vp->size; - size_t uhlen = vp->size; -- void * uh = mmap(NULL, uhlen, _prot, _flags, _fdno, _off); -+ void * uh; -+retry_get: -+ uh = mmap(NULL, uhlen, _prot, _flags, _fdno, _off); - if (uh == NULL || uh == (void *)-1) - fprintf(stderr, - "==> mmap(%p[%u], 0x%x, 0x%x, %d, 0x%x) error(%d): %s\n", -@@ -2235,6 +2239,25 @@ static int rpmmiGet(dbiIndex dbi, DBC * - if (munmap(uh, uhlen) != 0) - fprintf(stderr, "==> munmap(%p[%u]) error(%d): %s\n", - uh, (unsigned)uhlen, errno, strerror(errno)); -+ /* We want to be sure to limit the number of retry attempts to avoid a loop! */ -+ if (rc == DB_BUFFER_SMALL && retry < 10) { -+ /* If we got a largr vp-size back, use that, otherwise increment the size by 1k */ -+ uhlen = vp->size > uhlen ? vp->size : uhlen + 1024; -+ retry++; -+ if ((dbi)->dbi_debug) -+ fprintf(stderr, "==> DB_BUFFER_SMALL orig requested (%d), configured (%d), forcing larger buffer (%d), new size (%d)\n", -+ origlen, vp->ulen, uhlen, vp->size); -+ else -+ fprintf(stderr, "==> retry (%d) db3cpget (%d)\n", retry, uhlen); -+ goto retry_get; -+ } -+ } -+ if (retry) { -+ if ((dbi)->dbi_debug) -+ fprintf(stderr, "==> success orig requested (%d), configured buffer (%d), buffer (%d), size after dbiGet (%d)\n", -+ origlen, vp->ulen, uhlen, vp->size); -+ else -+ fprintf(stderr, "==> success\n"); - } - } - } else -Index: rpm-5.4.14/rpmdb/db3.c -=================================================================== ---- rpm-5.4.14.orig/rpmdb/db3.c -+++ rpm-5.4.14/rpmdb/db3.c -@@ -1509,7 +1509,7 @@ assert(db != NULL); - #endif - } - --DBIDEBUG(dbi, (stderr, "<-- %s(%p,%p,%p,%p,%p,0x%x) rc %d %s%s\n", __FUNCTION__, dbi, dbcursor, key, pkey, data, flags, rc, _DBCFLAGS(flags), _KEYDATA(key, pkey, data, NULL))); -+DBIDEBUG(dbi, (stderr, "<-- %s(%p,%p,%p,%p,%p,0x%x) rc %d %s%s\n", __FUNCTION__, dbi, dbcursor, key, pkey, data, flags, rc, _DBCFLAGS(flags), _KEYDATA(key, pkey, rc == DB_BUFFER_SMALL ? NULL : data, NULL))); - return rc; - } - /*@=mustmod@*/ diff --git a/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch b/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch deleted file mode 100644 index 2eb6e0f26b..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch +++ /dev/null @@ -1,65 +0,0 @@ -Debug the platform score generation... - -Index: rpm-5.4.14/lib/rpmrc.c -=================================================================== ---- rpm-5.4.14.orig/lib/rpmrc.c -+++ rpm-5.4.14/lib/rpmrc.c -@@ -465,6 +465,8 @@ static rpmRC rpmPlatform(const char * pl - - rc = (rpmRC) rpmiobSlurp(platform, &iob); - -+ fprintf(stderr, "D: rpmPlatform file %s\n", platform); -+ - if (rc || iob == NULL) { - rc = RPMRC_FAIL; - goto exit; -@@ -486,6 +488,7 @@ static rpmRC rpmPlatform(const char * pl - while (--t > p && xisspace(*t)) - *t = '\0'; - if (t > p) { -+ fprintf(stderr, "D: rpmPlatform mireAppend REGEX %s\n", p); - xx = mireAppend(RPMMIRE_REGEX, 0, p, NULL, &mi_re, &mi_nre); - } - continue; -@@ -503,6 +506,11 @@ static rpmRC rpmPlatform(const char * pl - _gnu = rpmExpand("-", cvog->gnu, NULL); - - addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1); -+ fprintf(stderr, "D: rpmPlatform addMacro %s-%s-%s(%s)\n", -+ rpmExpand("%{_platform_cpu}", NULL), -+ rpmExpand("%{_platform_vendor}", NULL), -+ rpmExpand("%{_platform_os}", NULL), -+ rpmExpand("%{_platform_gnu}", NULL)); - #else - addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1); - addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1); -@@ -510,6 +518,7 @@ static rpmRC rpmPlatform(const char * pl - #endif - } - -+ fprintf(stderr, "D: rpmPlatform mireAppend STRCMP %s -- ", p); - #if !defined(RPM_VENDOR_OE) /* Skip the explicit-platform */ - #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */ - /* do not use vendor and GNU attribution */ -@@ -519,6 +528,7 @@ static rpmRC rpmPlatform(const char * pl - (cvog && *cvog->gnu ? "-" : NULL), - (cvog ? cvog->gnu : NULL), NULL); - #endif -+ fprintf(stderr, "%s\n", p); - xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre); - p = _free(p); - #endif -@@ -688,9 +698,12 @@ int rpmPlatformScore(const char * platfo - - if ((mire = (miRE) mi_re) != NULL) - for (i = 0; i < mi_nre; i++) { -- if (mireRegexec(mire + i, platform, 0) >= 0) -+ if (mireRegexec(mire + i, platform, 0) >= 0) { -+ fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, i + 1); - return (i + 1); -+ } - } -+ fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, 0); - return 0; - } - /*@=onlytrans@*/ diff --git a/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch deleted file mode 100644 index 8b5f8d66c8..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 70d881873b443c9bad502db9665595455d4f0ac9 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Tue, 8 Jul 2014 07:41:10 +0800 -Subject: [PATCH] configure.ac: disable -Wno-override-init - -Fixed rpm-native.do_configure error on CentOS 5.x: - -cc1: error: unrecognized command line option "-Wno-override-init" - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index adeffe0..6746b4c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -163,7 +163,7 @@ AC_ARG_ENABLE(build-warnings, - # XXX gcc-4.2 on Mac OS X hasn't - # CFLAGS="$CFLAGS -Wno-unused-but-set-variable" - # XXX rpmio/set.c needs this -- CFLAGS="$CFLAGS -Wno-override-init" -+# CFLAGS="$CFLAGS -Wno-override-init" - elif test ".`$CC -V 2>&1 | grep 'Sun C'`" != .; then - dnl # Sun Studio (usually "cc") - CFLAGS="$CFLAGS -v" --- -1.8.2.1 - diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch b/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch deleted file mode 100644 index b1db6fff72..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch +++ /dev/null @@ -1,36 +0,0 @@ -rpmfc.c: Always generate per-file information - -Even when the per-file dependency generate is disabled, we want to generate -per file classification and other associated data. - -Note: this is a temporary workaround. Eventually we will want to have a way -to seed per-file dependency and other information in order to generate a -package from previously determined information. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/lib/rpmfc.c -=================================================================== ---- rpm-5.4.14.orig/lib/rpmfc.c -+++ rpm-5.4.14/lib/rpmfc.c -@@ -1734,7 +1734,6 @@ rpmRC rpmfcGenerateDepends(void * _spec, - /* ... then generate dependencies using %{__find_requires} et al. */ - rc = rpmfcGenerateDependsHelper(spec, pkg, fi); - printDeps(pkg->header); -- return rc; - } - - /* Generate scriptlet Dependencies. */ -@@ -1762,8 +1761,8 @@ rpmRC rpmfcGenerateDepends(void * _spec, - av[ac] = NULL; - - fc = rpmfcNew(); -- fc->skipProv = !pkg->autoProv; -- fc->skipReq = !pkg->autoReq; -+ fc->skipProv = !pkg->autoProv || !internaldeps; -+ fc->skipReq = !pkg->autoReq || !internaldeps; - fc->tracked = 0; - - { const char * buildRootURL; diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch deleted file mode 100644 index 27a0a8df83..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch +++ /dev/null @@ -1,30 +0,0 @@ -Occasionally the cp -p fails with a non-zero return code. This will cause -the system abort the build. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm/rpmdb/Makefile.am -=================================================================== ---- rpm.orig/rpmdb/Makefile.am -+++ rpm/rpmdb/Makefile.am -@@ -234,11 +234,14 @@ lcov-report: - #lcov-upload: lcov - # rsync -rvz -e ssh --delete lcov/* ??? - -+$(builddir)/logio_recover_template: $(srcdir)/logio_recover_template -+ @if test ".$(builddir)" != ".$(srcdir)"; then \ -+ cp -fp $(srcdir)/logio_recover_template \ -+ $(builddir)/logio_recover_template ; \ -+ fi -+ - logio_BUILT = logio_auto.c logio_autop.c logio_auto.h logio_template --$(logio_BUILT): logio.awk logio.src logio_recover_template -- @test -e $(builddir)/logio_recover_template || \ -- cp -p $(srcdir)/logio_recover_template \ -- $(builddir)/logio_recover_template -+$(logio_BUILT): logio.awk logio.src $(builddir)/logio_recover_template - @rm -f $(logio_BUILT) - @$(AWK) -f $(srcdir)/logio.awk \ - -v header_file=logio_auto.h \ diff --git a/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch deleted file mode 100644 index 5deb2323ef..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch +++ /dev/null @@ -1,43 +0,0 @@ -We need to sanity check that the nlink size and our linksLeft counter -do match. If an rpm is badly constructed with identical inode values -for multiple hardlinked files, such an rpm will otherwise access memory -out of array bounds and cause memory corruption and crashes. - -The fix is to add in the sanity check and exit if bad circumstances -are found. We need to fix the caller to check the return code too. - -RP 2014/6/10 - -Upstream-Status: Pending - -Index: rpm-5.4.14/lib/fsm.c -=================================================================== ---- rpm-5.4.14.orig/lib/fsm.c -+++ rpm-5.4.14/lib/fsm.c -@@ -495,6 +495,11 @@ static int saveHardLink(/*@special@*/ /* - } - - if (fsm->goal == IOSM_PKGBUILD) --fsm->li->linksLeft; -+ if (fsm->li->linksLeft > st->st_nlink) { -+ rpmlog(RPMLOG_ERR, _("Corrupted hardlinks found (count %d does not match %d), exiting.\n"), fsm->li->linksLeft, st->st_nlink); -+ return -1; -+ } -+ - fsm->li->filex[fsm->li->linksLeft] = fsm->ix; - /*@-observertrans -dependenttrans@*/ - fsm->li->nsuffix[fsm->li->linksLeft] = fsm->nsuffix; -@@ -1878,8 +1883,13 @@ if (!(fsmGetFi(fsm)->mapflags & IOSM_PAY - fsm->postpone = iosmFileActionSkipped(fsm->action); - if (fsm->goal == IOSM_PKGINSTALL || fsm->goal == IOSM_PKGBUILD) { - /*@-evalorder@*/ /* FIX: saveHardLink can modify fsm */ -- if (S_ISREG(st->st_mode) && st->st_nlink > 1) -+ if (S_ISREG(st->st_mode) && st->st_nlink > 1) { - fsm->postpone = saveHardLink(fsm); -+ if (fsm->postpone < 0) { -+ rc = RPMRC_FAIL; -+ break; -+ } -+ } - /*@=evalorder@*/ - } - if (fsmGetFi(fsm)->mapflags & IOSM_PAYLOAD_LIST) fsm->postpone = 1; diff --git a/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch deleted file mode 100644 index 042e412ede..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -During installation, the libtool relink attempts to link to -lrpm... -The problem is that it hasn't been installed yet! So small change causes -the libtool to instead use the build version. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/lib/Makefile.am -=================================================================== ---- rpm-5.4.14.orig/lib/Makefile.am -+++ rpm-5.4.14/lib/Makefile.am -@@ -120,6 +120,9 @@ librpm.la: $(librpm_la_OBJECTS) $(librpm - #libsql_la_SOURCES = libsql.c - #libsql_la_LIBADD = librpm.la $(RPMDB_LDADD_COMMON) - -+# pkglib libraries needs to have usrlib libraries already installed! -+install-pkglibLTLIBRARIES: install-usrlibLTLIBRARIES -+ - install-data-hook: - if !ENABLE_BUILD_LAFILES - -for l in $(usrlib_LTLIBRARIES); do \ diff --git a/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch b/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch deleted file mode 100644 index 3153f7a386..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch +++ /dev/null @@ -1,15 +0,0 @@ - -Upstream-Status: Inappropriate [configuration] - -Index: rpm-5.4.14/rpmdb/DB_CONFIG.in -=================================================================== ---- rpm-5.4.14.orig/rpmdb/DB_CONFIG.in -+++ rpm-5.4.14/rpmdb/DB_CONFIG.in -@@ -4,6 +4,7 @@ set_data_dir . - set_create_dir . - set_lg_dir ./log - set_tmp_dir ./tmp -+set_flags db_log_autoremove on - - # -- thread_count must be >= 8 - set_thread_count 64 diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch b/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch deleted file mode 100644 index 790a662170..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch +++ /dev/null @@ -1,24 +0,0 @@ -Enable platform tag matching workaround in OE. - -When installing some LSB packages the 'platform' field in the package -appears to be invalid. Instead of relying solely on the platform comparison -we also want to generate a perceived platform based on the valid rpm contents -of arch and os. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/lib/depends.c -=================================================================== ---- rpm-5.4.14.orig/lib/depends.c -+++ rpm-5.4.14/lib/depends.c -@@ -595,7 +595,7 @@ int rpmtsAddInstallElement(rpmts ts, Hea - platform = rpmExpand(arch, "-unknown-", os, NULL); - - rc = rpmPlatformScore(platform, platpat, nplatpat); --#if defined(RPM_VENDOR_MANDRIVA) -+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE) - /* - * If no match on platform tag, we'll try again with arch tag - * in case platform tag is inconsistent with it, which is the case diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch b/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch deleted file mode 100644 index 7ab49e97e2..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch +++ /dev/null @@ -1,104 +0,0 @@ -Lua 'print' statement is not working properly inside of RPM 5 - -The print statement should capture the output and send it to the script -processing engine, and not display it directly to the screen. - -This patch is from: http://rpm5.org/cvs/patchset?cn=17671 - -Upstream-Status: backport (patchset 17671 from rpm5.org) - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/CHANGES -=================================================================== ---- rpm-5.4.14.orig/CHANGES -+++ rpm-5.4.14/CHANGES -@@ -1,3 +1,4 @@ -+ - jbj: lua: fix: resurrect output capture with lua-5.2. - - jbj: verify: fix: broken logic for %ghost avoidance (Mark Hatle). - - 5.4.13 -> 5.4.14: -Index: rpm-5.4.14/rpmio/rpmlua.c -=================================================================== ---- rpm-5.4.14.orig/rpmio/rpmlua.c -+++ rpm-5.4.14/rpmio/rpmlua.c -@@ -175,7 +175,7 @@ rpmlua rpmluaNew(void) - }; - /*@=readonlytrans =nullassign @*/ - /*@observer@*/ /*@unchecked@*/ -- const luaL_Reg *lib = lualibs; -+ const luaL_Reg *lib; - char *path_buf; - char *path_next; - char *path; -@@ -190,31 +190,34 @@ rpmlua rpmluaNew(void) - - luaL_openlibs(L); - -- for (; lib->name; lib++) { -+ for (lib = lualibs; lib->name; lib++) { - luaL_requiref(L, lib->name, lib->func, 1); -+ lua_pop(L, 1); - } - - { const char * _lua_path = rpmGetPath(rpmluaPath, NULL); - if (_lua_path != NULL) { -+#if defined(LUA_GLOBALSINDEX) - lua_pushliteral(L, "LUA_PATH"); - lua_pushstring(L, _lua_path); -+ lua_rawset(L, LUA_GLOBALSINDEX); -+#else -+ lua_pushstring(L, _lua_path); -+ lua_setglobal(L, "LUA_PATH"); -+#endif - _lua_path = _free(_lua_path); - } - } - - #if defined(LUA_GLOBALSINDEX) -- lua_rawset(L, LUA_GLOBALSINDEX); --#else -- lua_pushglobaltable(L); --#endif - lua_pushliteral(L, "print"); - lua_pushcfunction(L, rpm_print); -- --#if defined(LUA_GLOBALSINDEX) - lua_rawset(L, LUA_GLOBALSINDEX); - #else -- lua_pushglobaltable(L); -+ lua_pushcfunction(L, rpm_print); -+ lua_setglobal(L, "print"); - #endif -+ - rpmluaSetData(lua, "lua", lua); - - /* load all standard RPM Lua script files */ -@@ -351,6 +354,9 @@ void rpmluaSetVar(rpmlua _lua, rpmluav v - #if defined(LUA_GLOBALSINDEX) - if (lua->pushsize == 0) - lua_pushvalue(L, LUA_GLOBALSINDEX); -+#else -+ if (lua->pushsize == 0) -+ lua_pushglobaltable(L); - #endif - if (pushvar(L, var->keyType, &var->key) != -1) { - if (pushvar(L, var->valueType, &var->value) != -1) -@@ -1039,14 +1045,15 @@ static int rpm_print (lua_State *L) - lua_getglobal(L, "tostring"); - for (i = 1; i <= n; i++) { - const char *s; -+ size_t l; - lua_pushvalue(L, -1); /* function to be called */ - lua_pushvalue(L, i); /* value to print */ - lua_call(L, 1, 1); -- s = lua_tostring(L, -1); /* get result */ -+ s = lua_tolstring(L, -1, &l); /* get result */ - if (s == NULL) - return luaL_error(L, "`tostring' must return a string to `print'"); - if (lua->storeprint) { -- size_t sl = lua_rawlen(L, -1); -+ size_t sl = l; - if ((size_t)(lua->printbufused+sl+1) > lua->printbufsize) { - lua->printbufsize += sl+512; - lua->printbuf = (char *) xrealloc(lua->printbuf, lua->printbufsize); diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lua.patch b/meta/recipes-devtools/rpm/rpm/rpm-lua.patch deleted file mode 100644 index a9930d6705..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-lua.patch +++ /dev/null @@ -1,33 +0,0 @@ -Add support for cross compiling lua - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/configure.ac -=================================================================== ---- rpm-5.4.14.orig/configure.ac -+++ rpm-5.4.14/configure.ac -@@ -121,6 +121,9 @@ AC_PROG_YACC - - AC_PATH_PROG(AS, as, as) - -+CC_FOR_BUILD=${CC_FOR_BUILD-\$(CC)} -+AC_SUBST(CC_FOR_BUILD) -+ - dnl # GCC specifics - AC_PROG_GCC_TRADITIONAL - AC_ARG_ENABLE(build-pic, -Index: rpm-5.4.14/lua/Makefile.am -=================================================================== ---- rpm-5.4.14.orig/lua/Makefile.am -+++ rpm-5.4.14/lua/Makefile.am -@@ -41,7 +41,7 @@ rpmluac_LDADD = liblua.la - - # --- bin2c doesn't need anything but a compiler - bin2c$(EXEEXT): bin2c.c -- $(CC) -o $@ $< -+ $(CC_FOR_BUILD) -o $@ $< - - liblua_la_SOURCES = - liblua_la_CFLAGS = @WITH_LUA_SUBDIR_DEF@ diff --git a/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch b/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch deleted file mode 100644 index 07a0cfa300..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch +++ /dev/null @@ -1,27 +0,0 @@ -disable external key server - -Upstream-Status: Pending - -When RPM experiences a signed package, with a signature that it does NOT know. -By default it will send the -fingerprint- (and only the 16 digit fingerprint) to -an external HKP server, trying to get the key down. - -This is probably not a reasonable default behavior for the system to do, instead -it should simply fail the key lookup. If someone wants to enable the HKP server -it's easy enough to do by enabling the necessary macros. - -Signed-off-by: yzhu1 <yanjun.zhu@windriver.com> -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> ---- a/macros/macros.in -+++ b/macros/macros.in -@@ -546,8 +546,8 @@ $_arbitrary_tags_tests Foo:Bar - # Horowitz Key Protocol server configuration - # - #%_hkp_keyserver hkp://keys.n3npq.net --%_hkp_keyserver hkp://pool.sks-keyservers.net --%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search= -+#%_hkp_keyserver hkp://pool.sks-keyservers.net -+#%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search= - - - %_nssdb_path /etc/pki/nssdb diff --git a/meta/recipes-devtools/rpm/rpm/rpm-macros.patch b/meta/recipes-devtools/rpm/rpm/rpm-macros.patch deleted file mode 100644 index c7ab2d2bb7..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-macros.patch +++ /dev/null @@ -1,64 +0,0 @@ -macros/macros.in: Revert settings to the same as RPM 5.4.0 - -Enable a reasonable set of rpmdeps dependency helper macros. These sets -were used by RPM 5.4.0. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/macros/macros.in -=================================================================== ---- rpm-5.4.14.orig/macros/macros.in -+++ rpm-5.4.14/macros/macros.in -@@ -1022,7 +1022,7 @@ $_arbitrary_tags_tests Foo:Bar - - #============================================================================== - # ---- rpmbuild macros. --#%%{load:%{_usrlibrpm}/macros.rpmbuild} -+%{load:%{_usrlibrpm}/macros.rpmbuild} - - #------------------------------------------------------------------------ - # cmake(...) configuration -@@ -1038,15 +1038,15 @@ $_arbitrary_tags_tests Foo:Bar - - #------------------------------------------------------------------------ - # perl(...) configuration --#%%{load:%{_usrlibrpm}/macros.d/perl} -+%{load:%{_usrlibrpm}/macros.d/perl} - - #------------------------------------------------------------------------ - # python(...) configuration. --#%%{load:%{_usrlibrpm}/macros.d/python} -+%{load:%{_usrlibrpm}/macros.d/python} - - #------------------------------------------------------------------------ - # php(...) configuration. --#%%{load:%{_usrlibrpm}/macros.d/php} -+%{load:%{_usrlibrpm}/macros.d/php} - - #------------------------------------------------------------------------ - # java(...) configuration. -@@ -1054,11 +1054,11 @@ $_arbitrary_tags_tests Foo:Bar - - #------------------------------------------------------------------------ - # libtool(...) configuration. --#%%{load:%{_usrlibrpm}/macros.d/libtool} -+%{load:%{_usrlibrpm}/macros.d/libtool} - - #------------------------------------------------------------------------ - # pkgconfig(...) configuration. --#%%{load:%{_usrlibrpm}/macros.d/pkgconfig} -+%{load:%{_usrlibrpm}/macros.d/pkgconfig} - - #------------------------------------------------------------------------ - # mono(...) configuration. -@@ -1070,7 +1070,7 @@ $_arbitrary_tags_tests Foo:Bar - - #------------------------------------------------------------------------ - # tcl(...) configuration. --#%%{load:%{_usrlibrpm}/macros.d/tcl} -+%{load:%{_usrlibrpm}/macros.d/tcl} - - #------------------------------------------------------------------------ - # typelib(...) configuration. diff --git a/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch b/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch deleted file mode 100644 index ab6ed2c3a4..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch +++ /dev/null @@ -1,19 +0,0 @@ -lib/order.c: Make the dependency loop messages into debug msgs - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/lib/order.c -=================================================================== ---- rpm-5.4.14.orig/lib/order.c -+++ rpm-5.4.14/lib/order.c -@@ -2175,7 +2175,7 @@ rescan: - const char * dp; - rpmlogLvl msglvl = (anaconda || (rpmtsDFlags(ts) & RPMDEPS_FLAG_DEPLOOPS)) - ? RPMLOG_WARNING : RPMLOG_ERR; --#if defined(RPM_VENDOR_MANDRIVA) /* loop-detection-optional-loglevel */ -+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE) /* loop-detection-optional-loglevel */ - // Report loops as debug-level message by default (7 = RPMLOG_DEBUG), overridable - msglvl = rpmExpandNumeric("%{?_loop_detection_loglevel}%{?!_loop_detection_loglevel:7}"); - #endif diff --git a/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch b/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch deleted file mode 100644 index 58182296cf..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch +++ /dev/null @@ -1,47 +0,0 @@ -Disable perl-URPM support - -This causes a configure failure when perl-URPM is not used. - -| configure.ac:1159: required file `perl-URPM/Makefile.PL.in' not found -| configure.ac:1159: required file `perl-URPM/Makefile.in' not found - -Upstream-Status: Inappropriate [disable feature] - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/configure.ac -=================================================================== ---- rpm-5.4.14.orig/configure.ac -+++ rpm-5.4.14/configure.ac -@@ -1186,30 +1186,10 @@ AC_SUBST(WITH_PERL_SUBDIR) - AC_SUBST(WITH_PERL_SUBPACKAGE) - AC_SUBST(WITH_PERL_LIBS) - --dnl # optional Perl-URPM language bindings -+dnl # disable Perl-URPM language bindings - WITH_PERL_URPM_SUBDIR="" - WITH_PERL_URPM_SUBPACKAGE=0 - WITH_PERL_URPM_LIBS="" --if test ".$WITH_PTHREADS" = .yes; then -- WITH_PERL_URPM_LIBS="$LIBS" --fi --AC_ARG_WITH(perl-urpm, AS_HELP_STRING([--with-perl-urpm], [build with Perl URPM language bindings]), [ -- if test ".$withval" != .no; then -- PERL_URPM_INSTALLDIRS="" -- if test "$withval" == "vendor"; then -- PERL_URPM_INSTALLDIRS="'INSTALLDIRS' => 'vendor'," -- fi -- if test "$withval" == "site"; then -- PERL_URPM_INSTALLDIRS="'INSTALLDIRS' => 'site'," -- fi -- AC_DEFINE_UNQUOTED([PERL_URPM_INSTALLDIRS], [$PERL_URPM_INSTALLDIRS], [Perl install directory (vendor/site)]) -- AC_SUBST(PERL_URPM_INSTALLDIRS) -- WITH_PERL_URPM_SUBDIR=perl-URPM -- WITH_PERL_URPM_SUBPACKAGE=1 -- AC_CONFIG_FILES([perl-URPM/Makefile.PL]) -- AC_CONFIG_FILES([perl-URPM/Makefile]) -- fi --]) - AC_SUBST(WITH_PERL_URPM_SUBDIR) - AC_SUBST(WITH_PERL_URPM_SUBPACKAGE) - AC_SUBST(WITH_PERL_URPM_LIBS) diff --git a/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch b/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch deleted file mode 100644 index 07d586a3ab..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch +++ /dev/null @@ -1,24 +0,0 @@ -rpm: opendb before rpmverifyscript to avoid null point input - -If the command is "rpm -V" and the return value of (headerIsEntry(h, RPMTAG_VERIFYSCRIPT) -|| headerIsEntry(h, RPMTAG_SANITYCHECK)) located in /lib/verify.c is true, it will call -rpmpsmStage function(rpmVerifyScript->rpmpsmScriptStage->rpmpsmStage) and occur segment -fault because of null point(rpmtsGetRdb(ts) == NULL and rpmtsGetRdb(ts)->db_txn). -So we open rpmdb to avoid bad input when find headerIsEntry true. - -Upstream-Status: Pending - -Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> -Index: rpm-5.4.14/lib/verify.c -=================================================================== ---- rpm-5.4.14.orig/lib/verify.c 2015-07-22 22:09:59.992895355 +0800 -+++ rpm-5.4.14/lib/verify.c 2015-08-13 10:20:33.752177906 +0800 -@@ -613,6 +613,8 @@ - { - FD_t fdo = fdDup(STDOUT_FILENO); - -+ rpmtsOpenDB(ts, O_RDONLY); /*Open the DB to avoid null point input in function rpmpsmStage()*/ -+ - rc = rpmfiSetHeader(fi, h); - if ((rc = rpmVerifyScript(qva, ts, fi, fdo)) != 0) - ec += rc; diff --git a/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch b/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch deleted file mode 100644 index 691aba9ea3..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch +++ /dev/null @@ -1,23 +0,0 @@ -Fix integration of ossp-uuid - -We need to avoid including the util-linux uuid library, instead -we need ossp-uuid. There is a related hack in do_configure to -make sure that we use the right .pc file as well. - -Upstream-Status: Inappropriate [disable feature] - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/configure.ac -=================================================================== ---- rpm-5.4.14.orig/configure.ac -+++ rpm-5.4.14/configure.ac -@@ -1951,7 +1951,7 @@ grep -v 'define HAVE_UNISTD_H' confdefs. - esac - RPM_CHECK_LIB( - [OSSP uuid], [uuid], -- [ossp-uuid uuid], [uuid_import], [uuid.h], -+ [ossp-uuid], [uuid_import], [uuid.h], - [no,external:none], [], - [ dnl # enable OSSP uuid native API support for embedded Lua - if test ".$WITH_LUA" = .yes; then diff --git a/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch b/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch deleted file mode 100644 index c15e12405d..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch +++ /dev/null @@ -1,25 +0,0 @@ -Add the ability to query the packageorigin - -Written by jbj at rpm5.org - -Upstream-Status: Inappropriate [not author] - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/rpmdb/hdrfmt.c -=================================================================== ---- rpm-5.4.14.orig/rpmdb/hdrfmt.c -+++ rpm-5.4.14/rpmdb/hdrfmt.c -@@ -2409,8 +2409,10 @@ static int pkgoriginTag(Header h, HE_t h - int rc = 1; - - he->tag = RPMTAG_PACKAGEORIGIN; -- if (!headerGet(h, he, HEADERGET_NOEXTENSION) -- && (origin = headerGetOrigin(h)) != NULL) -+ /* XXX two sources for tag data: what search precedence? */ -+ if (headerGet(h, he, HEADERGET_NOEXTENSION)) -+ rc = 0; -+ else if ((origin = headerGetOrigin(h)) != NULL) - { - he->t = RPM_STRING_TYPE; - he->p.str = xstrdup(origin); diff --git a/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch b/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch deleted file mode 100644 index 9cd02a0f92..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch +++ /dev/null @@ -1,146 +0,0 @@ -If we run builds on a filesystem with 64 bit inodes like XFS, we need to -map the inode numbers to something 32 bit since the cpio header only allows -for 32 bit inode values. If we don't do this: - -#define SET_NUM_FIELD(phys, val, space) \ - sprintf(space, "%8.8lx", (unsigned long) (val)); \ - memcpy(phys, space, 8) - -from cpio.c will print larger that 8 character values and then truncate the -LSBs. This generates cpio files where hardlinked files may have the same -inode number. The resulting rpms are then corrupted. - -There is a separate patch for the crash the identical inode numbers causes -when extracting the rpm. - -Patch taken from http://git.pld-linux.org/?p=packages/rpm.git;a=commitdiff;h=10526c23aac60b7b636e4c93862887dbef8e8f15 - -RP 2014/6/10 - -Upstream-Status: Pending - -Index: rpm-5.4.14/build/files.c -=================================================================== ---- rpm-5.4.14.orig/build/files.c -+++ rpm-5.4.14/build/files.c -@@ -1328,6 +1328,26 @@ static rpmuint32_t getDigestAlgo(Header - return dalgo; - } - -+static int isHardLink(FileListRec flp, FileListRec tlp) -+{ -+ return ((S_ISREG(flp->fl_mode) && S_ISREG(tlp->fl_mode)) && -+ ((flp->fl_nlink > 1) && (flp->fl_nlink == tlp->fl_nlink)) && -+ (flp->fl_ino == tlp->fl_ino) && -+ (flp->fl_dev == tlp->fl_dev)); -+} -+ -+static int seenHardLink(FileList fl, FileListRec flp, ino_t *fileid) -+{ -+ FileListRec ilp; -+ for (ilp = fl->fileList; ilp < flp; ilp++) { -+ if (isHardLink(flp, ilp)) { -+ *fileid = ilp - fl->fileList; -+ return 1; -+ } -+ } -+ return 0; -+} -+ - /** - * Add file entries to header. - * @todo Should directories have %doc/%config attributes? (#14531) -@@ -1374,6 +1394,7 @@ memset(buf, 0, sizeof(buf)); /* XXX valg - - for (i = 0, flp = fl->fileList; i < fl->fileListRecsUsed; i++, flp++) { - const char *s; -+ ino_t fileid = flp - fl->fileList; - - /* Merge duplicate entries. */ - while (i < (fl->fileListRecsUsed - 1) && -@@ -1436,6 +1457,13 @@ memset(buf, 0, sizeof(buf)); /* XXX valg - /* Leave room for both dirname and basename NUL's */ - dpathlen += (strlen(flp->diskURL) + 2); - -+ /* Excludes and dupes have been filtered out by now. */ -+ if (S_ISREG(flp->fl_mode)) { -+ if (flp->fl_nlink == 1 || !seenHardLink(fl, flp, &fileid)) { -+ fl->totalFileSize += flp->fl_size; -+ } -+ } -+ - /* - * Make the header, the OLDFILENAMES will get converted to a - * compressed file list write before we write the actual package to -@@ -1518,7 +1546,11 @@ memset(buf, 0, sizeof(buf)); /* XXX valg - - /* XXX Hash instead of 64b->32b truncate to prevent aliasing. */ - { ino_t _ino = flp->fl_ino; -+ /* don't use hash here, as hash collisions which happen on large packages -+ cause bus errors in rpmbuild - ui32 = hashFunctionString(0, &_ino, sizeof(_ino)); -+ */ -+ ui32 = fileid + 1; - } - he->tag = RPMTAG_FILEINODES; - he->t = RPM_UINT32_TYPE; -@@ -1751,39 +1783,6 @@ if (_rpmbuildFlags & 4) { - IOSM_MAP_TYPE | IOSM_MAP_MODE | IOSM_MAP_UID | IOSM_MAP_GID; - if (isSrc) - fi->fmapflags[i] |= IOSM_FOLLOW_SYMLINKS; -- -- if (S_ISREG(flp->fl_mode)) { -- int bingo = 1; -- /* Hard links need be tallied only once. */ -- if (flp->fl_nlink > 1) { -- FileListRec jlp = flp + 1; -- int j = i + 1; -- for (; (unsigned)j < fi->fc; j++, jlp++) { -- /* follow outer loop logic */ -- while (((jlp - fl->fileList) < (fl->fileListRecsUsed - 1)) && -- !strcmp(jlp->fileURL, jlp[1].fileURL)) -- jlp++; -- if (jlp->flags & RPMFILE_EXCLUDE) { -- j--; -- /*@innercontinue@*/ continue; -- } -- if (jlp->flags & RPMFILE_GHOST) -- /*@innercontinue@*/ continue; -- if (!S_ISREG(jlp->fl_mode)) -- /*@innercontinue@*/ continue; -- if (flp->fl_nlink != jlp->fl_nlink) -- /*@innercontinue@*/ continue; -- if (flp->fl_ino != jlp->fl_ino) -- /*@innercontinue@*/ continue; -- if (flp->fl_dev != jlp->fl_dev) -- /*@innercontinue@*/ continue; -- bingo = 0; /* don't tally hardlink yet. */ -- /*@innerbreak@*/ break; -- } -- } -- if (bingo) -- fl->totalFileSize += flp->fl_size; -- } - } - - ui32 = fl->totalFileSize; -Index: rpm-5.4.14/lib/fsm.c -=================================================================== ---- rpm-5.4.14.orig/lib/fsm.c -+++ rpm-5.4.14/lib/fsm.c -@@ -904,6 +904,7 @@ int fsmMapAttrs(IOSM_t fsm) - - if (fi && i >= 0 && i < (int) fi->fc) { - mode_t perms = (S_ISDIR(st->st_mode) ? fi->dperms : fi->fperms); -+ ino_t finalInode = (fi->finodes ? (ino_t)fi->finodes[i] : 0); - mode_t finalMode = (fi->fmodes ? (mode_t)fi->fmodes[i] : perms); - dev_t finalRdev = (dev_t)(fi->frdevs ? fi->frdevs[i] : 0); - rpmuint32_t finalMtime = (fi->fmtimes ? fi->fmtimes[i] : 0); -@@ -943,6 +944,7 @@ int fsmMapAttrs(IOSM_t fsm) - if ((S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) - && st->st_nlink == 0) - st->st_nlink = 1; -+ st->st_ino = finalInode; - st->st_rdev = finalRdev; - st->st_mtime = finalMtime; - } diff --git a/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch b/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch deleted file mode 100644 index 5d182ad9fe..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch +++ /dev/null @@ -1,37 +0,0 @@ -pkgconfigdeps.sh: Change to restricting pkgconfig to the local directory - -Using PKG_CONFIG_PATH will allow pkg-config to fall back to the system paths, -we don't want this as it may lead to inaccurate results in some corner cases. - -PKG_CONFIG_LIBDIR will ensure pkg-config stays within the install directory. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/scripts/pkgconfigdeps.sh -=================================================================== ---- rpm-5.4.14.orig/scripts/pkgconfigdeps.sh -+++ rpm-5.4.14/scripts/pkgconfigdeps.sh -@@ -18,8 +18,8 @@ case $1 in - *.pc) - # Query the dependencies of the package. - DIR=`dirname ${filename}` -- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" -- export PKG_CONFIG_PATH -+ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig" -+ export PKG_CONFIG_LIBDIR - $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do - [ -n "$n" ] || continue - # We have a dependency. Make a note that we need the pkgconfig -@@ -42,8 +42,8 @@ case $1 in - [ -n "$oneshot" ] && echo "$oneshot"; oneshot="" - # Query the dependencies of the package. - DIR=`dirname ${filename}` -- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" -- export PKG_CONFIG_PATH -+ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig" -+ export PKG_CONFIG_LIBDIR - $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do - [ -n "$n" ] || continue - if [ -n "$r" ] && [ -n "$v" ]; then diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch deleted file mode 100644 index f26a6e79da..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch +++ /dev/null @@ -1,28 +0,0 @@ -Don't add the first line of /etc/rpm/platform to the list of patterns -to match when computing an arch score, use it just for getting -information about the platform (cpu/vendor/os). Fixes #3864. - -Upstream-Status: Inappropriate [embedded specific] - -Index: rpm-5.4.14/lib/rpmrc.c -=================================================================== ---- rpm-5.4.14.orig/lib/rpmrc.c -+++ rpm-5.4.14/lib/rpmrc.c -@@ -510,6 +510,7 @@ static rpmRC rpmPlatform(const char * pl - #endif - } - -+#if !defined(RPM_VENDOR_OE) /* Skip the explicit-platform */ - #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */ - /* do not use vendor and GNU attribution */ - p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL); -@@ -520,7 +521,8 @@ static rpmRC rpmPlatform(const char * pl - #endif - xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre); - p = _free(p); -- -+#endif -+ - init_platform++; - } - rc = (init_platform ? RPMRC_OK : RPMRC_FAIL); diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform.patch deleted file mode 100644 index 11fd039036..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-platform.patch +++ /dev/null @@ -1,137 +0,0 @@ -Fix up platform and related sysinfo file loading. - -Upstream-Status: Pending - -This ensures that RPM knows the compatible set of package types at all times. - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/lib/depends.c -=================================================================== ---- rpm-5.4.14.orig/lib/depends.c -+++ rpm-5.4.14/lib/depends.c -@@ -250,7 +250,7 @@ static int rpmtsAddUpgrades(rpmts ts, rp - he->p.ptr = _free(he->p.ptr); - } - --#if defined(RPM_VENDOR_WINDRIVER) -+#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE) - /* - * If we're capable of installing multiple colors - * but at least one of the packages are white (0), we -@@ -507,7 +507,7 @@ assert(lastx >= 0 && lastx < ts->orderCo - return 0; - } - --#if defined(RPM_VENDOR_WINDRIVER) -+#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE) - /* Is "compat" compatible w/ arch? */ - int _isCompatibleArch(const char * arch, const char * compat) - { -@@ -663,7 +663,7 @@ assert(he->p.str != NULL); - - if (arch == NULL || (parch = rpmteA(p)) == NULL) - continue; --#if defined(RPM_VENDOR_WINDRIVER) -+#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE) - /* XXX hackery for alias matching. */ - if (!_isCompatibleArch(arch, parch)) - continue; -@@ -829,6 +829,12 @@ int rpmtsAddEraseElement(rpmts ts, Heade - return rc; - } - -+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE) -+#define _ETC_RPM_SYSINFO "%{_etcrpm}/sysinfo" -+#else -+#define _ETC_RPM_SYSINFO SYSCONFIGDIR "/sysinfo" -+#endif -+ - /*@only@*/ /*@null@*/ /*@unchecked@*/ - static char *sysinfo_path = NULL; - -@@ -1311,7 +1317,7 @@ retry: - sysinfo_path = rpmExpand("%{?_rpmds_sysinfo_path}", NULL); - if (!(sysinfo_path != NULL && *sysinfo_path == '/')) { - sysinfo_path = _free(sysinfo_path); -- sysinfo_path = xstrdup(SYSCONFIGDIR "/sysinfo"); -+ sysinfo_path = rpmExpand(_ETC_RPM_SYSINFO, NULL); - } - } - -Index: rpm-5.4.14/lib/rpmds.c -=================================================================== ---- rpm-5.4.14.orig/lib/rpmds.c -+++ rpm-5.4.14/lib/rpmds.c -@@ -1759,7 +1759,7 @@ int rpmdsSysinfo(rpmPRCO PRCO, const cha - /*@-observertrans @*/ - _sysinfo_path = _free(_sysinfo_path); - /*@=observertrans @*/ -- _sysinfo_path = xstrdup(_ETC_RPM_SYSINFO); -+ _sysinfo_path = rpmExpand(_ETC_RPM_SYSINFO, NULL); - } - } - /*@=modobserver@*/ -Index: rpm-5.4.14/lib/rpmrc.c -=================================================================== ---- rpm-5.4.14.orig/lib/rpmrc.c -+++ rpm-5.4.14/lib/rpmrc.c -@@ -38,7 +38,13 @@ - static const char * configTarget = NULL; - - /*@observer@*/ /*@unchecked@*/ --static const char * platform = SYSCONFIGDIR "/platform"; -+#if defined(RPM_VENDOR_WINDRIVER) -+#define _ETC_RPM_PLATFORM "%{_etcrpm}/platform" -+#else -+#define _ETC_RPM_PLATFORM SYSCONFIGDIR "/platform" -+#endif -+ -+static const char * _platform = NULL; - - /*@only@*/ /*@relnull@*/ /*@unchecked@*/ - void * platpat = NULL; -@@ -694,16 +700,17 @@ static void defaultMachine(/*@out@*/ con - int rc; - - while (!gotDefaults) { --#if defined(RPM_VENDOR_WINDRIVER) -- const char * _platform = rpmGetPath(__etcrpm, "/platform", NULL); --#else -- const char * _platform = platform; --#endif -+ if (_platform == NULL) { -+ _platform = rpmExpand("%{?_rpmrc_platform_path}", NULL); -+ /* XXX may need to validate path existence somewhen. */ -+ if (!(_platform != NULL && *_platform == '/')) { -+ _platform = _free(_platform); -+ _platform = rpmExpand(_ETC_RPM_PLATFORM, NULL); -+ } -+ } - CVOG_t cvog = NULL; - #if defined(RPM_VENDOR_OPENPKG) /* larger-utsname */ - const char *cp; --#endif --#if defined(RPM_VENDOR_OPENPKG) /* larger-utsname */ - /* utsname fields on some platforms (like HP-UX) are very small - (just about 8 characters). This is too small for OpenPKG, so cheat! */ - rc = uname(&un_real); -@@ -780,9 +787,7 @@ static void defaultMachine(/*@out@*/ con - if (cp != NULL && cp != _platform) - cp = _free(cp); - #endif --#if defined(RPM_VENDOR_WINDRIVER) - _platform = _free(_platform); --#endif - - if (configTarget && !parseCVOG(configTarget, &cvog) && cvog != NULL) { - gotDefaults = 1; -@@ -1101,6 +1106,8 @@ int rpmReadConfigFiles(/*@unused@*/ cons - - #ifdef PREMACROFILES - if (rpmReadRC(PREMACROFILES)) return -1; -+#else -+ if (rpmReadRC(NULL)) return -1; - #endif - - /* Reset umask to its default umask(2) value. */ diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch deleted file mode 100644 index fed54e5f11..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch +++ /dev/null @@ -1,105 +0,0 @@ -Fix up platform and related sysinfo file loading (part 2). - -Upstream-Status: Pending - -We need to ensure that we set the _gnu flag somehow. We do this by reading -from the platform file, and setting a new _platform_gnu and related vars. - -The default values of _host_cpu, _host_vendor and _host_os are changed to -reference either the automatically determined _target_... or _platform_... -values. The macros file uses the configure time defaults in _platform_... -versions have not been defined. This preserves existing behavior, but -ensures reasonable defaults are always available. - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/lib/rpmrc.c -=================================================================== ---- rpm-5.4.14.orig/lib/rpmrc.c -+++ rpm-5.4.14/lib/rpmrc.c -@@ -328,10 +328,15 @@ static void setDefaults(void) - /*@modifies rpmGlobalMacroContext, internalState @*/ - { - --#if defined(RPM_VENDOR_WINDRIVER) -+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE) - addMacro(NULL, "_usrlibrpm", NULL, __usrlibrpm, RMIL_DEFAULT); - addMacro(NULL, "_etcrpm", NULL, __etcrpm, RMIL_DEFAULT); - addMacro(NULL, "_vendor", NULL, "%{?_host_vendor}%{!?_host_vendor:wrs}", RMIL_DEFAULT); -+ -+ addMacro(NULL, "_host_cpu", NULL, "%{?_platform_cpu}%{!?_platform_cpu:%{?_target_cpu}}", RMIL_DEFAULT); -+ addMacro(NULL, "_host_vendor", NULL, "%{?_platform_vendor}%{!?_platform_cpu:%{?_target_vendor}}", RMIL_DEFAULT); -+ addMacro(NULL, "_host_os", NULL, "%{?_platform_os}%{!?_platform_os:%{?_target_os}}", RMIL_DEFAULT); -+ addMacro(NULL, "_host_gnu", NULL, "%{?_platform_gnu}%{!?_platform_gnu:%{?_gnu}}", RMIL_DEFAULT); - #endif - - addMacro(NULL, "_usr", NULL, USRPREFIX, RMIL_DEFAULT); -@@ -487,9 +492,22 @@ static rpmRC rpmPlatform(const char * pl - } - - if (!parseCVOG(p, &cvog) && cvog != NULL) { -+#if defined(RPM_VENDOR_OE) -+ char * _gnu = NULL; -+ -+ addMacro(NULL, "_platform_cpu", NULL, cvog->cpu, -1); -+ addMacro(NULL, "_platform_vendor", NULL, cvog->vendor, -1); -+ addMacro(NULL, "_platform_os", NULL, cvog->os, -1); -+ -+ if (cvog->gnu && cvog->gnu[0] != '\0') -+ _gnu = rpmExpand("-", cvog->gnu, NULL); -+ -+ addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1); -+#else - addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1); - addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1); - addMacro(NULL, "_host_os", NULL, cvog->os, -1); -+#endif - } - - #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */ -Index: rpm-5.4.14/macros/macros.in -=================================================================== ---- rpm-5.4.14.orig/macros/macros.in -+++ rpm-5.4.14/macros/macros.in -@@ -900,9 +900,9 @@ $_arbitrary_tags_tests Foo:Bar - %_os @RPMCANONOS@ - %_gnu @RPMCANONGNU@ - --%_host_platform %{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu} --%_build_platform %{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_gnu} --%_target_platform %{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_gnu} -+%_host_platform %{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}} -+%_build_platform %{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}} -+%_target_platform %{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}} - - #============================================================================== - # ---- configure macros. -@@ -945,9 +945,10 @@ $_arbitrary_tags_tests Foo:Bar - %_build_os %{_host_os} - %_host @host@ - %_host_alias @host_alias@%{nil} --%_host_cpu @host_cpu@ --%_host_vendor @host_vendor@ --%_host_os @host_os@ -+%_host_cpu %{?_platform_cpu}%{!?_platform_cpu:%{_arch}} -+%_host_vendor %{?_platform_vendor}%{!?_platform_vendor:%{_vendor}} -+%_host_os %{?_platform_os}%{!?_platform_os:%{_os}} -+%_host_gnu %{?_platform_gnu}%{!?_platform_gnu:%{_gnu}} - %_target %{_host} - %_target_alias %{_host_alias} - %_target_cpu %{_host_cpu} -Index: rpm-5.4.14/python/rpmmodule.c -=================================================================== ---- rpm-5.4.14.orig/python/rpmmodule.c -+++ rpm-5.4.14/python/rpmmodule.c -@@ -65,8 +65,8 @@ static PyObject * archScore(PyObject * s - if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &arch)) - return NULL; - --#if defined(RPM_VENDOR_WINDRIVER) -- platform = rpmExpand(arch, "-%{_host_vendor}", "-%{_host_os}%{?_gnu}", NULL); -+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE) -+ platform = rpmExpand(arch, "-%{_host_vendor}", "-%{_host_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}", NULL); - #else - platform = rpmExpand(arch, "-", "%{_vendor}", "-", "%{_os}", NULL); - #endif diff --git a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch deleted file mode 100644 index 07d407d36a..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch +++ /dev/null @@ -1,27 +0,0 @@ -python/rpmmodules.c: Change the way the python module loads the RPM config - -In order to support the RPM_VENDOR_WINDRIVER enhancement of dynamic -runtime relocation paths, we need to call rpmcliInit instead of -rpmReadConfigFiles. The rpmcliInit will end up calling rpmReadConfigFiles -after the necessary relocation processing (if enabled). - -Code derived from changes suggested by Paul Eggleton. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/python/rpmmodule.c -=================================================================== ---- rpm-5.4.14.orig/python/rpmmodule.c -+++ rpm-5.4.14/python/rpmmodule.c -@@ -392,7 +392,8 @@ void init_rpm(void) - if (Py_AtExit(rpm_exithook) == -1) - return; - -- rpmReadConfigFiles(NULL, NULL); -+ const char *argv[1] = {"rpmmodule", 0}; -+ rpmcliInit(1, argv, NULL); - - d = PyModule_GetDict(m); - diff --git a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch deleted file mode 100644 index a810123ba8..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch +++ /dev/null @@ -1,24 +0,0 @@ -chroot: realpath is required before expanding _dbpath - -_usr turned out to be a relative path to support dyanmic config, but it's -being used somewhere as a indicator to locate substrings, so we must get -the real path of it in advance. - -Upstream-Status: Inappropriate (OpenEmbedded specific) - -Signed-off-by: Ming Liu <ming.liu@windriver.com> - -diff -urpN a/rpmio/rpmrpc.c b/rpmio/rpmrpc.c ---- a/rpmio/rpmrpc.c -+++ b/rpmio/rpmrpc.c -@@ -257,7 +257,9 @@ int Open(const char * path, int flags, m - /* XXX if the open(2) fails, try to strip a possible chroot(2) prefix. */ - if (fdno < 0 && errno == ENOENT) { - const char *dbpath = rpmExpand("%{?_dbpath}/", NULL); -- const char * fn = strstr(path + 1, dbpath); -+ char resolved_dbpath[PATH_MAX]; -+ realpath(dbpath, resolved_dbpath); -+ const char * fn = strstr(path + 1, resolved_dbpath); - if (fn) - fdno = open(fn, flags, mode); - dbpath = _free(dbpath); diff --git a/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch b/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch deleted file mode 100644 index 59fe524df3..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch +++ /dev/null @@ -1,31 +0,0 @@ -macros: Use dyanmic config vs hard coded settings - -When the dynamic, runtime relocation is enables we need to make sure that the -RPM macro file does not override the dynamic settings. Fix this by forcing the -dynamic version to be used in all cases. - -Upstream-Status: Inappropriate (OpenEmbedded specific) - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/macros/macros.in -=================================================================== ---- rpm-5.4.14.orig/macros/macros.in -+++ rpm-5.4.14/macros/macros.in -@@ -27,11 +27,12 @@ - #============================================================================== - # ---- filesystem macros. - # --%_usr @usrprefix@ -+%_usr %{_usrlibrpm}/../.. - %_usrsrc %{_usr}/src --%_var @varprefix@ --%_usrlibrpm @USRLIBRPM@ --%_etcrpm @SYSCONFIGDIR@ -+%_var %{_usr}/../var -+# The dynamic relocation code sets the following two items -+#%_usrlibrpm @USRLIBRPM@ -+#%_etcrpm @SYSCONFIGDIR@ - - %__objext @objext@ - %__libext @libext@ diff --git a/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch b/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch deleted file mode 100644 index 769016b564..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: rpm-5.4.14/syck/lib/syck.h -=================================================================== ---- rpm-5.4.14.orig/syck/lib/syck.h -+++ rpm-5.4.14/syck/lib/syck.h -@@ -621,9 +621,6 @@ long syck_seq_count( SyckNode *seq ) - */ - void syckerror( char *msg ) - /*@*/; --int syckparse( void * ) -- /*@globals fileSystem @*/ -- /*@modifies fileSystem @*/; - /* XXX union YYSTYPE *sycklval has issues on Mac OS X. */ - int sycklex( void *_sycklval, SyckParser *parser ) - /*@modifies _sycklval, parser @*/; diff --git a/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch b/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch deleted file mode 100644 index 56a243d5f7..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch +++ /dev/null @@ -1,40 +0,0 @@ -lib/rpmts.c: Ensure that we check both providename and filepaths - -When looking up a missing dependencies, such as /bin/sh, we need to lookup -in both the providename and filepaths DB, not just the filepaths DB. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/lib/rpmts.c -=================================================================== ---- rpm-5.4.14.orig/lib/rpmts.c -+++ rpm-5.4.14/lib/rpmts.c -@@ -410,8 +410,8 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __ - if (sdb == NULL) - continue; - -- /* Look for a matching Provides: in suggested universe. */ -- rpmtag = (*keyp == '/' ? RPMTAG_FILEPATHS : RPMTAG_PROVIDENAME); -+ rpmtag = RPMTAG_PROVIDENAME; -+ do { - mi = rpmmiInit(sdb, rpmtag, keyp, keylen); - while ((h = rpmmiNext(mi)) != NULL) { - size_t hnamelen; -@@ -446,6 +446,15 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __ - bhnamelen = hnamelen; - } - mi = rpmmiFree(mi); -+ -+ if (bh == NULL && *keyp == '/' && rpmtag == RPMTAG_PROVIDENAME) { -+ rpmtag = RPMTAG_FILEPATHS; -+ continue; -+ } -+ -+ break; -+ } while (1); -+ - } - - /* Is there a suggested resolution? */ diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch deleted file mode 100644 index d8feed73ff..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch +++ /dev/null @@ -1,67 +0,0 @@ -rpmpgp.c: Add missing if defs around crypto implementations - -Without these, the system will error trying to find the correct crypto -library to use. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm/rpmio/rpmpgp.c -=================================================================== ---- rpm.orig/rpmio/rpmpgp.c -+++ rpm/rpmio/rpmpgp.c -@@ -1339,16 +1339,26 @@ int pgpExportPubkey(pgpDig dig) - { - int rc = 0; /* assume failure */ - -+#if defined(WITH_BEECRYPT) - if (pgpImplVecs == &rpmbcImplVecs) - rc = rpmbcExportPubkey(dig); -+#endif -+#if defined(WITH_SSL) - if (pgpImplVecs == &rpmsslImplVecs) - rc = rpmsslExportPubkey(dig); -+#endif -+#if defined(WITH_NSS) - if (pgpImplVecs == &rpmnssImplVecs) - rc = rpmnssExportPubkey(dig); -+#endif -+#if defined(WITH_GCRYPT) - if (pgpImplVecs == &rpmgcImplVecs) - rc = rpmgcExportPubkey(dig); -+#endif -+#if defined(WITH_TOMCRYPT) - if (pgpImplVecs == &rpmltcImplVecs) - rc = rpmltcExportPubkey(dig); -+#endif - return rc; - } - -@@ -1356,16 +1366,26 @@ int pgpExportSignature(pgpDig dig, DIGES - { - int rc = 0; /* assume failure */ - -+#if defined(WITH_BEECRYPT) - if (pgpImplVecs == &rpmbcImplVecs) - rc = rpmbcExportSignature(dig, ctx); -+#endif -+#if defined(WITH_SSL) - if (pgpImplVecs == &rpmsslImplVecs) - rc = rpmsslExportSignature(dig, ctx); -+#endif -+#if defined(WITH_NSS) - if (pgpImplVecs == &rpmnssImplVecs) - rc = rpmnssExportSignature(dig, ctx); -+#endif -+#if defined(WITH_GCRYPT) - if (pgpImplVecs == &rpmgcImplVecs) - rc = rpmgcExportSignature(dig, ctx); -+#endif -+#if defined(WITH_TOMCRYPT) - if (pgpImplVecs == &rpmltcImplVecs) - rc = rpmltcExportSignature(dig, ctx); -+#endif - return rc; - } - diff --git a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch b/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch deleted file mode 100644 index f825372e82..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch +++ /dev/null @@ -1,160 +0,0 @@ -Enable a cross-install scriptlet helper. - -The helper is called from outside of the chroot with the arguments: - -<root> <prog> <script> <arg1> [<arg2> ... <argN>] - -The helper script is used by oe-core to facilitate shell script actions that -can not be run from within a chroot on a foreign target system during a -cross install. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/lib/psm.c -=================================================================== ---- rpm-5.4.14.orig/lib/psm.c -+++ rpm-5.4.14/lib/psm.c -@@ -806,6 +806,10 @@ static rpmRC runScript(rpmpsm psm, Heade - int xx; - int i; - -+#ifdef RPM_VENDOR_OE -+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); -+#endif -+ - if (psm->sstates != NULL && ix >= 0 && ix < RPMSCRIPT_MAX) - ssp = psm->sstates + ix; - if (ssp != NULL) -@@ -872,14 +876,29 @@ assert(he->p.str != NULL); - (F_ISSET(psm, UNORDERED) ? "a" : "")); - - if (Phe->p.argv == NULL) { -- argv = (const char **) alloca(5 * sizeof(*argv)); -- argv[0] = "/bin/sh"; -- argc = 1; -+ argv = (const char **) alloca(7 * sizeof(*argv)); -+ argc = 0; -+ } else { -+ argv = (const char **) alloca((Phe->c + 6) * sizeof(*argv)); -+ argc = 0; -+ } -+ -+#ifdef RPM_VENDOR_OE -+ if (scriptletWrapper && *scriptletWrapper) { -+ argv[argc++] = scriptletWrapper; -+ argv[argc] = rpmtsRootDir(ts); -+ if (!argv[argc] || !*argv[argc]) -+ argv[argc] = "/"; -+ argc++; -+ } -+#endif -+ -+ if (Phe->p.argv == NULL) { -+ argv[argc++] = "/bin/sh"; - ldconfig_done = 0; - } else { -- argv = (const char **) alloca((Phe->c + 4) * sizeof(*argv)); -- memcpy(argv, Phe->p.argv, Phe->c * sizeof(*argv)); -- argc = Phe->c; -+ memcpy((argv + argc), Phe->p.argv, Phe->c * sizeof(*argv)); -+ argc += Phe->c; - ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path) - ? 1 : 0); - } -@@ -930,7 +949,12 @@ assert(he->p.str != NULL); - goto exit; - - if (rpmIsDebug() && -- (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash"))) -+ (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash")) -+#ifdef RPM_VENDOR_OE -+ || (scriptletWrapper && *scriptletWrapper && !strcmp(argv[1], "/bin/sh")) -+ || (scriptletWrapper && *scriptletWrapper && !strcmp(argv[1], "/bin/bash")) -+#endif -+ ) - { - static const char set_x[] = "set -x\n"; - nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd); -@@ -1065,12 +1089,22 @@ assert(he->p.str != NULL); - - { const char * rootDir = rpmtsRootDir(ts); - if (!rpmtsChrootDone(ts) && rootDir != NULL && -+#ifdef RPM_VENDOR_OE -+ !(scriptletWrapper && *scriptletWrapper) && -+#endif - !(rootDir[0] == '/' && rootDir[1] == '\0')) - { - /*@-modobserver@*/ - xx = Chroot(rootDir); - /*@=modobserver@*/ - } -+#ifdef RPM_VENDOR_OE -+ if (!rpmtsChrootDone(ts) && rootDir != NULL && -+ (scriptletWrapper && *scriptletWrapper) && -+ !(rootDir[0] == '/' && rootDir[1] == '\0')) -+ xx = Chdir(rootDir); -+ else -+#endif - xx = Chdir("/"); - rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"), - psm->stepName, sln, NVRA, -@@ -2985,6 +3019,13 @@ assert(psm->te != NULL); - case PSM_SCRIPT: /* Run current package scriptlets. */ - /* XXX running %verifyscript/%sanitycheck doesn't have psm->te */ - { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL); -+ -+#ifdef RPM_VENDOR_OE -+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); -+ if (scriptletWrapper && *scriptletWrapper) -+ rc = rpmpsmNext(psm, PSM_CHROOT_OUT); -+#endif -+ - xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL); - rc = runInstScript(psm); - if (rc) -@@ -2992,11 +3033,24 @@ assert(psm->te != NULL); - else - xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn); - rpmtsGetRdb(ts)->db_txn = NULL; -+#ifdef RPM_VENDOR_OE -+ if (scriptletWrapper && *scriptletWrapper) -+ rc = rpmpsmNext(psm, PSM_CHROOT_IN); -+#endif - } break; - case PSM_TRIGGERS: - /* Run triggers in other package(s) this package sets off. */ - if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST) break; -+#ifdef RPM_VENDOR_OE -+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); -+ if (scriptletWrapper && *scriptletWrapper) -+ rc = rpmpsmNext(psm, PSM_CHROOT_OUT); -+#endif - rc = runTriggers(psm); -+#ifdef RPM_VENDOR_OE -+ if (scriptletWrapper && *scriptletWrapper) -+ rc = rpmpsmNext(psm, PSM_CHROOT_IN); -+#endif - break; - case PSM_IMMED_TRIGGERS: - /* Run triggers in this package other package(s) set off. */ -@@ -3006,7 +3060,18 @@ assert(psm->te != NULL); - F_SET(psm, GOTTRIGGERS); - } - if (psm->triggers != NULL) -+#ifdef RPM_VENDOR_OE -+ { -+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); -+ if (scriptletWrapper && *scriptletWrapper) -+ rc = rpmpsmNext(psm, PSM_CHROOT_OUT); -+#endif - rc = runImmedTriggers(psm); -+#ifdef RPM_VENDOR_OE -+ if (scriptletWrapper && *scriptletWrapper) -+ rc = rpmpsmNext(psm, PSM_CHROOT_IN); -+ } -+#endif - break; - - case PSM_RPMIO_FLAGS: diff --git a/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch b/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch deleted file mode 100644 index ec38b95f2e..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch +++ /dev/null @@ -1,26 +0,0 @@ -Workaround for a memory leak in --showrc. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Index: rpm-5.4.14/lib/rpmrc.c -=================================================================== ---- rpm-5.4.14.orig/lib/rpmrc.c -+++ rpm-5.4.14/lib/rpmrc.c -@@ -1228,11 +1228,15 @@ int rpmShowRC(FILE * fp) - if (DNEVR != NULL) - fprintf(fp, " %s\n", DNEVR+2); - } -+#if 0 - (void)rpmdsFree(ds); - ds = NULL; -+#endif - fprintf(fp, "\n"); - } -+#if 0 - PRCO = rpmdsFreePRCO(PRCO); -+#endif - } - - if (rpmIsVerbose()) { diff --git a/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch deleted file mode 100644 index 683275cb18..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch +++ /dev/null @@ -1,50 +0,0 @@ -fix a endian incompatible error in generating rpm tag - -A flaw was found in the way rpm generating arbitrary tags, which leads to a -incorrect query result, this issue is introduced by a incompatible endianess -when the generating process is executed on different architectures. - -This patch resolves it by taking the byte order that host uses. - -Upstream-Status: Pending - -Signed-off-by: Ming Liu <ming.liu@windriver.com> ---- - tagname.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -Index: rpm-5.4.14/rpmdb/tagname.c -=================================================================== ---- rpm-5.4.14.orig/rpmdb/tagname.c -+++ rpm-5.4.14/rpmdb/tagname.c -@@ -3,6 +3,19 @@ - */ - - #include "system.h" -+#include <endian.h> -+ -+/* Don't redefine this macro if it already exists */ -+#ifndef le32toh -+#ifdef __USE_BSD -+#include <byteswap.h> -+#if __BYTE_ORDER == __LITTLE_ENDIAN -+#define le32toh(x) (x) -+#else -+#define le32toh(x) __bswap_32(x) -+#endif -+#endif /* __USE_BSD */ -+#endif /* le32toh */ - - #include <rpmio_internal.h> /* XXX DIGEST_CTX, xtolower, xstrcasecmp */ - #include <rpmmacro.h> -@@ -152,7 +165,10 @@ static rpmTag _tagGenerate(const char *s - xx = rpmDigestUpdate(ctx, s, nb); - xx = rpmDigestFinal(ctx, &digest, &digestlen, 0); - if (digest && digestlen > 4) { -+ /* The tag is stored in a uniform byte order for cross-endian compatibility. -+ Swap to the host uses. */ - memcpy(&tag, digest + (digestlen - 4), 4); -+ tag = le32toh(tag); - tag = (rpmTag) (tag & 0x3fffffff); - tag = (rpmTag) (tag | 0x40000000); - } diff --git a/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch b/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch deleted file mode 100644 index cb85bebfc0..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch +++ /dev/null @@ -1,24 +0,0 @@ -Source: None -Upstream-Status: Pending -Author: Khem Raj <raj.khem@gmail.com> -Date: 2011-03-03 -Description: -This patch fixes build issue found when compiling rpm-native on ubuntu -11.04-alpha. Problem is that linker does not get correct set of dependent -libraries when linking mtree binary which results in undefined symbols -in librpmio.so. This patch adds correct flags to mtree_LDADD to account -for rpmio deps - -Index: rpm-5.4.14/tools/Makefile.am -=================================================================== ---- rpm-5.4.14.orig/tools/Makefile.am -+++ rpm-5.4.14/tools/Makefile.am -@@ -186,7 +186,7 @@ grep_LDADD = $(RPMIO_LDADD_COMMON) - - mtree_SOURCES = rpmmtree.c - mtree_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) --mtree_LDADD = $(RPM_LDADD_COMMON) -+mtree_LDADD = $(RPMIO_LDADD_COMMON) - - rpmrepo_SOURCES = rpmrepo.c - rpmrepo_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/scripts -I$(top_builddir)/scripts $(CPPFLAGS) diff --git a/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch b/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch deleted file mode 100644 index 713f84ee27..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch +++ /dev/null @@ -1,40 +0,0 @@ -A patch to fix a problem when compiling with uuid. - -When attempting to build with uuid and all tests compiling will error because -uuid.h doesn't exist in the rpm tarball. Fix this by changing the include to -use the one in ossp which solves the issue. - -The recipe already depends on ossp so ossp/uuid.h will be there when rpm-native -is built. - -Upstream-Status: Pending - -Signed-off-by: Morgan Little <morgan.little@windriver.com> - - -Index: rpm-5.4.14/lua/local/luuid.c -=================================================================== ---- rpm-5.4.14.orig/lua/local/luuid.c -+++ rpm-5.4.14/lua/local/luuid.c -@@ -21,7 +21,7 @@ - - #ifdef LUA_USE_UUID - --#include "uuid.h" -+#include <ossp/uuid.h> - - /* Lua method: <uuid> = uuid.generate(<version>[, <uuid-namespace>, <data>]) */ - static int luuid_generate(lua_State *L) -Index: rpm-5.4.14/rpmio/rpmuuid.c -=================================================================== ---- rpm-5.4.14.orig/rpmio/rpmuuid.c -+++ rpm-5.4.14/rpmio/rpmuuid.c -@@ -16,7 +16,7 @@ - #include "rpmlog.h" - #include "rpmuuid.h" - #ifdef WITH_UUID --#include "uuid.h" -+#include <ossp/uuid.h> - #endif - #include "debug.h" - diff --git a/meta/recipes-devtools/rpm/rpm/rpm2cpio b/meta/recipes-devtools/rpm/rpm/rpm2cpio deleted file mode 100755 index 6bcef6a4ce..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm2cpio +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# Prevent gawk >= 4.0.x from getting funny ideas wrt UTF in printf() -LANG=C - -pkg=$1 -if [ "$pkg" = "" -o ! -e "$pkg" ]; then - echo "no package supplied" 1>&2 - exit 1 -fi - -leadsize=96 -o=`expr $leadsize + 8` -set `od -j $o -N 8 -t u1 $pkg` -il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5` -dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9` -# echo "sig il: $il dl: $dl" - -sigsize=`expr 8 + 16 \* $il + $dl` -o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8` -set `od -j $o -N 8 -t u1 $pkg` -il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5` -dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9` -# echo "hdr il: $il dl: $dl" - -hdrsize=`expr 8 + 16 \* $il + $dl` -o=`expr $o + $hdrsize` -comp=`dd if=$pkg ibs=$o skip=1 count=1 2>/dev/null | dd bs=3 count=1 2> /dev/null` - -gz="`echo . | awk '{ printf("%c%c", 0x1f, 0x8b); }'`" -lzma="`echo . | awk '{ printf("%cLZ", 0xff); }'`" -xz="`echo . | awk '{ printf("%c7z", 0xfd); }'`" -case "$comp" in - BZh) dd if="$pkg" ibs=$o skip=1 2>/dev/null | bunzip2 ;; - "$gz"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | gunzip ;; - "$xz"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | xzcat ;; - "$lzma"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | unlzma ;; - *) echo "Unrecognized rpm file: $pkg"; exit 1 ;; -esac diff --git a/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/meta/recipes-devtools/rpm/rpm/rpmatch.patch deleted file mode 100644 index 20d13aa08c..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpmatch.patch +++ /dev/null @@ -1,42 +0,0 @@ -Add configure check for rpmatch() and -creates a compatable macro if it is not provided by the C library. - -This is needed for uclibc since it does not have the above function -implemented. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: rpm-5.4.14/configure.ac -=================================================================== ---- rpm-5.4.14.orig/configure.ac -+++ rpm-5.4.14/configure.ac -@@ -943,7 +943,7 @@ AC_CHECK_FUNCS([dnl - ftok getaddrinfo getattrlist getcwd getdelim getline getmode getnameinfo dnl - getpassphrase getxattr getwd iconv inet_aton lchflags lchmod lchown dnl - lgetxattr lsetxattr lutimes madvise mempcpy mkdtemp mkstemp mtrace dnl -- posix_fadvise posix_fallocate putenv realpath regcomp secure_getenv __secure_getenv dnl -+ posix_fadvise posix_fallocate putenv realpath regcomp rpmatch secure_getenv __secure_getenv dnl - setattrlist setenv setlocale setmode setxattr dnl - sigaddset sigdelset sigemptyset sighold sigrelse sigpause dnl - sigprocmask sigsuspend sigaction dnl -Index: rpm-5.4.14/system.h -=================================================================== ---- rpm-5.4.14.orig/system.h -+++ rpm-5.4.14/system.h -@@ -353,6 +353,14 @@ extern int _tolower(int) __THROW /*@*/; - #include <libgen.h> - #endif - -+#ifndef HAVE_RPMATCH -+#define rpmatch(line) \ -+ ( (line == NULL)? -1 : \ -+ (*line == 'y' || *line == 'Y')? 1 : \ -+ (*line == 'n' || *line == 'N')? 0 : \ -+ -1 ) -+#endif -+ - /* -- Retrofit glibc __progname */ - #if defined __GLIBC__ && __GLIBC__ >= 2 - #if __GLIBC_MINOR__ >= 1 diff --git a/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch b/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch deleted file mode 100644 index 9bdd1d4908..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch +++ /dev/null @@ -1,194 +0,0 @@ -Add an "rpmdeps-oecore" binary which allows batch processing of individual file -dependencies in a similar manner to rpmdeps --provides --requires -v, prefixing -each line of output with the filename that has the dependency. - -This is much faster than individually calling rpmdeps on each file. - -This binary is used by package.bbclass. - -Upstream-Status: Inappropriate [OE Specific] - -RP 2012/2/7 - ---- - tools/Makefile.am | 6 ++- - tools/rpmdeps-oecore.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 152 insertions(+), 1 deletions(-) - create mode 100644 tools/rpmdeps-oecore.c - -Index: rpm-5.4.14/tools/Makefile.am -=================================================================== ---- rpm-5.4.14.orig/tools/Makefile.am -+++ rpm-5.4.14/tools/Makefile.am -@@ -62,7 +62,7 @@ pkgbin_PROGRAMS = \ - @WITH_AUGEAS_AUGTOOL@ chroot cp @WITH_CUDF_CUDFTOOL@ find mtree \ - @WITH_SEMANAGE_SEMODULE@ wget \ - rpmcache rpmdigest rpmrepo rpmspecdump \ -- rpmcmp rpmdeps sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ -+ rpmcmp rpmdeps rpmdeps-oecore sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ - if WITH_DB - pkgbin_PROGRAMS += dbconvert - endif -@@ -172,6 +172,10 @@ rpmdeps_SOURCES = rpmdeps.c - rpmdeps_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) - rpmdeps_LDADD = $(RPM_LDADD_COMMON) - -+rpmdeps_oecore_SOURCES = rpmdeps-oecore.c -+rpmdeps_oecore_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) -+rpmdeps_oecore_LDADD = $(RPM_LDADD_COMMON) -+ - rpmdigest_SOURCES = rpmdigest.c - rpmdigest_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) - rpmdigest_LDADD = $(RPMIO_LDADD_COMMON) -Index: rpm-5.4.14/tools/rpmdeps-oecore.c -=================================================================== ---- /dev/null -+++ rpm-5.4.14/tools/rpmdeps-oecore.c -@@ -0,0 +1,147 @@ -+#include "system.h" -+const char *__progname; -+ -+#include <rpmio.h> -+#include <rpmiotypes.h> -+#include <rpmcb.h> -+#include <argv.h> -+#include <rpmtypes.h> -+#include <rpmtag.h> -+ -+#include <rpmds.h> -+#define _RPMFC_INTERNAL /* XXX for debugging */ -+#include <rpmfc.h> -+ -+#include <rpmcli.h> -+ -+#include "debug.h" -+ -+/*@unchecked@*/ -+char *progname; -+ -+#define RPMDEP_RPMFC 1 -+ -+static int rpmdepPrint(char *filename, rpmds ds, FILE * fp) -+{ -+ if (fp == NULL) fp = stderr; -+ -+ ds = rpmdsInit(ds); -+ while (rpmdsNext(ds) >= 0) { -+ fprintf(fp, "%s %s: %s\n", filename, rpmdsType(ds), rpmdsDNEVR(ds)+2); -+ } -+ return 0; -+} -+ -+static struct poptOption optionsTable[] = { -+ -+ { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0, -+ N_("Common options:"), -+ NULL }, -+ -+ POPT_AUTOALIAS -+ POPT_AUTOHELP -+ POPT_TABLEEND -+}; -+ -+ -+int -+main(int argc, char *argv[]) -+{ -+ poptContext optCon; -+ ARGV_t av = NULL; -+ rpmfc fc = NULL; -+ FILE * fp = NULL; -+ int flags = 0; -+ int ac = 0; -+ int ec = 1; -+ int xx; -+ int i; -+ char buf[BUFSIZ]; -+ int nddict; -+ const char * s; -+ char * se; -+ const char * fn; -+ const char * N; -+ const char * EVR; -+ evrFlags Flags; -+ unsigned char deptype; -+ int ix; -+ rpmds ds; -+ -+/*@-modobserver@*/ -+ if ((progname = strrchr(argv[0], '/')) != NULL) -+ progname++; -+ else -+ progname = argv[0]; -+/*@=modobserver@*/ -+ -+ optCon = rpmcliInit(argc, argv, optionsTable); -+ if (optCon == NULL) -+ goto exit; -+ -+ av = poptGetArgs(optCon); -+ ac = argvCount(av); -+ -+ if (ac == 0) { -+ av = NULL; -+ xx = argvFgets(&av, NULL); -+ ac = argvCount(av); -+ } -+ -+ /* Make sure file names are sorted. */ -+ xx = argvSort(av, NULL); -+ -+ /* Build file class dictionary. */ -+ fc = rpmfcNew(); -+ xx = rpmfcClassify(fc, av, NULL); -+ -+ /* Build file/package dependency dictionary. */ -+ xx = rpmfcApply(fc); -+ -+ /* Generate per-file indices into package dependencies. */ -+ nddict = argvCount(fc->ddict); -+ -+ for (i = 0; i < nddict; i++) { -+ s = fc->ddict[i]; -+ -+ /* Parse out (file#,deptype,N,EVR,Flags) */ -+ ix = strtol(s, &se, 10); -+ assert(se != NULL); -+ deptype = *se++; -+ se++; -+ N = se; -+ while (*se && *se != ' ') -+ se++; -+ *se++ = '\0'; -+ EVR = se; -+ while (*se && *se != ' ') -+ se++; -+ *se++ = '\0'; -+ Flags = strtol(se, NULL, 16); -+ -+ switch (deptype) { -+ default: -+ /*@switchbreak@*/ break; -+ case 'P': -+ ds = rpmdsSingle(RPMTAG_PROVIDENAME, N, EVR, Flags); -+ rpmdepPrint((char *)fc->fn[ix], ds, stdout); -+ (void)rpmdsFree(ds); -+ ds = NULL; -+ /*@switchbreak@*/ break; -+ case 'R': -+ ds = rpmdsSingle(RPMTAG_REQUIRENAME, N, EVR, Flags); -+ rpmdepPrint((char *)fc->fn[ix], ds, stdout); -+ (void)rpmdsFree(ds); -+ ds = NULL; -+ /*@switchbreak@*/ break; -+ } -+ } -+ -+ fc = rpmfcFree(fc); -+ -+ ec = 0; -+ -+exit: -+ optCon = rpmcliFini(optCon); -+ return ec; -+} diff --git a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch b/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch deleted file mode 100644 index f08bd688f1..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch +++ /dev/null @@ -1,32 +0,0 @@ -rpm: compile rpmqv.c instead of rpmqv.cc - -Some versions of gcc, 4.4.5 for example, will put a reference to __gxx_personality_v0 -into rpm.o and rpmbuild.o. This means we must link with g++, and the Makefile we -generate does not. - -So, go back to using rpmqv.c (which is currently identical to rpmqv.cc). - -Upstream-Status: Inappropriate [other] - - When linking with g++ is really necessary, the upstream package will do that. - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - ---- a/Makefile.am -+++ b/Makefile.am -@@ -127,13 +127,13 @@ rpm_SOURCES = build.c - rpm_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) - rpm_LDADD = rpm.o $(myLDADD) - rpm.o: $(top_srcdir)/rpmqv.c -- $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.cc -+ $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.c - - rpmbuild_SOURCES = build.c - rpmbuild_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) - rpmbuild_LDADD = rpmbuild.o $(myLDADD) - rpmbuild.o: $(top_srcdir)/rpmqv.c -- $(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.cc -+ $(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.c - - .PHONY: splint - splint: diff --git a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch deleted file mode 100644 index 8870adb9e7..0000000000 --- a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch +++ /dev/null @@ -1,63 +0,0 @@ -Define the x* wrappers for uclibc as well - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: rpm-5.4.14/rpmio/rpmio.h -=================================================================== ---- rpm-5.4.14.orig/rpmio/rpmio.h -+++ rpm-5.4.14/rpmio/rpmio.h -@@ -23,7 +23,8 @@ - */ - /*@{*/ - #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \ -- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) -+ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \ -+ !defined(__UCLIBC__) - #define USE_COOKIE_SEEK_POINTER 1 - typedef _IO_off64_t _libio_off_t; - typedef _libio_off_t * _libio_pos_t; -Index: rpm-5.4.14/system.h -=================================================================== ---- rpm-5.4.14.orig/system.h -+++ rpm-5.4.14/system.h -@@ -481,7 +481,7 @@ extern void muntrace (void) - #endif /* defined(__LCLINT__) */ - - /* Memory allocation via macro defs to get meaningful locations from mtrace() */ --#if defined(__GNUC__) -+#if defined(__GNUC__) || defined(__UCLIBC__) - #define xmalloc(_size) (malloc(_size) ? : vmefail(_size)) - #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(_size)) - #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(_size)) -Index: rpm-5.4.14/lib/librpm.vers -=================================================================== ---- rpm-5.4.14.orig/lib/librpm.vers -+++ rpm-5.4.14/lib/librpm.vers -@@ -405,6 +405,10 @@ LIBRPM_0 - specedit; - strict_erasures; - XrpmtsiInit; -+ xmalloc; -+ xrealloc; -+ xcalloc; -+ xstrdup; - local: - *; - }; -Index: rpm-5.4.14/rpmio/librpmio.vers -=================================================================== ---- rpm-5.4.14.orig/rpmio/librpmio.vers -+++ rpm-5.4.14/rpmio/librpmio.vers -@@ -1056,6 +1056,10 @@ LIBRPMIO_0 - mongo_write_concern_set_mode; - mongo_write_concern_set_w; - mongo_write_concern_set_wtimeout; -+ xmalloc; -+ xrealloc; -+ xcalloc; -+ xstrdup; - local: - *; - }; diff --git a/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch b/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch deleted file mode 100644 index 71045aebc7..0000000000 --- a/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 9e7b72ee0c994609975981e135fc18d0387aefb6 Mon Sep 17 00:00:00 2001 -From: jbj <jbj> -Date: Wed, 14 May 2014 21:19:41 +0000 -Subject: [PATCH] - verify: fix: broken logic for %ghost avoidance (Mark - Hatle). - -Upstream-Status: Backport - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> ---- - CHANGES | 1 + - lib/verify.c | 3 +-- - 2 files changed, 2 insertions(+), 2 deletions(-) - -Index: rpm-5.4.14/CHANGES -=================================================================== ---- rpm-5.4.14.orig/CHANGES -+++ rpm-5.4.14/CHANGES -@@ -1,3 +1,5 @@ -+ - jbj: verify: fix: broken logic for %ghost avoidance (Mark Hatle). -+ - 5.4.13 -> 5.4.14: - - mooney: use __sun instead of __sun__ in #define (lp#1243472). - - mooney: rpmconstant: ensure linkage w Oracle Studio 12.3 (lp#1243469). -Index: rpm-5.4.14/lib/verify.c -=================================================================== ---- rpm-5.4.14.orig/lib/verify.c -+++ rpm-5.4.14/lib/verify.c -@@ -588,8 +588,7 @@ uint32_t fc = rpmfiFC(fi); - continue; - - /* If not verifying %ghost, skip ghost files. */ -- /* XXX the broken!!! logic disables %ghost queries always. */ -- if (!(FF_ISSET(qva->qva_fflags, GHOST) && FF_ISSET(fflags, GHOST))) -+ if (!FF_ISSET(qva->qva_fflags, GHOST) && FF_ISSET(fflags, GHOST)) - continue; - - /* Gather per-file data into a carrier. */ diff --git a/meta/recipes-devtools/rpm/rpm_4.11.2.bb b/meta/recipes-devtools/rpm/rpm_4.11.2.bb deleted file mode 100644 index 210c9433da..0000000000 --- a/meta/recipes-devtools/rpm/rpm_4.11.2.bb +++ /dev/null @@ -1,137 +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_python-rpm = "Python bindings for apps which will manupulate RPM packages" -DESCRIPTION_python-rpm = "The rpm-python 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" -LICENSE = "GPL-2.0+" -LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" - -DEPENDS = "db libxml2 xz findutils file popt nss bzip2 elfutils patch attr zlib acl gzip make binutils python" - -SRC_URI += "http://rpm.org/releases/rpm-4.11.x/${BP}.tar.bz2 \ - file://use-pkgconfig-for-python.patch \ - file://remove-db3-from-configure.patch \ - file://add_RPMSENSE_MISSINGOK_to_rpmmodule.patch \ - file://support-suggests-tag.patch \ - file://remove-dir-check.patch \ - file://disable_shortcircuited.patch \ - file://fix_libdir.patch \ - file://rpm-scriptetexechelp.patch \ - file://pythondeps.sh \ - file://rpm-CVE-2014-8118.patch \ - file://rpm-CVE-2013-6435.patch \ - " - -SRC_URI[md5sum] = "876ac9948a88367054f8ddb5c0e87173" -SRC_URI[sha256sum] = "403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4" - -PR = "r1" - -inherit autotools -inherit pythonnative -inherit pkgconfig -inherit gettext - -EXTRA_OECONF += "--host=${HOST_SYS} \ - --program-prefix= \ - --prefix=${prefix} \ - --exec-prefix=${prefix} \ - --bindir=${prefix}/bin \ - --sbindir=${prefix}/sbin \ - --sysconfdir=${sysconfdir} \ - --datadir=${prefix}/share \ - --includedir=${prefix}/include \ - --libdir=${prefix}/lib \ - --libexecdir=${prefix}/libexec \ - --localstatedir=${localstatedir} \ - --sharedstatedir=${prefix}/com \ - --mandir=${mandir} \ - --infodir=${infodir} \ - --disable-dependency-tracking \ - --with-acl \ - --without-lua \ - --without-cap \ - --enable-shared \ - --enable-python \ - --with-external-db \ - " - -CPPFLAGS_append = " `pkg-config --cflags nss`" -LDFLAGS_append = " -Wl,-Bsymbolic-functions -ffunction-sections" -CCFLAGS_append = " -fPIC " -CXXFLAGS_append = " -fPIC " -CFLAGS_append = " -fPIC -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE " - -do_configure_prepend() { - rm -rf sqlite - rm -f m4/libtool.m4 - rm -f m4/lt*.m4 - rm -rf db3/configure* -} - -do_install_append() { - mv ${D}/${base_bindir}/rpm ${D}/${bindir}/ - rmdir ${D}/${base_bindir} - rm -f ${D}${prefix}/lib/*.la - rm -f ${D}${prefix}/lib/rpm-plugins/*.la - rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la} - rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la} - rm -fr ${D}/var - install -d ${D}${prefix}/lib/rpm/bin - ln -s ../debugedit ${D}${prefix}/lib/rpm/bin/debugedit - ln -s ../rpmdeps ${D}${prefix}/lib/rpm/bin/rpmdeps-oecore - install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh -} - -pkg_postinst_${PN}() { - - [ "x\$D" == "x" ] && ldconfig - test -f ${localstatedir}/lib/rpm/Packages || rpm --initdb - rm -f ${localstatedir}/lib/rpm/Filemd5s \ - ${localstatedir}/lib/rpm/Filedigests \ - ${localstatedir}/lib/rpm/Requireversion \ - ${localstatedir}/lib/rpm/Provideversion - -} - -pkg_postrm_${PN}() { - [ "x\$D" == "x" ] && ldconfig - -} - -PACKAGES += "python-${PN}" -PROVIDES += "python-rpm" - -FILES_${PN} += "${libdir}/rpm \ - ${libdir}/rpm-plugins/exec.so \ - " -RDEPENDS_${PN} = "base-files run-postinsts" -RDEPENDS_${PN}_class-native = "" - -FILES_${PN}-dbg += "${libdir}/rpm/.debug/* \ - ${libdir}/rpm-plugins/.debug/* \ - ${libdir}/python2.7/site-packages/rpm/.debug/* \ - " - -FILES_${PN}-dev += "${libdir}/python2.7/site-packages/rpm/*.la" - -FILES_python-${PN} = "${libdir}/python2.7/site-packages/rpm/*" -RDEPENDS_python-${PN} = "${PN} python" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/rpm/rpm_4.17.0.bb b/meta/recipes-devtools/rpm/rpm_4.17.0.bb new file mode 100644 index 0000000000..c392ac0db4 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm_4.17.0.bb @@ -0,0 +1,208 @@ +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.17.x;protocol=https \ + file://environment.d-rpm.sh \ + 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-tools-Add-error.h-for-non-glibc-case.patch \ + file://0001-docs-do-not-build-manpages-requires-pandoc.patch \ + file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \ + file://0001-CVE-2021-3521.patch \ + file://0002-CVE-2021-3521.patch \ + file://0003-CVE-2021-3521.patch \ + " + +PE = "1" +SRCREV = "3e74e8ba2dd5e76a5353d238dc7fc38651ce27b3" + +S = "${WORKDIR}/git" + +DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3" +DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native" + +inherit autotools gettext pkgconfig python3native +export PYTHON_ABI + +AUTOTOOLS_AUXDIR = "${S}/build-aux" + +# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe +EXTRA_AUTORECONF:append = " --exclude=gnu-configize" + +# Vendor is detected differently on x86 and aarch64 hosts and can feed into target packages +EXTRA_OECONF:append = " --enable-python --with-crypto=libgcrypt --with-vendor=pc" +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 +# Forcibly disable plugins for native/nativesdk, as the inhibit and prioreset +# plugins both behave badly inside builds. +EXTRA_OECONF:append:class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" +EXTRA_OECONF:append:class-nativesdk = " --sysconfdir=/etc --disable-plugins" + +BBCLASSEXTEND = "native nativesdk" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)} sqlite zstd" +# The inhibit plugin serves no purpose outside of the target +PACKAGECONFIG:remove:class-native = "inhibit" +PACKAGECONFIG:remove:class-nativesdk = "inhibit" + +PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" +PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus" +PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive" +PACKAGECONFIG[sqlite] = "--enable-sqlite=yes,--enable-sqlite=no,sqlite3" +PACKAGECONFIG[ndb] = "--enable-ndb,--disable-ndb" +PACKAGECONFIG[bdb-ro] = "--enable-bdb-ro,--disable-bdb-ro" +PACKAGECONFIG[zstd] = "--enable-zstd=yes,--enable-zstd=no,zstd" + +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_configure:prepend() { + mkdir -p ${S}/build-aux +} + +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() { + for tool in ${WRAPPER_TOOLS}; do + test -x ${D}$tool && 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 + + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-rpm.sh ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh +} + +# 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 +} + +do_install:append () { + sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ + ${D}/${libdir}/rpm/macros + +} + +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/debugedit \ + ${libdir}/rpm/sepdebugcrcfix \ + ${libdir}/rpm/find-debuginfo.sh \ + ${libdir}/rpm/find-lang.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/*" + +RDEPENDS:${PN}-build = "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 +} + +SSTATE_HASHEQUIV_FILEMAP = " \ + populate_sysroot:*/rpm/macros:${TMPDIR} \ + populate_sysroot:*/rpm/macros:${COREBASE} \ + " diff --git a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb deleted file mode 100644 index 8903f3bc35..0000000000 --- a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb +++ /dev/null @@ -1,528 +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}-libs = "Libraries for manipulating RPM packages" -DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries." - -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_${PN}-common = "Common RPM paths, scripts, documentation and configuration" -DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \ -and configuration common between RPM Package Manager." - -SUMMARY_${PN}-build = "Scripts and executable programs used to build packages" -DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \ -that are used to build packages using the RPM Package Manager." - -SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages" -DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \ -written in the Python programming language to use the interface \ -supplied by the RPM Package Manager libraries." - -SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages" -DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \ -written in the Perl programming language to use the interface \ -supplied by the RPM Package Manager libraries." - -SUMMARY_perl-module-rpm-dev = "Development components for perl bindings" -DESCRIPTION_perl-modules-rpm-dev = "Development items such as man pages for use with the Perl \ -language bindings." - -HOMEPAGE = "http://rpm5.org/" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" - -DEPENDS = "libpcre attr acl popt ossp-uuid file byacc-native" - -S = "${WORKDIR}/rpm" - -# Apply various fixups that are unique to the CVS environment -do_fixup_unpack () { - ln -sf ../syck ${S}/syck || : - ln -sf ../lua ${S}/lua || : - ln ${S}/rpmqv.c ${S}/rpmqv.cc || : -} - -addtask fixup_unpack after do_unpack before do_patch - -# This recipe is really designed for development... to Try out the latest -# community work in progress. -DEFAULT_PREFERENCE = "-1" - -# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed -# in order to extract the distribution SRPM into a format we can extract... -SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \ - cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=syck \ - cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=lua \ - file://rpm-log-auto-rm.patch \ - file://rpm-db-reduce.patch \ - file://perfile_rpmdeps.sh \ - file://rpm-autogen.patch \ - file://rpm-libsql-fix.patch \ - file://header-include-fix.patch \ - file://rpm-platform.patch \ - file://rpm-showrc.patch \ - file://rpm-tools-mtree-LDFLAGS.patch \ - file://rpm-fileclass.patch \ - file://rpm-canonarch.patch \ - file://rpm-no-loopmsg.patch \ - file://rpm-scriptletexechelper.patch \ - file://pythondeps.sh \ - file://rpmdeps-oecore.patch \ - file://rpm-resolvedep.patch \ - file://rpm-no-perl-urpm.patch \ - file://rpm-macros.patch \ - file://rpm-lua.patch \ - file://rpm-ossp-uuid.patch \ - file://rpm-packageorigin.patch \ - file://rpm-pkgconfigdeps.patch \ - file://uclibc-support.patch \ - file://rpmatch.patch \ - file://fstack-protector-configure-check.patch \ - file://dbconvert.patch \ - file://rpm-uuid-include.patch \ - file://makefile-am-exec-hook.patch \ - file://rpm-db_buffer_small.patch \ - file://rpm-py-init.patch \ - file://python-rpm-rpmsense.patch \ - file://rpm-reloc-macros.patch \ - file://rpm-platform2.patch \ - file://rpm-remove-sykcparse-decl.patch \ - file://debugedit-segv.patch \ - file://debugedit-valid-file-to-fix-segment-fault.patch \ - file://rpm-platform-file-fix.patch \ - file://rpm-lsb-compatibility.patch \ - file://rpm-tag-generate-endian-conversion-fix.patch \ - file://rpm-hardlink-segfault-fix.patch \ - file://rpm-payload-use-hashed-inode.patch \ - file://rpm-fix-logio-cp.patch \ - file://rpm-db5-or-db6.patch \ - file://rpm-rpmpgp-fix.patch \ - file://rpm-disable-Wno-override-init.patch \ - file://rpm-realpath.patch \ - " - -# Uncomment the following line to enable platform score debugging -# This is useful when identifying issues with Smart being unable -# to process certain package feeds. -#SRC_URI += "file://rpm-debug-platform.patch" - -inherit autotools gettext - -acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" - -# Specify the default rpm macros in terms of adjustable variables -rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros" -rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" -rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" - -# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux - -# Note: perl and sqlite w/o db specified does not currently work. -# tcl, augeas, nss, gcrypt, xar and keyutils support is untested. -PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python" - -PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2," -PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz," -PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib," -PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar," - -WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \ - --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ - --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \ - --without-pythonembed" -PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python," - -# Perl modules are not built, but they could be enabled fairly easily -# the perl module creation and installation would need to be patched. -# (currently has host perl contamination issues) -WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm" -WITHOUT_PERL = "--without-perl --without-perl-urpm" -PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl," - -# The --with-dbsql will only tell RPM to check for support, db -# may or may not be built w/ the dbsql support. -WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated" -PACKAGECONFIG[db] = "${WITH_DB},--without-db,db," - -PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3," - -PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--without-beecrypt,beecrypt," -PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl," -PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss," -PACKAGECONFIG[gcrypt] = "--with-gcrypt,--without-gcrypt,gcrypt," -PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils," -PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils," - -WITH_SELINUX = "--with-selinux --with-sepol --with-semanage" -WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage" -PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libselinux," - -WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi" -WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi" -PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat," - -PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat," -PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl," - -PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas," - -EXTRA_OECONF += "--verbose \ - --sysconfdir=${sysconfdir} \ - --with-file \ - --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \ - --with-syck=internal \ - --without-readline \ - --without-libtasn1 \ - --without-pakchois \ - --without-gnutls \ - --with-pcre \ - --enable-utf8 \ - --with-uuid \ - --with-attr \ - --with-acl \ - --with-popt=external \ - --with-pthreads \ - --without-cudf \ - --without-ficl \ - --without-aterm \ - --without-nix \ - --without-bash \ - --without-rc \ - --without-js \ - --without-gpsee \ - --without-ruby \ - --without-squirrel \ - --with-build-extlibdep \ - --with-build-maxextlibdep \ - --without-valgrind \ - --disable-openmp \ - --enable-build-pic \ - --enable-build-versionscript \ - --enable-build-warnings \ - --enable-build-debug \ - --enable-maintainer-mode \ - --with-path-macros=${rpm_macros} \ - --with-path-lib=${libdir}/rpm \ - --with-bugreport=http://bugzilla.yoctoproject.org \ - --program-prefix= \ - YACC=byacc" - -CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE" - -LDFLAGS_append_libc-uclibc = "-lrt -lpthread" - -PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm-dev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale" - -SOLIBS = "5.4.so" - -# Based on %files section in the rpm.spec - -FILES_${PN} = "${bindir}/rpm \ - ${bindir}/rpmconstant \ - ${libdir}/rpm/rpm.* \ - ${libdir}/rpm/tgpg \ - ${libdir}/rpm/macros \ - ${libdir}/rpm/rpmpopt \ - ${libdir}/rpm/rpm2cpio \ - ${libdir}/rpm/vcheck \ - ${libdir}/rpm/helpers \ - ${libdir}/rpm/qf \ - ${libdir}/rpm/cpuinfo.yaml \ - ${libdir}/rpm/bin/mtree \ - ${libdir}/rpm/bin/rpmkey \ - ${libdir}/rpm/bin/rpmrepo \ - ${libdir}/rpm/bin/rpmrepo.real \ - ${libdir}/rpm/bin/rpmspecdump \ - ${libdir}/rpm/bin/rpmspecdump.real \ - ${libdir}/rpm/bin/wget \ - ${localstatedir}/cache \ - ${localstatedir}/cache/rpm \ - ${localstatedir}/cache/wdj \ - ${localstatedir}/lib \ - ${localstatedir}/lib/rpm \ - ${localstatedir}/lib/wdj \ - ${bindir}/rpm.real \ - ${bindir}/rpmconstant.real \ - ${bindir}/rpm2cpio.real \ - " - -FILES_${PN}-dbg += "${libdir}/rpm/.debug \ - ${libdir}/rpm/bin/.debug \ - " - -FILES_${PN}-common = "${bindir}/rpm2cpio \ - ${bindir}/gendiff \ - ${sysconfdir}/rpm \ - ${localstatedir}/spool/repackage \ - " - -FILES_${PN}-libs = "${libdir}/librpm-*.so \ - ${libdir}/librpmconstant-*.so \ - ${libdir}/librpmdb-*.so \ - ${libdir}/librpmio-*.so \ - ${libdir}/librpmmisc-*.so \ - ${libdir}/librpmbuild-*.so \ - " - -FILES_${PN}-build = "${prefix}/src/rpm \ - ${bindir}/rpmbuild \ - ${bindir}/rpmbuild.real \ - ${libdir}/rpm/brp-* \ - ${libdir}/rpm/check-files \ - ${libdir}/rpm/cross-build \ - ${libdir}/rpm/find-debuginfo.sh \ - ${libdir}/rpm/find-lang.sh \ - ${libdir}/rpm/find-prov.pl \ - ${libdir}/rpm/find-provides.perl \ - ${libdir}/rpm/find-req.pl \ - ${libdir}/rpm/find-requires.perl \ - ${libdir}/rpm/getpo.sh \ - ${libdir}/rpm/http.req \ - ${libdir}/rpm/javadeps.sh \ - ${libdir}/rpm/mono-find-provides \ - ${libdir}/rpm/mono-find-requires \ - ${libdir}/rpm/executabledeps.sh \ - ${libdir}/rpm/libtooldeps.sh \ - ${libdir}/rpm/osgideps.pl \ - ${libdir}/rpm/perldeps.pl \ - ${libdir}/rpm/perl.prov \ - ${libdir}/rpm/perl.req \ - ${libdir}/rpm/php.prov \ - ${libdir}/rpm/php.req \ - ${libdir}/rpm/pkgconfigdeps.sh \ - ${libdir}/rpm/pythondeps.sh \ - ${libdir}/rpm/bin/debugedit \ - ${libdir}/rpm/bin/debugedit.real \ - ${libdir}/rpm/bin/rpmcache \ - ${libdir}/rpm/bin/rpmcache.real \ - ${libdir}/rpm/bin/rpmcmp \ - ${libdir}/rpm/bin/rpmcmp.real \ - ${libdir}/rpm/bin/rpmdeps \ - ${libdir}/rpm/bin/rpmdeps.real \ - ${libdir}/rpm/bin/rpmdeps-oecore \ - ${libdir}/rpm/bin/rpmdeps-oecore.real \ - ${libdir}/rpm/bin/rpmdigest \ - ${libdir}/rpm/bin/rpmdigest.real \ - ${libdir}/rpm/bin/abi-compliance-checker.pl \ - ${libdir}/rpm/bin/api-sanity-autotest.pl \ - ${libdir}/rpm/bin/chroot \ - ${libdir}/rpm/bin/cp \ - ${libdir}/rpm/bin/dbsql \ - ${libdir}/rpm/bin/find \ - ${libdir}/rpm/bin/install-sh \ - ${libdir}/rpm/bin/lua \ - ${libdir}/rpm/bin/luac \ - ${libdir}/rpm/bin/mkinstalldirs \ - ${libdir}/rpm/bin/rpmlua \ - ${libdir}/rpm/bin/rpmluac \ - ${libdir}/rpm/bin/sqlite3 \ - ${libdir}/rpm/macros.d/cmake \ - ${libdir}/rpm/macros.d/java \ - ${libdir}/rpm/macros.d/libtool \ - ${libdir}/rpm/macros.d/mandriva \ - ${libdir}/rpm/macros.d/mono \ - ${libdir}/rpm/macros.d/perl \ - ${libdir}/rpm/macros.d/php \ - ${libdir}/rpm/macros.d/pkgconfig \ - ${libdir}/rpm/macros.d/python \ - ${libdir}/rpm/macros.d/ruby \ - ${libdir}/rpm/macros.d/selinux \ - ${libdir}/rpm/macros.d/tcl \ - ${libdir}/rpm/macros.rpmbuild \ - ${libdir}/rpm/u_pkg.sh \ - ${libdir}/rpm/vpkg-provides.sh \ - ${libdir}/rpm/vpkg-provides2.sh \ - ${libdir}/rpm/perfile_rpmdeps.sh \ - " -RDEPENDS_${PN} = "base-files run-postinsts" -RDEPENDS_${PN}_class-native = "" -RDEPENDS_${PN}_class-nativesdk = "" -RDEPENDS_${PN}-build = "file bash perl" - -RDEPENDS_python-rpm = "${PN}" - -FILES_python-rpm-dbg = "${libdir}/python*/site-packages/rpm/.debug/_*" -FILES_python-rpm-dev = "${libdir}/python*/site-packages/rpm/*.la" -FILES_python-rpm-staticdev = "${libdir}/python*/site-packages/rpm/*.a" -FILES_python-rpm = "${libdir}/python*/site-packages/rpm" - -FILES_perl-module-rpm = "${libdir}/perl/*/* \ - " - -FILES_perl-module-rpm-dev = "${prefix}/share/man/man3/RPM* \ - " - -RDEPENDS_${PN}-dev += "bash" - -FILES_${PN}-dev = "${includedir}/rpm \ - ${libdir}/librpm.la \ - ${libdir}/librpm.so \ - ${libdir}/librpmconstant.la \ - ${libdir}/librpmconstant.so \ - ${libdir}/librpmdb.la \ - ${libdir}/librpmdb.so \ - ${libdir}/librpmio.la \ - ${libdir}/librpmio.so \ - ${libdir}/librpmmisc.la \ - ${libdir}/librpmmisc.so \ - ${libdir}/librpmbuild.la \ - ${libdir}/librpmbuild.so \ - ${libdir}/rpm/lib/liblua.la \ - ${libdir}/pkgconfig/rpm.pc \ - ${libdir}/rpm/rpmdb_loadcvt \ - " - -FILES_${PN}-staticdev = " \ - ${libdir}/librpm.a \ - ${libdir}/librpmconstant.a \ - ${libdir}/librpmdb.a \ - ${libdir}/librpmio.a \ - ${libdir}/librpmmisc.a \ - ${libdir}/librpmbuild.a \ - ${libdir}/rpm/lib/liblua.a \ - " - -do_configure() { - # Disable tests! - echo "all:" > ${S}/tests/Makefile.am - sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in - - ( cd ${S}; ${S}/autogen.sh ) - - # NASTY hack to make sure configure files the right pkg-config file... - sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \ - -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure - - ( cd ${S}/syck ; set +e ; rm -- -l* ; make distclean ) || : - - export varprefix=${localstatedir} - oe_runconf -} - -do_install_append() { - sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros - sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* - sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* - sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros - sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros - - # Enable Debian style arbitrary tags... - sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros - - install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh - install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh - - # Remove unpackaged files (based on list in rpm.spec) - rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm} - - rm -f ${D}/${mandir}/man8/rpmcache.8* - rm -f ${D}/${mandir}/man8/rpmgraph.8* - rm -f ${D}/${mandir}/*/man8/rpmcache.8* - rm -f ${D}/${mandir}/*/man8/rpmgraph.8* - rm -rf ${D}/${mandir}/{fr,ko} - - rm -f ${D}/${includedir}/popt.h - rm -f ${D}/${libdir}/libpopt.* - rm -f ${D}/${libdir}/pkgconfig/popt.pc - rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo - rm -f ${D}/${mandir}/man3/popt.3 - - rm -f ${D}/${mandir}/man1/xar.1* - rm -f ${D}/${bindir}/xar - rm -rf ${D}/${includedir}/xar - rm -f ${D}/${libdir}/libxar* - - rm -f ${D}/${bindir}/lz* - rm -f ${D}/${bindir}/unlzma - rm -f ${D}/${bindir}/unxz - rm -f ${D}/${bindir}/xz* - rm -rf ${D}/${includedir}/lzma* - rm -f ${D}/${mandir}/man1/lz*.1 - rm -f ${D}/${libdir}/pkgconfig/liblzma* - - rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la} - rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la} - - #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \ - # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';' - #find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';' - - # We don't want the default macro set - rm -rf ${D}/${libdir}/rpm/{i[3456]86*,athlon*,pentium*,x86_64*,alpha*,sparc*,ia64*,ppc*,s390*,armv[34][lb]*,armv[345]*,mips*,noarch*} - - rm -f ${D}/${libdir}/rpm/dbconvert.sh - - rm -f ${D}/${libdir}/rpm/libsqldb.* - - # We don't want, nor need the Mandriva multiarch items - rm -f ${D}/${bindir}/multiarch-dispatch - rm -f ${D}/${bindir}/multiarch-platform - rm -f ${D}/${libdir}/rpm/check-multiarch-files - rm -f ${D}/${libdir}/rpm/mkmultiarch - rm -f ${D}/${includedir}/multiarch-dispatch.h - - rm -f ${D}/${libdir}/rpm/gstreamer.sh - rm -f ${D}/${libdir}/rpm/gem_helper.rb - rm -f ${D}/${libdir}/rpm/rubygems.rb - rm -f ${D}/${libdir}/rpm/kmod-deps.sh - rm -f ${D}/${libdir}/rpm/pythoneggs.py - rm -f ${D}/${libdir}/rpm/macros.d/kernel - rm -f ${D}/${libdir}/rpm/macros.d/gstreamer - rm -f ${D}/${libdir}/rpm/bin/mgo - rm -f ${D}/${libdir}/rpm/bin/dbconvert - rm -f ${D}/${libdir}/rpm/bin/pom2spec - - rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj - rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl - -} - -add_native_wrapper() { - create_wrapper ${D}/${bindir}/rpm \ - RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ - RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale - - create_wrapper ${D}/${bindir}/rpm2cpio \ - RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ - RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale - - create_wrapper ${D}/${bindir}/rpmbuild \ - RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ - RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale - - create_wrapper ${D}/${bindir}/rpmconstant \ - RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ - RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale - - for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do - create_wrapper $rpm_binary \ - RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ - RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale - done -} - -do_install_append_class-native() { - add_native_wrapper -} - -do_install_append_class-nativesdk() { - add_native_wrapper -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.14.bb deleted file mode 100644 index b450c6fc39..0000000000 --- a/meta/recipes-devtools/rpm/rpm_5.4.14.bb +++ /dev/null @@ -1,517 +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." - -RECIPE_NO_UPDATE_REASON = "5.4.15 has a package database issue: http://lists.openembedded.org/pipermail/openembedded-core/2015-August/109187.html" - -SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages" -DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries." - -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_${PN}-common = "Common RPM paths, scripts, documentation and configuration" -DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \ -and configuration common between RPM Package Manager." - -SUMMARY_${PN}-build = "Scripts and executable programs used to build packages" -DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \ -that are used to build packages using the RPM Package Manager." - -SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages" -DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \ -written in the Python programming language to use the interface \ -supplied by the RPM Package Manager libraries." - -SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages" -DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \ -written in the Perl programming language to use the interface \ -supplied by the RPM Package Manager libraries." - -HOMEPAGE = "http://rpm5.org/" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" - -DEPENDS = "libpcre attr acl popt ossp-uuid file byacc-native" - -# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed -# in order to extract the distribution SRPM into a format we can extract... -SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;extract=rpm-5.4.14.tar.gz \ - file://rpm-log-auto-rm.patch \ - file://rpm-db-reduce.patch \ - file://perfile_rpmdeps.sh \ - file://rpm-autogen.patch \ - file://rpm-libsql-fix.patch \ - file://header-include-fix.patch \ - file://rpm-platform.patch \ - file://rpm-showrc.patch \ - file://rpm-tools-mtree-LDFLAGS.patch \ - file://rpm-fileclass.patch \ - file://rpm-canonarch.patch \ - file://rpm-no-loopmsg.patch \ - file://rpm-scriptletexechelper.patch \ - file://pythondeps.sh \ - file://rpmdeps-oecore.patch \ - file://rpm-resolvedep.patch \ - file://rpm-no-perl-urpm.patch \ - file://rpm-macros.patch \ - file://rpm-lua.patch \ - file://rpm-ossp-uuid.patch \ - file://rpm-packageorigin.patch \ - file://rpm-pkgconfigdeps.patch \ - file://uclibc-support.patch \ - file://rpmatch.patch \ - file://fstack-protector-configure-check.patch \ - file://dbconvert.patch \ - file://rpm-uuid-include.patch \ - file://makefile-am-exec-hook.patch \ - file://rpm-db_buffer_small.patch \ - file://rpm-py-init.patch \ - file://python-rpm-rpmsense.patch \ - file://rpm-reloc-macros.patch \ - file://rpm-platform2.patch \ - file://rpm-remove-sykcparse-decl.patch \ - file://debugedit-segv.patch \ - file://debugedit-valid-file-to-fix-segment-fault.patch \ - file://rpm-platform-file-fix.patch \ - file://rpm-lsb-compatibility.patch \ - file://rpm-tag-generate-endian-conversion-fix.patch \ - file://verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch \ - file://rpm-hardlink-segfault-fix.patch \ - file://rpm-payload-use-hashed-inode.patch \ - file://rpm-fix-logio-cp.patch \ - file://rpm-db5-or-db6.patch \ - file://rpm-disable-Wno-override-init.patch \ - file://rpmqv_cc_b_gone.patch \ - file://rpm-realpath.patch \ - file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \ - file://no-ldflags-in-pkgconfig.patch \ - file://rpm-lua-fix-print.patch \ - file://rpm-check-rootpath-reasonableness.patch \ - file://rpm-macros.in-disable-external-key-server.patch \ - file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \ - file://configure.ac-check-for-both-gpg2-and-gpg.patch \ - " - -# Uncomment the following line to enable platform score debugging -# This is useful when identifying issues with Smart being unable -# to process certain package feeds. -#SRC_URI += "file://rpm-debug-platform.patch" - -SRC_URI[md5sum] = "25093d399a0b5d1342d24900a91b347d" -SRC_URI[sha256sum] = "676e3ab41f72e3b504e04109cfb565a300742f56a7da084f202013b30eeae467" - -inherit autotools gettext - -acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" - -# Specify the default rpm macros in terms of adjustable variables -rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros" -rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros" -rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros" - -# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux - -# Note: perl and sqlite w/o db specified does not currently work. -# tcl, augeas, nss, gcrypt, xar and keyutils support is untested. -PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python" - -PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2," -PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz," -PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib," -PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar," - -WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \ - --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ - --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \ - --without-pythonembed" -PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python," - -# Perl modules are not built, but they could be enabled fairly easily -# the perl module creation and installation would need to be patched. -# (currently has host perl contamination issues) -WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm" -WITHOUT_PERL = "--without-perl --without-perl-urpm" -PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl," - -# The --with-dbsql will only tell RPM to check for support, db -# may or may not be built w/ the dbsql support. -WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated" -PACKAGECONFIG[db] = "${WITH_DB},--without-db,db," - -PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3," - -PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--without-beecrypt,beecrypt," -PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl," -PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss," -PACKAGECONFIG[gcrypt] = "--with-gcrypt,--without-gcrypt,gcrypt," -PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils," -PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils," - -WITH_SELINUX = "--with-selinux --with-sepol --with-semanage" -WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage" -PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libselinux," - -WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi" -WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi" -PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat," - -PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat," -PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl," - -PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas," - -EXTRA_OECONF += "--verbose \ - --sysconfdir=${sysconfdir} \ - --with-file \ - --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \ - --with-syck=internal \ - --without-readline \ - --without-libtasn1 \ - --without-pakchois \ - --without-gnutls \ - --with-pcre \ - --enable-utf8 \ - --with-uuid \ - --with-attr \ - --with-acl \ - --with-popt=external \ - --with-pthreads \ - --without-cudf \ - --without-ficl \ - --without-aterm \ - --without-nix \ - --without-bash \ - --without-rc \ - --without-js \ - --without-gpsee \ - --without-ruby \ - --without-squirrel \ - --with-build-extlibdep \ - --with-build-maxextlibdep \ - --without-valgrind \ - --disable-openmp \ - --enable-build-pic \ - --enable-build-versionscript \ - --enable-build-warnings \ - --enable-build-debug \ - --enable-maintainer-mode \ - --with-path-macros=${rpm_macros} \ - --with-path-lib=${libdir}/rpm \ - --with-bugreport=http://bugzilla.yoctoproject.org \ - --program-prefix= \ - YACC=byacc" - -CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE" - -LDFLAGS_append_libc-uclibc = "-lrt -lpthread" - -PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale" - -SOLIBS = "5.4.so" - -# Based on %files section in the rpm.spec - -FILES_${PN} = "${bindir}/rpm \ - ${bindir}/rpmconstant \ - ${libdir}/rpm/rpm.* \ - ${libdir}/rpm/tgpg \ - ${libdir}/rpm/macros \ - ${libdir}/rpm/rpmpopt \ - ${libdir}/rpm/rpm2cpio \ - ${libdir}/rpm/vcheck \ - ${libdir}/rpm/helpers \ - ${libdir}/rpm/qf \ - ${libdir}/rpm/cpuinfo.yaml \ - ${libdir}/rpm/bin/mtree \ - ${libdir}/rpm/bin/rpmkey \ - ${libdir}/rpm/bin/rpmrepo \ - ${libdir}/rpm/bin/rpmrepo.real \ - ${libdir}/rpm/bin/rpmspecdump \ - ${libdir}/rpm/bin/rpmspecdump.real \ - ${libdir}/rpm/bin/wget \ - ${localstatedir}/cache \ - ${localstatedir}/cache/rpm \ - ${localstatedir}/cache/wdj \ - ${localstatedir}/lib \ - ${localstatedir}/lib/rpm \ - ${localstatedir}/lib/wdj \ - ${bindir}/rpm.real \ - ${bindir}/rpmconstant.real \ - ${bindir}/rpm2cpio.real \ - " - -FILES_${PN}-dbg += "${libdir}/rpm/.debug \ - ${libdir}/rpm/bin/.debug \ - ${libdir}/python*/site-packages/rpm/.debug/_* \ - " - -FILES_${PN}-common = "${bindir}/rpm2cpio \ - ${bindir}/gendiff \ - ${sysconfdir}/rpm \ - ${localstatedir}/spool/repackage \ - " - -FILES_${PN}-libs = "${libdir}/librpm-*.so \ - ${libdir}/librpmconstant-*.so \ - ${libdir}/librpmdb-*.so \ - ${libdir}/librpmio-*.so \ - ${libdir}/librpmmisc-*.so \ - ${libdir}/librpmbuild-*.so \ - " - -FILES_${PN}-build = "${prefix}/src/rpm \ - ${bindir}/rpmbuild \ - ${bindir}/rpmbuild.real \ - ${libdir}/rpm/brp-* \ - ${libdir}/rpm/check-files \ - ${libdir}/rpm/cross-build \ - ${libdir}/rpm/find-debuginfo.sh \ - ${libdir}/rpm/find-lang.sh \ - ${libdir}/rpm/find-prov.pl \ - ${libdir}/rpm/find-provides.perl \ - ${libdir}/rpm/find-req.pl \ - ${libdir}/rpm/find-requires.perl \ - ${libdir}/rpm/getpo.sh \ - ${libdir}/rpm/http.req \ - ${libdir}/rpm/javadeps.sh \ - ${libdir}/rpm/mono-find-provides \ - ${libdir}/rpm/mono-find-requires \ - ${libdir}/rpm/executabledeps.sh \ - ${libdir}/rpm/libtooldeps.sh \ - ${libdir}/rpm/osgideps.pl \ - ${libdir}/rpm/perldeps.pl \ - ${libdir}/rpm/perl.prov \ - ${libdir}/rpm/perl.req \ - ${libdir}/rpm/php.prov \ - ${libdir}/rpm/php.req \ - ${libdir}/rpm/pkgconfigdeps.sh \ - ${libdir}/rpm/pythondeps.sh \ - ${libdir}/rpm/bin/debugedit \ - ${libdir}/rpm/bin/debugedit.real \ - ${libdir}/rpm/bin/rpmcache \ - ${libdir}/rpm/bin/rpmcache.real \ - ${libdir}/rpm/bin/rpmcmp \ - ${libdir}/rpm/bin/rpmcmp.real \ - ${libdir}/rpm/bin/rpmdeps \ - ${libdir}/rpm/bin/rpmdeps.real \ - ${libdir}/rpm/bin/rpmdeps-oecore \ - ${libdir}/rpm/bin/rpmdeps-oecore.real \ - ${libdir}/rpm/bin/rpmdigest \ - ${libdir}/rpm/bin/rpmdigest.real \ - ${libdir}/rpm/bin/abi-compliance-checker.pl \ - ${libdir}/rpm/bin/api-sanity-autotest.pl \ - ${libdir}/rpm/bin/chroot \ - ${libdir}/rpm/bin/cp \ - ${libdir}/rpm/bin/dbsql \ - ${libdir}/rpm/bin/find \ - ${libdir}/rpm/bin/install-sh \ - ${libdir}/rpm/bin/lua \ - ${libdir}/rpm/bin/luac \ - ${libdir}/rpm/bin/mkinstalldirs \ - ${libdir}/rpm/bin/rpmlua \ - ${libdir}/rpm/bin/rpmluac \ - ${libdir}/rpm/bin/sqlite3 \ - ${libdir}/rpm/macros.d/cmake \ - ${libdir}/rpm/macros.d/java \ - ${libdir}/rpm/macros.d/libtool \ - ${libdir}/rpm/macros.d/mandriva \ - ${libdir}/rpm/macros.d/mono \ - ${libdir}/rpm/macros.d/perl \ - ${libdir}/rpm/macros.d/php \ - ${libdir}/rpm/macros.d/pkgconfig \ - ${libdir}/rpm/macros.d/python \ - ${libdir}/rpm/macros.d/ruby \ - ${libdir}/rpm/macros.d/selinux \ - ${libdir}/rpm/macros.d/tcl \ - ${libdir}/rpm/macros.rpmbuild \ - ${libdir}/rpm/u_pkg.sh \ - ${libdir}/rpm/vpkg-provides.sh \ - ${libdir}/rpm/vpkg-provides2.sh \ - ${libdir}/rpm/perfile_rpmdeps.sh \ - " -RDEPENDS_${PN} = "base-files run-postinsts" -RDEPENDS_${PN}_class-native = "" -RDEPENDS_${PN}_class-nativesdk = "" -RDEPENDS_${PN}-build = "file bash perl" - -RDEPENDS_python-rpm = "${PN}" - -FILES_python-rpm = "${libdir}/python*/site-packages/rpm" -PROVIDES += "python-rpm" - -FILES_perl-module-rpm = "${libdir}/perl/*/* \ - " - -RDEPENDS_${PN}-dev += "bash" - -FILES_${PN}-dev = "${includedir}/rpm \ - ${libdir}/librpm.la \ - ${libdir}/librpm.so \ - ${libdir}/librpmconstant.la \ - ${libdir}/librpmconstant.so \ - ${libdir}/librpmdb.la \ - ${libdir}/librpmdb.so \ - ${libdir}/librpmio.la \ - ${libdir}/librpmio.so \ - ${libdir}/librpmmisc.la \ - ${libdir}/librpmmisc.so \ - ${libdir}/librpmbuild.la \ - ${libdir}/librpmbuild.so \ - ${libdir}/rpm/lib/liblua.la \ - ${libdir}/pkgconfig/rpm.pc \ - ${libdir}/rpm/rpmdb_loadcvt \ - " - -FILES_${PN}-staticdev = " \ - ${libdir}/librpm.a \ - ${libdir}/librpmconstant.a \ - ${libdir}/librpmdb.a \ - ${libdir}/librpmio.a \ - ${libdir}/librpmmisc.a \ - ${libdir}/librpmbuild.a \ - ${libdir}/rpm/lib/liblua.a \ - ${libdir}/python*/site-packages/rpm/*.a \ - " - -do_configure() { - # Disable tests! - echo "all:" > ${S}/tests/Makefile.am - sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in - - ( cd ${S}; ${S}/autogen.sh ) - - # NASTY hack to make sure configure files the right pkg-config file... - sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \ - -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure - - ( cd ${S}/syck ; set +e ; rm -- -l* ; make distclean ) || : - - export varprefix=${localstatedir} - oe_runconf -} - -do_install_append() { - sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros - sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* - sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* - sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros - sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros - - # Enable Debian style arbitrary tags... - sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros - - install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh - install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh - - # Remove unpackaged files (based on list in rpm.spec) - rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm} - - rm -f ${D}/${mandir}/man8/rpmcache.8* - rm -f ${D}/${mandir}/man8/rpmgraph.8* - rm -f ${D}/${mandir}/*/man8/rpmcache.8* - rm -f ${D}/${mandir}/*/man8/rpmgraph.8* - rm -rf ${D}/${mandir}/{fr,ko} - - rm -f ${D}/${includedir}/popt.h - rm -f ${D}/${libdir}/libpopt.* - rm -f ${D}/${libdir}/pkgconfig/popt.pc - rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo - rm -f ${D}/${mandir}/man3/popt.3 - - rm -f ${D}/${mandir}/man1/xar.1* - rm -f ${D}/${bindir}/xar - rm -rf ${D}/${includedir}/xar - rm -f ${D}/${libdir}/libxar* - - rm -f ${D}/${bindir}/lz* - rm -f ${D}/${bindir}/unlzma - rm -f ${D}/${bindir}/unxz - rm -f ${D}/${bindir}/xz* - rm -rf ${D}/${includedir}/lzma* - rm -f ${D}/${mandir}/man1/lz*.1 - rm -f ${D}/${libdir}/pkgconfig/liblzma* - - rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la} - rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la} - - #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \ - # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';' - #find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';' - - # We don't want the default macro set - rm -rf ${D}/${libdir}/rpm/{i[3456]86*,athlon*,pentium*,x86_64*,alpha*,sparc*,ia64*,ppc*,s390*,armv[34][lb]*,armv[345]*,mips*,noarch*} - - rm -f ${D}/${libdir}/rpm/dbconvert.sh - - rm -f ${D}/${libdir}/rpm/libsqldb.* - - # We don't want, nor need the Mandriva multiarch items - rm -f ${D}/${bindir}/multiarch-dispatch - rm -f ${D}/${bindir}/multiarch-platform - rm -f ${D}/${libdir}/rpm/check-multiarch-files - rm -f ${D}/${libdir}/rpm/mkmultiarch - rm -f ${D}/${includedir}/multiarch-dispatch.h - - rm -f ${D}/${libdir}/rpm/gstreamer.sh - rm -f ${D}/${libdir}/rpm/gem_helper.rb - rm -f ${D}/${libdir}/rpm/rubygems.rb - rm -f ${D}/${libdir}/rpm/kmod-deps.sh - rm -f ${D}/${libdir}/rpm/pythoneggs.py - rm -f ${D}/${libdir}/rpm/macros.d/kernel - rm -f ${D}/${libdir}/rpm/macros.d/gstreamer - rm -f ${D}/${libdir}/rpm/bin/mgo - rm -f ${D}/${libdir}/rpm/bin/dbconvert - rm -f ${D}/${libdir}/rpm/bin/pom2spec - - rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj - rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl - -} - -add_native_wrapper() { - create_wrapper ${D}/${bindir}/rpm \ - RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ - RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale - - create_wrapper ${D}/${bindir}/rpm2cpio \ - RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ - RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale - - create_wrapper ${D}/${bindir}/rpmbuild \ - RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ - RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale - - create_wrapper ${D}/${bindir}/rpmconstant \ - RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ - RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale - - for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do - create_wrapper $rpm_binary \ - RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ - RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale - done -} - -do_install_append_class-native() { - add_native_wrapper -} - -do_install_append_class-nativesdk() { - add_native_wrapper -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c deleted file mode 100644 index 7f4caf9886..0000000000 --- a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c +++ /dev/null @@ -1,424 +0,0 @@ -/* OpenEmbedded RPM resolver utility - - Written by: Paul Eggleton <paul.eggleton@linux.intel.com> - - Copyright 2012 Intel Corporation - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*/ - -#include <ctype.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <fcntl.h> -#include <sys/stat.h> - -#include <rpmdb.h> -#include <rpmtypes.h> -#include <rpmtag.h> -#include <rpmts.h> -#include <rpmmacro.h> -#include <rpmcb.h> -#include <rpmlog.h> -#include <argv.h> -#include <mire.h> - -int debugmode; -FILE *outf; - -int getPackageStr(rpmts ts, const char *NVRA, rpmTag tag, char **value) -{ - int rc = -1; - rpmmi mi = rpmtsInitIterator(ts, RPMTAG_NVRA, NVRA, 0); - Header h; - if ((h = rpmmiNext(mi)) != NULL) { - HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he)); - he->tag = tag; - rc = (headerGet(h, he, 0) != 1); - if(rc==0) - *value = strdup((char *)he->p.ptr); - } - (void)rpmmiFree(mi); - return rc; -} - -int loadTs(rpmts **ts, int *tsct, const char *dblistfn) -{ - int count = 0; - int sz = 5; - int rc = 0; - int listfile = 1; - struct stat st_buf; - - rc = stat(dblistfn, &st_buf); - if(rc != 0) { - perror("stat"); - return 1; - } - if(S_ISDIR(st_buf.st_mode)) - listfile = 0; - - if(listfile) { - if(debugmode) - printf("DEBUG: reading database list file '%s'\n", dblistfn); - *ts = malloc(sz * sizeof(rpmts)); - FILE *f = fopen(dblistfn, "r" ); - if(f) { - char line[2048]; - while(fgets(line, sizeof(line), f)) { - int len = strlen(line) - 1; - if(len > 0) - // Trim trailing whitespace - while(len > 0 && isspace(line[len])) - line[len--] = '\0'; - - if(len > 0) { - // Expand array if needed - if(count == sz) { - sz += 5; - *ts = (rpmts *)realloc(*ts, sz); - } - - if(debugmode) - printf("DEBUG: opening database '%s'\n", line); - char *dbpathm = malloc(strlen(line) + 10); - sprintf(dbpathm, "_dbpath %s", line); - rpmDefineMacro(NULL, dbpathm, RMIL_CMDLINE); - free(dbpathm); - - rpmts tsi = rpmtsCreate(); - (*ts)[count] = tsi; - rc = rpmtsOpenDB(tsi, O_RDONLY); - if( rc ) { - fprintf(stderr, "Failed to open database %s\n", line); - rc = -1; - break; - } - - count++; - } - } - fclose(f); - *tsct = count; - } - else { - perror(dblistfn); - rc = -1; - } - } - else { - if(debugmode) - printf("DEBUG: opening database '%s'\n", dblistfn); - // Load from single database - *ts = malloc(sizeof(rpmts)); - char *dbpathm = malloc(strlen(dblistfn) + 10); - sprintf(dbpathm, "_dbpath %s", dblistfn); - rpmDefineMacro(NULL, dbpathm, RMIL_CMDLINE); - free(dbpathm); - - rpmts tsi = rpmtsCreate(); - (*ts)[0] = tsi; - rc = rpmtsOpenDB(tsi, O_RDONLY); - if( rc ) { - fprintf(stderr, "Failed to open database %s\n", dblistfn); - rc = -1; - } - *tsct = 1; - } - - return rc; -} - -int processPackages(rpmts *ts, int tscount, const char *packagelistfn, int ignoremissing) -{ - int rc = 0; - int count = 0; - int sz = 100; - int i = 0; - int missing = 0; - - FILE *f = fopen(packagelistfn, "r" ); - if(f) { - char line[255]; - while(fgets(line, sizeof(line), f)) { - int len = strlen(line) - 1; - if(len > 0) - // Trim trailing whitespace - while(len > 0 && isspace(line[len])) - line[len--] = '\0'; - - if(len > 0) { - int found = 0; - for(i=0; i<tscount; i++) { - ARGV_t keys = NULL; - rpmdb db = rpmtsGetRdb(ts[i]); - rc = rpmdbMireApply(db, RPMTAG_NAME, - RPMMIRE_STRCMP, line, &keys); - if (keys) { - int nkeys = argvCount(keys); - if( nkeys == 1 ) { - char *value = NULL; - rc = getPackageStr(ts[i], keys[0], RPMTAG_PACKAGEORIGIN, &value); - if(rc == 0) - fprintf(outf, "%s\n", value); - else - fprintf(stderr, "Failed to get package origin for %s\n", line); - found = 1; - } - else if( nkeys > 1 ) { - int keyindex = 0; - fprintf(stderr, "Multiple matches for %s:\n", line); - for( keyindex=0; keyindex<nkeys; keyindex++) { - char *value = NULL; - rc = getPackageStr(ts[i], keys[keyindex], RPMTAG_PACKAGEORIGIN, &value); - if(rc == 0) - fprintf(stderr, " %s\n", value); - else - fprintf(stderr, " (%s)\n", keys[keyindex]); - } - } - } - if(found) - break; - } - - if( !found ) { - if( ignoremissing ) { - fprintf(stderr, "Unable to resolve package %s - ignoring\n", line); - } - else { - fprintf(stderr, "Unable to resolve package %s\n", line); - missing = 1; - } - } - } - count++; - } - fclose(f); - - if( missing ) { - fprintf(stderr, "ERROR: some packages were missing\n"); - rc = 1; - } - } - else { - perror(packagelistfn); - rc = -1; - } - - return rc; -} - -int lookupProvider(rpmts ts, const char *req, char **provider) -{ - int rc = 0; - rpmmi provmi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, req, 0); - if(provmi) { - Header h; - if ((h = rpmmiNext(provmi)) != NULL) { - HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he)); - he->tag = RPMTAG_NAME; - rc = (headerGet(h, he, 0) != 1); - if(rc==0) - *provider = strdup((char *)he->p.ptr); - } - (void)rpmmiFree(provmi); - } - else { - rc = -1; - } - return rc; -} - -int printDepList(rpmts *ts, int tscount) -{ - int rc = 0; - - if( tscount > 1 ) - fprintf(stderr, ">1 database specified with dependency list, using first only\n"); - - /* Get list of names */ - rpmdb db = rpmtsGetRdb(ts[0]); - ARGV_t names = NULL; - rc = rpmdbMireApply(db, RPMTAG_NAME, - RPMMIRE_STRCMP, NULL, &names); - int nnames = argvCount(names); - - /* Get list of NVRAs */ - ARGV_t keys = NULL; - rc = rpmdbMireApply(db, RPMTAG_NVRA, - RPMMIRE_STRCMP, NULL, &keys); - if (keys) { - int i, j; - HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he)); - int nkeys = argvCount(keys); - for(i=0; i<nkeys; i++) { - rpmmi mi = rpmtsInitIterator(ts[0], RPMTAG_NVRA, keys[i], 0); - Header h; - if ((h = rpmmiNext(mi)) != NULL) { - /* Get name of package */ - he->tag = RPMTAG_NAME; - rc = (headerGet(h, he, 0) != 1); - char *name = strdup((char *)he->p.ptr); - /* Get its requires */ - he->tag = RPMTAG_REQUIRENAME; - if (rc = (headerGet(h, he, 0) != 1)) { - if (debugmode) { - printf("DEBUG: %s requires null\n", name); - } - rc = 0; - continue; - } - ARGV_t reqs = (ARGV_t)he->p.ptr; - /* Get its requireflags */ - he->tag = RPMTAG_REQUIREFLAGS; - rc = (headerGet(h, he, 0) != 1); - rpmuint32_t *reqflags = (rpmuint32_t *)he->p.ui32p; - for(j=0; j<he->c; j++) { - int k; - char *prov = NULL; - for(k=0; k<nnames; k++) { - if(strcmp(names[k], reqs[j]) == 0) { - prov = names[k]; - break; - } - } - if(prov) { - if((int)reqflags[j] & 0x80000) - fprintf(outf, "%s|%s [REC]\n", name, prov); - else - fprintf(outf, "%s|%s\n", name, prov); - } - else { - rc = lookupProvider(ts[0], reqs[j], &prov); - if(rc==0 && prov) { - if((int)reqflags[j] & 0x80000) - fprintf(outf, "%s|%s [REC]\n", name, prov); - else - fprintf(outf, "%s|%s\n", name, prov); - free(prov); - } - } - } - free(name); - } - (void)rpmmiFree(mi); - } - } - - return rc; -} - -void usage() -{ - fprintf(stderr, "OpenEmbedded rpm resolver utility\n"); - fprintf(stderr, "syntax: rpmresolve [-i] [-d] [-t] <dblistfile> <packagelistfile>\n"); -} - -int main(int argc, char **argv) -{ - rpmts *ts = NULL; - int tscount = 0; - int rc = 0; - int i; - int c; - int ignoremissing = 0; - int deplistmode = 0; - char *outfile = NULL; - - debugmode = 0; - outf = stdout; - - opterr = 0; - while ((c = getopt (argc, argv, "itdo:")) != -1) { - switch (c) { - case 'i': - ignoremissing = 1; - break; - case 't': - deplistmode = 1; - break; - case 'd': - debugmode = 1; - break; - case 'o': - outfile = strdup(optarg); - break; - case '?': - if(isprint(optopt)) - fprintf(stderr, "Unknown option `-%c'.\n", optopt); - else - fprintf(stderr, "Unknown option character `\\x%x'.\n", - optopt); - usage(); - return 1; - default: - abort(); - } - } - - if( argc - optind < 1 ) { - usage(); - return 1; - } - - if( outfile ) { - if(debugmode) - printf("DEBUG: Using output file %s\n", outfile); - outf = fopen(outfile, "w"); - } - - const char *dblistfn = argv[optind]; - - rpmcliInit(argc, argv, NULL); - - if(debugmode) - rpmSetVerbosity(RPMLOG_DEBUG); - - rpmDefineMacro(NULL, "__dbi_txn create nofsync", RMIL_CMDLINE); - - rc = loadTs(&ts, &tscount, dblistfn); - if( rc ) - return 1; - if( tscount == 0 ) { - fprintf(stderr, "Please specify database list file or database location\n"); - return 1; - } - - if(deplistmode) { - rc = printDepList(ts, tscount); - } - else { - if( argc - optind < 2 ) { - fprintf(stderr, "Please specify package list file\n"); - } - else { - const char *pkglistfn = argv[optind+1]; - rc = processPackages(ts, tscount, pkglistfn, ignoremissing); - } - } - - for(i=0; i<tscount; i++) - (void) rpmtsCloseDB(ts[i]); - free(ts); - - if( outfile ) { - fclose(outf); - free(outfile); - } - - return rc; -} diff --git a/meta/recipes-devtools/rpm/rpmresolve_1.0.bb b/meta/recipes-devtools/rpm/rpmresolve_1.0.bb deleted file mode 100644 index 04a55fd480..0000000000 --- a/meta/recipes-devtools/rpm/rpmresolve_1.0.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "OpenEmbedded RPM resolver utility" -DESCRIPTION = "OpenEmbedded RPM resolver - performs RPM database lookups in batches to avoid \ - repeated invocations of rpm on the command line." -DEPENDS = "rpm" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -PR = "r2" - -SRC_URI = "file://rpmresolve.c" - -S = "${WORKDIR}" - -do_compile() { - ${CC} ${CFLAGS} -ggdb -I${STAGING_INCDIR}/rpm ${LDFLAGS} rpmresolve.c -o rpmresolve -lrpmbuild -lrpm -lrpmio -lrpmdb -lpopt -} - -do_install() { - install -d ${D}${bindir} - install -m 0755 rpmresolve ${D}${bindir} -} - -do_install_append_class-native() { - create_wrapper ${D}/${bindir}/rpmresolve \ - RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ - RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale -} - -BBCLASSEXTEND = "native nativesdk" |