From ee97e53fcceabc6ef4ddc68f38c5fa0e05c5d9a8 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Tue, 23 Feb 2016 11:28:21 -0600 Subject: rpm: Uprev to rpm-5.4.16 (pre) and rpm-5.4+cvs to current CVS head meta/lib/oe/package_manager.py was also updated. This ensures that any diagnostic messages are ignored from the output of rpmresolve. The patches have been split into bug fixes (things that belong upstream) and local changes that are OE specific. The following patches are obsolete and have been removed: rpm-remove-sykcparse-decl.patch fstack-protector-configure-check.patch rpm-disable-Wno-override-init.patch rpm-lua-fix-print.patch rpm-rpmpgp-fix.patch verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch Signed-off-by: Mark Hatle --- meta/lib/oe/package_manager.py | 14 +- meta/recipes-devtools/rpm/rpm/debugedit-segv.patch | 46 +- .../rpm/rpm/fstack-protector-configure-check.patch | 21 - .../rpm/rpm/header-include-fix.patch | 10 + .../rpm/popt-disable-auto-stack-protector.patch | 27 + .../rpm/rpm/python-rpm-rpmsense.patch | 30 +- meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch | 73 ++ meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch | 43 +- meta/recipes-devtools/rpm/rpm/rpm-db60.patch | 56 + .../rpm/rpm/rpm-disable-Wno-override-init.patch | 32 - .../rpm/rpm/rpm-disable-auto-stack-protector.patch | 24 + .../rpm/rpm/rpm-disable-blaketest.patch | 28 + .../rpm/rpm/rpm-fix-parseEmbedded.patch | 27 + meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch | 64 ++ .../rpm/rpm/rpm-keccak-sse-intrin.patch | 27 + .../rpm/rpm/rpm-lua-fix-print.patch | 104 -- ...rpm-macros.in-disable-external-key-server.patch | 16 +- .../rpm/rpm/rpm-mongodb-sasl.patch | 69 ++ .../rpm/rpm/rpm-payload-use-hashed-inode.patch | 20 - .../rpm/rpm/rpm-pkgconfigdeps.patch | 10 +- meta/recipes-devtools/rpm/rpm/rpm-py-init.patch | 16 +- .../rpm/rpm/rpm-python-AddErase.patch | 35 + .../rpm/rpm/rpm-python-restore-origin.patch | 49 + .../rpm/rpm/rpm-python-tagname.patch | 24 + .../rpm/rpm/rpm-remove-sykcparse-decl.patch | 14 - .../rpm/rpm/rpm-rpmdb-grammar.patch | 124 +++ .../rpm/rpm/rpm-rpmio-headers.patch | 19 + meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch | 67 -- .../recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch | 26 + .../rpm/rpm/rpm-scriptletexechelper.patch | 29 +- .../rpm/rpm/rpm-syck-fix-gram.patch | 1081 ++++++++++++++++++++ .../rpm/rpm/rpm-tagname-type.patch | 25 + meta/recipes-devtools/rpm/rpm/rpmatch.patch | 30 +- .../recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch | 36 +- meta/recipes-devtools/rpm/rpm/uclibc-support.patch | 36 +- ...broken-logic-for-ghost-avoidance-Mark-Hat.patch | 38 - meta/recipes-devtools/rpm/rpm_5.4+cvs.bb | 225 +++- meta/recipes-devtools/rpm/rpm_5.4.14.bb | 605 ----------- meta/recipes-devtools/rpm/rpm_5.4.16.bb | 663 ++++++++++++ 39 files changed, 2787 insertions(+), 1096 deletions(-) delete mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch create mode 100644 meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-db60.patch delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch delete mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch delete mode 100644 meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch delete mode 100644 meta/recipes-devtools/rpm/rpm_5.4.14.bb create mode 100644 meta/recipes-devtools/rpm/rpm_5.4.16.bb diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 5cd43e9b1d..b701b8c51b 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py @@ -418,11 +418,15 @@ class RpmPkgsList(PkgsList): # Populate deps dictionary for better manipulation for line in dependencies.splitlines(): - pkg, dep = line.split("|") - if not pkg in deps: - deps[pkg] = list() - if not dep in deps[pkg]: - deps[pkg].append(dep) + try: + pkg, dep = line.split("|") + if not pkg in deps: + deps[pkg] = list() + if not dep in deps[pkg]: + deps[pkg].append(dep) + except: + # Ignore any other lines they're debug or errors + pass for line in tmp_output.split('\n'): if len(line.strip()) == 0: diff --git a/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch b/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch index beef5edd9d..585cf12fd8 100644 --- a/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch +++ b/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch @@ -15,34 +15,36 @@ Upstream-Status: Pending Signed-off-by: Mark Hatle -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/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch deleted file mode 100644 index 976af486fb..0000000000 --- a/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch +++ /dev/null @@ -1,21 +0,0 @@ -Some options checked in this loop are needing linking to find out -if the option can be used or not e.g. -fstack-protector which needs -libssp to be staged and available for compiler to link against -Therefore we change the compile only check to compile and link check - -Signed-off-by: Khem Raj -Upstream-Status: Pending - -Index: rpm-5.4.14/configure.ac -=================================================================== ---- rpm-5.4.14.orig/configure.ac -+++ rpm-5.4.14/configure.ac -@@ -201,7 +201,7 @@ dnl # GNU GCC (usually "gcc") - my_save_cflags="$CFLAGS" - CFLAGS=$c - AC_MSG_CHECKING([whether GCC supports $c]) -- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])], - [AC_MSG_RESULT([yes])] - [my_cflags=$c], - [AC_MSG_RESULT([no])] diff --git a/meta/recipes-devtools/rpm/rpm/header-include-fix.patch b/meta/recipes-devtools/rpm/rpm/header-include-fix.patch index 5ffb187ff3..576ff007a5 100644 --- a/meta/recipes-devtools/rpm/rpm/header-include-fix.patch +++ b/meta/recipes-devtools/rpm/rpm/header-include-fix.patch @@ -1,5 +1,15 @@ +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: Pending +Signed-off-by: Qing He +Signed-off-by: Mark Hatle + Index: rpm-5.4.14/rpmdb/rpmdb.h =================================================================== --- rpm-5.4.14.orig/rpmdb/rpmdb.h diff --git a/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch b/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch new file mode 100644 index 0000000000..bcad8dcb73 --- /dev/null +++ b/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 + +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/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch b/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch index a538a60bb9..471e6ea55b 100644 --- a/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch +++ b/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch @@ -8,26 +8,24 @@ Upstream-Status: Pending Signed-off-by: Mark Hatle -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/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch b/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch new file mode 100644 index 0000000000..c6327719d9 --- /dev/null +++ b/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: Pending + +Signed-off-by: Mark Hatle + +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 ++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/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch b/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch index a5fab415c2..5d08d279ae 100644 --- a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch +++ b/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch @@ -10,20 +10,20 @@ Signed-off-by: Yuanjie Huang configure.ac | 103 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 81 insertions(+), 22 deletions(-) -diff --git a/configure.ac b/configure.ac -index 02716a0..889a425 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -547,8 +547,6 @@ else +Index: rpm/configure.ac +=================================================================== +--- rpm.orig/configure.ac ++++ rpm/configure.ac +@@ -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}/cmake, $MYPATH) +@@ -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) @@ -46,7 +46,7 @@ index 02716a0..889a425 100644 AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH) AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH) AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH) -@@ -1598,13 +1580,46 @@ RPM_CHECK_LIB( +@@ -2050,13 +2032,46 @@ RPM_CHECK_LIB( dnl # Berkeley-DB & SQLite DBLIBSRCS="" @@ -56,7 +56,7 @@ index 02716a0..889a425 100644 -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}" + +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @@ -69,11 +69,11 @@ index 02716a0..889a425 100644 +]])], +[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 @@ -86,7 +86,7 @@ index 02716a0..889a425 100644 + AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ]) + ])], +[with_db="${with_db_save}" -+ CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-5.3" ++ CPPFLAGS="${CPPFLAGS_save}" + RPM_CHECK_LIB( + [Berkeley-DB], [db], + [db-5.3], [db_create], [db.h], @@ -96,32 +96,32 @@ index 02716a0..889a425 100644 AM_CONDITIONAL(WITH_DB, [ true ]) AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ]) if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then -@@ -1616,6 +1631,11 @@ RPM_CHECK_LIB( +@@ -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( -@@ -1627,10 +1647,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]) -@@ -1644,12 +1665,50 @@ RPM_CHECK_LIB( +@@ -2095,12 +2116,50 @@ RPM_CHECK_LIB( ], [ AM_CONDITIONAL(WITH_DBSQL, [ false ]) ]) @@ -172,6 +172,3 @@ index 02716a0..889a425 100644 AC_ARG_WITH(db-largefile, AS_HELP_STRING([--with-db-largefile], [build Berkeley-DB with LARGEFILE support])) AC_ARG_WITH(db-mutex, AS_HELP_STRING([--with-db-mutex=ARG], [build Berkeley-DB with MUTEX type ARG])) --- -2.6.2 - diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db60.patch b/meta/recipes-devtools/rpm/rpm/rpm-db60.patch new file mode 100644 index 0000000000..b4df8b751b --- /dev/null +++ b/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 + +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/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch deleted file mode 100644 index 8b5f8d66c8..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 70d881873b443c9bad502db9665595455d4f0ac9 Mon Sep 17 00:00:00 2001 -From: Robert Yang -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 ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index adeffe0..6746b4c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -163,7 +163,7 @@ AC_ARG_ENABLE(build-warnings, - # XXX gcc-4.2 on Mac OS X hasn't - # CFLAGS="$CFLAGS -Wno-unused-but-set-variable" - # XXX rpmio/set.c needs this -- CFLAGS="$CFLAGS -Wno-override-init" -+# CFLAGS="$CFLAGS -Wno-override-init" - elif test ".`$CC -V 2>&1 | grep 'Sun C'`" != .; then - dnl # Sun Studio (usually "cc") - CFLAGS="$CFLAGS -v" --- -1.8.2.1 - diff --git a/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch b/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch new file mode 100644 index 0000000000..124606c0d1 --- /dev/null +++ b/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 + +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/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch b/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch new file mode 100644 index 0000000000..adbef6df88 --- /dev/null +++ b/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 + +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/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch new file mode 100644 index 0000000000..a6003bae7b --- /dev/null +++ b/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: Pending + +Signed-off-by: Mark Hatle + +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/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch b/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch new file mode 100644 index 0000000000..e25c5aa353 --- /dev/null +++ b/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: Pending + +Signed-off-by: Mark Hatle + +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/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch b/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch new file mode 100644 index 0000000000..e99fd1c3bc --- /dev/null +++ b/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: Pending + +Signed-off-by: Mark Hatle + +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/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch b/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch deleted file mode 100644 index 7ab49e97e2..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch +++ /dev/null @@ -1,104 +0,0 @@ -Lua 'print' statement is not working properly inside of RPM 5 - -The print statement should capture the output and send it to the script -processing engine, and not display it directly to the screen. - -This patch is from: http://rpm5.org/cvs/patchset?cn=17671 - -Upstream-Status: backport (patchset 17671 from rpm5.org) - -Signed-off-by: Mark Hatle - -Index: rpm-5.4.14/CHANGES -=================================================================== ---- rpm-5.4.14.orig/CHANGES -+++ rpm-5.4.14/CHANGES -@@ -1,3 +1,4 @@ -+ - jbj: lua: fix: resurrect output capture with lua-5.2. - - jbj: verify: fix: broken logic for %ghost avoidance (Mark Hatle). - - 5.4.13 -> 5.4.14: -Index: rpm-5.4.14/rpmio/rpmlua.c -=================================================================== ---- rpm-5.4.14.orig/rpmio/rpmlua.c -+++ rpm-5.4.14/rpmio/rpmlua.c -@@ -175,7 +175,7 @@ rpmlua rpmluaNew(void) - }; - /*@=readonlytrans =nullassign @*/ - /*@observer@*/ /*@unchecked@*/ -- const luaL_Reg *lib = lualibs; -+ const luaL_Reg *lib; - char *path_buf; - char *path_next; - char *path; -@@ -190,31 +190,34 @@ rpmlua rpmluaNew(void) - - luaL_openlibs(L); - -- for (; lib->name; lib++) { -+ for (lib = lualibs; lib->name; lib++) { - luaL_requiref(L, lib->name, lib->func, 1); -+ lua_pop(L, 1); - } - - { const char * _lua_path = rpmGetPath(rpmluaPath, NULL); - if (_lua_path != NULL) { -+#if defined(LUA_GLOBALSINDEX) - lua_pushliteral(L, "LUA_PATH"); - lua_pushstring(L, _lua_path); -+ lua_rawset(L, LUA_GLOBALSINDEX); -+#else -+ lua_pushstring(L, _lua_path); -+ lua_setglobal(L, "LUA_PATH"); -+#endif - _lua_path = _free(_lua_path); - } - } - - #if defined(LUA_GLOBALSINDEX) -- lua_rawset(L, LUA_GLOBALSINDEX); --#else -- lua_pushglobaltable(L); --#endif - lua_pushliteral(L, "print"); - lua_pushcfunction(L, rpm_print); -- --#if defined(LUA_GLOBALSINDEX) - lua_rawset(L, LUA_GLOBALSINDEX); - #else -- lua_pushglobaltable(L); -+ lua_pushcfunction(L, rpm_print); -+ lua_setglobal(L, "print"); - #endif -+ - rpmluaSetData(lua, "lua", lua); - - /* load all standard RPM Lua script files */ -@@ -351,6 +354,9 @@ void rpmluaSetVar(rpmlua _lua, rpmluav v - #if defined(LUA_GLOBALSINDEX) - if (lua->pushsize == 0) - lua_pushvalue(L, LUA_GLOBALSINDEX); -+#else -+ if (lua->pushsize == 0) -+ lua_pushglobaltable(L); - #endif - if (pushvar(L, var->keyType, &var->key) != -1) { - if (pushvar(L, var->valueType, &var->value) != -1) -@@ -1039,14 +1045,15 @@ static int rpm_print (lua_State *L) - lua_getglobal(L, "tostring"); - for (i = 1; i <= n; i++) { - const char *s; -+ size_t l; - lua_pushvalue(L, -1); /* function to be called */ - lua_pushvalue(L, i); /* value to print */ - lua_call(L, 1, 1); -- s = lua_tostring(L, -1); /* get result */ -+ s = lua_tolstring(L, -1, &l); /* get result */ - if (s == NULL) - return luaL_error(L, "`tostring' must return a string to `print'"); - if (lua->storeprint) { -- size_t sl = lua_rawlen(L, -1); -+ size_t sl = l; - if ((size_t)(lua->printbufused+sl+1) > lua->printbufsize) { - lua->printbufsize += sl+512; - lua->printbuf = (char *) xrealloc(lua->printbuf, lua->printbufsize); diff --git a/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch b/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch index 07a0cfa300..a08412aa91 100644 --- a/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch +++ b/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch @@ -12,16 +12,20 @@ it's easy enough to do by enabling the necessary macros. Signed-off-by: yzhu1 Signed-off-by: Mark Hatle ---- 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/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch b/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch new file mode 100644 index 0000000000..9e324e5c8a --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch @@ -0,0 +1,69 @@ +Fix errors when building with sasl2 disabled + +Upstream-Status: Pending + +Signed-off-by: Mark Hatle + +Index: rpm/rpmio/mongoc.c +=================================================================== +--- rpm.orig/rpmio/mongoc.c ++++ rpm/rpmio/mongoc.c +@@ -39,8 +39,10 @@ + # include + #endif + ++#ifdef HAVE_LIBSASL2 + #include + #include ++#endif + + #include + #include +@@ -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 + #endif + ++#ifdef HAVE_LIBSASL2 + #include + #include ++#endif + + #include + #include +@@ -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/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch b/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch index 9cd02a0f92..47470d23a0 100644 --- a/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch +++ b/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch @@ -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/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch b/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch index 5d182ad9fe..656de86d70 100644 --- a/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch +++ b/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch @@ -9,14 +9,14 @@ Upstream-Status: Inappropriate [configuration] Signed-off-by: Mark Hatle -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/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch index 07d407d36a..92ef1dc50e 100644 --- a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch +++ b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch @@ -11,15 +11,17 @@ Upstream-Status: Pending Signed-off-by: Mark Hatle -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/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch new file mode 100644 index 0000000000..df6f4722ee --- /dev/null +++ b/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 + +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/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch new file mode 100644 index 0000000000..e6aff52f8c --- /dev/null +++ b/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: Pending + +Signed-off-by: Mark Hatle + +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/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch new file mode 100644 index 0000000000..ed7f8ccaff --- /dev/null +++ b/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: Pending + +Signed-off-by: Mark Hatle + +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/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch b/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch deleted file mode 100644 index 769016b564..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: rpm-5.4.14/syck/lib/syck.h -=================================================================== ---- rpm-5.4.14.orig/syck/lib/syck.h -+++ rpm-5.4.14/syck/lib/syck.h -@@ -621,9 +621,6 @@ long syck_seq_count( SyckNode *seq ) - */ - void syckerror( char *msg ) - /*@*/; --int syckparse( void * ) -- /*@globals fileSystem @*/ -- /*@modifies fileSystem @*/; - /* XXX union YYSTYPE *sycklval has issues on Mac OS X. */ - int sycklex( void *_sycklval, SyckParser *parser ) - /*@modifies _sycklval, parser @*/; diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch new file mode 100644 index 0000000000..71dae4939a --- /dev/null +++ b/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 + +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/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch new file mode 100644 index 0000000000..49cdfcaf9d --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch @@ -0,0 +1,19 @@ +Fix a typo in the rpmio Makefile.am + +Upstream-Status: Pending + +Signed-off-by: Mark Hatle + +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/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch deleted file mode 100644 index d8feed73ff..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch +++ /dev/null @@ -1,67 +0,0 @@ -rpmpgp.c: Add missing if defs around crypto implementations - -Without these, the system will error trying to find the correct crypto -library to use. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle - -Index: rpm/rpmio/rpmpgp.c -=================================================================== ---- rpm.orig/rpmio/rpmpgp.c -+++ rpm/rpmio/rpmpgp.c -@@ -1339,16 +1339,26 @@ int pgpExportPubkey(pgpDig dig) - { - int rc = 0; /* assume failure */ - -+#if defined(WITH_BEECRYPT) - if (pgpImplVecs == &rpmbcImplVecs) - rc = rpmbcExportPubkey(dig); -+#endif -+#if defined(WITH_SSL) - if (pgpImplVecs == &rpmsslImplVecs) - rc = rpmsslExportPubkey(dig); -+#endif -+#if defined(WITH_NSS) - if (pgpImplVecs == &rpmnssImplVecs) - rc = rpmnssExportPubkey(dig); -+#endif -+#if defined(WITH_GCRYPT) - if (pgpImplVecs == &rpmgcImplVecs) - rc = rpmgcExportPubkey(dig); -+#endif -+#if defined(WITH_TOMCRYPT) - if (pgpImplVecs == &rpmltcImplVecs) - rc = rpmltcExportPubkey(dig); -+#endif - return rc; - } - -@@ -1356,16 +1366,26 @@ int pgpExportSignature(pgpDig dig, DIGES - { - int rc = 0; /* assume failure */ - -+#if defined(WITH_BEECRYPT) - if (pgpImplVecs == &rpmbcImplVecs) - rc = rpmbcExportSignature(dig, ctx); -+#endif -+#if defined(WITH_SSL) - if (pgpImplVecs == &rpmsslImplVecs) - rc = rpmsslExportSignature(dig, ctx); -+#endif -+#if defined(WITH_NSS) - if (pgpImplVecs == &rpmnssImplVecs) - rc = rpmnssExportSignature(dig, ctx); -+#endif -+#if defined(WITH_GCRYPT) - if (pgpImplVecs == &rpmgcImplVecs) - rc = rpmgcExportSignature(dig, ctx); -+#endif -+#if defined(WITH_TOMCRYPT) - if (pgpImplVecs == &rpmltcImplVecs) - rc = rpmltcExportSignature(dig, ctx); -+#endif - return rc; - } - diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch new file mode 100644 index 0000000000..915d7efe6f --- /dev/null +++ b/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 + +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 +-#include + #include + #include + + #if defined(_RPMPGP_INTERNAL) ++#include + #include + + /*@unchecked@*/ diff --git a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch b/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch index f825372e82..b55fe22c6a 100644 --- a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch +++ b/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch @@ -12,22 +12,21 @@ Upstream-Status: Pending Signed-off-by: Mark Hatle -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/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch b/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch new file mode 100644 index 0000000000..d6493c197e --- /dev/null +++ b/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 + +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 file