diff options
83 files changed, 0 insertions, 6097 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch b/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch deleted file mode 100644 index e9b73b8bfc..0000000000 --- a/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | From 06967a50f20095f5ca30b8214f4c98ba0f5262bf Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Marek Vasut <marex@denx.de> | ||
| 3 | Date: Sun, 3 Apr 2016 06:55:25 +0200 | ||
| 4 | Subject: [PATCH] Disable __sync_add_and_fetch_8 on nios2 | ||
| 5 | |||
| 6 | The NIOS2 softcore does not implement the __sync_add_and_fetch_8, | ||
| 7 | so disable it accordingly. | ||
| 8 | |||
| 9 | Signed-off-by: Marek Vasut <marex@denx.de> | ||
| 10 | Upstream-Status: Submitted | ||
| 11 | --- | ||
| 12 | rpmio/bson.h | 2 +- | ||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/rpmio/bson.h b/rpmio/bson.h | ||
| 16 | index 57023f1..60c7d02 100644 | ||
| 17 | --- a/rpmio/bson.h | ||
| 18 | +++ b/rpmio/bson.h | ||
| 19 | @@ -880,7 +880,7 @@ BSON_END_DECLS | ||
| 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 | +#if (__mips == 32) || (__nios2__) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)) | ||
| 25 | # define __BSON_NEED_ATOMIC_64 1 | ||
| 26 | #endif | ||
| 27 | |||
| 28 | -- | ||
| 29 | 2.8.0.rc3 | ||
| 30 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch b/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch deleted file mode 100644 index c9fb268687..0000000000 --- a/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | [PATCH] define EM_AARCH64 | ||
| 2 | |||
| 3 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 4 | |||
| 5 | EM_AARCH64 maybe not be defined due to old version elf.h, and lead to | ||
| 6 | that debugedit can not work on aarch64 elf object files, since there is | ||
| 7 | no other dependence, except these two macro, define them to make | ||
| 8 | debugedit work on aarch64 elf files. | ||
| 9 | |||
| 10 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
| 11 | --- | ||
| 12 | tools/debugedit.c | 7 +++++++ | ||
| 13 | 1 file changed, 7 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/tools/debugedit.c b/tools/debugedit.c | ||
| 16 | index de693ed..d16a641 100644 | ||
| 17 | --- a/tools/debugedit.c | ||
| 18 | +++ b/tools/debugedit.c | ||
| 19 | @@ -35,6 +35,13 @@ | ||
| 20 | |||
| 21 | #include <gelf.h> | ||
| 22 | |||
| 23 | +#ifndef EM_AARCH64 | ||
| 24 | +#define EM_AARCH64 183 /* ARM AARCH64 */ | ||
| 25 | +#endif | ||
| 26 | +#ifndef R_AARCH64_ABS32 | ||
| 27 | +#define R_AARCH64_ABS32 258 | ||
| 28 | +#endif | ||
| 29 | + | ||
| 30 | /* some defines taken from the dwarf standard */ | ||
| 31 | |||
| 32 | #define DW_TAG_compile_unit 0x11 | ||
| 33 | -- | ||
| 34 | 1.9.1 | ||
| 35 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch b/meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch deleted file mode 100644 index eb43a87346..0000000000 --- a/meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | From fa9726ff69f86d6a87c4c4bd7e3d2881999a872a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Markus Lehtonen <markus.lehtonen@linux.intel.com> | ||
| 3 | Date: Thu, 23 Feb 2017 11:14:20 +0200 | ||
| 4 | Subject: [PATCH] macros: add %_gpg_sign_cmd_extra_args | ||
| 5 | |||
| 6 | Similar to what rpm4 has. This macro can be used to customize the | ||
| 7 | gpg command line options when signing packages. This is needed for | ||
| 8 | gpg 2.1 which requires "--pinentry-mode loopback" to allow | ||
| 9 | non-interactive signing. | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> | ||
| 14 | --- | ||
| 15 | macros/macros.in | 5 ++++- | ||
| 16 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
| 17 | |||
| 18 | diff --git a/macros/macros.in b/macros/macros.in | ||
| 19 | index 8bc5840..fda3c66 100644 | ||
| 20 | --- a/macros/macros.in | ||
| 21 | +++ b/macros/macros.in | ||
| 22 | @@ -524,7 +524,9 @@ $_arbitrary_tags_tests Foo:Bar | ||
| 23 | %_gpg_passphrase_way %{?_gpg_passphrase:--passphrase "%{_gpg_passphrase}"}%{!?_gpg_passphrase:--passphrase-fd 3} | ||
| 24 | |||
| 25 | %__gpg_check_password_cmd %{__gpg} \ | ||
| 26 | - gpg --batch --no-verbose %{_gpg_passphrase_way} -u "%{_gpg_name}" -so - | ||
| 27 | + gpg --batch --no-verbose %{_gpg_passphrase_way} \ | ||
| 28 | + %{?_gpg_sign_cmd_extra_args:%{_gpg_sign_cmd_extra_args}} \ | ||
| 29 | + -u "%{_gpg_name}" -so - | ||
| 30 | #%__pgp_check_password_cmd %{__pgp} \ | ||
| 31 | # pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf | ||
| 32 | #%__pgp5_check_password_cmd %{__pgp} \ | ||
| 33 | @@ -532,6 +534,7 @@ $_arbitrary_tags_tests Foo:Bar | ||
| 34 | |||
| 35 | %__gpg_sign_cmd %{__gpg} \ | ||
| 36 | gpg --batch --no-verbose --no-armor %{_gpg_passphrase_way} --no-secmem-warning \ | ||
| 37 | + %{?_gpg_sign_cmd_extra_args:%{_gpg_sign_cmd_extra_args}} \ | ||
| 38 | -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename} | ||
| 39 | #%__pgp_sign_cmd %{__pgp} \ | ||
| 40 | # pgp +batchmode=on +verbose=0 +armor=off \ | ||
| 41 | -- | ||
| 42 | 2.10.2 | ||
| 43 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch b/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch deleted file mode 100644 index 70dd4ff532..0000000000 --- a/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch +++ /dev/null | |||
| @@ -1,294 +0,0 @@ | |||
| 1 | From 0af17c2ae86c1e8e42b96f6dface08f535bb55ad Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 14 Feb 2016 08:33:24 +0000 | ||
| 4 | Subject: [PATCH] rpm: Fix build on musl | ||
| 5 | |||
| 6 | Provide alternatives to assumptions about glibc | ||
| 7 | on linux | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | |||
| 11 | Updated to 5.4.16 (CVS) | ||
| 12 | |||
| 13 | The patch will likely need additional rework before it can be accepted upsteam | ||
| 14 | due to the way MUSL changes are patched in. | ||
| 15 | |||
| 16 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 17 | |||
| 18 | --- | ||
| 19 | Upstream-Status: Pending | ||
| 20 | |||
| 21 | lib/poptALL.c | 2 ++ | ||
| 22 | rpmio/fts.c | 4 ++++ | ||
| 23 | rpmio/poptIO.c | 2 ++ | ||
| 24 | rpmqv.c | 2 ++ | ||
| 25 | system.h | 13 ++++++------- | ||
| 26 | tools/debugedit.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ | ||
| 27 | tools/rpm2cpio.c | 2 ++ | ||
| 28 | tools/rpmcache.c | 2 ++ | ||
| 29 | tools/rpmcmp.c | 2 ++ | ||
| 30 | tools/rpmdeps-oecore.c | 2 ++ | ||
| 31 | tools/rpmdeps.c | 2 ++ | ||
| 32 | tools/rpmdigest.c | 2 ++ | ||
| 33 | tools/rpmfind.c | 6 +++--- | ||
| 34 | 13 files changed, 78 insertions(+), 10 deletions(-) | ||
| 35 | |||
| 36 | Index: rpm-5.4.15/rpmio/fts.c | ||
| 37 | =================================================================== | ||
| 38 | --- rpm-5.4.15.orig/rpmio/fts.c | ||
| 39 | +++ rpm-5.4.15/rpmio/fts.c | ||
| 40 | @@ -124,6 +124,10 @@ static char sccsid[] = "@(#)fts.c 8.6 (B | ||
| 41 | # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) | ||
| 42 | #endif | ||
| 43 | |||
| 44 | +#ifndef _STAT_VER | ||
| 45 | +# define _STAT_VER 0 | ||
| 46 | +#endif | ||
| 47 | + | ||
| 48 | #if !defined(_D_EXACT_NAMLEN) | ||
| 49 | # define _D_EXACT_NAMLEN(d) (strlen((d)->d_name)) | ||
| 50 | #endif | ||
| 51 | Index: rpm-5.4.15/tools/debugedit.c | ||
| 52 | =================================================================== | ||
| 53 | --- rpm-5.4.15.orig/tools/debugedit.c | ||
| 54 | +++ rpm-5.4.15/tools/debugedit.c | ||
| 55 | @@ -22,7 +22,12 @@ | ||
| 56 | #include <byteswap.h> | ||
| 57 | #include <endian.h> | ||
| 58 | #include <errno.h> | ||
| 59 | +#ifdef __GLIBC__ | ||
| 60 | #include <error.h> | ||
| 61 | +#else | ||
| 62 | +#include <stdarg.h> | ||
| 63 | +void error(int, int, const char *, ...); | ||
| 64 | +#endif | ||
| 65 | #include <limits.h> | ||
| 66 | #include <string.h> | ||
| 67 | #include <stdlib.h> | ||
| 68 | @@ -1535,6 +1540,48 @@ handle_build_id (DSO *dso, Elf_Data *bui | ||
| 69 | puts (hex); | ||
| 70 | } | ||
| 71 | } | ||
| 72 | +#ifndef __GLIBC__ | ||
| 73 | +extern char *__progname; | ||
| 74 | + | ||
| 75 | +void (*error_print_progname)(void) = 0; | ||
| 76 | +unsigned int error_message_count = 0; | ||
| 77 | +int error_one_per_line = 0; | ||
| 78 | + | ||
| 79 | +static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap) | ||
| 80 | +{ | ||
| 81 | + if (file && error_one_per_line) { | ||
| 82 | + static const char *oldfile; | ||
| 83 | + static unsigned int oldline; | ||
| 84 | + if (line == oldline && strcmp(file, oldfile) == 0) | ||
| 85 | + return; | ||
| 86 | + oldfile = file; | ||
| 87 | + oldline = line; | ||
| 88 | + } | ||
| 89 | + if (error_print_progname) | ||
| 90 | + error_print_progname(); | ||
| 91 | + else | ||
| 92 | + fprintf(stderr, "%s: ", __progname); | ||
| 93 | + if (file) | ||
| 94 | + fprintf(stderr, "%s:%u: ", file, line); | ||
| 95 | + vfprintf(stderr, fmt, ap); | ||
| 96 | + if (e) | ||
| 97 | + fprintf(stderr, ": %s", strerror(e)); | ||
| 98 | + putc('\n', stderr); | ||
| 99 | + fflush(stderr); | ||
| 100 | + error_message_count++; | ||
| 101 | + if (status) | ||
| 102 | + exit(status); | ||
| 103 | +} | ||
| 104 | + | ||
| 105 | +void error(int status, int e, const char *fmt, ...) | ||
| 106 | +{ | ||
| 107 | + va_list ap; | ||
| 108 | + va_start(ap,fmt); | ||
| 109 | + eprint(status, e, 0, 0, fmt, ap); | ||
| 110 | + va_end(ap); | ||
| 111 | +} | ||
| 112 | + | ||
| 113 | +#endif | ||
| 114 | |||
| 115 | /* It avoided the segment fault while file's bss offset have a large number. | ||
| 116 | See https://bugzilla.redhat.com/show_bug.cgi?id=1019707 | ||
| 117 | Index: rpm-5.4.15/tools/rpmfind.c | ||
| 118 | =================================================================== | ||
| 119 | --- rpm-5.4.15.orig/tools/rpmfind.c | ||
| 120 | +++ rpm-5.4.15/tools/rpmfind.c | ||
| 121 | @@ -1175,7 +1175,7 @@ find_parsenum(PLAN *plan, const char *op | ||
| 122 | * and endchar points to the beginning of the string we know we have | ||
| 123 | * a syntax error. | ||
| 124 | */ | ||
| 125 | -#if defined(__sun) | ||
| 126 | +#if defined(__sun) || !defined(__GLIBC_) | ||
| 127 | value = strtoll(str, &endchar, 10); | ||
| 128 | #else | ||
| 129 | value = strtoq(str, &endchar, 10); | ||
| 130 | @@ -1215,7 +1215,7 @@ find_parsetime(PLAN *plan, const char *o | ||
| 131 | break; | ||
| 132 | } | ||
| 133 | |||
| 134 | -#if defined(__sun) | ||
| 135 | +#if defined(__sun) || !defined(__GLIBC_) | ||
| 136 | value = strtoll(str, &unit, 10); | ||
| 137 | #else | ||
| 138 | value = strtoq(str, &unit, 10); | ||
| 139 | @@ -1253,7 +1253,7 @@ find_parsetime(PLAN *plan, const char *o | ||
| 140 | str = unit + 1; | ||
| 141 | if (*str == '\0') /* EOS */ | ||
| 142 | break; | ||
| 143 | -#if defined(__sun) | ||
| 144 | +#if defined(__sun) || !defined(__GLIBC_) | ||
| 145 | value = strtoll(str, &unit, 10); | ||
| 146 | #else | ||
| 147 | value = strtoq(str, &unit, 10); | ||
| 148 | Index: rpm-5.4.15/system.h | ||
| 149 | =================================================================== | ||
| 150 | --- rpm-5.4.15.orig/system.h | ||
| 151 | +++ rpm-5.4.15/system.h | ||
| 152 | @@ -372,16 +372,15 @@ extern int _tolower(int) __THROW /*@*/; | ||
| 153 | #define __progname __assert_program_name | ||
| 154 | #endif | ||
| 155 | #define setprogname(pn) | ||
| 156 | +/*@unchecked@*/ | ||
| 157 | +extern const char *__progname; | ||
| 158 | #else | ||
| 159 | -#define __progname program_name | ||
| 160 | -#define setprogname(pn) \ | ||
| 161 | - { if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \ | ||
| 162 | - else __progname = pn; \ | ||
| 163 | - } | ||
| 164 | -#endif | ||
| 165 | +#define setprogname(pn) | ||
| 166 | +#define progname __progname | ||
| 167 | |||
| 168 | /*@unchecked@*/ | ||
| 169 | -extern const char *__progname; | ||
| 170 | +extern char *__progname; | ||
| 171 | +#endif | ||
| 172 | |||
| 173 | /* -- Retrofit missing prototypes (if needed). */ | ||
| 174 | #ifdef __cplusplus | ||
| 175 | Index: rpm-5.4.15/rpmio/poptIO.c | ||
| 176 | =================================================================== | ||
| 177 | --- rpm-5.4.15.orig/rpmio/poptIO.c | ||
| 178 | +++ rpm-5.4.15/rpmio/poptIO.c | ||
| 179 | @@ -65,7 +65,9 @@ extern int _rpmsvn_debug; | ||
| 180 | GENfree(rpmioP) | ||
| 181 | #endif /* __cplusplus */ | ||
| 182 | |||
| 183 | +#ifdef __GLIBC__ | ||
| 184 | const char *__progname; | ||
| 185 | +#endif | ||
| 186 | |||
| 187 | #if !defined(POPT_ARGFLAG_TOGGLE) /* XXX compat with popt < 1.15 */ | ||
| 188 | #define POPT_ARGFLAG_TOGGLE 0 | ||
| 189 | Index: rpm-5.4.15/lib/poptALL.c | ||
| 190 | =================================================================== | ||
| 191 | --- rpm-5.4.15.orig/lib/poptALL.c | ||
| 192 | +++ rpm-5.4.15/lib/poptALL.c | ||
| 193 | @@ -4,7 +4,9 @@ | ||
| 194 | */ | ||
| 195 | |||
| 196 | #include "system.h" | ||
| 197 | +#ifdef __GLIBC__ | ||
| 198 | extern const char *__progname; | ||
| 199 | +#endif | ||
| 200 | |||
| 201 | #if defined(RPM_VENDOR_WINDRIVER) | ||
| 202 | const char *__usrlibrpm = USRLIBRPM; | ||
| 203 | Index: rpm-5.4.15/tools/rpm2cpio.c | ||
| 204 | =================================================================== | ||
| 205 | --- rpm-5.4.15.orig/tools/rpm2cpio.c | ||
| 206 | +++ rpm-5.4.15/tools/rpm2cpio.c | ||
| 207 | @@ -1,7 +1,9 @@ | ||
| 208 | /* rpmarchive: spit out the main archive portion of a package */ | ||
| 209 | |||
| 210 | #include "system.h" | ||
| 211 | +#ifdef __GLIBC__ | ||
| 212 | const char *__progname; | ||
| 213 | +#endif | ||
| 214 | |||
| 215 | #include <rpmio.h> | ||
| 216 | #include <rpmiotypes.h> /* XXX fnpyKey */ | ||
| 217 | Index: rpm-5.4.15/tools/rpmcache.c | ||
| 218 | =================================================================== | ||
| 219 | --- rpm-5.4.15.orig/tools/rpmcache.c | ||
| 220 | +++ rpm-5.4.15/tools/rpmcache.c | ||
| 221 | @@ -3,7 +3,9 @@ | ||
| 222 | */ | ||
| 223 | |||
| 224 | #include "system.h" | ||
| 225 | +#ifdef __GLIBC__ | ||
| 226 | const char *__progname; | ||
| 227 | +#endif | ||
| 228 | |||
| 229 | #include <fnmatch.h> | ||
| 230 | #include <fts.h> | ||
| 231 | Index: rpm-5.4.15/tools/rpmdeps-oecore.c | ||
| 232 | =================================================================== | ||
| 233 | --- rpm-5.4.15.orig/tools/rpmdeps-oecore.c | ||
| 234 | +++ rpm-5.4.15/tools/rpmdeps-oecore.c | ||
| 235 | @@ -1,5 +1,7 @@ | ||
| 236 | #include "system.h" | ||
| 237 | +#ifdef __GLIBC__ | ||
| 238 | const char *__progname; | ||
| 239 | +#endif | ||
| 240 | |||
| 241 | #include <rpmio.h> | ||
| 242 | #include <rpmiotypes.h> | ||
| 243 | Index: rpm-5.4.15/tools/rpmdeps.c | ||
| 244 | =================================================================== | ||
| 245 | --- rpm-5.4.15.orig/tools/rpmdeps.c | ||
| 246 | +++ rpm-5.4.15/tools/rpmdeps.c | ||
| 247 | @@ -1,5 +1,7 @@ | ||
| 248 | #include "system.h" | ||
| 249 | +#ifdef __GLIBC__ | ||
| 250 | const char *__progname; | ||
| 251 | +#endif | ||
| 252 | |||
| 253 | #include <rpmio.h> | ||
| 254 | #include <rpmiotypes.h> | ||
| 255 | Index: rpm-5.4.15/tools/rpmdigest.c | ||
| 256 | =================================================================== | ||
| 257 | --- rpm-5.4.15.orig/tools/rpmdigest.c | ||
| 258 | +++ rpm-5.4.15/tools/rpmdigest.c | ||
| 259 | @@ -1,6 +1,8 @@ | ||
| 260 | #include "system.h" | ||
| 261 | +#ifdef __GLIBC__ | ||
| 262 | /*@unchecked@*/ | ||
| 263 | extern const char * __progname; | ||
| 264 | +#endif | ||
| 265 | |||
| 266 | #define _RPMIOB_INTERNAL | ||
| 267 | #include <rpmiotypes.h> | ||
| 268 | Index: rpm-5.4.15/tools/rpmcmp.c | ||
| 269 | =================================================================== | ||
| 270 | --- rpm-5.4.15.orig/tools/rpmcmp.c | ||
| 271 | +++ rpm-5.4.15/tools/rpmcmp.c | ||
| 272 | @@ -13,8 +13,10 @@ | ||
| 273 | |||
| 274 | #include "debug.h" | ||
| 275 | |||
| 276 | +#ifdef __GLIBC__ | ||
| 277 | const char *__progname; | ||
| 278 | #define progname __progname | ||
| 279 | +#endif | ||
| 280 | |||
| 281 | static int pointRpmEVR(ARGV_t av) | ||
| 282 | { | ||
| 283 | Index: rpm-5.4.15/rpmqv.c | ||
| 284 | =================================================================== | ||
| 285 | --- rpm-5.4.15.orig/rpmqv.c | ||
| 286 | +++ rpm-5.4.15/rpmqv.c | ||
| 287 | @@ -1,5 +1,7 @@ | ||
| 288 | #include "system.h" | ||
| 289 | +#ifdef __GLIBC__ | ||
| 290 | extern const char *__progname; | ||
| 291 | +#endif | ||
| 292 | |||
| 293 | /* Copyright (C) 1998-2002 - Red Hat, Inc. */ | ||
| 294 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch b/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch deleted file mode 100644 index 77dc5b67d2..0000000000 --- a/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | From d8fcc3cbeec4defb5babde5bd09ea294dd3fd08b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Sun, 3 Jul 2016 19:01:59 -0700 | ||
| 4 | Subject: [PATCH] system.h/query.c: support nosignature | ||
| 5 | |||
| 6 | * Define SUPPORT_NOSIGNATURES to 1 in system.h | ||
| 7 | * !QVA_ISSET(qva->qva_flags, SIGNATURE) -> QVA_ISSET(qva->qva_flags, SIGNATURE), | ||
| 8 | otherwise, when use --nosignature would read database and verify | ||
| 9 | signature, this is not expected. | ||
| 10 | |||
| 11 | Upstream-Status: Submitted [Sent email to rpm-devel@rpm5.org] | ||
| 12 | |||
| 13 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 14 | --- | ||
| 15 | lib/query.c | 6 +++--- | ||
| 16 | system.h | 4 ++-- | ||
| 17 | 2 files changed, 5 insertions(+), 5 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/lib/query.c b/lib/query.c | ||
| 20 | index 50a7453..b761d76 100644 | ||
| 21 | --- a/lib/query.c | ||
| 22 | +++ b/lib/query.c | ||
| 23 | @@ -954,19 +954,19 @@ JBJDEBUG((stderr, "--> %s(%p,%p,%p)\n", __FUNCTION__, ts, qva, argv)); | ||
| 24 | vsflags = (rpmVSFlags) rpmExpandNumeric("%{?_vsflags_query}"); | ||
| 25 | vsflags = (rpmVSFlags) 0; /* XXX FIXME: ignore default disablers. */ | ||
| 26 | #if defined(SUPPORT_NOSIGNATURES) | ||
| 27 | - if (!QVA_ISSET(qva->qva_flags, DIGEST)) { | ||
| 28 | + if (QVA_ISSET(qva->qva_flags, DIGEST)) { | ||
| 29 | VSF_SET(vsflags, NOSHA1HEADER); | ||
| 30 | VSF_SET(vsflags, NOMD5HEADER); | ||
| 31 | VSF_SET(vsflags, NOSHA1); | ||
| 32 | VSF_SET(vsflags, NOMD5); | ||
| 33 | } | ||
| 34 | - if (!QVA_ISSET(qva->qva_flags, SIGNATURE)) { | ||
| 35 | + if (QVA_ISSET(qva->qva_flags, SIGNATURE)) { | ||
| 36 | VSF_SET(vsflags, NODSAHEADER); | ||
| 37 | VSF_SET(vsflags, NORSAHEADER); | ||
| 38 | VSF_SET(vsflags, NODSA); | ||
| 39 | VSF_SET(vsflags, NORSA); | ||
| 40 | } | ||
| 41 | - if (!QVA_ISSET(qva->qva_flags, HDRCHK)) { | ||
| 42 | + if (QVA_ISSET(qva->qva_flags, HDRCHK)) { | ||
| 43 | VSF_SET(vsflags, NOHDRCHK); | ||
| 44 | } | ||
| 45 | VSF_CLR(vsflags, NEEDPAYLOAD); /* XXX needed? */ | ||
| 46 | diff --git a/system.h b/system.h | ||
| 47 | index 2ff8906..ad4619a 100644 | ||
| 48 | --- a/system.h | ||
| 49 | +++ b/system.h | ||
| 50 | @@ -787,9 +787,9 @@ static inline const char *rcsid(const char *p) { \ | ||
| 51 | #define SUPPORT_I18NSTRING_TYPE 1 | ||
| 52 | |||
| 53 | /** | ||
| 54 | - * Eliminate signature/digest disablers. | ||
| 55 | + * Signature/digest disablers. | ||
| 56 | */ | ||
| 57 | -#undef SUPPORT_NOSIGNATURES | ||
| 58 | +#define SUPPORT_NOSIGNATURES 1 | ||
| 59 | |||
| 60 | /** | ||
| 61 | * Permit ar(1) payloads. Disabled while rpmio/iosm.c is under development. | ||
| 62 | -- | ||
| 63 | 2.9.0 | ||
diff --git a/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch b/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch deleted file mode 100644 index 7128250093..0000000000 --- a/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | From 64851c6622aff64787a9fcea26cccde183b7c743 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Roy.Li" <rongqing.li@windriver.com> | ||
| 3 | Date: Tue, 11 Nov 2014 16:28:22 +0800 | ||
| 4 | Subject: [PATCH] using poptParseArgvString to parse the | ||
| 5 | _gpg_check_password_cmd | ||
| 6 | |||
| 7 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 8 | |||
| 9 | Both __gpg_check_password_cmd and __gpg_sign_cmd include "%{_gpg_name}", but | ||
| 10 | strace shows that gpg_name has a quote when run _gpg_check_password, | ||
| 11 | but not when run __gpg_sign_cmd; for example, if gpg_name is "tester" | ||
| 12 | |||
| 13 | execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose", | ||
| 14 | "--passphrase-fd", "3", "-u", "\"tester\"", "-so", "-"], [/* 20 vars */]) = 0 | ||
| 15 | |||
| 16 | execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose", "--no-armor", | ||
| 17 | "--passphrase-fd", "3", "--no-secmem-warning", "-u", "tester", "-sbo"..,) = 0 | ||
| 18 | |||
| 19 | it can be fixed by removing the quote around %{gpg_name} when define | ||
| 20 | __gpg_check_password_cmd in macros/macros, like below, but if gpg_name includes | ||
| 21 | space, it will not work. | ||
| 22 | |||
| 23 | %__gpg_check_password_cmd %{__gpg} \ | ||
| 24 | gpg --batch --no-verbose --passphrase-fd 3 -u %{_gpg_name} -so - | ||
| 25 | |||
| 26 | The poptParseArgvString function is used to parse _gpg_sign_cmd, so using | ||
| 27 | poptParseArgvString to parse __gpg_check_password_cmd to fix this issue. | ||
| 28 | |||
| 29 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
| 30 | --- | ||
| 31 | rpmdb/signature.c | 2 +- | ||
| 32 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 33 | |||
| 34 | diff --git a/rpmdb/signature.c b/rpmdb/signature.c | ||
| 35 | index c35e0ab..016e8d1 100644 | ||
| 36 | --- a/rpmdb/signature.c | ||
| 37 | +++ b/rpmdb/signature.c | ||
| 38 | @@ -529,7 +529,7 @@ int rpmCheckPassPhrase(const char * passPhrase) | ||
| 39 | (void) setenv("GNUPGHOME", gpg_path, 1); | ||
| 40 | |||
| 41 | cmd = rpmExpand("%{?__gpg_check_password_cmd}", NULL); | ||
| 42 | - rc = argvSplit(&av, cmd, NULL); | ||
| 43 | + rc = poptParseArgvString(cmd, NULL, (const char ***)&av); | ||
| 44 | if (!rc) | ||
| 45 | rc = execve(av[0], (char *const *)av+1, environ); | ||
| 46 | |||
| 47 | -- | ||
| 48 | 1.9.1 | ||
| 49 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch b/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch deleted file mode 100644 index 7894a4263d..0000000000 --- a/meta/recipes-devtools/rpm/rpm/configure.ac-check-for-both-gpg2-and-gpg.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | configure.ac: search for both gpg2 and gpg | ||
| 2 | |||
| 3 | On some platforms the GnuPG binary is named 'gpg2' whereas others have 'gpg'. | ||
| 4 | This patch increases compatibility by searching for 'gpg' in addition to | ||
| 5 | 'gpg2'. | ||
| 6 | |||
| 7 | Upstream-Status: Pending | ||
| 8 | |||
| 9 | Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> | ||
| 10 | --- | ||
| 11 | configure.ac | 2 +- | ||
| 12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/configure.ac b/configure.ac | ||
| 15 | index 6746b4c..f6922ae 100644 | ||
| 16 | --- a/configure.ac | ||
| 17 | +++ b/configure.ac | ||
| 18 | @@ -562,7 +562,7 @@ AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH) | ||
| 19 | AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH) | ||
| 20 | AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH) | ||
| 21 | AC_PATH_PROG(__GIT, git, %{_bindir}/git, $MYPATH) | ||
| 22 | -AC_PATH_PROG(__GPG, gpg2, %{_bindir}/gpg2, $MYPATH) | ||
| 23 | +AC_PATH_PROGS(__GPG, [gpg2 gpg], %{_bindir}/gpg2, $MYPATH) | ||
| 24 | AC_PATH_PROG(__GSR, gsr, %{_bindir}/gsr, $MYPATH) | ||
| 25 | AC_PATH_PROG(__GST_INSPECT, gst-inspect-0.10, %{_bindir}/gst-inspect-0.10, $MYPATH) | ||
| 26 | AC_PATH_PROG(__GZIP, gzip, /bin/gzip, $MYPATH) | ||
| 27 | -- | ||
| 28 | 2.1.4 | ||
| 29 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/dbconvert.patch b/meta/recipes-devtools/rpm/rpm/dbconvert.patch deleted file mode 100644 index 1fdbf0908a..0000000000 --- a/meta/recipes-devtools/rpm/rpm/dbconvert.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate | ||
| 2 | |||
| 3 | Hack to prevent unneeded demo app from building on older libc | ||
| 4 | where it will break the build | ||
| 5 | |||
| 6 | Index: rpm-5.4.14/tools/Makefile.am | ||
| 7 | =================================================================== | ||
| 8 | --- rpm-5.4.14.orig/tools/Makefile.am | ||
| 9 | +++ rpm-5.4.14/tools/Makefile.am | ||
| 10 | @@ -29,7 +29,7 @@ EXTRA_PROGRAMS = nix-copy-closure nix-en | ||
| 11 | xiu-instantiate xiu-store | ||
| 12 | noinst_PROGRAMS = | ||
| 13 | |||
| 14 | -EXTRA_PROGRAMS += augtool cudftool dbconvert debugedit \ | ||
| 15 | +EXTRA_PROGRAMS += augtool cudftool debugedit \ | ||
| 16 | nix-build nix-channel nix-collect-garbage \ | ||
| 17 | nix-log2xml nix-prefetch-url nix-pull nix-push \ | ||
| 18 | xiu-echo xiu-hash \ | ||
| 19 | @@ -64,7 +64,7 @@ pkgbin_PROGRAMS = \ | ||
| 20 | rpmcache rpmdigest rpmrepo rpmspecdump \ | ||
| 21 | rpmcmp rpmdeps rpmdeps-oecore sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ | ||
| 22 | if WITH_DB | ||
| 23 | -pkgbin_PROGRAMS += dbconvert | ||
| 24 | +pkgbin_PROGRAMS += | ||
| 25 | endif | ||
| 26 | dist_man_MANS = rpmgrep.1 | ||
| 27 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch b/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch deleted file mode 100644 index c83c8b5f3f..0000000000 --- a/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch +++ /dev/null | |||
| @@ -1,100 +0,0 @@ | |||
| 1 | During the recalculation of the buildid, it's necessary to change the word | ||
| 2 | back to the original endian. However, if we do this in-place, we've also | ||
| 3 | affected the headers that we're also working on. The side effect of this is | ||
| 4 | we can no longer rely on 'sh_type' as it may have been changed. | ||
| 5 | |||
| 6 | This patch ensures that any time we translate the loaded data to the machine | ||
| 7 | format, we only do it in a backup copy and never the original copy. | ||
| 8 | |||
| 9 | Note: in all other places a backup copy was used, just not buildid processing. | ||
| 10 | |||
| 11 | Also the process (...) function was modified to verify the data is not | ||
| 12 | NULL as well. This is an extra check and is not strictly necessary. | ||
| 13 | |||
| 14 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 15 | |||
| 16 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 17 | |||
| 18 | Index: rpm/tools/debugedit.c | ||
| 19 | =================================================================== | ||
| 20 | --- rpm.orig/tools/debugedit.c | ||
| 21 | +++ rpm/tools/debugedit.c | ||
| 22 | @@ -1403,7 +1403,8 @@ static inline void process (hashFunction | ||
| 23 | const void *data, size_t size) | ||
| 24 | { | ||
| 25 | memchunk chunk = { .data = (void *) data, .size = size }; | ||
| 26 | - hashFunctionContextUpdateMC (ctx, &chunk); | ||
| 27 | + if (data != NULL && size != 0) | ||
| 28 | + hashFunctionContextUpdateMC (ctx, &chunk); | ||
| 29 | } | ||
| 30 | |||
| 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 | ||
| 33 | GElf_Ehdr ehdr; | ||
| 34 | GElf_Phdr phdr; | ||
| 35 | GElf_Shdr shdr; | ||
| 36 | - } u; | ||
| 37 | - Elf_Data x = { .d_version = EV_CURRENT, .d_buf = &u }; | ||
| 38 | - | ||
| 39 | - x.d_type = ELF_T_EHDR; | ||
| 40 | - x.d_size = sizeof u.ehdr; | ||
| 41 | - u.ehdr = dso->ehdr; | ||
| 42 | - u.ehdr.e_phoff = u.ehdr.e_shoff = 0; | ||
| 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 | + | ||
| 48 | + src.d_type = ELF_T_EHDR; | ||
| 49 | + src.d_size = sizeof u1.ehdr; | ||
| 50 | + dest.d_size = sizeof u2.ehdr; | ||
| 51 | + u1.ehdr = dso->ehdr; | ||
| 52 | + u1.ehdr.e_phoff = u1.ehdr.e_shoff = 0; | ||
| 53 | + if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL) | ||
| 54 | { | ||
| 55 | bad: | ||
| 56 | fprintf (stderr, "Failed to compute header checksum: %s\n", | ||
| 57 | @@ -1471,29 +1474,31 @@ handle_build_id (DSO *dso, Elf_Data *bui | ||
| 58 | exit (1); | ||
| 59 | } | ||
| 60 | |||
| 61 | - x.d_type = ELF_T_PHDR; | ||
| 62 | - x.d_size = sizeof u.phdr; | ||
| 63 | + src.d_type = ELF_T_PHDR; | ||
| 64 | + src.d_size = sizeof u1.phdr; | ||
| 65 | + dest.d_size = sizeof u2.phdr; | ||
| 66 | for (i = 0; i < dso->ehdr.e_phnum; ++i) | ||
| 67 | { | ||
| 68 | - if (gelf_getphdr (dso->elf, i, &u.phdr) == NULL) | ||
| 69 | + if (gelf_getphdr (dso->elf, i, &u1.phdr) == NULL) | ||
| 70 | goto bad; | ||
| 71 | - if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL) | ||
| 72 | + if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL) | ||
| 73 | goto bad; | ||
| 74 | - process (&ctx, x.d_buf, x.d_size); | ||
| 75 | + process (&ctx, dest.d_buf, dest.d_size); | ||
| 76 | } | ||
| 77 | |||
| 78 | - x.d_type = ELF_T_SHDR; | ||
| 79 | - x.d_size = sizeof u.shdr; | ||
| 80 | + src.d_type = ELF_T_SHDR; | ||
| 81 | + src.d_size = sizeof u1.shdr; | ||
| 82 | + dest.d_size = sizeof u2.shdr; | ||
| 83 | for (i = 0; i < dso->ehdr.e_shnum; ++i) | ||
| 84 | if (dso->scn[i] != NULL) | ||
| 85 | { | ||
| 86 | - u.shdr = dso->shdr[i]; | ||
| 87 | - u.shdr.sh_offset = 0; | ||
| 88 | - if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL) | ||
| 89 | + u1.shdr = dso->shdr[i]; | ||
| 90 | + u1.shdr.sh_offset = 0; | ||
| 91 | + if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL) | ||
| 92 | goto bad; | ||
| 93 | - process (&ctx, x.d_buf, x.d_size); | ||
| 94 | + process (&ctx, dest.d_buf, dest.d_size); | ||
| 95 | |||
| 96 | - if (u.shdr.sh_type != SHT_NOBITS) | ||
| 97 | + if (u1.shdr.sh_type != SHT_NOBITS) | ||
| 98 | { | ||
| 99 | Elf_Data *d = elf_rawdata (dso->scn[i], NULL); | ||
| 100 | if (d == NULL) | ||
diff --git a/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch b/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch deleted file mode 100644 index 8040482536..0000000000 --- a/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch +++ /dev/null | |||
| @@ -1,65 +0,0 @@ | |||
| 1 | debugedit: fix segment fault while file's bss offset have a large number | ||
| 2 | |||
| 3 | While ELF_C_RDWR_MMAP was used, elf_begin invoked mmap() to map file | ||
| 4 | into memory. While the file's bss Offset has a large number, elf_update | ||
| 5 | caculated file size by __elf64_updatenull_wrlock and the size was | ||
| 6 | enlarged. | ||
| 7 | |||
| 8 | In this situation, elf_update invoked ftruncate to enlarge the file, | ||
| 9 | and memory size (elf->maximum_size) also was incorrectly updated. | ||
| 10 | There was segment fault in elf_end which invoked munmap with the | ||
| 11 | length is the enlarged file size, not the mmap's length. | ||
| 12 | |||
| 13 | Before the above operations, invoke elf_begin/elf_update/elf_end | ||
| 14 | with ELF_C_RDWR and ELF_F_LAYOUT set to enlarge the above file, it | ||
| 15 | could make sure the file is safe for the following elf operations. | ||
| 16 | |||
| 17 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 19 | --- | ||
| 20 | tools/debugedit.c | 25 +++++++++++++++++++++++++ | ||
| 21 | 1 file changed, 25 insertions(+) | ||
| 22 | |||
| 23 | Index: rpm-5.4.14/tools/debugedit.c | ||
| 24 | =================================================================== | ||
| 25 | --- rpm-5.4.14.orig/tools/debugedit.c | ||
| 26 | +++ rpm-5.4.14/tools/debugedit.c | ||
| 27 | @@ -1525,6 +1525,28 @@ handle_build_id (DSO *dso, Elf_Data *bui | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | +/* It avoided the segment fault while file's bss offset have a large number. | ||
| 32 | + See https://bugzilla.redhat.com/show_bug.cgi?id=1019707 | ||
| 33 | + https://bugzilla.redhat.com/show_bug.cgi?id=1020842 for detail. */ | ||
| 34 | +void valid_file(int fd) | ||
| 35 | +{ | ||
| 36 | + Elf *elf = elf_begin (fd, ELF_C_RDWR, NULL); | ||
| 37 | + if (elf == NULL) | ||
| 38 | + { | ||
| 39 | + error (1, 0, "elf_begin: %s", elf_errmsg (-1)); | ||
| 40 | + return; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT); | ||
| 44 | + | ||
| 45 | + if (elf_update (elf, ELF_C_WRITE) < 0) | ||
| 46 | + error (1, 0, "elf_update: %s", elf_errmsg (-1)); | ||
| 47 | + | ||
| 48 | + elf_end (elf); | ||
| 49 | + | ||
| 50 | + return; | ||
| 51 | +} | ||
| 52 | + | ||
| 53 | int | ||
| 54 | main (int argc, char *argv[]) | ||
| 55 | { | ||
| 56 | @@ -1621,6 +1643,9 @@ main (int argc, char *argv[]) | ||
| 57 | exit (1); | ||
| 58 | } | ||
| 59 | |||
| 60 | + /* Make sure the file is valid. */ | ||
| 61 | + valid_file(fd); | ||
| 62 | + | ||
| 63 | dso = fdopen_dso (fd, file); | ||
| 64 | if (dso == NULL) | ||
| 65 | exit (1); | ||
diff --git a/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch b/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch deleted file mode 100644 index 0a372c6dad..0000000000 --- a/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | gcc6 has fixed a long standing c++ include issue where <cheader> | ||
| 2 | was different from <header.h> inclusion via | ||
| 3 | |||
| 4 | https://gcc.gnu.org/ml/libstdc++/2016-01/msg00025.html | ||
| 5 | |||
| 6 | and its also descibed in https://gcc.gnu.org/gcc-6/porting_to.html | ||
| 7 | rpmio component uses some .cpp and .cc fies which need to use | ||
| 8 | C stdlib.h from C library and not the C++ libstdc++ header | ||
| 9 | therefore we pass _GLIBCXX_INCLUDE_NEXT_C_HEADERS so that it | ||
| 10 | keeps the old behavior | ||
| 11 | |||
| 12 | /a/build/tmp/sysroots/raspberrypi2/usr/include/c++/6.0.1/cstdlib:143:11: error: '::getenv' has not been declared | ||
| 13 | using ::getenv; | ||
| 14 | ^~~~~~ | ||
| 15 | In file included from ../../rpm-5.4.15/system.h:201:0, | ||
| 16 | from ../../rpm-5.4.15/rpmio/rpmjs.cpp:1: | ||
| 17 | /a/build/tmp/sysroots/raspberrypi2/usr/include/c++/6.0.1/stdlib.h:62:12: error: 'std::getenv' has not been declared | ||
| 18 | using std::getenv; | ||
| 19 | |||
| 20 | Upstream-Status: Pending | ||
| 21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 22 | |||
| 23 | Index: rpm-5.4.15/rpmio/Makefile.am | ||
| 24 | =================================================================== | ||
| 25 | --- rpm-5.4.15.orig/rpmio/Makefile.am | ||
| 26 | +++ rpm-5.4.15/rpmio/Makefile.am | ||
| 27 | @@ -151,7 +151,7 @@ librpmio_la_SOURCES = \ | ||
| 28 | groestl.c hamsi.c jh.c keccak.c lane.c luffa.c md2.c md6.c radiogatun.c\ | ||
| 29 | salsa10.c salsa20.c shabal.c shavite3.c simd.c skein.c tib3.c tiger.c \ | ||
| 30 | rpmgit.c rpmio-stub.c \ | ||
| 31 | - rpmjs.cpp rpmjsio.c rpmkeyring.c \ | ||
| 32 | + rpmjni.cc rpmjs.cpp rpmjsio.c rpmkeyring.c \ | ||
| 33 | rpmnix.c rpmodbc.c rpmsql.c set.c \ | ||
| 34 | ar.c \ | ||
| 35 | argv.c \ | ||
| 36 | @@ -195,7 +195,6 @@ librpmio_la_SOURCES = \ | ||
| 37 | rpmhook.c \ | ||
| 38 | rpmio.c \ | ||
| 39 | rpmiob.c \ | ||
| 40 | - rpmjni.cc \ | ||
| 41 | rpmku.c \ | ||
| 42 | rpmlog.c \ | ||
| 43 | rpmltc.c \ | ||
| 44 | @@ -279,7 +278,9 @@ keccak.lo: $(top_srcdir)/rpmio/keccak.c | ||
| 45 | #rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.c | ||
| 46 | # @$(LTCOMPILE) -O0 -c $< | ||
| 47 | rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.cpp | ||
| 48 | - @$(LTCOMPILE) -O0 -c $< | ||
| 49 | + @$(LTCOMPILE) -O0 -c -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS $< | ||
| 50 | +rpmjni.lo: $(top_srcdir)/rpmio/rpmjni.cc | ||
| 51 | + @$(LTCOMPILE) -O0 -c -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS $< | ||
| 52 | |||
| 53 | YACC = byacc -d | ||
| 54 | getdate.c: getdate.y | ||
diff --git a/meta/recipes-devtools/rpm/rpm/header-include-fix.patch b/meta/recipes-devtools/rpm/rpm/header-include-fix.patch deleted file mode 100644 index e72df45b5a..0000000000 --- a/meta/recipes-devtools/rpm/rpm/header-include-fix.patch +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | Update two rpm headers to include other headers. | ||
| 2 | |||
| 3 | Using rpmdb.h w/o including errno.h may result in a warning. | ||
| 4 | |||
| 5 | Using rpmtag.h w/o also adding stdint.h will result in numerous failures | ||
| 6 | about unknown types on modern compilers. | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 9 | |||
| 10 | Signed-off-by: Qing He <qing.he@intel.com> | ||
| 11 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 12 | |||
| 13 | Index: rpm-5.4.14/rpmdb/rpmdb.h | ||
| 14 | =================================================================== | ||
| 15 | --- rpm-5.4.14.orig/rpmdb/rpmdb.h | ||
| 16 | +++ rpm-5.4.14/rpmdb/rpmdb.h | ||
| 17 | @@ -9,6 +9,7 @@ | ||
| 18 | |||
| 19 | #include <assert.h> | ||
| 20 | #include <mire.h> | ||
| 21 | +#include <errno.h> | ||
| 22 | |||
| 23 | #include <rpmtypes.h> | ||
| 24 | #include <rpmtag.h> /* XXX Header typedef */ | ||
| 25 | Index: rpm-5.4.14/rpmdb/rpmtag.h | ||
| 26 | =================================================================== | ||
| 27 | --- rpm-5.4.14.orig/rpmdb/rpmtag.h | ||
| 28 | +++ rpm-5.4.14/rpmdb/rpmtag.h | ||
| 29 | @@ -7,6 +7,7 @@ | ||
| 30 | |||
| 31 | #include <rpmiotypes.h> | ||
| 32 | #include <rpmsw.h> | ||
| 33 | +#include <stdint.h> | ||
| 34 | |||
| 35 | #ifdef __cplusplus | ||
| 36 | extern "C" { | ||
diff --git a/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch b/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch deleted file mode 100644 index 5d936db5a3..0000000000 --- a/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | rpm: Resolve parallel install issue when installing lua | ||
| 2 | |||
| 3 | When lua is being installed on some systems that are being run with high levels | ||
| 4 | of parallelization there are cases where install-data-am and install-exec-hook | ||
| 5 | are processed at the same or a very short time apart. This causes | ||
| 6 | install-pkgbinPROGRAMS, which is a dependency of both, to be run at around the | ||
| 7 | same time This sometimes causes file contention and will sometimes be in a state | ||
| 8 | where install-exec-hook is looking for a file that is being installed or both | ||
| 9 | install-pkgbinPROGRAMS being run are installing the same file and fail because | ||
| 10 | it cannon create a new file. | ||
| 11 | |||
| 12 | This patch allows install-exec-hook to be called by install-data-am instead of | ||
| 13 | install-exec-am. It also removed the dependency in install-data-hook on | ||
| 14 | install-pkgbinPROGRAMS. This means install-pkgbinPROGRAMS will only be run once | ||
| 15 | so there whould be any file contention. | ||
| 16 | |||
| 17 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 18 | |||
| 19 | Signed-off-by: Morgan Little <morgan.little@windriver.com> | ||
| 20 | |||
| 21 | Index: rpm-5.4.14/lua/Makefile.am | ||
| 22 | =================================================================== | ||
| 23 | --- rpm-5.4.14.orig/lua/Makefile.am | ||
| 24 | +++ rpm-5.4.14/lua/Makefile.am | ||
| 25 | @@ -326,7 +326,7 @@ clean-local: | ||
| 26 | # XXX Build & install as rpmlua/rpmluac with hardlinks to lua/luac post install. | ||
| 27 | # XXX CVS has lua/luac sub-directories in the Attic that collide with the | ||
| 28 | # XXX lua/luac executable names when using cvs update. | ||
| 29 | -install-exec-hook: install-pkgbinPROGRAMS | ||
| 30 | +install-data-hook: | ||
| 31 | mkdir -p $(DESTDIR)$(pkgbindir) | ||
| 32 | $(__RM) -f $(DESTDIR)$(pkgbindir)/lua | ||
| 33 | $(__LN) $(DESTDIR)$(pkgbindir)/rpmlua $(DESTDIR)$(pkgbindir)/lua | ||
diff --git a/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch b/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch deleted file mode 100644 index 410623fab2..0000000000 --- a/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | Don't put LDFLAGS into the Libs.private, all it generally contains is a linker | ||
| 2 | hash selection (harmless) and the absolute path to the libdir in the sysroot | ||
| 3 | (actively harmful). | ||
| 4 | |||
| 5 | Upstream-Status: Pending | ||
| 6 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 7 | |||
| 8 | diff --git a/scripts/rpm.pc.in b/scripts/rpm.pc.in | ||
| 9 | index 8293471..2ea469c 100644 | ||
| 10 | --- a/scripts/rpm.pc.in | ||
| 11 | +++ b/scripts/rpm.pc.in | ||
| 12 | @@ -17 +17 @@ Libs: -L${libdir} -lrpmbuild${suffix} -lrpm${suffix} -lrpmdb${suffix} -lrpmio${s | ||
| 13 | -Libs.private: @LDFLAGS@ @LIBS@ | ||
| 14 | +Libs.private: @LIBS@ | ||
diff --git a/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh b/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh deleted file mode 100755 index b72c9f0265..0000000000 --- a/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | : ${RPMDEPS:=rpmdeps} | ||
| 4 | |||
| 5 | process() { | ||
| 6 | while read file_name ; do | ||
| 7 | printf "%s\t" ${file_name} | ||
| 8 | if [ ! -d $file_name ]; then | ||
| 9 | printf "%s " $($RPMDEPS $1 $file_name | sed -e 's,rpmlib(.*,,' -e 's,\([<>\=]\+ \+[^ ]*\),(\1),g') | ||
| 10 | fi | ||
| 11 | printf "\n" | ||
| 12 | done | ||
| 13 | } | ||
| 14 | |||
| 15 | usage() { | ||
| 16 | echo "$0 {-P|--provides} {-R|--requires} FILE ..." | ||
| 17 | } | ||
| 18 | |||
| 19 | while [ $# -gt 0 ]; do | ||
| 20 | case "$1" in | ||
| 21 | --rpmdeps) | ||
| 22 | RPMDEPS=$2 | ||
| 23 | shift | ||
| 24 | shift | ||
| 25 | ;; | ||
| 26 | -R|--requires) | ||
| 27 | process_type=--requires | ||
| 28 | shift | ||
| 29 | ;; | ||
| 30 | -P|--provides) | ||
| 31 | process_type=--provides | ||
| 32 | shift | ||
| 33 | ;; | ||
| 34 | *) | ||
| 35 | break; | ||
| 36 | ;; | ||
| 37 | esac | ||
| 38 | done | ||
| 39 | |||
| 40 | if [ -z "$process_type" ]; then | ||
| 41 | usage | ||
| 42 | exit 1 | ||
| 43 | fi | ||
| 44 | |||
| 45 | if [ $# -gt 0 ]; then | ||
| 46 | find "$@" | process $process_type | ||
| 47 | exit $? | ||
| 48 | fi | ||
| 49 | |||
| 50 | process $process_type | ||
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 deleted file mode 100644 index bcad8dcb73..0000000000 --- a/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | popt: Disable default stack protection on internal version of popt | ||
| 2 | |||
| 3 | Upstream-Status: Inappropriate [configuration] | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 6 | |||
| 7 | Index: 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 deleted file mode 100644 index 590f58d893..0000000000 --- a/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | rpmmodule.c: Export a few additional RPMSENSE values | ||
| 2 | |||
| 3 | We want to see the RPMSENSE_SCRIPT values for use with SMART. We also | ||
| 4 | want to see the MISSINGOK value so we can avoid recommended packages causing | ||
| 5 | failures. | ||
| 6 | |||
| 7 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 8 | |||
| 9 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 10 | |||
| 11 | Index: rpm/python/rpmmodule.c | ||
| 12 | =================================================================== | ||
| 13 | --- rpm.orig/python/rpmmodule.c | ||
| 14 | +++ rpm/python/rpmmodule.c | ||
| 15 | @@ -525,12 +525,15 @@ static int initModule(PyObject *m) | ||
| 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) | ||
| 21 | REGISTER_ENUM(RPMSENSE_SCRIPT_PRE); | ||
| 22 | REGISTER_ENUM(RPMSENSE_SCRIPT_POST); | ||
| 23 | REGISTER_ENUM(RPMSENSE_SCRIPT_PREUN); | ||
| 24 | REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN); | ||
| 25 | REGISTER_ENUM(RPMSENSE_SCRIPT_VERIFY); | ||
| 26 | -#else | ||
| 27 | + REGISTER_ENUM(RPMSENSE_MISSINGOK); | ||
| 28 | + #endif | ||
| 29 | REGISTER_ENUM(RPMSENSE_NOTEQUAL); | ||
| 30 | #endif | ||
| 31 | REGISTER_ENUM(RPMSENSE_FIND_REQUIRES); | ||
diff --git a/meta/recipes-devtools/rpm/rpm/pythondeps.sh b/meta/recipes-devtools/rpm/rpm/pythondeps.sh deleted file mode 100755 index 083b174f17..0000000000 --- a/meta/recipes-devtools/rpm/rpm/pythondeps.sh +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | [ $# -ge 1 ] || { | ||
| 4 | cat > /dev/null | ||
| 5 | exit 0 | ||
| 6 | } | ||
| 7 | |||
| 8 | case $1 in | ||
| 9 | -R|--requires) | ||
| 10 | shift | ||
| 11 | grep "/usr/\(lib[^/]*\|share\)/python[^/]*/" >/dev/null && echo "python" | ||
| 12 | exit 0 | ||
| 13 | ;; | ||
| 14 | esac | ||
| 15 | |||
| 16 | exit 0 | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch b/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch deleted file mode 100644 index cc241f4f16..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | Some architectures do not have __sync_add_and_fetch_8 implemented. | ||
| 2 | |||
| 3 | MIPS (32-bit) and some PPC systems do not have sync_add_and_fetch_8. | ||
| 4 | |||
| 5 | Provide an alternative. This alternative function is based on code from: | ||
| 6 | https://github.com/mongodb/libbson/blob/master/src/bson/bson-atomic.c | ||
| 7 | |||
| 8 | Code is under an Apache 2.0 License. | ||
| 9 | |||
| 10 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 11 | |||
| 12 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 13 | |||
| 14 | Index: 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)) | ||
| 38 | Index: 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-autogen-force.patch b/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch deleted file mode 100644 index 258a7f6e72..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch +++ /dev/null | |||
| @@ -1,78 +0,0 @@ | |||
| 1 | In order to enable musl or other libc support, force update the config.guess | ||
| 2 | |||
| 3 | In order to reliably replace config.guess and config.sub, we need to remove | ||
| 4 | them prior to the call to automake. Adding the --force-missing is likely | ||
| 5 | not necessary, but matching normal OE autoreconf usage. | ||
| 6 | |||
| 7 | Upstream-Status: Inappropriate [configuration] | ||
| 8 | |||
| 9 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 10 | |||
| 11 | Index: rpm-5.4.15/autogen.sh | ||
| 12 | =================================================================== | ||
| 13 | --- rpm-5.4.15.orig/autogen.sh | ||
| 14 | +++ rpm-5.4.15/autogen.sh | ||
| 15 | @@ -73,7 +73,8 @@ rm -f aclocal.m4 | ||
| 16 | aclocal -I m4 | ||
| 17 | autoheader -I m4 | ||
| 18 | echo "---> generate files via GNU automake (automake)" | ||
| 19 | -automake -Wall -Wno-override -a -c | ||
| 20 | +rm -f config.guess config.sub | ||
| 21 | +automake -Wall -Wno-override -a -c --force-missing | ||
| 22 | echo "---> generate files via GNU autoconf (autoconf)" | ||
| 23 | autoconf -I m4 | ||
| 24 | echo "<=== rpm" | ||
| 25 | Index: rpm-5.4.15/beecrypt/autogen.sh | ||
| 26 | =================================================================== | ||
| 27 | --- rpm-5.4.15.orig/beecrypt/autogen.sh | ||
| 28 | +++ rpm-5.4.15/beecrypt/autogen.sh | ||
| 29 | @@ -25,6 +25,7 @@ libtoolize () { | ||
| 30 | |||
| 31 | libtoolize --force --copy | ||
| 32 | aclocal | ||
| 33 | -automake -a -c | ||
| 34 | +rm -f config.guess config.sub | ||
| 35 | +automake -a -c --force-missing | ||
| 36 | autoconf | ||
| 37 | autoheader | ||
| 38 | Index: rpm-5.4.15/libtpm/autogen.sh | ||
| 39 | =================================================================== | ||
| 40 | --- rpm-5.4.15.orig/libtpm/autogen.sh | ||
| 41 | +++ rpm-5.4.15/libtpm/autogen.sh | ||
| 42 | @@ -46,7 +46,8 @@ echo "---> generate files via GNU autoco | ||
| 43 | aclocal | ||
| 44 | autoheader | ||
| 45 | echo "---> generate files via GNU automake (automake)" | ||
| 46 | -automake -Wall -Wno-override -a -c | ||
| 47 | +rm -f config.guess config.sub | ||
| 48 | +automake -Wall -Wno-override -a -c --force-missing | ||
| 49 | echo "---> generate files via GNU autoconf (autoconf)" | ||
| 50 | autoconf | ||
| 51 | |||
| 52 | Index: rpm-5.4.15/neon/autogen.sh | ||
| 53 | =================================================================== | ||
| 54 | --- rpm-5.4.15.orig/neon/autogen.sh | ||
| 55 | +++ rpm-5.4.15/neon/autogen.sh | ||
| 56 | @@ -63,7 +63,8 @@ echo "---> generate files via GNU autoco | ||
| 57 | ${ACLOCAL:-aclocal} -I macros | ||
| 58 | ${AUTOHEADER:-autoheader} | ||
| 59 | echo "---> generate files via GNU automake (automake)" | ||
| 60 | -${AUTOMAKE:-automake} -Wall -Wno-override -a -c | ||
| 61 | +rm -f config.guess config.sub | ||
| 62 | +${AUTOMAKE:-automake} -Wall -Wno-override -a -c --force-missing | ||
| 63 | echo "---> generate files via GNU autoconf (autoconf)" | ||
| 64 | ${AUTOCONF:-autoconf} -Wall | ||
| 65 | |||
| 66 | Index: rpm-5.4.15/syck/autogen.sh | ||
| 67 | =================================================================== | ||
| 68 | --- rpm-5.4.15.orig/syck/autogen.sh | ||
| 69 | +++ rpm-5.4.15/syck/autogen.sh | ||
| 70 | @@ -40,6 +40,7 @@ echo "---> generate files via GNU autoco | ||
| 71 | aclocal | ||
| 72 | autoheader | ||
| 73 | echo "---> generate files via GNU automake (automake)" | ||
| 74 | -automake -Wall -Wno-override -a -c | ||
| 75 | +rm -f config.guess config.sub | ||
| 76 | +automake -Wall -Wno-override -a -c --force-missing | ||
| 77 | echo "---> generate files via GNU autoconf (autoconf)" | ||
| 78 | autoconf | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch b/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch deleted file mode 100644 index 8771235d30..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | Remove the sanity checking from the rpm autogen.sh. This is required because | ||
| 2 | we may have slightly different, but yet compatible versions. If we do end | ||
| 3 | up breaking things, we'll deal with it at that time. | ||
| 4 | |||
| 5 | Upstream-Status: Inappropriate [configuration] | ||
| 6 | |||
| 7 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 8 | |||
| 9 | Index: rpm-5.4.14/syck/autogen.sh | ||
| 10 | =================================================================== | ||
| 11 | --- rpm-5.4.14.orig/syck/autogen.sh | ||
| 12 | +++ rpm-5.4.14/syck/autogen.sh | ||
| 13 | @@ -34,12 +34,6 @@ libtoolize () { | ||
| 14 | eval $_libtoolize $_libtoolize_args | ||
| 15 | } | ||
| 16 | |||
| 17 | -# requirements sanity check | ||
| 18 | -[ "`automake --version | head -1`" != "$AMV" ] && echo "$USAGE" # && exit 1 | ||
| 19 | -[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" # && exit 1 | ||
| 20 | -[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1 | ||
| 21 | -[ "`gettextize --version | head -1 | sed -e 's;^.*/\\(gettextize\\);\\1;'`" != "$GTT" ] && echo "$USAGE" # && exit 1 | ||
| 22 | - | ||
| 23 | echo "---> generate files via GNU libtool (libtoolize)" | ||
| 24 | libtoolize --quiet --copy --force --install | ||
| 25 | echo "---> generate files via GNU autoconf (aclocal, autoheader)" | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch b/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch deleted file mode 100644 index 81fc84937a..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch +++ /dev/null | |||
| @@ -1,136 +0,0 @@ | |||
| 1 | lib/rpmrc.c: Update --target processing to support full GNU canonical arch | ||
| 2 | |||
| 3 | Prior to this patch, when using --target, RPM supported the format: | ||
| 4 | <arch> | ||
| 5 | <arch>-<os> | ||
| 6 | <arch>-<os>-gnu | ||
| 7 | <arch>-<arbitrary items>-<os> | ||
| 8 | <arch>-<arbitrary items>-<os>-gnu | ||
| 9 | |||
| 10 | This patch changes the list of supported items to: | ||
| 11 | <arch> | ||
| 12 | <arch>-<os> | ||
| 13 | <arch>-<os>-gnu | ||
| 14 | <arch>-<vendor>-<os> | ||
| 15 | <arch>-<vendor>-<os>-<extension> | ||
| 16 | |||
| 17 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 18 | |||
| 19 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 20 | |||
| 21 | Index: rpm-5.4.14/lib/rpmrc.c | ||
| 22 | =================================================================== | ||
| 23 | --- rpm-5.4.14.orig/lib/rpmrc.c | ||
| 24 | +++ rpm-5.4.14/lib/rpmrc.c | ||
| 25 | @@ -925,8 +925,8 @@ static void getMachineInfo(int type, /*@ | ||
| 26 | |||
| 27 | static void rpmRebuildTargetVars(const char ** target, const char ** canontarget) | ||
| 28 | { | ||
| 29 | - | ||
| 30 | - char *ca = NULL, *co = NULL, *ct = NULL; | ||
| 31 | + /* ca = arch, cv = vendor, co = os, ce = extension, ct = canon target */ | ||
| 32 | + char *ca = NULL, *cv = NULL, *co = NULL, *ce = NULL, *ct = NULL; | ||
| 33 | int x; | ||
| 34 | |||
| 35 | /* Rebuild the compat table to recalculate the current target arch. */ | ||
| 36 | @@ -936,23 +936,60 @@ static void rpmRebuildTargetVars(const c | ||
| 37 | rpmSetTables(RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS); | ||
| 38 | |||
| 39 | if (target && *target) { | ||
| 40 | + /* GNU canonical format is: | ||
| 41 | + * <arch>-<vendor>-<os>[-extension] | ||
| 42 | + * | ||
| 43 | + * We support the both the GNU canonical format | ||
| 44 | + * as well as the traditional RPM formats: | ||
| 45 | + * <arch> | ||
| 46 | + * <arch>-<os>[-gnu] | ||
| 47 | + */ | ||
| 48 | char *c; | ||
| 49 | /* Set arch and os from specified build target */ | ||
| 50 | ca = xstrdup(*target); | ||
| 51 | - if ((c = strchr(ca, '-')) != NULL) { | ||
| 52 | + if ((c = strchr(ca, '-')) == NULL) { | ||
| 53 | + /* Format is <arch> */ | ||
| 54 | + ; | ||
| 55 | + } else { | ||
| 56 | *c++ = '\0'; | ||
| 57 | - | ||
| 58 | - if ((co = strrchr(c, '-')) == NULL) { | ||
| 59 | - co = c; | ||
| 60 | + cv = c; | ||
| 61 | + | ||
| 62 | + if ((c = strchr(c, '-')) == NULL) { | ||
| 63 | + /* Format is <arch>-<os> */ | ||
| 64 | + co = cv; | ||
| 65 | + cv = NULL; | ||
| 66 | } else { | ||
| 67 | - if (!xstrcasecmp(co, "-gnu")) | ||
| 68 | - *co = '\0'; | ||
| 69 | - if ((co = strrchr(c, '-')) == NULL) | ||
| 70 | - co = c; | ||
| 71 | - else | ||
| 72 | - co++; | ||
| 73 | + *c++ = '\0'; | ||
| 74 | + co = c; | ||
| 75 | + | ||
| 76 | + if ((c = strchr(c, '-')) == NULL) { | ||
| 77 | + /* Might be: | ||
| 78 | + * <arch>-<vendor>-<os> | ||
| 79 | + * <arch>-<os>-gnu | ||
| 80 | + */ | ||
| 81 | + if (!xstrcasecmp(co, "gnu")) { | ||
| 82 | + /* Format was <arch>-<os>-gnu */ | ||
| 83 | + ce = co; | ||
| 84 | + co = cv; | ||
| 85 | + cv = NULL; | ||
| 86 | + } | ||
| 87 | + } else { | ||
| 88 | + /* Format was <arch>-<vendor>-<os>-<extension> */ | ||
| 89 | + *c++ = '\0'; | ||
| 90 | + ce = c; | ||
| 91 | + } | ||
| 92 | } | ||
| 93 | + if (cv != NULL) cv = xstrdup(cv); | ||
| 94 | if (co != NULL) co = xstrdup(co); | ||
| 95 | + if (ce != NULL) { | ||
| 96 | + /* We need to prefix it with a "-" */ | ||
| 97 | + char * lce = NULL; | ||
| 98 | + | ||
| 99 | + lce = xmalloc(strlen(ce) + sizeof("-")); | ||
| 100 | + sprintf(lce, "-%s", ce); | ||
| 101 | + | ||
| 102 | + ce = lce; | ||
| 103 | + } | ||
| 104 | } | ||
| 105 | } else { | ||
| 106 | const char *a = NULL; | ||
| 107 | @@ -995,8 +1032,16 @@ static void rpmRebuildTargetVars(const c | ||
| 108 | addMacro(NULL, "_target", NULL, ct, RMIL_RPMRC); | ||
| 109 | delMacro(NULL, "_target_cpu"); | ||
| 110 | addMacro(NULL, "_target_cpu", NULL, ca, RMIL_RPMRC); | ||
| 111 | + if (cv) { | ||
| 112 | + delMacro(NULL, "_target_vendor"); | ||
| 113 | + addMacro(NULL, "_target_vendor", NULL, cv, RMIL_RPMRC); | ||
| 114 | + } | ||
| 115 | delMacro(NULL, "_target_os"); | ||
| 116 | addMacro(NULL, "_target_os", NULL, co, RMIL_RPMRC); | ||
| 117 | + if (ce) { | ||
| 118 | + delMacro(NULL, "_gnu"); | ||
| 119 | + addMacro(NULL, "_gnu", NULL, ce, RMIL_RPMRC); | ||
| 120 | + } | ||
| 121 | |||
| 122 | if (canontarget) | ||
| 123 | *canontarget = ct; | ||
| 124 | @@ -1004,8 +1049,12 @@ static void rpmRebuildTargetVars(const c | ||
| 125 | ct = _free(ct); | ||
| 126 | ca = _free(ca); | ||
| 127 | /*@-usereleased@*/ | ||
| 128 | + cv = _free(cv); | ||
| 129 | + /*@-usereleased@*/ | ||
| 130 | co = _free(co); | ||
| 131 | /*@=usereleased@*/ | ||
| 132 | + ce = _free(ce); | ||
| 133 | + /*@-usereleased@*/ | ||
| 134 | } | ||
| 135 | |||
| 136 | void rpmFreeRpmrc(void) | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch b/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch deleted file mode 100644 index 3d8d645a77..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-check-rootpath-reasonableness.patch +++ /dev/null | |||
| @@ -1,96 +0,0 @@ | |||
| 1 | rpm: check if the argument(rootpath) exists or be writable | ||
| 2 | |||
| 3 | When user execute the command "rpm -qai --root=$dir",if $dir doesn't | ||
| 4 | exist or is unwritable as result of making a typo in rootpath,then | ||
| 5 | it will create dirent $dir and subdirectory. | ||
| 6 | So we should add the check function to fix it before creating relational | ||
| 7 | subdirectory,and warn the incorrect rootpath to user. It just checks the | ||
| 8 | rootpath reasonableness when the user input the argument(--root=/-r=). | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Zhixiong Chi <zchi@windriver.com> | ||
| 13 | --- | ||
| 14 | rpmqv.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ | ||
| 15 | 1 file changed, 45 insertions(+) | ||
| 16 | |||
| 17 | diff --git a/rpmqv.c b/rpmqv.c | ||
| 18 | index 40c42bd..88d85ab 100644 | ||
| 19 | --- a/rpmqv.c | ||
| 20 | +++ b/rpmqv.c | ||
| 21 | @@ -206,6 +206,8 @@ static struct poptOption optionsTable[] = { | ||
| 22 | POPT_TABLEEND | ||
| 23 | }; | ||
| 24 | |||
| 25 | +static int _rpmqv_rootpath_state = 0; | ||
| 26 | + | ||
| 27 | #ifdef __MINT__ | ||
| 28 | /* MiNT cannot dynamically increase the stack. */ | ||
| 29 | long _stksize = 64 * 1024L; | ||
| 30 | @@ -427,6 +429,41 @@ static void integrity_check(const char *progname, enum modes progmode_num) | ||
| 31 | } | ||
| 32 | #endif | ||
| 33 | |||
| 34 | +/*check if the rootdir is writable or exists */ | ||
| 35 | +int access_file(const char *rootdir) | ||
| 36 | +{ | ||
| 37 | + int ret,rootdir_len; | ||
| 38 | + | ||
| 39 | + if(rootdir == NULL) { | ||
| 40 | + return -1; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + rootdir_len = strlen(rootdir); | ||
| 44 | + /*make sure that dirent argument trailing is "/" */ | ||
| 45 | + if(!(rootdir_len && rootdir[rootdir_len - 1] == '/')){ | ||
| 46 | + char *t = (char *)malloc(rootdir_len + 2); | ||
| 47 | + *t = '\0'; | ||
| 48 | + (void)stpcpy(stpcpy(t,rootdir),"/"); | ||
| 49 | + ret = access(t,F_OK|W_OK); | ||
| 50 | + free(t); | ||
| 51 | + }else{ | ||
| 52 | + ret = access(rootdir,F_OK|W_OK); | ||
| 53 | + } | ||
| 54 | + return ret; | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +/*check if input the argument "--root/-r" */ | ||
| 58 | +void check_argument_root(int argc,char * const argv[]) | ||
| 59 | +{ | ||
| 60 | + int i; | ||
| 61 | + for (i = 0; i < argc; i++) { | ||
| 62 | + if(strncmp(argv[i],"--root=",7) == 0 || strncmp(argv[i],"-r=",3) == 0) { | ||
| 63 | + _rpmqv_rootpath_state = 1; | ||
| 64 | + break; | ||
| 65 | + } | ||
| 66 | + } | ||
| 67 | +} | ||
| 68 | + | ||
| 69 | /*@-bounds@*/ /* LCL: segfault */ | ||
| 70 | /*@-mods@*/ /* FIX: shrug */ | ||
| 71 | #if !defined(__GLIBC__) && !defined(__LCLINT__) | ||
| 72 | @@ -476,6 +513,8 @@ int main(int argc, const char ** argv) | ||
| 73 | int xx; | ||
| 74 | #endif | ||
| 75 | |||
| 76 | + check_argument_root(argc,(char *const *)argv); | ||
| 77 | + | ||
| 78 | #if !defined(__GLIBC__) && !defined(__LCLINT__) | ||
| 79 | environ = envp; | ||
| 80 | #else | ||
| 81 | @@ -715,6 +754,12 @@ int main(int argc, const char ** argv) | ||
| 82 | argerror(_("arguments to --root (-r) must begin with a /")); | ||
| 83 | break; | ||
| 84 | } | ||
| 85 | + if (_rpmqv_rootpath_state) { | ||
| 86 | + if (access_file(rpmioRootDir)) { | ||
| 87 | + fprintf(stderr, _("Invalid directory:%s, ensure it exists or be writable\n"),rpmioRootDir); | ||
| 88 | + exit(EXIT_FAILURE); | ||
| 89 | + } | ||
| 90 | + } | ||
| 91 | } | ||
| 92 | |||
| 93 | #if defined(RPM_VENDOR_OPENPKG) /* integrity-checking */ | ||
| 94 | -- | ||
| 95 | 1.9.1 | ||
| 96 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch b/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch deleted file mode 100644 index c869376538..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-db-reduce.patch +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [configuration] | ||
| 2 | |||
| 3 | Change cache size to reduce the usage of disk space from 62MB to 26MB. | ||
| 4 | |||
| 5 | Signed-off-by: Mei Lei <lei.mei@intel.com> | ||
| 6 | |||
| 7 | Index: rpm-5.4.14/rpmdb/DB_CONFIG.in | ||
| 8 | =================================================================== | ||
| 9 | --- rpm-5.4.14.orig/rpmdb/DB_CONFIG.in | ||
| 10 | +++ rpm-5.4.14/rpmdb/DB_CONFIG.in | ||
| 11 | @@ -29,7 +29,7 @@ set_thread_count 64 | ||
| 12 | |||
| 13 | # ================ Memory Pool | ||
| 14 | #XXX initializing dbenv with set_cachesize has unimplemented prerequsites | ||
| 15 | -#set_cachesize 0 1048576 0 | ||
| 16 | +set_cachesize 0 1048576 0 | ||
| 17 | set_mp_mmapsize 268435456 | ||
| 18 | |||
| 19 | # ================ Locking | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch b/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch deleted file mode 100644 index 5d08d279ae..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch +++ /dev/null | |||
| @@ -1,174 +0,0 @@ | |||
| 1 | From 7bad268de8b32281e2a12ccd88038b3ec5eb1be3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yuanjie Huang <Yuanjie.Huang@windriver.com> | ||
| 3 | Date: Tue, 15 Dec 2015 18:50:21 +0800 | ||
| 4 | Subject: [PATCH] Support both db5 and db6. | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [configuration] | ||
| 7 | |||
| 8 | Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com> | ||
| 9 | --- | ||
| 10 | configure.ac | 103 ++++++++++++++++++++++++++++++++++++++++++++++------------- | ||
| 11 | 1 file changed, 81 insertions(+), 22 deletions(-) | ||
| 12 | |||
| 13 | Index: rpm/configure.ac | ||
| 14 | =================================================================== | ||
| 15 | --- rpm.orig/configure.ac | ||
| 16 | +++ rpm/configure.ac | ||
| 17 | @@ -871,8 +871,6 @@ else | ||
| 18 | MYPATH=$PATH | ||
| 19 | fi | ||
| 20 | |||
| 21 | -DBXY=db61 | ||
| 22 | - | ||
| 23 | AC_PATH_PROG(__BASH, bash, %{_bindir}/bash, $MYPATH) | ||
| 24 | AC_PATH_PROG(__BZIP2, bzip2, %{_bindir}/bzip2, $MYPATH) | ||
| 25 | AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH) | ||
| 26 | @@ -884,22 +882,6 @@ AC_PATH_PROG(__CMAKE, cmake, %{_bindir}/ | ||
| 27 | AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH) | ||
| 28 | AC_PATH_PROG(__CURL, curl, %{_bindir}/curl, $MYPATH) | ||
| 29 | AC_PATH_PROG(__CVS, cvs, %{_bindir}/cvs, $MYPATH) | ||
| 30 | -AC_PATH_PROG(__DB_ARCHIVE, ${DBXY}_archive, %{_bindir}/${DBXY}_archive, $MYPATH) | ||
| 31 | -AC_PATH_PROG(__DB_CHECKPOINT, ${DBXY}_checkpoint, %{_bindir}/${DBXY}_checkpoint, $MYPATH) | ||
| 32 | -AC_PATH_PROG(__DB_DEADLOCK, ${DBXY}_deadlock, %{_bindir}/${DBXY}_deadlock, $MYPATH) | ||
| 33 | -AC_PATH_PROG(__DB_DUMP, ${DBXY}_dump, %{_bindir}/${DBXY}_dump, $MYPATH) | ||
| 34 | -AC_PATH_PROG(__DB_HOTBACKUP, ${DBXY}_hotbackup, %{_bindir}/${DBXY}_hotbackup, $MYPATH) | ||
| 35 | -AC_PATH_PROG(__DB_LOAD, ${DBXY}_load, %{_bindir}/${DBXY}_load, $MYPATH) | ||
| 36 | -AC_PATH_PROG(__DB_LOG_VERIFY, ${DBXY}_log_verify, %{_bindir}/${DBXY}_log_verify, $MYPATH) | ||
| 37 | -AC_PATH_PROG(__DB_PRINTLOG, ${DBXY}_printlog, %{_bindir}/${DBXY}_printlog, $MYPATH) | ||
| 38 | -AC_PATH_PROG(__DB_RECOVER, ${DBXY}_recover, %{_bindir}/${DBXY}_recover, $MYPATH) | ||
| 39 | -AC_PATH_PROG(__DB_REPLICATE, ${DBXY}_replicate, %{_bindir}/${DBXY}_replicate, $MYPATH) | ||
| 40 | -AC_PATH_PROG(__DBSQL, ${DBXY}sql, %{_bindir}/${DBXY}sql, $MYPATH) | ||
| 41 | -AC_PATH_PROG(__DB_SQL_CODEGEN, ${DBXY}_sql_codegen, %{_bindir}/${DBXY}_sql_codegen, $MYPATH) | ||
| 42 | -AC_PATH_PROG(__DB_STAT, ${DBXY}_stat, %{_bindir}/${DBXY}_stat, $MYPATH) | ||
| 43 | -AC_PATH_PROG(__DB_TUNER, ${DBXY}_tuner, %{_bindir}/${DBXY}_tuner, $MYPATH) | ||
| 44 | -AC_PATH_PROG(__DB_UPGRADE, ${DBXY}_upgrade, %{_bindir}/${DBXY}_upgrade, $MYPATH) | ||
| 45 | -AC_PATH_PROG(__DB_VERIFY, ${DBXY}_verify, %{_bindir}/${DBXY}_verify, $MYPATH) | ||
| 46 | AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH) | ||
| 47 | AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH) | ||
| 48 | AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH) | ||
| 49 | @@ -2050,13 +2032,46 @@ RPM_CHECK_LIB( | ||
| 50 | |||
| 51 | dnl # Berkeley-DB & SQLite | ||
| 52 | DBLIBSRCS="" | ||
| 53 | +DBXY=db | ||
| 54 | + | ||
| 55 | # XXX won't handle --includedir override | ||
| 56 | -CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}" | ||
| 57 | -RPM_CHECK_LIB( | ||
| 58 | +CPPFLAGS_save="${CPPFLAGS}" | ||
| 59 | +CPPFLAGS="${CPPFLAGS_save}" | ||
| 60 | +with_db_save="${with_db}" | ||
| 61 | + | ||
| 62 | +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
| 63 | +#include <db.h> | ||
| 64 | +]], | ||
| 65 | +[[ | ||
| 66 | +#if DB_VERSION_MAJOR < 6 | ||
| 67 | +#error DB_VERSION_MAJOR is below 6 | ||
| 68 | +#endif | ||
| 69 | +]])], | ||
| 70 | +[RPM_CHECK_LIB( | ||
| 71 | [Berkeley-DB], [db], | ||
| 72 | [db-6.1], [db_create], [db.h], | ||
| 73 | - [yes,external], [db3], | ||
| 74 | + [yes,external], [db6], | ||
| 75 | [ DBLIBSRCS="$DBLIBSRCS db3.c" | ||
| 76 | + DBXY=db61 | ||
| 77 | + AM_CONDITIONAL(WITH_DB, [ true ]) | ||
| 78 | + AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ]) | ||
| 79 | + if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then | ||
| 80 | + AC_DEFINE(HAVE_DB_H, 1, [Have <db.h> header]) | ||
| 81 | + else | ||
| 82 | + WITH_DB_SUBDIR="" | ||
| 83 | + fi | ||
| 84 | + ], | ||
| 85 | + [ AM_CONDITIONAL(WITH_DB, [ false ]) | ||
| 86 | + AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ]) | ||
| 87 | + ])], | ||
| 88 | +[with_db="${with_db_save}" | ||
| 89 | + CPPFLAGS="${CPPFLAGS_save}" | ||
| 90 | + RPM_CHECK_LIB( | ||
| 91 | + [Berkeley-DB], [db], | ||
| 92 | + [db-5.3], [db_create], [db.h], | ||
| 93 | + [yes,external], [db53], | ||
| 94 | + [ DBLIBSRCS="$DBLIBSRCS db3.c" | ||
| 95 | + DBXY=db53 | ||
| 96 | AM_CONDITIONAL(WITH_DB, [ true ]) | ||
| 97 | AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ]) | ||
| 98 | if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then | ||
| 99 | @@ -2068,6 +2083,11 @@ RPM_CHECK_LIB( | ||
| 100 | [ AM_CONDITIONAL(WITH_DB, [ false ]) | ||
| 101 | AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ]) | ||
| 102 | ]) | ||
| 103 | +]) | ||
| 104 | + | ||
| 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}" | ||
| 107 | +fi | ||
| 108 | |||
| 109 | dnl # Sqlite external | ||
| 110 | RPM_CHECK_LIB( | ||
| 111 | @@ -2078,10 +2098,11 @@ RPM_CHECK_LIB( | ||
| 112 | []) | ||
| 113 | |||
| 114 | dnl # Sqlite 3.8.3.1 from db-6.1.19 | ||
| 115 | +if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then | ||
| 116 | RPM_CHECK_LIB( | ||
| 117 | [Berkeley-DB (+SQLite3)], [dbsql], | ||
| 118 | [db_sql-6.1], [sqlite3_open], [dbsql.h], | ||
| 119 | - [yes,external], [db3/sql], | ||
| 120 | + [yes,external], [db6/sql], | ||
| 121 | [ | ||
| 122 | AM_CONDITIONAL(WITH_DBSQL, [ true ]) | ||
| 123 | AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library]) | ||
| 124 | @@ -2095,12 +2116,50 @@ RPM_CHECK_LIB( | ||
| 125 | ], [ | ||
| 126 | AM_CONDITIONAL(WITH_DBSQL, [ false ]) | ||
| 127 | ]) | ||
| 128 | +elif test ".$ac_cv_lib_db_5_3_db_create" = .yes; then | ||
| 129 | +RPM_CHECK_LIB( | ||
| 130 | + [Berkeley-DB (+SQLite3)], [dbsql], | ||
| 131 | + [db_sql-5.3], [sqlite3_open], [dbsql.h], | ||
| 132 | + [yes,external], [db53/sql], | ||
| 133 | + [ | ||
| 134 | + AM_CONDITIONAL(WITH_DBSQL, [ true ]) | ||
| 135 | + AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library]) | ||
| 136 | + if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then | ||
| 137 | + WITH_DB_CPPFLAGS="${WITH_DB_CPPFLAGS} -I\$(top_srcdir)/db/sql/generated" | ||
| 138 | + WITH_DB_LIBS="${WITH_DBSQL_LIBS}" | ||
| 139 | + DBLIBSRCS="$DBLIBSRCS sqlite.c" | ||
| 140 | + else | ||
| 141 | + WITH_DBSQL_SUBDIR="" | ||
| 142 | + fi | ||
| 143 | + ], [ | ||
| 144 | + AM_CONDITIONAL(WITH_DBSQL, [ false ]) | ||
| 145 | + ]) | ||
| 146 | +else | ||
| 147 | +AM_CONDITIONAL(WITH_DBSQL, [ false ]) | ||
| 148 | +fi | ||
| 149 | |||
| 150 | DBLIBOBJS=`echo $DBLIBSRCS | sed -e "s/\.c/\.lo/g"` | ||
| 151 | |||
| 152 | AC_SUBST(DBLIBSRCS) | ||
| 153 | AC_SUBST(DBLIBOBJS) | ||
| 154 | |||
| 155 | +AC_PATH_PROG(__DB_ARCHIVE, ${DBXY}_archive, %{_bindir}/${DBXY}_archive, $MYPATH) | ||
| 156 | +AC_PATH_PROG(__DB_CHECKPOINT, ${DBXY}_checkpoint, %{_bindir}/${DBXY}_checkpoint, $MYPATH) | ||
| 157 | +AC_PATH_PROG(__DB_DEADLOCK, ${DBXY}_deadlock, %{_bindir}/${DBXY}_deadlock, $MYPATH) | ||
| 158 | +AC_PATH_PROG(__DB_DUMP, ${DBXY}_dump, %{_bindir}/${DBXY}_dump, $MYPATH) | ||
| 159 | +AC_PATH_PROG(__DB_HOTBACKUP, ${DBXY}_hotbackup, %{_bindir}/${DBXY}_hotbackup, $MYPATH) | ||
| 160 | +AC_PATH_PROG(__DB_LOAD, ${DBXY}_load, %{_bindir}/${DBXY}_load, $MYPATH) | ||
| 161 | +AC_PATH_PROG(__DB_LOG_VERIFY, ${DBXY}_log_verify, %{_bindir}/${DBXY}_log_verify, $MYPATH) | ||
| 162 | +AC_PATH_PROG(__DB_PRINTLOG, ${DBXY}_printlog, %{_bindir}/${DBXY}_printlog, $MYPATH) | ||
| 163 | +AC_PATH_PROG(__DB_RECOVER, ${DBXY}_recover, %{_bindir}/${DBXY}_recover, $MYPATH) | ||
| 164 | +AC_PATH_PROG(__DB_REPLICATE, ${DBXY}_replicate, %{_bindir}/${DBXY}_replicate, $MYPATH) | ||
| 165 | +AC_PATH_PROG(__DBSQL, ${DBXY}sql, %{_bindir}/${DBXY}sql, $MYPATH) | ||
| 166 | +AC_PATH_PROG(__DB_SQL_CODEGEN, ${DBXY}_sql_codegen, %{_bindir}/${DBXY}_sql_codegen, $MYPATH) | ||
| 167 | +AC_PATH_PROG(__DB_STAT, ${DBXY}_stat, %{_bindir}/${DBXY}_stat, $MYPATH) | ||
| 168 | +AC_PATH_PROG(__DB_TUNER, ${DBXY}_tuner, %{_bindir}/${DBXY}_tuner, $MYPATH) | ||
| 169 | +AC_PATH_PROG(__DB_UPGRADE, ${DBXY}_upgrade, %{_bindir}/${DBXY}_upgrade, $MYPATH) | ||
| 170 | +AC_PATH_PROG(__DB_VERIFY, ${DBXY}_verify, %{_bindir}/${DBXY}_verify, $MYPATH) | ||
| 171 | + | ||
| 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])) | ||
| 174 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db60.patch b/meta/recipes-devtools/rpm/rpm/rpm-db60.patch deleted file mode 100644 index b4df8b751b..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-db60.patch +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | Set the DB 6 version to match oe-core db 6.0.30 | ||
| 2 | |||
| 3 | Upstream-Status: Inappropriate [configuration] | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 6 | |||
| 7 | Index: 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-db_buffer_small.patch b/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch deleted file mode 100644 index 16b8e30a1d..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch +++ /dev/null | |||
| @@ -1,77 +0,0 @@ | |||
| 1 | In certain cases with BerkleyDB 5.3.x we are getting the error: | ||
| 2 | |||
| 3 | db3.c:1443: dbcursor->pget(-30999): BDB0063 DB_BUFFER_SMALL: User memory too small for return value | ||
| 4 | |||
| 5 | See https://bugs.launchpad.net/rpm/+bug/934420 for more information. | ||
| 6 | |||
| 7 | It appears to be some type of a bug in the BerkleyDB 5.3.x. In an attempt | ||
| 8 | to workaround the problem, when we encounter this situation we attempt | ||
| 9 | to adjust the size of the mmap buffer until the call works, or we | ||
| 10 | end up trying 10 times. The new size is either the updated vp->size | ||
| 11 | from the failed pget call, or the previous size + 1024. | ||
| 12 | |||
| 13 | If DBI debugging is enabled, additional diagnostics are printed, otherwise | ||
| 14 | a basic retry and success message is added to show that the failure was | ||
| 15 | resolved. | ||
| 16 | |||
| 17 | Upstream-Status: Inappropriate (workaround) | ||
| 18 | |||
| 19 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 20 | |||
| 21 | Index: rpm-5.4.14/rpmdb/rpmdb.c | ||
| 22 | =================================================================== | ||
| 23 | --- rpm-5.4.14.orig/rpmdb/rpmdb.c | ||
| 24 | +++ rpm-5.4.14/rpmdb/rpmdb.c | ||
| 25 | @@ -2212,8 +2212,12 @@ static int rpmmiGet(dbiIndex dbi, DBC * | ||
| 26 | vp->flags |= DB_DBT_USERMEM; | ||
| 27 | rc = dbiGet(dbi, dbcursor, kp, vp, flags); | ||
| 28 | if (rc == DB_BUFFER_SMALL) { | ||
| 29 | + int retry = 0; | ||
| 30 | + size_t origlen = vp->size; | ||
| 31 | size_t uhlen = vp->size; | ||
| 32 | - void * uh = mmap(NULL, uhlen, _prot, _flags, _fdno, _off); | ||
| 33 | + void * uh; | ||
| 34 | +retry_get: | ||
| 35 | + uh = mmap(NULL, uhlen, _prot, _flags, _fdno, _off); | ||
| 36 | if (uh == NULL || uh == (void *)-1) | ||
| 37 | fprintf(stderr, | ||
| 38 | "==> mmap(%p[%u], 0x%x, 0x%x, %d, 0x%x) error(%d): %s\n", | ||
| 39 | @@ -2235,6 +2239,25 @@ static int rpmmiGet(dbiIndex dbi, DBC * | ||
| 40 | if (munmap(uh, uhlen) != 0) | ||
| 41 | fprintf(stderr, "==> munmap(%p[%u]) error(%d): %s\n", | ||
| 42 | uh, (unsigned)uhlen, errno, strerror(errno)); | ||
| 43 | + /* We want to be sure to limit the number of retry attempts to avoid a loop! */ | ||
| 44 | + if (rc == DB_BUFFER_SMALL && retry < 10) { | ||
| 45 | + /* If we got a largr vp-size back, use that, otherwise increment the size by 1k */ | ||
| 46 | + uhlen = vp->size > uhlen ? vp->size : uhlen + 1024; | ||
| 47 | + retry++; | ||
| 48 | + if ((dbi)->dbi_debug) | ||
| 49 | + fprintf(stderr, "==> DB_BUFFER_SMALL orig requested (%d), configured (%d), forcing larger buffer (%d), new size (%d)\n", | ||
| 50 | + origlen, vp->ulen, uhlen, vp->size); | ||
| 51 | + else | ||
| 52 | + fprintf(stderr, "==> retry (%d) db3cpget (%d)\n", retry, uhlen); | ||
| 53 | + goto retry_get; | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + if (retry) { | ||
| 57 | + if ((dbi)->dbi_debug) | ||
| 58 | + fprintf(stderr, "==> success orig requested (%d), configured buffer (%d), buffer (%d), size after dbiGet (%d)\n", | ||
| 59 | + origlen, vp->ulen, uhlen, vp->size); | ||
| 60 | + else | ||
| 61 | + fprintf(stderr, "==> success\n"); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | } else | ||
| 65 | Index: rpm-5.4.14/rpmdb/db3.c | ||
| 66 | =================================================================== | ||
| 67 | --- rpm-5.4.14.orig/rpmdb/db3.c | ||
| 68 | +++ rpm-5.4.14/rpmdb/db3.c | ||
| 69 | @@ -1509,7 +1509,7 @@ assert(db != NULL); | ||
| 70 | #endif | ||
| 71 | } | ||
| 72 | |||
| 73 | -DBIDEBUG(dbi, (stderr, "<-- %s(%p,%p,%p,%p,%p,0x%x) rc %d %s%s\n", __FUNCTION__, dbi, dbcursor, key, pkey, data, flags, rc, _DBCFLAGS(flags), _KEYDATA(key, pkey, data, NULL))); | ||
| 74 | +DBIDEBUG(dbi, (stderr, "<-- %s(%p,%p,%p,%p,%p,0x%x) rc %d %s%s\n", __FUNCTION__, dbi, dbcursor, key, pkey, data, flags, rc, _DBCFLAGS(flags), _KEYDATA(key, pkey, rc == DB_BUFFER_SMALL ? NULL : data, NULL))); | ||
| 75 | return rc; | ||
| 76 | } | ||
| 77 | /*@=mustmod@*/ | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch b/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch deleted file mode 100644 index 2eb6e0f26b..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch +++ /dev/null | |||
| @@ -1,65 +0,0 @@ | |||
| 1 | Debug the platform score generation... | ||
| 2 | |||
| 3 | Index: rpm-5.4.14/lib/rpmrc.c | ||
| 4 | =================================================================== | ||
| 5 | --- rpm-5.4.14.orig/lib/rpmrc.c | ||
| 6 | +++ rpm-5.4.14/lib/rpmrc.c | ||
| 7 | @@ -465,6 +465,8 @@ static rpmRC rpmPlatform(const char * pl | ||
| 8 | |||
| 9 | rc = (rpmRC) rpmiobSlurp(platform, &iob); | ||
| 10 | |||
| 11 | + fprintf(stderr, "D: rpmPlatform file %s\n", platform); | ||
| 12 | + | ||
| 13 | if (rc || iob == NULL) { | ||
| 14 | rc = RPMRC_FAIL; | ||
| 15 | goto exit; | ||
| 16 | @@ -486,6 +488,7 @@ static rpmRC rpmPlatform(const char * pl | ||
| 17 | while (--t > p && xisspace(*t)) | ||
| 18 | *t = '\0'; | ||
| 19 | if (t > p) { | ||
| 20 | + fprintf(stderr, "D: rpmPlatform mireAppend REGEX %s\n", p); | ||
| 21 | xx = mireAppend(RPMMIRE_REGEX, 0, p, NULL, &mi_re, &mi_nre); | ||
| 22 | } | ||
| 23 | continue; | ||
| 24 | @@ -503,6 +506,11 @@ static rpmRC rpmPlatform(const char * pl | ||
| 25 | _gnu = rpmExpand("-", cvog->gnu, NULL); | ||
| 26 | |||
| 27 | addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1); | ||
| 28 | + fprintf(stderr, "D: rpmPlatform addMacro %s-%s-%s(%s)\n", | ||
| 29 | + rpmExpand("%{_platform_cpu}", NULL), | ||
| 30 | + rpmExpand("%{_platform_vendor}", NULL), | ||
| 31 | + rpmExpand("%{_platform_os}", NULL), | ||
| 32 | + rpmExpand("%{_platform_gnu}", NULL)); | ||
| 33 | #else | ||
| 34 | addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1); | ||
| 35 | addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1); | ||
| 36 | @@ -510,6 +518,7 @@ static rpmRC rpmPlatform(const char * pl | ||
| 37 | #endif | ||
| 38 | } | ||
| 39 | |||
| 40 | + fprintf(stderr, "D: rpmPlatform mireAppend STRCMP %s -- ", p); | ||
| 41 | #if !defined(RPM_VENDOR_OE) /* Skip the explicit-platform */ | ||
| 42 | #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */ | ||
| 43 | /* do not use vendor and GNU attribution */ | ||
| 44 | @@ -519,6 +528,7 @@ static rpmRC rpmPlatform(const char * pl | ||
| 45 | (cvog && *cvog->gnu ? "-" : NULL), | ||
| 46 | (cvog ? cvog->gnu : NULL), NULL); | ||
| 47 | #endif | ||
| 48 | + fprintf(stderr, "%s\n", p); | ||
| 49 | xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre); | ||
| 50 | p = _free(p); | ||
| 51 | #endif | ||
| 52 | @@ -688,9 +698,12 @@ int rpmPlatformScore(const char * platfo | ||
| 53 | |||
| 54 | if ((mire = (miRE) mi_re) != NULL) | ||
| 55 | for (i = 0; i < mi_nre; i++) { | ||
| 56 | - if (mireRegexec(mire + i, platform, 0) >= 0) | ||
| 57 | + if (mireRegexec(mire + i, platform, 0) >= 0) { | ||
| 58 | + fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, i + 1); | ||
| 59 | return (i + 1); | ||
| 60 | + } | ||
| 61 | } | ||
| 62 | + fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, 0); | ||
| 63 | return 0; | ||
| 64 | } | ||
| 65 | /*@=onlytrans@*/ | ||
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 deleted file mode 100644 index 124606c0d1..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | Make security switches manual settings | ||
| 2 | |||
| 3 | RPM checks for the availability of the stack protector switch and | ||
| 4 | transactional-memory support. If supported it unconditionally | ||
| 5 | enables the compiler options which can cause errors if the support has | ||
| 6 | not been built into the compiler. | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [configuration] | ||
| 9 | |||
| 10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 11 | |||
| 12 | Index: 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 deleted file mode 100644 index adbef6df88..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | rpmio: Disable building of the tblake2 test(s). | ||
| 2 | |||
| 3 | There is some type of a dependency fault here that can occasionally result in: | ||
| 4 | |||
| 5 | gcc: error: tblake2b.o: No such file or directory | ||
| 6 | or | ||
| 7 | gcc: error: tblake2bp.o: No such file or directory | ||
| 8 | |||
| 9 | These items are simply test cases that are not packaged, so they can be | ||
| 10 | safely disabled to resolve the dependency issue. | ||
| 11 | |||
| 12 | Upstream-Status: Inappropriate [workaround] | ||
| 13 | |||
| 14 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 15 | |||
| 16 | Index: 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-ensure-rpm2cpio-call-rpm-relocation-code.patch b/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch deleted file mode 100644 index 63af100245..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | We need to call rpmcliInit to ensure the rpm relocation code is called | ||
| 2 | and it correctly honours the relocation environmental variables. | ||
| 3 | |||
| 4 | when we export the wrsdk and source the sdk, then execute rpm2cpio xxx.rpm|cpio -t. | ||
| 5 | we will get the following error : | ||
| 6 | "rpm-5.4.14/rpmdb/dbconfig.c:493: | ||
| 7 | db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed. | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | |||
| 11 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
| 12 | Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> | ||
| 13 | Index: rpm-5.4.15/tools/rpm2cpio.c | ||
| 14 | =================================================================== | ||
| 15 | --- rpm-5.4.15.orig/tools/rpm2cpio.c 2012-04-27 01:46:51.000000000 +0800 | ||
| 16 | +++ rpm-5.4.15/tools/rpm2cpio.c 2016-09-05 11:07:30.419903338 +0800 | ||
| 17 | @@ -87,6 +87,8 @@ | ||
| 18 | #endif | ||
| 19 | (void) rpmtsSetVSFlags(ts, vsflags); | ||
| 20 | |||
| 21 | + rpmcliInit(argc, argv, NULL); | ||
| 22 | + | ||
| 23 | /*@-mustmod@*/ /* LCL: segfault */ | ||
| 24 | rc = rpmReadPackageFile(ts, fdi, "rpm2cpio", &h); | ||
| 25 | /*@=mustmod@*/ | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch b/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch deleted file mode 100644 index b1db6fff72..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-fileclass.patch +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | rpmfc.c: Always generate per-file information | ||
| 2 | |||
| 3 | Even when the per-file dependency generate is disabled, we want to generate | ||
| 4 | per file classification and other associated data. | ||
| 5 | |||
| 6 | Note: this is a temporary workaround. Eventually we will want to have a way | ||
| 7 | to seed per-file dependency and other information in order to generate a | ||
| 8 | package from previously determined information. | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 13 | |||
| 14 | Index: rpm-5.4.14/lib/rpmfc.c | ||
| 15 | =================================================================== | ||
| 16 | --- rpm-5.4.14.orig/lib/rpmfc.c | ||
| 17 | +++ rpm-5.4.14/lib/rpmfc.c | ||
| 18 | @@ -1734,7 +1734,6 @@ rpmRC rpmfcGenerateDepends(void * _spec, | ||
| 19 | /* ... then generate dependencies using %{__find_requires} et al. */ | ||
| 20 | rc = rpmfcGenerateDependsHelper(spec, pkg, fi); | ||
| 21 | printDeps(pkg->header); | ||
| 22 | - return rc; | ||
| 23 | } | ||
| 24 | |||
| 25 | /* Generate scriptlet Dependencies. */ | ||
| 26 | @@ -1762,8 +1761,8 @@ rpmRC rpmfcGenerateDepends(void * _spec, | ||
| 27 | av[ac] = NULL; | ||
| 28 | |||
| 29 | fc = rpmfcNew(); | ||
| 30 | - fc->skipProv = !pkg->autoProv; | ||
| 31 | - fc->skipReq = !pkg->autoReq; | ||
| 32 | + fc->skipProv = !pkg->autoProv || !internaldeps; | ||
| 33 | + fc->skipReq = !pkg->autoReq || !internaldeps; | ||
| 34 | fc->tracked = 0; | ||
| 35 | |||
| 36 | { const char * buildRootURL; | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch deleted file mode 100644 index 290ec1aa14..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | Occasionally the cp -p fails with a non-zero return code. This will cause | ||
| 2 | the system abort the build. | ||
| 3 | |||
| 4 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 5 | |||
| 6 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 7 | |||
| 8 | Index: rpm/rpmdb/Makefile.am | ||
| 9 | =================================================================== | ||
| 10 | --- rpm.orig/rpmdb/Makefile.am | ||
| 11 | +++ rpm/rpmdb/Makefile.am | ||
| 12 | @@ -234,11 +234,14 @@ lcov-report: | ||
| 13 | #lcov-upload: lcov | ||
| 14 | # rsync -rvz -e ssh --delete lcov/* ??? | ||
| 15 | |||
| 16 | +$(builddir)/logio_recover_template: $(srcdir)/logio_recover_template | ||
| 17 | + @if test ".$(builddir)" != ".$(srcdir)"; then \ | ||
| 18 | + cp -fp $(srcdir)/logio_recover_template \ | ||
| 19 | + $(builddir)/logio_recover_template ; \ | ||
| 20 | + fi | ||
| 21 | + | ||
| 22 | logio_BUILT = logio_auto.c logio_autop.c logio_auto.h logio_template | ||
| 23 | -$(logio_BUILT): logio.awk logio.src logio_recover_template | ||
| 24 | - @test -e $(builddir)/logio_recover_template || \ | ||
| 25 | - cp -p $(srcdir)/logio_recover_template \ | ||
| 26 | - $(builddir)/logio_recover_template | ||
| 27 | +$(logio_BUILT): logio.awk logio.src $(builddir)/logio_recover_template | ||
| 28 | @rm -f $(logio_BUILT) | ||
| 29 | @$(AWK) -f $(srcdir)/logio.awk \ | ||
| 30 | -v header_file=logio_auto.h \ | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch deleted file mode 100644 index 1a08243ab1..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | Subject: lua: fix to build test libs correctly | ||
| 4 | |||
| 5 | This patch fixes errors like below. | ||
| 6 | |||
| 7 | | gcc: error: lib21.c: No such file or directory | ||
| 8 | | gcc: fatal error: no input files | ||
| 9 | |||
| 10 | |||
| 11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 12 | --- | ||
| 13 | lua/tests/libs/Makefile.am | 8 ++++---- | ||
| 14 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/lua/tests/libs/Makefile.am b/lua/tests/libs/Makefile.am | ||
| 17 | index 19d1a0b..1e5de72 100644 | ||
| 18 | --- a/lua/tests/libs/Makefile.am | ||
| 19 | +++ b/lua/tests/libs/Makefile.am | ||
| 20 | @@ -28,16 +28,16 @@ clean: | ||
| 21 | rm -f lib1.so lib11.so lib2.so lib21.so lib2-v2.so | ||
| 22 | |||
| 23 | lib1.so: lib1.c | ||
| 24 | - $(CC) $(CFLAGS) -o lib1.so lib1.c | ||
| 25 | + $(CC) $(CFLAGS) -o lib1.so $(top_srcdir)/lua/tests/libs/lib1.c | ||
| 26 | |||
| 27 | lib11.so: lib11.c | ||
| 28 | - $(CC) $(CFLAGS) -o lib11.so lib11.c | ||
| 29 | + $(CC) $(CFLAGS) -o lib11.so $(top_srcdir)/lua/tests/libs/lib11.c | ||
| 30 | |||
| 31 | lib2.so: lib2.c | ||
| 32 | - $(CC) $(CFLAGS) -o lib2.so lib2.c | ||
| 33 | + $(CC) $(CFLAGS) -o lib2.so $(top_srcdir)/lua/tests/libs/lib2.c | ||
| 34 | |||
| 35 | lib21.so: lib21.c | ||
| 36 | - $(CC) $(CFLAGS) -o lib21.so lib21.c | ||
| 37 | + $(CC) $(CFLAGS) -o lib21.so $(top_srcdir)/lua/tests/libs/lib21.c | ||
| 38 | |||
| 39 | lib2-v2.so: lib2.so | ||
| 40 | mv lib2.so ./lib2-v2.so | ||
| 41 | -- | ||
| 42 | 1.9.1 | ||
| 43 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch b/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch deleted file mode 100644 index c57f24cd72..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | Fix an issue where parseEmbedded is not defined, but is still used. | ||
| 2 | |||
| 3 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 6 | |||
| 7 | Index: 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 deleted file mode 100644 index 36a418fc6a..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | configure.ac: Check if the current compiler supports the transactions | ||
| 2 | |||
| 3 | Some distributions appear to have compilers that are built without support | ||
| 4 | for transactions, even though they are GCC 4.7 or newer. | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 7 | |||
| 8 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 9 | |||
| 10 | Index: 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" | ||
| 52 | Index: 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-hardlink-segfault-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch deleted file mode 100644 index 057925fb64..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | We need to sanity check that the nlink size and our linksLeft counter | ||
| 2 | do match. If an rpm is badly constructed with identical inode values | ||
| 3 | for multiple hardlinked files, such an rpm will otherwise access memory | ||
| 4 | out of array bounds and cause memory corruption and crashes. | ||
| 5 | |||
| 6 | The fix is to add in the sanity check and exit if bad circumstances | ||
| 7 | are found. We need to fix the caller to check the return code too. | ||
| 8 | |||
| 9 | RP 2014/6/10 | ||
| 10 | |||
| 11 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 12 | |||
| 13 | Index: rpm-5.4.14/lib/fsm.c | ||
| 14 | =================================================================== | ||
| 15 | --- rpm-5.4.14.orig/lib/fsm.c | ||
| 16 | +++ rpm-5.4.14/lib/fsm.c | ||
| 17 | @@ -495,6 +495,11 @@ static int saveHardLink(/*@special@*/ /* | ||
| 18 | } | ||
| 19 | |||
| 20 | if (fsm->goal == IOSM_PKGBUILD) --fsm->li->linksLeft; | ||
| 21 | + if (fsm->li->linksLeft > st->st_nlink) { | ||
| 22 | + rpmlog(RPMLOG_ERR, _("Corrupted hardlinks found (count %d does not match %d), exiting.\n"), fsm->li->linksLeft, st->st_nlink); | ||
| 23 | + return -1; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | fsm->li->filex[fsm->li->linksLeft] = fsm->ix; | ||
| 27 | /*@-observertrans -dependenttrans@*/ | ||
| 28 | fsm->li->nsuffix[fsm->li->linksLeft] = fsm->nsuffix; | ||
| 29 | @@ -1878,8 +1883,13 @@ if (!(fsmGetFi(fsm)->mapflags & IOSM_PAY | ||
| 30 | fsm->postpone = iosmFileActionSkipped(fsm->action); | ||
| 31 | if (fsm->goal == IOSM_PKGINSTALL || fsm->goal == IOSM_PKGBUILD) { | ||
| 32 | /*@-evalorder@*/ /* FIX: saveHardLink can modify fsm */ | ||
| 33 | - if (S_ISREG(st->st_mode) && st->st_nlink > 1) | ||
| 34 | + if (S_ISREG(st->st_mode) && st->st_nlink > 1) { | ||
| 35 | fsm->postpone = saveHardLink(fsm); | ||
| 36 | + if (fsm->postpone < 0) { | ||
| 37 | + rc = RPMRC_FAIL; | ||
| 38 | + break; | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | /*@=evalorder@*/ | ||
| 42 | } | ||
| 43 | if (fsmGetFi(fsm)->mapflags & IOSM_PAYLOAD_LIST) fsm->postpone = 1; | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch b/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch deleted file mode 100644 index 72884d4ad4..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | rpm - rpmio/keccak.c: make SSE/MMX dependent upon gcc config | ||
| 2 | |||
| 3 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 6 | |||
| 7 | Index: 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-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch b/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch deleted file mode 100644 index 1a48db63c6..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Wed, 2 Dec 2015 00:56:07 -0800 | ||
| 4 | Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32 | ||
| 5 | |||
| 6 | The following error can occur: | ||
| 7 | smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3 | ||
| 8 | error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32 | ||
| 9 | error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32 | ||
| 10 | |||
| 11 | This was because: | ||
| 12 | transactions_color = 001 (ELF32) & 010 (ELF64) & 100 (ELF32 N32 MIPS64) | ||
| 13 | FColor = Current file color (001) & transaction_color (111) | ||
| 14 | oFcolor = Previous file color (100) & transaction_color (111) | ||
| 15 | |||
| 16 | There are two places where the conflict comparisons occur. In both places | ||
| 17 | the 'else' clause was too restrictive (opposite of the 'positive' clause). | ||
| 18 | This caused the system to only permit a binary comparison - "new preferred" or | ||
| 19 | "old preferred". It did not permissing "neither preferred". By removing the | ||
| 20 | else comparison the system will now perform a 'last-in-wins' resolution when | ||
| 21 | "neither is preferred". | ||
| 22 | |||
| 23 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 24 | |||
| 25 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 26 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 27 | --- | ||
| 28 | lib/transaction.c | 3 ++- | ||
| 29 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
| 30 | |||
| 31 | Index: rpm-5.4.14/lib/transaction.c | ||
| 32 | =================================================================== | ||
| 33 | --- rpm-5.4.14.orig/lib/transaction.c | ||
| 34 | +++ rpm-5.4.14/lib/transaction.c | ||
| 35 | @@ -154,7 +154,7 @@ static int handleInstInstalledFile(const | ||
| 36 | fi->actions[fx] = FA_SKIPCOLOR; | ||
| 37 | #endif | ||
| 38 | rConflicts = 0; | ||
| 39 | - } else if (FColor & prefcolor) { | ||
| 40 | + } else { | ||
| 41 | #ifdef REFERENCE | ||
| 42 | rpmfsSetAction(fs, fx, FA_CREATE); | ||
| 43 | #else | ||
| 44 | @@ -420,7 +420,7 @@ assert(otherFi != NULL); | ||
| 45 | fi->actions[i] = FA_SKIPCOLOR; | ||
| 46 | rConflicts = 0; | ||
| 47 | } else | ||
| 48 | - if (FColor == 0 && oFColor == 0) { | ||
| 49 | + { | ||
| 50 | /* ... otherwise, do both, last in wins. */ | ||
| 51 | otherFi->actions[otherFileNum] = FA_CREATE; | ||
| 52 | fi->actions[i] = FA_CREATE; | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch deleted file mode 100644 index e87e02b69b..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | During installation, the libtool relink attempts to link to -lrpm... | ||
| 2 | The problem is that it hasn't been installed yet! So small change causes | ||
| 3 | the libtool to instead use the build version. | ||
| 4 | |||
| 5 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 6 | |||
| 7 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 8 | |||
| 9 | Index: rpm-5.4.14/lib/Makefile.am | ||
| 10 | =================================================================== | ||
| 11 | --- rpm-5.4.14.orig/lib/Makefile.am | ||
| 12 | +++ rpm-5.4.14/lib/Makefile.am | ||
| 13 | @@ -120,6 +120,9 @@ librpm.la: $(librpm_la_OBJECTS) $(librpm | ||
| 14 | #libsql_la_SOURCES = libsql.c | ||
| 15 | #libsql_la_LIBADD = librpm.la $(RPMDB_LDADD_COMMON) | ||
| 16 | |||
| 17 | +# pkglib libraries needs to have usrlib libraries already installed! | ||
| 18 | +install-pkglibLTLIBRARIES: install-usrlibLTLIBRARIES | ||
| 19 | + | ||
| 20 | install-data-hook: | ||
| 21 | if !ENABLE_BUILD_LAFILES | ||
| 22 | -for l in $(usrlib_LTLIBRARIES); do \ | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch b/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch deleted file mode 100644 index 3153f7a386..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | |||
| 2 | Upstream-Status: Inappropriate [configuration] | ||
| 3 | |||
| 4 | Index: rpm-5.4.14/rpmdb/DB_CONFIG.in | ||
| 5 | =================================================================== | ||
| 6 | --- rpm-5.4.14.orig/rpmdb/DB_CONFIG.in | ||
| 7 | +++ rpm-5.4.14/rpmdb/DB_CONFIG.in | ||
| 8 | @@ -4,6 +4,7 @@ set_data_dir . | ||
| 9 | set_create_dir . | ||
| 10 | set_lg_dir ./log | ||
| 11 | set_tmp_dir ./tmp | ||
| 12 | +set_flags db_log_autoremove on | ||
| 13 | |||
| 14 | # -- thread_count must be >= 8 | ||
| 15 | set_thread_count 64 | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch b/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch deleted file mode 100644 index a87518ba3a..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | Enable platform tag matching workaround in OE. | ||
| 2 | |||
| 3 | When installing some LSB packages the 'platform' field in the package | ||
| 4 | appears to be invalid. Instead of relying solely on the platform comparison | ||
| 5 | we also want to generate a perceived platform based on the valid rpm contents | ||
| 6 | of arch and os. | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 9 | |||
| 10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 11 | |||
| 12 | Index: rpm-5.4.14/lib/depends.c | ||
| 13 | =================================================================== | ||
| 14 | --- rpm-5.4.14.orig/lib/depends.c | ||
| 15 | +++ rpm-5.4.14/lib/depends.c | ||
| 16 | @@ -595,7 +595,7 @@ int rpmtsAddInstallElement(rpmts ts, Hea | ||
| 17 | platform = rpmExpand(arch, "-unknown-", os, NULL); | ||
| 18 | |||
| 19 | rc = rpmPlatformScore(platform, platpat, nplatpat); | ||
| 20 | -#if defined(RPM_VENDOR_MANDRIVA) | ||
| 21 | +#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE) | ||
| 22 | /* | ||
| 23 | * If no match on platform tag, we'll try again with arch tag | ||
| 24 | * in case platform tag is inconsistent with it, which is the case | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lua.patch b/meta/recipes-devtools/rpm/rpm/rpm-lua.patch deleted file mode 100644 index a9930d6705..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-lua.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | Add support for cross compiling lua | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 6 | |||
| 7 | Index: rpm-5.4.14/configure.ac | ||
| 8 | =================================================================== | ||
| 9 | --- rpm-5.4.14.orig/configure.ac | ||
| 10 | +++ rpm-5.4.14/configure.ac | ||
| 11 | @@ -121,6 +121,9 @@ AC_PROG_YACC | ||
| 12 | |||
| 13 | AC_PATH_PROG(AS, as, as) | ||
| 14 | |||
| 15 | +CC_FOR_BUILD=${CC_FOR_BUILD-\$(CC)} | ||
| 16 | +AC_SUBST(CC_FOR_BUILD) | ||
| 17 | + | ||
| 18 | dnl # GCC specifics | ||
| 19 | AC_PROG_GCC_TRADITIONAL | ||
| 20 | AC_ARG_ENABLE(build-pic, | ||
| 21 | Index: rpm-5.4.14/lua/Makefile.am | ||
| 22 | =================================================================== | ||
| 23 | --- rpm-5.4.14.orig/lua/Makefile.am | ||
| 24 | +++ rpm-5.4.14/lua/Makefile.am | ||
| 25 | @@ -41,7 +41,7 @@ rpmluac_LDADD = liblua.la | ||
| 26 | |||
| 27 | # --- bin2c doesn't need anything but a compiler | ||
| 28 | bin2c$(EXEEXT): bin2c.c | ||
| 29 | - $(CC) -o $@ $< | ||
| 30 | + $(CC_FOR_BUILD) -o $@ $< | ||
| 31 | |||
| 32 | liblua_la_SOURCES = | ||
| 33 | liblua_la_CFLAGS = @WITH_LUA_SUBDIR_DEF@ | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch b/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch deleted file mode 100644 index a08412aa91..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | disable external key server | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | |||
| 5 | When RPM experiences a signed package, with a signature that it does NOT know. | ||
| 6 | By default it will send the -fingerprint- (and only the 16 digit fingerprint) to | ||
| 7 | an external HKP server, trying to get the key down. | ||
| 8 | |||
| 9 | This is probably not a reasonable default behavior for the system to do, instead | ||
| 10 | it should simply fail the key lookup. If someone wants to enable the HKP server | ||
| 11 | it's easy enough to do by enabling the necessary macros. | ||
| 12 | |||
| 13 | Signed-off-by: yzhu1 <yanjun.zhu@windriver.com> | ||
| 14 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 15 | Index: rpm/macros/macros.in | ||
| 16 | =================================================================== | ||
| 17 | --- rpm.orig/macros/macros.in | ||
| 18 | +++ rpm/macros/macros.in | ||
| 19 | @@ -563,10 +563,10 @@ $_arbitrary_tags_tests Foo:Bar | ||
| 20 | |||
| 21 | # Horowitz Key Protocol server configuration | ||
| 22 | # | ||
| 23 | -%_hkp_keyserver hkp://keys.rpm5.org | ||
| 24 | +#%_hkp_keyserver hkp://keys.rpm5.org | ||
| 25 | #%_hkp_keyserver hkp://keys.n3npq.net | ||
| 26 | #%_hkp_keyserver hkp://pool.sks-keyservers.net | ||
| 27 | -%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search= | ||
| 28 | +#%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search= | ||
| 29 | |||
| 30 | |||
| 31 | # NSS_InitContext() parameter configuration | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-macros.patch b/meta/recipes-devtools/rpm/rpm/rpm-macros.patch deleted file mode 100644 index c7ab2d2bb7..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-macros.patch +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | macros/macros.in: Revert settings to the same as RPM 5.4.0 | ||
| 2 | |||
| 3 | Enable a reasonable set of rpmdeps dependency helper macros. These sets | ||
| 4 | were used by RPM 5.4.0. | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [configuration] | ||
| 7 | |||
| 8 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 9 | |||
| 10 | Index: rpm-5.4.14/macros/macros.in | ||
| 11 | =================================================================== | ||
| 12 | --- rpm-5.4.14.orig/macros/macros.in | ||
| 13 | +++ rpm-5.4.14/macros/macros.in | ||
| 14 | @@ -1022,7 +1022,7 @@ $_arbitrary_tags_tests Foo:Bar | ||
| 15 | |||
| 16 | #============================================================================== | ||
| 17 | # ---- rpmbuild macros. | ||
| 18 | -#%%{load:%{_usrlibrpm}/macros.rpmbuild} | ||
| 19 | +%{load:%{_usrlibrpm}/macros.rpmbuild} | ||
| 20 | |||
| 21 | #------------------------------------------------------------------------ | ||
| 22 | # cmake(...) configuration | ||
| 23 | @@ -1038,15 +1038,15 @@ $_arbitrary_tags_tests Foo:Bar | ||
| 24 | |||
| 25 | #------------------------------------------------------------------------ | ||
| 26 | # perl(...) configuration | ||
| 27 | -#%%{load:%{_usrlibrpm}/macros.d/perl} | ||
| 28 | +%{load:%{_usrlibrpm}/macros.d/perl} | ||
| 29 | |||
| 30 | #------------------------------------------------------------------------ | ||
| 31 | # python(...) configuration. | ||
| 32 | -#%%{load:%{_usrlibrpm}/macros.d/python} | ||
| 33 | +%{load:%{_usrlibrpm}/macros.d/python} | ||
| 34 | |||
| 35 | #------------------------------------------------------------------------ | ||
| 36 | # php(...) configuration. | ||
| 37 | -#%%{load:%{_usrlibrpm}/macros.d/php} | ||
| 38 | +%{load:%{_usrlibrpm}/macros.d/php} | ||
| 39 | |||
| 40 | #------------------------------------------------------------------------ | ||
| 41 | # java(...) configuration. | ||
| 42 | @@ -1054,11 +1054,11 @@ $_arbitrary_tags_tests Foo:Bar | ||
| 43 | |||
| 44 | #------------------------------------------------------------------------ | ||
| 45 | # libtool(...) configuration. | ||
| 46 | -#%%{load:%{_usrlibrpm}/macros.d/libtool} | ||
| 47 | +%{load:%{_usrlibrpm}/macros.d/libtool} | ||
| 48 | |||
| 49 | #------------------------------------------------------------------------ | ||
| 50 | # pkgconfig(...) configuration. | ||
| 51 | -#%%{load:%{_usrlibrpm}/macros.d/pkgconfig} | ||
| 52 | +%{load:%{_usrlibrpm}/macros.d/pkgconfig} | ||
| 53 | |||
| 54 | #------------------------------------------------------------------------ | ||
| 55 | # mono(...) configuration. | ||
| 56 | @@ -1070,7 +1070,7 @@ $_arbitrary_tags_tests Foo:Bar | ||
| 57 | |||
| 58 | #------------------------------------------------------------------------ | ||
| 59 | # tcl(...) configuration. | ||
| 60 | -#%%{load:%{_usrlibrpm}/macros.d/tcl} | ||
| 61 | +%{load:%{_usrlibrpm}/macros.d/tcl} | ||
| 62 | |||
| 63 | #------------------------------------------------------------------------ | ||
| 64 | # typelib(...) configuration. | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch b/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch deleted file mode 100644 index 6c3e4718b9..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | Fix errors when building with sasl2 disabled | ||
| 2 | |||
| 3 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 6 | |||
| 7 | Index: 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 */ | ||
| 38 | Index: 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-no-loopmsg.patch b/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch deleted file mode 100644 index e58cc13a6f..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | lib/order.c: Make the dependency loop messages into debug msgs | ||
| 2 | |||
| 3 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 6 | |||
| 7 | Index: rpm-5.4.14/lib/order.c | ||
| 8 | =================================================================== | ||
| 9 | --- rpm-5.4.14.orig/lib/order.c | ||
| 10 | +++ rpm-5.4.14/lib/order.c | ||
| 11 | @@ -2175,7 +2175,7 @@ rescan: | ||
| 12 | const char * dp; | ||
| 13 | rpmlogLvl msglvl = (anaconda || (rpmtsDFlags(ts) & RPMDEPS_FLAG_DEPLOOPS)) | ||
| 14 | ? RPMLOG_WARNING : RPMLOG_ERR; | ||
| 15 | -#if defined(RPM_VENDOR_MANDRIVA) /* loop-detection-optional-loglevel */ | ||
| 16 | +#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE) /* loop-detection-optional-loglevel */ | ||
| 17 | // Report loops as debug-level message by default (7 = RPMLOG_DEBUG), overridable | ||
| 18 | msglvl = rpmExpandNumeric("%{?_loop_detection_loglevel}%{?!_loop_detection_loglevel:7}"); | ||
| 19 | #endif | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch b/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch deleted file mode 100644 index 58182296cf..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-no-perl-urpm.patch +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | Disable perl-URPM support | ||
| 2 | |||
| 3 | This causes a configure failure when perl-URPM is not used. | ||
| 4 | |||
| 5 | | configure.ac:1159: required file `perl-URPM/Makefile.PL.in' not found | ||
| 6 | | configure.ac:1159: required file `perl-URPM/Makefile.in' not found | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [disable feature] | ||
| 9 | |||
| 10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 11 | |||
| 12 | Index: rpm-5.4.14/configure.ac | ||
| 13 | =================================================================== | ||
| 14 | --- rpm-5.4.14.orig/configure.ac | ||
| 15 | +++ rpm-5.4.14/configure.ac | ||
| 16 | @@ -1186,30 +1186,10 @@ AC_SUBST(WITH_PERL_SUBDIR) | ||
| 17 | AC_SUBST(WITH_PERL_SUBPACKAGE) | ||
| 18 | AC_SUBST(WITH_PERL_LIBS) | ||
| 19 | |||
| 20 | -dnl # optional Perl-URPM language bindings | ||
| 21 | +dnl # disable Perl-URPM language bindings | ||
| 22 | WITH_PERL_URPM_SUBDIR="" | ||
| 23 | WITH_PERL_URPM_SUBPACKAGE=0 | ||
| 24 | WITH_PERL_URPM_LIBS="" | ||
| 25 | -if test ".$WITH_PTHREADS" = .yes; then | ||
| 26 | - WITH_PERL_URPM_LIBS="$LIBS" | ||
| 27 | -fi | ||
| 28 | -AC_ARG_WITH(perl-urpm, AS_HELP_STRING([--with-perl-urpm], [build with Perl URPM language bindings]), [ | ||
| 29 | - if test ".$withval" != .no; then | ||
| 30 | - PERL_URPM_INSTALLDIRS="" | ||
| 31 | - if test "$withval" == "vendor"; then | ||
| 32 | - PERL_URPM_INSTALLDIRS="'INSTALLDIRS' => 'vendor'," | ||
| 33 | - fi | ||
| 34 | - if test "$withval" == "site"; then | ||
| 35 | - PERL_URPM_INSTALLDIRS="'INSTALLDIRS' => 'site'," | ||
| 36 | - fi | ||
| 37 | - AC_DEFINE_UNQUOTED([PERL_URPM_INSTALLDIRS], [$PERL_URPM_INSTALLDIRS], [Perl install directory (vendor/site)]) | ||
| 38 | - AC_SUBST(PERL_URPM_INSTALLDIRS) | ||
| 39 | - WITH_PERL_URPM_SUBDIR=perl-URPM | ||
| 40 | - WITH_PERL_URPM_SUBPACKAGE=1 | ||
| 41 | - AC_CONFIG_FILES([perl-URPM/Makefile.PL]) | ||
| 42 | - AC_CONFIG_FILES([perl-URPM/Makefile]) | ||
| 43 | - fi | ||
| 44 | -]) | ||
| 45 | AC_SUBST(WITH_PERL_URPM_SUBDIR) | ||
| 46 | AC_SUBST(WITH_PERL_URPM_SUBPACKAGE) | ||
| 47 | AC_SUBST(WITH_PERL_URPM_LIBS) | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch b/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch deleted file mode 100644 index e2191245f8..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | rpm: opendb before rpmverifyscript to avoid null point input | ||
| 2 | |||
| 3 | If the command is "rpm -V" and the return value of (headerIsEntry(h, RPMTAG_VERIFYSCRIPT) | ||
| 4 | || headerIsEntry(h, RPMTAG_SANITYCHECK)) located in /lib/verify.c is true, it will call | ||
| 5 | rpmpsmStage function(rpmVerifyScript->rpmpsmScriptStage->rpmpsmStage) and occur segment | ||
| 6 | fault because of null point(rpmtsGetRdb(ts) == NULL and rpmtsGetRdb(ts)->db_txn). | ||
| 7 | So we open rpmdb to avoid bad input when find headerIsEntry true. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 10 | |||
| 11 | Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> | ||
| 12 | Index: rpm-5.4.14/lib/verify.c | ||
| 13 | =================================================================== | ||
| 14 | --- rpm-5.4.14.orig/lib/verify.c 2015-07-22 22:09:59.992895355 +0800 | ||
| 15 | +++ rpm-5.4.14/lib/verify.c 2015-08-13 10:20:33.752177906 +0800 | ||
| 16 | @@ -613,6 +613,8 @@ | ||
| 17 | { | ||
| 18 | FD_t fdo = fdDup(STDOUT_FILENO); | ||
| 19 | |||
| 20 | + rpmtsOpenDB(ts, O_RDONLY); /*Open the DB to avoid null point input in function rpmpsmStage()*/ | ||
| 21 | + | ||
| 22 | rc = rpmfiSetHeader(fi, h); | ||
| 23 | if ((rc = rpmVerifyScript(qva, ts, fi, fdo)) != 0) | ||
| 24 | ec += rc; | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch b/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch deleted file mode 100644 index 691aba9ea3..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-ossp-uuid.patch +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | Fix integration of ossp-uuid | ||
| 2 | |||
| 3 | We need to avoid including the util-linux uuid library, instead | ||
| 4 | we need ossp-uuid. There is a related hack in do_configure to | ||
| 5 | make sure that we use the right .pc file as well. | ||
| 6 | |||
| 7 | Upstream-Status: Inappropriate [disable feature] | ||
| 8 | |||
| 9 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 10 | |||
| 11 | Index: rpm-5.4.14/configure.ac | ||
| 12 | =================================================================== | ||
| 13 | --- rpm-5.4.14.orig/configure.ac | ||
| 14 | +++ rpm-5.4.14/configure.ac | ||
| 15 | @@ -1951,7 +1951,7 @@ grep -v 'define HAVE_UNISTD_H' confdefs. | ||
| 16 | esac | ||
| 17 | RPM_CHECK_LIB( | ||
| 18 | [OSSP uuid], [uuid], | ||
| 19 | - [ossp-uuid uuid], [uuid_import], [uuid.h], | ||
| 20 | + [ossp-uuid], [uuid_import], [uuid.h], | ||
| 21 | [no,external:none], [], | ||
| 22 | [ dnl # enable OSSP uuid native API support for embedded Lua | ||
| 23 | if test ".$WITH_LUA" = .yes; then | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch b/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch deleted file mode 100644 index 57fc6ce88c..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | Add the ability to query the packageorigin | ||
| 2 | |||
| 3 | Written by jbj at rpm5.org | ||
| 4 | |||
| 5 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 6 | |||
| 7 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 8 | |||
| 9 | Index: rpm-5.4.14/rpmdb/hdrfmt.c | ||
| 10 | =================================================================== | ||
| 11 | --- rpm-5.4.14.orig/rpmdb/hdrfmt.c | ||
| 12 | +++ rpm-5.4.14/rpmdb/hdrfmt.c | ||
| 13 | @@ -2409,8 +2409,10 @@ static int pkgoriginTag(Header h, HE_t h | ||
| 14 | int rc = 1; | ||
| 15 | |||
| 16 | he->tag = RPMTAG_PACKAGEORIGIN; | ||
| 17 | - if (!headerGet(h, he, HEADERGET_NOEXTENSION) | ||
| 18 | - && (origin = headerGetOrigin(h)) != NULL) | ||
| 19 | + /* XXX two sources for tag data: what search precedence? */ | ||
| 20 | + if (headerGet(h, he, HEADERGET_NOEXTENSION)) | ||
| 21 | + rc = 0; | ||
| 22 | + else if ((origin = headerGetOrigin(h)) != NULL) | ||
| 23 | { | ||
| 24 | he->t = RPM_STRING_TYPE; | ||
| 25 | he->p.str = xstrdup(origin); | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch b/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch deleted file mode 100644 index af643b1c62..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch +++ /dev/null | |||
| @@ -1,126 +0,0 @@ | |||
| 1 | If we run builds on a filesystem with 64 bit inodes like XFS, we need to | ||
| 2 | map the inode numbers to something 32 bit since the cpio header only allows | ||
| 3 | for 32 bit inode values. If we don't do this: | ||
| 4 | |||
| 5 | #define SET_NUM_FIELD(phys, val, space) \ | ||
| 6 | sprintf(space, "%8.8lx", (unsigned long) (val)); \ | ||
| 7 | memcpy(phys, space, 8) | ||
| 8 | |||
| 9 | from cpio.c will print larger that 8 character values and then truncate the | ||
| 10 | LSBs. This generates cpio files where hardlinked files may have the same | ||
| 11 | inode number. The resulting rpms are then corrupted. | ||
| 12 | |||
| 13 | There is a separate patch for the crash the identical inode numbers causes | ||
| 14 | when extracting the rpm. | ||
| 15 | |||
| 16 | Patch taken from http://git.pld-linux.org/?p=packages/rpm.git;a=commitdiff;h=10526c23aac60b7b636e4c93862887dbef8e8f15 | ||
| 17 | |||
| 18 | RP 2014/6/10 | ||
| 19 | |||
| 20 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 21 | |||
| 22 | Index: rpm-5.4.14/build/files.c | ||
| 23 | =================================================================== | ||
| 24 | --- rpm-5.4.14.orig/build/files.c | ||
| 25 | +++ rpm-5.4.14/build/files.c | ||
| 26 | @@ -1328,6 +1328,26 @@ static rpmuint32_t getDigestAlgo(Header | ||
| 27 | return dalgo; | ||
| 28 | } | ||
| 29 | |||
| 30 | +static int isHardLink(FileListRec flp, FileListRec tlp) | ||
| 31 | +{ | ||
| 32 | + return ((S_ISREG(flp->fl_mode) && S_ISREG(tlp->fl_mode)) && | ||
| 33 | + ((flp->fl_nlink > 1) && (flp->fl_nlink == tlp->fl_nlink)) && | ||
| 34 | + (flp->fl_ino == tlp->fl_ino) && | ||
| 35 | + (flp->fl_dev == tlp->fl_dev)); | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +static int seenHardLink(FileList fl, FileListRec flp, ino_t *fileid) | ||
| 39 | +{ | ||
| 40 | + FileListRec ilp; | ||
| 41 | + for (ilp = fl->fileList; ilp < flp; ilp++) { | ||
| 42 | + if (isHardLink(flp, ilp)) { | ||
| 43 | + *fileid = ilp - fl->fileList; | ||
| 44 | + return 1; | ||
| 45 | + } | ||
| 46 | + } | ||
| 47 | + return 0; | ||
| 48 | +} | ||
| 49 | + | ||
| 50 | /** | ||
| 51 | * Add file entries to header. | ||
| 52 | * @todo Should directories have %doc/%config attributes? (#14531) | ||
| 53 | @@ -1374,6 +1394,7 @@ memset(buf, 0, sizeof(buf)); /* XXX valg | ||
| 54 | |||
| 55 | for (i = 0, flp = fl->fileList; i < fl->fileListRecsUsed; i++, flp++) { | ||
| 56 | const char *s; | ||
| 57 | + ino_t fileid = flp - fl->fileList; | ||
| 58 | |||
| 59 | /* Merge duplicate entries. */ | ||
| 60 | while (i < (fl->fileListRecsUsed - 1) && | ||
| 61 | @@ -1436,6 +1457,13 @@ memset(buf, 0, sizeof(buf)); /* XXX valg | ||
| 62 | /* Leave room for both dirname and basename NUL's */ | ||
| 63 | dpathlen += (strlen(flp->diskURL) + 2); | ||
| 64 | |||
| 65 | + /* Excludes and dupes have been filtered out by now. */ | ||
| 66 | + if (S_ISREG(flp->fl_mode)) { | ||
| 67 | + if (flp->fl_nlink == 1 || !seenHardLink(fl, flp, &fileid)) { | ||
| 68 | + fl->totalFileSize += flp->fl_size; | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | /* | ||
| 73 | * Make the header, the OLDFILENAMES will get converted to a | ||
| 74 | * compressed file list write before we write the actual package to | ||
| 75 | @@ -1518,7 +1546,11 @@ memset(buf, 0, sizeof(buf)); /* XXX valg | ||
| 76 | |||
| 77 | /* XXX Hash instead of 64b->32b truncate to prevent aliasing. */ | ||
| 78 | { ino_t _ino = flp->fl_ino; | ||
| 79 | + /* don't use hash here, as hash collisions which happen on large packages | ||
| 80 | + cause bus errors in rpmbuild | ||
| 81 | ui32 = hashFunctionString(0, &_ino, sizeof(_ino)); | ||
| 82 | + */ | ||
| 83 | + ui32 = fileid + 1; | ||
| 84 | } | ||
| 85 | he->tag = RPMTAG_FILEINODES; | ||
| 86 | he->t = RPM_UINT32_TYPE; | ||
| 87 | @@ -1751,39 +1783,6 @@ if (_rpmbuildFlags & 4) { | ||
| 88 | IOSM_MAP_TYPE | IOSM_MAP_MODE | IOSM_MAP_UID | IOSM_MAP_GID; | ||
| 89 | if (isSrc) | ||
| 90 | fi->fmapflags[i] |= IOSM_FOLLOW_SYMLINKS; | ||
| 91 | - | ||
| 92 | - if (S_ISREG(flp->fl_mode)) { | ||
| 93 | - int bingo = 1; | ||
| 94 | - /* Hard links need be tallied only once. */ | ||
| 95 | - if (flp->fl_nlink > 1) { | ||
| 96 | - FileListRec jlp = flp + 1; | ||
| 97 | - int j = i + 1; | ||
| 98 | - for (; (unsigned)j < fi->fc; j++, jlp++) { | ||
| 99 | - /* follow outer loop logic */ | ||
| 100 | - while (((jlp - fl->fileList) < (fl->fileListRecsUsed - 1)) && | ||
| 101 | - !strcmp(jlp->fileURL, jlp[1].fileURL)) | ||
| 102 | - jlp++; | ||
| 103 | - if (jlp->flags & RPMFILE_EXCLUDE) { | ||
| 104 | - j--; | ||
| 105 | - /*@innercontinue@*/ continue; | ||
| 106 | - } | ||
| 107 | - if (jlp->flags & RPMFILE_GHOST) | ||
| 108 | - /*@innercontinue@*/ continue; | ||
| 109 | - if (!S_ISREG(jlp->fl_mode)) | ||
| 110 | - /*@innercontinue@*/ continue; | ||
| 111 | - if (flp->fl_nlink != jlp->fl_nlink) | ||
| 112 | - /*@innercontinue@*/ continue; | ||
| 113 | - if (flp->fl_ino != jlp->fl_ino) | ||
| 114 | - /*@innercontinue@*/ continue; | ||
| 115 | - if (flp->fl_dev != jlp->fl_dev) | ||
| 116 | - /*@innercontinue@*/ continue; | ||
| 117 | - bingo = 0; /* don't tally hardlink yet. */ | ||
| 118 | - /*@innerbreak@*/ break; | ||
| 119 | - } | ||
| 120 | - } | ||
| 121 | - if (bingo) | ||
| 122 | - fl->totalFileSize += flp->fl_size; | ||
| 123 | - } | ||
| 124 | } | ||
| 125 | |||
| 126 | ui32 = fl->totalFileSize; | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch b/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch deleted file mode 100644 index 656de86d70..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | pkgconfigdeps.sh: Change to restricting pkgconfig to the local directory | ||
| 2 | |||
| 3 | Using PKG_CONFIG_PATH will allow pkg-config to fall back to the system paths, | ||
| 4 | we don't want this as it may lead to inaccurate results in some corner cases. | ||
| 5 | |||
| 6 | PKG_CONFIG_LIBDIR will ensure pkg-config stays within the install directory. | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [configuration] | ||
| 9 | |||
| 10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 11 | |||
| 12 | Index: rpm/scripts/pkgconfigdeps.sh | ||
| 13 | =================================================================== | ||
| 14 | --- rpm.orig/scripts/pkgconfigdeps.sh | ||
| 15 | +++ rpm/scripts/pkgconfigdeps.sh | ||
| 16 | @@ -18,8 +18,8 @@ case $1 in | ||
| 17 | *.pc) | ||
| 18 | # Query the dependencies of the package. | ||
| 19 | DIR=$(dirname ${filename}) | ||
| 20 | - PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" | ||
| 21 | - export PKG_CONFIG_PATH | ||
| 22 | + PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig" | ||
| 23 | + export PKG_CONFIG_LIBDIR | ||
| 24 | $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do | ||
| 25 | [ -n "$n" ] || continue | ||
| 26 | # We have a dependency. Make a note that we need the pkgconfig | ||
| 27 | @@ -42,8 +42,8 @@ case $1 in | ||
| 28 | [ -n "$oneshot" ] && echo "$oneshot"; oneshot="" | ||
| 29 | # Query the dependencies of the package. | ||
| 30 | DIR=$(dirname ${filename}) | ||
| 31 | - PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" | ||
| 32 | - export PKG_CONFIG_PATH | ||
| 33 | + PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig" | ||
| 34 | + export PKG_CONFIG_LIBDIR | ||
| 35 | $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do | ||
| 36 | [ -n "$n" ] || continue | ||
| 37 | if [ -n "$r" ] && [ -n "$v" ]; then | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch deleted file mode 100644 index 200964f39d..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | Don't add the first line of /etc/rpm/platform to the list of patterns | ||
| 2 | to match when computing an arch score, use it just for getting | ||
| 3 | information about the platform (cpu/vendor/os). Fixes #3864. | ||
| 4 | |||
| 5 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 6 | |||
| 7 | Index: rpm-5.4.14/lib/rpmrc.c | ||
| 8 | =================================================================== | ||
| 9 | --- rpm-5.4.14.orig/lib/rpmrc.c | ||
| 10 | +++ rpm-5.4.14/lib/rpmrc.c | ||
| 11 | @@ -510,6 +510,7 @@ static rpmRC rpmPlatform(const char * pl | ||
| 12 | #endif | ||
| 13 | } | ||
| 14 | |||
| 15 | +#if !defined(RPM_VENDOR_OE) /* Skip the explicit-platform */ | ||
| 16 | #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */ | ||
| 17 | /* do not use vendor and GNU attribution */ | ||
| 18 | p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL); | ||
| 19 | @@ -520,7 +521,8 @@ static rpmRC rpmPlatform(const char * pl | ||
| 20 | #endif | ||
| 21 | xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre); | ||
| 22 | p = _free(p); | ||
| 23 | - | ||
| 24 | +#endif | ||
| 25 | + | ||
| 26 | init_platform++; | ||
| 27 | } | ||
| 28 | rc = (init_platform ? RPMRC_OK : RPMRC_FAIL); | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform.patch deleted file mode 100644 index 3b40fea0eb..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-platform.patch +++ /dev/null | |||
| @@ -1,137 +0,0 @@ | |||
| 1 | Fix up platform and related sysinfo file loading. | ||
| 2 | |||
| 3 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 4 | |||
| 5 | This ensures that RPM knows the compatible set of package types at all times. | ||
| 6 | |||
| 7 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 8 | |||
| 9 | Index: rpm-5.4.14/lib/depends.c | ||
| 10 | =================================================================== | ||
| 11 | --- rpm-5.4.14.orig/lib/depends.c | ||
| 12 | +++ rpm-5.4.14/lib/depends.c | ||
| 13 | @@ -250,7 +250,7 @@ static int rpmtsAddUpgrades(rpmts ts, rp | ||
| 14 | he->p.ptr = _free(he->p.ptr); | ||
| 15 | } | ||
| 16 | |||
| 17 | -#if defined(RPM_VENDOR_WINDRIVER) | ||
| 18 | +#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE) | ||
| 19 | /* | ||
| 20 | * If we're capable of installing multiple colors | ||
| 21 | * but at least one of the packages are white (0), we | ||
| 22 | @@ -507,7 +507,7 @@ assert(lastx >= 0 && lastx < ts->orderCo | ||
| 23 | return 0; | ||
| 24 | } | ||
| 25 | |||
| 26 | -#if defined(RPM_VENDOR_WINDRIVER) | ||
| 27 | +#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE) | ||
| 28 | /* Is "compat" compatible w/ arch? */ | ||
| 29 | int _isCompatibleArch(const char * arch, const char * compat) | ||
| 30 | { | ||
| 31 | @@ -663,7 +663,7 @@ assert(he->p.str != NULL); | ||
| 32 | |||
| 33 | if (arch == NULL || (parch = rpmteA(p)) == NULL) | ||
| 34 | continue; | ||
| 35 | -#if defined(RPM_VENDOR_WINDRIVER) | ||
| 36 | +#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE) | ||
| 37 | /* XXX hackery for alias matching. */ | ||
| 38 | if (!_isCompatibleArch(arch, parch)) | ||
| 39 | continue; | ||
| 40 | @@ -829,6 +829,12 @@ int rpmtsAddEraseElement(rpmts ts, Heade | ||
| 41 | return rc; | ||
| 42 | } | ||
| 43 | |||
| 44 | +#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE) | ||
| 45 | +#define _ETC_RPM_SYSINFO "%{_etcrpm}/sysinfo" | ||
| 46 | +#else | ||
| 47 | +#define _ETC_RPM_SYSINFO SYSCONFIGDIR "/sysinfo" | ||
| 48 | +#endif | ||
| 49 | + | ||
| 50 | /*@only@*/ /*@null@*/ /*@unchecked@*/ | ||
| 51 | static char *sysinfo_path = NULL; | ||
| 52 | |||
| 53 | @@ -1311,7 +1317,7 @@ retry: | ||
| 54 | sysinfo_path = rpmExpand("%{?_rpmds_sysinfo_path}", NULL); | ||
| 55 | if (!(sysinfo_path != NULL && *sysinfo_path == '/')) { | ||
| 56 | sysinfo_path = _free(sysinfo_path); | ||
| 57 | - sysinfo_path = xstrdup(SYSCONFIGDIR "/sysinfo"); | ||
| 58 | + sysinfo_path = rpmExpand(_ETC_RPM_SYSINFO, NULL); | ||
| 59 | } | ||
| 60 | } | ||
| 61 | |||
| 62 | Index: rpm-5.4.14/lib/rpmds.c | ||
| 63 | =================================================================== | ||
| 64 | --- rpm-5.4.14.orig/lib/rpmds.c | ||
| 65 | +++ rpm-5.4.14/lib/rpmds.c | ||
| 66 | @@ -1759,7 +1759,7 @@ int rpmdsSysinfo(rpmPRCO PRCO, const cha | ||
| 67 | /*@-observertrans @*/ | ||
| 68 | _sysinfo_path = _free(_sysinfo_path); | ||
| 69 | /*@=observertrans @*/ | ||
| 70 | - _sysinfo_path = xstrdup(_ETC_RPM_SYSINFO); | ||
| 71 | + _sysinfo_path = rpmExpand(_ETC_RPM_SYSINFO, NULL); | ||
| 72 | } | ||
| 73 | } | ||
| 74 | /*@=modobserver@*/ | ||
| 75 | Index: rpm-5.4.14/lib/rpmrc.c | ||
| 76 | =================================================================== | ||
| 77 | --- rpm-5.4.14.orig/lib/rpmrc.c | ||
| 78 | +++ rpm-5.4.14/lib/rpmrc.c | ||
| 79 | @@ -38,7 +38,13 @@ | ||
| 80 | static const char * configTarget = NULL; | ||
| 81 | |||
| 82 | /*@observer@*/ /*@unchecked@*/ | ||
| 83 | -static const char * platform = SYSCONFIGDIR "/platform"; | ||
| 84 | +#if defined(RPM_VENDOR_WINDRIVER) | ||
| 85 | +#define _ETC_RPM_PLATFORM "%{_etcrpm}/platform" | ||
| 86 | +#else | ||
| 87 | +#define _ETC_RPM_PLATFORM SYSCONFIGDIR "/platform" | ||
| 88 | +#endif | ||
| 89 | + | ||
| 90 | +static const char * _platform = NULL; | ||
| 91 | |||
| 92 | /*@only@*/ /*@relnull@*/ /*@unchecked@*/ | ||
| 93 | void * platpat = NULL; | ||
| 94 | @@ -694,16 +700,17 @@ static void defaultMachine(/*@out@*/ con | ||
| 95 | int rc; | ||
| 96 | |||
| 97 | while (!gotDefaults) { | ||
| 98 | -#if defined(RPM_VENDOR_WINDRIVER) | ||
| 99 | - const char * _platform = rpmGetPath(__etcrpm, "/platform", NULL); | ||
| 100 | -#else | ||
| 101 | - const char * _platform = platform; | ||
| 102 | -#endif | ||
| 103 | + if (_platform == NULL) { | ||
| 104 | + _platform = rpmExpand("%{?_rpmrc_platform_path}", NULL); | ||
| 105 | + /* XXX may need to validate path existence somewhen. */ | ||
| 106 | + if (!(_platform != NULL && *_platform == '/')) { | ||
| 107 | + _platform = _free(_platform); | ||
| 108 | + _platform = rpmExpand(_ETC_RPM_PLATFORM, NULL); | ||
| 109 | + } | ||
| 110 | + } | ||
| 111 | CVOG_t cvog = NULL; | ||
| 112 | #if defined(RPM_VENDOR_OPENPKG) /* larger-utsname */ | ||
| 113 | const char *cp; | ||
| 114 | -#endif | ||
| 115 | -#if defined(RPM_VENDOR_OPENPKG) /* larger-utsname */ | ||
| 116 | /* utsname fields on some platforms (like HP-UX) are very small | ||
| 117 | (just about 8 characters). This is too small for OpenPKG, so cheat! */ | ||
| 118 | rc = uname(&un_real); | ||
| 119 | @@ -780,9 +787,7 @@ static void defaultMachine(/*@out@*/ con | ||
| 120 | if (cp != NULL && cp != _platform) | ||
| 121 | cp = _free(cp); | ||
| 122 | #endif | ||
| 123 | -#if defined(RPM_VENDOR_WINDRIVER) | ||
| 124 | _platform = _free(_platform); | ||
| 125 | -#endif | ||
| 126 | |||
| 127 | if (configTarget && !parseCVOG(configTarget, &cvog) && cvog != NULL) { | ||
| 128 | gotDefaults = 1; | ||
| 129 | @@ -1101,6 +1106,8 @@ int rpmReadConfigFiles(/*@unused@*/ cons | ||
| 130 | |||
| 131 | #ifdef PREMACROFILES | ||
| 132 | if (rpmReadRC(PREMACROFILES)) return -1; | ||
| 133 | +#else | ||
| 134 | + if (rpmReadRC(NULL)) return -1; | ||
| 135 | #endif | ||
| 136 | |||
| 137 | /* Reset umask to its default umask(2) value. */ | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch deleted file mode 100644 index b9675c71be..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch +++ /dev/null | |||
| @@ -1,105 +0,0 @@ | |||
| 1 | Fix up platform and related sysinfo file loading (part 2). | ||
| 2 | |||
| 3 | We need to ensure that we set the _gnu flag somehow. We do this by reading | ||
| 4 | from the platform file, and setting a new _platform_gnu and related vars. | ||
| 5 | |||
| 6 | The default values of _host_cpu, _host_vendor and _host_os are changed to | ||
| 7 | reference either the automatically determined _target_... or _platform_... | ||
| 8 | values. The macros file uses the configure time defaults in _platform_... | ||
| 9 | versions have not been defined. This preserves existing behavior, but | ||
| 10 | ensures reasonable defaults are always available. | ||
| 11 | |||
| 12 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 13 | |||
| 14 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 15 | |||
| 16 | Index: rpm-5.4.14/lib/rpmrc.c | ||
| 17 | =================================================================== | ||
| 18 | --- rpm-5.4.14.orig/lib/rpmrc.c | ||
| 19 | +++ rpm-5.4.14/lib/rpmrc.c | ||
| 20 | @@ -328,10 +328,15 @@ static void setDefaults(void) | ||
| 21 | /*@modifies rpmGlobalMacroContext, internalState @*/ | ||
| 22 | { | ||
| 23 | |||
| 24 | -#if defined(RPM_VENDOR_WINDRIVER) | ||
| 25 | +#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE) | ||
| 26 | addMacro(NULL, "_usrlibrpm", NULL, __usrlibrpm, RMIL_DEFAULT); | ||
| 27 | addMacro(NULL, "_etcrpm", NULL, __etcrpm, RMIL_DEFAULT); | ||
| 28 | addMacro(NULL, "_vendor", NULL, "%{?_host_vendor}%{!?_host_vendor:wrs}", RMIL_DEFAULT); | ||
| 29 | + | ||
| 30 | + addMacro(NULL, "_host_cpu", NULL, "%{?_platform_cpu}%{!?_platform_cpu:%{?_target_cpu}}", RMIL_DEFAULT); | ||
| 31 | + addMacro(NULL, "_host_vendor", NULL, "%{?_platform_vendor}%{!?_platform_cpu:%{?_target_vendor}}", RMIL_DEFAULT); | ||
| 32 | + addMacro(NULL, "_host_os", NULL, "%{?_platform_os}%{!?_platform_os:%{?_target_os}}", RMIL_DEFAULT); | ||
| 33 | + addMacro(NULL, "_host_gnu", NULL, "%{?_platform_gnu}%{!?_platform_gnu:%{?_gnu}}", RMIL_DEFAULT); | ||
| 34 | #endif | ||
| 35 | |||
| 36 | addMacro(NULL, "_usr", NULL, USRPREFIX, RMIL_DEFAULT); | ||
| 37 | @@ -487,9 +492,22 @@ static rpmRC rpmPlatform(const char * pl | ||
| 38 | } | ||
| 39 | |||
| 40 | if (!parseCVOG(p, &cvog) && cvog != NULL) { | ||
| 41 | +#if defined(RPM_VENDOR_OE) | ||
| 42 | + char * _gnu = NULL; | ||
| 43 | + | ||
| 44 | + addMacro(NULL, "_platform_cpu", NULL, cvog->cpu, -1); | ||
| 45 | + addMacro(NULL, "_platform_vendor", NULL, cvog->vendor, -1); | ||
| 46 | + addMacro(NULL, "_platform_os", NULL, cvog->os, -1); | ||
| 47 | + | ||
| 48 | + if (cvog->gnu && cvog->gnu[0] != '\0') | ||
| 49 | + _gnu = rpmExpand("-", cvog->gnu, NULL); | ||
| 50 | + | ||
| 51 | + addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1); | ||
| 52 | +#else | ||
| 53 | addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1); | ||
| 54 | addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1); | ||
| 55 | addMacro(NULL, "_host_os", NULL, cvog->os, -1); | ||
| 56 | +#endif | ||
| 57 | } | ||
| 58 | |||
| 59 | #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */ | ||
| 60 | Index: rpm-5.4.14/macros/macros.in | ||
| 61 | =================================================================== | ||
| 62 | --- rpm-5.4.14.orig/macros/macros.in | ||
| 63 | +++ rpm-5.4.14/macros/macros.in | ||
| 64 | @@ -900,9 +900,9 @@ $_arbitrary_tags_tests Foo:Bar | ||
| 65 | %_os @RPMCANONOS@ | ||
| 66 | %_gnu @RPMCANONGNU@ | ||
| 67 | |||
| 68 | -%_host_platform %{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu} | ||
| 69 | -%_build_platform %{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_gnu} | ||
| 70 | -%_target_platform %{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_gnu} | ||
| 71 | +%_host_platform %{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}} | ||
| 72 | +%_build_platform %{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}} | ||
| 73 | +%_target_platform %{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}} | ||
| 74 | |||
| 75 | #============================================================================== | ||
| 76 | # ---- configure macros. | ||
| 77 | @@ -945,9 +945,10 @@ $_arbitrary_tags_tests Foo:Bar | ||
| 78 | %_build_os %{_host_os} | ||
| 79 | %_host @host@ | ||
| 80 | %_host_alias @host_alias@%{nil} | ||
| 81 | -%_host_cpu @host_cpu@ | ||
| 82 | -%_host_vendor @host_vendor@ | ||
| 83 | -%_host_os @host_os@ | ||
| 84 | +%_host_cpu %{?_platform_cpu}%{!?_platform_cpu:%{_arch}} | ||
| 85 | +%_host_vendor %{?_platform_vendor}%{!?_platform_vendor:%{_vendor}} | ||
| 86 | +%_host_os %{?_platform_os}%{!?_platform_os:%{_os}} | ||
| 87 | +%_host_gnu %{?_platform_gnu}%{!?_platform_gnu:%{_gnu}} | ||
| 88 | %_target %{_host} | ||
| 89 | %_target_alias %{_host_alias} | ||
| 90 | %_target_cpu %{_host_cpu} | ||
| 91 | Index: rpm-5.4.14/python/rpmmodule.c | ||
| 92 | =================================================================== | ||
| 93 | --- rpm-5.4.14.orig/python/rpmmodule.c | ||
| 94 | +++ rpm-5.4.14/python/rpmmodule.c | ||
| 95 | @@ -65,8 +65,8 @@ static PyObject * archScore(PyObject * s | ||
| 96 | if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &arch)) | ||
| 97 | return NULL; | ||
| 98 | |||
| 99 | -#if defined(RPM_VENDOR_WINDRIVER) | ||
| 100 | - platform = rpmExpand(arch, "-%{_host_vendor}", "-%{_host_os}%{?_gnu}", NULL); | ||
| 101 | +#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE) | ||
| 102 | + platform = rpmExpand(arch, "-%{_host_vendor}", "-%{_host_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}", NULL); | ||
| 103 | #else | ||
| 104 | platform = rpmExpand(arch, "-", "%{_vendor}", "-", "%{_os}", NULL); | ||
| 105 | #endif | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch deleted file mode 100644 index 92ef1dc50e..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | python/rpmmodules.c: Change the way the python module loads the RPM config | ||
| 2 | |||
| 3 | In order to support the RPM_VENDOR_WINDRIVER enhancement of dynamic | ||
| 4 | runtime relocation paths, we need to call rpmcliInit instead of | ||
| 5 | rpmReadConfigFiles. The rpmcliInit will end up calling rpmReadConfigFiles | ||
| 6 | after the necessary relocation processing (if enabled). | ||
| 7 | |||
| 8 | Code derived from changes suggested by Paul Eggleton. | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 13 | |||
| 14 | Index: rpm/python/rpmmodule.c | ||
| 15 | =================================================================== | ||
| 16 | --- rpm.orig/python/rpmmodule.c | ||
| 17 | +++ rpm/python/rpmmodule.c | ||
| 18 | @@ -382,9 +382,8 @@ static int initModule(PyObject *m) | ||
| 19 | /* XXX add --noparentdirs --nolinktos to rpmtsCheck() */ | ||
| 20 | global_depFlags = (RPMDEPS_FLAG_NOPARENTDIRS | RPMDEPS_FLAG_NOLINKTOS); | ||
| 21 | |||
| 22 | - /* failure to initialize rpm (crypto and all) is rather fatal too... */ | ||
| 23 | - if (rpmReadConfigFiles(NULL, NULL) == -1) | ||
| 24 | - return 0; | ||
| 25 | + const char *argv[1] = {"rpmmodule", 0}; | ||
| 26 | + rpmcliInit(1, argv, NULL); | ||
| 27 | |||
| 28 | d = PyModule_GetDict(m); | ||
| 29 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch deleted file mode 100644 index df6f4722ee..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | rpm/python: The RPM5 API requires a hdrNum to be passed in | ||
| 2 | |||
| 3 | The former behavior of passing in -1 as the hdrNum resulting in erase | ||
| 4 | operations that did not complete, but also did not error. Changing to | ||
| 5 | using the header instance resolves this problem. | ||
| 6 | |||
| 7 | Upstream-Status: Pending | ||
| 8 | |||
| 9 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 10 | |||
| 11 | Index: 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 deleted file mode 100644 index 7a473db1ad..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | Fix an issue where the PACKAGEORIGIN is not properly stored. | ||
| 2 | |||
| 3 | Restore the rpmtsCallback fdSetOpen call and related code. | ||
| 4 | |||
| 5 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 6 | |||
| 7 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 8 | |||
| 9 | Index: 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 deleted file mode 100644 index dfb551377e..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | rpm-python-module: Change the extension tag from PyCObject to PyInt | ||
| 2 | |||
| 3 | Use the tagValue to determine the custom PyInt value to use for the extension | ||
| 4 | tag. Without this, any custom tag extensions will be returned in a format | ||
| 5 | that the tagNumFromPyObject and related functions like hdr_subscript will | ||
| 6 | failed to process. Usually the failure is error: expected a string or integer | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 9 | |||
| 10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 11 | |||
| 12 | Index: 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-realpath.patch b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch deleted file mode 100644 index a810123ba8..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | chroot: realpath is required before expanding _dbpath | ||
| 2 | |||
| 3 | _usr turned out to be a relative path to support dyanmic config, but it's | ||
| 4 | being used somewhere as a indicator to locate substrings, so we must get | ||
| 5 | the real path of it in advance. | ||
| 6 | |||
| 7 | Upstream-Status: Inappropriate (OpenEmbedded specific) | ||
| 8 | |||
| 9 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
| 10 | |||
| 11 | diff -urpN a/rpmio/rpmrpc.c b/rpmio/rpmrpc.c | ||
| 12 | --- a/rpmio/rpmrpc.c | ||
| 13 | +++ b/rpmio/rpmrpc.c | ||
| 14 | @@ -257,7 +257,9 @@ int Open(const char * path, int flags, m | ||
| 15 | /* XXX if the open(2) fails, try to strip a possible chroot(2) prefix. */ | ||
| 16 | if (fdno < 0 && errno == ENOENT) { | ||
| 17 | const char *dbpath = rpmExpand("%{?_dbpath}/", NULL); | ||
| 18 | - const char * fn = strstr(path + 1, dbpath); | ||
| 19 | + char resolved_dbpath[PATH_MAX]; | ||
| 20 | + realpath(dbpath, resolved_dbpath); | ||
| 21 | + const char * fn = strstr(path + 1, resolved_dbpath); | ||
| 22 | if (fn) | ||
| 23 | fdno = open(fn, flags, mode); | ||
| 24 | dbpath = _free(dbpath); | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch b/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch deleted file mode 100644 index 59fe524df3..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | macros: Use dyanmic config vs hard coded settings | ||
| 2 | |||
| 3 | When the dynamic, runtime relocation is enables we need to make sure that the | ||
| 4 | RPM macro file does not override the dynamic settings. Fix this by forcing the | ||
| 5 | dynamic version to be used in all cases. | ||
| 6 | |||
| 7 | Upstream-Status: Inappropriate (OpenEmbedded specific) | ||
| 8 | |||
| 9 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 10 | |||
| 11 | Index: rpm-5.4.14/macros/macros.in | ||
| 12 | =================================================================== | ||
| 13 | --- rpm-5.4.14.orig/macros/macros.in | ||
| 14 | +++ rpm-5.4.14/macros/macros.in | ||
| 15 | @@ -27,11 +27,12 @@ | ||
| 16 | #============================================================================== | ||
| 17 | # ---- filesystem macros. | ||
| 18 | # | ||
| 19 | -%_usr @usrprefix@ | ||
| 20 | +%_usr %{_usrlibrpm}/../.. | ||
| 21 | %_usrsrc %{_usr}/src | ||
| 22 | -%_var @varprefix@ | ||
| 23 | -%_usrlibrpm @USRLIBRPM@ | ||
| 24 | -%_etcrpm @SYSCONFIGDIR@ | ||
| 25 | +%_var %{_usr}/../var | ||
| 26 | +# The dynamic relocation code sets the following two items | ||
| 27 | +#%_usrlibrpm @USRLIBRPM@ | ||
| 28 | +#%_etcrpm @SYSCONFIGDIR@ | ||
| 29 | |||
| 30 | %__objext @objext@ | ||
| 31 | %__libext @libext@ | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch b/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch deleted file mode 100644 index 526106d1e3..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | lib/rpmts.c: Ensure that we check both providename and filepaths | ||
| 2 | |||
| 3 | When looking up a missing dependencies, such as /bin/sh, we need to lookup | ||
| 4 | in both the providename and filepaths DB, not just the filepaths DB. | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 7 | |||
| 8 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 9 | |||
| 10 | Index: rpm-5.4.14/lib/rpmts.c | ||
| 11 | =================================================================== | ||
| 12 | --- rpm-5.4.14.orig/lib/rpmts.c | ||
| 13 | +++ rpm-5.4.14/lib/rpmts.c | ||
| 14 | @@ -410,8 +410,8 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __ | ||
| 15 | if (sdb == NULL) | ||
| 16 | continue; | ||
| 17 | |||
| 18 | - /* Look for a matching Provides: in suggested universe. */ | ||
| 19 | - rpmtag = (*keyp == '/' ? RPMTAG_FILEPATHS : RPMTAG_PROVIDENAME); | ||
| 20 | + rpmtag = RPMTAG_PROVIDENAME; | ||
| 21 | + do { | ||
| 22 | mi = rpmmiInit(sdb, rpmtag, keyp, keylen); | ||
| 23 | while ((h = rpmmiNext(mi)) != NULL) { | ||
| 24 | size_t hnamelen; | ||
| 25 | @@ -446,6 +446,15 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __ | ||
| 26 | bhnamelen = hnamelen; | ||
| 27 | } | ||
| 28 | mi = rpmmiFree(mi); | ||
| 29 | + | ||
| 30 | + if (bh == NULL && *keyp == '/' && rpmtag == RPMTAG_PROVIDENAME) { | ||
| 31 | + rpmtag = RPMTAG_FILEPATHS; | ||
| 32 | + continue; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + break; | ||
| 36 | + } while (1); | ||
| 37 | + | ||
| 38 | } | ||
| 39 | |||
| 40 | /* Is there a suggested resolution? */ | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch deleted file mode 100644 index 71dae4939a..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch +++ /dev/null | |||
| @@ -1,124 +0,0 @@ | |||
| 1 | Disable various items that do not cross compile well. | ||
| 2 | |||
| 3 | Upstream-Status: Inappropriate [Configuration] | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 6 | |||
| 7 | Index: 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) | ||
| 113 | Index: 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-rpmfc.c-fix-for-N32-MIPS64.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch deleted file mode 100644 index b9a2cbce25..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | From 16dc683aa50be9789d1674734b06a8a955ff22ad Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Thu, 26 Nov 2015 01:36:40 -0800 | ||
| 4 | Subject: [PATCH] lib/rpmfc.c: fix for N32 MIPS64 | ||
| 5 | |||
| 6 | It is 'N32 MIPS64', not 'N32 MIPS32' as command file shows: | ||
| 7 | $ file image/usr/bin/getent | ||
| 8 | getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip] | ||
| 9 | |||
| 10 | And "rpm -qp --filecolor" was wrong (it was 1, but should be 4). | ||
| 11 | |||
| 12 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 13 | |||
| 14 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 15 | --- | ||
| 16 | lib/rpmfc.c | 2 +- | ||
| 17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/lib/rpmfc.c b/lib/rpmfc.c | ||
| 20 | index fde00c7..49779f8 100644 | ||
| 21 | --- a/lib/rpmfc.c | ||
| 22 | +++ b/lib/rpmfc.c | ||
| 23 | @@ -575,7 +575,7 @@ static struct rpmfcTokens_s rpmfcTokens[] = { | ||
| 24 | { " not stripped", RPMFC_NOTSTRIPPED }, | ||
| 25 | { " archive", RPMFC_ARCHIVE }, | ||
| 26 | |||
| 27 | - { "MIPS, N32 MIPS32", RPMFC_ELFMIPSN32|RPMFC_INCLUDE }, | ||
| 28 | + { "MIPS, N32 MIPS64", RPMFC_ELFMIPSN32|RPMFC_INCLUDE }, | ||
| 29 | { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE }, | ||
| 30 | { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE }, | ||
| 31 | |||
| 32 | -- | ||
| 33 | 1.7.9.5 | ||
| 34 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch deleted file mode 100644 index 93645766c2..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | Fix a typo in the rpmio Makefile.am | ||
| 2 | |||
| 3 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 6 | |||
| 7 | Index: 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-popt.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch deleted file mode 100644 index 915d7efe6f..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | rpmpgp.h: We do not require the popt header in order to use rpmpgp functions | ||
| 2 | |||
| 3 | This can cause failures if the internal libpopt is used, as it's header is | ||
| 4 | not exported. | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 9 | |||
| 10 | Index: 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 deleted file mode 100644 index b55fe22c6a..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch +++ /dev/null | |||
| @@ -1,159 +0,0 @@ | |||
| 1 | Enable a cross-install scriptlet helper. | ||
| 2 | |||
| 3 | The helper is called from outside of the chroot with the arguments: | ||
| 4 | |||
| 5 | <root> <prog> <script> <arg1> [<arg2> ... <argN>] | ||
| 6 | |||
| 7 | The helper script is used by oe-core to facilitate shell script actions that | ||
| 8 | can not be run from within a chroot on a foreign target system during a | ||
| 9 | cross install. | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 14 | |||
| 15 | Index: rpm/lib/psm.c | ||
| 16 | =================================================================== | ||
| 17 | --- rpm.orig/lib/psm.c | ||
| 18 | +++ rpm/lib/psm.c | ||
| 19 | @@ -846,6 +846,9 @@ static rpmRC runScript(rpmpsm psm, Heade | ||
| 20 | pid_t pid; | ||
| 21 | int xx; | ||
| 22 | int i; | ||
| 23 | +#ifdef RPM_VENDOR_OE | ||
| 24 | + const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); | ||
| 25 | +#endif | ||
| 26 | |||
| 27 | #ifdef __clang__ | ||
| 28 | #pragma clang diagnostic push | ||
| 29 | @@ -923,14 +926,29 @@ assert(he->p.str != NULL); | ||
| 30 | (F_ISSET(psm, UNORDERED) ? "a" : "")); | ||
| 31 | |||
| 32 | if (Phe->p.argv == NULL) { | ||
| 33 | - argv = (const char **) alloca(5 * sizeof(*argv)); | ||
| 34 | - argv[0] = "/bin/sh"; | ||
| 35 | - argc = 1; | ||
| 36 | + argv = (const char **) alloca(7 * sizeof(*argv)); | ||
| 37 | + argc = 0; | ||
| 38 | + } else { | ||
| 39 | + argv = (const char **) alloca((Phe->c + 6) * sizeof(*argv)); | ||
| 40 | + argc = 0; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | +#ifdef RPM_VENDOR_OE | ||
| 44 | + if (scriptletWrapper && *scriptletWrapper) { | ||
| 45 | + argv[argc++] = scriptletWrapper; | ||
| 46 | + argv[argc] = rpmtsRootDir(ts); | ||
| 47 | + if (!argv[argc] || !*argv[argc]) | ||
| 48 | + argv[argc] = "/"; | ||
| 49 | + argc++; | ||
| 50 | + } | ||
| 51 | +#endif | ||
| 52 | + | ||
| 53 | + if (Phe->p.argv == NULL) { | ||
| 54 | + argv[argc++] = "/bin/sh"; | ||
| 55 | ldconfig_done = 0; | ||
| 56 | } else { | ||
| 57 | - argv = (const char **) alloca((Phe->c + 4) * sizeof(*argv)); | ||
| 58 | - memcpy(argv, Phe->p.argv, Phe->c * sizeof(*argv)); | ||
| 59 | - argc = Phe->c; | ||
| 60 | + memcpy((argv + argc), Phe->p.argv, Phe->c * sizeof(*argv)); | ||
| 61 | + argc += Phe->c; | ||
| 62 | ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path) | ||
| 63 | ? 1 : 0); | ||
| 64 | } | ||
| 65 | @@ -981,7 +999,12 @@ assert(he->p.str != NULL); | ||
| 66 | goto exit; | ||
| 67 | |||
| 68 | if (rpmIsDebug() && | ||
| 69 | - (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash"))) | ||
| 70 | + (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash")) | ||
| 71 | +#ifdef RPM_VENDOR_OE | ||
| 72 | + || (scriptletWrapper && *scriptletWrapper && !strcmp(argv[1], "/bin/sh")) | ||
| 73 | + || (scriptletWrapper && *scriptletWrapper && !strcmp(argv[1], "/bin/bash")) | ||
| 74 | +#endif | ||
| 75 | + ) | ||
| 76 | { | ||
| 77 | static const char set_x[] = "set -x\n"; | ||
| 78 | nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd); | ||
| 79 | @@ -1116,12 +1139,22 @@ assert(he->p.str != NULL); | ||
| 80 | |||
| 81 | { const char * rootDir = rpmtsRootDir(ts); | ||
| 82 | if (!rpmtsChrootDone(ts) && rootDir != NULL && | ||
| 83 | +#ifdef RPM_VENDOR_OE | ||
| 84 | + !(scriptletWrapper && *scriptletWrapper) && | ||
| 85 | +#endif | ||
| 86 | !(rootDir[0] == '/' && rootDir[1] == '\0')) | ||
| 87 | { | ||
| 88 | /*@-modobserver@*/ | ||
| 89 | xx = Chroot(rootDir); | ||
| 90 | /*@=modobserver@*/ | ||
| 91 | } | ||
| 92 | +#ifdef RPM_VENDOR_OE | ||
| 93 | + if (!rpmtsChrootDone(ts) && rootDir != NULL && | ||
| 94 | + (scriptletWrapper && *scriptletWrapper) && | ||
| 95 | + !(rootDir[0] == '/' && rootDir[1] == '\0')) | ||
| 96 | + xx = Chdir(rootDir); | ||
| 97 | + else | ||
| 98 | +#endif | ||
| 99 | xx = Chdir("/"); | ||
| 100 | rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"), | ||
| 101 | psm->stepName, sln, NVRA, | ||
| 102 | @@ -3052,6 +3085,13 @@ assert(psm->te != NULL); | ||
| 103 | case PSM_SCRIPT: /* Run current package scriptlets. */ | ||
| 104 | /* XXX running %verifyscript/%sanitycheck doesn't have psm->te */ | ||
| 105 | { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL); | ||
| 106 | + | ||
| 107 | +#ifdef RPM_VENDOR_OE | ||
| 108 | + const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); | ||
| 109 | + if (scriptletWrapper && *scriptletWrapper) | ||
| 110 | + rc = rpmpsmNext(psm, PSM_CHROOT_OUT); | ||
| 111 | +#endif | ||
| 112 | + | ||
| 113 | xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL); | ||
| 114 | rc = runInstScript(psm); | ||
| 115 | if (rc) | ||
| 116 | @@ -3059,11 +3099,24 @@ assert(psm->te != NULL); | ||
| 117 | else | ||
| 118 | xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn); | ||
| 119 | rpmtsGetRdb(ts)->db_txn = NULL; | ||
| 120 | +#ifdef RPM_VENDOR_OE | ||
| 121 | + if (scriptletWrapper && *scriptletWrapper) | ||
| 122 | + rc = rpmpsmNext(psm, PSM_CHROOT_IN); | ||
| 123 | +#endif | ||
| 124 | } break; | ||
| 125 | case PSM_TRIGGERS: | ||
| 126 | /* Run triggers in other package(s) this package sets off. */ | ||
| 127 | if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST) break; | ||
| 128 | +#ifdef RPM_VENDOR_OE | ||
| 129 | + const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); | ||
| 130 | + if (scriptletWrapper && *scriptletWrapper) | ||
| 131 | + rc = rpmpsmNext(psm, PSM_CHROOT_OUT); | ||
| 132 | +#endif | ||
| 133 | rc = runTriggers(psm); | ||
| 134 | +#ifdef RPM_VENDOR_OE | ||
| 135 | + if (scriptletWrapper && *scriptletWrapper) | ||
| 136 | + rc = rpmpsmNext(psm, PSM_CHROOT_IN); | ||
| 137 | +#endif | ||
| 138 | break; | ||
| 139 | case PSM_IMMED_TRIGGERS: | ||
| 140 | /* Run triggers in this package other package(s) set off. */ | ||
| 141 | @@ -3073,7 +3126,18 @@ assert(psm->te != NULL); | ||
| 142 | F_SET(psm, GOTTRIGGERS); | ||
| 143 | } | ||
| 144 | if (psm->triggers != NULL) | ||
| 145 | +#ifdef RPM_VENDOR_OE | ||
| 146 | + { | ||
| 147 | + const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL); | ||
| 148 | + if (scriptletWrapper && *scriptletWrapper) | ||
| 149 | + rc = rpmpsmNext(psm, PSM_CHROOT_OUT); | ||
| 150 | +#endif | ||
| 151 | rc = runImmedTriggers(psm); | ||
| 152 | +#ifdef RPM_VENDOR_OE | ||
| 153 | + if (scriptletWrapper && *scriptletWrapper) | ||
| 154 | + rc = rpmpsmNext(psm, PSM_CHROOT_IN); | ||
| 155 | + } | ||
| 156 | +#endif | ||
| 157 | break; | ||
| 158 | |||
| 159 | case PSM_RPMIO_FLAGS: | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch b/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch deleted file mode 100644 index ec38b95f2e..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-showrc.patch +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | Workaround for a memory leak in --showrc. | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 6 | |||
| 7 | Index: rpm-5.4.14/lib/rpmrc.c | ||
| 8 | =================================================================== | ||
| 9 | --- rpm-5.4.14.orig/lib/rpmrc.c | ||
| 10 | +++ rpm-5.4.14/lib/rpmrc.c | ||
| 11 | @@ -1228,11 +1228,15 @@ int rpmShowRC(FILE * fp) | ||
| 12 | if (DNEVR != NULL) | ||
| 13 | fprintf(fp, " %s\n", DNEVR+2); | ||
| 14 | } | ||
| 15 | +#if 0 | ||
| 16 | (void)rpmdsFree(ds); | ||
| 17 | ds = NULL; | ||
| 18 | +#endif | ||
| 19 | fprintf(fp, "\n"); | ||
| 20 | } | ||
| 21 | +#if 0 | ||
| 22 | PRCO = rpmdsFreePRCO(PRCO); | ||
| 23 | +#endif | ||
| 24 | } | ||
| 25 | |||
| 26 | if (rpmIsVerbose()) { | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch b/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch deleted file mode 100644 index d6493c197e..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch +++ /dev/null | |||
| @@ -1,1081 +0,0 @@ | |||
| 1 | Fix the syck/lib/gram.y | ||
| 2 | |||
| 3 | This 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 | |||
| 14 | This patch was generated by reverting the grammer back to a previous | ||
| 15 | version. | ||
| 16 | |||
| 17 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 18 | |||
| 19 | Index: 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 ) \ | ||
| 52 | Index: 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 | |||
| 101 | Index: 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@*/ | ||
| 126 | Index: 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, | ||
| 139 | Index: 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 ) | ||
| 170 | Index: 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 | |||
| 209 | Index: 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-tag-generate-endian-conversion-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch deleted file mode 100644 index 5fb40b6fef..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | fix a endian incompatible error in generating rpm tag | ||
| 2 | |||
| 3 | A flaw was found in the way rpm generating arbitrary tags, which leads to a | ||
| 4 | incorrect query result, this issue is introduced by a incompatible endianess | ||
| 5 | when the generating process is executed on different architectures. | ||
| 6 | |||
| 7 | This patch resolves it by taking the byte order that host uses. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 10 | |||
| 11 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
| 12 | --- | ||
| 13 | tagname.c | 16 ++++++++++++++++ | ||
| 14 | 1 file changed, 16 insertions(+) | ||
| 15 | |||
| 16 | Index: rpm-5.4.14/rpmdb/tagname.c | ||
| 17 | =================================================================== | ||
| 18 | --- rpm-5.4.14.orig/rpmdb/tagname.c | ||
| 19 | +++ rpm-5.4.14/rpmdb/tagname.c | ||
| 20 | @@ -3,6 +3,19 @@ | ||
| 21 | */ | ||
| 22 | |||
| 23 | #include "system.h" | ||
| 24 | +#include <endian.h> | ||
| 25 | + | ||
| 26 | +/* Don't redefine this macro if it already exists */ | ||
| 27 | +#ifndef le32toh | ||
| 28 | +#ifdef __USE_BSD | ||
| 29 | +#include <byteswap.h> | ||
| 30 | +#if __BYTE_ORDER == __LITTLE_ENDIAN | ||
| 31 | +#define le32toh(x) (x) | ||
| 32 | +#else | ||
| 33 | +#define le32toh(x) __bswap_32(x) | ||
| 34 | +#endif | ||
| 35 | +#endif /* __USE_BSD */ | ||
| 36 | +#endif /* le32toh */ | ||
| 37 | |||
| 38 | #include <rpmio_internal.h> /* XXX DIGEST_CTX, xtolower, xstrcasecmp */ | ||
| 39 | #include <rpmmacro.h> | ||
| 40 | @@ -152,7 +165,10 @@ static rpmTag _tagGenerate(const char *s | ||
| 41 | xx = rpmDigestUpdate(ctx, s, nb); | ||
| 42 | xx = rpmDigestFinal(ctx, &digest, &digestlen, 0); | ||
| 43 | if (digest && digestlen > 4) { | ||
| 44 | + /* The tag is stored in a uniform byte order for cross-endian compatibility. | ||
| 45 | + Swap to the host uses. */ | ||
| 46 | memcpy(&tag, digest + (digestlen - 4), 4); | ||
| 47 | + tag = le32toh(tag); | ||
| 48 | tag = (rpmTag) (tag & 0x3fffffff); | ||
| 49 | tag = (rpmTag) (tag | 0x40000000); | ||
| 50 | } | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch b/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch deleted file mode 100644 index 9eb675ba29..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | rpmdb/tagname.c: Add the 0x54aafb71 (filenames) type to rpmTagGetType | ||
| 2 | |||
| 3 | There is already a workaround in the _tagName function to show that the | ||
| 4 | special '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 | ||
| 6 | RPM_STRING_ARRAY_TYPE which limits the response to the first element. | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 9 | |||
| 10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 11 | |||
| 12 | Index: 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/rpm-tools-mtree-LDFLAGS.patch b/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch deleted file mode 100644 index 72d3509291..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | Source: None | ||
| 2 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 3 | Author: Khem Raj <raj.khem@gmail.com> | ||
| 4 | Date: 2011-03-03 | ||
| 5 | Description: | ||
| 6 | This patch fixes build issue found when compiling rpm-native on ubuntu | ||
| 7 | 11.04-alpha. Problem is that linker does not get correct set of dependent | ||
| 8 | libraries when linking mtree binary which results in undefined symbols | ||
| 9 | in librpmio.so. This patch adds correct flags to mtree_LDADD to account | ||
| 10 | for rpmio deps | ||
| 11 | |||
| 12 | Index: rpm-5.4.14/tools/Makefile.am | ||
| 13 | =================================================================== | ||
| 14 | --- rpm-5.4.14.orig/tools/Makefile.am | ||
| 15 | +++ rpm-5.4.14/tools/Makefile.am | ||
| 16 | @@ -186,7 +186,7 @@ grep_LDADD = $(RPMIO_LDADD_COMMON) | ||
| 17 | |||
| 18 | mtree_SOURCES = rpmmtree.c | ||
| 19 | mtree_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) | ||
| 20 | -mtree_LDADD = $(RPM_LDADD_COMMON) | ||
| 21 | +mtree_LDADD = $(RPMIO_LDADD_COMMON) | ||
| 22 | |||
| 23 | rpmrepo_SOURCES = rpmrepo.c | ||
| 24 | rpmrepo_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/scripts -I$(top_builddir)/scripts $(CPPFLAGS) | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch b/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch deleted file mode 100644 index 713f84ee27..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | A patch to fix a problem when compiling with uuid. | ||
| 2 | |||
| 3 | When attempting to build with uuid and all tests compiling will error because | ||
| 4 | uuid.h doesn't exist in the rpm tarball. Fix this by changing the include to | ||
| 5 | use the one in ossp which solves the issue. | ||
| 6 | |||
| 7 | The recipe already depends on ossp so ossp/uuid.h will be there when rpm-native | ||
| 8 | is built. | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Morgan Little <morgan.little@windriver.com> | ||
| 13 | |||
| 14 | |||
| 15 | Index: rpm-5.4.14/lua/local/luuid.c | ||
| 16 | =================================================================== | ||
| 17 | --- rpm-5.4.14.orig/lua/local/luuid.c | ||
| 18 | +++ rpm-5.4.14/lua/local/luuid.c | ||
| 19 | @@ -21,7 +21,7 @@ | ||
| 20 | |||
| 21 | #ifdef LUA_USE_UUID | ||
| 22 | |||
| 23 | -#include "uuid.h" | ||
| 24 | +#include <ossp/uuid.h> | ||
| 25 | |||
| 26 | /* Lua method: <uuid> = uuid.generate(<version>[, <uuid-namespace>, <data>]) */ | ||
| 27 | static int luuid_generate(lua_State *L) | ||
| 28 | Index: rpm-5.4.14/rpmio/rpmuuid.c | ||
| 29 | =================================================================== | ||
| 30 | --- rpm-5.4.14.orig/rpmio/rpmuuid.c | ||
| 31 | +++ rpm-5.4.14/rpmio/rpmuuid.c | ||
| 32 | @@ -16,7 +16,7 @@ | ||
| 33 | #include "rpmlog.h" | ||
| 34 | #include "rpmuuid.h" | ||
| 35 | #ifdef WITH_UUID | ||
| 36 | -#include "uuid.h" | ||
| 37 | +#include <ossp/uuid.h> | ||
| 38 | #endif | ||
| 39 | #include "debug.h" | ||
| 40 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/rpm2cpio b/meta/recipes-devtools/rpm/rpm/rpm2cpio deleted file mode 100755 index 6bcef6a4ce..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpm2cpio +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Prevent gawk >= 4.0.x from getting funny ideas wrt UTF in printf() | ||
| 4 | LANG=C | ||
| 5 | |||
| 6 | pkg=$1 | ||
| 7 | if [ "$pkg" = "" -o ! -e "$pkg" ]; then | ||
| 8 | echo "no package supplied" 1>&2 | ||
| 9 | exit 1 | ||
| 10 | fi | ||
| 11 | |||
| 12 | leadsize=96 | ||
| 13 | o=`expr $leadsize + 8` | ||
| 14 | set `od -j $o -N 8 -t u1 $pkg` | ||
| 15 | il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5` | ||
| 16 | dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9` | ||
| 17 | # echo "sig il: $il dl: $dl" | ||
| 18 | |||
| 19 | sigsize=`expr 8 + 16 \* $il + $dl` | ||
| 20 | o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8` | ||
| 21 | set `od -j $o -N 8 -t u1 $pkg` | ||
| 22 | il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5` | ||
| 23 | dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9` | ||
| 24 | # echo "hdr il: $il dl: $dl" | ||
| 25 | |||
| 26 | hdrsize=`expr 8 + 16 \* $il + $dl` | ||
| 27 | o=`expr $o + $hdrsize` | ||
| 28 | comp=`dd if=$pkg ibs=$o skip=1 count=1 2>/dev/null | dd bs=3 count=1 2> /dev/null` | ||
| 29 | |||
| 30 | gz="`echo . | awk '{ printf("%c%c", 0x1f, 0x8b); }'`" | ||
| 31 | lzma="`echo . | awk '{ printf("%cLZ", 0xff); }'`" | ||
| 32 | xz="`echo . | awk '{ printf("%c7z", 0xfd); }'`" | ||
| 33 | case "$comp" in | ||
| 34 | BZh) dd if="$pkg" ibs=$o skip=1 2>/dev/null | bunzip2 ;; | ||
| 35 | "$gz"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | gunzip ;; | ||
| 36 | "$xz"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | xzcat ;; | ||
| 37 | "$lzma"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | unlzma ;; | ||
| 38 | *) echo "Unrecognized rpm file: $pkg"; exit 1 ;; | ||
| 39 | esac | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/meta/recipes-devtools/rpm/rpm/rpmatch.patch deleted file mode 100644 index 9bbf580e46..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpmatch.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | Create a compatable macro if rpmatch() is not provided by the C library. | ||
| 2 | |||
| 3 | This uses an existing configure check. | ||
| 4 | |||
| 5 | This is needed for uclibc since it does not have the above function | ||
| 6 | implemented. | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 9 | |||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | |||
| 12 | Updated to rpm 5.4.15+. | ||
| 13 | |||
| 14 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 15 | |||
| 16 | Index: rpm/system.h | ||
| 17 | =================================================================== | ||
| 18 | --- rpm.orig/system.h | ||
| 19 | +++ rpm/system.h | ||
| 20 | @@ -358,6 +358,14 @@ extern int _tolower(int) __THROW /*@*/; | ||
| 21 | #include <libgen.h> | ||
| 22 | #endif | ||
| 23 | |||
| 24 | +#ifndef HAVE_RPMATCH | ||
| 25 | +#define rpmatch(line) \ | ||
| 26 | + ( (line == NULL)? -1 : \ | ||
| 27 | + (*line == 'y' || *line == 'Y')? 1 : \ | ||
| 28 | + (*line == 'n' || *line == 'N')? 0 : \ | ||
| 29 | + -1 ) | ||
| 30 | +#endif | ||
| 31 | + | ||
| 32 | /* -- Retrofit glibc __progname */ | ||
| 33 | #if defined __GLIBC__ && __GLIBC__ >= 2 | ||
| 34 | #if __GLIBC_MINOR__ >= 1 | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch b/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch deleted file mode 100644 index 3a6f8746cc..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | rpmdb: more verbose error logging in rpmTempFile() | ||
| 2 | |||
| 3 | Upstream-Status: Inappropriate [debugging] | ||
| 4 | |||
| 5 | Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> | ||
| 6 | |||
| 7 | diff --git a/rpmdb/signature.c b/rpmdb/signature.c | ||
| 8 | index 100204b..e56ab3d 100644 | ||
| 9 | --- a/rpmdb/signature.c | ||
| 10 | +++ b/rpmdb/signature.c | ||
| 11 | @@ -72,12 +72,16 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr) | ||
| 12 | #endif | ||
| 13 | |||
| 14 | temput = urlPath(tempfn, &tfn); | ||
| 15 | - if (*tfn == '\0') goto errxit; | ||
| 16 | + if (*tfn == '\0') { | ||
| 17 | + rpmlog(RPMLOG_ERR, _("error creating tempfile: empty filename\n")); | ||
| 18 | + goto errxit; | ||
| 19 | + } | ||
| 20 | |||
| 21 | switch (temput) { | ||
| 22 | case URL_IS_DASH: | ||
| 23 | case URL_IS_HKP: | ||
| 24 | case URL_IS_MONGO: /* XXX FIXME */ | ||
| 25 | + rpmlog(RPMLOG_ERR, _("error creating temporary file, invalid uri type: %d\n"), temput); | ||
| 26 | goto errxit; | ||
| 27 | /*@notreached@*/ /*@switchbreak@*/ break; | ||
| 28 | case URL_IS_HTTPS: | ||
| 29 | -- | ||
| 30 | 2.6.6 | ||
| 31 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch b/meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch deleted file mode 100644 index f483f3ad90..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch +++ /dev/null | |||
| @@ -1,41 +0,0 @@ | |||
| 1 | rpmdb: prevent race in tmpdir creation | ||
| 2 | |||
| 3 | If two (or more) instances of rpm are running at the same time they may | ||
| 4 | be trying to create the same (base-)temporary directory at the same time | ||
| 5 | which causes the other mkdir to fail with EEXIST. This patch prevents a | ||
| 6 | failure caused by this race by ignoring EEXIST error on directory | ||
| 7 | creation. | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | |||
| 11 | Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> | ||
| 12 | |||
| 13 | diff --git a/rpmdb/signature.c b/rpmdb/signature.c | ||
| 14 | index dce6c4e..100204b 100644 | ||
| 15 | --- a/rpmdb/signature.c | ||
| 16 | +++ b/rpmdb/signature.c | ||
| 17 | @@ -37,6 +37,7 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr) | ||
| 18 | int temput; | ||
| 19 | FD_t fd = NULL; | ||
| 20 | unsigned int ran; | ||
| 21 | + int ret = 0; | ||
| 22 | |||
| 23 | if (!prefix) prefix = ""; | ||
| 24 | |||
| 25 | @@ -44,8 +45,11 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr) | ||
| 26 | if (!_initialized) { | ||
| 27 | _initialized = 1; | ||
| 28 | tempfn = rpmGenPath(prefix, tpmacro, NULL); | ||
| 29 | - if (rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1)) | ||
| 30 | - goto errxit; | ||
| 31 | + ret = rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1); | ||
| 32 | + if (ret && ret != EEXIST) { | ||
| 33 | + rpmlog(RPMLOG_ERR, _("error creating temporary directory %s: %d\n"), tempfn, ret); | ||
| 34 | + goto errxit; | ||
| 35 | + } | ||
| 36 | } | ||
| 37 | |||
| 38 | /* XXX should probably use mkstemp here */ | ||
| 39 | -- | ||
| 40 | 2.6.6 | ||
| 41 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch b/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch deleted file mode 100644 index 9bdd1d4908..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpmdeps-oecore.patch +++ /dev/null | |||
| @@ -1,194 +0,0 @@ | |||
| 1 | Add an "rpmdeps-oecore" binary which allows batch processing of individual file | ||
| 2 | dependencies in a similar manner to rpmdeps --provides --requires -v, prefixing | ||
| 3 | each line of output with the filename that has the dependency. | ||
| 4 | |||
| 5 | This is much faster than individually calling rpmdeps on each file. | ||
| 6 | |||
| 7 | This binary is used by package.bbclass. | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [OE Specific] | ||
| 10 | |||
| 11 | RP 2012/2/7 | ||
| 12 | |||
| 13 | --- | ||
| 14 | tools/Makefile.am | 6 ++- | ||
| 15 | tools/rpmdeps-oecore.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++ | ||
| 16 | 2 files changed, 152 insertions(+), 1 deletions(-) | ||
| 17 | create mode 100644 tools/rpmdeps-oecore.c | ||
| 18 | |||
| 19 | Index: rpm-5.4.14/tools/Makefile.am | ||
| 20 | =================================================================== | ||
| 21 | --- rpm-5.4.14.orig/tools/Makefile.am | ||
| 22 | +++ rpm-5.4.14/tools/Makefile.am | ||
| 23 | @@ -62,7 +62,7 @@ pkgbin_PROGRAMS = \ | ||
| 24 | @WITH_AUGEAS_AUGTOOL@ chroot cp @WITH_CUDF_CUDFTOOL@ find mtree \ | ||
| 25 | @WITH_SEMANAGE_SEMODULE@ wget \ | ||
| 26 | rpmcache rpmdigest rpmrepo rpmspecdump \ | ||
| 27 | - rpmcmp rpmdeps sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ | ||
| 28 | + rpmcmp rpmdeps rpmdeps-oecore sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ | ||
| 29 | if WITH_DB | ||
| 30 | pkgbin_PROGRAMS += dbconvert | ||
| 31 | endif | ||
| 32 | @@ -172,6 +172,10 @@ rpmdeps_SOURCES = rpmdeps.c | ||
| 33 | rpmdeps_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) | ||
| 34 | rpmdeps_LDADD = $(RPM_LDADD_COMMON) | ||
| 35 | |||
| 36 | +rpmdeps_oecore_SOURCES = rpmdeps-oecore.c | ||
| 37 | +rpmdeps_oecore_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) | ||
| 38 | +rpmdeps_oecore_LDADD = $(RPM_LDADD_COMMON) | ||
| 39 | + | ||
| 40 | rpmdigest_SOURCES = rpmdigest.c | ||
| 41 | rpmdigest_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) | ||
| 42 | rpmdigest_LDADD = $(RPMIO_LDADD_COMMON) | ||
| 43 | Index: rpm-5.4.14/tools/rpmdeps-oecore.c | ||
| 44 | =================================================================== | ||
| 45 | --- /dev/null | ||
| 46 | +++ rpm-5.4.14/tools/rpmdeps-oecore.c | ||
| 47 | @@ -0,0 +1,147 @@ | ||
| 48 | +#include "system.h" | ||
| 49 | +const char *__progname; | ||
| 50 | + | ||
| 51 | +#include <rpmio.h> | ||
| 52 | +#include <rpmiotypes.h> | ||
| 53 | +#include <rpmcb.h> | ||
| 54 | +#include <argv.h> | ||
| 55 | +#include <rpmtypes.h> | ||
| 56 | +#include <rpmtag.h> | ||
| 57 | + | ||
| 58 | +#include <rpmds.h> | ||
| 59 | +#define _RPMFC_INTERNAL /* XXX for debugging */ | ||
| 60 | +#include <rpmfc.h> | ||
| 61 | + | ||
| 62 | +#include <rpmcli.h> | ||
| 63 | + | ||
| 64 | +#include "debug.h" | ||
| 65 | + | ||
| 66 | +/*@unchecked@*/ | ||
| 67 | +char *progname; | ||
| 68 | + | ||
| 69 | +#define RPMDEP_RPMFC 1 | ||
| 70 | + | ||
| 71 | +static int rpmdepPrint(char *filename, rpmds ds, FILE * fp) | ||
| 72 | +{ | ||
| 73 | + if (fp == NULL) fp = stderr; | ||
| 74 | + | ||
| 75 | + ds = rpmdsInit(ds); | ||
| 76 | + while (rpmdsNext(ds) >= 0) { | ||
| 77 | + fprintf(fp, "%s %s: %s\n", filename, rpmdsType(ds), rpmdsDNEVR(ds)+2); | ||
| 78 | + } | ||
| 79 | + return 0; | ||
| 80 | +} | ||
| 81 | + | ||
| 82 | +static struct poptOption optionsTable[] = { | ||
| 83 | + | ||
| 84 | + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0, | ||
| 85 | + N_("Common options:"), | ||
| 86 | + NULL }, | ||
| 87 | + | ||
| 88 | + POPT_AUTOALIAS | ||
| 89 | + POPT_AUTOHELP | ||
| 90 | + POPT_TABLEEND | ||
| 91 | +}; | ||
| 92 | + | ||
| 93 | + | ||
| 94 | +int | ||
| 95 | +main(int argc, char *argv[]) | ||
| 96 | +{ | ||
| 97 | + poptContext optCon; | ||
| 98 | + ARGV_t av = NULL; | ||
| 99 | + rpmfc fc = NULL; | ||
| 100 | + FILE * fp = NULL; | ||
| 101 | + int flags = 0; | ||
| 102 | + int ac = 0; | ||
| 103 | + int ec = 1; | ||
| 104 | + int xx; | ||
| 105 | + int i; | ||
| 106 | + char buf[BUFSIZ]; | ||
| 107 | + int nddict; | ||
| 108 | + const char * s; | ||
| 109 | + char * se; | ||
| 110 | + const char * fn; | ||
| 111 | + const char * N; | ||
| 112 | + const char * EVR; | ||
| 113 | + evrFlags Flags; | ||
| 114 | + unsigned char deptype; | ||
| 115 | + int ix; | ||
| 116 | + rpmds ds; | ||
| 117 | + | ||
| 118 | +/*@-modobserver@*/ | ||
| 119 | + if ((progname = strrchr(argv[0], '/')) != NULL) | ||
| 120 | + progname++; | ||
| 121 | + else | ||
| 122 | + progname = argv[0]; | ||
| 123 | +/*@=modobserver@*/ | ||
| 124 | + | ||
| 125 | + optCon = rpmcliInit(argc, argv, optionsTable); | ||
| 126 | + if (optCon == NULL) | ||
| 127 | + goto exit; | ||
| 128 | + | ||
| 129 | + av = poptGetArgs(optCon); | ||
| 130 | + ac = argvCount(av); | ||
| 131 | + | ||
| 132 | + if (ac == 0) { | ||
| 133 | + av = NULL; | ||
| 134 | + xx = argvFgets(&av, NULL); | ||
| 135 | + ac = argvCount(av); | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + /* Make sure file names are sorted. */ | ||
| 139 | + xx = argvSort(av, NULL); | ||
| 140 | + | ||
| 141 | + /* Build file class dictionary. */ | ||
| 142 | + fc = rpmfcNew(); | ||
| 143 | + xx = rpmfcClassify(fc, av, NULL); | ||
| 144 | + | ||
| 145 | + /* Build file/package dependency dictionary. */ | ||
| 146 | + xx = rpmfcApply(fc); | ||
| 147 | + | ||
| 148 | + /* Generate per-file indices into package dependencies. */ | ||
| 149 | + nddict = argvCount(fc->ddict); | ||
| 150 | + | ||
| 151 | + for (i = 0; i < nddict; i++) { | ||
| 152 | + s = fc->ddict[i]; | ||
| 153 | + | ||
| 154 | + /* Parse out (file#,deptype,N,EVR,Flags) */ | ||
| 155 | + ix = strtol(s, &se, 10); | ||
| 156 | + assert(se != NULL); | ||
| 157 | + deptype = *se++; | ||
| 158 | + se++; | ||
| 159 | + N = se; | ||
| 160 | + while (*se && *se != ' ') | ||
| 161 | + se++; | ||
| 162 | + *se++ = '\0'; | ||
| 163 | + EVR = se; | ||
| 164 | + while (*se && *se != ' ') | ||
| 165 | + se++; | ||
| 166 | + *se++ = '\0'; | ||
| 167 | + Flags = strtol(se, NULL, 16); | ||
| 168 | + | ||
| 169 | + switch (deptype) { | ||
| 170 | + default: | ||
| 171 | + /*@switchbreak@*/ break; | ||
| 172 | + case 'P': | ||
| 173 | + ds = rpmdsSingle(RPMTAG_PROVIDENAME, N, EVR, Flags); | ||
| 174 | + rpmdepPrint((char *)fc->fn[ix], ds, stdout); | ||
| 175 | + (void)rpmdsFree(ds); | ||
| 176 | + ds = NULL; | ||
| 177 | + /*@switchbreak@*/ break; | ||
| 178 | + case 'R': | ||
| 179 | + ds = rpmdsSingle(RPMTAG_REQUIRENAME, N, EVR, Flags); | ||
| 180 | + rpmdepPrint((char *)fc->fn[ix], ds, stdout); | ||
| 181 | + (void)rpmdsFree(ds); | ||
| 182 | + ds = NULL; | ||
| 183 | + /*@switchbreak@*/ break; | ||
| 184 | + } | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + fc = rpmfcFree(fc); | ||
| 188 | + | ||
| 189 | + ec = 0; | ||
| 190 | + | ||
| 191 | +exit: | ||
| 192 | + optCon = rpmcliFini(optCon); | ||
| 193 | + return ec; | ||
| 194 | +} | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch b/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch deleted file mode 100644 index c68681c1ed..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch +++ /dev/null | |||
| @@ -1,70 +0,0 @@ | |||
| 1 | From bb48dbc88a58bc05a43d71a3375fb05358119ec5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Sun, 20 Mar 2016 20:20:16 -0700 | ||
| 4 | Subject: [PATCH] rpmqv.c: check _gpg_passphrase before ask for input | ||
| 5 | |||
| 6 | rpm always asked for pass phrasae when add signature, which made it | ||
| 7 | can't work non-interactively, this patch fix the problem. It will work | ||
| 8 | non-interactively if _gpg_passphrase is defined, and work as before if | ||
| 9 | not. | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 14 | --- | ||
| 15 | macros/macros.in | 7 +++++-- | ||
| 16 | rpmqv.c | 17 ++++++++++------- | ||
| 17 | 2 files changed, 15 insertions(+), 9 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/macros/macros.in b/macros/macros.in | ||
| 20 | index 2e5b07d..01b3aad 100644 | ||
| 21 | --- a/macros/macros.in | ||
| 22 | +++ b/macros/macros.in | ||
| 23 | @@ -520,15 +520,18 @@ $_arbitrary_tags_tests Foo:Bar | ||
| 24 | # Macro(s) to hold the arguments passed to GPG/PGP for package | ||
| 25 | # signing and verification. | ||
| 26 | # | ||
| 27 | + | ||
| 28 | +%_gpg_passphrase_way %{?_gpg_passphrase:--passphrase "%{_gpg_passphrase}"}%{!?_gpg_passphrase:--passphrase-fd 3} | ||
| 29 | + | ||
| 30 | %__gpg_check_password_cmd %{__gpg} \ | ||
| 31 | - gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so - | ||
| 32 | + gpg --batch --no-verbose %{_gpg_passphrase_way} -u "%{_gpg_name}" -so - | ||
| 33 | #%__pgp_check_password_cmd %{__pgp} \ | ||
| 34 | # pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf | ||
| 35 | #%__pgp5_check_password_cmd %{__pgp} \ | ||
| 36 | # pgps +batchmode=on +verbose=0 +armor=off "%{_pgp_name}" -f | ||
| 37 | |||
| 38 | %__gpg_sign_cmd %{__gpg} \ | ||
| 39 | - gpg --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning \ | ||
| 40 | + gpg --batch --no-verbose --no-armor %{_gpg_passphrase_way} --no-secmem-warning \ | ||
| 41 | -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename} | ||
| 42 | #%__pgp_sign_cmd %{__pgp} \ | ||
| 43 | # pgp +batchmode=on +verbose=0 +armor=off \ | ||
| 44 | diff --git a/rpmqv.c b/rpmqv.c | ||
| 45 | index b306486..7604396 100644 | ||
| 46 | --- a/rpmqv.c | ||
| 47 | +++ b/rpmqv.c | ||
| 48 | @@ -831,13 +831,16 @@ int main(int argc, const char ** argv) | ||
| 49 | #endif | ||
| 50 | ) | ||
| 51 | { | ||
| 52 | - passPhrase = Getpass(_("Enter pass phrase: ")); | ||
| 53 | - if (rpmCheckPassPhrase(passPhrase)) { | ||
| 54 | - fprintf(stderr, _("Pass phrase check failed\n")); | ||
| 55 | - ec = EXIT_FAILURE; | ||
| 56 | - goto exit; | ||
| 57 | + passPhrase = rpmExpand("%{?_gpg_passphrase}", NULL); | ||
| 58 | + if (passPhrase == NULL || passPhrase[0] == '\0') { | ||
| 59 | + passPhrase = Getpass(_("Enter pass phrase: ")); | ||
| 60 | + if (rpmCheckPassPhrase(passPhrase)) { | ||
| 61 | + fprintf(stderr, _("Pass phrase check failed\n")); | ||
| 62 | + ec = EXIT_FAILURE; | ||
| 63 | + goto exit; | ||
| 64 | + } | ||
| 65 | + fprintf(stderr, _("Pass phrase is good.\n")); | ||
| 66 | } | ||
| 67 | - fprintf(stderr, _("Pass phrase is good.\n")); | ||
| 68 | /* XXX Getpass() should realloc instead. */ | ||
| 69 | passPhrase = xstrdup(passPhrase); | ||
| 70 | } | ||
diff --git a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch b/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch deleted file mode 100644 index b2437a8723..0000000000 --- a/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | From e8bae261615e19ff8a28683765c9539cfb22a086 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Joe Slater <jslater@windriver.com> | ||
| 3 | Date: Thu, 17 Jul 2014 18:14:54 -0700 | ||
| 4 | Subject: [PATCH 1/9] rpm: compile rpmqv.c instead of rpmqv.cc | ||
| 5 | |||
| 6 | Some versions of gcc, 4.4.5 for example, will put a reference to __gxx_personality_v0 | ||
| 7 | into rpm.o and rpmbuild.o. This means we must link with g++, and the Makefile we | ||
| 8 | generate does not. | ||
| 9 | |||
| 10 | So, go back to using rpmqv.c (which is currently identical to rpmqv.cc). | ||
| 11 | |||
| 12 | Upstream-Status: Inappropriate [other] | ||
| 13 | |||
| 14 | When linking with g++ is really necessary, the upstream package will do that. | ||
| 15 | |||
| 16 | Also instead of symlinking files in two places, which can and does race in | ||
| 17 | parallel builds, simply refer to the file's full location [RB] | ||
| 18 | |||
| 19 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
| 20 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 21 | |||
| 22 | --- | ||
| 23 | Makefile.am | 6 ++---- | ||
| 24 | 1 file changed, 2 insertions(+), 4 deletions(-) | ||
| 25 | |||
| 26 | diff --git a/Makefile.am b/Makefile.am | ||
| 27 | index 1dade0a..55f8669 100644 | ||
| 28 | --- a/Makefile.am | ||
| 29 | +++ b/Makefile.am | ||
| 30 | @@ -201,15 +201,13 @@ rpm_SOURCES = build.c | ||
| 31 | rpm_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) | ||
| 32 | rpm_LDADD = rpm.o $(myLDADD) | ||
| 33 | rpm.o: $(top_srcdir)/rpmqv.c | ||
| 34 | - ln -sf $< rpmqv.cc | ||
| 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 $^ | ||
| 37 | |||
| 38 | rpmbuild_SOURCES = build.c | ||
| 39 | rpmbuild_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) | ||
| 40 | rpmbuild_LDADD = rpmbuild.o $(myLDADD) | ||
| 41 | rpmbuild.o: $(top_srcdir)/rpmqv.c | ||
| 42 | - ln -sf $< rpmqv.cc | ||
| 43 | - $(COMPILE) -DIAM_RPMBT -o $@ -c rpmqv.cc | ||
| 44 | + $(COMPILE) -DIAM_RPMBT -o $@ -c $^ | ||
| 45 | |||
| 46 | .syntastic_c_config: Makefile | ||
| 47 | @echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@ | ||
| 48 | -- | ||
| 49 | 2.7.0 | ||
| 50 | |||
diff --git a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch deleted file mode 100644 index dc7b0488a5..0000000000 --- a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | Define the x* wrappers for uclibc as well | ||
| 2 | |||
| 3 | Upstream-Status: Submitted [RPM5 maintainer] | ||
| 4 | |||
| 5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 6 | |||
| 7 | Index: rpm/rpmio/rpmio.h | ||
| 8 | =================================================================== | ||
| 9 | --- rpm.orig/rpmio/rpmio.h | ||
| 10 | +++ rpm/rpmio/rpmio.h | ||
| 11 | @@ -23,7 +23,8 @@ | ||
| 12 | */ | ||
| 13 | /*@{*/ | ||
| 14 | #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \ | ||
| 15 | - (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) | ||
| 16 | + (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \ | ||
| 17 | + !defined(__UCLIBC__) | ||
| 18 | #define USE_COOKIE_SEEK_POINTER 1 | ||
| 19 | typedef _IO_off64_t _libio_off_t; | ||
| 20 | typedef _libio_off_t * _libio_pos_t; | ||
| 21 | Index: rpm/system.h | ||
| 22 | =================================================================== | ||
| 23 | --- rpm.orig/system.h | ||
| 24 | +++ rpm/system.h | ||
| 25 | @@ -489,7 +489,7 @@ extern void muntrace (void) | ||
| 26 | #endif /* defined(__LCLINT__) */ | ||
| 27 | |||
| 28 | /* Memory allocation via macro defs to get meaningful locations from mtrace() */ | ||
| 29 | -#if defined(__GNUC__) | ||
| 30 | +#if defined(__GNUC__) || defined(__UCLIBC__) | ||
| 31 | #define xmalloc(_size) (malloc(_size) ? : vmefail(_size)) | ||
| 32 | #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(_size)) | ||
| 33 | #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(_size)) | ||
| 34 | Index: rpm/lib/librpm.vers | ||
| 35 | =================================================================== | ||
| 36 | --- rpm.orig/lib/librpm.vers | ||
| 37 | +++ rpm/lib/librpm.vers | ||
| 38 | @@ -406,6 +406,10 @@ LIBRPM_0 | ||
| 39 | specedit; | ||
| 40 | strict_erasures; | ||
| 41 | XrpmtsiInit; | ||
| 42 | + xmalloc; | ||
| 43 | + xrealloc; | ||
| 44 | + xcalloc; | ||
| 45 | + xstrdup; | ||
| 46 | local: | ||
| 47 | *; | ||
| 48 | }; | ||
| 49 | Index: rpm/rpmio/librpmio.vers | ||
| 50 | =================================================================== | ||
| 51 | --- rpm.orig/rpmio/librpmio.vers | ||
| 52 | +++ rpm/rpmio/librpmio.vers | ||
| 53 | @@ -1455,6 +1455,10 @@ LIBRPMIO_0 | ||
| 54 | _mongoc_write_result_init; | ||
| 55 | _mongoc_write_result_merge; | ||
| 56 | _mongoc_write_result_merge_legacy; | ||
| 57 | + xmalloc; | ||
| 58 | + xrealloc; | ||
| 59 | + xcalloc; | ||
| 60 | + xstrdup; | ||
| 61 | local: | ||
| 62 | *; | ||
| 63 | }; | ||
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb deleted file mode 100644 index 17c58186f8..0000000000 --- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb +++ /dev/null | |||
| @@ -1,712 +0,0 @@ | |||
| 1 | SUMMARY = "The RPM package management system" | ||
| 2 | DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ | ||
| 3 | package management system capable of installing, uninstalling, \ | ||
| 4 | verifying, querying, and updating software packages. Each software \ | ||
| 5 | package consists of an archive of files along with information about \ | ||
| 6 | the package like its version, a description, etc." | ||
| 7 | |||
| 8 | SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages" | ||
| 9 | DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries." | ||
| 10 | |||
| 11 | SUMMARY_${PN}-dev = "Development files for manipulating RPM packages" | ||
| 12 | DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \ | ||
| 13 | development files will simplify the process of writing programs that \ | ||
| 14 | manipulate RPM packages and databases. These files are intended to \ | ||
| 15 | simplify the process of creating graphical package managers or any \ | ||
| 16 | other tools that need an intimate knowledge of RPM packages in order \ | ||
| 17 | to function." | ||
| 18 | |||
| 19 | SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration" | ||
| 20 | DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \ | ||
| 21 | and configuration common between RPM Package Manager." | ||
| 22 | |||
| 23 | SUMMARY_${PN}-build = "Scripts and executable programs used to build packages" | ||
| 24 | DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \ | ||
| 25 | that are used to build packages using the RPM Package Manager." | ||
| 26 | |||
| 27 | SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages" | ||
| 28 | DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \ | ||
| 29 | written in the Python programming language to use the interface \ | ||
| 30 | supplied by the RPM Package Manager libraries." | ||
| 31 | |||
| 32 | SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages" | ||
| 33 | DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \ | ||
| 34 | written in the Perl programming language to use the interface \ | ||
| 35 | supplied by the RPM Package Manager libraries." | ||
| 36 | |||
| 37 | HOMEPAGE = "http://rpm5.org/" | ||
| 38 | LICENSE = "LGPLv2.1 & Apache-2.0" | ||
| 39 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" | ||
| 40 | LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901" | ||
| 41 | |||
| 42 | # We must have gettext-native, we need gettextize, which may not be provided | ||
| 43 | DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native" | ||
| 44 | DEPENDS_append_class-native = " file-replacement-native" | ||
| 45 | |||
| 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... | ||
| 48 | |||
| 49 | # There is no official 5.4.16 release yet, so start w/ 5.4.15 and patch it | ||
| 50 | # based on CVS | ||
| 51 | S = "${WORKDIR}/rpm-5.4.15" | ||
| 52 | |||
| 53 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm;name=srpm;extract=rpm-5.4.15.tar.gz \ | ||
| 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 \ | ||
| 58 | file://perfile_rpmdeps.sh \ | ||
| 59 | file://pythondeps.sh \ | ||
| 60 | " | ||
| 61 | |||
| 62 | SRC_URI[srpm.md5sum] = "d53782842ac11b3100a43fb2958c9bc0" | ||
| 63 | SRC_URI[srpm.sha256sum] = "d4ae5e9ed5df8ab9931b660f491418d20ab5c4d72eb17ed9055b80b71ef6c4ee" | ||
| 64 | |||
| 65 | SRC_URI[rpm-patch.md5sum] = "8b7deb1c9574d3d47ed8ba8c690fd8bf" | ||
| 66 | SRC_URI[rpm-patch.sha256sum] = "1c1983d001b04eaa23eb2c8d9598b9d0899acb0a89f54a2d4c4e974086fd17a5" | ||
| 67 | |||
| 68 | SRC_URI[syck-patch.md5sum] = "f31d7a32105a364688354419ec3559e4" | ||
| 69 | SRC_URI[syck-patch.sha256sum] = "4dd1d04489206d8b5d1970f2a8d143a002f2895cefbe15d73459785096545e8a" | ||
| 70 | |||
| 71 | SRC_URI[beecrypt-patch.md5sum] = "9e71ee3ccb0a52985a071dd250279132" | ||
| 72 | SRC_URI[beecrypt-patch.sha256sum] ="df7c0708a7fab9bdf6d46194519b42e736f99cb0599dcc1c3c1bf1b228705cde" | ||
| 73 | |||
| 74 | SRC_URI[lua-patch.md5sum] = "ca10d03d83b1fc1c31a0b50819534cd7" | ||
| 75 | SRC_URI[lua-patch.sha256sum] = "6bde435cc827a7d4b2520e8f3e1c9bd2ca74375de0a4402aa99ef4d48eab9a7e" | ||
| 76 | |||
| 77 | # Bug fixes | ||
| 78 | SRC_URI += " \ | ||
| 79 | file://header-include-fix.patch \ | ||
| 80 | file://rpm-libsql-fix.patch \ | ||
| 81 | file://rpm-platform.patch \ | ||
| 82 | file://rpm-platform2.patch \ | ||
| 83 | file://rpm-tools-mtree-LDFLAGS.patch \ | ||
| 84 | file://rpm-canonarch.patch \ | ||
| 85 | file://rpm-no-loopmsg.patch \ | ||
| 86 | file://rpm-resolvedep.patch \ | ||
| 87 | file://rpm-packageorigin.patch \ | ||
| 88 | file://uclibc-support.patch \ | ||
| 89 | file://rpmatch.patch \ | ||
| 90 | file://makefile-am-exec-hook.patch \ | ||
| 91 | file://python-rpm-rpmsense.patch \ | ||
| 92 | file://debugedit-segv.patch \ | ||
| 93 | file://debugedit-valid-file-to-fix-segment-fault.patch \ | ||
| 94 | file://rpm-platform-file-fix.patch \ | ||
| 95 | file://rpm-lsb-compatibility.patch \ | ||
| 96 | file://rpm-tag-generate-endian-conversion-fix.patch \ | ||
| 97 | file://rpm-hardlink-segfault-fix.patch \ | ||
| 98 | file://rpm-payload-use-hashed-inode.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 | file://rpm-fix-lua-tests-compilation-failure.patch \ | ||
| 117 | file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \ | ||
| 118 | file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \ | ||
| 119 | file://gcc6-stdlib.patch \ | ||
| 120 | file://0001-system.h-query.c-support-nosignature.patch \ | ||
| 121 | file://rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch \ | ||
| 122 | file://0001-macros-add-_gpg_sign_cmd_extra_args.patch \ | ||
| 123 | " | ||
| 124 | |||
| 125 | # OE specific changes | ||
| 126 | SRC_URI += " \ | ||
| 127 | file://rpm-log-auto-rm.patch \ | ||
| 128 | file://rpm-db-reduce.patch \ | ||
| 129 | file://rpm-autogen.patch \ | ||
| 130 | file://rpm-showrc.patch \ | ||
| 131 | file://rpm-fileclass.patch \ | ||
| 132 | file://rpm-scriptletexechelper.patch \ | ||
| 133 | file://rpmdeps-oecore.patch \ | ||
| 134 | file://rpm-no-perl-urpm.patch \ | ||
| 135 | file://rpm-macros.patch \ | ||
| 136 | file://rpm-lua.patch \ | ||
| 137 | file://rpm-ossp-uuid.patch \ | ||
| 138 | file://rpm-uuid-include.patch \ | ||
| 139 | file://rpm-pkgconfigdeps.patch \ | ||
| 140 | file://no-ldflags-in-pkgconfig.patch \ | ||
| 141 | file://dbconvert.patch \ | ||
| 142 | file://rpm-db_buffer_small.patch \ | ||
| 143 | file://rpm-py-init.patch \ | ||
| 144 | file://rpm-reloc-macros.patch \ | ||
| 145 | file://rpm-db5-or-db6.patch \ | ||
| 146 | file://rpm-db60.patch \ | ||
| 147 | file://rpmqv_cc_b_gone.patch \ | ||
| 148 | file://rpm-realpath.patch \ | ||
| 149 | file://rpm-check-rootpath-reasonableness.patch \ | ||
| 150 | file://rpm-macros.in-disable-external-key-server.patch \ | ||
| 151 | file://configure.ac-check-for-both-gpg2-and-gpg.patch \ | ||
| 152 | file://rpm-disable-auto-stack-protector.patch \ | ||
| 153 | file://popt-disable-auto-stack-protector.patch \ | ||
| 154 | file://rpm-syck-fix-gram.patch \ | ||
| 155 | file://rpm-rpmdb-grammar.patch \ | ||
| 156 | file://rpm-disable-blaketest.patch \ | ||
| 157 | file://rpm-autogen-force.patch \ | ||
| 158 | file://rpmdb-prevent-race-in-tmpdir-creation.patch \ | ||
| 159 | file://rpmdb-more-verbose-error-logging-in-rpmTempFile.patch \ | ||
| 160 | " | ||
| 161 | |||
| 162 | SRC_URI_append_libc-musl = "\ | ||
| 163 | file://0001-rpm-Fix-build-on-musl.patch \ | ||
| 164 | " | ||
| 165 | # Uncomment the following line to enable platform score debugging | ||
| 166 | # This is useful when identifying issues with Smart being unable | ||
| 167 | # to process certain package feeds. | ||
| 168 | #SRC_URI += "file://rpm-debug-platform.patch" | ||
| 169 | |||
| 170 | UPSTREAM_CHECK_REGEX = "rpm-(?P<pver>(\d+[\.\-_]*)+)-.*$" | ||
| 171 | |||
| 172 | inherit autotools gettext pkgconfig python-dir | ||
| 173 | |||
| 174 | acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" | ||
| 175 | |||
| 176 | # The local distribution macro directory | ||
| 177 | distromacrodir = "${libdir}/rpm/poky" | ||
| 178 | |||
| 179 | # Specify the default rpm macros in terms of adjustable variables | ||
| 180 | rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros" | ||
| 181 | rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros" | ||
| 182 | rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros" | ||
| 183 | |||
| 184 | # sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux | ||
| 185 | |||
| 186 | # Set the digest algorithm used for verifying file integrity | ||
| 187 | # If this value changes, and two different packages have different values | ||
| 188 | # the "same file" validation (two packages have a non-conflict file) | ||
| 189 | # will fail. This may lead to upgrade problems. You should treat this | ||
| 190 | # value as a distribution wide setting, and only change it when you intend | ||
| 191 | # a full system upgrade! | ||
| 192 | # | ||
| 193 | # Defined file digest algorithm values (note: not all are available!): | ||
| 194 | # 1 MD5 (legacy RPM default) | ||
| 195 | # 2 SHA1 | ||
| 196 | # 3 RIPEMD-160 | ||
| 197 | # 5 MD2 | ||
| 198 | # 6 TIGER-192 | ||
| 199 | # 8 SHA256 | ||
| 200 | # 9 SHA384 | ||
| 201 | # 10 SHA512 | ||
| 202 | # 11 SHA224 | ||
| 203 | # 104 MD4 | ||
| 204 | # 105 RIPEMD-128 | ||
| 205 | # 106 CRC-32 | ||
| 206 | # 107 ADLER-32 | ||
| 207 | # 108 CRC-64 (ECMA-182 polynomial, untested uint64_t problems) | ||
| 208 | # 109 Jenkins lookup3.c hashlittle() | ||
| 209 | # 111 RIPEMD-256 | ||
| 210 | # 112 RIPEMD-320 | ||
| 211 | # 188 BLAKE2B | ||
| 212 | # 189 BLAKE2BP | ||
| 213 | # 190 BLAKE2S | ||
| 214 | # 191 BLAKE2SP | ||
| 215 | RPM_FILE_DIGEST_ALGO ?= "1" | ||
| 216 | |||
| 217 | # All packages build with RPM5 contain a non-repudiable signature. | ||
| 218 | # The purpose of this signature is not to show authenticity of a package, | ||
| 219 | # but instead act as a secondary package wide validation that shows it | ||
| 220 | # wasn't damaged by accident in transport. (When later you sign the package, | ||
| 221 | # this signature may or may not be replaced as there are three signature | ||
| 222 | # slots, one for DSA/RSA, one for ECSDA, and one reserved.) | ||
| 223 | # | ||
| 224 | # There is a known issue w/ RSA signatures that if they start with an 0x00 | ||
| 225 | # the signing and validation may fail. | ||
| 226 | # | ||
| 227 | # The following is the list of choices for the non-rpudiable signature | ||
| 228 | # (note: not all of these are implemented): | ||
| 229 | # DSA (default) | ||
| 230 | # RSA (implies SHA1) | ||
| 231 | # ECDSA (implies SHA256) | ||
| 232 | # DSA/SHA1 | ||
| 233 | # DSA/SHA224 | ||
| 234 | # DSA/SHA256 | ||
| 235 | # DSA/SHA384 | ||
| 236 | # DSA/SHA512 | ||
| 237 | # RSA/SHA1 | ||
| 238 | # RSA/SHA224 | ||
| 239 | # RSA/SHA256 | ||
| 240 | # RSA/SHA384 | ||
| 241 | # RSA/SHA512 | ||
| 242 | # ECDSA/SHA224 (using NIST P-224) | ||
| 243 | # ECDSA/SHA256 (using NIST P-256) | ||
| 244 | # ECDSA/SHA384 (using NIST P-384) | ||
| 245 | # ECDSA/SHA512 (using NIST P-521) | ||
| 246 | RPM_SELF_SIGN_ALGO ?= "DSA" | ||
| 247 | |||
| 248 | # Note: perl and sqlite w/o db specified does not currently work. | ||
| 249 | # tcl, augeas, nss, gcrypt, xar and keyutils support is untested. | ||
| 250 | PACKAGECONFIG ??= "db bzip2 zlib popt openssl libelf python" | ||
| 251 | |||
| 252 | # Note: switching to internal popt may not work, as it will generate | ||
| 253 | # a shared library which will intentionally not be packaged. | ||
| 254 | # | ||
| 255 | # If you intend to use the internal version, additional work may be required. | ||
| 256 | PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt," | ||
| 257 | |||
| 258 | PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2," | ||
| 259 | PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz," | ||
| 260 | PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib," | ||
| 261 | PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar," | ||
| 262 | |||
| 263 | WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \ | ||
| 264 | --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ | ||
| 265 | --with-python-lib-dir=${PYTHON_SITEPACKAGES_DIR} \ | ||
| 266 | --without-pythonembed" | ||
| 267 | PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python," | ||
| 268 | |||
| 269 | # Perl modules are not built, but they could be enabled fairly easily | ||
| 270 | # the perl module creation and installation would need to be patched. | ||
| 271 | # (currently has host perl contamination issues) | ||
| 272 | WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm" | ||
| 273 | WITHOUT_PERL = "--without-perl --without-perl-urpm" | ||
| 274 | PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl," | ||
| 275 | |||
| 276 | # The --with-dbsql will only tell RPM to check for support, db | ||
| 277 | # may or may not be built w/ the dbsql support. | ||
| 278 | WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated" | ||
| 279 | PACKAGECONFIG[db] = "${WITH_DB},--without-db,db," | ||
| 280 | |||
| 281 | PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3," | ||
| 282 | |||
| 283 | # This switch simply disables external beecrypt, RPM5 always uses beecrypt | ||
| 284 | # for base64 processing and various digest algorithms. | ||
| 285 | # Beecrypt is only the preferred crypto engine if it's the only engine enabled. | ||
| 286 | PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--with-beecrypt=internal,beecrypt," | ||
| 287 | |||
| 288 | # --with-usecrypto= setting defined the item as the preferred system | ||
| 289 | # crypto engine, which will take priority over the included beecrypt | ||
| 290 | PACKAGECONFIG[openssl] = "--with-openssl --with-usecrypto=openssl,--without-openssl,openssl," | ||
| 291 | PACKAGECONFIG[nss] = "--with-nss --with-usecrypto=nss,--without-nss,nss," | ||
| 292 | PACKAGECONFIG[gcrypt] = "--with-gcrypt --with-usecrypto=gcrypt,--without-gcrypt,gcrypt," | ||
| 293 | |||
| 294 | PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils," | ||
| 295 | PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils," | ||
| 296 | |||
| 297 | WITH_SELINUX = "--with-selinux --with-sepol --with-semanage" | ||
| 298 | WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage" | ||
| 299 | PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libselinux," | ||
| 300 | |||
| 301 | WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi" | ||
| 302 | WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi" | ||
| 303 | PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat," | ||
| 304 | |||
| 305 | PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat," | ||
| 306 | PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl," | ||
| 307 | |||
| 308 | PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas," | ||
| 309 | |||
| 310 | EXTRA_OECONF += "--verbose \ | ||
| 311 | --sysconfdir=${sysconfdir} \ | ||
| 312 | --with-file \ | ||
| 313 | --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \ | ||
| 314 | --with-syck=internal \ | ||
| 315 | --without-readline \ | ||
| 316 | --without-libtasn1 \ | ||
| 317 | --without-pakchois \ | ||
| 318 | --without-gnutls \ | ||
| 319 | --with-pcre \ | ||
| 320 | --enable-utf8 \ | ||
| 321 | --with-uuid \ | ||
| 322 | --with-attr \ | ||
| 323 | --with-acl \ | ||
| 324 | --with-pthreads \ | ||
| 325 | --without-cudf \ | ||
| 326 | --without-ficl \ | ||
| 327 | --without-aterm \ | ||
| 328 | --without-nix \ | ||
| 329 | --without-bash \ | ||
| 330 | --without-rc \ | ||
| 331 | --without-js \ | ||
| 332 | --without-gpsee \ | ||
| 333 | --without-ruby \ | ||
| 334 | --without-squirrel \ | ||
| 335 | --without-sasl2 \ | ||
| 336 | --without-tomcrypt \ | ||
| 337 | --with-build-extlibdep \ | ||
| 338 | --with-build-maxextlibdep \ | ||
| 339 | --without-valgrind \ | ||
| 340 | --disable-openmp \ | ||
| 341 | --enable-build-pic \ | ||
| 342 | --enable-build-versionscript \ | ||
| 343 | --enable-build-warnings \ | ||
| 344 | --enable-build-debug \ | ||
| 345 | --enable-maintainer-mode \ | ||
| 346 | --with-path-macros=${rpm_macros} \ | ||
| 347 | --with-path-lib=${libdir}/rpm \ | ||
| 348 | --with-bugreport=http://bugzilla.yoctoproject.org \ | ||
| 349 | --program-prefix= \ | ||
| 350 | YACC=byacc" | ||
| 351 | |||
| 352 | CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS" | ||
| 353 | |||
| 354 | LDFLAGS_append_libc-uclibc = "-lrt -lpthread" | ||
| 355 | |||
| 356 | PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale" | ||
| 357 | |||
| 358 | SOLIBS = "5.4.so" | ||
| 359 | |||
| 360 | # Based on %files section in the rpm.spec | ||
| 361 | |||
| 362 | FILES_${PN} = "${bindir}/rpm \ | ||
| 363 | ${bindir}/rpmconstant \ | ||
| 364 | ${libdir}/rpm/rpm.* \ | ||
| 365 | ${libdir}/rpm/tgpg \ | ||
| 366 | ${libdir}/rpm/macros \ | ||
| 367 | ${libdir}/rpm/rpmpopt \ | ||
| 368 | ${libdir}/rpm/rpm2cpio \ | ||
| 369 | ${libdir}/rpm/vcheck \ | ||
| 370 | ${libdir}/rpm/helpers \ | ||
| 371 | ${libdir}/rpm/qf \ | ||
| 372 | ${libdir}/rpm/cpuinfo.yaml \ | ||
| 373 | ${libdir}/rpm/bin/mtree \ | ||
| 374 | ${libdir}/rpm/bin/rpmkey \ | ||
| 375 | ${libdir}/rpm/bin/rpmrepo \ | ||
| 376 | ${libdir}/rpm/bin/rpmrepo.real \ | ||
| 377 | ${libdir}/rpm/bin/rpmspecdump \ | ||
| 378 | ${libdir}/rpm/bin/rpmspecdump.real \ | ||
| 379 | ${libdir}/rpm/bin/wget \ | ||
| 380 | ${localstatedir}/cache \ | ||
| 381 | ${localstatedir}/cache/rpm \ | ||
| 382 | ${localstatedir}/cache/wdj \ | ||
| 383 | ${localstatedir}/lib \ | ||
| 384 | ${localstatedir}/lib/rpm \ | ||
| 385 | ${localstatedir}/lib/wdj \ | ||
| 386 | ${bindir}/rpm.real \ | ||
| 387 | ${bindir}/rpmconstant.real \ | ||
| 388 | " | ||
| 389 | |||
| 390 | FILES_${PN}-common = "${bindir}/rpm2cpio \ | ||
| 391 | ${bindir}/rpm2cpio.real \ | ||
| 392 | ${bindir}/gendiff \ | ||
| 393 | ${sysconfdir}/rpm \ | ||
| 394 | ${localstatedir}/spool/repackage \ | ||
| 395 | " | ||
| 396 | |||
| 397 | FILES_${PN}-libs = "${libdir}/librpm-*.so \ | ||
| 398 | ${libdir}/librpmconstant-*.so \ | ||
| 399 | ${libdir}/librpmdb-*.so \ | ||
| 400 | ${libdir}/librpmio-*.so \ | ||
| 401 | ${libdir}/librpmmisc-*.so \ | ||
| 402 | ${libdir}/librpmbuild-*.so \ | ||
| 403 | " | ||
| 404 | |||
| 405 | FILES_${PN}-build = "${prefix}/src/rpm \ | ||
| 406 | ${bindir}/rpmbuild \ | ||
| 407 | ${bindir}/rpmbuild.real \ | ||
| 408 | ${libdir}/rpm/brp-* \ | ||
| 409 | ${libdir}/rpm/check-files \ | ||
| 410 | ${libdir}/rpm/cross-build \ | ||
| 411 | ${libdir}/rpm/find-debuginfo.sh \ | ||
| 412 | ${libdir}/rpm/find-lang.sh \ | ||
| 413 | ${libdir}/rpm/find-prov.pl \ | ||
| 414 | ${libdir}/rpm/find-provides.perl \ | ||
| 415 | ${libdir}/rpm/find-req.pl \ | ||
| 416 | ${libdir}/rpm/find-requires.perl \ | ||
| 417 | ${libdir}/rpm/getpo.sh \ | ||
| 418 | ${libdir}/rpm/http.req \ | ||
| 419 | ${libdir}/rpm/javadeps.sh \ | ||
| 420 | ${libdir}/rpm/mono-find-provides \ | ||
| 421 | ${libdir}/rpm/mono-find-requires \ | ||
| 422 | ${libdir}/rpm/executabledeps.sh \ | ||
| 423 | ${libdir}/rpm/libtooldeps.sh \ | ||
| 424 | ${libdir}/rpm/osgideps.pl \ | ||
| 425 | ${libdir}/rpm/perldeps.pl \ | ||
| 426 | ${libdir}/rpm/perl.prov \ | ||
| 427 | ${libdir}/rpm/perl.req \ | ||
| 428 | ${libdir}/rpm/php.prov \ | ||
| 429 | ${libdir}/rpm/php.req \ | ||
| 430 | ${libdir}/rpm/pkgconfigdeps.sh \ | ||
| 431 | ${libdir}/rpm/pythondeps.sh \ | ||
| 432 | ${libdir}/rpm/bin/debugedit \ | ||
| 433 | ${libdir}/rpm/bin/debugedit.real \ | ||
| 434 | ${libdir}/rpm/bin/rpmcache \ | ||
| 435 | ${libdir}/rpm/bin/rpmcache.real \ | ||
| 436 | ${libdir}/rpm/bin/rpmcmp \ | ||
| 437 | ${libdir}/rpm/bin/rpmcmp.real \ | ||
| 438 | ${libdir}/rpm/bin/rpmdeps \ | ||
| 439 | ${libdir}/rpm/bin/rpmdeps.real \ | ||
| 440 | ${libdir}/rpm/bin/rpmdeps-oecore \ | ||
| 441 | ${libdir}/rpm/bin/rpmdeps-oecore.real \ | ||
| 442 | ${libdir}/rpm/bin/rpmdigest \ | ||
| 443 | ${libdir}/rpm/bin/rpmdigest.real \ | ||
| 444 | ${libdir}/rpm/bin/abi-compliance-checker.pl \ | ||
| 445 | ${libdir}/rpm/bin/api-sanity-autotest.pl \ | ||
| 446 | ${libdir}/rpm/bin/chroot \ | ||
| 447 | ${libdir}/rpm/bin/cp \ | ||
| 448 | ${libdir}/rpm/bin/dbsql \ | ||
| 449 | ${libdir}/rpm/bin/find \ | ||
| 450 | ${libdir}/rpm/bin/install-sh \ | ||
| 451 | ${libdir}/rpm/bin/lua \ | ||
| 452 | ${libdir}/rpm/bin/luac \ | ||
| 453 | ${libdir}/rpm/bin/mkinstalldirs \ | ||
| 454 | ${libdir}/rpm/bin/rpmlua \ | ||
| 455 | ${libdir}/rpm/bin/rpmluac \ | ||
| 456 | ${libdir}/rpm/bin/sqlite3 \ | ||
| 457 | ${libdir}/rpm/macros.d/cmake \ | ||
| 458 | ${libdir}/rpm/macros.d/java \ | ||
| 459 | ${libdir}/rpm/macros.d/libtool \ | ||
| 460 | ${libdir}/rpm/macros.d/mandriva \ | ||
| 461 | ${libdir}/rpm/macros.d/mono \ | ||
| 462 | ${libdir}/rpm/macros.d/perl \ | ||
| 463 | ${libdir}/rpm/macros.d/php \ | ||
| 464 | ${libdir}/rpm/macros.d/pkgconfig \ | ||
| 465 | ${libdir}/rpm/macros.d/python \ | ||
| 466 | ${libdir}/rpm/macros.d/ruby \ | ||
| 467 | ${libdir}/rpm/macros.d/selinux \ | ||
| 468 | ${libdir}/rpm/macros.d/tcl \ | ||
| 469 | ${libdir}/rpm/macros.rpmbuild \ | ||
| 470 | ${libdir}/rpm/u_pkg.sh \ | ||
| 471 | ${libdir}/rpm/vpkg-provides.sh \ | ||
| 472 | ${libdir}/rpm/vpkg-provides2.sh \ | ||
| 473 | ${libdir}/rpm/perfile_rpmdeps.sh \ | ||
| 474 | ${distromacrodir} \ | ||
| 475 | " | ||
| 476 | RDEPENDS_${PN} = "base-files run-postinsts" | ||
| 477 | RDEPENDS_${PN}_class-native = "" | ||
| 478 | RDEPENDS_${PN}_class-nativesdk = "" | ||
| 479 | RDEPENDS_${PN}-build = "file bash perl" | ||
| 480 | |||
| 481 | RDEPENDS_python-rpm = "${PN} python" | ||
| 482 | |||
| 483 | FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm" | ||
| 484 | PROVIDES += "python-rpm" | ||
| 485 | |||
| 486 | FILES_perl-module-rpm = "${libdir}/perl/*/* \ | ||
| 487 | " | ||
| 488 | |||
| 489 | RDEPENDS_${PN}-dev += "bash" | ||
| 490 | |||
| 491 | FILES_${PN}-dev = "${includedir}/rpm \ | ||
| 492 | ${libdir}/librpm.la \ | ||
| 493 | ${libdir}/librpm.so \ | ||
| 494 | ${libdir}/librpmconstant.la \ | ||
| 495 | ${libdir}/librpmconstant.so \ | ||
| 496 | ${libdir}/librpmdb.la \ | ||
| 497 | ${libdir}/librpmdb.so \ | ||
| 498 | ${libdir}/librpmio.la \ | ||
| 499 | ${libdir}/librpmio.so \ | ||
| 500 | ${libdir}/librpmmisc.la \ | ||
| 501 | ${libdir}/librpmmisc.so \ | ||
| 502 | ${libdir}/librpmbuild.la \ | ||
| 503 | ${libdir}/librpmbuild.so \ | ||
| 504 | ${libdir}/rpm/lib/liblua.la \ | ||
| 505 | ${libdir}/pkgconfig/rpm.pc \ | ||
| 506 | ${libdir}/rpm/rpmdb_loadcvt \ | ||
| 507 | ${libdir}/rpm/include \ | ||
| 508 | " | ||
| 509 | |||
| 510 | FILES_${PN}-staticdev = " \ | ||
| 511 | ${libdir}/librpm.a \ | ||
| 512 | ${libdir}/librpmconstant.a \ | ||
| 513 | ${libdir}/librpmdb.a \ | ||
| 514 | ${libdir}/librpmio.a \ | ||
| 515 | ${libdir}/librpmmisc.a \ | ||
| 516 | ${libdir}/librpmbuild.a \ | ||
| 517 | ${libdir}/rpm/lib/liblua.a \ | ||
| 518 | ${PYTHON_SITEPACKAGES_DIR}/rpm/*.a \ | ||
| 519 | " | ||
| 520 | |||
| 521 | do_configure() { | ||
| 522 | # Disable tests! | ||
| 523 | echo "all:" > ${S}/tests/Makefile.am | ||
| 524 | sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in | ||
| 525 | |||
| 526 | ( cd ${S}; ${S}/autogen.sh ) | ||
| 527 | |||
| 528 | # NASTY hack to make sure configure files the right pkg-config file... | ||
| 529 | sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \ | ||
| 530 | -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure | ||
| 531 | |||
| 532 | ( cd ${S}/syck ; set +e ; rm -- -l* ; rm Makefile config.h config.status lib/Makefile libtool stamp-h1 tests/.deps tests/Makefile ) || : | ||
| 533 | |||
| 534 | export varprefix=${localstatedir} | ||
| 535 | oe_runconf | ||
| 536 | } | ||
| 537 | |||
| 538 | do_install_append() { | ||
| 539 | # Configure -distribution wide- package crypto settings | ||
| 540 | # If these change, effectively all packages have to be upgraded! | ||
| 541 | sed -i -e 's,%_build_file_digest_algo.*,%_build_sign ${RPM_FILE_DIGEST_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild | ||
| 542 | sed -i -e 's,%_build_sign.*,%_build_sign ${RPM_SELF_SIGN_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild | ||
| 543 | |||
| 544 | sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros | ||
| 545 | sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* | ||
| 546 | sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* | ||
| 547 | sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros | ||
| 548 | sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros | ||
| 549 | |||
| 550 | # Enable MIPS64 N32 transactions. (This is a no-op on non-MIPS targets.) | ||
| 551 | sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros | ||
| 552 | |||
| 553 | # Enable Debian style arbitrary tags... | ||
| 554 | sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros | ||
| 555 | |||
| 556 | install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh | ||
| 557 | install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh | ||
| 558 | |||
| 559 | rm -f ${D}/${includedir}/popt.h | ||
| 560 | rm -f ${D}/${libdir}/libpopt.* | ||
| 561 | rm -f ${D}/${libdir}/pkgconfig/popt.pc | ||
| 562 | rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo | ||
| 563 | rm -f ${D}/${mandir}/man3/popt.3 | ||
| 564 | |||
| 565 | rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.a | ||
| 566 | rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.la | ||
| 567 | rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.a | ||
| 568 | rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.la | ||
| 569 | |||
| 570 | rm -f ${D}/${libdir}/rpm/dbconvert.sh | ||
| 571 | rm -f ${D}/${libdir}/rpm/libsqldb.* | ||
| 572 | |||
| 573 | rm -f ${D}/${libdir}/rpm/gstreamer.sh | ||
| 574 | rm -f ${D}/${libdir}/rpm/gem_helper.rb | ||
| 575 | rm -f ${D}/${libdir}/rpm/rubygems.rb | ||
| 576 | rm -f ${D}/${libdir}/rpm/kmod-deps.sh | ||
| 577 | rm -f ${D}/${libdir}/rpm/pythoneggs.py | ||
| 578 | rm -f ${D}/${libdir}/rpm/macros.d/kernel | ||
| 579 | rm -f ${D}/${libdir}/rpm/macros.d/gstreamer | ||
| 580 | rm -f ${D}/${libdir}/rpm/bin/mgo | ||
| 581 | rm -f ${D}/${libdir}/rpm/bin/pom2spec | ||
| 582 | |||
| 583 | rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj | ||
| 584 | rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl | ||
| 585 | } | ||
| 586 | |||
| 587 | do_install_append_class-target() { | ||
| 588 | # Create and install distribution specific macros | ||
| 589 | mkdir -p ${D}/${distromacrodir} | ||
| 590 | cat << EOF > ${D}/${distromacrodir}/macros | ||
| 591 | %_defaultdocdir ${docdir} | ||
| 592 | |||
| 593 | %_prefix ${prefix} | ||
| 594 | %_exec_prefix ${exec_prefix} | ||
| 595 | %_datarootdir ${datadir} | ||
| 596 | %_bindir ${bindir} | ||
| 597 | %_sbindir ${sbindir} | ||
| 598 | %_libexecdir %{_libdir}/%{name} | ||
| 599 | %_datadir ${datadir} | ||
| 600 | %_sysconfdir ${sysconfdir} | ||
| 601 | %_sharedstatedir ${sharedstatedir} | ||
| 602 | %_localstatedir ${localstatedir} | ||
| 603 | %_lib lib | ||
| 604 | %_libdir %{_exec_prefix}/%{_lib} | ||
| 605 | %_includedir ${includedir} | ||
| 606 | %_oldincludedir ${oldincludedir} | ||
| 607 | %_infodir ${infodir} | ||
| 608 | %_mandir ${mandir} | ||
| 609 | %_localedir %{_libdir}/locale | ||
| 610 | EOF | ||
| 611 | |||
| 612 | # Create and install multilib specific macros | ||
| 613 | ${@multilib_rpmmacros(d)} | ||
| 614 | } | ||
| 615 | |||
| 616 | do_install_append_class-native () { | ||
| 617 | sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py | ||
| 618 | } | ||
| 619 | |||
| 620 | do_install_append_class-nativesdk () { | ||
| 621 | sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py | ||
| 622 | } | ||
| 623 | |||
| 624 | def multilib_rpmmacros(d): | ||
| 625 | localdata = d.createCopy() | ||
| 626 | # We need to clear the TOOLCHAIN_OPTIONS (--sysroot) | ||
| 627 | localdata.delVar('TOOLCHAIN_OPTIONS') | ||
| 628 | |||
| 629 | # Set 'localdata' values to be consistent with 'd' values. | ||
| 630 | distromacrodirVal = d.getVar('distromacrodir') | ||
| 631 | workdirVal = d.getVar('WORKDIR') | ||
| 632 | dval = d.getVar('D') | ||
| 633 | |||
| 634 | ret = gen_arch_macro(localdata) | ||
| 635 | |||
| 636 | variants = d.getVar("MULTILIB_VARIANTS") or "" | ||
| 637 | for item in variants.split(): | ||
| 638 | # Load overrides from 'd' to avoid having to reset the value... | ||
| 639 | localdata = d.createCopy() | ||
| 640 | overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item | ||
| 641 | localdata.setVar("OVERRIDES", overrides) | ||
| 642 | localdata.setVar("MLPREFIX", item + "-") | ||
| 643 | localdata.setVar('WORKDIR', workdirVal) | ||
| 644 | localdata.setVar('distromacrodir', distromacrodirVal) | ||
| 645 | localdata.setVar('D', dval) | ||
| 646 | ret += gen_arch_macro(localdata) | ||
| 647 | return ret | ||
| 648 | |||
| 649 | def gen_arch_macro(d): | ||
| 650 | # Generate shell script to produce the file as part of do_install | ||
| 651 | val = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n" | ||
| 652 | val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n" | ||
| 653 | val += "%_lib ${baselib}\n" | ||
| 654 | val += "%_libdir ${libdir}\n" | ||
| 655 | val += "%_localedir ${localedir}\n" | ||
| 656 | val += "\n" | ||
| 657 | val += "# Toolchain configuration\n" | ||
| 658 | val += "%TOOLCHAIN_OPTIONS %{nil}\n" | ||
| 659 | val += "%__ar ${@d.getVar('AR').replace('$','%')}\n" | ||
| 660 | val += "%__as ${@d.getVar('AS').replace('$','%')}\n" | ||
| 661 | val += "%__cc ${@d.getVar('CC').replace('$','%')}\n" | ||
| 662 | val += "%__cpp ${@d.getVar('CPP').replace('$','%')}\n" | ||
| 663 | val += "%__cxx ${@d.getVar('CXX').replace('$','%')}\n" | ||
| 664 | val += "%__ld ${@d.getVar('LD').replace('$','%')}\n" | ||
| 665 | val += "%__nm ${@d.getVar('NM').replace('$','%')}\n" | ||
| 666 | val += "%__objcopy ${@d.getVar('OBJCOPY').replace('$','%')}\n" | ||
| 667 | val += "%__objdump ${@d.getVar('OBJDUMP').replace('$','%')}\n" | ||
| 668 | val += "%__ranlib ${@d.getVar('RANLIB').replace('$','%')}\n" | ||
| 669 | val += "%__strip ${@d.getVar('STRIP').replace('$','%')}\n" | ||
| 670 | val += "EOF\n" | ||
| 671 | val += "\n" | ||
| 672 | return d.expand(val) | ||
| 673 | |||
| 674 | |||
| 675 | add_native_wrapper() { | ||
| 676 | create_wrapper ${D}/${bindir}/rpm \ | ||
| 677 | RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ | ||
| 678 | RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \ | ||
| 679 | RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale | ||
| 680 | |||
| 681 | create_wrapper ${D}/${bindir}/rpm2cpio \ | ||
| 682 | RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ | ||
| 683 | RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \ | ||
| 684 | RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale | ||
| 685 | |||
| 686 | create_wrapper ${D}/${bindir}/rpmbuild \ | ||
| 687 | RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ | ||
| 688 | RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \ | ||
| 689 | RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale | ||
| 690 | |||
| 691 | create_wrapper ${D}/${bindir}/rpmconstant \ | ||
| 692 | RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ | ||
| 693 | RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \ | ||
| 694 | RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale | ||
| 695 | |||
| 696 | for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do | ||
| 697 | create_wrapper $rpm_binary \ | ||
| 698 | RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ | ||
| 699 | RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \ | ||
| 700 | RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale | ||
| 701 | done | ||
| 702 | } | ||
| 703 | |||
| 704 | do_install_append_class-native() { | ||
| 705 | add_native_wrapper | ||
| 706 | } | ||
| 707 | |||
| 708 | do_install_append_class-nativesdk() { | ||
| 709 | add_native_wrapper | ||
| 710 | } | ||
| 711 | |||
| 712 | BBCLASSEXTEND = "native nativesdk" | ||
