summaryrefslogtreecommitdiffstats
path: root/yocto-poky/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/rpm')
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch20
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch23
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch19
-rwxr-xr-xyocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh16
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch26
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch23
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch194
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch384
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch38
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch30
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch35
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch294
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch48
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch21
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/header-include-fix.patch12
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch27
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch32
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch109
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch43
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch73
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch78
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch104
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db60.patch56
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch32
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch24
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch28
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch43
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch27
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch64
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch27
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch52
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch104
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch16
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch69
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch22
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch10
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch4
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch16
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch35
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch49
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch24
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch14
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch124
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch34
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch19
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch67
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch26
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch29
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch1081
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch25
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch2
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpmatch.patch32
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch53
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch70
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch36
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/uclibc-support.patch38
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch38
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm_4.11.2.bb138
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb327
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb (renamed from yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.14.bb)329
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpmresolve_1.0.bb2
76 files changed, 3231 insertions, 1634 deletions
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch
deleted file mode 100644
index b87787041..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch
deleted file mode 100644
index 7a646de37..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch
deleted file mode 100644
index be0626c8b..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh
deleted file mode 100755
index 083b174f1..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch
deleted file mode 100644
index 2640e54b5..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch
deleted file mode 100644
index f1ecab7b0..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch
deleted file mode 100644
index 9333dea44..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch
deleted file mode 100644
index 3da608573..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch
deleted file mode 100644
index 8d84cf8a1..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
new file mode 100644
index 000000000..e9b73b8bf
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
@@ -0,0 +1,30 @@
+From 06967a50f20095f5ca30b8214f4c98ba0f5262bf Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Sun, 3 Apr 2016 06:55:25 +0200
+Subject: [PATCH] Disable __sync_add_and_fetch_8 on nios2
+
+The NIOS2 softcore does not implement the __sync_add_and_fetch_8,
+so disable it accordingly.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Submitted
+---
+ rpmio/bson.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rpmio/bson.h b/rpmio/bson.h
+index 57023f1..60c7d02 100644
+--- a/rpmio/bson.h
++++ b/rpmio/bson.h
+@@ -880,7 +880,7 @@ BSON_END_DECLS
+ BSON_BEGIN_DECLS
+
+ /* Some architectures do not support __sync_add_and_fetch_8 */
+-#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
++#if (__mips == 32) || (__nios2__) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
+ # define __BSON_NEED_ATOMIC_64 1
+ #endif
+
+--
+2.8.0.rc3
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch
new file mode 100644
index 000000000..c9fb26868
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch
@@ -0,0 +1,35 @@
+[PATCH] define EM_AARCH64
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+EM_AARCH64 maybe not be defined due to old version elf.h, and lead to
+that debugedit can not work on aarch64 elf object files, since there is
+no other dependence, except these two macro, define them to make
+debugedit work on aarch64 elf files.
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ tools/debugedit.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tools/debugedit.c b/tools/debugedit.c
+index de693ed..d16a641 100644
+--- a/tools/debugedit.c
++++ b/tools/debugedit.c
+@@ -35,6 +35,13 @@
+
+ #include <gelf.h>
+
++#ifndef EM_AARCH64
++#define EM_AARCH64 183 /* ARM AARCH64 */
++#endif
++#ifndef R_AARCH64_ABS32
++#define R_AARCH64_ABS32 258
++#endif
++
+ /* some defines taken from the dwarf standard */
+
+ #define DW_TAG_compile_unit 0x11
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch
new file mode 100644
index 000000000..70dd4ff53
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch
@@ -0,0 +1,294 @@
+From 0af17c2ae86c1e8e42b96f6dface08f535bb55ad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 14 Feb 2016 08:33:24 +0000
+Subject: [PATCH] rpm: Fix build on musl
+
+Provide alternatives to assumptions about glibc
+on linux
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Updated to 5.4.16 (CVS)
+
+The patch will likely need additional rework before it can be accepted upsteam
+due to the way MUSL changes are patched in.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+---
+Upstream-Status: Pending
+
+ lib/poptALL.c | 2 ++
+ rpmio/fts.c | 4 ++++
+ rpmio/poptIO.c | 2 ++
+ rpmqv.c | 2 ++
+ system.h | 13 ++++++-------
+ tools/debugedit.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
+ tools/rpm2cpio.c | 2 ++
+ tools/rpmcache.c | 2 ++
+ tools/rpmcmp.c | 2 ++
+ tools/rpmdeps-oecore.c | 2 ++
+ tools/rpmdeps.c | 2 ++
+ tools/rpmdigest.c | 2 ++
+ tools/rpmfind.c | 6 +++---
+ 13 files changed, 78 insertions(+), 10 deletions(-)
+
+Index: rpm-5.4.15/rpmio/fts.c
+===================================================================
+--- rpm-5.4.15.orig/rpmio/fts.c
++++ rpm-5.4.15/rpmio/fts.c
+@@ -124,6 +124,10 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
+ # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp))
+ #endif
+
++#ifndef _STAT_VER
++# define _STAT_VER 0
++#endif
++
+ #if !defined(_D_EXACT_NAMLEN)
+ # define _D_EXACT_NAMLEN(d) (strlen((d)->d_name))
+ #endif
+Index: rpm-5.4.15/tools/debugedit.c
+===================================================================
+--- rpm-5.4.15.orig/tools/debugedit.c
++++ rpm-5.4.15/tools/debugedit.c
+@@ -22,7 +22,12 @@
+ #include <byteswap.h>
+ #include <endian.h>
+ #include <errno.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#else
++#include <stdarg.h>
++void error(int, int, const char *, ...);
++#endif
+ #include <limits.h>
+ #include <string.h>
+ #include <stdlib.h>
+@@ -1535,6 +1540,48 @@ handle_build_id (DSO *dso, Elf_Data *bui
+ puts (hex);
+ }
+ }
++#ifndef __GLIBC__
++extern char *__progname;
++
++void (*error_print_progname)(void) = 0;
++unsigned int error_message_count = 0;
++int error_one_per_line = 0;
++
++static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap)
++{
++ if (file && error_one_per_line) {
++ static const char *oldfile;
++ static unsigned int oldline;
++ if (line == oldline && strcmp(file, oldfile) == 0)
++ return;
++ oldfile = file;
++ oldline = line;
++ }
++ if (error_print_progname)
++ error_print_progname();
++ else
++ fprintf(stderr, "%s: ", __progname);
++ if (file)
++ fprintf(stderr, "%s:%u: ", file, line);
++ vfprintf(stderr, fmt, ap);
++ if (e)
++ fprintf(stderr, ": %s", strerror(e));
++ putc('\n', stderr);
++ fflush(stderr);
++ error_message_count++;
++ if (status)
++ exit(status);
++}
++
++void error(int status, int e, const char *fmt, ...)
++{
++ va_list ap;
++ va_start(ap,fmt);
++ eprint(status, e, 0, 0, fmt, ap);
++ va_end(ap);
++}
++
++#endif
+
+ /* It avoided the segment fault while file's bss offset have a large number.
+ See https://bugzilla.redhat.com/show_bug.cgi?id=1019707
+Index: rpm-5.4.15/tools/rpmfind.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmfind.c
++++ rpm-5.4.15/tools/rpmfind.c
+@@ -1175,7 +1175,7 @@ find_parsenum(PLAN *plan, const char *op
+ * and endchar points to the beginning of the string we know we have
+ * a syntax error.
+ */
+-#if defined(__sun)
++#if defined(__sun) || !defined(__GLIBC_)
+ value = strtoll(str, &endchar, 10);
+ #else
+ value = strtoq(str, &endchar, 10);
+@@ -1215,7 +1215,7 @@ find_parsetime(PLAN *plan, const char *o
+ break;
+ }
+
+-#if defined(__sun)
++#if defined(__sun) || !defined(__GLIBC_)
+ value = strtoll(str, &unit, 10);
+ #else
+ value = strtoq(str, &unit, 10);
+@@ -1253,7 +1253,7 @@ find_parsetime(PLAN *plan, const char *o
+ str = unit + 1;
+ if (*str == '\0') /* EOS */
+ break;
+-#if defined(__sun)
++#if defined(__sun) || !defined(__GLIBC_)
+ value = strtoll(str, &unit, 10);
+ #else
+ value = strtoq(str, &unit, 10);
+Index: rpm-5.4.15/system.h
+===================================================================
+--- rpm-5.4.15.orig/system.h
++++ rpm-5.4.15/system.h
+@@ -372,16 +372,15 @@ extern int _tolower(int) __THROW /*@*/;
+ #define __progname __assert_program_name
+ #endif
+ #define setprogname(pn)
++/*@unchecked@*/
++extern const char *__progname;
+ #else
+-#define __progname program_name
+-#define setprogname(pn) \
+- { if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \
+- else __progname = pn; \
+- }
+-#endif
++#define setprogname(pn)
++#define progname __progname
+
+ /*@unchecked@*/
+-extern const char *__progname;
++extern char *__progname;
++#endif
+
+ /* -- Retrofit missing prototypes (if needed). */
+ #ifdef __cplusplus
+Index: rpm-5.4.15/rpmio/poptIO.c
+===================================================================
+--- rpm-5.4.15.orig/rpmio/poptIO.c
++++ rpm-5.4.15/rpmio/poptIO.c
+@@ -65,7 +65,9 @@ extern int _rpmsvn_debug;
+ GENfree(rpmioP)
+ #endif /* __cplusplus */
+
++#ifdef __GLIBC__
+ const char *__progname;
++#endif
+
+ #if !defined(POPT_ARGFLAG_TOGGLE) /* XXX compat with popt < 1.15 */
+ #define POPT_ARGFLAG_TOGGLE 0
+Index: rpm-5.4.15/lib/poptALL.c
+===================================================================
+--- rpm-5.4.15.orig/lib/poptALL.c
++++ rpm-5.4.15/lib/poptALL.c
+@@ -4,7 +4,9 @@
+ */
+
+ #include "system.h"
++#ifdef __GLIBC__
+ extern const char *__progname;
++#endif
+
+ #if defined(RPM_VENDOR_WINDRIVER)
+ const char *__usrlibrpm = USRLIBRPM;
+Index: rpm-5.4.15/tools/rpm2cpio.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpm2cpio.c
++++ rpm-5.4.15/tools/rpm2cpio.c
+@@ -1,7 +1,9 @@
+ /* rpmarchive: spit out the main archive portion of a package */
+
+ #include "system.h"
++#ifdef __GLIBC__
+ const char *__progname;
++#endif
+
+ #include <rpmio.h>
+ #include <rpmiotypes.h> /* XXX fnpyKey */
+Index: rpm-5.4.15/tools/rpmcache.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmcache.c
++++ rpm-5.4.15/tools/rpmcache.c
+@@ -3,7 +3,9 @@
+ */
+
+ #include "system.h"
++#ifdef __GLIBC__
+ const char *__progname;
++#endif
+
+ #include <fnmatch.h>
+ #include <fts.h>
+Index: rpm-5.4.15/tools/rpmdeps-oecore.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmdeps-oecore.c
++++ rpm-5.4.15/tools/rpmdeps-oecore.c
+@@ -1,5 +1,7 @@
+ #include "system.h"
++#ifdef __GLIBC__
+ const char *__progname;
++#endif
+
+ #include <rpmio.h>
+ #include <rpmiotypes.h>
+Index: rpm-5.4.15/tools/rpmdeps.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmdeps.c
++++ rpm-5.4.15/tools/rpmdeps.c
+@@ -1,5 +1,7 @@
+ #include "system.h"
++#ifdef __GLIBC__
+ const char *__progname;
++#endif
+
+ #include <rpmio.h>
+ #include <rpmiotypes.h>
+Index: rpm-5.4.15/tools/rpmdigest.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmdigest.c
++++ rpm-5.4.15/tools/rpmdigest.c
+@@ -1,6 +1,8 @@
+ #include "system.h"
++#ifdef __GLIBC__
+ /*@unchecked@*/
+ extern const char * __progname;
++#endif
+
+ #define _RPMIOB_INTERNAL
+ #include <rpmiotypes.h>
+Index: rpm-5.4.15/tools/rpmcmp.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmcmp.c
++++ rpm-5.4.15/tools/rpmcmp.c
+@@ -13,8 +13,10 @@
+
+ #include "debug.h"
+
++#ifdef __GLIBC__
+ const char *__progname;
+ #define progname __progname
++#endif
+
+ static int pointRpmEVR(ARGV_t av)
+ {
+Index: rpm-5.4.15/rpmqv.c
+===================================================================
+--- rpm-5.4.15.orig/rpmqv.c
++++ rpm-5.4.15/rpmqv.c
+@@ -1,5 +1,7 @@
+ #include "system.h"
++#ifdef __GLIBC__
+ extern const char *__progname;
++#endif
+
+ /* Copyright (C) 1998-2002 - Red Hat, Inc. */
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
index 23bc3361d..712825009 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
@@ -4,7 +4,7 @@ Date: Tue, 11 Nov 2014 16:28:22 +0800
Subject: [PATCH] using poptParseArgvString to parse the
_gpg_check_password_cmd
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
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,
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
index beef5edd9..c83c8b5f3 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
@@ -11,38 +11,40 @@ 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
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Index: rpm-5.4.14/tools/debugedit.c
+Index: rpm/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
- {
+--- rpm.orig/tools/debugedit.c
++++ rpm/tools/debugedit.c
+@@ -1403,7 +1403,8 @@ static inline void process (hashFunction
+ const void *data, size_t size)
+ {
+ memchunk chunk = { .data = (void *) data, .size = size };
+- hashFunctionContextUpdateMC (ctx, &chunk);
++ if (data != NULL && size != 0)
++ hashFunctionContextUpdateMC (ctx, &chunk);
+ }
+
+ /* Compute a fresh build ID bit-string from the editted file contents. */
+@@ -1456,14 +1457,16 @@ handle_build_id (DSO *dso, Elf_Data *bui
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)
++ } u1, u2;
++ Elf_Data src = { .d_version = EV_CURRENT, .d_buf = &u1 };
++ Elf_Data dest = { .d_version = EV_CURRENT, .d_buf = &u2 };
++
+ src.d_type = ELF_T_EHDR;
+ src.d_size = sizeof u1.ehdr;
+ dest.d_size = sizeof u2.ehdr;
@@ -52,7 +54,7 @@ Index: rpm-5.4.14/tools/debugedit.c
{
bad:
fprintf (stderr, "Failed to compute header checksum: %s\n",
-@@ -1467,29 +1470,31 @@ handle_build_id (DSO *dso, Elf_Data *bui
+@@ -1471,29 +1474,31 @@ handle_build_id (DSO *dso, Elf_Data *bui
exit (1);
}
@@ -69,8 +71,8 @@ Index: rpm-5.4.14/tools/debugedit.c
- 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);
+- process (&ctx, x.d_buf, x.d_size);
++ process (&ctx, dest.d_buf, dest.d_size);
}
- x.d_type = ELF_T_SHDR;
@@ -88,8 +90,8 @@ Index: rpm-5.4.14/tools/debugedit.c
+ 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);
+- process (&ctx, x.d_buf, x.d_size);
++ process (&ctx, dest.d_buf, dest.d_size);
- if (u.shdr.sh_type != SHT_NOBITS)
+ if (u1.shdr.sh_type != SHT_NOBITS)
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
index f7c31006b..804048253 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
@@ -14,7 +14,7 @@ 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
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
tools/debugedit.c | 25 +++++++++++++++++++++++++
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
deleted file mode 100644
index 976af486f..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm/header-include-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/header-include-fix.patch
index 5ffb187ff..e72df45b5 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/header-include-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/header-include-fix.patch
@@ -1,4 +1,14 @@
-Upstream-Status: Pending
+Update two rpm headers to include other headers.
+
+Using rpmdb.h w/o including errno.h may result in a warning.
+
+Using rpmtag.h w/o also adding stdint.h will result in numerous failures
+about unknown types on modern compilers.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Qing He <qing.he@intel.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Index: rpm-5.4.14/rpmdb/rpmdb.h
===================================================================
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
index 8fab9eb42..5d936db5a 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
@@ -14,7 +14,7 @@ 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
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Morgan Little <morgan.little@windriver.com>
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
new file mode 100644
index 000000000..bcad8dcb7
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
@@ -0,0 +1,27 @@
+popt: Disable default stack protection on internal version of popt
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/popt/configure.ac
+===================================================================
+--- rpm-5.4.15.orig/popt/configure.ac
++++ rpm-5.4.15/popt/configure.ac
+@@ -123,7 +123,6 @@ AS_IF([test "x$popt_gcc_warnings" = xyes
+ popt_CFLAGS_ADD([-Wjump-misses-init],[POPT_CFLAGS])
+ popt_CFLAGS_ADD([-Wno-format-nonliteral],[POPT_CFLAGS])
+ popt_CFLAGS_ADD([-Wframe-larger-than=$MAX_STACK_SIZE],[POPT_CFLAGS])
+- popt_CFLAGS_ADD([-fstack-protector-all],[POPT_CFLAGS])
+ popt_CFLAGS_ADD([-fasynchronous-unwind-tables],[POPT_CFLAGS])
+ popt_CFLAGS_ADD([-fdiagnostics-show-option],[POPT_CFLAGS])
+ popt_CFLAGS_ADD([-funit-at-a-time],[POPT_CFLAGS])
+@@ -203,7 +202,7 @@ AC_SUBST([POPT_LDFLAGS])
+ # -fno-delete-null-pointer as the kernel does http://patchwork.kernel.org/patch/36060/
+ # GNU GCC (usually "gcc")
+ AS_IF([test "x$GCC" != x],
+- [ for c in -fno-delete-null-pointer-checks -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -fexceptions
++ [ for c in -fno-delete-null-pointer-checks -fexceptions
+ do
+ popt_CFLAGS_ADD([$c], [POPT_CFLAGS])
+ done
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
index a538a60bb..590f58d89 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
@@ -4,30 +4,28 @@ 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
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Index: rpm-5.4.14/python/rpmmodule.c
+Index: rpm/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)
+--- rpm.orig/python/rpmmodule.c
++++ rpm/python/rpmmodule.c
+@@ -525,12 +525,15 @@ static int initModule(PyObject *m)
REGISTER_ENUM(RPMSENSE_PREREQ);
+ REGISTER_ENUM(RPMSENSE_PRETRANS);
+ REGISTER_ENUM(RPMSENSE_INTERP);
++#else
++ #if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
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_SCRIPT_POSTUN);
+ REGISTER_ENUM(RPMSENSE_SCRIPT_VERIFY);
+-#else
+ REGISTER_ENUM(RPMSENSE_MISSINGOK);
++ #endif
+ REGISTER_ENUM(RPMSENSE_NOTEQUAL);
#endif
-
- REGISTER_ENUM(RPMDEPS_FLAG_NOUPGRADE);
+ REGISTER_ENUM(RPMSENSE_FIND_REQUIRES);
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch
deleted file mode 100644
index b107e8f04..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch
deleted file mode 100644
index bf1795ca4..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch
new file mode 100644
index 000000000..cc241f4f1
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch
@@ -0,0 +1,73 @@
+Some architectures do not have __sync_add_and_fetch_8 implemented.
+
+MIPS (32-bit) and some PPC systems do not have sync_add_and_fetch_8.
+
+Provide an alternative. This alternative function is based on code from:
+ https://github.com/mongodb/libbson/blob/master/src/bson/bson-atomic.c
+
+Code is under an Apache 2.0 License.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/rpmio/bson.h
+===================================================================
+--- rpm-5.4.15.orig/rpmio/bson.h
++++ rpm-5.4.15/rpmio/bson.h
+@@ -879,10 +879,18 @@ BSON_END_DECLS
+
+ BSON_BEGIN_DECLS
+
++/* Some architectures do not support __sync_add_and_fetch_8 */
++#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
++# define __BSON_NEED_ATOMIC_64 1
++#endif
+
+ #if defined(__GNUC__)
+ # define bson_atomic_int_add(p, v) (__sync_add_and_fetch(p, v))
+-# define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
++#ifndef __BSON_NEED_ATOMIC_64
++# define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
++# else
++ int64_t bson_atomic_int64_add (volatile int64_t *p, int64_t n);
++# endif
+ # define bson_memory_barrier __sync_synchronize
+ #elif defined(_MSC_VER) || defined(_WIN32)
+ # define bson_atomic_int_add(p, v) (InterlockedExchangeAdd((long int *)(p), v))
+Index: rpm-5.4.15/rpmio/bson.c
+===================================================================
+--- rpm-5.4.15.orig/rpmio/bson.c
++++ rpm-5.4.15/rpmio/bson.c
+@@ -3863,13 +3863,30 @@ _bson_context_get_oid_seq64_threadsafe (
+ #elif defined BSON_OS_WIN32
+ uint64_t seq = InterlockedIncrement64 ((int64_t *)&context->seq64);
+ #else
+- uint64_t seq = __sync_fetch_and_add_8 (&context->seq64, 1);
++ uint64_t seq = bson_atomic_int64_add (&context->seq64, 1);
+ #endif
+
+ seq = BSON_UINT64_TO_BE (seq);
+ memcpy (&oid->bytes[4], &seq, 8);
+ }
+
++#ifdef __BSON_NEED_ATOMIC_64
++#include <pthread.h>
++static pthread_mutex_t gSync64 = PTHREAD_MUTEX_INITIALIZER;
++int64_t
++bson_atomic_int64_add (volatile int64_t *p,
++ int64_t n)
++{
++ int64_t ret;
++
++ pthread_mutex_lock (&gSync64);
++ *p += n;
++ ret = *p;
++ pthread_mutex_unlock (&gSync64);
++
++ return ret;
++}
++#endif
+
+ /**
+ * bson_context_new:
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch
new file mode 100644
index 000000000..258a7f6e7
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch
@@ -0,0 +1,78 @@
+In order to enable musl or other libc support, force update the config.guess
+
+In order to reliably replace config.guess and config.sub, we need to remove
+them prior to the call to automake. Adding the --force-missing is likely
+not necessary, but matching normal OE autoreconf usage.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/autogen.sh
+===================================================================
+--- rpm-5.4.15.orig/autogen.sh
++++ rpm-5.4.15/autogen.sh
+@@ -73,7 +73,8 @@ rm -f aclocal.m4
+ aclocal -I m4
+ autoheader -I m4
+ echo "---> generate files via GNU automake (automake)"
+-automake -Wall -Wno-override -a -c
++rm -f config.guess config.sub
++automake -Wall -Wno-override -a -c --force-missing
+ echo "---> generate files via GNU autoconf (autoconf)"
+ autoconf -I m4
+ echo "<=== rpm"
+Index: rpm-5.4.15/beecrypt/autogen.sh
+===================================================================
+--- rpm-5.4.15.orig/beecrypt/autogen.sh
++++ rpm-5.4.15/beecrypt/autogen.sh
+@@ -25,6 +25,7 @@ libtoolize () {
+
+ libtoolize --force --copy
+ aclocal
+-automake -a -c
++rm -f config.guess config.sub
++automake -a -c --force-missing
+ autoconf
+ autoheader
+Index: rpm-5.4.15/libtpm/autogen.sh
+===================================================================
+--- rpm-5.4.15.orig/libtpm/autogen.sh
++++ rpm-5.4.15/libtpm/autogen.sh
+@@ -46,7 +46,8 @@ echo "---> generate files via GNU autoco
+ aclocal
+ autoheader
+ echo "---> generate files via GNU automake (automake)"
+-automake -Wall -Wno-override -a -c
++rm -f config.guess config.sub
++automake -Wall -Wno-override -a -c --force-missing
+ echo "---> generate files via GNU autoconf (autoconf)"
+ autoconf
+
+Index: rpm-5.4.15/neon/autogen.sh
+===================================================================
+--- rpm-5.4.15.orig/neon/autogen.sh
++++ rpm-5.4.15/neon/autogen.sh
+@@ -63,7 +63,8 @@ echo "---> generate files via GNU autoco
+ ${ACLOCAL:-aclocal} -I macros
+ ${AUTOHEADER:-autoheader}
+ echo "---> generate files via GNU automake (automake)"
+-${AUTOMAKE:-automake} -Wall -Wno-override -a -c
++rm -f config.guess config.sub
++${AUTOMAKE:-automake} -Wall -Wno-override -a -c --force-missing
+ echo "---> generate files via GNU autoconf (autoconf)"
+ ${AUTOCONF:-autoconf} -Wall
+
+Index: rpm-5.4.15/syck/autogen.sh
+===================================================================
+--- rpm-5.4.15.orig/syck/autogen.sh
++++ rpm-5.4.15/syck/autogen.sh
+@@ -40,6 +40,7 @@ echo "---> generate files via GNU autoco
+ aclocal
+ autoheader
+ echo "---> generate files via GNU automake (automake)"
+-automake -Wall -Wno-override -a -c
++rm -f config.guess config.sub
++automake -Wall -Wno-override -a -c --force-missing
+ echo "---> generate files via GNU autoconf (autoconf)"
+ autoconf
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
index 41ab498a0..81fc84937 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
@@ -14,7 +14,7 @@ This patch changes the list of supported items to:
<arch>-<vendor>-<os>
<arch>-<vendor>-<os>-<extension>
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
index 77020a34d..5d08d279a 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
@@ -1,23 +1,29 @@
-Support both db5 and db6.
+From 7bad268de8b32281e2a12ccd88038b3ec5eb1be3 Mon Sep 17 00:00:00 2001
+From: Yuanjie Huang <Yuanjie.Huang@windriver.com>
+Date: Tue, 15 Dec 2015 18:50:21 +0800
+Subject: [PATCH] Support both db5 and db6.
Upstream-Status: Inappropriate [configuration]
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
+---
+ configure.ac | 103 ++++++++++++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 81 insertions(+), 22 deletions(-)
Index: rpm/configure.ac
===================================================================
--- rpm.orig/configure.ac
+++ rpm/configure.ac
-@@ -547,8 +547,6 @@ else
+@@ -871,8 +871,6 @@ else
MYPATH=$PATH
fi
--DBXY=db60
+-DBXY=db61
-
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}/
+@@ -884,22 +882,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)
@@ -40,7 +46,7 @@ Index: rpm/configure.ac
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(
+@@ -2050,13 +2032,46 @@ RPM_CHECK_LIB(
dnl # Berkeley-DB & SQLite
DBLIBSRCS=""
@@ -48,68 +54,74 @@ Index: rpm/configure.ac
+
# XXX won't handle --includedir override
-CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}"
+-RPM_CHECK_LIB(
+CPPFLAGS_save="${CPPFLAGS}"
-+CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-6.0"
++CPPFLAGS="${CPPFLAGS_save}"
+with_db_save="${with_db}"
- RPM_CHECK_LIB(
++
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#include <db.h>
++]],
++[[
++#if DB_VERSION_MAJOR < 6
++#error DB_VERSION_MAJOR is below 6
++#endif
++]])],
++[RPM_CHECK_LIB(
[Berkeley-DB], [db],
- [db-6.0], [db_create], [db.h],
+ [db-6.1], [db_create], [db.h],
- [yes,external], [db3],
+ [yes,external], [db6],
[ DBLIBSRCS="$DBLIBSRCS db3.c"
-+ DBXY=db60
++ DBXY=db61
++ 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 ])
++ ])],
++[with_db="${with_db_save}"
++ CPPFLAGS="${CPPFLAGS_save}"
++ 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
-@@ -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 ])
-+ ])
+@@ -2068,6 +2083,11 @@ RPM_CHECK_LIB(
+ [ 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
++])
++
++if test ".$ac_cv_lib_db_6_1_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(
+@@ -2078,10 +2098,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
+ dnl # Sqlite 3.8.3.1 from db-6.1.19
++if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then
RPM_CHECK_LIB(
[Berkeley-DB (+SQLite3)], [dbsql],
- [db_sql-6.0], [sqlite3_open], [dbsql.h],
+ [db_sql-6.1], [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(
+@@ -2095,12 +2116,50 @@ RPM_CHECK_LIB(
], [
AM_CONDITIONAL(WITH_DBSQL, [ false ])
])
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db60.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db60.patch
new file mode 100644
index 000000000..b4df8b751
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db60.patch
@@ -0,0 +1,56 @@
+Set the DB 6 version to match oe-core db 6.0.30
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/configure.ac
+===================================================================
+--- rpm.orig/configure.ac
++++ rpm/configure.ac
+@@ -2049,10 +2049,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ ]])],
+ [RPM_CHECK_LIB(
+ [Berkeley-DB], [db],
+- [db-6.1], [db_create], [db.h],
++ [db-6.0], [db_create], [db.h],
+ [yes,external], [db6],
+ [ DBLIBSRCS="$DBLIBSRCS db3.c"
+- DBXY=db61
++ 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
+@@ -2085,7 +2085,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ ])
+ ])
+
+-if test ".$ac_cv_lib_db_6_1_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
++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
+
+@@ -2097,11 +2097,11 @@ RPM_CHECK_LIB(
+ [ DBLIBSRCS="$DBLIBSRCS sqlite.c" ],
+ [])
+
+-dnl # Sqlite 3.8.3.1 from db-6.1.19
+-if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then
++dnl # Sqlite 3.8.3.1 from db-6.0.30
++if test ".$ac_cv_lib_db_6_0_db_create" = .yes; then
+ RPM_CHECK_LIB(
+ [Berkeley-DB (+SQLite3)], [dbsql],
+- [db_sql-6.1], [sqlite3_open], [dbsql.h],
++ [db_sql-6.0], [sqlite3_open], [dbsql.h],
+ [yes,external], [db6/sql],
+ [
+ AM_CONDITIONAL(WITH_DBSQL, [ true ])
+@@ -2253,7 +2253,7 @@ AC_SUBST(WITH_RUBY_CPPFLAGS)
+ AC_SUBST(WITH_RUBY_SUBDIR)
+ AC_SUBST(WITH_RUBY_VENDORARCHDIR)
+
+-dnl # Java prerequisites (swiped from db-6.1.19/dist/aclocal_java et al)
++dnl # Java prerequisites (swiped from db-6.0.30/dist/aclocal_java et al)
+ WITH_JAVA=no
+ AC_ARG_WITH([java],
+ AS_HELP_STRING([--with-java], [build RPM with java support]),
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch
deleted file mode 100644
index 8b5f8d66c..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch
new file mode 100644
index 000000000..124606c0d
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch
@@ -0,0 +1,24 @@
+Make security switches manual settings
+
+RPM checks for the availability of the stack protector switch and
+transactional-memory support. If supported it unconditionally
+enables the compiler options which can cause errors if the support has
+not been built into the compiler.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/configure.ac
+===================================================================
+--- rpm-5.4.15.orig/configure.ac
++++ rpm-5.4.15/configure.ac
+@@ -425,7 +425,7 @@ dnl # rpm_CFLAGS_ADD([-fstack-arrays],[
+ dnl # build RPM instrumented for extra optimization/security (GCC only)
+ dnl # --- other optimizations
+ rpm_CFLAGS_ADD([-fexceptions], [RPM_CFLAGS])
+- rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
++dnl rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
+ dnl # rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
+
+ if test \( ".`$CC --version 2>&1 | grep 'GCC'`" != . \); then
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch
new file mode 100644
index 000000000..adbef6df8
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch
@@ -0,0 +1,28 @@
+rpmio: Disable building of the tblake2 test(s).
+
+There is some type of a dependency fault here that can occasionally result in:
+
+gcc: error: tblake2b.o: No such file or directory
+or
+gcc: error: tblake2bp.o: No such file or directory
+
+These items are simply test cases that are not packaged, so they can be
+safely disabled to resolve the dependency issue.
+
+Upstream-Status: Inappropriate [workaround]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/rpmio/Makefile.am
+===================================================================
+--- rpm-5.4.15.orig/rpmio/Makefile.am
++++ rpm-5.4.15/rpmio/Makefile.am
+@@ -29,7 +29,7 @@ EXTRA_PROGRAMS += bsdiff bspatch pcrsed
+ tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \
+ dumpasn1 lookup3 trel twitter github tmicrojson duk
+
+-noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
++#noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
+ if WITH_LIBGIT2
+ noinst_PROGRAMS += tgit
+ else
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
index 27a0a8df8..290ec1aa1 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
@@ -1,7 +1,7 @@
Occasionally the cp -p fails with a non-zero return code. This will cause
the system abort the build.
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch
new file mode 100644
index 000000000..1a08243ab
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch
@@ -0,0 +1,43 @@
+Upstream-Status: Pending
+
+Subject: lua: fix to build test libs correctly
+
+This patch fixes errors like below.
+
+ | gcc: error: lib21.c: No such file or directory
+ | gcc: fatal error: no input files
+
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ lua/tests/libs/Makefile.am | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lua/tests/libs/Makefile.am b/lua/tests/libs/Makefile.am
+index 19d1a0b..1e5de72 100644
+--- a/lua/tests/libs/Makefile.am
++++ b/lua/tests/libs/Makefile.am
+@@ -28,16 +28,16 @@ clean:
+ rm -f lib1.so lib11.so lib2.so lib21.so lib2-v2.so
+
+ lib1.so: lib1.c
+- $(CC) $(CFLAGS) -o lib1.so lib1.c
++ $(CC) $(CFLAGS) -o lib1.so $(top_srcdir)/lua/tests/libs/lib1.c
+
+ lib11.so: lib11.c
+- $(CC) $(CFLAGS) -o lib11.so lib11.c
++ $(CC) $(CFLAGS) -o lib11.so $(top_srcdir)/lua/tests/libs/lib11.c
+
+ lib2.so: lib2.c
+- $(CC) $(CFLAGS) -o lib2.so lib2.c
++ $(CC) $(CFLAGS) -o lib2.so $(top_srcdir)/lua/tests/libs/lib2.c
+
+ lib21.so: lib21.c
+- $(CC) $(CFLAGS) -o lib21.so lib21.c
++ $(CC) $(CFLAGS) -o lib21.so $(top_srcdir)/lua/tests/libs/lib21.c
+
+ lib2-v2.so: lib2.so
+ mv lib2.so ./lib2-v2.so
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch
new file mode 100644
index 000000000..c57f24cd7
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch
@@ -0,0 +1,27 @@
+Fix an issue where parseEmbedded is not defined, but is still used.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/rpmio/macro.c
+===================================================================
+--- rpm.orig/rpmio/macro.c
++++ rpm/rpmio/macro.c
+@@ -1616,8 +1616,6 @@ exit:
+ * @retval *avp invocation args
+ * @return script string
+ */
+-#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_MOZJS) || defined(WITH_JNIEMBED) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) || defined(WITH_RUBYEMBED) || defined(WITH_MRUBY_EMBED) || defined(WITH_SQLITE) || defined(WITH_SQUIRREL) || defined(WITH_TCL)
+-
+ static char _FIXME_embedded_interpreter_eval_returned_null[] =
+ "FIXME: embedded interpreter eval returned null.";
+
+@@ -1668,7 +1666,6 @@ bingo:
+ script[nb] = '\0';
+ return script;
+ }
+-#endif
+
+ /**
+ * The main macro recursion loop.
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
new file mode 100644
index 000000000..36a418fc6
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
@@ -0,0 +1,64 @@
+configure.ac: Check if the current compiler supports the transactions
+
+Some distributions appear to have compilers that are built without support
+for transactions, even though they are GCC 4.7 or newer.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/configure.ac
+===================================================================
+--- rpm-5.4.15.orig/configure.ac
++++ rpm-5.4.15/configure.ac
+@@ -425,9 +425,34 @@ dnl # --- other optimizations
+ rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
+ dnl # rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
+
+- if test \( ".`$CC --version 2>&1 | grep 'GCC'`" != . \); then
+- rpm_CFLAGS_ADD([-fgnu-tm], [RPM_CFLAGS])
+- fi
++dnl # Check if the current gcc supports -fgnu-tm and __transaction_atomic
++AC_MSG_CHECKING([If the compiler supports __transaction_atomic])
++save_CFLAGS="$CFLAGS"
++save_LDFLAGS="$LDFLAGS"
++CFLAGS="${CFLAGS} -fgnu-tm -litm"
++LDFLAGS="${LDFLAGS} -litm"
++AC_LINK_IFELSE([AC_LANG_SOURCE([[
++int
++main()
++{
++#if !__clang__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)) /* XXX gud enuf? */
++ int i = 0;
++ __transaction_atomic { i++; }
++#else
++# error Compiler does not support __transaction_atomic
++#endif
++ return 0;
++}
++]])], [
++ AC_DEFINE([HAVE_GNUC_TM_ATOMIC], [1],
++ [Define to 1 if the compiler supports __transaction_atomic.])
++ AC_MSG_RESULT([yes])
++], [
++ CFLAGS="$save_CFLAGS"
++ LDFLAGS="$save_LDFLAGS"
++ AC_MSG_RESULT([no])
++])
++
+
+ dnl # --- options below are added to RPM_CFLAGS but _NOT_ added to CFLAGS
+ CPPFLAGS="$CPPFLAGS $RPM_CPPFLAGS"
+Index: rpm-5.4.15/rpmio/rpmutil.h
+===================================================================
+--- rpm-5.4.15.orig/rpmio/rpmutil.h
++++ rpm-5.4.15/rpmio/rpmutil.h
+@@ -105,7 +105,7 @@
+ # define RPM_GNUC_INTERNAL
+ #endif
+
+-#if !__clang__ && __GNUC__ == 4 && __GNUC_MINOR__ >= 7 /* XXX gud enuf? */
++#ifdef HAVE_GNUC_TM_ATOMIC
+ # define RPM_GNUC_TM_SAFE __attribute__((transaction_safe))
+ # define RPM_GNUC_TM_PURE __attribute__((transaction_pure))
+ # define RPM_GNUC_TM_CALLABLE __attribute__((transaction_callable))
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
index 5deb2323e..057925fb6 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
@@ -8,7 +8,7 @@ are found. We need to fix the caller to check the return code too.
RP 2014/6/10
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
Index: rpm-5.4.14/lib/fsm.c
===================================================================
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch
new file mode 100644
index 000000000..72884d4ad
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch
@@ -0,0 +1,27 @@
+rpm - rpmio/keccak.c: make SSE/MMX dependent upon gcc config
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/rpmio/keccak.c
+===================================================================
+--- rpm-5.4.15.orig/rpmio/keccak.c
++++ rpm-5.4.15/rpmio/keccak.c
+@@ -17,9 +17,13 @@ http://keccak.noekeon.org/
+ #if OPTIMIZED == 64
+ /* ===== "KeccakOpt64-settings.h" */
+ #define Unrolling 18
+-//#define UseBebigokimisa
+-#define UseSSE
+-//#define UseMMX
++#if defined(__SSE2__)
++ #define UseSSE
++#elif defined(__MMX__)
++ #define UseMMX
++#else
++ #define UseBebigokimisa
++#endif
+ /* ===== */
+ #endif
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
new file mode 100644
index 000000000..1a48db63c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
@@ -0,0 +1,52 @@
+From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 2 Dec 2015 00:56:07 -0800
+Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
+
+The following error can occur:
+ smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3
+error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
+error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32
+
+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)
+
+There are two places where the conflict comparisons occur. In both places
+the 'else' clause was too restrictive (opposite of the 'positive' clause).
+This caused the system to only permit a binary comparison - "new preferred" or
+"old preferred". It did not permissing "neither preferred". By removing the
+else comparison the system will now perform a 'last-in-wins' resolution when
+"neither is preferred".
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ lib/transaction.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: rpm-5.4.14/lib/transaction.c
+===================================================================
+--- rpm-5.4.14.orig/lib/transaction.c
++++ rpm-5.4.14/lib/transaction.c
+@@ -154,7 +154,7 @@ static int handleInstInstalledFile(const
+ fi->actions[fx] = FA_SKIPCOLOR;
+ #endif
+ rConflicts = 0;
+- } else if (FColor & prefcolor) {
++ } else {
+ #ifdef REFERENCE
+ rpmfsSetAction(fs, fx, FA_CREATE);
+ #else
+@@ -420,7 +420,7 @@ assert(otherFi != NULL);
+ fi->actions[i] = FA_SKIPCOLOR;
+ rConflicts = 0;
+ } else
+- if (FColor == 0 && oFColor == 0) {
++ {
+ /* ... otherwise, do both, last in wins. */
+ otherFi->actions[otherFileNum] = FA_CREATE;
+ fi->actions[i] = FA_CREATE;
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
index 042e412ed..e87e02b69 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
@@ -2,7 +2,7 @@ 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
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
index 790a66217..a87518ba3 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
@@ -5,7 +5,7 @@ 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
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch
deleted file mode 100644
index 7ab49e97e..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
index 07a0cfa30..a08412aa9 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
@@ -12,16 +12,20 @@ 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
+Index: rpm/macros/macros.in
+===================================================================
+--- rpm.orig/macros/macros.in
++++ rpm/macros/macros.in
+@@ -563,10 +563,10 @@ $_arbitrary_tags_tests Foo:Bar
+
# Horowitz Key Protocol server configuration
#
+-%_hkp_keyserver hkp://keys.rpm5.org
++#%_hkp_keyserver hkp://keys.rpm5.org
#%_hkp_keyserver hkp://keys.n3npq.net
--%_hkp_keyserver hkp://pool.sks-keyservers.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
+ # NSS_InitContext() parameter configuration
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch
new file mode 100644
index 000000000..6c3e4718b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch
@@ -0,0 +1,69 @@
+Fix errors when building with sasl2 disabled
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/rpmio/mongoc.c
+===================================================================
+--- rpm.orig/rpmio/mongoc.c
++++ rpm/rpmio/mongoc.c
+@@ -39,8 +39,10 @@
+ # include <winerror.h>
+ #endif
+
++#ifdef HAVE_LIBSASL2
+ #include <sasl/sasl.h>
+ #include <sasl/saslutil.h>
++#endif
+
+ #include <openssl/bio.h>
+ #include <openssl/ssl.h>
+@@ -14228,6 +14230,7 @@ mongoc_read_prefs_copy (const mongoc_rea
+ return ret;
+ }
+
++#ifdef MONGOC_ENABLE_SASL
+ /*==============================================================*/
+ /* --- mongoc-sasl.c */
+
+@@ -14555,6 +14558,7 @@ _mongoc_sasl_step (mongoc_sasl_t *sasl,
+
+ return true;
+ }
++#endif
+
+ /*==============================================================*/
+ /* --- mongoc-socket.c */
+Index: rpm/rpmio/mongoc.h
+===================================================================
+--- rpm.orig/rpmio/mongoc.h
++++ rpm/rpmio/mongoc.h
+@@ -38,8 +38,10 @@
+ # include <sys/un.h>
+ #endif
+
++#ifdef HAVE_LIBSASL2
+ #include <sasl/sasl.h>
+ #include <sasl/saslutil.h>
++#endif
+
+ #include <openssl/bio.h>
+ #include <openssl/ssl.h>
+@@ -2455,6 +2457,8 @@ BSON_END_DECLS
+ /*==============================================================*/
+ /* --- mongoc-sasl-private.h */
+
++#ifdef MONGOC_ENABLE_SASL
++
+ BSON_BEGIN_DECLS
+
+
+@@ -2498,6 +2502,7 @@ bool _mongoc_sasl_step (mong
+
+
+ BSON_END_DECLS
++#endif
+
+ /*==============================================================*/
+ /* --- mongoc-ssl-private.h */
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
index ab6ed2c3a..e58cc13a6 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
@@ -1,6 +1,6 @@
lib/order.c: Make the dependency loop messages into debug msgs
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
index 07d586a3a..e2191245f 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
@@ -6,7 +6,7 @@ rpmpsmStage function(rpmVerifyScript->rpmpsmScriptStage->rpmpsmStage) and occur
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
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Index: rpm-5.4.14/lib/verify.c
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
index c15e12405..57fc6ce88 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
@@ -2,7 +2,7 @@ Add the ability to query the packageorigin
Written by jbj at rpm5.org
-Upstream-Status: Inappropriate [not author]
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
index 9cd02a0f9..af643b1c6 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
@@ -17,7 +17,7 @@ Patch taken from http://git.pld-linux.org/?p=packages/rpm.git;a=commitdiff;h=105
RP 2014/6/10
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
Index: rpm-5.4.14/build/files.c
===================================================================
@@ -124,23 +124,3 @@ Index: rpm-5.4.14/build/files.c
}
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/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
index 5d182ad9f..656de86d7 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
@@ -9,14 +9,14 @@ Upstream-Status: Inappropriate [configuration]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Index: rpm-5.4.14/scripts/pkgconfigdeps.sh
+Index: rpm/scripts/pkgconfigdeps.sh
===================================================================
---- rpm-5.4.14.orig/scripts/pkgconfigdeps.sh
-+++ rpm-5.4.14/scripts/pkgconfigdeps.sh
+--- rpm.orig/scripts/pkgconfigdeps.sh
++++ rpm/scripts/pkgconfigdeps.sh
@@ -18,8 +18,8 @@ case $1 in
*.pc)
# Query the dependencies of the package.
- DIR=`dirname ${filename}`
+ DIR=$(dirname ${filename})
- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
- export PKG_CONFIG_PATH
+ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
@@ -27,7 +27,7 @@ Index: rpm-5.4.14/scripts/pkgconfigdeps.sh
@@ -42,8 +42,8 @@ case $1 in
[ -n "$oneshot" ] && echo "$oneshot"; oneshot=""
# Query the dependencies of the package.
- DIR=`dirname ${filename}`
+ DIR=$(dirname ${filename})
- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
- export PKG_CONFIG_PATH
+ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
index f26a6e79d..200964f39 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
@@ -2,7 +2,7 @@ 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]
+Upstream-Status: Submitted [RPM5 maintainer]
Index: rpm-5.4.14/lib/rpmrc.c
===================================================================
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform.patch
index 11fd03903..3b40fea0e 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform.patch
@@ -1,6 +1,6 @@
Fix up platform and related sysinfo file loading.
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
This ensures that RPM knows the compatible set of package types at all times.
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
index fed54e5f1..b9675c71b 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
@@ -1,7 +1,5 @@
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.
@@ -11,6 +9,8 @@ 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.
+Upstream-Status: Submitted [RPM5 maintainer]
+
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Index: rpm-5.4.14/lib/rpmrc.c
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
index 07d407d36..92ef1dc50 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
@@ -11,15 +11,17 @@ Upstream-Status: Pending
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Index: rpm-5.4.14/python/rpmmodule.c
+Index: rpm/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;
+--- rpm.orig/python/rpmmodule.c
++++ rpm/python/rpmmodule.c
+@@ -382,9 +382,8 @@ static int initModule(PyObject *m)
+ /* XXX add --noparentdirs --nolinktos to rpmtsCheck() */
+ global_depFlags = (RPMDEPS_FLAG_NOPARENTDIRS | RPMDEPS_FLAG_NOLINKTOS);
-- rpmReadConfigFiles(NULL, NULL);
+- /* failure to initialize rpm (crypto and all) is rather fatal too... */
+- if (rpmReadConfigFiles(NULL, NULL) == -1)
+- return 0;
+ const char *argv[1] = {"rpmmodule", 0};
+ rpmcliInit(1, argv, NULL);
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch
new file mode 100644
index 000000000..df6f4722e
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch
@@ -0,0 +1,35 @@
+rpm/python: The RPM5 API requires a hdrNum to be passed in
+
+The former behavior of passing in -1 as the hdrNum resulting in erase
+operations that did not complete, but also did not error. Changing to
+using the header instance resolves this problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/python/rpmts-py.c
+===================================================================
+--- rpm-5.4.15.orig/python/rpmts-py.c
++++ rpm-5.4.15/python/rpmts-py.c
+@@ -241,12 +241,19 @@ static PyObject *
+ rpmts_AddErase(rpmtsObject * s, PyObject * args)
+ {
+ Header h;
++ uint32_t hdrNum;
+
+ if (!PyArg_ParseTuple(args, "O&:AddErase", hdrFromPyObject, &h))
+ return NULL;
+
+-SPEW((stderr, "*** %s(%p,%p) ts %p\n", __FUNCTION__, s, h, s->ts));
++ hdrNum = headerGetInstance(h);
++
++SPEW((stderr, "*** %s(%p,%p) ts %p hdrNum %ld\n", __FUNCTION__, s, h, s->ts, hdrNum));
++#ifdef REFERENCE /* this doesn't work, RPM5 requires a unique hdrNum */
+ return PyBool_FromLong(rpmtsAddEraseElement(s->ts, h, -1) == 0);
++#else
++ return PyBool_FromLong(rpmtsAddEraseElement(s->ts, h, hdrNum) == 0);
++#endif
+ }
+
+ static int
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
new file mode 100644
index 000000000..7a473db1a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
@@ -0,0 +1,49 @@
+Fix an issue where the PACKAGEORIGIN is not properly stored.
+
+Restore the rpmtsCallback fdSetOpen call and related code.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/python/rpmts-py.c
+===================================================================
+--- rpm.orig/python/rpmts-py.c
++++ rpm/python/rpmts-py.c
+@@ -672,6 +672,8 @@ rpmtsCallback(const void * hd, const rpm
+ Header h = (Header) hd;
+ struct rpmtsCallbackType_s * cbInfo = data;
+ PyObject * pkgObj = (PyObject *) pkgKey;
++ PyObject * oh = NULL;
++ const char * origin = NULL;
+ PyObject * args, * result;
+ static FD_t fd;
+
+@@ -693,8 +695,16 @@ rpmtsCallback(const void * hd, const rpm
+ pkgObj = Py_None;
+ Py_INCREF(pkgObj);
+ }
+- } else
++ } else {
+ Py_INCREF(pkgObj);
++ /* XXX yum has (h, rpmloc) tuple as pkgKey. Extract the path. */
++ if (!(PyTuple_Check(pkgObj) && PyArg_ParseTuple(pkgObj, "|Os", &oh, &origin)))
++ origin = NULL;
++ /* XXX clean up the path, yum paths start "//..." */
++ if (origin && origin[0] == '/' && origin[1] == '/')
++ origin++;
++ }
++
+
+ PyEval_RestoreThread(cbInfo->_save);
+
+@@ -723,6 +733,9 @@ SPEW((stderr, "\t%p = fdDup(%d)\n", fd,
+
+ fcntl(Fileno(fd), F_SETFD, FD_CLOEXEC);
+
++ if (origin != NULL)
++ (void) fdSetOpen(fd, origin, 0, 0);
++
+ return fd;
+ } else
+ if (what == RPMCALLBACK_INST_CLOSE_FILE) {
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch
new file mode 100644
index 000000000..dfb551377
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch
@@ -0,0 +1,24 @@
+rpm-python-module: Change the extension tag from PyCObject to PyInt
+
+Use the tagValue to determine the custom PyInt value to use for the extension
+tag. Without this, any custom tag extensions will be returned in a format
+that the tagNumFromPyObject and related functions like hdr_subscript will
+failed to process. Usually the failure is error: expected a string or integer
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/python/rpmmodule.c
+===================================================================
+--- rpm-5.4.15.orig/python/rpmmodule.c
++++ rpm-5.4.15/python/rpmmodule.c
+@@ -316,7 +316,7 @@ static void addRpmTags(PyObject *module)
+ {
+ if (ext->name == NULL || ext->type != HEADER_EXT_TAG)
+ continue;
+- PyDict_SetItemString(d, (char *) ext->name, to=PyCObject_FromVoidPtr((void *)ext, NULL));
++ PyDict_SetItemString(d, (char *) ext->name, to=PyInt_FromLong(tagValue(ext->name)));
+ Py_XDECREF(to);
+ PyDict_SetItem(dict, to, o=PyString_FromString(ext->name + 7));
+ Py_XDECREF(o);
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch
deleted file mode 100644
index 769016b56..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
index 56a243d5f..526106d1e 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
@@ -3,7 +3,7 @@ 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
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch
new file mode 100644
index 000000000..71dae4939
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch
@@ -0,0 +1,124 @@
+Disable various items that do not cross compile well.
+
+Upstream-Status: Inappropriate [Configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/rpmdb/Makefile.am
+===================================================================
+--- rpm.orig/rpmdb/Makefile.am
++++ rpm/rpmdb/Makefile.am
+@@ -34,10 +34,10 @@ EXTRA_DIST = \
+ db3.c sqlite.c db_emu.h librpmdb.vers bdb.sql libsqldb.c \
+ logio.awk logio.src logio_recover_template logio_template logio.c \
+ logio_rec.c logio_auto.c logio_autop.c logio_auto.h \
+- qf.l qf.y qf.inp tqf.l tqf.y tqf.inp grammar.y scanner.l json1.js
++ tqf.l tqf.y tqf.inp grammar.y scanner.l json1.js
+
+-EXTRA_PROGRAMS = qfcalc qfgraph logio tjfn tqf # tbdb
+-noinst_PROGRAMS = json
++EXTRA_PROGRAMS = qfcalc qfgraph logio # tjfn tqf tbdb
++noinst_PROGRAMS = # json
+
+ RPMMISC_LDADD_COMMON = \
+ $(top_builddir)/misc/librpmmisc.la \
+@@ -321,54 +321,39 @@ BUILT_SOURCES += .syntastic_c_config
+ .syntastic_c_config: Makefile
+ @echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
+
+-tjfn_SOURCES = tjfn.c
+-tjfn_LDADD = $(mylibs)
+-
+-LEX = flex
+-LFLAGS= -d -T -v -8 -b --yylineno --reentrant --bison-bridge --perf-report
+-YACC = bison
+-YFLAGS= -Dapi.pure -t -d -v --report=all
+-
+-BUILT_SOURCES += Jgrammar.c Jgrammar.h Jscanner.c
+-Jgrammar.c: grammar.y
+- $(YACC) $(YFLAGS) -o $@ $<
+-Jscanner.c: scanner.l
+- $(LEX) -R -o $@ $<
+-json_SOURCES = Jgrammar.c Jscanner.c json.c
+-
+-testjson: json1.js json
+- ./json json1.js
+-
+-BUILT_SOURCES += Qgrammar.c Qgrammar.h Qscanner.c
+-Qgrammar.c: qf.y
+- $(YACC) $(YFLAGS) -o $@ $<
+-Qscanner.c: qf.l
+- $(LEX) -R -o $@ $<
+-qfcalc_SOURCES = Qgrammar.c Qscanner.c interpreter.c
+-qfgraph_SOURCES = Qgrammar.c Qscanner.c graph.c
+-
+-testqf: qfcalc qfgraph
+- ./qfcalc < qf.inp
+- ./qfgraph < qf.inp
+-
+-BUILT_SOURCES += Tgrammar.c Tgrammar.h Tscanner.c
+-Tgrammar.c Tgrammar.h: tqf.y
+- $(YACC) $(YFLAGS) -o $@ $<
+-Tscanner.c Tscanner.h: tqf.l
+- $(LEX) --prefix="Tyy" $(LFLAGS) -o $@ $<
+-tqf_SOURCES = Tgrammar.c Tscanner.c tgraph.c
+-tqf_CFLAGS = $(CFLAGS) -fsanitize=address # -DTSCANNER_MAIN
+-tqf_LDADD = ../lib/librpm.la \
+- ./librpmdb.la \
+- ../popt/libpopt.la
+-
+-testdir = $(abs_top_builddir)/tests
+-foo: tqf
+- -../libtool --mode=execute \
+- ./tqf \
+- --dbpath=$(testdir) \
+- -r $(testdir)/fodder/*.rpm \
+- $(testdir)/fodder/fmtmod.qf
++#tjfn_SOURCES = tjfn.c
++#tjfn_LDADD = $(mylibs)
++#
++#LFLAGS= -d -T -v -8 -b --yylineno --reentrant --bison-bridge --perf-report
++#
++#BUILT_SOURCES += Jgrammar.c Jgrammar.h Jscanner.c
++#Jgrammar.c Jgrammar.h: grammar.y
++# $(YACC) $(YFLAGS) -t -d -v -o $@ $<
++#Jscanner.c: scanner.l
++# $(LEX) -R -o $@ $<
++#json_SOURCES = Jgrammar.c Jscanner.c json.c
++#
++#testjson: json1.js json
++# ./json json1.js
++#
++#BUILT_SOURCES += Tgrammar.c Tgrammar.h Tscanner.c
++#Tgrammar.c Tgrammar.h: tqf.y
++# $(YACC) $(YFLAGS) -t -d -v -o $@ $<
++#Tscanner.c Tscanner.h: tqf.l
++# $(LEX) --prefix="Tyy" $(LFLAGS) -o $@ $<
++#tqf_SOURCES = Tgrammar.c Tscanner.c tgraph.c
++#tqf_CFLAGS = $(CFLAGS) -fsanitize=address # -DTSCANNER_MAIN
++#tqf_LDADD = ../lib/librpm.la \
++# ./librpmdb.la \
++# ../popt/libpopt.la
++
++#testdir = $(abs_top_builddir)/tests
++#foo: tqf
++# -../libtool --mode=execute \
++# ./tqf \
++# --dbpath=$(testdir) \
++# -r $(testdir)/fodder/*.rpm \
++# $(testdir)/fodder/fmtmod.qf
+
+ #tbdb_SOURCES = tbdb.c bdb.c
+ #tbdb_LDADD = $(mylibs)
+Index: rpm/configure.ac
+===================================================================
+--- rpm.orig/configure.ac
++++ rpm/configure.ac
+@@ -119,6 +119,7 @@ AC_PROG_MAKE_SET
+ AC_PROG_LIBTOOL
+ AC_PROG_RANLIB
+ AC_PROG_YACC
++AM_PROG_LEX
+
+ AC_PATH_PROG(AS, as, as)
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
new file mode 100644
index 000000000..b9a2cbce2
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
@@ -0,0 +1,34 @@
+From 16dc683aa50be9789d1674734b06a8a955ff22ad Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 26 Nov 2015 01:36:40 -0800
+Subject: [PATCH] lib/rpmfc.c: fix for N32 MIPS64
+
+It is 'N32 MIPS64', not 'N32 MIPS32' as command file shows:
+$ file image/usr/bin/getent
+getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip]
+
+And "rpm -qp --filecolor" was wrong (it was 1, but should be 4).
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ lib/rpmfc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/rpmfc.c b/lib/rpmfc.c
+index fde00c7..49779f8 100644
+--- a/lib/rpmfc.c
++++ b/lib/rpmfc.c
+@@ -575,7 +575,7 @@ static struct rpmfcTokens_s rpmfcTokens[] = {
+ { " not stripped", RPMFC_NOTSTRIPPED },
+ { " archive", RPMFC_ARCHIVE },
+
+- { "MIPS, N32 MIPS32", RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
++ { "MIPS, N32 MIPS64", RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
+ { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE },
+ { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE },
+
+--
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch
new file mode 100644
index 000000000..93645766c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch
@@ -0,0 +1,19 @@
+Fix a typo in the rpmio Makefile.am
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/rpmio/Makefile.am
+===================================================================
+--- rpm.orig/rpmio/Makefile.am
++++ rpm/rpmio/Makefile.am
+@@ -121,7 +121,7 @@ luaLPATHdir = ${pkgsharedir)/lua
+
+ pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
+ pkginc_HEADERS = argv.h mire.h rpmzlog.h yarn.h \
+- rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h
++ rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h \
+ rpmpgp.h rpmsw.h rpmutil.h
+ noinst_HEADERS = \
+ ar.h bcon.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch
deleted file mode 100644
index d8feed73f..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch
new file mode 100644
index 000000000..915d7efe6
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch
@@ -0,0 +1,26 @@
+rpmpgp.h: We do not require the popt header in order to use rpmpgp functions
+
+This can cause failures if the internal libpopt is used, as it's header is
+not exported.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.14/rpmio/rpmpgp.h
+===================================================================
+--- rpm-5.4.14.orig/rpmio/rpmpgp.h
++++ rpm-5.4.14/rpmio/rpmpgp.h
+@@ -11,11 +11,11 @@
+ */
+
+ #include <string.h>
+-#include <popt.h>
+ #include <rpmiotypes.h>
+ #include <yarn.h>
+
+ #if defined(_RPMPGP_INTERNAL)
++#include <popt.h>
+ #include <rpmsw.h>
+
+ /*@unchecked@*/
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
index f825372e8..b55fe22c6 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
@@ -12,22 +12,21 @@ Upstream-Status: Pending
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Index: rpm-5.4.14/lib/psm.c
+Index: rpm/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
+--- rpm.orig/lib/psm.c
++++ rpm/lib/psm.c
+@@ -846,6 +846,9 @@ static rpmRC runScript(rpmpsm psm, Heade
+ pid_t pid;
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);
+
+ #ifdef __clang__
+ #pragma clang diagnostic push
+@@ -923,14 +926,29 @@ assert(he->p.str != NULL);
(F_ISSET(psm, UNORDERED) ? "a" : ""));
if (Phe->p.argv == NULL) {
@@ -63,7 +62,7 @@ Index: rpm-5.4.14/lib/psm.c
ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path)
? 1 : 0);
}
-@@ -930,7 +949,12 @@ assert(he->p.str != NULL);
+@@ -981,7 +999,12 @@ assert(he->p.str != NULL);
goto exit;
if (rpmIsDebug() &&
@@ -77,7 +76,7 @@ Index: rpm-5.4.14/lib/psm.c
{
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);
+@@ -1116,12 +1139,22 @@ assert(he->p.str != NULL);
{ const char * rootDir = rpmtsRootDir(ts);
if (!rpmtsChrootDone(ts) && rootDir != NULL &&
@@ -100,7 +99,7 @@ Index: rpm-5.4.14/lib/psm.c
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);
+@@ -3052,6 +3085,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);
@@ -114,7 +113,7 @@ Index: rpm-5.4.14/lib/psm.c
xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL);
rc = runInstScript(psm);
if (rc)
-@@ -2992,11 +3033,24 @@ assert(psm->te != NULL);
+@@ -3059,11 +3099,24 @@ assert(psm->te != NULL);
else
xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
rpmtsGetRdb(ts)->db_txn = NULL;
@@ -139,7 +138,7 @@ Index: rpm-5.4.14/lib/psm.c
break;
case PSM_IMMED_TRIGGERS:
/* Run triggers in this package other package(s) set off. */
-@@ -3006,7 +3060,18 @@ assert(psm->te != NULL);
+@@ -3073,7 +3126,18 @@ assert(psm->te != NULL);
F_SET(psm, GOTTRIGGERS);
}
if (psm->triggers != NULL)
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch
new file mode 100644
index 000000000..d6493c197
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch
@@ -0,0 +1,1081 @@
+Fix the syck/lib/gram.y
+
+This resolves a problem during compilation:
+
+../../../rpm/syck/lib/gram.y:66:27: error: 'parser' undeclared (first use in this function)
+ ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, $1 );
+ ^
+../../../rpm/syck/lib/gram.y:66:27: note: each undeclared identifier is reported only once for each function it appears in
+../../../rpm/syck/lib/syck.c: In function 'syck_parse':
+../../../rpm/syck/lib/syck.c:516:5: warning: implicit declaration of function 'syckparse' [-Wimplicit-function-declaration]
+ syckparse( p );
+ ^
+
+This patch was generated by reverting the grammer back to a previous
+version.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/syck/lib/gram.y
+===================================================================
+--- rpm.orig/syck/lib/gram.y
++++ rpm/syck/lib/gram.y
+@@ -9,18 +9,10 @@
+
+ %start doc
+ %pure-parser
+-%parse-param {void* parser}
+-%lex-param {void* parser}
+
+
+ %{
+
+-#define YYDEBUG 1
+-#define YYERROR_VERBOSE 1
+-#ifndef YYSTACK_USE_ALLOCA
+-#define YYSTACK_USE_ALLOCA 0
+-#endif
+-
+ #include "system.h"
+ #include "syck.h"
+ #include "debug.h"
+@@ -28,6 +20,9 @@
+ void apply_seq_in_map( SyckParser *parser, SyckNode *n )
+ /*@*/;
+
++#define YYPARSE_PARAM parser
++#define YYLEX_PARAM parser
++
+ #define NULL_NODE(parser, node) \
+ SyckNode *node = syck_new_str( "", scalar_plain ); \
+ if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
+Index: rpm/syck/lib/Makefile.am
+===================================================================
+--- rpm.orig/syck/lib/Makefile.am
++++ rpm/syck/lib/Makefile.am
+@@ -49,25 +49,25 @@ SYCK_SPLINT_SRCS = \
+ token.c \
+ implicit.c
+
+-#gram.c: gram.y
+-# $(YACC) -d -t -v -p syck -o $@ $<
+-# -@if test -f gram.c; then \
+-# { echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
+-# echo "/*@-noeffect -noeffectuncon @*/";\
+-# echo "/*@-nullassign @*/";\
+-# echo "/*@-readonlytrans @*/";\
+-# echo "/*@-uniondef @*/";\
+-# echo "/*@-warnlintcomments @*/";\
+-# cat gram.c;\
+-# echo "/*@=warnlintcomments @*/";\
+-# echo "/*@=uniondef @*/";\
+-# echo "/*@=readonlytrans @*/";\
+-# echo "/*@=nullassign @*/";\
+-# echo "/*@=noeffect =noeffectuncon @*/";\
+-# echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
+-# } > _gram.c ;\
+-# mv -f _gram.c gram.c; \
+-# fi
++gram.c: gram.y
++ $(YACC) -d -t -v -p syck -o $@ $<
++ -@if test -f gram.c; then \
++ { echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
++ echo "/*@-noeffect -noeffectuncon @*/";\
++ echo "/*@-nullassign @*/";\
++ echo "/*@-readonlytrans @*/";\
++ echo "/*@-uniondef @*/";\
++ echo "/*@-warnlintcomments @*/";\
++ cat gram.c;\
++ echo "/*@=warnlintcomments @*/";\
++ echo "/*@=uniondef @*/";\
++ echo "/*@=readonlytrans @*/";\
++ echo "/*@=nullassign @*/";\
++ echo "/*@=noeffect =noeffectuncon @*/";\
++ echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
++ } > _gram.c ;\
++ mv -f _gram.c gram.c; \
++ fi
+
+ BUILT_SOURCES = gram.c gram.h
+
+Index: rpm/syck/lib/implicit.c
+===================================================================
+--- rpm.orig/syck/lib/implicit.c
++++ rpm/syck/lib/implicit.c
+@@ -19,11 +19,6 @@
+ #define YYLIMIT limit
+ #define YYFILL(n)
+
+-#ifdef __clang__
+-#pragma clang diagnostic push
+-#pragma clang diagnostic ignored "-Wempty-body"
+-#endif
+-
+ void
+ try_tag_implicit( SyckNode *n, int taguri )
+ {
+@@ -3000,8 +2995,4 @@ yy270: ++YYCURSOR;
+
+ }
+
+-#ifdef __clang__
+-#pragma clang diagnostic pop
+-#endif
+-
+ /*@=noret@*/
+Index: rpm/syck/lib/syck.c
+===================================================================
+--- rpm.orig/syck/lib/syck.c
++++ rpm/syck/lib/syck.c
+@@ -519,7 +519,7 @@ syck_parse( SyckParser *p )
+ }
+
+ void
+-syck_default_error_handler( SyckParser *p, const char *msg )
++syck_default_error_handler( SyckParser *p, char *msg )
+ {
+ printf( "Error at [Line %d, Col %ld]: %s\n",
+ p->linect,
+Index: rpm/syck/lib/syck.h
+===================================================================
+--- rpm.orig/syck/lib/syck.h
++++ rpm/syck/lib/syck.h
+@@ -175,7 +175,7 @@ typedef struct _syck_str SyckIoStr;
+ typedef struct _syck_level SyckLevel;
+
+ typedef SYMID (*SyckNodeHandler)(SyckParser *p, SyckNode *n);
+-typedef void (*SyckErrorHandler)(SyckParser *p, const char *);
++typedef void (*SyckErrorHandler)(SyckParser *p, char *);
+ typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *p, char *);
+ typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long);
+ typedef long (*SyckIoStrRead)(char *, SyckIoStr *, long, long);
+@@ -546,7 +546,7 @@ long syck_parser_readlen( SyckParser *p,
+ SYMID syck_parse( SyckParser *p )
+ /*@globals fileSystem @*/
+ /*@modifies p, fileSystem @*/;
+-void syck_default_error_handler( SyckParser *p, const char * )
++void syck_default_error_handler( SyckParser *p, char * )
+ /*@globals fileSystem @*/
+ /*@modifies p, fileSystem @*/;
+ SYMID syck_yaml2byte_handler( SyckParser *p, SyckNode *n )
+@@ -619,7 +619,7 @@ long syck_seq_count( SyckNode *seq )
+ /*
+ * Lexer prototypes
+ */
+-void syckerror( void *, const char *msg )
++void syckerror( char *msg )
+ /*@*/;
+ /* XXX union YYSTYPE *sycklval has issues on Mac OS X. */
+ int sycklex( void *_sycklval, SyckParser *parser )
+Index: rpm/syck/lib/token.c
+===================================================================
+--- rpm.orig/syck/lib/token.c
++++ rpm/syck/lib/token.c
+@@ -270,11 +270,11 @@ sycklex( void * _sycklval, SyckParser *p
+ return sycklex_yaml_utf8( sycklval, parser );
+
+ case syck_yaml_utf16:
+- syckerror( parser, "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
++ syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
+ break;
+
+ case syck_yaml_utf32:
+- syckerror( parser, "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
++ syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
+ break;
+
+ case syck_bytecode_utf8:
+@@ -2739,15 +2739,14 @@ syckwrap(void)
+ }
+
+ void
+-syckerror( void *p, const char *msg )
++syckerror( char *msg )
+ {
+- SyckParser * parser = (SyckParser *)p;
+ /*@-mods@*/
+- if ( parser->error_handler == NULL )
+- parser->error_handler = syck_default_error_handler;
++ if ( syck_parser_ptr->error_handler == NULL )
++ syck_parser_ptr->error_handler = syck_default_error_handler;
+
+- parser->root = parser->root_on_error;
++ syck_parser_ptr->root = syck_parser_ptr->root_on_error;
+ /*@=mods@*/
+- (parser->error_handler)(parser, msg);
++ (syck_parser_ptr->error_handler)(syck_parser_ptr, msg);
+ }
+
+Index: rpm/syck/lib/bytecode.c
+===================================================================
+--- rpm.orig/syck/lib/bytecode.c
++++ rpm/syck/lib/bytecode.c
+@@ -1,10 +1,10 @@
+-/* Generated by re2c 0.9.12 on Tue Mar 14 00:14:53 2006 */
++/* Generated by re2c 0.13.5 on Tue Feb 23 12:04:00 2016 */
+ #line 1 "bytecode.re"
+ /*
+ * bytecode.re
+ *
+ * $Author: why $
+- * $Date: 2005-09-20 08:21:06 +0300 (Tue, 20 Sep 2005) $
++ * $Date: 2005/09/20 05:21:06 $
+ *
+ * Copyright (C) 2003 why the lucky stiff
+ */
+@@ -27,14 +27,11 @@
+ #define YYLINEPTR parser->lineptr
+ #define YYLINECTPTR parser->linectptr
+ #define YYLINE parser->linect
+-#define YYFILL(n) (void) syck_parser_read(parser)
++#define YYFILL(n) syck_parser_read(parser)
+
+-/*@unchecked@*/ /*@null@*/
+ extern SyckParser *syck_parser_ptr;
+
+-/*@null@*/
+-char *get_inline( SyckParser *parser )
+- /*@modifies parser @*/;
++char *get_inline( SyckParser *parser );
+
+ /*
+ * Repositions the cursor at `n' offset from the token start.
+@@ -137,14 +134,12 @@ char *get_inline( SyckParser *parser )
+ */
+ int
+ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
+- /*@globals syck_parser_ptr @*/
+- /*@modifies sycklval, parser, syck_parser_ptr @*/
+ {
+ SyckLevel *lvl;
+ syck_parser_ptr = parser;
+ if ( YYCURSOR == NULL )
+ {
+- (void) syck_parser_read( parser );
++ syck_parser_read( parser );
+ }
+
+ if ( parser->force_token != 0 )
+@@ -171,42 +166,37 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval
+ #line 165 "<stdout>"
+ {
+ YYCTYPE yych;
+- unsigned int yyaccept = 0;
+- goto yy0;
+- /*@notreached@*/
+- ++YYCURSOR;
+-yy0:
+- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
++
++ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+ yych = *YYCURSOR;
+- switch(yych){
++ switch (yych) {
+ case 0x00: goto yy2;
+ case 'D': goto yy3;
+ default: goto yy5;
+ }
+-yy2: YYCURSOR = YYMARKER;
+- switch(yyaccept){
+- case 0: goto yy4;
+- }
+-yy3: yyaccept = 0;
++yy2:
++ YYCURSOR = YYMARKER;
++ goto yy4;
++yy3:
+ yych = *(YYMARKER = ++YYCURSOR);
+- switch(yych){
+- case 0x0A: goto yy6;
+- case 0x0D: goto yy8;
++ switch (yych) {
++ case '\n': goto yy6;
++ case '\r': goto yy8;
+ default: goto yy4;
+ }
+ yy4:
+ #line 199 "bytecode.re"
+-{ YYPOS(0);
++ { YYPOS(0);
+ goto Document;
+ }
+-#line 195 "<stdout>"
+-yy5: yych = *++YYCURSOR;
++#line 191 "<stdout>"
++yy5:
++ yych = *++YYCURSOR;
+ goto yy4;
+-yy6: ++YYCURSOR;
+- goto yy7;
+-yy7:
++yy6:
++ ++YYCURSOR;
+ #line 186 "bytecode.re"
+-{ if ( lvl->status == syck_lvl_header )
++ { if ( lvl->status == syck_lvl_header )
+ {
+ CHK_NL(YYCURSOR);
+ goto Directive;
+@@ -218,10 +208,11 @@ yy7:
+ return 0;
+ }
+ }
+-#line 214 "<stdout>"
+-yy8: ++YYCURSOR;
+- switch((yych = *YYCURSOR)) {
+- case 0x0A: goto yy6;
++#line 210 "<stdout>"
++yy8:
++ ++YYCURSOR;
++ switch ((yych = *YYCURSOR)) {
++ case '\n': goto yy6;
+ default: goto yy2;
+ }
+ }
+@@ -239,19 +230,15 @@ Document:
+ YYTOKEN = YYCURSOR;
+
+
+-#line 235 "<stdout>"
++#line 232 "<stdout>"
+ {
+ YYCTYPE yych;
+- goto yy9;
+- /*@notreached@*/
+- ++YYCURSOR;
+-yy9:
+- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
++ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+ yych = *YYCURSOR;
+- switch(yych){
++ switch (yych) {
+ case 0x00: goto yy30;
+- case 0x0A: goto yy27;
+- case 0x0D: goto yy29;
++ case '\n': goto yy27;
++ case '\r': goto yy29;
+ case 'A': goto yy19;
+ case 'D': goto yy12;
+ case 'E': goto yy16;
+@@ -264,71 +251,73 @@ yy9:
+ case 'c': goto yy25;
+ default: goto yy11;
+ }
+-yy11:yy12: yych = *++YYCURSOR;
+- switch(yych){
+- case 0x0A: goto yy41;
+- case 0x0D: goto yy44;
++yy11:
++yy12:
++ yych = *++YYCURSOR;
++ switch (yych) {
++ case '\n': goto yy41;
++ case '\r': goto yy44;
+ default: goto yy11;
+ }
+-yy13: yych = *++YYCURSOR;
+- switch(yych){
+- case 0x0A: goto yy41;
+- case 0x0D: goto yy43;
++yy13:
++ yych = *++YYCURSOR;
++ switch (yych) {
++ case '\n': goto yy41;
++ case '\r': goto yy43;
+ default: goto yy11;
+ }
+-yy14: yych = *++YYCURSOR;
+- switch(yych){
+- case 0x0A: goto yy38;
+- case 0x0D: goto yy40;
++yy14:
++ yych = *++YYCURSOR;
++ switch (yych) {
++ case '\n': goto yy38;
++ case '\r': goto yy40;
+ default: goto yy11;
+ }
+-yy15: yych = *++YYCURSOR;
+- switch(yych){
+- case 0x0A: goto yy35;
+- case 0x0D: goto yy37;
++yy15:
++ yych = *++YYCURSOR;
++ switch (yych) {
++ case '\n': goto yy35;
++ case '\r': goto yy37;
+ default: goto yy11;
+ }
+-yy16: yych = *++YYCURSOR;
+- switch(yych){
+- case 0x0A: goto yy32;
+- case 0x0D: goto yy34;
++yy16:
++ yych = *++YYCURSOR;
++ switch (yych) {
++ case '\n': goto yy32;
++ case '\r': goto yy34;
+ default: goto yy11;
+ }
+-yy17: ++YYCURSOR;
+- goto yy18;
+-yy18:
++yy17:
++ ++YYCURSOR;
+ #line 288 "bytecode.re"
+-{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
++ { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
+ goto Scalar;
+ }
+-#line 296 "<stdout>"
+-yy19: ++YYCURSOR;
+- goto yy20;
+-yy20:
++#line 295 "<stdout>"
++yy19:
++ ++YYCURSOR;
+ #line 292 "bytecode.re"
+-{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
++ { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
+ sycklval->name = get_inline( parser );
+ syck_hdlr_remove_anchor( parser, sycklval->name );
+ CHK_NL(YYCURSOR);
+ return YAML_ANCHOR;
+ }
+-#line 307 "<stdout>"
+-yy21: ++YYCURSOR;
+- goto yy22;
+-yy22:
++#line 305 "<stdout>"
++yy21:
++ ++YYCURSOR;
+ #line 299 "bytecode.re"
+-{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
++ { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
+ sycklval->name = get_inline( parser );
+ POP_LEVEL();
+ if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
+ return YAML_ALIAS;
+ }
+-#line 318 "<stdout>"
+-yy23: ++YYCURSOR;
+- goto yy24;
+-yy24:
++#line 315 "<stdout>"
++yy23:
++ ++YYCURSOR;
+ #line 306 "bytecode.re"
+-{ char *qstr;
++ { char *qstr;
+ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
+ qstr = get_inline( parser );
+ CHK_NL(YYCURSOR);
+@@ -387,18 +376,16 @@ yy24:
+ sycklval->name = qstr;
+ return YAML_TAGURI;
+ }
+-#line 382 "<stdout>"
+-yy25: ++YYCURSOR;
+- goto yy26;
+-yy26:
++#line 378 "<stdout>"
++yy25:
++ ++YYCURSOR;
+ #line 366 "bytecode.re"
+-{ goto Comment; }
+-#line 388 "<stdout>"
+-yy27: ++YYCURSOR;
+- goto yy28;
+-yy28:
++ { goto Comment; }
++#line 383 "<stdout>"
++yy27:
++ ++YYCURSOR;
+ #line 368 "bytecode.re"
+-{ CHK_NL(YYCURSOR);
++ { CHK_NL(YYCURSOR);
+ if ( lvl->status == syck_lvl_seq )
+ {
+ return YAML_INDENT;
+@@ -410,26 +397,25 @@ yy28:
+ }
+ goto Document;
+ }
+-#line 405 "<stdout>"
+-yy29: yych = *++YYCURSOR;
+- switch(yych){
+- case 0x0A: goto yy27;
++#line 399 "<stdout>"
++yy29:
++ yych = *++YYCURSOR;
++ switch (yych) {
++ case '\n': goto yy27;
+ default: goto yy11;
+ }
+-yy30: ++YYCURSOR;
+- goto yy31;
+-yy31:
++yy30:
++ ++YYCURSOR;
+ #line 381 "bytecode.re"
+-{ ENSURE_YAML_IEND(lvl, -1);
++ { ENSURE_YAML_IEND(lvl, -1);
+ YYPOS(0);
+ return 0;
+ }
+-#line 419 "<stdout>"
+-yy32: ++YYCURSOR;
+- goto yy33;
+-yy33:
++#line 413 "<stdout>"
++yy32:
++ ++YYCURSOR;
+ #line 252 "bytecode.re"
+-{ if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
++ { if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
+ {
+ lvl->ncount++;
+ YYPOS(0);
+@@ -464,17 +450,17 @@ yy33:
+ CHK_NL(YYCURSOR);
+ return YAML_IEND;
+ }
+-#line 459 "<stdout>"
+-yy34: yych = *++YYCURSOR;
+- switch(yych){
+- case 0x0A: goto yy32;
++#line 452 "<stdout>"
++yy34:
++ yych = *++YYCURSOR;
++ switch (yych) {
++ case '\n': goto yy32;
+ default: goto yy11;
+ }
+-yy35: ++YYCURSOR;
+- goto yy36;
+-yy36:
++yy35:
++ ++YYCURSOR;
+ #line 237 "bytecode.re"
+-{ int complex = 0;
++ { int complex = 0;
+ if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
+ {
+ complex = 1;
+@@ -488,17 +474,17 @@ yy36:
+ }
+ return YAML_IOPEN;
+ }
+-#line 483 "<stdout>"
+-yy37: yych = *++YYCURSOR;
+- switch(yych){
+- case 0x0A: goto yy35;
++#line 476 "<stdout>"
++yy37:
++ yych = *++YYCURSOR;
++ switch (yych) {
++ case '\n': goto yy35;
+ default: goto yy11;
+ }
+-yy38: ++YYCURSOR;
+- goto yy39;
+-yy39:
++yy38:
++ ++YYCURSOR;
+ #line 222 "bytecode.re"
+-{ int complex = 0;
++ { int complex = 0;
+ if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
+ {
+ complex = 1;
+@@ -512,29 +498,31 @@ yy39:
+ }
+ return YAML_IOPEN;
+ }
+-#line 507 "<stdout>"
+-yy40: yych = *++YYCURSOR;
+- switch(yych){
+- case 0x0A: goto yy38;
++#line 500 "<stdout>"
++yy40:
++ yych = *++YYCURSOR;
++ switch (yych) {
++ case '\n': goto yy38;
+ default: goto yy11;
+ }
+-yy41: ++YYCURSOR;
+- goto yy42;
+-yy42:
++yy41:
++ ++YYCURSOR;
+ #line 217 "bytecode.re"
+-{ ENSURE_YAML_IEND(lvl, -1);
++ { ENSURE_YAML_IEND(lvl, -1);
+ YYPOS(0);
+ return 0;
+ }
+-#line 521 "<stdout>"
+-yy43: yych = *++YYCURSOR;
+- switch(yych){
+- case 0x0A: goto yy41;
++#line 514 "<stdout>"
++yy43:
++ yych = *++YYCURSOR;
++ switch (yych) {
++ case '\n': goto yy41;
+ default: goto yy11;
+ }
+-yy44: ++YYCURSOR;
+- switch((yych = *YYCURSOR)) {
+- case 0x0A: goto yy41;
++yy44:
++ ++YYCURSOR;
++ switch ((yych = *YYCURSOR)) {
++ case '\n': goto yy41;
+ default: goto yy11;
+ }
+ }
+@@ -548,28 +536,22 @@ Directive:
+ YYTOKEN = YYCURSOR;
+
+
+-#line 543 "<stdout>"
++#line 538 "<stdout>"
+ {
+ YYCTYPE yych;
+- unsigned int yyaccept = 0;
+- goto yy45;
+- /*@notreached@*/
+- ++YYCURSOR;
+-yy45:
+- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
++ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ yych = *YYCURSOR;
+- switch(yych){
++ switch (yych) {
+ case 0x00: goto yy47;
+ case 'V': goto yy48;
+ default: goto yy50;
+ }
+-yy47: YYCURSOR = YYMARKER;
+- switch(yyaccept){
+- case 0: goto yy49;
+- }
+-yy48: yyaccept = 0;
++yy47:
++ YYCURSOR = YYMARKER;
++ goto yy49;
++yy48:
+ yych = *(YYMARKER = ++YYCURSOR);
+- switch(yych){
++ switch (yych) {
+ case '.':
+ case '/':
+ case '0':
+@@ -619,7 +601,8 @@ yy48: yyaccept = 0;
+ case '\\':
+ case ']':
+ case '^':
+- case '_': case 'a':
++ case '_':
++ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+@@ -649,17 +632,18 @@ yy48: yyaccept = 0;
+ }
+ yy49:
+ #line 399 "bytecode.re"
+-{ YYCURSOR = YYTOKEN;
++ { YYCURSOR = YYTOKEN;
+ return YAML_DOCSEP;
+ }
+-#line 646 "<stdout>"
+-yy50: yych = *++YYCURSOR;
++#line 637 "<stdout>"
++yy50:
++ yych = *++YYCURSOR;
+ goto yy49;
+-yy51: ++YYCURSOR;
+- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
++yy51:
++ ++YYCURSOR;
++ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ yych = *YYCURSOR;
+- goto yy52;
+-yy52: switch(yych){
++ switch (yych) {
+ case '.':
+ case '/':
+ case '0':
+@@ -671,7 +655,8 @@ yy52: switch(yych){
+ case '6':
+ case '7':
+ case '8':
+- case '9': case ';':
++ case '9':
++ case ';':
+ case '<':
+ case '=':
+ case '>':
+@@ -707,7 +692,8 @@ yy52: switch(yych){
+ case '\\':
+ case ']':
+ case '^':
+- case '_': case 'a':
++ case '_':
++ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+@@ -736,8 +722,9 @@ yy52: switch(yych){
+ case ':': goto yy53;
+ default: goto yy47;
+ }
+-yy53: yych = *++YYCURSOR;
+- switch(yych){
++yy53:
++ yych = *++YYCURSOR;
++ switch (yych) {
+ case '.':
+ case '/':
+ case '0':
+@@ -787,7 +774,8 @@ yy53: yych = *++YYCURSOR;
+ case '\\':
+ case ']':
+ case '^':
+- case '_': case 'a':
++ case '_':
++ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+@@ -815,13 +803,13 @@ yy53: yych = *++YYCURSOR;
+ case 'z': goto yy54;
+ default: goto yy47;
+ }
+-yy54: ++YYCURSOR;
+- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
++yy54:
++ ++YYCURSOR;
++ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ yych = *YYCURSOR;
+- goto yy55;
+-yy55: switch(yych){
+- case 0x0A: goto yy56;
+- case 0x0D: goto yy58;
++ switch (yych) {
++ case '\n': goto yy56;
++ case '\r': goto yy58;
+ case '.':
+ case '/':
+ case '0':
+@@ -871,7 +859,8 @@ yy55: switch(yych){
+ case '\\':
+ case ']':
+ case '^':
+- case '_': case 'a':
++ case '_':
++ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+@@ -899,16 +888,16 @@ yy55: switch(yych){
+ case 'z': goto yy54;
+ default: goto yy47;
+ }
+-yy56: ++YYCURSOR;
+- goto yy57;
+-yy57:
++yy56:
++ ++YYCURSOR;
+ #line 396 "bytecode.re"
+-{ CHK_NL(YYCURSOR);
++ { CHK_NL(YYCURSOR);
+ goto Directive; }
+-#line 899 "<stdout>"
+-yy58: ++YYCURSOR;
+- switch((yych = *YYCURSOR)) {
+- case 0x0A: goto yy56;
++#line 895 "<stdout>"
++yy58:
++ ++YYCURSOR;
++ switch ((yych = *YYCURSOR)) {
++ case '\n': goto yy56;
+ default: goto yy47;
+ }
+ }
+@@ -922,40 +911,40 @@ Comment:
+ YYTOKEN = YYCURSOR;
+
+
+-#line 916 "<stdout>"
++#line 913 "<stdout>"
+ {
+ YYCTYPE yych;
+- goto yy59;
+- /*@notreached@*/
+- ++YYCURSOR;
+-yy59:
+- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
++ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ yych = *YYCURSOR;
+- switch(yych){
++ switch (yych) {
+ case 0x00: goto yy61;
+- case 0x0A: goto yy62;
+- case 0x0D: goto yy64;
++ case '\n': goto yy62;
++ case '\r': goto yy64;
+ default: goto yy66;
+ }
+-yy61:yy62: ++YYCURSOR;
+- goto yy63;
++yy61:
++yy62:
++ ++YYCURSOR;
+ yy63:
+ #line 412 "bytecode.re"
+-{ CHK_NL(YYCURSOR);
++ { CHK_NL(YYCURSOR);
+ goto Document; }
+-#line 936 "<stdout>"
+-yy64: ++YYCURSOR;
+- switch((yych = *YYCURSOR)) {
+- case 0x0A: goto yy67;
++#line 931 "<stdout>"
++yy64:
++ ++YYCURSOR;
++ switch ((yych = *YYCURSOR)) {
++ case '\n': goto yy67;
+ default: goto yy65;
+ }
+ yy65:
+ #line 415 "bytecode.re"
+-{ goto Comment; }
+-#line 945 "<stdout>"
+-yy66: yych = *++YYCURSOR;
++ { goto Comment; }
++#line 941 "<stdout>"
++yy66:
++ yych = *++YYCURSOR;
+ goto yy65;
+-yy67: ++YYCURSOR;
++yy67:
++ ++YYCURSOR;
+ yych = *YYCURSOR;
+ goto yy63;
+ }
+@@ -977,23 +966,20 @@ Scalar2:
+ tok = YYCURSOR;
+
+
+-#line 970 "<stdout>"
++#line 968 "<stdout>"
+ {
+ YYCTYPE yych;
+- goto yy68;
+- /*@notreached@*/
+- ++YYCURSOR;
+-yy68:
+- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
++ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+ yych = *YYCURSOR;
+- switch(yych){
++ switch (yych) {
+ case 0x00: goto yy74;
+- case 0x0A: goto yy70;
+- case 0x0D: goto yy72;
++ case '\n': goto yy70;
++ case '\r': goto yy72;
+ default: goto yy76;
+ }
+-yy70: ++YYCURSOR;
+- switch((yych = *YYCURSOR)) {
++yy70:
++ ++YYCURSOR;
++ switch ((yych = *YYCURSOR)) {
+ case 'C': goto yy78;
+ case 'N': goto yy80;
+ case 'Z': goto yy83;
+@@ -1001,50 +987,51 @@ yy70: ++YYCURSOR;
+ }
+ yy71:
+ #line 461 "bytecode.re"
+-{ YYCURSOR = tok;
++ { YYCURSOR = tok;
+ goto ScalarEnd;
+ }
+-#line 996 "<stdout>"
+-yy72: ++YYCURSOR;
+- switch((yych = *YYCURSOR)) {
+- case 0x0A: goto yy77;
++#line 992 "<stdout>"
++yy72:
++ ++YYCURSOR;
++ switch ((yych = *YYCURSOR)) {
++ case '\n': goto yy77;
+ default: goto yy73;
+ }
+ yy73:
+ #line 469 "bytecode.re"
+-{ CAT(str, cap, idx, tok[0]);
++ { CAT(str, cap, idx, tok[0]);
+ goto Scalar2;
+ }
+-#line 1007 "<stdout>"
+-yy74: ++YYCURSOR;
+- goto yy75;
+-yy75:
++#line 1004 "<stdout>"
++yy74:
++ ++YYCURSOR;
+ #line 465 "bytecode.re"
+-{ YYCURSOR = tok;
++ { YYCURSOR = tok;
+ goto ScalarEnd;
+ }
+-#line 1015 "<stdout>"
+-yy76: yych = *++YYCURSOR;
++#line 1011 "<stdout>"
++yy76:
++ yych = *++YYCURSOR;
+ goto yy73;
+-yy77: yych = *++YYCURSOR;
+- switch(yych){
++yy77:
++ yych = *++YYCURSOR;
++ switch (yych) {
+ case 'C': goto yy78;
+ case 'N': goto yy80;
+ case 'Z': goto yy83;
+ default: goto yy71;
+ }
+-yy78: ++YYCURSOR;
+- goto yy79;
+-yy79:
++yy78:
++ ++YYCURSOR;
+ #line 435 "bytecode.re"
+-{ CHK_NL(tok+1);
++ { CHK_NL(tok+1);
+ goto Scalar2; }
+-#line 1031 "<stdout>"
+-yy80: ++YYCURSOR;
+- if(YYLIMIT == YYCURSOR) YYFILL(1);
++#line 1028 "<stdout>"
++yy80:
++ ++YYCURSOR;
++ if (YYLIMIT <= YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+- goto yy81;
+-yy81: switch(yych){
++ switch (yych) {
+ case '0':
+ case '1':
+ case '2':
+@@ -1059,7 +1046,7 @@ yy81: switch(yych){
+ }
+ yy82:
+ #line 438 "bytecode.re"
+-{ CHK_NL(tok+1);
++ { CHK_NL(tok+1);
+ if ( tok + 2 < YYCURSOR )
+ {
+ char *count = tok + 2;
+@@ -1076,16 +1063,15 @@ yy82:
+ }
+ goto Scalar2;
+ }
+-#line 1068 "<stdout>"
+-yy83: ++YYCURSOR;
+- goto yy84;
+-yy84:
++#line 1065 "<stdout>"
++yy83:
++ ++YYCURSOR;
+ #line 456 "bytecode.re"
+-{ CHK_NL(tok+1);
++ { CHK_NL(tok+1);
+ CAT(str, cap, idx, '\0');
+ goto Scalar2;
+ }
+-#line 1077 "<stdout>"
++#line 1073 "<stdout>"
+ }
+ #line 473 "bytecode.re"
+
+@@ -1122,50 +1108,48 @@ Inline:
+ tok = YYCURSOR;
+
+
+-#line 1114 "<stdout>"
++#line 1110 "<stdout>"
+ {
+ YYCTYPE yych;
+- goto yy85;
+- /*@notreached@*/
+- ++YYCURSOR;
+-yy85:
+- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
++ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ yych = *YYCURSOR;
+- switch(yych){
++ switch (yych) {
+ case 0x00: goto yy91;
+- case 0x0A: goto yy87;
+- case 0x0D: goto yy89;
++ case '\n': goto yy87;
++ case '\r': goto yy89;
+ default: goto yy93;
+ }
+-yy87: ++YYCURSOR;
+- goto yy88;
++yy87:
++ ++YYCURSOR;
+ yy88:
+ #line 508 "bytecode.re"
+-{ CHK_NL(YYCURSOR);
++ { CHK_NL(YYCURSOR);
+ return str; }
+-#line 1134 "<stdout>"
+-yy89: ++YYCURSOR;
+- switch((yych = *YYCURSOR)) {
+- case 0x0A: goto yy94;
++#line 1127 "<stdout>"
++yy89:
++ ++YYCURSOR;
++ switch ((yych = *YYCURSOR)) {
++ case '\n': goto yy94;
+ default: goto yy90;
+ }
+ yy90:
+ #line 515 "bytecode.re"
+-{ CAT(str, cap, idx, tok[0]);
++ { CAT(str, cap, idx, tok[0]);
+ goto Inline;
+ }
+-#line 1145 "<stdout>"
+-yy91: ++YYCURSOR;
+- goto yy92;
+-yy92:
++#line 1139 "<stdout>"
++yy91:
++ ++YYCURSOR;
+ #line 511 "bytecode.re"
+-{ YYCURSOR = tok;
++ { YYCURSOR = tok;
+ return str;
+ }
+-#line 1153 "<stdout>"
+-yy93: yych = *++YYCURSOR;
++#line 1146 "<stdout>"
++yy93:
++ yych = *++YYCURSOR;
+ goto yy90;
+-yy94: ++YYCURSOR;
++yy94:
++ ++YYCURSOR;
+ yych = *YYCURSOR;
+ goto yy88;
+ }
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
index 683275cb1..5fb40b6fe 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
@@ -6,7 +6,7 @@ when the generating process is executed on different architectures.
This patch resolves it by taking the byte order that host uses.
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Ming Liu <ming.liu@windriver.com>
---
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
new file mode 100644
index 000000000..9eb675ba2
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
@@ -0,0 +1,25 @@
+rpmdb/tagname.c: Add the 0x54aafb71 (filenames) type to rpmTagGetType
+
+There is already a workaround in the _tagName function to show that the
+special 'filenames' item is value. This adds a similar patch to the
+_tagType to return the proper type, otherwise it comes back as a simple
+RPM_STRING_ARRAY_TYPE which limits the response to the first element.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/rpmdb/tagname.c
+===================================================================
+--- rpm-5.4.15.orig/rpmdb/tagname.c
++++ rpm-5.4.15/rpmdb/tagname.c
+@@ -353,6 +353,9 @@ static unsigned int _tagType(rpmTag tag)
+ case RPMDBI_RECNO:
+ case RPMDBI_HEAP:
+ break;
++ /* XXX make sure that h.['filenames'] in python "works". */
++ case 0x54aafb71:
++ return (RPM_STRING_ARRAY_TYPE + RPM_ARRAY_RETURN_TYPE);
+ default:
+ if (_rpmTags.byValue == NULL)
+ break;
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
index cb85bebfc..72d350929 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
@@ -1,5 +1,5 @@
Source: None
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
Author: Khem Raj <raj.khem@gmail.com>
Date: 2011-03-03
Description:
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmatch.patch
index 20d13aa08..9bbf580e4 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmatch.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmatch.patch
@@ -1,31 +1,23 @@
-Add configure check for rpmatch() and
-creates a compatable macro if it is not provided by the C library.
+Create a compatable macro if rpmatch() is not provided by the C library.
+
+This uses an existing configure check.
This is needed for uclibc since it does not have the above function
implemented.
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
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
+Updated to rpm 5.4.15+.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/system.h
===================================================================
---- rpm-5.4.14.orig/system.h
-+++ rpm-5.4.14/system.h
-@@ -353,6 +353,14 @@ extern int _tolower(int) __THROW /*@*/;
+--- rpm.orig/system.h
++++ rpm/system.h
+@@ -358,6 +358,14 @@ extern int _tolower(int) __THROW /*@*/;
#include <libgen.h>
#endif
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
new file mode 100644
index 000000000..809e54e9c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
@@ -0,0 +1,53 @@
+rpmdb: more verbose error logging in rpmTempFile()
+
+Upstream-Status: Inappropriate [debugging]
+
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+
+diff --git a/rpmdb/signature.c b/rpmdb/signature.c
+index dce6c4e..a1d0f06 100644
+--- a/rpmdb/signature.c
++++ b/rpmdb/signature.c
+@@ -37,6 +37,7 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
+ int temput;
+ FD_t fd = NULL;
+ unsigned int ran;
++ int ret = 0;
+
+ if (!prefix) prefix = "";
+
+@@ -44,8 +45,11 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
+ if (!_initialized) {
+ _initialized = 1;
+ tempfn = rpmGenPath(prefix, tpmacro, NULL);
+- if (rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1))
+- goto errxit;
++ ret = rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1);
++ if (ret) {
++ rpmlog(RPMLOG_ERR, _("error creating temporary directory %s: %d\n"), tempfn, ret);
++ goto errxit;
++ }
+ }
+
+ /* XXX should probably use mkstemp here */
+@@ -68,12 +72,16 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
+ #endif
+
+ temput = urlPath(tempfn, &tfn);
+- if (*tfn == '\0') goto errxit;
++ if (*tfn == '\0') {
++ rpmlog(RPMLOG_ERR, _("error creating tempfile: empty filename\n"));
++ goto errxit;
++ }
+
+ switch (temput) {
+ case URL_IS_DASH:
+ case URL_IS_HKP:
+ case URL_IS_MONGO: /* XXX FIXME */
++ rpmlog(RPMLOG_ERR, _("error creating temporary file, invalid uri type: %d\n"), temput);
+ goto errxit;
+ /*@notreached@*/ /*@switchbreak@*/ break;
+ case URL_IS_HTTPS:
+--
+2.6.6
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch
new file mode 100644
index 000000000..c68681c1e
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch
@@ -0,0 +1,70 @@
+From bb48dbc88a58bc05a43d71a3375fb05358119ec5 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 20 Mar 2016 20:20:16 -0700
+Subject: [PATCH] rpmqv.c: check _gpg_passphrase before ask for input
+
+rpm always asked for pass phrasae when add signature, which made it
+can't work non-interactively, this patch fix the problem. It will work
+non-interactively if _gpg_passphrase is defined, and work as before if
+not.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ macros/macros.in | 7 +++++--
+ rpmqv.c | 17 ++++++++++-------
+ 2 files changed, 15 insertions(+), 9 deletions(-)
+
+diff --git a/macros/macros.in b/macros/macros.in
+index 2e5b07d..01b3aad 100644
+--- a/macros/macros.in
++++ b/macros/macros.in
+@@ -520,15 +520,18 @@ $_arbitrary_tags_tests Foo:Bar
+ # Macro(s) to hold the arguments passed to GPG/PGP for package
+ # signing and verification.
+ #
++
++%_gpg_passphrase_way %{?_gpg_passphrase:--passphrase "%{_gpg_passphrase}"}%{!?_gpg_passphrase:--passphrase-fd 3}
++
+ %__gpg_check_password_cmd %{__gpg} \
+- gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -
++ gpg --batch --no-verbose %{_gpg_passphrase_way} -u "%{_gpg_name}" -so -
+ #%__pgp_check_password_cmd %{__pgp} \
+ # pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf
+ #%__pgp5_check_password_cmd %{__pgp} \
+ # pgps +batchmode=on +verbose=0 +armor=off "%{_pgp_name}" -f
+
+ %__gpg_sign_cmd %{__gpg} \
+- gpg --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning \
++ gpg --batch --no-verbose --no-armor %{_gpg_passphrase_way} --no-secmem-warning \
+ -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
+ #%__pgp_sign_cmd %{__pgp} \
+ # pgp +batchmode=on +verbose=0 +armor=off \
+diff --git a/rpmqv.c b/rpmqv.c
+index b306486..7604396 100644
+--- a/rpmqv.c
++++ b/rpmqv.c
+@@ -831,13 +831,16 @@ int main(int argc, const char ** argv)
+ #endif
+ )
+ {
+- passPhrase = Getpass(_("Enter pass phrase: "));
+- if (rpmCheckPassPhrase(passPhrase)) {
+- fprintf(stderr, _("Pass phrase check failed\n"));
+- ec = EXIT_FAILURE;
+- goto exit;
++ passPhrase = rpmExpand("%{?_gpg_passphrase}", NULL);
++ if (passPhrase == NULL || passPhrase[0] == '\0') {
++ passPhrase = Getpass(_("Enter pass phrase: "));
++ if (rpmCheckPassPhrase(passPhrase)) {
++ fprintf(stderr, _("Pass phrase check failed\n"));
++ ec = EXIT_FAILURE;
++ goto exit;
++ }
++ fprintf(stderr, _("Pass phrase is good.\n"));
+ }
+- fprintf(stderr, _("Pass phrase is good.\n"));
+ /* XXX Getpass() should realloc instead. */
+ passPhrase = xstrdup(passPhrase);
+ }
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
index f08bd688f..b2437a872 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
@@ -1,4 +1,7 @@
-rpm: compile rpmqv.c instead of rpmqv.cc
+From e8bae261615e19ff8a28683765c9539cfb22a086 Mon Sep 17 00:00:00 2001
+From: Joe Slater <jslater@windriver.com>
+Date: Thu, 17 Jul 2014 18:14:54 -0700
+Subject: [PATCH 1/9] 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
@@ -10,23 +13,38 @@ Upstream-Status: Inappropriate [other]
When linking with g++ is really necessary, the upstream package will do that.
+Also instead of symlinking files in two places, which can and does race in
+parallel builds, simply refer to the file's full location [RB]
+
Signed-off-by: Joe Slater <joe.slater@windriver.com>
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ Makefile.am | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+diff --git a/Makefile.am b/Makefile.am
+index 1dade0a..55f8669 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -127,13 +127,13 @@ rpm_SOURCES = build.c
+@@ -201,15 +201,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
+- ln -sf $< rpmqv.cc
+- $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.cc
++ $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -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
+ rpmbuild.o: $(top_srcdir)/rpmqv.c
+- ln -sf $< rpmqv.cc
+- $(COMPILE) -DIAM_RPMBT -o $@ -c rpmqv.cc
++ $(COMPILE) -DIAM_RPMBT -o $@ -c $^
- .PHONY: splint
- splint:
+ .syntastic_c_config: Makefile
+ @echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/uclibc-support.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
index 8870adb9e..dc7b0488a 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
@@ -1,13 +1,13 @@
Define the x* wrappers for uclibc as well
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: rpm-5.4.14/rpmio/rpmio.h
+Index: rpm/rpmio/rpmio.h
===================================================================
---- rpm-5.4.14.orig/rpmio/rpmio.h
-+++ rpm-5.4.14/rpmio/rpmio.h
+--- rpm.orig/rpmio/rpmio.h
++++ rpm/rpmio/rpmio.h
@@ -23,7 +23,8 @@
*/
/*@{*/
@@ -18,11 +18,11 @@ Index: rpm-5.4.14/rpmio/rpmio.h
#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
+Index: rpm/system.h
===================================================================
---- rpm-5.4.14.orig/system.h
-+++ rpm-5.4.14/system.h
-@@ -481,7 +481,7 @@ extern void muntrace (void)
+--- rpm.orig/system.h
++++ rpm/system.h
+@@ -489,7 +489,7 @@ extern void muntrace (void)
#endif /* defined(__LCLINT__) */
/* Memory allocation via macro defs to get meaningful locations from mtrace() */
@@ -31,11 +31,11 @@ Index: rpm-5.4.14/system.h
#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
+Index: rpm/lib/librpm.vers
===================================================================
---- rpm-5.4.14.orig/lib/librpm.vers
-+++ rpm-5.4.14/lib/librpm.vers
-@@ -405,6 +405,10 @@ LIBRPM_0
+--- rpm.orig/lib/librpm.vers
++++ rpm/lib/librpm.vers
+@@ -406,6 +406,10 @@ LIBRPM_0
specedit;
strict_erasures;
XrpmtsiInit;
@@ -46,14 +46,14 @@ Index: rpm-5.4.14/lib/librpm.vers
local:
*;
};
-Index: rpm-5.4.14/rpmio/librpmio.vers
+Index: rpm/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;
+--- rpm.orig/rpmio/librpmio.vers
++++ rpm/rpmio/librpmio.vers
+@@ -1455,6 +1455,10 @@ LIBRPMIO_0
+ _mongoc_write_result_init;
+ _mongoc_write_result_merge;
+ _mongoc_write_result_merge_legacy;
+ xmalloc;
+ xrealloc;
+ xcalloc;
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch
deleted file mode 100644
index 71045aebc..000000000
--- a/yocto-poky/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/yocto-poky/meta/recipes-devtools/rpm/rpm_4.11.2.bb b/yocto-poky/meta/recipes-devtools/rpm/rpm_4.11.2.bb
deleted file mode 100644
index f4a2110ae..000000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm_4.11.2.bb
+++ /dev/null
@@ -1,138 +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 attr zlib acl gzip python"
-DEPENDS_append_class-native = " file-replacement-native"
-
-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/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb b/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
index 951b2517f..0991f6d52 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
@@ -34,24 +34,22 @@ DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module t
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"
+LICENSE = "LGPLv2.1 & Apache-2.0"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
+LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901"
-DEPENDS = "libpcre attr acl popt ossp-uuid file byacc-native"
+# We must have gettext-native, we need gettextize, which may not be provided
+DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native"
DEPENDS_append_class-native = " file-replacement-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 || :
+ # 'ln' isn't reliable, and 'mv' could break later builds
+ rm -rf ${S}/syck ; cp -r ${WORKDIR}/syck ${S}/.
+ rm -rf ${S}/lua ; cp -r ${WORKDIR}/lua ${S}/.
+ rm -rf ${S}/popt ; cp -r ${WORKDIR}/popt ${S}/.
+ rm -rf ${S}/beecrypt ; cp -r ${WORKDIR}/beecrypt ${S}/.
}
addtask fixup_unpack after do_unpack before do_patch
@@ -60,45 +58,34 @@ addtask fixup_unpack after do_unpack before do_patch
# community work in progress.
DEFAULT_PREFERENCE = "-1"
+S = "${WORKDIR}/rpm"
+
# 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 \
+ cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=popt \
+ cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=beecrypt \
file://perfile_rpmdeps.sh \
- file://rpm-autogen.patch \
- file://rpm-libsql-fix.patch \
+ file://pythondeps.sh \
+"
+
+# Bug fixes
+SRC_URI += " \
file://header-include-fix.patch \
+ file://rpm-libsql-fix.patch \
file://rpm-platform.patch \
- file://rpm-showrc.patch \
+ file://rpm-platform2.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 \
@@ -107,12 +94,63 @@ SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \
file://rpm-hardlink-segfault-fix.patch \
file://rpm-payload-use-hashed-inode.patch \
file://rpm-fix-logio-cp.patch \
+ file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
+ file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
+ file://0001-define-EM_AARCH64.patch \
+ file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
+ file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
+ file://rpm-mongodb-sasl.patch \
+ file://rpm-fix-parseEmbedded.patch \
+ file://rpm-rpmio-headers.patch \
+ file://rpm-python-restore-origin.patch \
+ file://rpm-keccak-sse-intrin.patch \
+ file://rpm-atomic-ops.patch \
+ file://rpm-gnu-atomic.patch \
+ file://rpm-tagname-type.patch \
+ file://rpm-python-tagname.patch \
+ file://rpm-python-AddErase.patch \
+ file://rpm-rpmpgp-popt.patch \
+ file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
+"
+
+# OE specific changes
+SRC_URI += " \
+ file://rpm-log-auto-rm.patch \
+ file://rpm-db-reduce.patch \
+ file://rpm-autogen.patch \
+ file://rpm-showrc.patch \
+ file://rpm-fileclass.patch \
+ file://rpm-scriptletexechelper.patch \
+ file://rpmdeps-oecore.patch \
+ file://rpm-no-perl-urpm.patch \
+ file://rpm-macros.patch \
+ file://rpm-lua.patch \
+ file://rpm-ossp-uuid.patch \
+ file://rpm-uuid-include.patch \
+ file://rpm-pkgconfigdeps.patch \
+ file://no-ldflags-in-pkgconfig.patch \
+ file://dbconvert.patch \
+ file://rpm-db_buffer_small.patch \
+ file://rpm-py-init.patch \
+ file://rpm-reloc-macros.patch \
file://rpm-db5-or-db6.patch \
- file://rpm-rpmpgp-fix.patch \
- file://rpm-disable-Wno-override-init.patch \
+ file://rpm-db60.patch \
+ file://rpmqv_cc_b_gone.patch \
file://rpm-realpath.patch \
- "
-
+ file://rpm-check-rootpath-reasonableness.patch \
+ file://rpm-macros.in-disable-external-key-server.patch \
+ file://configure.ac-check-for-both-gpg2-and-gpg.patch \
+ file://rpm-disable-auto-stack-protector.patch \
+ file://popt-disable-auto-stack-protector.patch \
+ file://rpm-syck-fix-gram.patch \
+ file://rpm-rpmdb-grammar.patch \
+ file://rpm-disable-blaketest.patch \
+ file://rpm-autogen-force.patch \
+"
+
+SRC_URI_append_libc-musl = "\
+ file://0001-rpm-Fix-build-on-musl.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.
@@ -122,16 +160,87 @@ inherit autotools gettext
acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
+# The local distribution macro directory
+distromacrodir = "${libdir}/rpm/poky"
+
# 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"
+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
+# Set the digest algorithm used for verifying file integrity
+# If this value changes, and two different packages have different values
+# the "same file" validation (two packages have a non-conflict file)
+# will fail. This may lead to upgrade problems. You should treat this
+# value as a distribution wide setting, and only change it when you intend
+# a full system upgrade!
+#
+# Defined file digest algorithm values (note: not all are available!):
+# 1 MD5 (legacy RPM default)
+# 2 SHA1
+# 3 RIPEMD-160
+# 5 MD2
+# 6 TIGER-192
+# 8 SHA256
+# 9 SHA384
+# 10 SHA512
+# 11 SHA224
+# 104 MD4
+# 105 RIPEMD-128
+# 106 CRC-32
+# 107 ADLER-32
+# 108 CRC-64 (ECMA-182 polynomial, untested uint64_t problems)
+# 109 Jenkins lookup3.c hashlittle()
+# 111 RIPEMD-256
+# 112 RIPEMD-320
+# 188 BLAKE2B
+# 189 BLAKE2BP
+# 190 BLAKE2S
+# 191 BLAKE2SP
+RPM_FILE_DIGEST_ALGO ?= "1"
+
+# All packages build with RPM5 contain a non-repudiable signature.
+# The purpose of this signature is not to show authenticity of a package,
+# but instead act as a secondary package wide validation that shows it
+# wasn't damaged by accident in transport. (When later you sign the package,
+# this signature may or may not be replaced as there are three signature
+# slots, one for DSA/RSA, one for ECSDA, and one reserved.)
+#
+# There is a known issue w/ RSA signatures that if they start with an 0x00
+# the signing and validation may fail.
+#
+# The following is the list of choices for the non-rpudiable signature
+# (note: not all of these are implemented):
+# DSA (default)
+# RSA (implies SHA1)
+# ECDSA (implies SHA256)
+# DSA/SHA1
+# DSA/SHA224
+# DSA/SHA256
+# DSA/SHA384
+# DSA/SHA512
+# RSA/SHA1
+# RSA/SHA224
+# RSA/SHA256
+# RSA/SHA384
+# RSA/SHA512
+# ECDSA/SHA224 (using NIST P-224)
+# ECDSA/SHA256 (using NIST P-256)
+# ECDSA/SHA384 (using NIST P-384)
+# ECDSA/SHA512 (using NIST P-521)
+RPM_SELF_SIGN_ALGO ?= "DSA"
+
# 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 ??= "db bzip2 zlib popt openssl libelf python"
+
+# Note: switching to internal popt may not work, as it will generate
+# a shared library which will intentionally not be packaged.
+#
+# If you intend to use the internal version, additional work may be required.
+PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt,"
PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
@@ -158,10 +267,17 @@ 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,"
+# This switch simply disables external beecrypt, RPM5 always uses beecrypt
+# for base64 processing and various digest algorithms.
+# Beecrypt is only the preferred crypto engine if it's the only engine enabled.
+PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--with-beecrypt=internal,beecrypt,"
+
+# --with-usecrypto= setting defined the item as the preferred system
+# crypto engine, which will take priority over the included beecrypt
+PACKAGECONFIG[openssl] = "--with-openssl --with-usecrypto=openssl,--without-openssl,openssl,"
+PACKAGECONFIG[nss] = "--with-nss --with-usecrypto=nss,--without-nss,nss,"
+PACKAGECONFIG[gcrypt] = "--with-gcrypt --with-usecrypto=gcrypt,--without-gcrypt,gcrypt,"
+
PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils,"
PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils,"
@@ -192,7 +308,6 @@ EXTRA_OECONF += "--verbose \
--with-uuid \
--with-attr \
--with-acl \
- --with-popt=external \
--with-pthreads \
--without-cudf \
--without-ficl \
@@ -204,6 +319,7 @@ EXTRA_OECONF += "--verbose \
--without-gpsee \
--without-ruby \
--without-squirrel \
+ --without-sasl2 \
--with-build-extlibdep \
--with-build-maxextlibdep \
--without-valgrind \
@@ -223,7 +339,7 @@ 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"
+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"
@@ -258,10 +374,6 @@ FILES_${PN} = "${bindir}/rpm \
${bindir}/rpm2cpio.real \
"
-FILES_${PN}-dbg += "${libdir}/rpm/.debug \
- ${libdir}/rpm/bin/.debug \
- "
-
FILES_${PN}-common = "${bindir}/rpm2cpio \
${bindir}/gendiff \
${sysconfdir}/rpm \
@@ -345,25 +457,21 @@ FILES_${PN}-build = "${prefix}/src/rpm \
${libdir}/rpm/vpkg-provides.sh \
${libdir}/rpm/vpkg-provides2.sh \
${libdir}/rpm/perfile_rpmdeps.sh \
+ ${distromacrodir} \
"
RDEPENDS_${PN} = "base-files run-postinsts"
RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN}_class-nativesdk = ""
RDEPENDS_${PN}-build = "file bash perl"
-RDEPENDS_python-rpm = "${PN}"
+RDEPENDS_python-rpm = "${PN} python"
-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"
+PROVIDES += "python-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 \
@@ -392,6 +500,7 @@ FILES_${PN}-staticdev = " \
${libdir}/librpmmisc.a \
${libdir}/librpmbuild.a \
${libdir}/rpm/lib/liblua.a \
+ ${libdir}/python*/site-packages/rpm/*.a \
"
do_configure() {
@@ -412,12 +521,20 @@ do_configure() {
}
do_install_append() {
+ # Configure -distribution wide- package crypto settings
+ # If these change, effectively all packages have to be upgraded!
+ sed -i -e 's,%_build_file_digest_algo.*,%_build_sign ${RPM_FILE_DIGEST_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
+ sed -i -e 's,%_build_sign.*,%_build_sign ${RPM_SELF_SIGN_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
+
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 MIPS64 N32 transactions. (This is a no-op on non-MIPS targets.)
+ sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros
+
# Enable Debian style arbitrary tags...
sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
@@ -452,16 +569,15 @@ do_install_append() {
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}
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.a
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.la
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.a
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.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.*
@@ -489,6 +605,91 @@ do_install_append() {
}
+do_install_append_class-target() {
+ # Create and install distribution specific macros
+ mkdir -p ${D}/${distromacrodir}
+ cat << EOF > ${D}/${distromacrodir}/macros
+%_defaultdocdir ${docdir}
+
+%_prefix ${prefix}
+%_exec_prefix ${exec_prefix}
+%_datarootdir ${datadir}
+%_bindir ${bindir}
+%_sbindir ${sbindir}
+%_libexecdir %{_libdir}/%{name}
+%_datadir ${datadir}
+%_sysconfdir ${sysconfdir}
+%_sharedstatedir ${sharedstatedir}
+%_localstatedir ${localstatedir}
+%_lib lib
+%_libdir %{_exec_prefix}/%{_lib}
+%_includedir ${includedir}
+%_oldincludedir ${oldincludedir}
+%_infodir ${infodir}
+%_mandir ${mandir}
+%_localedir %{_libdir}/locale
+EOF
+
+ # Create and install multilib specific macros
+ ${@multilib_rpmmacros(d)}
+}
+
+do_install_append_class-native () {
+ sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+}
+
+do_install_append_class-nativesdk () {
+ sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+}
+
+def multilib_rpmmacros(d):
+ localdata = d.createCopy()
+ # We need to clear the TOOLCHAIN_OPTIONS (--sysroot)
+ localdata.delVar('TOOLCHAIN_OPTIONS')
+
+ # Set 'localdata' values to be consistent with 'd' values.
+ localdata.setVar('distromacrodir', d.getVar('distromacrodir', True))
+ localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
+
+ ret = gen_arch_macro(localdata)
+
+ variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+ for item in variants.split():
+ # Load overrides from 'd' to avoid having to reset the value...
+ localdata = d.createCopy()
+ overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
+ localdata.setVar("OVERRIDES", overrides)
+ localdata.setVar("MLPREFIX", item + "-")
+ bb.data.update_data(localdata)
+ ret += gen_arch_macro(localdata)
+ return ret
+
+def gen_arch_macro(d):
+ # Generate shell script to produce the file as part of do_install
+ val = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n"
+ val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n"
+ val += "%_lib ${baselib}\n"
+ val += "%_libdir ${libdir}\n"
+ val += "%_localedir ${localedir}\n"
+ val += "\n"
+ val += "# Toolchain configuration\n"
+ val += "%TOOLCHAIN_OPTIONS %{nil}\n"
+ val += "%__ar ${@d.getVar('AR', True).replace('$','%')}\n"
+ val += "%__as ${@d.getVar('AS', True).replace('$','%')}\n"
+ val += "%__cc ${@d.getVar('CC', True).replace('$','%')}\n"
+ val += "%__cpp ${@d.getVar('CPP', True).replace('$','%')}\n"
+ val += "%__cxx ${@d.getVar('CXX', True).replace('$','%')}\n"
+ val += "%__ld ${@d.getVar('LD', True).replace('$','%')}\n"
+ val += "%__nm ${@d.getVar('NM', True).replace('$','%')}\n"
+ val += "%__objcopy ${@d.getVar('OBJCOPY', True).replace('$','%')}\n"
+ val += "%__objdump ${@d.getVar('OBJDUMP', True).replace('$','%')}\n"
+ val += "%__ranlib ${@d.getVar('RANLIB', True).replace('$','%')}\n"
+ val += "%__strip ${@d.getVar('STRIP', True).replace('$','%')}\n"
+ val += "EOF\n"
+ val += "\n"
+ return d.expand(val)
+
+
add_native_wrapper() {
create_wrapper ${D}/${bindir}/rpm \
RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb
index 73b3734d5..cbdca88ea 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.14.bb
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -5,8 +5,6 @@ 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."
@@ -37,83 +35,142 @@ written in the Perl programming language to use the interface \
supplied by the RPM Package Manager libraries."
HOMEPAGE = "http://rpm5.org/"
-LICENSE = "LGPLv2.1"
+LICENSE = "LGPLv2.1 & Apache-2.0"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
+LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901"
-DEPENDS = "libpcre attr acl popt ossp-uuid file byacc-native"
+# We must have gettext-native, we need gettextize, which may not be provided
+DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native"
DEPENDS_append_class-native = " file-replacement-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 \
+
+# There is no official 5.4.16 release yet, so start w/ 5.4.15 and patch it
+# based on CVS
+S = "${WORKDIR}/rpm-5.4.15"
+
+SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm;name=srpm;extract=rpm-5.4.15.tar.gz \
+ http://downloads.yoctoproject.org/releases/rpm5/rpm-5.4.15-to-5.4.16-20160225.patch.gz;name=rpm-patch \
+ http://downloads.yoctoproject.org/releases/rpm5/syck-5.4.15-to-5.4.16-20160225.patch.gz;name=syck-patch \
+ http://downloads.yoctoproject.org/releases/rpm5/beecrypt-5.4.15-to-5.4.16-20160225.patch.gz;name=beecrypt-patch \
+ http://downloads.yoctoproject.org/releases/rpm5/lua-5.4.15-to-5.4.16-20160225.patch.gz;name=lua-patch \
file://perfile_rpmdeps.sh \
- file://rpm-autogen.patch \
- file://rpm-libsql-fix.patch \
+ file://pythondeps.sh \
+"
+
+SRC_URI[srpm.md5sum] = "d53782842ac11b3100a43fb2958c9bc0"
+SRC_URI[srpm.sha256sum] = "d4ae5e9ed5df8ab9931b660f491418d20ab5c4d72eb17ed9055b80b71ef6c4ee"
+
+SRC_URI[rpm-patch.md5sum] = "8b7deb1c9574d3d47ed8ba8c690fd8bf"
+SRC_URI[rpm-patch.sha256sum] = "1c1983d001b04eaa23eb2c8d9598b9d0899acb0a89f54a2d4c4e974086fd17a5"
+
+SRC_URI[syck-patch.md5sum] = "f31d7a32105a364688354419ec3559e4"
+SRC_URI[syck-patch.sha256sum] = "4dd1d04489206d8b5d1970f2a8d143a002f2895cefbe15d73459785096545e8a"
+
+SRC_URI[beecrypt-patch.md5sum] = "9e71ee3ccb0a52985a071dd250279132"
+SRC_URI[beecrypt-patch.sha256sum] ="df7c0708a7fab9bdf6d46194519b42e736f99cb0599dcc1c3c1bf1b228705cde"
+
+SRC_URI[lua-patch.md5sum] = "ca10d03d83b1fc1c31a0b50819534cd7"
+SRC_URI[lua-patch.sha256sum] = "6bde435cc827a7d4b2520e8f3e1c9bd2ca74375de0a4402aa99ef4d48eab9a7e"
+
+# Bug fixes
+SRC_URI += " \
file://header-include-fix.patch \
+ file://rpm-libsql-fix.patch \
file://rpm-platform.patch \
- file://rpm-showrc.patch \
+ file://rpm-platform2.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://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
+ file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
+ file://0001-define-EM_AARCH64.patch \
+ file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
+ file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
+ file://rpm-mongodb-sasl.patch \
+ file://rpm-fix-parseEmbedded.patch \
+ file://rpm-rpmio-headers.patch \
+ file://rpm-python-restore-origin.patch \
+ file://rpm-keccak-sse-intrin.patch \
+ file://rpm-atomic-ops.patch \
+ file://rpm-gnu-atomic.patch \
+ file://rpm-tagname-type.patch \
+ file://rpm-python-tagname.patch \
+ file://rpm-python-AddErase.patch \
+ file://rpm-rpmpgp-popt.patch \
+ file://rpm-fix-lua-tests-compilation-failure.patch \
+ file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \
+ file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
+"
+
+# OE specific changes
+SRC_URI += " \
+ file://rpm-log-auto-rm.patch \
+ file://rpm-db-reduce.patch \
+ file://rpm-autogen.patch \
+ file://rpm-showrc.patch \
+ file://rpm-fileclass.patch \
+ file://rpm-scriptletexechelper.patch \
+ file://rpmdeps-oecore.patch \
+ file://rpm-no-perl-urpm.patch \
+ file://rpm-macros.patch \
+ file://rpm-lua.patch \
+ file://rpm-ossp-uuid.patch \
+ file://rpm-uuid-include.patch \
+ file://rpm-pkgconfigdeps.patch \
+ file://no-ldflags-in-pkgconfig.patch \
+ file://dbconvert.patch \
+ file://rpm-db_buffer_small.patch \
+ file://rpm-py-init.patch \
+ file://rpm-reloc-macros.patch \
file://rpm-db5-or-db6.patch \
- file://rpm-disable-Wno-override-init.patch \
+ file://rpm-db60.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 \
- "
-
+ file://rpm-disable-auto-stack-protector.patch \
+ file://popt-disable-auto-stack-protector.patch \
+ file://rpm-syck-fix-gram.patch \
+ file://rpm-rpmdb-grammar.patch \
+ file://rpm-disable-blaketest.patch \
+ file://rpm-autogen-force.patch \
+ file://rpmdb-more-verbose-error-logging-in-rpmTempFile.patch \
+"
+
+SRC_URI_append_libc-musl = "\
+ file://0001-rpm-Fix-build-on-musl.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"
+UPSTREAM_CHECK_REGEX = "rpm-(?P<pver>(\d+[\.\-_]*)+)-.*$"
inherit autotools gettext
acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
+# The local distribution macro directory
+distromacrodir = "${libdir}/rpm/poky"
+
# 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"
@@ -121,9 +178,77 @@ rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macro
# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
+# Set the digest algorithm used for verifying file integrity
+# If this value changes, and two different packages have different values
+# the "same file" validation (two packages have a non-conflict file)
+# will fail. This may lead to upgrade problems. You should treat this
+# value as a distribution wide setting, and only change it when you intend
+# a full system upgrade!
+#
+# Defined file digest algorithm values (note: not all are available!):
+# 1 MD5 (legacy RPM default)
+# 2 SHA1
+# 3 RIPEMD-160
+# 5 MD2
+# 6 TIGER-192
+# 8 SHA256
+# 9 SHA384
+# 10 SHA512
+# 11 SHA224
+# 104 MD4
+# 105 RIPEMD-128
+# 106 CRC-32
+# 107 ADLER-32
+# 108 CRC-64 (ECMA-182 polynomial, untested uint64_t problems)
+# 109 Jenkins lookup3.c hashlittle()
+# 111 RIPEMD-256
+# 112 RIPEMD-320
+# 188 BLAKE2B
+# 189 BLAKE2BP
+# 190 BLAKE2S
+# 191 BLAKE2SP
+RPM_FILE_DIGEST_ALGO ?= "1"
+
+# All packages build with RPM5 contain a non-repudiable signature.
+# The purpose of this signature is not to show authenticity of a package,
+# but instead act as a secondary package wide validation that shows it
+# wasn't damaged by accident in transport. (When later you sign the package,
+# this signature may or may not be replaced as there are three signature
+# slots, one for DSA/RSA, one for ECSDA, and one reserved.)
+#
+# There is a known issue w/ RSA signatures that if they start with an 0x00
+# the signing and validation may fail.
+#
+# The following is the list of choices for the non-rpudiable signature
+# (note: not all of these are implemented):
+# DSA (default)
+# RSA (implies SHA1)
+# ECDSA (implies SHA256)
+# DSA/SHA1
+# DSA/SHA224
+# DSA/SHA256
+# DSA/SHA384
+# DSA/SHA512
+# RSA/SHA1
+# RSA/SHA224
+# RSA/SHA256
+# RSA/SHA384
+# RSA/SHA512
+# ECDSA/SHA224 (using NIST P-224)
+# ECDSA/SHA256 (using NIST P-256)
+# ECDSA/SHA384 (using NIST P-384)
+# ECDSA/SHA512 (using NIST P-521)
+RPM_SELF_SIGN_ALGO ?= "DSA"
+
# 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 ??= "db bzip2 zlib popt openssl libelf python"
+
+# Note: switching to internal popt may not work, as it will generate
+# a shared library which will intentionally not be packaged.
+#
+# If you intend to use the internal version, additional work may be required.
+PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt,"
PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
@@ -150,10 +275,17 @@ 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,"
+# This switch simply disables external beecrypt, RPM5 always uses beecrypt
+# for base64 processing and various digest algorithms.
+# Beecrypt is only the preferred crypto engine if it's the only engine enabled.
+PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--with-beecrypt=internal,beecrypt,"
+
+# --with-usecrypto= setting defined the item as the preferred system
+# crypto engine, which will take priority over the included beecrypt
+PACKAGECONFIG[openssl] = "--with-openssl --with-usecrypto=openssl,--without-openssl,openssl,"
+PACKAGECONFIG[nss] = "--with-nss --with-usecrypto=nss,--without-nss,nss,"
+PACKAGECONFIG[gcrypt] = "--with-gcrypt --with-usecrypto=gcrypt,--without-gcrypt,gcrypt,"
+
PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils,"
PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils,"
@@ -184,7 +316,6 @@ EXTRA_OECONF += "--verbose \
--with-uuid \
--with-attr \
--with-acl \
- --with-popt=external \
--with-pthreads \
--without-cudf \
--without-ficl \
@@ -196,6 +327,7 @@ EXTRA_OECONF += "--verbose \
--without-gpsee \
--without-ruby \
--without-squirrel \
+ --without-sasl2 \
--with-build-extlibdep \
--with-build-maxextlibdep \
--without-valgrind \
@@ -250,11 +382,6 @@ FILES_${PN} = "${bindir}/rpm \
${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 \
@@ -338,13 +465,14 @@ FILES_${PN}-build = "${prefix}/src/rpm \
${libdir}/rpm/vpkg-provides.sh \
${libdir}/rpm/vpkg-provides2.sh \
${libdir}/rpm/perfile_rpmdeps.sh \
+ ${distromacrodir} \
"
RDEPENDS_${PN} = "base-files run-postinsts"
RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN}_class-nativesdk = ""
RDEPENDS_${PN}-build = "file bash perl"
-RDEPENDS_python-rpm = "${PN}"
+RDEPENDS_python-rpm = "${PN} python"
FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
PROVIDES += "python-rpm"
@@ -370,6 +498,7 @@ FILES_${PN}-dev = "${includedir}/rpm \
${libdir}/rpm/lib/liblua.la \
${libdir}/pkgconfig/rpm.pc \
${libdir}/rpm/rpmdb_loadcvt \
+ ${libdir}/rpm/include \
"
FILES_${PN}-staticdev = " \
@@ -401,12 +530,20 @@ do_configure() {
}
do_install_append() {
+ # Configure -distribution wide- package crypto settings
+ # If these change, effectively all packages have to be upgraded!
+ sed -i -e 's,%_build_file_digest_algo.*,%_build_sign ${RPM_FILE_DIGEST_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
+ sed -i -e 's,%_build_sign.*,%_build_sign ${RPM_SELF_SIGN_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
+
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 MIPS64 N32 transactions. (This is a no-op on non-MIPS targets.)
+ sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros
+
# Enable Debian style arbitrary tags...
sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
@@ -441,16 +578,15 @@ do_install_append() {
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}
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.a
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.la
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.a
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.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.*
@@ -478,6 +614,91 @@ do_install_append() {
}
+do_install_append_class-target() {
+ # Create and install distribution specific macros
+ mkdir -p ${D}/${distromacrodir}
+ cat << EOF > ${D}/${distromacrodir}/macros
+%_defaultdocdir ${docdir}
+
+%_prefix ${prefix}
+%_exec_prefix ${exec_prefix}
+%_datarootdir ${datadir}
+%_bindir ${bindir}
+%_sbindir ${sbindir}
+%_libexecdir %{_libdir}/%{name}
+%_datadir ${datadir}
+%_sysconfdir ${sysconfdir}
+%_sharedstatedir ${sharedstatedir}
+%_localstatedir ${localstatedir}
+%_lib lib
+%_libdir %{_exec_prefix}/%{_lib}
+%_includedir ${includedir}
+%_oldincludedir ${oldincludedir}
+%_infodir ${infodir}
+%_mandir ${mandir}
+%_localedir %{_libdir}/locale
+EOF
+
+ # Create and install multilib specific macros
+ ${@multilib_rpmmacros(d)}
+}
+
+do_install_append_class-native () {
+ sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+}
+
+do_install_append_class-nativesdk () {
+ sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+}
+
+def multilib_rpmmacros(d):
+ localdata = d.createCopy()
+ # We need to clear the TOOLCHAIN_OPTIONS (--sysroot)
+ localdata.delVar('TOOLCHAIN_OPTIONS')
+
+ # Set 'localdata' values to be consistent with 'd' values.
+ localdata.setVar('distromacrodir', d.getVar('distromacrodir', True))
+ localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
+
+ ret = gen_arch_macro(localdata)
+
+ variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+ for item in variants.split():
+ # Load overrides from 'd' to avoid having to reset the value...
+ localdata = d.createCopy()
+ overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
+ localdata.setVar("OVERRIDES", overrides)
+ localdata.setVar("MLPREFIX", item + "-")
+ bb.data.update_data(localdata)
+ ret += gen_arch_macro(localdata)
+ return ret
+
+def gen_arch_macro(d):
+ # Generate shell script to produce the file as part of do_install
+ val = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n"
+ val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n"
+ val += "%_lib ${baselib}\n"
+ val += "%_libdir ${libdir}\n"
+ val += "%_localedir ${localedir}\n"
+ val += "\n"
+ val += "# Toolchain configuration\n"
+ val += "%TOOLCHAIN_OPTIONS %{nil}\n"
+ val += "%__ar ${@d.getVar('AR', True).replace('$','%')}\n"
+ val += "%__as ${@d.getVar('AS', True).replace('$','%')}\n"
+ val += "%__cc ${@d.getVar('CC', True).replace('$','%')}\n"
+ val += "%__cpp ${@d.getVar('CPP', True).replace('$','%')}\n"
+ val += "%__cxx ${@d.getVar('CXX', True).replace('$','%')}\n"
+ val += "%__ld ${@d.getVar('LD', True).replace('$','%')}\n"
+ val += "%__nm ${@d.getVar('NM', True).replace('$','%')}\n"
+ val += "%__objcopy ${@d.getVar('OBJCOPY', True).replace('$','%')}\n"
+ val += "%__objdump ${@d.getVar('OBJDUMP', True).replace('$','%')}\n"
+ val += "%__ranlib ${@d.getVar('RANLIB', True).replace('$','%')}\n"
+ val += "%__strip ${@d.getVar('STRIP', True).replace('$','%')}\n"
+ val += "EOF\n"
+ val += "\n"
+ return d.expand(val)
+
+
add_native_wrapper() {
create_wrapper ${D}/${bindir}/rpm \
RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpmresolve_1.0.bb b/yocto-poky/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
index 04a55fd48..0c13a6710 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
@@ -11,7 +11,7 @@ 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
+ ${CC} ${CFLAGS} -ggdb -I${STAGING_INCDIR}/rpm ${LDFLAGS} rpmresolve.c -o rpmresolve -lrpmbuild -lrpm -lrpmio -lrpmdb
}
do_install() {
OpenPOWER on IntegriCloud