summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2016-02-23 11:28:21 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-09 17:00:27 +0000
commit007c284cb83cf5d98f3e4f605244ca6f1d46caea (patch)
tree32efe1a38e908bdc64ac59cad5f7b5e6b2d99ecf /meta/recipes-devtools
parenta27ca6da59e6939a5bbab641236f7f792c03694f (diff)
downloadpoky-007c284cb83cf5d98f3e4f605244ca6f1d46caea.tar.gz
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 (From OE-Core rev: ee97e53fcceabc6ef4ddc68f38c5fa0e05c5d9a8) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/rpm/rpm/debugedit-segv.patch46
-rw-r--r--meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch21
-rw-r--r--meta/recipes-devtools/rpm/rpm/header-include-fix.patch10
-rw-r--r--meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch27
-rw-r--r--meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch30
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch73
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch43
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-db60.patch56
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch32
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch28
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch27
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch64
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch27
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch104
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch16
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch69
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch20
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch10
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-py-init.patch16
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch35
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch49
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch14
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch124
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch19
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch67
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch26
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch29
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch1081
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch25
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmatch.patch30
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch36
-rw-r--r--meta/recipes-devtools/rpm/rpm/uclibc-support.patch36
-rw-r--r--meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch38
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4+cvs.bb225
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.16.bb (renamed from meta/recipes-devtools/rpm/rpm_5.4.14.bb)142
37 files changed, 2215 insertions, 528 deletions
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
15 15
16Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 16Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
17 17
18Index: rpm-5.4.14/tools/debugedit.c 18Index: rpm/tools/debugedit.c
19=================================================================== 19===================================================================
20--- rpm-5.4.14.orig/tools/debugedit.c 20--- rpm.orig/tools/debugedit.c
21+++ rpm-5.4.14/tools/debugedit.c 21+++ rpm/tools/debugedit.c
22@@ -1445,21 +1445,24 @@ handle_build_id (DSO *dso, Elf_Data *bui 22@@ -1403,7 +1403,8 @@ static inline void process (hashFunction
23 auto inline void process (const void *data, size_t size) 23 const void *data, size_t size)
24 { 24 {
25 memchunk chunk = { .data = (void *) data, .size = size }; 25 memchunk chunk = { .data = (void *) data, .size = size };
26- hashFunctionContextUpdateMC (&ctx, &chunk); 26- hashFunctionContextUpdateMC (ctx, &chunk);
27+ if (data != NULL && size != 0) 27+ if (data != NULL && size != 0)
28+ hashFunctionContextUpdateMC (&ctx, &chunk); 28+ hashFunctionContextUpdateMC (ctx, &chunk);
29 } 29 }
30 union 30
31 { 31 /* Compute a fresh build ID bit-string from the editted file contents. */
32@@ -1456,14 +1457,16 @@ handle_build_id (DSO *dso, Elf_Data *bui
32 GElf_Ehdr ehdr; 33 GElf_Ehdr ehdr;
33 GElf_Phdr phdr; 34 GElf_Phdr phdr;
34 GElf_Shdr shdr; 35 GElf_Shdr shdr;
35- } u; 36- } u;
36- Elf_Data x = { .d_version = EV_CURRENT, .d_buf = &u }; 37- Elf_Data x = { .d_version = EV_CURRENT, .d_buf = &u };
37+ } u1, u2; 38-
38+ Elf_Data src = { .d_version = EV_CURRENT, .d_buf = &u1 };
39+ Elf_Data dest = { .d_version = EV_CURRENT, .d_buf = &u2 };
40
41- x.d_type = ELF_T_EHDR; 39- x.d_type = ELF_T_EHDR;
42- x.d_size = sizeof u.ehdr; 40- x.d_size = sizeof u.ehdr;
43- u.ehdr = dso->ehdr; 41- u.ehdr = dso->ehdr;
44- u.ehdr.e_phoff = u.ehdr.e_shoff = 0; 42- u.ehdr.e_phoff = u.ehdr.e_shoff = 0;
45- if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL) 43- if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
44+ } u1, u2;
45+ Elf_Data src = { .d_version = EV_CURRENT, .d_buf = &u1 };
46+ Elf_Data dest = { .d_version = EV_CURRENT, .d_buf = &u2 };
47+
46+ src.d_type = ELF_T_EHDR; 48+ src.d_type = ELF_T_EHDR;
47+ src.d_size = sizeof u1.ehdr; 49+ src.d_size = sizeof u1.ehdr;
48+ dest.d_size = sizeof u2.ehdr; 50+ dest.d_size = sizeof u2.ehdr;
@@ -52,7 +54,7 @@ Index: rpm-5.4.14/tools/debugedit.c
52 { 54 {
53 bad: 55 bad:
54 fprintf (stderr, "Failed to compute header checksum: %s\n", 56 fprintf (stderr, "Failed to compute header checksum: %s\n",
55@@ -1467,29 +1470,31 @@ handle_build_id (DSO *dso, Elf_Data *bui 57@@ -1471,29 +1474,31 @@ handle_build_id (DSO *dso, Elf_Data *bui
56 exit (1); 58 exit (1);
57 } 59 }
58 60
@@ -69,8 +71,8 @@ Index: rpm-5.4.14/tools/debugedit.c
69- if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL) 71- if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
70+ if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL) 72+ if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
71 goto bad; 73 goto bad;
72- process (x.d_buf, x.d_size); 74- process (&ctx, x.d_buf, x.d_size);
73+ process (dest.d_buf, dest.d_size); 75+ process (&ctx, dest.d_buf, dest.d_size);
74 } 76 }
75 77
76- x.d_type = ELF_T_SHDR; 78- x.d_type = ELF_T_SHDR;
@@ -88,8 +90,8 @@ Index: rpm-5.4.14/tools/debugedit.c
88+ u1.shdr.sh_offset = 0; 90+ u1.shdr.sh_offset = 0;
89+ if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL) 91+ if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
90 goto bad; 92 goto bad;
91- process (x.d_buf, x.d_size); 93- process (&ctx, x.d_buf, x.d_size);
92+ process (dest.d_buf, dest.d_size); 94+ process (&ctx, dest.d_buf, dest.d_size);
93 95
94- if (u.shdr.sh_type != SHT_NOBITS) 96- if (u.shdr.sh_type != SHT_NOBITS)
95+ if (u1.shdr.sh_type != SHT_NOBITS) 97+ 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 @@
1Some options checked in this loop are needing linking to find out
2if the option can be used or not e.g. -fstack-protector which needs
3libssp to be staged and available for compiler to link against
4Therefore we change the compile only check to compile and link check
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7Upstream-Status: Pending
8
9Index: rpm-5.4.14/configure.ac
10===================================================================
11--- rpm-5.4.14.orig/configure.ac
12+++ rpm-5.4.14/configure.ac
13@@ -201,7 +201,7 @@ dnl # GNU GCC (usually "gcc")
14 my_save_cflags="$CFLAGS"
15 CFLAGS=$c
16 AC_MSG_CHECKING([whether GCC supports $c])
17- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
18+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
19 [AC_MSG_RESULT([yes])]
20 [my_cflags=$c],
21 [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 @@
1Update two rpm headers to include other headers.
2
3Using rpmdb.h w/o including errno.h may result in a warning.
4
5Using rpmtag.h w/o also adding stdint.h will result in numerous failures
6about unknown types on modern compilers.
7
1Upstream-Status: Pending 8Upstream-Status: Pending
2 9
10Signed-off-by: Qing He <qing.he@intel.com>
11Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
12
3Index: rpm-5.4.14/rpmdb/rpmdb.h 13Index: rpm-5.4.14/rpmdb/rpmdb.h
4=================================================================== 14===================================================================
5--- rpm-5.4.14.orig/rpmdb/rpmdb.h 15--- 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 @@
1popt: Disable default stack protection on internal version of popt
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7Index: rpm-5.4.15/popt/configure.ac
8===================================================================
9--- rpm-5.4.15.orig/popt/configure.ac
10+++ rpm-5.4.15/popt/configure.ac
11@@ -123,7 +123,6 @@ AS_IF([test "x$popt_gcc_warnings" = xyes
12 popt_CFLAGS_ADD([-Wjump-misses-init],[POPT_CFLAGS])
13 popt_CFLAGS_ADD([-Wno-format-nonliteral],[POPT_CFLAGS])
14 popt_CFLAGS_ADD([-Wframe-larger-than=$MAX_STACK_SIZE],[POPT_CFLAGS])
15- popt_CFLAGS_ADD([-fstack-protector-all],[POPT_CFLAGS])
16 popt_CFLAGS_ADD([-fasynchronous-unwind-tables],[POPT_CFLAGS])
17 popt_CFLAGS_ADD([-fdiagnostics-show-option],[POPT_CFLAGS])
18 popt_CFLAGS_ADD([-funit-at-a-time],[POPT_CFLAGS])
19@@ -203,7 +202,7 @@ AC_SUBST([POPT_LDFLAGS])
20 # -fno-delete-null-pointer as the kernel does http://patchwork.kernel.org/patch/36060/
21 # GNU GCC (usually "gcc")
22 AS_IF([test "x$GCC" != x],
23- [ for c in -fno-delete-null-pointer-checks -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -fexceptions
24+ [ for c in -fno-delete-null-pointer-checks -fexceptions
25 do
26 popt_CFLAGS_ADD([$c], [POPT_CFLAGS])
27 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
8 8
9Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 9Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
10 10
11Index: rpm-5.4.14/python/rpmmodule.c 11Index: rpm/python/rpmmodule.c
12=================================================================== 12===================================================================
13--- rpm-5.4.14.orig/python/rpmmodule.c 13--- rpm.orig/python/rpmmodule.c
14+++ rpm-5.4.14/python/rpmmodule.c 14+++ rpm/python/rpmmodule.c
15@@ -494,12 +494,16 @@ void init_rpm(void) 15@@ -525,12 +525,15 @@ static int initModule(PyObject *m)
16 REGISTER_ENUM(RPMSENSE_EQUAL);
17 REGISTER_ENUM(RPMSENSE_NOTEQUAL);
18 REGISTER_ENUM(RPMSENSE_FIND_REQUIRES);
19-#if defined(RPM_VENDOR_MANDRIVA)
20+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
21 REGISTER_ENUM(RPMSENSE_PREREQ); 16 REGISTER_ENUM(RPMSENSE_PREREQ);
17 REGISTER_ENUM(RPMSENSE_PRETRANS);
18 REGISTER_ENUM(RPMSENSE_INTERP);
19+#else
20+ #if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
22 REGISTER_ENUM(RPMSENSE_SCRIPT_PRE); 21 REGISTER_ENUM(RPMSENSE_SCRIPT_PRE);
23 REGISTER_ENUM(RPMSENSE_SCRIPT_POST); 22 REGISTER_ENUM(RPMSENSE_SCRIPT_POST);
24 REGISTER_ENUM(RPMSENSE_SCRIPT_PREUN); 23 REGISTER_ENUM(RPMSENSE_SCRIPT_PREUN);
25- REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN) 24 REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN);
26+ REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN); 25 REGISTER_ENUM(RPMSENSE_SCRIPT_VERIFY);
27+#endif 26-#else
28+
29+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
30+ REGISTER_ENUM(RPMSENSE_MISSINGOK); 27+ REGISTER_ENUM(RPMSENSE_MISSINGOK);
28+ #endif
29 REGISTER_ENUM(RPMSENSE_NOTEQUAL);
31 #endif 30 #endif
32 31 REGISTER_ENUM(RPMSENSE_FIND_REQUIRES);
33 REGISTER_ENUM(RPMDEPS_FLAG_NOUPGRADE);
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 @@
1Some architectures do not have __sync_add_and_fetch_8 implemented.
2
3MIPS (32-bit) and some PPC systems do not have sync_add_and_fetch_8.
4
5Provide an alternative. This alternative function is based on code from:
6 https://github.com/mongodb/libbson/blob/master/src/bson/bson-atomic.c
7
8Code is under an Apache 2.0 License.
9
10Upstream-Status: Pending
11
12Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
13
14Index: rpm-5.4.15/rpmio/bson.h
15===================================================================
16--- rpm-5.4.15.orig/rpmio/bson.h
17+++ rpm-5.4.15/rpmio/bson.h
18@@ -879,10 +879,18 @@ BSON_END_DECLS
19
20 BSON_BEGIN_DECLS
21
22+/* Some architectures do not support __sync_add_and_fetch_8 */
23+#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
24+# define __BSON_NEED_ATOMIC_64 1
25+#endif
26
27 #if defined(__GNUC__)
28 # define bson_atomic_int_add(p, v) (__sync_add_and_fetch(p, v))
29-# define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
30+#ifndef __BSON_NEED_ATOMIC_64
31+# define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
32+# else
33+ int64_t bson_atomic_int64_add (volatile int64_t *p, int64_t n);
34+# endif
35 # define bson_memory_barrier __sync_synchronize
36 #elif defined(_MSC_VER) || defined(_WIN32)
37 # define bson_atomic_int_add(p, v) (InterlockedExchangeAdd((long int *)(p), v))
38Index: rpm-5.4.15/rpmio/bson.c
39===================================================================
40--- rpm-5.4.15.orig/rpmio/bson.c
41+++ rpm-5.4.15/rpmio/bson.c
42@@ -3863,13 +3863,30 @@ _bson_context_get_oid_seq64_threadsafe (
43 #elif defined BSON_OS_WIN32
44 uint64_t seq = InterlockedIncrement64 ((int64_t *)&context->seq64);
45 #else
46- uint64_t seq = __sync_fetch_and_add_8 (&context->seq64, 1);
47+ uint64_t seq = bson_atomic_int64_add (&context->seq64, 1);
48 #endif
49
50 seq = BSON_UINT64_TO_BE (seq);
51 memcpy (&oid->bytes[4], &seq, 8);
52 }
53
54+#ifdef __BSON_NEED_ATOMIC_64
55+#include <pthread.h>
56+static pthread_mutex_t gSync64 = PTHREAD_MUTEX_INITIALIZER;
57+int64_t
58+bson_atomic_int64_add (volatile int64_t *p,
59+ int64_t n)
60+{
61+ int64_t ret;
62+
63+ pthread_mutex_lock (&gSync64);
64+ *p += n;
65+ ret = *p;
66+ pthread_mutex_unlock (&gSync64);
67+
68+ return ret;
69+}
70+#endif
71
72 /**
73 * 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 <Yuanjie.Huang@windriver.com>
10 configure.ac | 103 ++++++++++++++++++++++++++++++++++++++++++++++------------- 10 configure.ac | 103 ++++++++++++++++++++++++++++++++++++++++++++++-------------
11 1 file changed, 81 insertions(+), 22 deletions(-) 11 1 file changed, 81 insertions(+), 22 deletions(-)
12 12
13diff --git a/configure.ac b/configure.ac 13Index: rpm/configure.ac
14index 02716a0..889a425 100644 14===================================================================
15--- a/configure.ac 15--- rpm.orig/configure.ac
16+++ b/configure.ac 16+++ rpm/configure.ac
17@@ -547,8 +547,6 @@ else 17@@ -871,8 +871,6 @@ else
18 MYPATH=$PATH 18 MYPATH=$PATH
19 fi 19 fi
20 20
21-DBXY=db60 21-DBXY=db61
22- 22-
23 AC_PATH_PROG(__BASH, bash, %{_bindir}/bash, $MYPATH) 23 AC_PATH_PROG(__BASH, bash, %{_bindir}/bash, $MYPATH)
24 AC_PATH_PROG(__BZIP2, bzip2, %{_bindir}/bzip2, $MYPATH) 24 AC_PATH_PROG(__BZIP2, bzip2, %{_bindir}/bzip2, $MYPATH)
25 AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH) 25 AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH)
26@@ -560,22 +558,6 @@ AC_PATH_PROG(__CMAKE, cmake, %{_bindir}/cmake, $MYPATH) 26@@ -884,22 +882,6 @@ AC_PATH_PROG(__CMAKE, cmake, %{_bindir}/
27 AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH) 27 AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH)
28 AC_PATH_PROG(__CURL, curl, %{_bindir}/curl, $MYPATH) 28 AC_PATH_PROG(__CURL, curl, %{_bindir}/curl, $MYPATH)
29 AC_PATH_PROG(__CVS, cvs, %{_bindir}/cvs, $MYPATH) 29 AC_PATH_PROG(__CVS, cvs, %{_bindir}/cvs, $MYPATH)
@@ -46,7 +46,7 @@ index 02716a0..889a425 100644
46 AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH) 46 AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH)
47 AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH) 47 AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH)
48 AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH) 48 AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH)
49@@ -1598,13 +1580,46 @@ RPM_CHECK_LIB( 49@@ -2050,13 +2032,46 @@ RPM_CHECK_LIB(
50 50
51 dnl # Berkeley-DB & SQLite 51 dnl # Berkeley-DB & SQLite
52 DBLIBSRCS="" 52 DBLIBSRCS=""
@@ -56,7 +56,7 @@ index 02716a0..889a425 100644
56-CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}" 56-CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}"
57-RPM_CHECK_LIB( 57-RPM_CHECK_LIB(
58+CPPFLAGS_save="${CPPFLAGS}" 58+CPPFLAGS_save="${CPPFLAGS}"
59+CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-6.0" 59+CPPFLAGS="${CPPFLAGS_save}"
60+with_db_save="${with_db}" 60+with_db_save="${with_db}"
61+ 61+
62+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 62+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -69,11 +69,11 @@ index 02716a0..889a425 100644
69+]])], 69+]])],
70+[RPM_CHECK_LIB( 70+[RPM_CHECK_LIB(
71 [Berkeley-DB], [db], 71 [Berkeley-DB], [db],
72 [db-6.0], [db_create], [db.h], 72 [db-6.1], [db_create], [db.h],
73- [yes,external], [db3], 73- [yes,external], [db3],
74+ [yes,external], [db6], 74+ [yes,external], [db6],
75 [ DBLIBSRCS="$DBLIBSRCS db3.c" 75 [ DBLIBSRCS="$DBLIBSRCS db3.c"
76+ DBXY=db60 76+ DBXY=db61
77+ AM_CONDITIONAL(WITH_DB, [ true ]) 77+ AM_CONDITIONAL(WITH_DB, [ true ])
78+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ]) 78+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
79+ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then 79+ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
@@ -86,7 +86,7 @@ index 02716a0..889a425 100644
86+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ]) 86+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
87+ ])], 87+ ])],
88+[with_db="${with_db_save}" 88+[with_db="${with_db_save}"
89+ CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-5.3" 89+ CPPFLAGS="${CPPFLAGS_save}"
90+ RPM_CHECK_LIB( 90+ RPM_CHECK_LIB(
91+ [Berkeley-DB], [db], 91+ [Berkeley-DB], [db],
92+ [db-5.3], [db_create], [db.h], 92+ [db-5.3], [db_create], [db.h],
@@ -96,32 +96,32 @@ index 02716a0..889a425 100644
96 AM_CONDITIONAL(WITH_DB, [ true ]) 96 AM_CONDITIONAL(WITH_DB, [ true ])
97 AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ]) 97 AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
98 if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then 98 if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
99@@ -1616,6 +1631,11 @@ RPM_CHECK_LIB( 99@@ -2068,6 +2083,11 @@ RPM_CHECK_LIB(
100 [ AM_CONDITIONAL(WITH_DB, [ false ]) 100 [ AM_CONDITIONAL(WITH_DB, [ false ])
101 AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ]) 101 AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
102 ]) 102 ])
103+]) 103+])
104+ 104+
105+if test ".$ac_cv_lib_db_6_0_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then 105+if test ".$ac_cv_lib_db_6_1_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
106+ CPPFLAGS="${CPPFLAGS_save}" 106+ CPPFLAGS="${CPPFLAGS_save}"
107+fi 107+fi
108 108
109 dnl # Sqlite external 109 dnl # Sqlite external
110 RPM_CHECK_LIB( 110 RPM_CHECK_LIB(
111@@ -1627,10 +1647,11 @@ RPM_CHECK_LIB( 111@@ -2078,10 +2098,11 @@ RPM_CHECK_LIB(
112 [])
112 113
113 dnl # Sqlite 3.7.0.1 from db-5.1.19 114 dnl # Sqlite 3.8.3.1 from db-6.1.19
114 dnl XXX error: `db3' is already registered with AC_CONFIG_SUBDIRS. 115+if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then
115+if test ".$ac_cv_lib_db_6_0_db_create" = .yes; then
116 RPM_CHECK_LIB( 116 RPM_CHECK_LIB(
117 [Berkeley-DB (+SQLite3)], [dbsql], 117 [Berkeley-DB (+SQLite3)], [dbsql],
118 [db_sql-6.0], [sqlite3_open], [dbsql.h], 118 [db_sql-6.1], [sqlite3_open], [dbsql.h],
119- [yes,external], [db3/sql], 119- [yes,external], [db3/sql],
120+ [yes,external], [db6/sql], 120+ [yes,external], [db6/sql],
121 [ 121 [
122 AM_CONDITIONAL(WITH_DBSQL, [ true ]) 122 AM_CONDITIONAL(WITH_DBSQL, [ true ])
123 AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library]) 123 AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library])
124@@ -1644,12 +1665,50 @@ RPM_CHECK_LIB( 124@@ -2095,12 +2116,50 @@ RPM_CHECK_LIB(
125 ], [ 125 ], [
126 AM_CONDITIONAL(WITH_DBSQL, [ false ]) 126 AM_CONDITIONAL(WITH_DBSQL, [ false ])
127 ]) 127 ])
@@ -172,6 +172,3 @@ index 02716a0..889a425 100644
172 AC_ARG_WITH(db-largefile, AS_HELP_STRING([--with-db-largefile], [build Berkeley-DB with LARGEFILE support])) 172 AC_ARG_WITH(db-largefile, AS_HELP_STRING([--with-db-largefile], [build Berkeley-DB with LARGEFILE support]))
173 AC_ARG_WITH(db-mutex, AS_HELP_STRING([--with-db-mutex=ARG], [build Berkeley-DB with MUTEX type ARG])) 173 AC_ARG_WITH(db-mutex, AS_HELP_STRING([--with-db-mutex=ARG], [build Berkeley-DB with MUTEX type ARG]))
174 174
175--
1762.6.2
177
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 @@
1Set the DB 6 version to match oe-core db 6.0.30
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7Index: rpm/configure.ac
8===================================================================
9--- rpm.orig/configure.ac
10+++ rpm/configure.ac
11@@ -2049,10 +2049,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
12 ]])],
13 [RPM_CHECK_LIB(
14 [Berkeley-DB], [db],
15- [db-6.1], [db_create], [db.h],
16+ [db-6.0], [db_create], [db.h],
17 [yes,external], [db6],
18 [ DBLIBSRCS="$DBLIBSRCS db3.c"
19- DBXY=db61
20+ DBXY=db60
21 AM_CONDITIONAL(WITH_DB, [ true ])
22 AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
23 if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
24@@ -2085,7 +2085,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
25 ])
26 ])
27
28-if test ".$ac_cv_lib_db_6_1_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
29+if test ".$ac_cv_lib_db_6_0_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
30 CPPFLAGS="${CPPFLAGS_save}"
31 fi
32
33@@ -2097,11 +2097,11 @@ RPM_CHECK_LIB(
34 [ DBLIBSRCS="$DBLIBSRCS sqlite.c" ],
35 [])
36
37-dnl # Sqlite 3.8.3.1 from db-6.1.19
38-if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then
39+dnl # Sqlite 3.8.3.1 from db-6.0.30
40+if test ".$ac_cv_lib_db_6_0_db_create" = .yes; then
41 RPM_CHECK_LIB(
42 [Berkeley-DB (+SQLite3)], [dbsql],
43- [db_sql-6.1], [sqlite3_open], [dbsql.h],
44+ [db_sql-6.0], [sqlite3_open], [dbsql.h],
45 [yes,external], [db6/sql],
46 [
47 AM_CONDITIONAL(WITH_DBSQL, [ true ])
48@@ -2253,7 +2253,7 @@ AC_SUBST(WITH_RUBY_CPPFLAGS)
49 AC_SUBST(WITH_RUBY_SUBDIR)
50 AC_SUBST(WITH_RUBY_VENDORARCHDIR)
51
52-dnl # Java prerequisites (swiped from db-6.1.19/dist/aclocal_java et al)
53+dnl # Java prerequisites (swiped from db-6.0.30/dist/aclocal_java et al)
54 WITH_JAVA=no
55 AC_ARG_WITH([java],
56 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 @@
1From 70d881873b443c9bad502db9665595455d4f0ac9 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Tue, 8 Jul 2014 07:41:10 +0800
4Subject: [PATCH] configure.ac: disable -Wno-override-init
5
6Fixed rpm-native.do_configure error on CentOS 5.x:
7
8cc1: error: unrecognized command line option "-Wno-override-init"
9
10Upstream-Status: Pending
11
12Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
13---
14 configure.ac | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/configure.ac b/configure.ac
18index adeffe0..6746b4c 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -163,7 +163,7 @@ AC_ARG_ENABLE(build-warnings,
22 # XXX gcc-4.2 on Mac OS X hasn't
23 # CFLAGS="$CFLAGS -Wno-unused-but-set-variable"
24 # XXX rpmio/set.c needs this
25- CFLAGS="$CFLAGS -Wno-override-init"
26+# CFLAGS="$CFLAGS -Wno-override-init"
27 elif test ".`$CC -V 2>&1 | grep 'Sun C'`" != .; then
28 dnl # Sun Studio (usually "cc")
29 CFLAGS="$CFLAGS -v"
30--
311.8.2.1
32
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 @@
1Make security switches manual settings
2
3RPM checks for the availability of the stack protector switch and
4transactional-memory support. If supported it unconditionally
5enables the compiler options which can cause errors if the support has
6not been built into the compiler.
7
8Upstream-Status: Inappropriate [configuration]
9
10Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
11
12Index: rpm-5.4.15/configure.ac
13===================================================================
14--- rpm-5.4.15.orig/configure.ac
15+++ rpm-5.4.15/configure.ac
16@@ -425,7 +425,7 @@ dnl # rpm_CFLAGS_ADD([-fstack-arrays],[
17 dnl # build RPM instrumented for extra optimization/security (GCC only)
18 dnl # --- other optimizations
19 rpm_CFLAGS_ADD([-fexceptions], [RPM_CFLAGS])
20- rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
21+dnl rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
22 dnl # rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
23
24 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 @@
1rpmio: Disable building of the tblake2 test(s).
2
3There is some type of a dependency fault here that can occasionally result in:
4
5gcc: error: tblake2b.o: No such file or directory
6or
7gcc: error: tblake2bp.o: No such file or directory
8
9These items are simply test cases that are not packaged, so they can be
10safely disabled to resolve the dependency issue.
11
12Upstream-Status: Inappropriate [workaround]
13
14Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
15
16Index: rpm-5.4.15/rpmio/Makefile.am
17===================================================================
18--- rpm-5.4.15.orig/rpmio/Makefile.am
19+++ rpm-5.4.15/rpmio/Makefile.am
20@@ -29,7 +29,7 @@ EXTRA_PROGRAMS += bsdiff bspatch pcrsed
21 tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \
22 dumpasn1 lookup3 trel twitter github tmicrojson duk
23
24-noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
25+#noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
26 if WITH_LIBGIT2
27 noinst_PROGRAMS += tgit
28 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 @@
1Fix an issue where parseEmbedded is not defined, but is still used.
2
3Upstream-Status: Pending
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7Index: rpm/rpmio/macro.c
8===================================================================
9--- rpm.orig/rpmio/macro.c
10+++ rpm/rpmio/macro.c
11@@ -1616,8 +1616,6 @@ exit:
12 * @retval *avp invocation args
13 * @return script string
14 */
15-#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)
16-
17 static char _FIXME_embedded_interpreter_eval_returned_null[] =
18 "FIXME: embedded interpreter eval returned null.";
19
20@@ -1668,7 +1666,6 @@ bingo:
21 script[nb] = '\0';
22 return script;
23 }
24-#endif
25
26 /**
27 * 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 @@
1configure.ac: Check if the current compiler supports the transactions
2
3Some distributions appear to have compilers that are built without support
4for transactions, even though they are GCC 4.7 or newer.
5
6Upstream-Status: Pending
7
8Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
9
10Index: rpm-5.4.15/configure.ac
11===================================================================
12--- rpm-5.4.15.orig/configure.ac
13+++ rpm-5.4.15/configure.ac
14@@ -425,9 +425,34 @@ dnl # --- other optimizations
15 rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
16 dnl # rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
17
18- if test \( ".`$CC --version 2>&1 | grep 'GCC'`" != . \); then
19- rpm_CFLAGS_ADD([-fgnu-tm], [RPM_CFLAGS])
20- fi
21+dnl # Check if the current gcc supports -fgnu-tm and __transaction_atomic
22+AC_MSG_CHECKING([If the compiler supports __transaction_atomic])
23+save_CFLAGS="$CFLAGS"
24+save_LDFLAGS="$LDFLAGS"
25+CFLAGS="${CFLAGS} -fgnu-tm -litm"
26+LDFLAGS="${LDFLAGS} -litm"
27+AC_LINK_IFELSE([AC_LANG_SOURCE([[
28+int
29+main()
30+{
31+#if !__clang__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)) /* XXX gud enuf? */
32+ int i = 0;
33+ __transaction_atomic { i++; }
34+#else
35+# error Compiler does not support __transaction_atomic
36+#endif
37+ return 0;
38+}
39+]])], [
40+ AC_DEFINE([HAVE_GNUC_TM_ATOMIC], [1],
41+ [Define to 1 if the compiler supports __transaction_atomic.])
42+ AC_MSG_RESULT([yes])
43+], [
44+ CFLAGS="$save_CFLAGS"
45+ LDFLAGS="$save_LDFLAGS"
46+ AC_MSG_RESULT([no])
47+])
48+
49
50 dnl # --- options below are added to RPM_CFLAGS but _NOT_ added to CFLAGS
51 CPPFLAGS="$CPPFLAGS $RPM_CPPFLAGS"
52Index: rpm-5.4.15/rpmio/rpmutil.h
53===================================================================
54--- rpm-5.4.15.orig/rpmio/rpmutil.h
55+++ rpm-5.4.15/rpmio/rpmutil.h
56@@ -105,7 +105,7 @@
57 # define RPM_GNUC_INTERNAL
58 #endif
59
60-#if !__clang__ && __GNUC__ == 4 && __GNUC_MINOR__ >= 7 /* XXX gud enuf? */
61+#ifdef HAVE_GNUC_TM_ATOMIC
62 # define RPM_GNUC_TM_SAFE __attribute__((transaction_safe))
63 # define RPM_GNUC_TM_PURE __attribute__((transaction_pure))
64 # 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 @@
1rpm - rpmio/keccak.c: make SSE/MMX dependent upon gcc config
2
3Upstream-Status: Pending
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7Index: rpm-5.4.15/rpmio/keccak.c
8===================================================================
9--- rpm-5.4.15.orig/rpmio/keccak.c
10+++ rpm-5.4.15/rpmio/keccak.c
11@@ -17,9 +17,13 @@ http://keccak.noekeon.org/
12 #if OPTIMIZED == 64
13 /* ===== "KeccakOpt64-settings.h" */
14 #define Unrolling 18
15-//#define UseBebigokimisa
16-#define UseSSE
17-//#define UseMMX
18+#if defined(__SSE2__)
19+ #define UseSSE
20+#elif defined(__MMX__)
21+ #define UseMMX
22+#else
23+ #define UseBebigokimisa
24+#endif
25 /* ===== */
26 #endif
27
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 @@
1Lua 'print' statement is not working properly inside of RPM 5
2
3The print statement should capture the output and send it to the script
4processing engine, and not display it directly to the screen.
5
6This patch is from: http://rpm5.org/cvs/patchset?cn=17671
7
8Upstream-Status: backport (patchset 17671 from rpm5.org)
9
10Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
11
12Index: rpm-5.4.14/CHANGES
13===================================================================
14--- rpm-5.4.14.orig/CHANGES
15+++ rpm-5.4.14/CHANGES
16@@ -1,3 +1,4 @@
17+ - jbj: lua: fix: resurrect output capture with lua-5.2.
18 - jbj: verify: fix: broken logic for %ghost avoidance (Mark Hatle).
19
20 5.4.13 -> 5.4.14:
21Index: rpm-5.4.14/rpmio/rpmlua.c
22===================================================================
23--- rpm-5.4.14.orig/rpmio/rpmlua.c
24+++ rpm-5.4.14/rpmio/rpmlua.c
25@@ -175,7 +175,7 @@ rpmlua rpmluaNew(void)
26 };
27 /*@=readonlytrans =nullassign @*/
28 /*@observer@*/ /*@unchecked@*/
29- const luaL_Reg *lib = lualibs;
30+ const luaL_Reg *lib;
31 char *path_buf;
32 char *path_next;
33 char *path;
34@@ -190,31 +190,34 @@ rpmlua rpmluaNew(void)
35
36 luaL_openlibs(L);
37
38- for (; lib->name; lib++) {
39+ for (lib = lualibs; lib->name; lib++) {
40 luaL_requiref(L, lib->name, lib->func, 1);
41+ lua_pop(L, 1);
42 }
43
44 { const char * _lua_path = rpmGetPath(rpmluaPath, NULL);
45 if (_lua_path != NULL) {
46+#if defined(LUA_GLOBALSINDEX)
47 lua_pushliteral(L, "LUA_PATH");
48 lua_pushstring(L, _lua_path);
49+ lua_rawset(L, LUA_GLOBALSINDEX);
50+#else
51+ lua_pushstring(L, _lua_path);
52+ lua_setglobal(L, "LUA_PATH");
53+#endif
54 _lua_path = _free(_lua_path);
55 }
56 }
57
58 #if defined(LUA_GLOBALSINDEX)
59- lua_rawset(L, LUA_GLOBALSINDEX);
60-#else
61- lua_pushglobaltable(L);
62-#endif
63 lua_pushliteral(L, "print");
64 lua_pushcfunction(L, rpm_print);
65-
66-#if defined(LUA_GLOBALSINDEX)
67 lua_rawset(L, LUA_GLOBALSINDEX);
68 #else
69- lua_pushglobaltable(L);
70+ lua_pushcfunction(L, rpm_print);
71+ lua_setglobal(L, "print");
72 #endif
73+
74 rpmluaSetData(lua, "lua", lua);
75
76 /* load all standard RPM Lua script files */
77@@ -351,6 +354,9 @@ void rpmluaSetVar(rpmlua _lua, rpmluav v
78 #if defined(LUA_GLOBALSINDEX)
79 if (lua->pushsize == 0)
80 lua_pushvalue(L, LUA_GLOBALSINDEX);
81+#else
82+ if (lua->pushsize == 0)
83+ lua_pushglobaltable(L);
84 #endif
85 if (pushvar(L, var->keyType, &var->key) != -1) {
86 if (pushvar(L, var->valueType, &var->value) != -1)
87@@ -1039,14 +1045,15 @@ static int rpm_print (lua_State *L)
88 lua_getglobal(L, "tostring");
89 for (i = 1; i <= n; i++) {
90 const char *s;
91+ size_t l;
92 lua_pushvalue(L, -1); /* function to be called */
93 lua_pushvalue(L, i); /* value to print */
94 lua_call(L, 1, 1);
95- s = lua_tostring(L, -1); /* get result */
96+ s = lua_tolstring(L, -1, &l); /* get result */
97 if (s == NULL)
98 return luaL_error(L, "`tostring' must return a string to `print'");
99 if (lua->storeprint) {
100- size_t sl = lua_rawlen(L, -1);
101+ size_t sl = l;
102 if ((size_t)(lua->printbufused+sl+1) > lua->printbufsize) {
103 lua->printbufsize += sl+512;
104 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.
12 12
13Signed-off-by: yzhu1 <yanjun.zhu@windriver.com> 13Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
14Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 14Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
15--- a/macros/macros.in 15Index: rpm/macros/macros.in
16+++ b/macros/macros.in 16===================================================================
17@@ -546,8 +546,8 @@ $_arbitrary_tags_tests Foo:Bar 17--- rpm.orig/macros/macros.in
18+++ rpm/macros/macros.in
19@@ -563,10 +563,10 @@ $_arbitrary_tags_tests Foo:Bar
20
18 # Horowitz Key Protocol server configuration 21 # Horowitz Key Protocol server configuration
19 # 22 #
23-%_hkp_keyserver hkp://keys.rpm5.org
24+#%_hkp_keyserver hkp://keys.rpm5.org
20 #%_hkp_keyserver hkp://keys.n3npq.net 25 #%_hkp_keyserver hkp://keys.n3npq.net
21-%_hkp_keyserver hkp://pool.sks-keyservers.net 26 #%_hkp_keyserver hkp://pool.sks-keyservers.net
22-%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search= 27-%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=
23+#%_hkp_keyserver hkp://pool.sks-keyservers.net
24+#%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search= 28+#%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=
25 29
26 30
27 %_nssdb_path /etc/pki/nssdb 31 # 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 @@
1Fix errors when building with sasl2 disabled
2
3Upstream-Status: Pending
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7Index: rpm/rpmio/mongoc.c
8===================================================================
9--- rpm.orig/rpmio/mongoc.c
10+++ rpm/rpmio/mongoc.c
11@@ -39,8 +39,10 @@
12 # include <winerror.h>
13 #endif
14
15+#ifdef HAVE_LIBSASL2
16 #include <sasl/sasl.h>
17 #include <sasl/saslutil.h>
18+#endif
19
20 #include <openssl/bio.h>
21 #include <openssl/ssl.h>
22@@ -14228,6 +14230,7 @@ mongoc_read_prefs_copy (const mongoc_rea
23 return ret;
24 }
25
26+#ifdef MONGOC_ENABLE_SASL
27 /*==============================================================*/
28 /* --- mongoc-sasl.c */
29
30@@ -14555,6 +14558,7 @@ _mongoc_sasl_step (mongoc_sasl_t *sasl,
31
32 return true;
33 }
34+#endif
35
36 /*==============================================================*/
37 /* --- mongoc-socket.c */
38Index: rpm/rpmio/mongoc.h
39===================================================================
40--- rpm.orig/rpmio/mongoc.h
41+++ rpm/rpmio/mongoc.h
42@@ -38,8 +38,10 @@
43 # include <sys/un.h>
44 #endif
45
46+#ifdef HAVE_LIBSASL2
47 #include <sasl/sasl.h>
48 #include <sasl/saslutil.h>
49+#endif
50
51 #include <openssl/bio.h>
52 #include <openssl/ssl.h>
53@@ -2455,6 +2457,8 @@ BSON_END_DECLS
54 /*==============================================================*/
55 /* --- mongoc-sasl-private.h */
56
57+#ifdef MONGOC_ENABLE_SASL
58+
59 BSON_BEGIN_DECLS
60
61
62@@ -2498,6 +2502,7 @@ bool _mongoc_sasl_step (mong
63
64
65 BSON_END_DECLS
66+#endif
67
68 /*==============================================================*/
69 /* --- 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
124 } 124 }
125 125
126 ui32 = fl->totalFileSize; 126 ui32 = fl->totalFileSize;
127Index: rpm-5.4.14/lib/fsm.c
128===================================================================
129--- rpm-5.4.14.orig/lib/fsm.c
130+++ rpm-5.4.14/lib/fsm.c
131@@ -904,6 +904,7 @@ int fsmMapAttrs(IOSM_t fsm)
132
133 if (fi && i >= 0 && i < (int) fi->fc) {
134 mode_t perms = (S_ISDIR(st->st_mode) ? fi->dperms : fi->fperms);
135+ ino_t finalInode = (fi->finodes ? (ino_t)fi->finodes[i] : 0);
136 mode_t finalMode = (fi->fmodes ? (mode_t)fi->fmodes[i] : perms);
137 dev_t finalRdev = (dev_t)(fi->frdevs ? fi->frdevs[i] : 0);
138 rpmuint32_t finalMtime = (fi->fmtimes ? fi->fmtimes[i] : 0);
139@@ -943,6 +944,7 @@ int fsmMapAttrs(IOSM_t fsm)
140 if ((S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode))
141 && st->st_nlink == 0)
142 st->st_nlink = 1;
143+ st->st_ino = finalInode;
144 st->st_rdev = finalRdev;
145 st->st_mtime = finalMtime;
146 }
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]
9 9
10Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 10Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
11 11
12Index: rpm-5.4.14/scripts/pkgconfigdeps.sh 12Index: rpm/scripts/pkgconfigdeps.sh
13=================================================================== 13===================================================================
14--- rpm-5.4.14.orig/scripts/pkgconfigdeps.sh 14--- rpm.orig/scripts/pkgconfigdeps.sh
15+++ rpm-5.4.14/scripts/pkgconfigdeps.sh 15+++ rpm/scripts/pkgconfigdeps.sh
16@@ -18,8 +18,8 @@ case $1 in 16@@ -18,8 +18,8 @@ case $1 in
17 *.pc) 17 *.pc)
18 # Query the dependencies of the package. 18 # Query the dependencies of the package.
19 DIR=`dirname ${filename}` 19 DIR=$(dirname ${filename})
20- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" 20- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
21- export PKG_CONFIG_PATH 21- export PKG_CONFIG_PATH
22+ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig" 22+ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
@@ -27,7 +27,7 @@ Index: rpm-5.4.14/scripts/pkgconfigdeps.sh
27@@ -42,8 +42,8 @@ case $1 in 27@@ -42,8 +42,8 @@ case $1 in
28 [ -n "$oneshot" ] && echo "$oneshot"; oneshot="" 28 [ -n "$oneshot" ] && echo "$oneshot"; oneshot=""
29 # Query the dependencies of the package. 29 # Query the dependencies of the package.
30 DIR=`dirname ${filename}` 30 DIR=$(dirname ${filename})
31- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" 31- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
32- export PKG_CONFIG_PATH 32- export PKG_CONFIG_PATH
33+ PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig" 33+ 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
11 11
12Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 12Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
13 13
14Index: rpm-5.4.14/python/rpmmodule.c 14Index: rpm/python/rpmmodule.c
15=================================================================== 15===================================================================
16--- rpm-5.4.14.orig/python/rpmmodule.c 16--- rpm.orig/python/rpmmodule.c
17+++ rpm-5.4.14/python/rpmmodule.c 17+++ rpm/python/rpmmodule.c
18@@ -392,7 +392,8 @@ void init_rpm(void) 18@@ -382,9 +382,8 @@ static int initModule(PyObject *m)
19 if (Py_AtExit(rpm_exithook) == -1) 19 /* XXX add --noparentdirs --nolinktos to rpmtsCheck() */
20 return; 20 global_depFlags = (RPMDEPS_FLAG_NOPARENTDIRS | RPMDEPS_FLAG_NOLINKTOS);
21 21
22- rpmReadConfigFiles(NULL, NULL); 22- /* failure to initialize rpm (crypto and all) is rather fatal too... */
23- if (rpmReadConfigFiles(NULL, NULL) == -1)
24- return 0;
23+ const char *argv[1] = {"rpmmodule", 0}; 25+ const char *argv[1] = {"rpmmodule", 0};
24+ rpmcliInit(1, argv, NULL); 26+ rpmcliInit(1, argv, NULL);
25 27
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 @@
1rpm/python: The RPM5 API requires a hdrNum to be passed in
2
3The former behavior of passing in -1 as the hdrNum resulting in erase
4operations that did not complete, but also did not error. Changing to
5using the header instance resolves this problem.
6
7Upstream-Status: Pending
8
9Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
10
11Index: rpm-5.4.15/python/rpmts-py.c
12===================================================================
13--- rpm-5.4.15.orig/python/rpmts-py.c
14+++ rpm-5.4.15/python/rpmts-py.c
15@@ -241,12 +241,19 @@ static PyObject *
16 rpmts_AddErase(rpmtsObject * s, PyObject * args)
17 {
18 Header h;
19+ uint32_t hdrNum;
20
21 if (!PyArg_ParseTuple(args, "O&:AddErase", hdrFromPyObject, &h))
22 return NULL;
23
24-SPEW((stderr, "*** %s(%p,%p) ts %p\n", __FUNCTION__, s, h, s->ts));
25+ hdrNum = headerGetInstance(h);
26+
27+SPEW((stderr, "*** %s(%p,%p) ts %p hdrNum %ld\n", __FUNCTION__, s, h, s->ts, hdrNum));
28+#ifdef REFERENCE /* this doesn't work, RPM5 requires a unique hdrNum */
29 return PyBool_FromLong(rpmtsAddEraseElement(s->ts, h, -1) == 0);
30+#else
31+ return PyBool_FromLong(rpmtsAddEraseElement(s->ts, h, hdrNum) == 0);
32+#endif
33 }
34
35 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 @@
1Fix an issue where the PACKAGEORIGIN is not properly stored.
2
3Restore the rpmtsCallback fdSetOpen call and related code.
4
5Upstream-Status: Pending
6
7Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
8
9Index: rpm/python/rpmts-py.c
10===================================================================
11--- rpm.orig/python/rpmts-py.c
12+++ rpm/python/rpmts-py.c
13@@ -672,6 +672,8 @@ rpmtsCallback(const void * hd, const rpm
14 Header h = (Header) hd;
15 struct rpmtsCallbackType_s * cbInfo = data;
16 PyObject * pkgObj = (PyObject *) pkgKey;
17+ PyObject * oh = NULL;
18+ const char * origin = NULL;
19 PyObject * args, * result;
20 static FD_t fd;
21
22@@ -693,8 +695,16 @@ rpmtsCallback(const void * hd, const rpm
23 pkgObj = Py_None;
24 Py_INCREF(pkgObj);
25 }
26- } else
27+ } else {
28 Py_INCREF(pkgObj);
29+ /* XXX yum has (h, rpmloc) tuple as pkgKey. Extract the path. */
30+ if (!(PyTuple_Check(pkgObj) && PyArg_ParseTuple(pkgObj, "|Os", &oh, &origin)))
31+ origin = NULL;
32+ /* XXX clean up the path, yum paths start "//..." */
33+ if (origin && origin[0] == '/' && origin[1] == '/')
34+ origin++;
35+ }
36+
37
38 PyEval_RestoreThread(cbInfo->_save);
39
40@@ -723,6 +733,9 @@ SPEW((stderr, "\t%p = fdDup(%d)\n", fd,
41
42 fcntl(Fileno(fd), F_SETFD, FD_CLOEXEC);
43
44+ if (origin != NULL)
45+ (void) fdSetOpen(fd, origin, 0, 0);
46+
47 return fd;
48 } else
49 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 @@
1rpm-python-module: Change the extension tag from PyCObject to PyInt
2
3Use the tagValue to determine the custom PyInt value to use for the extension
4tag. Without this, any custom tag extensions will be returned in a format
5that the tagNumFromPyObject and related functions like hdr_subscript will
6failed to process. Usually the failure is error: expected a string or integer
7
8Upstream-Status: Pending
9
10Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
11
12Index: rpm-5.4.15/python/rpmmodule.c
13===================================================================
14--- rpm-5.4.15.orig/python/rpmmodule.c
15+++ rpm-5.4.15/python/rpmmodule.c
16@@ -316,7 +316,7 @@ static void addRpmTags(PyObject *module)
17 {
18 if (ext->name == NULL || ext->type != HEADER_EXT_TAG)
19 continue;
20- PyDict_SetItemString(d, (char *) ext->name, to=PyCObject_FromVoidPtr((void *)ext, NULL));
21+ PyDict_SetItemString(d, (char *) ext->name, to=PyInt_FromLong(tagValue(ext->name)));
22 Py_XDECREF(to);
23 PyDict_SetItem(dict, to, o=PyString_FromString(ext->name + 7));
24 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 @@
1Index: rpm-5.4.14/syck/lib/syck.h
2===================================================================
3--- rpm-5.4.14.orig/syck/lib/syck.h
4+++ rpm-5.4.14/syck/lib/syck.h
5@@ -621,9 +621,6 @@ long syck_seq_count( SyckNode *seq )
6 */
7 void syckerror( char *msg )
8 /*@*/;
9-int syckparse( void * )
10- /*@globals fileSystem @*/
11- /*@modifies fileSystem @*/;
12 /* XXX union YYSTYPE *sycklval has issues on Mac OS X. */
13 int sycklex( void *_sycklval, SyckParser *parser )
14 /*@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 @@
1Disable various items that do not cross compile well.
2
3Upstream-Status: Inappropriate [Configuration]
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7Index: rpm/rpmdb/Makefile.am
8===================================================================
9--- rpm.orig/rpmdb/Makefile.am
10+++ rpm/rpmdb/Makefile.am
11@@ -34,10 +34,10 @@ EXTRA_DIST = \
12 db3.c sqlite.c db_emu.h librpmdb.vers bdb.sql libsqldb.c \
13 logio.awk logio.src logio_recover_template logio_template logio.c \
14 logio_rec.c logio_auto.c logio_autop.c logio_auto.h \
15- qf.l qf.y qf.inp tqf.l tqf.y tqf.inp grammar.y scanner.l json1.js
16+ tqf.l tqf.y tqf.inp grammar.y scanner.l json1.js
17
18-EXTRA_PROGRAMS = qfcalc qfgraph logio tjfn tqf # tbdb
19-noinst_PROGRAMS = json
20+EXTRA_PROGRAMS = qfcalc qfgraph logio # tjfn tqf tbdb
21+noinst_PROGRAMS = # json
22
23 RPMMISC_LDADD_COMMON = \
24 $(top_builddir)/misc/librpmmisc.la \
25@@ -321,54 +321,39 @@ BUILT_SOURCES += .syntastic_c_config
26 .syntastic_c_config: Makefile
27 @echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
28
29-tjfn_SOURCES = tjfn.c
30-tjfn_LDADD = $(mylibs)
31-
32-LEX = flex
33-LFLAGS= -d -T -v -8 -b --yylineno --reentrant --bison-bridge --perf-report
34-YACC = bison
35-YFLAGS= -Dapi.pure -t -d -v --report=all
36-
37-BUILT_SOURCES += Jgrammar.c Jgrammar.h Jscanner.c
38-Jgrammar.c: grammar.y
39- $(YACC) $(YFLAGS) -o $@ $<
40-Jscanner.c: scanner.l
41- $(LEX) -R -o $@ $<
42-json_SOURCES = Jgrammar.c Jscanner.c json.c
43-
44-testjson: json1.js json
45- ./json json1.js
46-
47-BUILT_SOURCES += Qgrammar.c Qgrammar.h Qscanner.c
48-Qgrammar.c: qf.y
49- $(YACC) $(YFLAGS) -o $@ $<
50-Qscanner.c: qf.l
51- $(LEX) -R -o $@ $<
52-qfcalc_SOURCES = Qgrammar.c Qscanner.c interpreter.c
53-qfgraph_SOURCES = Qgrammar.c Qscanner.c graph.c
54-
55-testqf: qfcalc qfgraph
56- ./qfcalc < qf.inp
57- ./qfgraph < qf.inp
58-
59-BUILT_SOURCES += Tgrammar.c Tgrammar.h Tscanner.c
60-Tgrammar.c Tgrammar.h: tqf.y
61- $(YACC) $(YFLAGS) -o $@ $<
62-Tscanner.c Tscanner.h: tqf.l
63- $(LEX) --prefix="Tyy" $(LFLAGS) -o $@ $<
64-tqf_SOURCES = Tgrammar.c Tscanner.c tgraph.c
65-tqf_CFLAGS = $(CFLAGS) -fsanitize=address # -DTSCANNER_MAIN
66-tqf_LDADD = ../lib/librpm.la \
67- ./librpmdb.la \
68- ../popt/libpopt.la
69-
70-testdir = $(abs_top_builddir)/tests
71-foo: tqf
72- -../libtool --mode=execute \
73- ./tqf \
74- --dbpath=$(testdir) \
75- -r $(testdir)/fodder/*.rpm \
76- $(testdir)/fodder/fmtmod.qf
77+#tjfn_SOURCES = tjfn.c
78+#tjfn_LDADD = $(mylibs)
79+#
80+#LFLAGS= -d -T -v -8 -b --yylineno --reentrant --bison-bridge --perf-report
81+#
82+#BUILT_SOURCES += Jgrammar.c Jgrammar.h Jscanner.c
83+#Jgrammar.c Jgrammar.h: grammar.y
84+# $(YACC) $(YFLAGS) -t -d -v -o $@ $<
85+#Jscanner.c: scanner.l
86+# $(LEX) -R -o $@ $<
87+#json_SOURCES = Jgrammar.c Jscanner.c json.c
88+#
89+#testjson: json1.js json
90+# ./json json1.js
91+#
92+#BUILT_SOURCES += Tgrammar.c Tgrammar.h Tscanner.c
93+#Tgrammar.c Tgrammar.h: tqf.y
94+# $(YACC) $(YFLAGS) -t -d -v -o $@ $<
95+#Tscanner.c Tscanner.h: tqf.l
96+# $(LEX) --prefix="Tyy" $(LFLAGS) -o $@ $<
97+#tqf_SOURCES = Tgrammar.c Tscanner.c tgraph.c
98+#tqf_CFLAGS = $(CFLAGS) -fsanitize=address # -DTSCANNER_MAIN
99+#tqf_LDADD = ../lib/librpm.la \
100+# ./librpmdb.la \
101+# ../popt/libpopt.la
102+
103+#testdir = $(abs_top_builddir)/tests
104+#foo: tqf
105+# -../libtool --mode=execute \
106+# ./tqf \
107+# --dbpath=$(testdir) \
108+# -r $(testdir)/fodder/*.rpm \
109+# $(testdir)/fodder/fmtmod.qf
110
111 #tbdb_SOURCES = tbdb.c bdb.c
112 #tbdb_LDADD = $(mylibs)
113Index: rpm/configure.ac
114===================================================================
115--- rpm.orig/configure.ac
116+++ rpm/configure.ac
117@@ -119,6 +119,7 @@ AC_PROG_MAKE_SET
118 AC_PROG_LIBTOOL
119 AC_PROG_RANLIB
120 AC_PROG_YACC
121+AM_PROG_LEX
122
123 AC_PATH_PROG(AS, as, as)
124
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 @@
1Fix a typo in the rpmio Makefile.am
2
3Upstream-Status: Pending
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7Index: rpm/rpmio/Makefile.am
8===================================================================
9--- rpm.orig/rpmio/Makefile.am
10+++ rpm/rpmio/Makefile.am
11@@ -121,7 +121,7 @@ luaLPATHdir = ${pkgsharedir)/lua
12
13 pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
14 pkginc_HEADERS = argv.h mire.h rpmzlog.h yarn.h \
15- rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h
16+ rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h \
17 rpmpgp.h rpmsw.h rpmutil.h
18 noinst_HEADERS = \
19 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 @@
1rpmpgp.c: Add missing if defs around crypto implementations
2
3Without these, the system will error trying to find the correct crypto
4library to use.
5
6Upstream-Status: Pending
7
8Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
9
10Index: rpm/rpmio/rpmpgp.c
11===================================================================
12--- rpm.orig/rpmio/rpmpgp.c
13+++ rpm/rpmio/rpmpgp.c
14@@ -1339,16 +1339,26 @@ int pgpExportPubkey(pgpDig dig)
15 {
16 int rc = 0; /* assume failure */
17
18+#if defined(WITH_BEECRYPT)
19 if (pgpImplVecs == &rpmbcImplVecs)
20 rc = rpmbcExportPubkey(dig);
21+#endif
22+#if defined(WITH_SSL)
23 if (pgpImplVecs == &rpmsslImplVecs)
24 rc = rpmsslExportPubkey(dig);
25+#endif
26+#if defined(WITH_NSS)
27 if (pgpImplVecs == &rpmnssImplVecs)
28 rc = rpmnssExportPubkey(dig);
29+#endif
30+#if defined(WITH_GCRYPT)
31 if (pgpImplVecs == &rpmgcImplVecs)
32 rc = rpmgcExportPubkey(dig);
33+#endif
34+#if defined(WITH_TOMCRYPT)
35 if (pgpImplVecs == &rpmltcImplVecs)
36 rc = rpmltcExportPubkey(dig);
37+#endif
38 return rc;
39 }
40
41@@ -1356,16 +1366,26 @@ int pgpExportSignature(pgpDig dig, DIGES
42 {
43 int rc = 0; /* assume failure */
44
45+#if defined(WITH_BEECRYPT)
46 if (pgpImplVecs == &rpmbcImplVecs)
47 rc = rpmbcExportSignature(dig, ctx);
48+#endif
49+#if defined(WITH_SSL)
50 if (pgpImplVecs == &rpmsslImplVecs)
51 rc = rpmsslExportSignature(dig, ctx);
52+#endif
53+#if defined(WITH_NSS)
54 if (pgpImplVecs == &rpmnssImplVecs)
55 rc = rpmnssExportSignature(dig, ctx);
56+#endif
57+#if defined(WITH_GCRYPT)
58 if (pgpImplVecs == &rpmgcImplVecs)
59 rc = rpmgcExportSignature(dig, ctx);
60+#endif
61+#if defined(WITH_TOMCRYPT)
62 if (pgpImplVecs == &rpmltcImplVecs)
63 rc = rpmltcExportSignature(dig, ctx);
64+#endif
65 return rc;
66 }
67
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 @@
1rpmpgp.h: We do not require the popt header in order to use rpmpgp functions
2
3This can cause failures if the internal libpopt is used, as it's header is
4not exported.
5
6Upstream-Status: Pending
7
8Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
9
10Index: rpm-5.4.14/rpmio/rpmpgp.h
11===================================================================
12--- rpm-5.4.14.orig/rpmio/rpmpgp.h
13+++ rpm-5.4.14/rpmio/rpmpgp.h
14@@ -11,11 +11,11 @@
15 */
16
17 #include <string.h>
18-#include <popt.h>
19 #include <rpmiotypes.h>
20 #include <yarn.h>
21
22 #if defined(_RPMPGP_INTERNAL)
23+#include <popt.h>
24 #include <rpmsw.h>
25
26 /*@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
12 12
13Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 13Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
14 14
15Index: rpm-5.4.14/lib/psm.c 15Index: rpm/lib/psm.c
16=================================================================== 16===================================================================
17--- rpm-5.4.14.orig/lib/psm.c 17--- rpm.orig/lib/psm.c
18+++ rpm-5.4.14/lib/psm.c 18+++ rpm/lib/psm.c
19@@ -806,6 +806,10 @@ static rpmRC runScript(rpmpsm psm, Heade 19@@ -846,6 +846,9 @@ static rpmRC runScript(rpmpsm psm, Heade
20 pid_t pid;
20 int xx; 21 int xx;
21 int i; 22 int i;
22
23+#ifdef RPM_VENDOR_OE 23+#ifdef RPM_VENDOR_OE
24+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); 24+ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
25+#endif 25+#endif
26+ 26
27 if (psm->sstates != NULL && ix >= 0 && ix < RPMSCRIPT_MAX) 27 #ifdef __clang__
28 ssp = psm->sstates + ix; 28 #pragma clang diagnostic push
29 if (ssp != NULL) 29@@ -923,14 +926,29 @@ assert(he->p.str != NULL);
30@@ -872,14 +876,29 @@ assert(he->p.str != NULL);
31 (F_ISSET(psm, UNORDERED) ? "a" : "")); 30 (F_ISSET(psm, UNORDERED) ? "a" : ""));
32 31
33 if (Phe->p.argv == NULL) { 32 if (Phe->p.argv == NULL) {
@@ -63,7 +62,7 @@ Index: rpm-5.4.14/lib/psm.c
63 ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path) 62 ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path)
64 ? 1 : 0); 63 ? 1 : 0);
65 } 64 }
66@@ -930,7 +949,12 @@ assert(he->p.str != NULL); 65@@ -981,7 +999,12 @@ assert(he->p.str != NULL);
67 goto exit; 66 goto exit;
68 67
69 if (rpmIsDebug() && 68 if (rpmIsDebug() &&
@@ -77,7 +76,7 @@ Index: rpm-5.4.14/lib/psm.c
77 { 76 {
78 static const char set_x[] = "set -x\n"; 77 static const char set_x[] = "set -x\n";
79 nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd); 78 nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
80@@ -1065,12 +1089,22 @@ assert(he->p.str != NULL); 79@@ -1116,12 +1139,22 @@ assert(he->p.str != NULL);
81 80
82 { const char * rootDir = rpmtsRootDir(ts); 81 { const char * rootDir = rpmtsRootDir(ts);
83 if (!rpmtsChrootDone(ts) && rootDir != NULL && 82 if (!rpmtsChrootDone(ts) && rootDir != NULL &&
@@ -100,7 +99,7 @@ Index: rpm-5.4.14/lib/psm.c
100 xx = Chdir("/"); 99 xx = Chdir("/");
101 rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"), 100 rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"),
102 psm->stepName, sln, NVRA, 101 psm->stepName, sln, NVRA,
103@@ -2985,6 +3019,13 @@ assert(psm->te != NULL); 102@@ -3052,6 +3085,13 @@ assert(psm->te != NULL);
104 case PSM_SCRIPT: /* Run current package scriptlets. */ 103 case PSM_SCRIPT: /* Run current package scriptlets. */
105 /* XXX running %verifyscript/%sanitycheck doesn't have psm->te */ 104 /* XXX running %verifyscript/%sanitycheck doesn't have psm->te */
106 { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL); 105 { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL);
@@ -114,7 +113,7 @@ Index: rpm-5.4.14/lib/psm.c
114 xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL); 113 xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL);
115 rc = runInstScript(psm); 114 rc = runInstScript(psm);
116 if (rc) 115 if (rc)
117@@ -2992,11 +3033,24 @@ assert(psm->te != NULL); 116@@ -3059,11 +3099,24 @@ assert(psm->te != NULL);
118 else 117 else
119 xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn); 118 xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
120 rpmtsGetRdb(ts)->db_txn = NULL; 119 rpmtsGetRdb(ts)->db_txn = NULL;
@@ -139,7 +138,7 @@ Index: rpm-5.4.14/lib/psm.c
139 break; 138 break;
140 case PSM_IMMED_TRIGGERS: 139 case PSM_IMMED_TRIGGERS:
141 /* Run triggers in this package other package(s) set off. */ 140 /* Run triggers in this package other package(s) set off. */
142@@ -3006,7 +3060,18 @@ assert(psm->te != NULL); 141@@ -3073,7 +3126,18 @@ assert(psm->te != NULL);
143 F_SET(psm, GOTTRIGGERS); 142 F_SET(psm, GOTTRIGGERS);
144 } 143 }
145 if (psm->triggers != NULL) 144 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 @@
1Fix the syck/lib/gram.y
2
3This resolves a problem during compilation:
4
5../../../rpm/syck/lib/gram.y:66:27: error: 'parser' undeclared (first use in this function)
6 ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, $1 );
7 ^
8../../../rpm/syck/lib/gram.y:66:27: note: each undeclared identifier is reported only once for each function it appears in
9../../../rpm/syck/lib/syck.c: In function 'syck_parse':
10../../../rpm/syck/lib/syck.c:516:5: warning: implicit declaration of function 'syckparse' [-Wimplicit-function-declaration]
11 syckparse( p );
12 ^
13
14This patch was generated by reverting the grammer back to a previous
15version.
16
17Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
18
19Index: rpm/syck/lib/gram.y
20===================================================================
21--- rpm.orig/syck/lib/gram.y
22+++ rpm/syck/lib/gram.y
23@@ -9,18 +9,10 @@
24
25 %start doc
26 %pure-parser
27-%parse-param {void* parser}
28-%lex-param {void* parser}
29
30
31 %{
32
33-#define YYDEBUG 1
34-#define YYERROR_VERBOSE 1
35-#ifndef YYSTACK_USE_ALLOCA
36-#define YYSTACK_USE_ALLOCA 0
37-#endif
38-
39 #include "system.h"
40 #include "syck.h"
41 #include "debug.h"
42@@ -28,6 +20,9 @@
43 void apply_seq_in_map( SyckParser *parser, SyckNode *n )
44 /*@*/;
45
46+#define YYPARSE_PARAM parser
47+#define YYLEX_PARAM parser
48+
49 #define NULL_NODE(parser, node) \
50 SyckNode *node = syck_new_str( "", scalar_plain ); \
51 if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
52Index: rpm/syck/lib/Makefile.am
53===================================================================
54--- rpm.orig/syck/lib/Makefile.am
55+++ rpm/syck/lib/Makefile.am
56@@ -49,25 +49,25 @@ SYCK_SPLINT_SRCS = \
57 token.c \
58 implicit.c
59
60-#gram.c: gram.y
61-# $(YACC) -d -t -v -p syck -o $@ $<
62-# -@if test -f gram.c; then \
63-# { echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
64-# echo "/*@-noeffect -noeffectuncon @*/";\
65-# echo "/*@-nullassign @*/";\
66-# echo "/*@-readonlytrans @*/";\
67-# echo "/*@-uniondef @*/";\
68-# echo "/*@-warnlintcomments @*/";\
69-# cat gram.c;\
70-# echo "/*@=warnlintcomments @*/";\
71-# echo "/*@=uniondef @*/";\
72-# echo "/*@=readonlytrans @*/";\
73-# echo "/*@=nullassign @*/";\
74-# echo "/*@=noeffect =noeffectuncon @*/";\
75-# echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
76-# } > _gram.c ;\
77-# mv -f _gram.c gram.c; \
78-# fi
79+gram.c: gram.y
80+ $(YACC) -d -t -v -p syck -o $@ $<
81+ -@if test -f gram.c; then \
82+ { echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
83+ echo "/*@-noeffect -noeffectuncon @*/";\
84+ echo "/*@-nullassign @*/";\
85+ echo "/*@-readonlytrans @*/";\
86+ echo "/*@-uniondef @*/";\
87+ echo "/*@-warnlintcomments @*/";\
88+ cat gram.c;\
89+ echo "/*@=warnlintcomments @*/";\
90+ echo "/*@=uniondef @*/";\
91+ echo "/*@=readonlytrans @*/";\
92+ echo "/*@=nullassign @*/";\
93+ echo "/*@=noeffect =noeffectuncon @*/";\
94+ echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
95+ } > _gram.c ;\
96+ mv -f _gram.c gram.c; \
97+ fi
98
99 BUILT_SOURCES = gram.c gram.h
100
101Index: rpm/syck/lib/implicit.c
102===================================================================
103--- rpm.orig/syck/lib/implicit.c
104+++ rpm/syck/lib/implicit.c
105@@ -19,11 +19,6 @@
106 #define YYLIMIT limit
107 #define YYFILL(n)
108
109-#ifdef __clang__
110-#pragma clang diagnostic push
111-#pragma clang diagnostic ignored "-Wempty-body"
112-#endif
113-
114 void
115 try_tag_implicit( SyckNode *n, int taguri )
116 {
117@@ -3000,8 +2995,4 @@ yy270: ++YYCURSOR;
118
119 }
120
121-#ifdef __clang__
122-#pragma clang diagnostic pop
123-#endif
124-
125 /*@=noret@*/
126Index: rpm/syck/lib/syck.c
127===================================================================
128--- rpm.orig/syck/lib/syck.c
129+++ rpm/syck/lib/syck.c
130@@ -519,7 +519,7 @@ syck_parse( SyckParser *p )
131 }
132
133 void
134-syck_default_error_handler( SyckParser *p, const char *msg )
135+syck_default_error_handler( SyckParser *p, char *msg )
136 {
137 printf( "Error at [Line %d, Col %ld]: %s\n",
138 p->linect,
139Index: rpm/syck/lib/syck.h
140===================================================================
141--- rpm.orig/syck/lib/syck.h
142+++ rpm/syck/lib/syck.h
143@@ -175,7 +175,7 @@ typedef struct _syck_str SyckIoStr;
144 typedef struct _syck_level SyckLevel;
145
146 typedef SYMID (*SyckNodeHandler)(SyckParser *p, SyckNode *n);
147-typedef void (*SyckErrorHandler)(SyckParser *p, const char *);
148+typedef void (*SyckErrorHandler)(SyckParser *p, char *);
149 typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *p, char *);
150 typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long);
151 typedef long (*SyckIoStrRead)(char *, SyckIoStr *, long, long);
152@@ -546,7 +546,7 @@ long syck_parser_readlen( SyckParser *p,
153 SYMID syck_parse( SyckParser *p )
154 /*@globals fileSystem @*/
155 /*@modifies p, fileSystem @*/;
156-void syck_default_error_handler( SyckParser *p, const char * )
157+void syck_default_error_handler( SyckParser *p, char * )
158 /*@globals fileSystem @*/
159 /*@modifies p, fileSystem @*/;
160 SYMID syck_yaml2byte_handler( SyckParser *p, SyckNode *n )
161@@ -619,7 +619,7 @@ long syck_seq_count( SyckNode *seq )
162 /*
163 * Lexer prototypes
164 */
165-void syckerror( void *, const char *msg )
166+void syckerror( char *msg )
167 /*@*/;
168 /* XXX union YYSTYPE *sycklval has issues on Mac OS X. */
169 int sycklex( void *_sycklval, SyckParser *parser )
170Index: rpm/syck/lib/token.c
171===================================================================
172--- rpm.orig/syck/lib/token.c
173+++ rpm/syck/lib/token.c
174@@ -270,11 +270,11 @@ sycklex( void * _sycklval, SyckParser *p
175 return sycklex_yaml_utf8( sycklval, parser );
176
177 case syck_yaml_utf16:
178- syckerror( parser, "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
179+ syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
180 break;
181
182 case syck_yaml_utf32:
183- syckerror( parser, "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
184+ syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
185 break;
186
187 case syck_bytecode_utf8:
188@@ -2739,15 +2739,14 @@ syckwrap(void)
189 }
190
191 void
192-syckerror( void *p, const char *msg )
193+syckerror( char *msg )
194 {
195- SyckParser * parser = (SyckParser *)p;
196 /*@-mods@*/
197- if ( parser->error_handler == NULL )
198- parser->error_handler = syck_default_error_handler;
199+ if ( syck_parser_ptr->error_handler == NULL )
200+ syck_parser_ptr->error_handler = syck_default_error_handler;
201
202- parser->root = parser->root_on_error;
203+ syck_parser_ptr->root = syck_parser_ptr->root_on_error;
204 /*@=mods@*/
205- (parser->error_handler)(parser, msg);
206+ (syck_parser_ptr->error_handler)(syck_parser_ptr, msg);
207 }
208
209Index: rpm/syck/lib/bytecode.c
210===================================================================
211--- rpm.orig/syck/lib/bytecode.c
212+++ rpm/syck/lib/bytecode.c
213@@ -1,10 +1,10 @@
214-/* Generated by re2c 0.9.12 on Tue Mar 14 00:14:53 2006 */
215+/* Generated by re2c 0.13.5 on Tue Feb 23 12:04:00 2016 */
216 #line 1 "bytecode.re"
217 /*
218 * bytecode.re
219 *
220 * $Author: why $
221- * $Date: 2005-09-20 08:21:06 +0300 (Tue, 20 Sep 2005) $
222+ * $Date: 2005/09/20 05:21:06 $
223 *
224 * Copyright (C) 2003 why the lucky stiff
225 */
226@@ -27,14 +27,11 @@
227 #define YYLINEPTR parser->lineptr
228 #define YYLINECTPTR parser->linectptr
229 #define YYLINE parser->linect
230-#define YYFILL(n) (void) syck_parser_read(parser)
231+#define YYFILL(n) syck_parser_read(parser)
232
233-/*@unchecked@*/ /*@null@*/
234 extern SyckParser *syck_parser_ptr;
235
236-/*@null@*/
237-char *get_inline( SyckParser *parser )
238- /*@modifies parser @*/;
239+char *get_inline( SyckParser *parser );
240
241 /*
242 * Repositions the cursor at `n' offset from the token start.
243@@ -137,14 +134,12 @@ char *get_inline( SyckParser *parser )
244 */
245 int
246 sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
247- /*@globals syck_parser_ptr @*/
248- /*@modifies sycklval, parser, syck_parser_ptr @*/
249 {
250 SyckLevel *lvl;
251 syck_parser_ptr = parser;
252 if ( YYCURSOR == NULL )
253 {
254- (void) syck_parser_read( parser );
255+ syck_parser_read( parser );
256 }
257
258 if ( parser->force_token != 0 )
259@@ -171,42 +166,37 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval
260 #line 165 "<stdout>"
261 {
262 YYCTYPE yych;
263- unsigned int yyaccept = 0;
264- goto yy0;
265- /*@notreached@*/
266- ++YYCURSOR;
267-yy0:
268- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
269+
270+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
271 yych = *YYCURSOR;
272- switch(yych){
273+ switch (yych) {
274 case 0x00: goto yy2;
275 case 'D': goto yy3;
276 default: goto yy5;
277 }
278-yy2: YYCURSOR = YYMARKER;
279- switch(yyaccept){
280- case 0: goto yy4;
281- }
282-yy3: yyaccept = 0;
283+yy2:
284+ YYCURSOR = YYMARKER;
285+ goto yy4;
286+yy3:
287 yych = *(YYMARKER = ++YYCURSOR);
288- switch(yych){
289- case 0x0A: goto yy6;
290- case 0x0D: goto yy8;
291+ switch (yych) {
292+ case '\n': goto yy6;
293+ case '\r': goto yy8;
294 default: goto yy4;
295 }
296 yy4:
297 #line 199 "bytecode.re"
298-{ YYPOS(0);
299+ { YYPOS(0);
300 goto Document;
301 }
302-#line 195 "<stdout>"
303-yy5: yych = *++YYCURSOR;
304+#line 191 "<stdout>"
305+yy5:
306+ yych = *++YYCURSOR;
307 goto yy4;
308-yy6: ++YYCURSOR;
309- goto yy7;
310-yy7:
311+yy6:
312+ ++YYCURSOR;
313 #line 186 "bytecode.re"
314-{ if ( lvl->status == syck_lvl_header )
315+ { if ( lvl->status == syck_lvl_header )
316 {
317 CHK_NL(YYCURSOR);
318 goto Directive;
319@@ -218,10 +208,11 @@ yy7:
320 return 0;
321 }
322 }
323-#line 214 "<stdout>"
324-yy8: ++YYCURSOR;
325- switch((yych = *YYCURSOR)) {
326- case 0x0A: goto yy6;
327+#line 210 "<stdout>"
328+yy8:
329+ ++YYCURSOR;
330+ switch ((yych = *YYCURSOR)) {
331+ case '\n': goto yy6;
332 default: goto yy2;
333 }
334 }
335@@ -239,19 +230,15 @@ Document:
336 YYTOKEN = YYCURSOR;
337
338
339-#line 235 "<stdout>"
340+#line 232 "<stdout>"
341 {
342 YYCTYPE yych;
343- goto yy9;
344- /*@notreached@*/
345- ++YYCURSOR;
346-yy9:
347- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
348+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
349 yych = *YYCURSOR;
350- switch(yych){
351+ switch (yych) {
352 case 0x00: goto yy30;
353- case 0x0A: goto yy27;
354- case 0x0D: goto yy29;
355+ case '\n': goto yy27;
356+ case '\r': goto yy29;
357 case 'A': goto yy19;
358 case 'D': goto yy12;
359 case 'E': goto yy16;
360@@ -264,71 +251,73 @@ yy9:
361 case 'c': goto yy25;
362 default: goto yy11;
363 }
364-yy11:yy12: yych = *++YYCURSOR;
365- switch(yych){
366- case 0x0A: goto yy41;
367- case 0x0D: goto yy44;
368+yy11:
369+yy12:
370+ yych = *++YYCURSOR;
371+ switch (yych) {
372+ case '\n': goto yy41;
373+ case '\r': goto yy44;
374 default: goto yy11;
375 }
376-yy13: yych = *++YYCURSOR;
377- switch(yych){
378- case 0x0A: goto yy41;
379- case 0x0D: goto yy43;
380+yy13:
381+ yych = *++YYCURSOR;
382+ switch (yych) {
383+ case '\n': goto yy41;
384+ case '\r': goto yy43;
385 default: goto yy11;
386 }
387-yy14: yych = *++YYCURSOR;
388- switch(yych){
389- case 0x0A: goto yy38;
390- case 0x0D: goto yy40;
391+yy14:
392+ yych = *++YYCURSOR;
393+ switch (yych) {
394+ case '\n': goto yy38;
395+ case '\r': goto yy40;
396 default: goto yy11;
397 }
398-yy15: yych = *++YYCURSOR;
399- switch(yych){
400- case 0x0A: goto yy35;
401- case 0x0D: goto yy37;
402+yy15:
403+ yych = *++YYCURSOR;
404+ switch (yych) {
405+ case '\n': goto yy35;
406+ case '\r': goto yy37;
407 default: goto yy11;
408 }
409-yy16: yych = *++YYCURSOR;
410- switch(yych){
411- case 0x0A: goto yy32;
412- case 0x0D: goto yy34;
413+yy16:
414+ yych = *++YYCURSOR;
415+ switch (yych) {
416+ case '\n': goto yy32;
417+ case '\r': goto yy34;
418 default: goto yy11;
419 }
420-yy17: ++YYCURSOR;
421- goto yy18;
422-yy18:
423+yy17:
424+ ++YYCURSOR;
425 #line 288 "bytecode.re"
426-{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
427+ { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
428 goto Scalar;
429 }
430-#line 296 "<stdout>"
431-yy19: ++YYCURSOR;
432- goto yy20;
433-yy20:
434+#line 295 "<stdout>"
435+yy19:
436+ ++YYCURSOR;
437 #line 292 "bytecode.re"
438-{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
439+ { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
440 sycklval->name = get_inline( parser );
441 syck_hdlr_remove_anchor( parser, sycklval->name );
442 CHK_NL(YYCURSOR);
443 return YAML_ANCHOR;
444 }
445-#line 307 "<stdout>"
446-yy21: ++YYCURSOR;
447- goto yy22;
448-yy22:
449+#line 305 "<stdout>"
450+yy21:
451+ ++YYCURSOR;
452 #line 299 "bytecode.re"
453-{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
454+ { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
455 sycklval->name = get_inline( parser );
456 POP_LEVEL();
457 if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
458 return YAML_ALIAS;
459 }
460-#line 318 "<stdout>"
461-yy23: ++YYCURSOR;
462- goto yy24;
463-yy24:
464+#line 315 "<stdout>"
465+yy23:
466+ ++YYCURSOR;
467 #line 306 "bytecode.re"
468-{ char *qstr;
469+ { char *qstr;
470 ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
471 qstr = get_inline( parser );
472 CHK_NL(YYCURSOR);
473@@ -387,18 +376,16 @@ yy24:
474 sycklval->name = qstr;
475 return YAML_TAGURI;
476 }
477-#line 382 "<stdout>"
478-yy25: ++YYCURSOR;
479- goto yy26;
480-yy26:
481+#line 378 "<stdout>"
482+yy25:
483+ ++YYCURSOR;
484 #line 366 "bytecode.re"
485-{ goto Comment; }
486-#line 388 "<stdout>"
487-yy27: ++YYCURSOR;
488- goto yy28;
489-yy28:
490+ { goto Comment; }
491+#line 383 "<stdout>"
492+yy27:
493+ ++YYCURSOR;
494 #line 368 "bytecode.re"
495-{ CHK_NL(YYCURSOR);
496+ { CHK_NL(YYCURSOR);
497 if ( lvl->status == syck_lvl_seq )
498 {
499 return YAML_INDENT;
500@@ -410,26 +397,25 @@ yy28:
501 }
502 goto Document;
503 }
504-#line 405 "<stdout>"
505-yy29: yych = *++YYCURSOR;
506- switch(yych){
507- case 0x0A: goto yy27;
508+#line 399 "<stdout>"
509+yy29:
510+ yych = *++YYCURSOR;
511+ switch (yych) {
512+ case '\n': goto yy27;
513 default: goto yy11;
514 }
515-yy30: ++YYCURSOR;
516- goto yy31;
517-yy31:
518+yy30:
519+ ++YYCURSOR;
520 #line 381 "bytecode.re"
521-{ ENSURE_YAML_IEND(lvl, -1);
522+ { ENSURE_YAML_IEND(lvl, -1);
523 YYPOS(0);
524 return 0;
525 }
526-#line 419 "<stdout>"
527-yy32: ++YYCURSOR;
528- goto yy33;
529-yy33:
530+#line 413 "<stdout>"
531+yy32:
532+ ++YYCURSOR;
533 #line 252 "bytecode.re"
534-{ if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
535+ { if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
536 {
537 lvl->ncount++;
538 YYPOS(0);
539@@ -464,17 +450,17 @@ yy33:
540 CHK_NL(YYCURSOR);
541 return YAML_IEND;
542 }
543-#line 459 "<stdout>"
544-yy34: yych = *++YYCURSOR;
545- switch(yych){
546- case 0x0A: goto yy32;
547+#line 452 "<stdout>"
548+yy34:
549+ yych = *++YYCURSOR;
550+ switch (yych) {
551+ case '\n': goto yy32;
552 default: goto yy11;
553 }
554-yy35: ++YYCURSOR;
555- goto yy36;
556-yy36:
557+yy35:
558+ ++YYCURSOR;
559 #line 237 "bytecode.re"
560-{ int complex = 0;
561+ { int complex = 0;
562 if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
563 {
564 complex = 1;
565@@ -488,17 +474,17 @@ yy36:
566 }
567 return YAML_IOPEN;
568 }
569-#line 483 "<stdout>"
570-yy37: yych = *++YYCURSOR;
571- switch(yych){
572- case 0x0A: goto yy35;
573+#line 476 "<stdout>"
574+yy37:
575+ yych = *++YYCURSOR;
576+ switch (yych) {
577+ case '\n': goto yy35;
578 default: goto yy11;
579 }
580-yy38: ++YYCURSOR;
581- goto yy39;
582-yy39:
583+yy38:
584+ ++YYCURSOR;
585 #line 222 "bytecode.re"
586-{ int complex = 0;
587+ { int complex = 0;
588 if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
589 {
590 complex = 1;
591@@ -512,29 +498,31 @@ yy39:
592 }
593 return YAML_IOPEN;
594 }
595-#line 507 "<stdout>"
596-yy40: yych = *++YYCURSOR;
597- switch(yych){
598- case 0x0A: goto yy38;
599+#line 500 "<stdout>"
600+yy40:
601+ yych = *++YYCURSOR;
602+ switch (yych) {
603+ case '\n': goto yy38;
604 default: goto yy11;
605 }
606-yy41: ++YYCURSOR;
607- goto yy42;
608-yy42:
609+yy41:
610+ ++YYCURSOR;
611 #line 217 "bytecode.re"
612-{ ENSURE_YAML_IEND(lvl, -1);
613+ { ENSURE_YAML_IEND(lvl, -1);
614 YYPOS(0);
615 return 0;
616 }
617-#line 521 "<stdout>"
618-yy43: yych = *++YYCURSOR;
619- switch(yych){
620- case 0x0A: goto yy41;
621+#line 514 "<stdout>"
622+yy43:
623+ yych = *++YYCURSOR;
624+ switch (yych) {
625+ case '\n': goto yy41;
626 default: goto yy11;
627 }
628-yy44: ++YYCURSOR;
629- switch((yych = *YYCURSOR)) {
630- case 0x0A: goto yy41;
631+yy44:
632+ ++YYCURSOR;
633+ switch ((yych = *YYCURSOR)) {
634+ case '\n': goto yy41;
635 default: goto yy11;
636 }
637 }
638@@ -548,28 +536,22 @@ Directive:
639 YYTOKEN = YYCURSOR;
640
641
642-#line 543 "<stdout>"
643+#line 538 "<stdout>"
644 {
645 YYCTYPE yych;
646- unsigned int yyaccept = 0;
647- goto yy45;
648- /*@notreached@*/
649- ++YYCURSOR;
650-yy45:
651- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
652+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
653 yych = *YYCURSOR;
654- switch(yych){
655+ switch (yych) {
656 case 0x00: goto yy47;
657 case 'V': goto yy48;
658 default: goto yy50;
659 }
660-yy47: YYCURSOR = YYMARKER;
661- switch(yyaccept){
662- case 0: goto yy49;
663- }
664-yy48: yyaccept = 0;
665+yy47:
666+ YYCURSOR = YYMARKER;
667+ goto yy49;
668+yy48:
669 yych = *(YYMARKER = ++YYCURSOR);
670- switch(yych){
671+ switch (yych) {
672 case '.':
673 case '/':
674 case '0':
675@@ -619,7 +601,8 @@ yy48: yyaccept = 0;
676 case '\\':
677 case ']':
678 case '^':
679- case '_': case 'a':
680+ case '_':
681+ case 'a':
682 case 'b':
683 case 'c':
684 case 'd':
685@@ -649,17 +632,18 @@ yy48: yyaccept = 0;
686 }
687 yy49:
688 #line 399 "bytecode.re"
689-{ YYCURSOR = YYTOKEN;
690+ { YYCURSOR = YYTOKEN;
691 return YAML_DOCSEP;
692 }
693-#line 646 "<stdout>"
694-yy50: yych = *++YYCURSOR;
695+#line 637 "<stdout>"
696+yy50:
697+ yych = *++YYCURSOR;
698 goto yy49;
699-yy51: ++YYCURSOR;
700- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
701+yy51:
702+ ++YYCURSOR;
703+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
704 yych = *YYCURSOR;
705- goto yy52;
706-yy52: switch(yych){
707+ switch (yych) {
708 case '.':
709 case '/':
710 case '0':
711@@ -671,7 +655,8 @@ yy52: switch(yych){
712 case '6':
713 case '7':
714 case '8':
715- case '9': case ';':
716+ case '9':
717+ case ';':
718 case '<':
719 case '=':
720 case '>':
721@@ -707,7 +692,8 @@ yy52: switch(yych){
722 case '\\':
723 case ']':
724 case '^':
725- case '_': case 'a':
726+ case '_':
727+ case 'a':
728 case 'b':
729 case 'c':
730 case 'd':
731@@ -736,8 +722,9 @@ yy52: switch(yych){
732 case ':': goto yy53;
733 default: goto yy47;
734 }
735-yy53: yych = *++YYCURSOR;
736- switch(yych){
737+yy53:
738+ yych = *++YYCURSOR;
739+ switch (yych) {
740 case '.':
741 case '/':
742 case '0':
743@@ -787,7 +774,8 @@ yy53: yych = *++YYCURSOR;
744 case '\\':
745 case ']':
746 case '^':
747- case '_': case 'a':
748+ case '_':
749+ case 'a':
750 case 'b':
751 case 'c':
752 case 'd':
753@@ -815,13 +803,13 @@ yy53: yych = *++YYCURSOR;
754 case 'z': goto yy54;
755 default: goto yy47;
756 }
757-yy54: ++YYCURSOR;
758- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
759+yy54:
760+ ++YYCURSOR;
761+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
762 yych = *YYCURSOR;
763- goto yy55;
764-yy55: switch(yych){
765- case 0x0A: goto yy56;
766- case 0x0D: goto yy58;
767+ switch (yych) {
768+ case '\n': goto yy56;
769+ case '\r': goto yy58;
770 case '.':
771 case '/':
772 case '0':
773@@ -871,7 +859,8 @@ yy55: switch(yych){
774 case '\\':
775 case ']':
776 case '^':
777- case '_': case 'a':
778+ case '_':
779+ case 'a':
780 case 'b':
781 case 'c':
782 case 'd':
783@@ -899,16 +888,16 @@ yy55: switch(yych){
784 case 'z': goto yy54;
785 default: goto yy47;
786 }
787-yy56: ++YYCURSOR;
788- goto yy57;
789-yy57:
790+yy56:
791+ ++YYCURSOR;
792 #line 396 "bytecode.re"
793-{ CHK_NL(YYCURSOR);
794+ { CHK_NL(YYCURSOR);
795 goto Directive; }
796-#line 899 "<stdout>"
797-yy58: ++YYCURSOR;
798- switch((yych = *YYCURSOR)) {
799- case 0x0A: goto yy56;
800+#line 895 "<stdout>"
801+yy58:
802+ ++YYCURSOR;
803+ switch ((yych = *YYCURSOR)) {
804+ case '\n': goto yy56;
805 default: goto yy47;
806 }
807 }
808@@ -922,40 +911,40 @@ Comment:
809 YYTOKEN = YYCURSOR;
810
811
812-#line 916 "<stdout>"
813+#line 913 "<stdout>"
814 {
815 YYCTYPE yych;
816- goto yy59;
817- /*@notreached@*/
818- ++YYCURSOR;
819-yy59:
820- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
821+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
822 yych = *YYCURSOR;
823- switch(yych){
824+ switch (yych) {
825 case 0x00: goto yy61;
826- case 0x0A: goto yy62;
827- case 0x0D: goto yy64;
828+ case '\n': goto yy62;
829+ case '\r': goto yy64;
830 default: goto yy66;
831 }
832-yy61:yy62: ++YYCURSOR;
833- goto yy63;
834+yy61:
835+yy62:
836+ ++YYCURSOR;
837 yy63:
838 #line 412 "bytecode.re"
839-{ CHK_NL(YYCURSOR);
840+ { CHK_NL(YYCURSOR);
841 goto Document; }
842-#line 936 "<stdout>"
843-yy64: ++YYCURSOR;
844- switch((yych = *YYCURSOR)) {
845- case 0x0A: goto yy67;
846+#line 931 "<stdout>"
847+yy64:
848+ ++YYCURSOR;
849+ switch ((yych = *YYCURSOR)) {
850+ case '\n': goto yy67;
851 default: goto yy65;
852 }
853 yy65:
854 #line 415 "bytecode.re"
855-{ goto Comment; }
856-#line 945 "<stdout>"
857-yy66: yych = *++YYCURSOR;
858+ { goto Comment; }
859+#line 941 "<stdout>"
860+yy66:
861+ yych = *++YYCURSOR;
862 goto yy65;
863-yy67: ++YYCURSOR;
864+yy67:
865+ ++YYCURSOR;
866 yych = *YYCURSOR;
867 goto yy63;
868 }
869@@ -977,23 +966,20 @@ Scalar2:
870 tok = YYCURSOR;
871
872
873-#line 970 "<stdout>"
874+#line 968 "<stdout>"
875 {
876 YYCTYPE yych;
877- goto yy68;
878- /*@notreached@*/
879- ++YYCURSOR;
880-yy68:
881- if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
882+ if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
883 yych = *YYCURSOR;
884- switch(yych){
885+ switch (yych) {
886 case 0x00: goto yy74;
887- case 0x0A: goto yy70;
888- case 0x0D: goto yy72;
889+ case '\n': goto yy70;
890+ case '\r': goto yy72;
891 default: goto yy76;
892 }
893-yy70: ++YYCURSOR;
894- switch((yych = *YYCURSOR)) {
895+yy70:
896+ ++YYCURSOR;
897+ switch ((yych = *YYCURSOR)) {
898 case 'C': goto yy78;
899 case 'N': goto yy80;
900 case 'Z': goto yy83;
901@@ -1001,50 +987,51 @@ yy70: ++YYCURSOR;
902 }
903 yy71:
904 #line 461 "bytecode.re"
905-{ YYCURSOR = tok;
906+ { YYCURSOR = tok;
907 goto ScalarEnd;
908 }
909-#line 996 "<stdout>"
910-yy72: ++YYCURSOR;
911- switch((yych = *YYCURSOR)) {
912- case 0x0A: goto yy77;
913+#line 992 "<stdout>"
914+yy72:
915+ ++YYCURSOR;
916+ switch ((yych = *YYCURSOR)) {
917+ case '\n': goto yy77;
918 default: goto yy73;
919 }
920 yy73:
921 #line 469 "bytecode.re"
922-{ CAT(str, cap, idx, tok[0]);
923+ { CAT(str, cap, idx, tok[0]);
924 goto Scalar2;
925 }
926-#line 1007 "<stdout>"
927-yy74: ++YYCURSOR;
928- goto yy75;
929-yy75:
930+#line 1004 "<stdout>"
931+yy74:
932+ ++YYCURSOR;
933 #line 465 "bytecode.re"
934-{ YYCURSOR = tok;
935+ { YYCURSOR = tok;
936 goto ScalarEnd;
937 }
938-#line 1015 "<stdout>"
939-yy76: yych = *++YYCURSOR;
940+#line 1011 "<stdout>"
941+yy76:
942+ yych = *++YYCURSOR;
943 goto yy73;
944-yy77: yych = *++YYCURSOR;
945- switch(yych){
946+yy77:
947+ yych = *++YYCURSOR;
948+ switch (yych) {
949 case 'C': goto yy78;
950 case 'N': goto yy80;
951 case 'Z': goto yy83;
952 default: goto yy71;
953 }
954-yy78: ++YYCURSOR;
955- goto yy79;
956-yy79:
957+yy78:
958+ ++YYCURSOR;
959 #line 435 "bytecode.re"
960-{ CHK_NL(tok+1);
961+ { CHK_NL(tok+1);
962 goto Scalar2; }
963-#line 1031 "<stdout>"
964-yy80: ++YYCURSOR;
965- if(YYLIMIT == YYCURSOR) YYFILL(1);
966+#line 1028 "<stdout>"
967+yy80:
968+ ++YYCURSOR;
969+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
970 yych = *YYCURSOR;
971- goto yy81;
972-yy81: switch(yych){
973+ switch (yych) {
974 case '0':
975 case '1':
976 case '2':
977@@ -1059,7 +1046,7 @@ yy81: switch(yych){
978 }
979 yy82:
980 #line 438 "bytecode.re"
981-{ CHK_NL(tok+1);
982+ { CHK_NL(tok+1);
983 if ( tok + 2 < YYCURSOR )
984 {
985 char *count = tok + 2;
986@@ -1076,16 +1063,15 @@ yy82:
987 }
988 goto Scalar2;
989 }
990-#line 1068 "<stdout>"
991-yy83: ++YYCURSOR;
992- goto yy84;
993-yy84:
994+#line 1065 "<stdout>"
995+yy83:
996+ ++YYCURSOR;
997 #line 456 "bytecode.re"
998-{ CHK_NL(tok+1);
999+ { CHK_NL(tok+1);
1000 CAT(str, cap, idx, '\0');
1001 goto Scalar2;
1002 }
1003-#line 1077 "<stdout>"
1004+#line 1073 "<stdout>"
1005 }
1006 #line 473 "bytecode.re"
1007
1008@@ -1122,50 +1108,48 @@ Inline:
1009 tok = YYCURSOR;
1010
1011
1012-#line 1114 "<stdout>"
1013+#line 1110 "<stdout>"
1014 {
1015 YYCTYPE yych;
1016- goto yy85;
1017- /*@notreached@*/
1018- ++YYCURSOR;
1019-yy85:
1020- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
1021+ if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
1022 yych = *YYCURSOR;
1023- switch(yych){
1024+ switch (yych) {
1025 case 0x00: goto yy91;
1026- case 0x0A: goto yy87;
1027- case 0x0D: goto yy89;
1028+ case '\n': goto yy87;
1029+ case '\r': goto yy89;
1030 default: goto yy93;
1031 }
1032-yy87: ++YYCURSOR;
1033- goto yy88;
1034+yy87:
1035+ ++YYCURSOR;
1036 yy88:
1037 #line 508 "bytecode.re"
1038-{ CHK_NL(YYCURSOR);
1039+ { CHK_NL(YYCURSOR);
1040 return str; }
1041-#line 1134 "<stdout>"
1042-yy89: ++YYCURSOR;
1043- switch((yych = *YYCURSOR)) {
1044- case 0x0A: goto yy94;
1045+#line 1127 "<stdout>"
1046+yy89:
1047+ ++YYCURSOR;
1048+ switch ((yych = *YYCURSOR)) {
1049+ case '\n': goto yy94;
1050 default: goto yy90;
1051 }
1052 yy90:
1053 #line 515 "bytecode.re"
1054-{ CAT(str, cap, idx, tok[0]);
1055+ { CAT(str, cap, idx, tok[0]);
1056 goto Inline;
1057 }
1058-#line 1145 "<stdout>"
1059-yy91: ++YYCURSOR;
1060- goto yy92;
1061-yy92:
1062+#line 1139 "<stdout>"
1063+yy91:
1064+ ++YYCURSOR;
1065 #line 511 "bytecode.re"
1066-{ YYCURSOR = tok;
1067+ { YYCURSOR = tok;
1068 return str;
1069 }
1070-#line 1153 "<stdout>"
1071-yy93: yych = *++YYCURSOR;
1072+#line 1146 "<stdout>"
1073+yy93:
1074+ yych = *++YYCURSOR;
1075 goto yy90;
1076-yy94: ++YYCURSOR;
1077+yy94:
1078+ ++YYCURSOR;
1079 yych = *YYCURSOR;
1080 goto yy88;
1081 }
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch b/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
new file mode 100644
index 0000000000..786944d847
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
@@ -0,0 +1,25 @@
1rpmdb/tagname.c: Add the 0x54aafb71 (filenames) type to rpmTagGetType
2
3There is already a workaround in the _tagName function to show that the
4special 'filenames' item is value. This adds a similar patch to the
5_tagType to return the proper type, otherwise it comes back as a simple
6RPM_STRING_ARRAY_TYPE which limits the response to the first element.
7
8Upstream-Status: Pending
9
10Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
11
12Index: rpm-5.4.15/rpmdb/tagname.c
13===================================================================
14--- rpm-5.4.15.orig/rpmdb/tagname.c
15+++ rpm-5.4.15/rpmdb/tagname.c
16@@ -353,6 +353,9 @@ static unsigned int _tagType(rpmTag tag)
17 case RPMDBI_RECNO:
18 case RPMDBI_HEAP:
19 break;
20+ /* XXX make sure that h.['filenames'] in python "works". */
21+ case 0x54aafb71:
22+ return (RPM_STRING_ARRAY_TYPE + RPM_ARRAY_RETURN_TYPE);
23 default:
24 if (_rpmTags.byValue == NULL)
25 break;
diff --git a/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
index 20d13aa08c..2ededdac4a 100644
--- a/meta/recipes-devtools/rpm/rpm/rpmatch.patch
+++ b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
@@ -1,5 +1,6 @@
1Add configure check for rpmatch() and 1Create a compatable macro if rpmatch() is not provided by the C library.
2creates a compatable macro if it is not provided by the C library. 2
3This uses an existing configure check.
3 4
4This is needed for uclibc since it does not have the above function 5This is needed for uclibc since it does not have the above function
5implemented. 6implemented.
@@ -8,24 +9,15 @@ Upstream-Status: Pending
8 9
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 10Signed-off-by: Khem Raj <raj.khem@gmail.com>
10 11
11Index: rpm-5.4.14/configure.ac 12Updated to rpm 5.4.15+.
12=================================================================== 13
13--- rpm-5.4.14.orig/configure.ac 14Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
14+++ rpm-5.4.14/configure.ac 15
15@@ -943,7 +943,7 @@ AC_CHECK_FUNCS([dnl 16Index: rpm/system.h
16 ftok getaddrinfo getattrlist getcwd getdelim getline getmode getnameinfo dnl
17 getpassphrase getxattr getwd iconv inet_aton lchflags lchmod lchown dnl
18 lgetxattr lsetxattr lutimes madvise mempcpy mkdtemp mkstemp mtrace dnl
19- posix_fadvise posix_fallocate putenv realpath regcomp secure_getenv __secure_getenv dnl
20+ posix_fadvise posix_fallocate putenv realpath regcomp rpmatch secure_getenv __secure_getenv dnl
21 setattrlist setenv setlocale setmode setxattr dnl
22 sigaddset sigdelset sigemptyset sighold sigrelse sigpause dnl
23 sigprocmask sigsuspend sigaction dnl
24Index: rpm-5.4.14/system.h
25=================================================================== 17===================================================================
26--- rpm-5.4.14.orig/system.h 18--- rpm.orig/system.h
27+++ rpm-5.4.14/system.h 19+++ rpm/system.h
28@@ -353,6 +353,14 @@ extern int _tolower(int) __THROW /*@*/; 20@@ -358,6 +358,14 @@ extern int _tolower(int) __THROW /*@*/;
29 #include <libgen.h> 21 #include <libgen.h>
30 #endif 22 #endif
31 23
diff --git a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch b/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
index f08bd688f1..b2437a8723 100644
--- a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
+++ b/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
@@ -1,4 +1,7 @@
1rpm: compile rpmqv.c instead of rpmqv.cc 1From e8bae261615e19ff8a28683765c9539cfb22a086 Mon Sep 17 00:00:00 2001
2From: Joe Slater <jslater@windriver.com>
3Date: Thu, 17 Jul 2014 18:14:54 -0700
4Subject: [PATCH 1/9] rpm: compile rpmqv.c instead of rpmqv.cc
2 5
3Some versions of gcc, 4.4.5 for example, will put a reference to __gxx_personality_v0 6Some versions of gcc, 4.4.5 for example, will put a reference to __gxx_personality_v0
4into rpm.o and rpmbuild.o. This means we must link with g++, and the Makefile we 7into rpm.o and rpmbuild.o. This means we must link with g++, and the Makefile we
@@ -10,23 +13,38 @@ Upstream-Status: Inappropriate [other]
10 13
11 When linking with g++ is really necessary, the upstream package will do that. 14 When linking with g++ is really necessary, the upstream package will do that.
12 15
16Also instead of symlinking files in two places, which can and does race in
17parallel builds, simply refer to the file's full location [RB]
18
13Signed-off-by: Joe Slater <joe.slater@windriver.com> 19Signed-off-by: Joe Slater <joe.slater@windriver.com>
20Signed-off-by: Ross Burton <ross.burton@intel.com>
21
22---
23 Makefile.am | 6 ++----
24 1 file changed, 2 insertions(+), 4 deletions(-)
14 25
26diff --git a/Makefile.am b/Makefile.am
27index 1dade0a..55f8669 100644
15--- a/Makefile.am 28--- a/Makefile.am
16+++ b/Makefile.am 29+++ b/Makefile.am
17@@ -127,13 +127,13 @@ rpm_SOURCES = build.c 30@@ -201,15 +201,13 @@ rpm_SOURCES = build.c
18 rpm_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) 31 rpm_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
19 rpm_LDADD = rpm.o $(myLDADD) 32 rpm_LDADD = rpm.o $(myLDADD)
20 rpm.o: $(top_srcdir)/rpmqv.c 33 rpm.o: $(top_srcdir)/rpmqv.c
21- $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.cc 34- ln -sf $< rpmqv.cc
22+ $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.c 35- $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.cc
36+ $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $^
23 37
24 rpmbuild_SOURCES = build.c 38 rpmbuild_SOURCES = build.c
25 rpmbuild_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) 39 rpmbuild_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
26 rpmbuild_LDADD = rpmbuild.o $(myLDADD) 40 rpmbuild_LDADD = rpmbuild.o $(myLDADD)
27 rpmbuild.o: $(top_srcdir)/rpmqv.c 41 rpmbuild.o: $(top_srcdir)/rpmqv.c
28- $(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.cc 42- ln -sf $< rpmqv.cc
29+ $(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.c 43- $(COMPILE) -DIAM_RPMBT -o $@ -c rpmqv.cc
44+ $(COMPILE) -DIAM_RPMBT -o $@ -c $^
30 45
31 .PHONY: splint 46 .syntastic_c_config: Makefile
32 splint: 47 @echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
48--
492.7.0
50
diff --git a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
index 8870adb9e7..3b4b924510 100644
--- a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
+++ b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
@@ -4,10 +4,10 @@ Upstream-Status: Pending
4 4
5Signed-off-by: Khem Raj <raj.khem@gmail.com> 5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6 6
7Index: rpm-5.4.14/rpmio/rpmio.h 7Index: rpm/rpmio/rpmio.h
8=================================================================== 8===================================================================
9--- rpm-5.4.14.orig/rpmio/rpmio.h 9--- rpm.orig/rpmio/rpmio.h
10+++ rpm-5.4.14/rpmio/rpmio.h 10+++ rpm/rpmio/rpmio.h
11@@ -23,7 +23,8 @@ 11@@ -23,7 +23,8 @@
12 */ 12 */
13 /*@{*/ 13 /*@{*/
@@ -18,11 +18,11 @@ Index: rpm-5.4.14/rpmio/rpmio.h
18 #define USE_COOKIE_SEEK_POINTER 1 18 #define USE_COOKIE_SEEK_POINTER 1
19 typedef _IO_off64_t _libio_off_t; 19 typedef _IO_off64_t _libio_off_t;
20 typedef _libio_off_t * _libio_pos_t; 20 typedef _libio_off_t * _libio_pos_t;
21Index: rpm-5.4.14/system.h 21Index: rpm/system.h
22=================================================================== 22===================================================================
23--- rpm-5.4.14.orig/system.h 23--- rpm.orig/system.h
24+++ rpm-5.4.14/system.h 24+++ rpm/system.h
25@@ -481,7 +481,7 @@ extern void muntrace (void) 25@@ -489,7 +489,7 @@ extern void muntrace (void)
26 #endif /* defined(__LCLINT__) */ 26 #endif /* defined(__LCLINT__) */
27 27
28 /* Memory allocation via macro defs to get meaningful locations from mtrace() */ 28 /* Memory allocation via macro defs to get meaningful locations from mtrace() */
@@ -31,11 +31,11 @@ Index: rpm-5.4.14/system.h
31 #define xmalloc(_size) (malloc(_size) ? : vmefail(_size)) 31 #define xmalloc(_size) (malloc(_size) ? : vmefail(_size))
32 #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(_size)) 32 #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(_size))
33 #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(_size)) 33 #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(_size))
34Index: rpm-5.4.14/lib/librpm.vers 34Index: rpm/lib/librpm.vers
35=================================================================== 35===================================================================
36--- rpm-5.4.14.orig/lib/librpm.vers 36--- rpm.orig/lib/librpm.vers
37+++ rpm-5.4.14/lib/librpm.vers 37+++ rpm/lib/librpm.vers
38@@ -405,6 +405,10 @@ LIBRPM_0 38@@ -406,6 +406,10 @@ LIBRPM_0
39 specedit; 39 specedit;
40 strict_erasures; 40 strict_erasures;
41 XrpmtsiInit; 41 XrpmtsiInit;
@@ -46,14 +46,14 @@ Index: rpm-5.4.14/lib/librpm.vers
46 local: 46 local:
47 *; 47 *;
48 }; 48 };
49Index: rpm-5.4.14/rpmio/librpmio.vers 49Index: rpm/rpmio/librpmio.vers
50=================================================================== 50===================================================================
51--- rpm-5.4.14.orig/rpmio/librpmio.vers 51--- rpm.orig/rpmio/librpmio.vers
52+++ rpm-5.4.14/rpmio/librpmio.vers 52+++ rpm/rpmio/librpmio.vers
53@@ -1056,6 +1056,10 @@ LIBRPMIO_0 53@@ -1455,6 +1455,10 @@ LIBRPMIO_0
54 mongo_write_concern_set_mode; 54 _mongoc_write_result_init;
55 mongo_write_concern_set_w; 55 _mongoc_write_result_merge;
56 mongo_write_concern_set_wtimeout; 56 _mongoc_write_result_merge_legacy;
57+ xmalloc; 57+ xmalloc;
58+ xrealloc; 58+ xrealloc;
59+ xcalloc; 59+ xcalloc;
diff --git a/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch b/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch
deleted file mode 100644
index 71045aebc7..0000000000
--- a/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 9e7b72ee0c994609975981e135fc18d0387aefb6 Mon Sep 17 00:00:00 2001
2From: jbj <jbj>
3Date: Wed, 14 May 2014 21:19:41 +0000
4Subject: [PATCH] - verify: fix: broken logic for %ghost avoidance (Mark
5 Hatle).
6
7Upstream-Status: Backport
8
9Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
10---
11 CHANGES | 1 +
12 lib/verify.c | 3 +--
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15Index: rpm-5.4.14/CHANGES
16===================================================================
17--- rpm-5.4.14.orig/CHANGES
18+++ rpm-5.4.14/CHANGES
19@@ -1,3 +1,5 @@
20+ - jbj: verify: fix: broken logic for %ghost avoidance (Mark Hatle).
21+
22 5.4.13 -> 5.4.14:
23 - mooney: use __sun instead of __sun__ in #define (lp#1243472).
24 - mooney: rpmconstant: ensure linkage w Oracle Studio 12.3 (lp#1243469).
25Index: rpm-5.4.14/lib/verify.c
26===================================================================
27--- rpm-5.4.14.orig/lib/verify.c
28+++ rpm-5.4.14/lib/verify.c
29@@ -588,8 +588,7 @@ uint32_t fc = rpmfiFC(fi);
30 continue;
31
32 /* If not verifying %ghost, skip ghost files. */
33- /* XXX the broken!!! logic disables %ghost queries always. */
34- if (!(FF_ISSET(qva->qva_fflags, GHOST) && FF_ISSET(fflags, GHOST)))
35+ if (!FF_ISSET(qva->qva_fflags, GHOST) && FF_ISSET(fflags, GHOST))
36 continue;
37
38 /* Gather per-file data into a carrier. */
diff --git a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
index 660e9df272..62526fde5f 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
+++ b/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
34written in the Perl programming language to use the interface \ 34written in the Perl programming language to use the interface \
35supplied by the RPM Package Manager libraries." 35supplied by the RPM Package Manager libraries."
36 36
37SUMMARY_perl-module-rpm-dev = "Development components for perl bindings"
38DESCRIPTION_perl-modules-rpm-dev = "Development items such as man pages for use with the Perl \
39language bindings."
40
41HOMEPAGE = "http://rpm5.org/" 37HOMEPAGE = "http://rpm5.org/"
42LICENSE = "LGPLv2.1" 38LICENSE = "LGPLv2.1 & Apache-2.0"
43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" 39LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
40LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901"
44 41
45DEPENDS = "libpcre attr acl popt ossp-uuid file byacc-native" 42# We must have gettext-native, we need gettextize, which may not be provided
43DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native"
46DEPENDS_append_class-native = " file-replacement-native" 44DEPENDS_append_class-native = " file-replacement-native"
47 45
48S = "${WORKDIR}/rpm"
49
50# Apply various fixups that are unique to the CVS environment 46# Apply various fixups that are unique to the CVS environment
51do_fixup_unpack () { 47do_fixup_unpack () {
52 ln -sf ../syck ${S}/syck || : 48 # 'ln' isn't reliable, and 'mv' could break later builds
53 ln -sf ../lua ${S}/lua || : 49 rm -rf ${S}/syck ; cp -r ${WORKDIR}/syck ${S}/.
54 ln ${S}/rpmqv.c ${S}/rpmqv.cc || : 50 rm -rf ${S}/lua ; cp -r ${WORKDIR}/lua ${S}/.
51 rm -rf ${S}/popt ; cp -r ${WORKDIR}/popt ${S}/.
52 rm -rf ${S}/beecrypt ; cp -r ${WORKDIR}/beecrypt ${S}/.
55} 53}
56 54
57addtask fixup_unpack after do_unpack before do_patch 55addtask fixup_unpack after do_unpack before do_patch
@@ -60,45 +58,34 @@ addtask fixup_unpack after do_unpack before do_patch
60# community work in progress. 58# community work in progress.
61DEFAULT_PREFERENCE = "-1" 59DEFAULT_PREFERENCE = "-1"
62 60
61S = "${WORKDIR}/rpm"
62
63# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed 63# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
64# in order to extract the distribution SRPM into a format we can extract... 64# in order to extract the distribution SRPM into a format we can extract...
65SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \ 65SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \
66 cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=syck \ 66 cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=syck \
67 cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=lua \ 67 cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=lua \
68 file://rpm-log-auto-rm.patch \ 68 cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=popt \
69 file://rpm-db-reduce.patch \ 69 cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=beecrypt \
70 file://perfile_rpmdeps.sh \ 70 file://perfile_rpmdeps.sh \
71 file://rpm-autogen.patch \ 71 file://pythondeps.sh \
72 file://rpm-libsql-fix.patch \ 72"
73
74# Bug fixes
75SRC_URI += " \
73 file://header-include-fix.patch \ 76 file://header-include-fix.patch \
77 file://rpm-libsql-fix.patch \
74 file://rpm-platform.patch \ 78 file://rpm-platform.patch \
75 file://rpm-showrc.patch \ 79 file://rpm-platform2.patch \
76 file://rpm-tools-mtree-LDFLAGS.patch \ 80 file://rpm-tools-mtree-LDFLAGS.patch \
77 file://rpm-fileclass.patch \
78 file://rpm-canonarch.patch \ 81 file://rpm-canonarch.patch \
79 file://rpm-no-loopmsg.patch \ 82 file://rpm-no-loopmsg.patch \
80 file://rpm-scriptletexechelper.patch \
81 file://pythondeps.sh \
82 file://rpmdeps-oecore.patch \
83 file://rpm-resolvedep.patch \ 83 file://rpm-resolvedep.patch \
84 file://rpm-no-perl-urpm.patch \
85 file://rpm-macros.patch \
86 file://rpm-lua.patch \
87 file://rpm-ossp-uuid.patch \
88 file://rpm-packageorigin.patch \ 84 file://rpm-packageorigin.patch \
89 file://rpm-pkgconfigdeps.patch \
90 file://uclibc-support.patch \ 85 file://uclibc-support.patch \
91 file://rpmatch.patch \ 86 file://rpmatch.patch \
92 file://fstack-protector-configure-check.patch \
93 file://dbconvert.patch \
94 file://rpm-uuid-include.patch \
95 file://makefile-am-exec-hook.patch \ 87 file://makefile-am-exec-hook.patch \
96 file://rpm-db_buffer_small.patch \
97 file://rpm-py-init.patch \
98 file://python-rpm-rpmsense.patch \ 88 file://python-rpm-rpmsense.patch \
99 file://rpm-reloc-macros.patch \
100 file://rpm-platform2.patch \
101 file://rpm-remove-sykcparse-decl.patch \
102 file://debugedit-segv.patch \ 89 file://debugedit-segv.patch \
103 file://debugedit-valid-file-to-fix-segment-fault.patch \ 90 file://debugedit-valid-file-to-fix-segment-fault.patch \
104 file://rpm-platform-file-fix.patch \ 91 file://rpm-platform-file-fix.patch \
@@ -107,13 +94,61 @@ SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \
107 file://rpm-hardlink-segfault-fix.patch \ 94 file://rpm-hardlink-segfault-fix.patch \
108 file://rpm-payload-use-hashed-inode.patch \ 95 file://rpm-payload-use-hashed-inode.patch \
109 file://rpm-fix-logio-cp.patch \ 96 file://rpm-fix-logio-cp.patch \
97 file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
98 file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
99 file://0001-define-EM_AARCH64.patch \
100 file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
101 file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
102 file://rpm-mongodb-sasl.patch \
103 file://rpm-fix-parseEmbedded.patch \
104 file://rpm-rpmio-headers.patch \
105 file://rpm-python-restore-origin.patch \
106 file://rpm-keccak-sse-intrin.patch \
107 file://rpm-atomic-ops.patch \
108 file://rpm-gnu-atomic.patch \
109 file://rpm-tagname-type.patch \
110 file://rpm-python-tagname.patch \
111 file://rpm-python-AddErase.patch \
112 file://rpm-rpmpgp-popt.patch \
113"
114
115# OE specific changes
116SRC_URI += " \
117 file://rpm-log-auto-rm.patch \
118 file://rpm-db-reduce.patch \
119 file://rpm-autogen.patch \
120 file://rpm-showrc.patch \
121 file://rpm-fileclass.patch \
122 file://rpm-scriptletexechelper.patch \
123 file://rpmdeps-oecore.patch \
124 file://rpm-no-perl-urpm.patch \
125 file://rpm-macros.patch \
126 file://rpm-lua.patch \
127 file://rpm-ossp-uuid.patch \
128 file://rpm-uuid-include.patch \
129 file://rpm-pkgconfigdeps.patch \
130 file://no-ldflags-in-pkgconfig.patch \
131 file://dbconvert.patch \
132 file://rpm-db_buffer_small.patch \
133 file://rpm-py-init.patch \
134 file://rpm-reloc-macros.patch \
110 file://rpm-db5-or-db6.patch \ 135 file://rpm-db5-or-db6.patch \
111 file://rpm-rpmpgp-fix.patch \ 136 file://rpm-db60.patch \
112 file://rpm-disable-Wno-override-init.patch \ 137 file://rpmqv_cc_b_gone.patch \
113 file://rpm-realpath.patch \ 138 file://rpm-realpath.patch \
114 file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \ 139 file://rpm-check-rootpath-reasonableness.patch \
115 " 140 file://rpm-macros.in-disable-external-key-server.patch \
116 141 file://configure.ac-check-for-both-gpg2-and-gpg.patch \
142 file://rpm-disable-auto-stack-protector.patch \
143 file://popt-disable-auto-stack-protector.patch \
144 file://rpm-syck-fix-gram.patch \
145 file://rpm-rpmdb-grammar.patch \
146 file://rpm-disable-blaketest.patch \
147"
148
149SRC_URI_append_libc-musl = "\
150 file://0001-rpm-Fix-build-on-musl.patch \
151"
117# Uncomment the following line to enable platform score debugging 152# Uncomment the following line to enable platform score debugging
118# This is useful when identifying issues with Smart being unable 153# This is useful when identifying issues with Smart being unable
119# to process certain package feeds. 154# to process certain package feeds.
@@ -123,16 +158,25 @@ inherit autotools gettext
123 158
124acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" 159acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
125 160
161# The local distribution macro directory
162distromacrodir = "${libdir}/rpm/poky"
163
126# Specify the default rpm macros in terms of adjustable variables 164# Specify the default rpm macros in terms of adjustable variables
127rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros" 165rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
128rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" 166rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
129rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" 167rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
130 168
131# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux 169# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
132 170
133# Note: perl and sqlite w/o db specified does not currently work. 171# Note: perl and sqlite w/o db specified does not currently work.
134# tcl, augeas, nss, gcrypt, xar and keyutils support is untested. 172# tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
135PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python" 173PACKAGECONFIG ??= "db bzip2 zlib popt openssl libelf python"
174
175# Note: switching to internal popt may not work, as it will generate
176# a shared library which will intentionally not be packaged.
177#
178# If you intend to use the internal version, additional work may be required.
179PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt,"
136 180
137PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2," 181PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
138PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz," 182PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
@@ -193,7 +237,6 @@ EXTRA_OECONF += "--verbose \
193 --with-uuid \ 237 --with-uuid \
194 --with-attr \ 238 --with-attr \
195 --with-acl \ 239 --with-acl \
196 --with-popt=external \
197 --with-pthreads \ 240 --with-pthreads \
198 --without-cudf \ 241 --without-cudf \
199 --without-ficl \ 242 --without-ficl \
@@ -205,6 +248,7 @@ EXTRA_OECONF += "--verbose \
205 --without-gpsee \ 248 --without-gpsee \
206 --without-ruby \ 249 --without-ruby \
207 --without-squirrel \ 250 --without-squirrel \
251 --without-sasl2 \
208 --with-build-extlibdep \ 252 --with-build-extlibdep \
209 --with-build-maxextlibdep \ 253 --with-build-maxextlibdep \
210 --without-valgrind \ 254 --without-valgrind \
@@ -224,7 +268,7 @@ CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE"
224 268
225LDFLAGS_append_libc-uclibc = "-lrt -lpthread" 269LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
226 270
227PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-staticdev python-rpm-dev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale" 271PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale"
228 272
229SOLIBS = "5.4.so" 273SOLIBS = "5.4.so"
230 274
@@ -342,24 +386,21 @@ FILES_${PN}-build = "${prefix}/src/rpm \
342 ${libdir}/rpm/vpkg-provides.sh \ 386 ${libdir}/rpm/vpkg-provides.sh \
343 ${libdir}/rpm/vpkg-provides2.sh \ 387 ${libdir}/rpm/vpkg-provides2.sh \
344 ${libdir}/rpm/perfile_rpmdeps.sh \ 388 ${libdir}/rpm/perfile_rpmdeps.sh \
389 ${distromacrodir} \
345 " 390 "
346RDEPENDS_${PN} = "base-files run-postinsts" 391RDEPENDS_${PN} = "base-files run-postinsts"
347RDEPENDS_${PN}_class-native = "" 392RDEPENDS_${PN}_class-native = ""
348RDEPENDS_${PN}_class-nativesdk = "" 393RDEPENDS_${PN}_class-nativesdk = ""
349RDEPENDS_${PN}-build = "file bash perl" 394RDEPENDS_${PN}-build = "file bash perl"
350 395
351RDEPENDS_python-rpm = "${PN}" 396RDEPENDS_python-rpm = "${PN} python"
352 397
353FILES_python-rpm-dev = "${libdir}/python*/site-packages/rpm/*.la"
354FILES_python-rpm-staticdev = "${libdir}/python*/site-packages/rpm/*.a"
355FILES_python-rpm = "${libdir}/python*/site-packages/rpm" 398FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
399PROVIDES += "python-rpm"
356 400
357FILES_perl-module-rpm = "${libdir}/perl/*/* \ 401FILES_perl-module-rpm = "${libdir}/perl/*/* \
358 " 402 "
359 403
360FILES_perl-module-rpm-dev = "${prefix}/share/man/man3/RPM* \
361 "
362
363RDEPENDS_${PN}-dev += "bash" 404RDEPENDS_${PN}-dev += "bash"
364 405
365FILES_${PN}-dev = "${includedir}/rpm \ 406FILES_${PN}-dev = "${includedir}/rpm \
@@ -388,6 +429,7 @@ FILES_${PN}-staticdev = " \
388 ${libdir}/librpmmisc.a \ 429 ${libdir}/librpmmisc.a \
389 ${libdir}/librpmbuild.a \ 430 ${libdir}/librpmbuild.a \
390 ${libdir}/rpm/lib/liblua.a \ 431 ${libdir}/rpm/lib/liblua.a \
432 ${libdir}/python*/site-packages/rpm/*.a \
391 " 433 "
392 434
393do_configure() { 435do_configure() {
@@ -408,12 +450,18 @@ do_configure() {
408} 450}
409 451
410do_install_append() { 452do_install_append() {
453 # Preserve the previous default of DSA self-signed pkgs
454 sed -i -e 's,%_build_sign.*,%_build_sign DSA,' ${D}/${libdir}/rpm/macros.rpmbuild
455
411 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros 456 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
412 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* 457 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
413 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* 458 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
414 sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros 459 sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
415 sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros 460 sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
416 461
462 # Enable MIPS64 N32 transactions. (This is a no-op on non-MIPS targets.)
463 sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros
464
417 # Enable Debian style arbitrary tags... 465 # Enable Debian style arbitrary tags...
418 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros 466 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
419 467
@@ -485,6 +533,83 @@ do_install_append() {
485 533
486} 534}
487 535
536do_install_append_class-target() {
537 # Create and install distribution specific macros
538 mkdir -p ${D}/${distromacrodir}
539 cat << EOF > ${D}/${distromacrodir}/macros
540%_defaultdocdir ${docdir}
541
542%_prefix ${prefix}
543%_exec_prefix ${exec_prefix}
544%_datarootdir ${datadir}
545%_bindir ${bindir}
546%_sbindir ${sbindir}
547%_libexecdir %{_libdir}/%{name}
548%_datadir ${datadir}
549%_sysconfdir ${sysconfdir}
550%_sharedstatedir ${sharedstatedir}
551%_localstatedir ${localstatedir}
552%_lib lib
553%_libdir %{_exec_prefix}/%{_lib}
554%_includedir ${includedir}
555%_oldincludedir ${oldincludedir}
556%_infodir ${infodir}
557%_mandir ${mandir}
558%_localedir %{_libdir}/locale
559EOF
560
561 # Create and install multilib specific macros
562 ${@multilib_rpmmacros(d)}
563}
564
565def multilib_rpmmacros(d):
566 localdata = d.createCopy()
567 # We need to clear the TOOLCHAIN_OPTIONS (--sysroot)
568 localdata.delVar('TOOLCHAIN_OPTIONS')
569
570 # Set 'localdata' values to be consistent with 'd' values.
571 localdata.setVar('distromacrodir', d.getVar('distromacrodir', True))
572 localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
573
574 ret = gen_arch_macro(localdata)
575
576 variants = d.getVar("MULTILIB_VARIANTS", True) or ""
577 for item in variants.split():
578 # Load overrides from 'd' to avoid having to reset the value...
579 localdata = d.createCopy()
580 overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
581 localdata.setVar("OVERRIDES", overrides)
582 localdata.setVar("MLPREFIX", item + "-")
583 bb.data.update_data(localdata)
584 ret += gen_arch_macro(localdata)
585 return ret
586
587def gen_arch_macro(d):
588 # Generate shell script to produce the file as part of do_install
589 val = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n"
590 val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n"
591 val += "%_lib ${baselib}\n"
592 val += "%_libdir ${libdir}\n"
593 val += "%_localedir ${localedir}\n"
594 val += "\n"
595 val += "# Toolchain configuration\n"
596 val += "%TOOLCHAIN_OPTIONS %{nil}\n"
597 val += "%__ar ${@d.getVar('AR', True).replace('$','%')}\n"
598 val += "%__as ${@d.getVar('AS', True).replace('$','%')}\n"
599 val += "%__cc ${@d.getVar('CC', True).replace('$','%')}\n"
600 val += "%__cpp ${@d.getVar('CPP', True).replace('$','%')}\n"
601 val += "%__cxx ${@d.getVar('CXX', True).replace('$','%')}\n"
602 val += "%__ld ${@d.getVar('LD', True).replace('$','%')}\n"
603 val += "%__nm ${@d.getVar('NM', True).replace('$','%')}\n"
604 val += "%__objcopy ${@d.getVar('OBJCOPY', True).replace('$','%')}\n"
605 val += "%__objdump ${@d.getVar('OBJDUMP', True).replace('$','%')}\n"
606 val += "%__ranlib ${@d.getVar('RANLIB', True).replace('$','%')}\n"
607 val += "%__strip ${@d.getVar('STRIP', True).replace('$','%')}\n"
608 val += "EOF\n"
609 val += "\n"
610 return d.expand(val)
611
612
488add_native_wrapper() { 613add_native_wrapper() {
489 create_wrapper ${D}/${bindir}/rpm \ 614 create_wrapper ${D}/${bindir}/rpm \
490 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ 615 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
index 90c4a354bf..142706f30c 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.14.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -5,8 +5,6 @@ verifying, querying, and updating software packages. Each software \
5package consists of an archive of files along with information about \ 5package consists of an archive of files along with information about \
6the package like its version, a description, etc." 6the package like its version, a description, etc."
7 7
8RECIPE_NO_UPDATE_REASON = "5.4.15 has a package database issue: http://lists.openembedded.org/pipermail/openembedded-core/2015-August/109187.html"
9
10SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages" 8SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages"
11DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries." 9DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries."
12 10
@@ -37,72 +35,118 @@ written in the Perl programming language to use the interface \
37supplied by the RPM Package Manager libraries." 35supplied by the RPM Package Manager libraries."
38 36
39HOMEPAGE = "http://rpm5.org/" 37HOMEPAGE = "http://rpm5.org/"
40LICENSE = "LGPLv2.1" 38LICENSE = "LGPLv2.1 & Apache-2.0"
41LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" 39LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
40LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901"
42 41
43DEPENDS = "libpcre attr acl popt ossp-uuid file byacc-native" 42# We must have gettext-native, we need gettextize, which may not be provided
43DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native"
44DEPENDS_append_class-native = " file-replacement-native" 44DEPENDS_append_class-native = " file-replacement-native"
45 45
46# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed 46# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
47# in order to extract the distribution SRPM into a format we can extract... 47# in order to extract the distribution SRPM into a format we can extract...
48SRC_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 \ 48
49 file://rpm-log-auto-rm.patch \ 49# There is no official 5.4.16 release yet, so start w/ 5.4.15 and patch it
50 file://rpm-db-reduce.patch \ 50# based on CVS
51S = "${WORKDIR}/rpm-5.4.15"
52
53SRC_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 \
54 http://downloads.yoctoproject.org/releases/rpm5/rpm-5.4.15-to-5.4.16-20160225.patch.gz;name=rpm-patch \
55 http://downloads.yoctoproject.org/releases/rpm5/syck-5.4.15-to-5.4.16-20160225.patch.gz;name=syck-patch \
56 http://downloads.yoctoproject.org/releases/rpm5/beecrypt-5.4.15-to-5.4.16-20160225.patch.gz;name=beecrypt-patch \
57 http://downloads.yoctoproject.org/releases/rpm5/lua-5.4.15-to-5.4.16-20160225.patch.gz;name=lua-patch \
51 file://perfile_rpmdeps.sh \ 58 file://perfile_rpmdeps.sh \
52 file://rpm-autogen.patch \ 59 file://pythondeps.sh \
53 file://rpm-libsql-fix.patch \ 60"
61
62SRC_URI[srpm.md5sum] = "d53782842ac11b3100a43fb2958c9bc0"
63SRC_URI[srpm.sha256sum] = "d4ae5e9ed5df8ab9931b660f491418d20ab5c4d72eb17ed9055b80b71ef6c4ee"
64
65SRC_URI[rpm-patch.md5sum] = "8b7deb1c9574d3d47ed8ba8c690fd8bf"
66SRC_URI[rpm-patch.sha256sum] = "1c1983d001b04eaa23eb2c8d9598b9d0899acb0a89f54a2d4c4e974086fd17a5"
67
68SRC_URI[syck-patch.md5sum] = "f31d7a32105a364688354419ec3559e4"
69SRC_URI[syck-patch.sha256sum] = "4dd1d04489206d8b5d1970f2a8d143a002f2895cefbe15d73459785096545e8a"
70
71SRC_URI[beecrypt-patch.md5sum] = "9e71ee3ccb0a52985a071dd250279132"
72SRC_URI[beecrypt-patch.sha256sum] ="df7c0708a7fab9bdf6d46194519b42e736f99cb0599dcc1c3c1bf1b228705cde"
73
74SRC_URI[lua-patch.md5sum] = "ca10d03d83b1fc1c31a0b50819534cd7"
75SRC_URI[lua-patch.sha256sum] = "6bde435cc827a7d4b2520e8f3e1c9bd2ca74375de0a4402aa99ef4d48eab9a7e"
76
77# Bug fixes
78SRC_URI += " \
54 file://header-include-fix.patch \ 79 file://header-include-fix.patch \
80 file://rpm-libsql-fix.patch \
55 file://rpm-platform.patch \ 81 file://rpm-platform.patch \
56 file://rpm-showrc.patch \ 82 file://rpm-platform2.patch \
57 file://rpm-tools-mtree-LDFLAGS.patch \ 83 file://rpm-tools-mtree-LDFLAGS.patch \
58 file://rpm-fileclass.patch \
59 file://rpm-canonarch.patch \ 84 file://rpm-canonarch.patch \
60 file://rpm-no-loopmsg.patch \ 85 file://rpm-no-loopmsg.patch \
61 file://rpm-scriptletexechelper.patch \
62 file://pythondeps.sh \
63 file://rpmdeps-oecore.patch \
64 file://rpm-resolvedep.patch \ 86 file://rpm-resolvedep.patch \
65 file://rpm-no-perl-urpm.patch \
66 file://rpm-macros.patch \
67 file://rpm-lua.patch \
68 file://rpm-ossp-uuid.patch \
69 file://rpm-packageorigin.patch \ 87 file://rpm-packageorigin.patch \
70 file://rpm-pkgconfigdeps.patch \
71 file://uclibc-support.patch \ 88 file://uclibc-support.patch \
72 file://rpmatch.patch \ 89 file://rpmatch.patch \
73 file://fstack-protector-configure-check.patch \
74 file://dbconvert.patch \
75 file://rpm-uuid-include.patch \
76 file://makefile-am-exec-hook.patch \ 90 file://makefile-am-exec-hook.patch \
77 file://rpm-db_buffer_small.patch \
78 file://rpm-py-init.patch \
79 file://python-rpm-rpmsense.patch \ 91 file://python-rpm-rpmsense.patch \
80 file://rpm-reloc-macros.patch \
81 file://rpm-platform2.patch \
82 file://rpm-remove-sykcparse-decl.patch \
83 file://debugedit-segv.patch \ 92 file://debugedit-segv.patch \
84 file://debugedit-valid-file-to-fix-segment-fault.patch \ 93 file://debugedit-valid-file-to-fix-segment-fault.patch \
85 file://rpm-platform-file-fix.patch \ 94 file://rpm-platform-file-fix.patch \
86 file://rpm-lsb-compatibility.patch \ 95 file://rpm-lsb-compatibility.patch \
87 file://rpm-tag-generate-endian-conversion-fix.patch \ 96 file://rpm-tag-generate-endian-conversion-fix.patch \
88 file://verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch \
89 file://rpm-hardlink-segfault-fix.patch \ 97 file://rpm-hardlink-segfault-fix.patch \
90 file://rpm-payload-use-hashed-inode.patch \ 98 file://rpm-payload-use-hashed-inode.patch \
91 file://rpm-fix-logio-cp.patch \ 99 file://rpm-fix-logio-cp.patch \
100 file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
101 file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
102 file://0001-define-EM_AARCH64.patch \
103 file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
104 file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
105 file://rpm-mongodb-sasl.patch \
106 file://rpm-fix-parseEmbedded.patch \
107 file://rpm-rpmio-headers.patch \
108 file://rpm-python-restore-origin.patch \
109 file://rpm-keccak-sse-intrin.patch \
110 file://rpm-atomic-ops.patch \
111 file://rpm-gnu-atomic.patch \
112 file://rpm-tagname-type.patch \
113 file://rpm-python-tagname.patch \
114 file://rpm-python-AddErase.patch \
115 file://rpm-rpmpgp-popt.patch \
116"
117
118# OE specific changes
119SRC_URI += " \
120 file://rpm-log-auto-rm.patch \
121 file://rpm-db-reduce.patch \
122 file://rpm-autogen.patch \
123 file://rpm-showrc.patch \
124 file://rpm-fileclass.patch \
125 file://rpm-scriptletexechelper.patch \
126 file://rpmdeps-oecore.patch \
127 file://rpm-no-perl-urpm.patch \
128 file://rpm-macros.patch \
129 file://rpm-lua.patch \
130 file://rpm-ossp-uuid.patch \
131 file://rpm-uuid-include.patch \
132 file://rpm-pkgconfigdeps.patch \
133 file://no-ldflags-in-pkgconfig.patch \
134 file://dbconvert.patch \
135 file://rpm-db_buffer_small.patch \
136 file://rpm-py-init.patch \
137 file://rpm-reloc-macros.patch \
92 file://rpm-db5-or-db6.patch \ 138 file://rpm-db5-or-db6.patch \
93 file://rpm-disable-Wno-override-init.patch \ 139 file://rpm-db60.patch \
94 file://rpmqv_cc_b_gone.patch \ 140 file://rpmqv_cc_b_gone.patch \
95 file://rpm-realpath.patch \ 141 file://rpm-realpath.patch \
96 file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
97 file://no-ldflags-in-pkgconfig.patch \
98 file://rpm-lua-fix-print.patch \
99 file://rpm-check-rootpath-reasonableness.patch \ 142 file://rpm-check-rootpath-reasonableness.patch \
100 file://rpm-macros.in-disable-external-key-server.patch \ 143 file://rpm-macros.in-disable-external-key-server.patch \
101 file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
102 file://configure.ac-check-for-both-gpg2-and-gpg.patch \ 144 file://configure.ac-check-for-both-gpg2-and-gpg.patch \
103 file://0001-define-EM_AARCH64.patch \ 145 file://rpm-disable-auto-stack-protector.patch \
104 file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \ 146 file://popt-disable-auto-stack-protector.patch \
105 file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \ 147 file://rpm-syck-fix-gram.patch \
148 file://rpm-rpmdb-grammar.patch \
149 file://rpm-disable-blaketest.patch \
106" 150"
107 151
108SRC_URI_append_libc-musl = "\ 152SRC_URI_append_libc-musl = "\
@@ -113,9 +157,6 @@ SRC_URI_append_libc-musl = "\
113# to process certain package feeds. 157# to process certain package feeds.
114#SRC_URI += "file://rpm-debug-platform.patch" 158#SRC_URI += "file://rpm-debug-platform.patch"
115 159
116SRC_URI[md5sum] = "25093d399a0b5d1342d24900a91b347d"
117SRC_URI[sha256sum] = "676e3ab41f72e3b504e04109cfb565a300742f56a7da084f202013b30eeae467"
118
119UPSTREAM_CHECK_REGEX = "rpm-(?P<pver>(\d+[\.\-_]*)+)-.*$" 160UPSTREAM_CHECK_REGEX = "rpm-(?P<pver>(\d+[\.\-_]*)+)-.*$"
120 161
121inherit autotools gettext 162inherit autotools gettext
@@ -134,7 +175,13 @@ rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macro
134 175
135# Note: perl and sqlite w/o db specified does not currently work. 176# Note: perl and sqlite w/o db specified does not currently work.
136# tcl, augeas, nss, gcrypt, xar and keyutils support is untested. 177# tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
137PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python" 178PACKAGECONFIG ??= "db bzip2 zlib popt openssl libelf python"
179
180# Note: switching to internal popt may not work, as it will generate
181# a shared library which will intentionally not be packaged.
182#
183# If you intend to use the internal version, additional work may be required.
184PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt,"
138 185
139PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2," 186PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
140PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz," 187PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
@@ -195,7 +242,6 @@ EXTRA_OECONF += "--verbose \
195 --with-uuid \ 242 --with-uuid \
196 --with-attr \ 243 --with-attr \
197 --with-acl \ 244 --with-acl \
198 --with-popt=external \
199 --with-pthreads \ 245 --with-pthreads \
200 --without-cudf \ 246 --without-cudf \
201 --without-ficl \ 247 --without-ficl \
@@ -207,6 +253,7 @@ EXTRA_OECONF += "--verbose \
207 --without-gpsee \ 253 --without-gpsee \
208 --without-ruby \ 254 --without-ruby \
209 --without-squirrel \ 255 --without-squirrel \
256 --without-sasl2 \
210 --with-build-extlibdep \ 257 --with-build-extlibdep \
211 --with-build-maxextlibdep \ 258 --with-build-maxextlibdep \
212 --without-valgrind \ 259 --without-valgrind \
@@ -351,7 +398,7 @@ RDEPENDS_${PN}_class-native = ""
351RDEPENDS_${PN}_class-nativesdk = "" 398RDEPENDS_${PN}_class-nativesdk = ""
352RDEPENDS_${PN}-build = "file bash perl" 399RDEPENDS_${PN}-build = "file bash perl"
353 400
354RDEPENDS_python-rpm = "${PN}" 401RDEPENDS_python-rpm = "${PN} python"
355 402
356FILES_python-rpm = "${libdir}/python*/site-packages/rpm" 403FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
357PROVIDES += "python-rpm" 404PROVIDES += "python-rpm"
@@ -408,6 +455,9 @@ do_configure() {
408} 455}
409 456
410do_install_append() { 457do_install_append() {
458 # Preserve the previous default of DSA self-signed pkgs
459 sed -i -e 's,%_build_sign.*,%_build_sign DSA,' ${D}/${libdir}/rpm/macros.rpmbuild
460
411 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros 461 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
412 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* 462 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
413 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* 463 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
@@ -517,6 +567,14 @@ EOF
517 ${@multilib_rpmmacros(d)} 567 ${@multilib_rpmmacros(d)}
518} 568}
519 569
570do_install_append_class-native () {
571 sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
572}
573
574do_install_append_class-nativesdk () {
575 sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
576}
577
520def multilib_rpmmacros(d): 578def multilib_rpmmacros(d):
521 localdata = d.createCopy() 579 localdata = d.createCopy()
522 # We need to clear the TOOLCHAIN_OPTIONS (--sysroot) 580 # We need to clear the TOOLCHAIN_OPTIONS (--sysroot)