From e1e20a716da9663e88fbddfcf46c5e95a7a798bff97b545151aa625b44927d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Thu, 19 Jan 2017 15:41:55 +0000 Subject: [PATCH] - update to rpm-4.13.0 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=378 --- brp.diff | 22 +-- brpcompress.diff | 8 +- checksepwarn.diff | 83 ++++++++--- dbfsync.diff | 14 +- dbrointerruptable.diff | 15 +- debugedit-canon-fix.diff | 20 +-- debugedit-comp-dir.diff | 12 +- debugedit.diff | 16 +-- debuginfo-mono.patch | 8 +- debugsubpkg.diff | 34 ++--- enable-postin-scripts-error.diff | 14 +- find-lang-python.patch | 22 +-- finddebuginfo.diff | 37 +++-- findksyms.diff | 22 ++- findlang.diff | 68 ++++++--- fixsizeforbigendian.diff | 28 ---- initscriptsprov.diff | 12 +- localetag.diff | 18 +-- macrosin.diff | 18 +-- nobfd.diff | 19 +++ python3-rpm.spec | 4 +- rpm-4.12.0.1-lua-5.3.patch | 63 -------- rpm-4.12.0.1.tar.bz2 | 3 - rpm-4.13.0.tar.bz2 | 3 + rpm-findlang-inject-metainfo.patch | 24 ++-- rpm-python.spec | 4 +- rpm.changes | 12 ++ rpm.spec | 13 +- rpmrc.diff | 40 +++--- rpmrctests.diff | 12 +- suspendlock.diff | 221 ++++++++++++----------------- taggedfileindex.diff | 22 +-- waitlock.diff | 53 ++++--- whatrequires-doc.diff | 10 +- 34 files changed, 481 insertions(+), 493 deletions(-) delete mode 100644 fixsizeforbigendian.diff create mode 100644 nobfd.diff delete mode 100644 rpm-4.12.0.1-lua-5.3.patch delete mode 100644 rpm-4.12.0.1.tar.bz2 create mode 100644 rpm-4.13.0.tar.bz2 diff --git a/brp.diff b/brp.diff index 9d0063b..5c53d15 100644 --- a/brp.diff +++ b/brp.diff @@ -1,6 +1,6 @@ ---- ./scripts/Makefile.am.orig 2014-06-26 06:51:55.444816562 +0000 -+++ ./scripts/Makefile.am 2014-08-04 12:33:14.213715432 +0000 -@@ -27,6 +27,7 @@ rpmconfig_SCRIPTS = \ +--- ./scripts/Makefile.am.orig 2016-10-13 07:12:21.467778490 +0000 ++++ ./scripts/Makefile.am 2017-01-19 12:09:27.378564186 +0000 +@@ -26,6 +26,7 @@ rpmconfig_SCRIPTS = \ appdata.prov \ brp-compress brp-python-bytecompile brp-java-gcjcompile \ brp-strip brp-strip-comment-note brp-python-hardlink \ @@ -8,29 +8,29 @@ brp-strip-shared brp-strip-static-archive \ check-files check-prereqs \ check-buildroot check-rpaths check-rpaths-worker \ ---- ./scripts/brp-strip-comment-note.orig 2014-06-26 06:51:55.455816533 +0000 -+++ ./scripts/brp-strip-comment-note 2014-08-04 12:33:14.214715437 +0000 +--- ./scripts/brp-strip-comment-note.orig 2017-01-19 12:09:27.378564186 +0000 ++++ ./scripts/brp-strip-comment-note 2017-01-19 12:13:02.079982258 +0000 @@ -16,6 +16,8 @@ esac # for already stripped elf files in the build root for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ + grep -v ' shared object,' | \ + grep -v '/lib/modules/' | \ - sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do + sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped.*/\1/p'`; do note="-R .note" if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ ---- ./scripts/brp-strip.orig 2014-06-26 06:51:55.455816533 +0000 -+++ ./scripts/brp-strip 2014-08-04 12:33:14.214715437 +0000 +--- ./scripts/brp-strip.orig 2017-01-19 12:09:27.379564183 +0000 ++++ ./scripts/brp-strip 2017-01-19 12:10:34.113383581 +0000 @@ -15,6 +15,7 @@ esac for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ grep -v ' shared object,' | \ + grep -v '/lib/modules/' | \ - sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do + sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p'`; do $STRIP -g "$f" || : done ---- ./scripts/brp-suse.orig 2014-08-04 12:33:14.214715437 +0000 -+++ ./scripts/brp-suse 2014-08-04 12:33:14.214715437 +0000 +--- ./scripts/brp-suse.orig 2017-01-19 12:09:27.379564183 +0000 ++++ ./scripts/brp-suse 2017-01-19 12:09:27.379564183 +0000 @@ -0,0 +1,13 @@ +#! /bin/sh + diff --git a/brpcompress.diff b/brpcompress.diff index 087e6ad..cd334a2 100644 --- a/brpcompress.diff +++ b/brpcompress.diff @@ -1,5 +1,5 @@ ---- ./scripts/brp-compress.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./scripts/brp-compress 2011-05-11 14:44:21.000000000 +0000 +--- ./scripts/brp-compress.orig 2017-01-19 12:14:04.529812394 +0000 ++++ ./scripts/brp-compress 2017-01-19 12:18:22.488107819 +0000 @@ -5,51 +5,78 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD exit 0 fi @@ -11,8 +11,8 @@ cd "$RPM_BUILD_ROOT" # Compress man pages - COMPRESS="gzip -9 -n" - COMPRESS_EXT=.gz + COMPRESS=${COMPRESS:-gzip -9 -n} + COMPRESS_EXT=${COMPRESS_EXT:-.gz} +check_for_hard_link() +{ diff --git a/checksepwarn.diff b/checksepwarn.diff index 359c23a..37170e2 100644 --- a/checksepwarn.diff +++ b/checksepwarn.diff @@ -1,19 +1,68 @@ ---- ./build/parseReqs.c.orig 2014-02-21 12:25:51.259664860 +0000 -+++ ./build/parseReqs.c 2014-02-21 12:28:07.545664619 +0000 -@@ -178,8 +178,14 @@ rpmRC parseRCPOT(rpmSpec spec, Package p - if (rpmCharCheck(spec, EVR, ve-v, ".-_+:%{}~")) goto exit; +--- ./build/parseReqs.c.orig 2017-01-19 13:11:21.618153943 +0000 ++++ ./build/parseReqs.c 2017-01-19 13:24:32.661841405 +0000 +@@ -42,7 +42,7 @@ static rpmRC checkEpoch(const char *s, c + return RPMRC_OK; + } - /* While ':' and '-' are valid, only one of each is valid. */ -- if (checkSep(EVR, '-', &emsg) || checkSep(EVR, ':', &emsg)) -- goto exit; -+ if (checkSep(EVR, '-', &emsg) || checkSep(EVR, ':', &emsg)) { -+ if (tagflags & (RPMSENSE_FIND_REQUIRES|RPMSENSE_FIND_PROVIDES)) { -+ rpmlog(RPMLOG_WARNING, "%s: %s\n", emsg, r); -+ } else { -+ rpmlog(RPMLOG_WARNING, _("line %d: %s: %s\n"), spec->lineNum, emsg, spec->line); -+ } -+ emsg = _free(emsg); -+ } +-static rpmRC checkDep(rpmSpec spec, char *N, char *EVR, char **emsg) ++static rpmRC checkDep(rpmSpec spec, rpmsenseFlags tagflags, char *N, char *EVR, char **emsg) + { + /* + * Tokens must begin with alphanumeric, _, or /, but we don't know +@@ -65,6 +65,11 @@ static rpmRC checkDep(rpmSpec spec, char - re = ve; /* ==> next token after EVR string starts here */ - } else + if (rpmExpandNumeric("%{?_wrong_version_format_terminate_build}")) + return RPMRC_FAIL; ++ if (tagflags & (RPMSENSE_FIND_REQUIRES|RPMSENSE_FIND_PROVIDES)) ++ rpmlog(RPMLOG_WARNING, "%s\n", *emsg); ++ else ++ rpmlog(RPMLOG_WARNING, _("line %d: %s: %s\n"), spec->lineNum, *emsg, spec->line); ++ *emsg = _free(*emsg); + } + } + return RPMRC_OK; +@@ -72,6 +77,7 @@ static rpmRC checkDep(rpmSpec spec, char + + struct parseRCPOTRichData { + rpmSpec spec; ++ rpmsenseFlags tagflags; + StringBuf sb; + }; + +@@ -109,7 +115,7 @@ static rpmRC parseRCPOTRichCB(void *cbda + appendStringBuf(sb, rel); + appendStringBuf(sb, EVR); + } +- rc = checkDep(data->spec, N, EVR, emsg); ++ rc = checkDep(data->spec, data->tagflags, N, EVR, emsg); + _free(N); + _free(EVR); + } else if (type == RPMRICH_PARSE_OP) { +@@ -231,6 +237,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package p + goto exit; + } + data.spec = spec; ++ data.tagflags = tagflags; + data.sb = newStringBuf(); + if (rpmrichParse(&r, &emsg, parseRCPOTRichCB, &data) != RPMRC_OK) { + freeStringBuf(data.sb); +@@ -282,7 +289,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package p + } + + /* check that dependency is well-formed */ +- if (checkDep(spec, N, EVR, &emsg)) ++ if (checkDep(spec, tagflags, N, EVR, &emsg)) + goto exit; + + if (nametag == RPMTAG_FILETRIGGERNAME || +--- ./macros.in.orig 2017-01-19 13:15:43.113390933 +0000 ++++ ./macros.in 2017-01-19 13:15:56.263352524 +0000 +@@ -413,7 +413,7 @@ package or when debugging this package.\ + %_invalid_encoding_terminates_build 0 + + # Should invalid version format in requires, provides, ... terminate a build? +-%_wrong_version_format_terminate_build 1 ++%_wrong_version_format_terminate_build 0 + + # + # Should rpm try to download missing sources at build-time? diff --git a/dbfsync.diff b/dbfsync.diff index a71fb23..ea98480 100644 --- a/dbfsync.diff +++ b/dbfsync.diff @@ -1,8 +1,8 @@ Support a database-local fsync setting. Needs berkeley db patch. ---- ./lib/backend/dbconfig.c.orig 2011-01-03 13:57:41.000000000 +0000 -+++ ./lib/backend/dbconfig.c 2011-05-10 17:00:29.000000000 +0000 -@@ -58,8 +58,10 @@ static const struct poptOption rdbOption +--- ./lib/backend/db3.c.orig 2017-01-19 10:31:06.874215725 +0000 ++++ ./lib/backend/db3.c 2017-01-19 10:32:51.825873926 +0000 +@@ -73,8 +73,10 @@ static const struct poptOption rdbOption { "mp_size", 0,POPT_ARG_INT, &staticcfg.db_cachesize, 0, NULL, NULL }, @@ -12,12 +12,12 @@ Support a database-local fsync setting. Needs berkeley db patch. +#endif /* Per-dbi options */ - { "nommap", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOMMAP, -@@ -69,6 +71,8 @@ static const struct poptOption rdbOption + { "nommap", 0,POPT_BIT_SET, &staticdbicfg.dbi_oflags, DB_NOMMAP, +@@ -84,6 +86,8 @@ static const struct poptOption rdbOption NULL, NULL }, - { "lockdbfd", 0,POPT_ARG_NONE, &staticdbi.dbi_lockdbfd, 0, + { "lockdbfd", 0,POPT_ARG_NONE, &staticdbicfg.dbi_lockdbfd, 0, NULL, NULL }, -+ { "nofsync", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOFSYNC, ++ { "nofsync", 0,POPT_BIT_SET, &staticdbicfg.dbi_oflags, DB_NOFSYNC, + NULL, NULL }, POPT_TABLEEND diff --git a/dbrointerruptable.diff b/dbrointerruptable.diff index 7021f6f..b7478a7 100644 --- a/dbrointerruptable.diff +++ b/dbrointerruptable.diff @@ -1,6 +1,6 @@ ---- ./lib/rpmdb.c.orig 2013-06-10 15:55:10.000000000 +0000 -+++ ./lib/rpmdb.c 2013-07-12 11:28:22.000000000 +0000 -@@ -730,10 +730,12 @@ int rpmdbClose(rpmdb db) +--- ./lib/rpmdb.c.orig 2016-10-21 09:44:00.306962087 +0000 ++++ ./lib/rpmdb.c 2017-01-19 10:36:12.529219141 +0000 +@@ -450,9 +450,11 @@ int rpmdbClose(rpmdb db) { rpmdb * prev, next; int rc = 0; @@ -8,12 +8,11 @@ if (db == NULL) goto exit; - + dbmode = db->db_mode; - (void) rpmdbUnlink(db); - if (db->nrefs > 0) -@@ -761,7 +763,7 @@ int rpmdbClose(rpmdb db) + prev = &rpmdbRock; + while ((next = *prev) != NULL && next != db) +@@ -487,7 +489,7 @@ int rpmdbClose(rpmdb db) db = _free(db); @@ -22,7 +21,7 @@ (void) rpmsqEnable(-SIGHUP, NULL); (void) rpmsqEnable(-SIGINT, NULL); (void) rpmsqEnable(-SIGTERM, NULL); -@@ -830,7 +832,7 @@ static int openDatabase(const char * pre +@@ -572,7 +574,7 @@ static int openDatabase(const char * pre /* Try to ensure db home exists, error out if we can't even create */ rc = rpmioMkpath(rpmdbHome(db), 0755, getuid(), getgid()); if (rc == 0) { diff --git a/debugedit-canon-fix.diff b/debugedit-canon-fix.diff index 4f758fe..3140b96 100644 --- a/debugedit-canon-fix.diff +++ b/debugedit-canon-fix.diff @@ -1,5 +1,5 @@ ---- ./tools/debugedit.c.orig 2011-07-18 16:53:12.000000000 +0000 -+++ ./tools/debugedit.c 2011-07-18 17:15:27.000000000 +0000 +--- ./tools/debugedit.c.orig 2017-01-19 12:59:37.848194305 +0000 ++++ ./tools/debugedit.c 2017-01-19 12:59:45.236173176 +0000 @@ -162,7 +162,7 @@ strptr (DSO *dso, int sec, off_t offset) { if (data->d_buf @@ -9,7 +9,7 @@ return (const char *) data->d_buf + (offset - data->d_off); } } -@@ -503,9 +503,10 @@ static int +@@ -505,9 +505,10 @@ static int edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase) { unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir; @@ -20,8 +20,8 @@ + char line_base; unsigned char opcode_base; uint32_t value, dirt_cnt; - size_t comp_dir_len = strlen (comp_dir); -@@ -549,6 +550,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off + size_t comp_dir_len = !comp_dir ? 0 : strlen (comp_dir); +@@ -555,6 +556,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off return 1; } @@ -29,7 +29,7 @@ opcode_base = ptr[4 + (value >= 4)]; ptr = dir = ptr + 4 + (value >= 4) + opcode_base; -@@ -560,13 +562,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -566,13 +568,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off ++value; } @@ -45,7 +45,7 @@ ptr = (unsigned char *) strchr ((char *)ptr, 0) + 1; } ptr++; -@@ -679,7 +681,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -685,7 +687,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off if (dest_dir) { @@ -54,7 +54,7 @@ size_t base_len = strlen (base_dir); size_t dest_len = strlen (dest_dir); size_t shrank = 0; -@@ -693,11 +695,14 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -699,11 +701,14 @@ edit_dwarf2_line (DSO *dso, uint32_t off ptr = dir; } else @@ -71,7 +71,7 @@ char *orig = strdup ((const char *) srcptr); -@@ -724,10 +729,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -730,10 +735,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off if (shrank > 0) { @@ -86,7 +86,7 @@ { memset (ptr, 'X', shrank); ptr += shrank; -@@ -763,21 +771,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -769,21 +777,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off } dirty_section (DEBUG_STR); } diff --git a/debugedit-comp-dir.diff b/debugedit-comp-dir.diff index 288ed10..fe55c69 100644 --- a/debugedit-comp-dir.diff +++ b/debugedit-comp-dir.diff @@ -1,16 +1,16 @@ Include compilation directory in source file list if used. ---- ./tools/debugedit.c.orig 2011-05-11 14:27:32.000000000 +0000 -+++ ./tools/debugedit.c 2011-05-11 15:31:31.000000000 +0000 -@@ -503,6 +503,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off +--- ./tools/debugedit.c.orig 2017-01-19 12:56:26.948739541 +0000 ++++ ./tools/debugedit.c 2017-01-19 12:56:33.876719778 +0000 +@@ -512,6 +512,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off uint32_t value, dirt_cnt; - size_t comp_dir_len = strlen (comp_dir); + size_t comp_dir_len = !comp_dir ? 0 : strlen (comp_dir); size_t abs_file_cnt = 0, abs_dir_cnt = 0; + int comp_dir_used = 0; if (phase != 0) return 0; -@@ -611,6 +612,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -624,6 +625,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off memcpy (p, dirt[value], dir_len); p[dir_len] = '/'; memcpy (p + dir_len + 1, file, file_len + 1); @@ -18,7 +18,7 @@ Include compilation directory in source file list if used. } canonicalize_path (s, s); if (list_file_fd != -1) -@@ -644,6 +646,30 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -657,6 +659,30 @@ edit_dwarf2_line (DSO *dso, uint32_t off } ++ptr; diff --git a/debugedit.diff b/debugedit.diff index e4d3736..4b01560 100644 --- a/debugedit.diff +++ b/debugedit.diff @@ -1,8 +1,8 @@ Make debugedit build without dwarf.h ---- ./Makefile.am.orig 2012-03-20 08:07:25.000000000 +0000 -+++ ./Makefile.am 2012-06-01 10:05:04.000000000 +0000 -@@ -149,7 +149,6 @@ rpm2cpio_LDADD += @WITH_NSS_LIB@ @WITH_P +--- ./Makefile.am.orig 2016-10-21 09:44:00.299962090 +0000 ++++ ./Makefile.am 2017-01-19 10:25:42.252270176 +0000 +@@ -155,7 +155,6 @@ rpm2archive_LDADD += @WITH_NSS_LIB@ @WIT if LIBELF @@ -10,16 +10,16 @@ Make debugedit build without dwarf.h rpmconfig_SCRIPTS += scripts/find-debuginfo.sh rpmlibexec_PROGRAMS += debugedit -@@ -162,7 +161,6 @@ elfdeps_SOURCES = tools/elfdeps.c - elfdeps_LDADD = rpmio/librpmio.la - elfdeps_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@ +@@ -172,7 +171,6 @@ rpmlibexec_PROGRAMS += sepdebugcrcfix + sepdebugcrcfix_SOURCES = tools/sepdebugcrcfix.c + sepdebugcrcfix_LDADD = @WITH_LIBELF_LIB@ endif -endif rpmlibexec_PROGRAMS += rpmdeps rpmdeps_SOURCES = tools/rpmdeps.c ---- ./tools/debugedit.c.orig 2012-03-20 08:07:25.000000000 +0000 -+++ ./tools/debugedit.c 2012-06-01 10:05:04.000000000 +0000 +--- ./tools/debugedit.c.orig 2016-10-13 07:12:21.471778488 +0000 ++++ ./tools/debugedit.c 2017-01-19 10:25:42.252270176 +0000 @@ -37,7 +37,37 @@ #include diff --git a/debuginfo-mono.patch b/debuginfo-mono.patch index d877a73..ea41a34 100644 --- a/debuginfo-mono.patch +++ b/debuginfo-mono.patch @@ -1,7 +1,7 @@ ---- ./scripts/find-debuginfo.sh.orig 2011-05-11 16:10:22.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2011-05-11 16:10:48.000000000 +0000 -@@ -211,6 +211,17 @@ while read nlinks inum f; do - ;; +--- ./scripts/find-debuginfo.sh.orig 2017-01-19 13:03:40.090496764 +0000 ++++ ./scripts/find-debuginfo.sh 2017-01-19 13:03:55.515451969 +0000 +@@ -315,6 +315,17 @@ while read nlinks inum f; do + ;; *) continue ;; esac + # double check that we really have an ELF file, diff --git a/debugsubpkg.diff b/debugsubpkg.diff index 65e040c..30dde08 100644 --- a/debugsubpkg.diff +++ b/debugsubpkg.diff @@ -1,7 +1,7 @@ Create a debuginfo package for each subpackage. ---- ./build/files.c.orig 2014-06-30 08:47:13.928503700 +0000 -+++ ./build/files.c 2014-09-17 11:03:25.001860575 +0000 +--- ./build/files.c.orig 2016-10-21 09:44:00.300962089 +0000 ++++ ./build/files.c 2017-01-19 13:01:34.731859805 +0000 @@ -21,6 +21,10 @@ #include #include @@ -13,7 +13,7 @@ Create a debuginfo package for each subpackage. #include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */ #include "misc/fts.h" #include "lib/rpmfi_internal.h" /* XXX fi->apath */ -@@ -2031,13 +2035,238 @@ exit: +@@ -2156,13 +2160,238 @@ exit: return rc; } @@ -252,7 +252,7 @@ Create a debuginfo package for each subpackage. genSourceRpmName(spec); for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -@@ -2055,8 +2284,12 @@ rpmRC processBinaryFiles(rpmSpec spec, r +@@ -2180,8 +2409,12 @@ rpmRC processBinaryFiles(rpmSpec spec, r rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr); free(nvr); @@ -267,9 +267,9 @@ Create a debuginfo package for each subpackage. goto exit; a = headerGetString(pkg->header, RPMTAG_ARCH); ---- ./build/parseSpec.c.orig 2014-09-17 11:00:45.295614365 +0000 -+++ ./build/parseSpec.c 2014-09-17 11:01:56.371278963 +0000 -@@ -507,7 +507,7 @@ static void initSourceHeader(rpmSpec spe +--- ./build/parseSpec.c.orig 2017-01-19 13:01:28.985876261 +0000 ++++ ./build/parseSpec.c 2017-01-19 13:01:34.732859802 +0000 +@@ -564,7 +564,7 @@ static void initSourceHeader(rpmSpec spe } /* Add extra provides to package. */ @@ -278,9 +278,9 @@ Create a debuginfo package for each subpackage. { const char *arch, *name; char *evr, *isaprov; ---- ./build/rpmbuild_internal.h.orig 2014-08-18 06:59:55.487105642 +0000 -+++ ./build/rpmbuild_internal.h 2014-09-17 11:01:45.138331580 +0000 -@@ -433,6 +433,13 @@ int addReqProv(Package pkg, rpmTagVal ta +--- ./build/rpmbuild_internal.h.orig 2016-10-13 07:12:21.364778540 +0000 ++++ ./build/rpmbuild_internal.h 2017-01-19 13:01:34.732859802 +0000 +@@ -442,6 +442,13 @@ int addReqProv(Package pkg, rpmTagVal ta /** \ingroup rpmbuild @@ -294,8 +294,8 @@ Create a debuginfo package for each subpackage. * Add rpmlib feature dependency. * @param pkg package * @param feature rpm feature name (i.e. "rpmlib(Foo)" for feature Foo) ---- ./macros.in.orig 2014-09-17 11:00:45.299614345 +0000 -+++ ./macros.in 2014-09-17 11:00:50.013592123 +0000 +--- ./macros.in.orig 2017-01-19 13:01:28.988876252 +0000 ++++ ./macros.in 2017-01-19 13:01:34.733859800 +0000 @@ -186,24 +186,10 @@ # Template for debug information sub-package. %debug_package \ @@ -321,9 +321,9 @@ Create a debuginfo package for each subpackage. %description debugsource\ This package provides debug sources for package %{name}.\ Debug sources are useful when developing applications that use this\ ---- ./scripts/find-debuginfo.sh.orig 2014-09-17 11:00:45.293614374 +0000 -+++ ./scripts/find-debuginfo.sh 2014-09-17 11:00:50.014592113 +0000 -@@ -149,6 +149,11 @@ debug_link() +--- ./scripts/find-debuginfo.sh.orig 2017-01-19 13:01:28.983876267 +0000 ++++ ./scripts/find-debuginfo.sh 2017-01-19 13:01:34.733859800 +0000 +@@ -220,6 +220,11 @@ debug_link() # Provide .2, .3, ... symlinks to all filename instances of this build-id. make_id_dup_link() { @@ -335,9 +335,9 @@ Create a debuginfo package for each subpackage. local id="$1" file="$2" idfile local n=1 -@@ -311,19 +316,11 @@ while read nlinks inum f; do +@@ -424,19 +429,11 @@ if $run_dwz && type dwz >/dev/null 2>&1 fi - done || exit + fi -# For each symlink whose target has a .debug file, -# make a .debug symlink to that file. diff --git a/enable-postin-scripts-error.diff b/enable-postin-scripts-error.diff index f4c4e7c..9acfa5c 100644 --- a/enable-postin-scripts-error.diff +++ b/enable-postin-scripts-error.diff @@ -1,6 +1,6 @@ ---- ./lib/psm.c.orig 2016-04-21 13:22:27.901033751 +0000 -+++ ./lib/psm.c 2016-04-21 13:23:45.324742853 +0000 -@@ -285,7 +285,9 @@ static rpmRC runScript(rpmts ts, rpmte t +--- ./lib/transaction.c.orig 2017-01-19 13:46:06.163983390 +0000 ++++ ./lib/transaction.c 2017-01-19 13:47:03.649807918 +0000 +@@ -1435,7 +1435,9 @@ rpmRC runScript(rpmts ts, rpmte te, ARGV int warn_only = (stag != RPMTAG_PREIN && stag != RPMTAG_PREUN && stag != RPMTAG_PRETRANS && @@ -8,12 +8,12 @@ + stag != RPMTAG_VERIFYSCRIPT && + !(stag == RPMTAG_POSTIN && + rpmExpandNumeric("%{_fail_on_postinstall_errors}"))); + rpmdb rdb = rpmtsGetRdb(ts); sfd = rpmtsNotify(ts, te, RPMCALLBACK_SCRIPT_START, stag, 0); - if (sfd == NULL) ---- ./macros.in.orig 2016-04-21 13:21:58.933142657 +0000 -+++ ./macros.in 2016-04-21 13:22:27.902033748 +0000 -@@ -1327,6 +1327,11 @@ end} +--- ./macros.in.orig 2017-01-19 13:44:57.362193434 +0000 ++++ ./macros.in 2017-01-19 13:45:13.038145574 +0000 +@@ -1374,6 +1374,11 @@ end} %{-S:%{expand:%__scm_setup_%{-S*} %{!-v:-q}}}\ %{!-N:%autopatch %{-v} %{-p:-p%{-p*}}} diff --git a/find-lang-python.patch b/find-lang-python.patch index c0a616f..79387cf 100644 --- a/find-lang-python.patch +++ b/find-lang-python.patch @@ -2,25 +2,25 @@ Support for finding Python translation files in %python_sitelib or %python_sitearch. Sascha Peilicke ---- scripts/find-lang.sh 2013-09-27 20:04:33.000000000 +0200 -+++ scripts/find-lang.sh-new 2013-11-07 18:35:39.879014359 +0100 -@@ -32,6 +32,7 @@ - Additional options: +--- ./scripts/find-lang.sh.orig 2017-01-19 13:07:41.062796290 +0000 ++++ ./scripts/find-lang.sh 2017-01-19 13:07:48.561774470 +0000 +@@ -35,6 +35,7 @@ Additional options: --without-gnome do not find GNOME help files + --with-mate find MATE help files --without-kde do not find KDE help files + --with-python find Python translation files --with-qt find Qt translation files + --with-html find HTML files --with-man find localized man pages - --all-name match all package/domain names -@@ -56,6 +57,7 @@ - +@@ -61,6 +62,7 @@ shift GNOME= + MATE=# KDE= +PYTHON=# QT=# MAN=# - MO= -@@ -83,6 +85,10 @@ + HTML=# +@@ -93,6 +95,10 @@ while test $# -gt 0 ; do KDE=# shift ;; @@ -31,7 +31,7 @@ Sascha Peilicke --with-qt ) QT= shift -@@ -122,21 +128,25 @@ +@@ -136,21 +142,25 @@ MO_NAME_NEW=$MO_NAME.tmp.$$ rm -f $MO_NAME_NEW # remove languages we do not yet support - but give out statistics @@ -71,7 +71,7 @@ Sascha Peilicke find "$TOP_DIR" -type f -o -type l|sed ' s:'"$TOP_DIR"':: -@@ -187,6 +197,16 @@ +@@ -201,6 +211,16 @@ s:'"$TOP_DIR"':: s:^[^%].*:: '"$ONLY_C"'/%lang(C)/!d '"$NO_C"'/%lang(C)/d diff --git a/finddebuginfo.diff b/finddebuginfo.diff index 1a6aca0..a5299e0 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -1,6 +1,6 @@ ---- ./scripts/find-debuginfo.sh.orig 2012-03-20 08:07:25.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2012-06-01 12:26:12.000000000 +0000 -@@ -153,6 +153,20 @@ make_id_dup_link() +--- ./scripts/find-debuginfo.sh.orig 2016-11-03 09:10:28.922784796 +0000 ++++ ./scripts/find-debuginfo.sh 2017-01-19 12:32:12.596821861 +0000 +@@ -224,6 +224,20 @@ make_id_dup_link() debug_link "$file" "/$idfile" } @@ -21,7 +21,7 @@ # Make a build-id symlink for id $1 with suffix $3 to file $2. make_id_link() { -@@ -173,7 +187,7 @@ make_id_link() +@@ -244,7 +258,7 @@ make_id_link() local other=$(readlink -m "$root_idfile") other=${other#$RPM_BUILD_ROOT} if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" || @@ -30,14 +30,14 @@ # Two copies. Maybe one has to be setuid or something. echo >&2 "*** WARNING: identical binaries are copied, not linked:" echo >&2 " $file" -@@ -202,12 +216,18 @@ strict_error=ERROR +@@ -273,12 +287,18 @@ strict_error=ERROR $strict || strict_error=WARNING # Strip ELF binaries -find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \ - \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \ - -print | --file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p' | +-file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped.*/\1/p' | -xargs --no-run-if-empty stat -c '%h %D_%i %n' | +find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm /111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort -z | +xargs --no-run-if-empty -0 stat -c '%h %D_%i %n' | @@ -46,29 +46,28 @@ + *debuglink*) continue ;; + *debug*) ;; + *gnu.version*) -+ echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!" -+ continue -+ ;; ++ echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!" ++ continue ++ ;; + *) continue ;; + esac get_debugfn "$f" [ -f "${debugfn}" ] && continue -@@ -231,8 +251,11 @@ while read nlinks inum f; do +@@ -302,7 +322,11 @@ while read nlinks inum f; do fi echo "extracting debug info from $f" -- id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \ -- -i -l "$SOURCEFILE" "$f") || exit +- id=$(${lib_rpm_dir}/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \ + mode=$(stat -c %a "$f") + chmod +w "$f" + id=$($(DEBUGEDIT=$(which debugedit 2>/dev/null); \ -+ echo ${DEBUGEDIT:-/usr/lib/rpm/debugedit}) -b "$RPM_BUILD_DIR" \ -+ -d /usr/src/debug -i -l "$SOURCEFILE" "$f") || exit ++ echo ${DEBUGEDIT:-/usr/lib/rpm/debugedit}) \ ++ -b "$RPM_BUILD_DIR" -d /usr/src/debug \ + -i -l "$SOURCEFILE" "$f") || exit if [ $nlinks -gt 1 ]; then eval linkedid_$inum=\$id - fi -@@ -252,13 +275,25 @@ while read nlinks inum f; do +@@ -323,13 +347,25 @@ while read nlinks inum f; do esac mkdir -p "${debugdn}" @@ -99,9 +98,9 @@ + chmod $mode $f + ) || : - if [ -n "$id" ]; then - make_id_link "$id" "$dn/$(basename $f)" -@@ -287,12 +322,14 @@ if [ -s "$SOURCEFILE" ]; then + # strip -g implies we have full symtab, don't add mini symtab in that case. + $strip_g || ($include_minidebug && add_minidebug "${debugfn}" "$f") +@@ -399,12 +435,14 @@ if [ -s "$SOURCEFILE" ]; then # stupid cpio creates new directories in mode 0700, fixup find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 | xargs --no-run-if-empty -0 chmod a+rx diff --git a/findksyms.diff b/findksyms.diff index 613302a..71f3988 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -1,25 +1,23 @@ -SUSE specific kernel provides/requires scripts - ---- ./scripts/Makefile.am.orig 2014-08-04 12:34:11.656463310 +0000 -+++ ./scripts/Makefile.am 2014-08-04 12:34:15.063448350 +0000 +--- ./scripts/Makefile.am.orig 2017-01-19 12:33:33.358599138 +0000 ++++ ./scripts/Makefile.am 2017-01-19 12:35:00.045359629 +0000 @@ -16,6 +16,7 @@ EXTRA_DIST = \ - tcl.req tgpg vpkg-provides.sh \ + tgpg vpkg-provides.sh \ find-requires find-provides \ find-requires.php find-provides.php \ + find-requires.ksyms find-provides.ksyms \ - find-php-provides find-php-requires \ mono-find-requires mono-find-provides \ ocaml-find-requires.sh ocaml-find-provides.sh \ -@@ -33,6 +34,7 @@ rpmconfig_SCRIPTS = \ + pkgconfigdeps.sh libtooldeps.sh appdata.prov \ +@@ -32,6 +33,7 @@ rpmconfig_SCRIPTS = \ check-buildroot check-rpaths check-rpaths-worker \ find-lang.sh find-requires find-provides \ - perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \ + perl.prov perl.req pythondeps.sh \ + find-requires.ksyms find-provides.ksyms \ mono-find-requires mono-find-provides \ pkgconfigdeps.sh libtooldeps.sh \ ocaml-find-requires.sh ocaml-find-provides.sh \ ---- ./scripts/find-provides.ksyms.orig 2014-08-04 12:34:15.062448349 +0000 -+++ ./scripts/find-provides.ksyms 2014-08-04 12:34:15.062448349 +0000 +--- ./scripts/find-provides.ksyms.orig 2017-01-19 12:33:33.359599136 +0000 ++++ ./scripts/find-provides.ksyms 2017-01-19 12:33:33.359599136 +0000 @@ -0,0 +1,17 @@ +#! /bin/bash + @@ -38,8 +36,8 @@ SUSE specific kernel provides/requires scripts + esac +done \ +| sort -u ---- ./scripts/find-requires.ksyms.orig 2014-08-04 12:34:15.062448349 +0000 -+++ ./scripts/find-requires.ksyms 2014-08-04 12:34:15.062448349 +0000 +--- ./scripts/find-requires.ksyms.orig 2017-01-19 12:33:33.359599136 +0000 ++++ ./scripts/find-requires.ksyms 2017-01-19 12:33:33.359599136 +0000 @@ -0,0 +1,15 @@ +#! /bin/bash + diff --git a/findlang.diff b/findlang.diff index c7784e8..146dc6d 100644 --- a/findlang.diff +++ b/findlang.diff @@ -1,6 +1,6 @@ ---- ./scripts/find-lang.sh.orig 2012-03-20 08:07:25.000000000 +0000 -+++ ./scripts/find-lang.sh 2012-06-01 12:35:41.000000000 +0000 -@@ -28,10 +28,10 @@ the top of the tree containing the files +--- ./scripts/find-lang.sh.orig 2016-10-13 07:12:21.467778490 +0000 ++++ ./scripts/find-lang.sh 2017-01-19 12:45:51.491544036 +0000 +@@ -30,11 +30,11 @@ the top of the tree containing the files PACKAGE_NAME is the %{name} of the package. This should also be the basename of the .mo files. the output is written to PACKAGE_NAME.lang unless \$3 is given in which case output is written @@ -8,24 +8,26 @@ +to \$3 (note that \$3 is appended to if given). Additional options: - --with-gnome find GNOME help files -- --with-kde find KDE help files + --without-gnome do not find GNOME help files + --with-mate find MATE help files +- --with-kde find KDE help files + --without-kde do not find KDE help files --with-qt find Qt translation files + --with-html find HTML files --with-man find localized man pages - --all-name match all package/domain names -@@ -54,8 +54,8 @@ else NAME=$1 +@@ -58,9 +58,9 @@ else NAME=$1 fi shift -GNOME=# --KDE=# +GNOME= + MATE=# +-KDE=# +KDE= QT=# MAN=# - MO= -@@ -73,6 +73,14 @@ while test $# -gt 0 ; do + HTML=# +@@ -83,6 +83,14 @@ while test $# -gt 0 ; do KDE= shift ;; @@ -40,7 +42,7 @@ --with-qt ) QT= shift -@@ -97,13 +105,19 @@ while test $# -gt 0 ; do +@@ -111,13 +119,19 @@ while test $# -gt 0 ; do esac done @@ -61,7 +63,7 @@ find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: -@@ -111,27 +125,27 @@ s:'"$TOP_DIR"':: +@@ -125,27 +139,27 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/: s:^\([^%].*\):: s:%lang(C) :: @@ -96,16 +98,39 @@ find "$TOP_DIR" -type f|sed ' s:'"$TOP_DIR"':: -@@ -139,7 +153,7 @@ s:'"$TOP_DIR"':: +@@ -153,7 +167,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: s:^[^%].*:: s:%lang(C) :: -/^$/d' >> $MO_NAME ++/^$/d' >> $MO_NAME_NEW + + find $TOP_DIR -type d|sed ' + s:'"$TOP_DIR"':: +@@ -162,11 +176,11 @@ s:'"$TOP_DIR"':: + '"$NO_ALL_NAME$MATE"'s:\(.*/mate/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) \1\2: + '"$ALL_NAME$MATE"'s:\(.*/mate/help/[a-zA-Z0-9.\_\-]\+$\):%dir \1: + '"$ALL_NAME$MATE"'s:\(.*/mate/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]/.\+\):: +-'"$ALL_NAME$GNOME"'s:\(.*/mate/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) \1\2: ++'"$ALL_NAME$MATE"'s:\(.*/mate/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) \1\2: + s:%lang(.*) .*/mate/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+/.*:: + s:^\([^%].*\):: + s:%lang(C) :: +-/^$/d' >> $MO_NAME ++/^$/d' >> $MO_NAME_NEW + + find "$TOP_DIR" -type d|sed ' + s:'"$TOP_DIR"':: +@@ -181,7 +195,7 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$MATE"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: + s:^[^%].*:: + s:%lang(C) :: +-/^$/d' >> $MO_NAME +/^$/d' >> $MO_NAME_NEW KDE3_HTML=`kde-config --expandvars --install html 2>/dev/null` if [ x"$KDE3_HTML" != x -a -d "$TOP_DIR$KDE3_HTML" ]; then -@@ -151,7 +165,7 @@ s:'"$TOP_DIR"':: +@@ -193,7 +207,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: @@ -114,7 +139,7 @@ fi KDE4_HTML=`kde4-config --expandvars --install html 2>/dev/null` -@@ -164,7 +178,7 @@ s:'"$TOP_DIR"':: +@@ -206,7 +220,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: @@ -122,8 +147,17 @@ +/^$/d' >> $MO_NAME_NEW fi + find "$TOP_DIR" -type d|sed ' +@@ -217,7 +231,7 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$HTML"'s:\(.*/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: + s:^\([^%].*\):: + s:%lang(C) :: +-/^$/d' >> $MO_NAME ++/^$/d' >> $MO_NAME_NEW + find "$TOP_DIR" -type f -o -type l|sed ' -@@ -176,7 +190,7 @@ s:'"$TOP_DIR"':: + s:'"$TOP_DIR"':: +@@ -228,7 +242,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: s:^[^%].*:: s:%lang(C) :: @@ -132,14 +166,14 @@ find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: -@@ -184,17 +198,22 @@ s:'"$TOP_DIR"':: +@@ -236,17 +250,22 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: s:^\([^%].*\):: s:%lang(C) :: -/^$/d' >> $MO_NAME +/^$/d' >> $MO_NAME_NEW - find "$TOP_DIR" -type f -o -type l|sed ' + find "$TOP_DIR" -type f -o -type l|sed -r 's/\.(bz2|gz|xz|lzma|Z)$//g' | sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*: s:^\([^%].*\):: diff --git a/fixsizeforbigendian.diff b/fixsizeforbigendian.diff deleted file mode 100644 index 658019f..0000000 --- a/fixsizeforbigendian.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- ./build/pack.c.orig 2014-10-06 13:05:52.801204141 +0000 -+++ ./build/pack.c 2014-10-06 13:06:19.815077722 +0000 -@@ -290,6 +290,8 @@ static rpmRC generateSignature(char *SHA - rpmRC rc = RPMRC_OK; - char *reservedSpace; - int spaceSize = 0; -+ uint32_t size32 = (uint32_t)size; -+ uint32_t payloadSize32 = (uint32_t)payloadSize; - - /* Prepare signature */ - sig = rpmNewSignature(); -@@ -322,14 +324,14 @@ static rpmRC generateSignature(char *SHA - td.tag = payloadtag; - td.count = 1; - td.type = typetag; -- td.data = &payloadSize; -+ td.data = typetag == RPM_INT32_TYPE ? &payloadSize32 : &payloadSize; - headerPut(sig, &td, HEADERPUT_DEFAULT); - - rpmtdReset(&td); - td.tag = sizetag; - td.count = 1; - td.type = typetag; -- td.data = &size; -+ td.data = typetag == RPM_INT32_TYPE ? &size32 : &size; - headerPut(sig, &td, HEADERPUT_DEFAULT); - - spaceSize = rpmExpandNumeric("%{__gpg_reserved_space}"); diff --git a/initscriptsprov.diff b/initscriptsprov.diff index 40cb0b3..ea49fcb 100644 --- a/initscriptsprov.diff +++ b/initscriptsprov.diff @@ -1,5 +1,5 @@ ---- ./scripts/Makefile.am.orig 2014-02-20 12:52:33.971814948 +0000 -+++ ./scripts/Makefile.am 2014-02-20 12:52:40.089814937 +0000 +--- ./scripts/Makefile.am.orig 2017-01-19 13:05:33.490167306 +0000 ++++ ./scripts/Makefile.am 2017-01-19 13:06:29.192005359 +0000 @@ -21,6 +21,7 @@ EXTRA_DIST = \ ocaml-find-requires.sh ocaml-find-provides.sh \ pkgconfigdeps.sh libtooldeps.sh appdata.prov \ @@ -8,16 +8,16 @@ macros.perl macros.php macros.python rpmconfig_SCRIPTS = \ -@@ -37,6 +38,7 @@ rpmconfig_SCRIPTS = \ +@@ -38,6 +39,7 @@ rpmconfig_SCRIPTS = \ pkgconfigdeps.sh libtooldeps.sh \ ocaml-find-requires.sh ocaml-find-provides.sh \ fontconfig.prov desktop-file.prov script.req \ + sysvinitdeps.sh \ - rpmdb_loadcvt rpm2cpio.sh tcl.req tgpg + rpmdb_loadcvt rpm2cpio.sh tgpg rpmconfig_DATA = \ ---- ./scripts/sysvinitdeps.sh.orig 2014-02-20 12:52:40.089814937 +0000 -+++ ./scripts/sysvinitdeps.sh 2014-02-20 12:52:40.089814937 +0000 +--- ./scripts/sysvinitdeps.sh.orig 2017-01-19 13:05:37.523155583 +0000 ++++ ./scripts/sysvinitdeps.sh 2017-01-19 13:05:37.523155583 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh + diff --git a/localetag.diff b/localetag.diff index c21a9cb..14bc8ac 100644 --- a/localetag.diff +++ b/localetag.diff @@ -1,8 +1,8 @@ Convert output to the current locale. Assumes utf8 input if the decoding works, otherwise iso-8859-1. ---- ./lib/tagexts.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./lib/tagexts.c 2011-05-10 16:05:30.000000000 +0000 +--- ./lib/tagexts.c.orig 2016-10-21 09:44:00.309962086 +0000 ++++ ./lib/tagexts.c 2017-01-19 10:27:57.243832208 +0000 @@ -2,6 +2,7 @@ * \file lib/formats.c */ @@ -11,9 +11,9 @@ decoding works, otherwise iso-8859-1. #include "system.h" #include -@@ -150,6 +151,114 @@ exit: - return rc; - } +@@ -197,6 +198,114 @@ typedef enum tMode_e { + TRANSFILETRIGGER = 2, + } tMode; +static char * strtolocale(char *str) +{ @@ -125,8 +125,8 @@ decoding works, otherwise iso-8859-1. + /** * Retrieve trigger info. - * @param h header -@@ -435,10 +544,41 @@ static int i18nTag(Header h, rpmTag tag, + * @param mode type of trigger (see tMode_e) +@@ -607,10 +716,41 @@ static int i18nTag(Header h, rpmTag tag, #endif rc = headerGet(h, tag, td, HEADERGET_ALLOC); @@ -168,7 +168,7 @@ decoding works, otherwise iso-8859-1. * Retrieve summary text. * @param h header * @retval td tag data container -@@ -460,6 +600,16 @@ static int descriptionTag(Header h, rpmt +@@ -634,6 +774,16 @@ static int descriptionTag(Header h, rpmt return i18nTag(h, RPMTAG_DESCRIPTION, td, hgflags); } @@ -185,7 +185,7 @@ decoding works, otherwise iso-8859-1. /** * Retrieve group text. * @param h header -@@ -677,6 +827,8 @@ static const struct headerTagFunc_s rpmH +@@ -971,6 +1121,8 @@ static const struct headerTagFunc_s rpmH { RPMTAG_LONGARCHIVESIZE, longarchivesizeTag }, { RPMTAG_LONGSIZE, longsizeTag }, { RPMTAG_LONGSIGSIZE, longsigsizeTag }, diff --git a/macrosin.diff b/macrosin.diff index 57edfab..1b37ddc 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -1,5 +1,5 @@ ---- ./macros.in.orig 2014-06-27 07:25:43.624470700 +0000 -+++ ./macros.in 2014-08-04 12:38:02.067474055 +0000 +--- ./macros.in.orig 2016-10-21 09:47:06.238886221 +0000 ++++ ./macros.in 2017-01-19 12:48:15.414136831 +0000 @@ -185,22 +185,22 @@ # Template for debug information sub-package. @@ -45,7 +45,7 @@ # Algorithm to use for generating file checksum digests on build. # If not specified or 0, MD5 is used. -@@ -440,16 +441,22 @@ package or when debugging this package.\ +@@ -459,16 +460,22 @@ package or when debugging this package.\ # Directories whose contents should be considered as documentation. %__docdir_path %{_datadir}/doc:%{_datadir}/man:%{_datadir}/info:%{_datadir}/gtk-doc/html:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:/usr/doc:/usr/man:/usr/info:/usr/X11R6/man @@ -70,7 +70,7 @@ # # Path to file attribute classifications for automatic dependency -@@ -519,10 +526,10 @@ package or when debugging this package.\ +@@ -538,10 +545,10 @@ package or when debugging this package.\ # Misc BDB tuning options %__dbi_other mp_mmapsize=128Mb mp_size=1Mb @@ -83,7 +83,7 @@ #============================================================================== # ---- GPG/PGP/PGP5 signature macros. -@@ -823,7 +830,7 @@ package or when debugging this package.\ +@@ -840,7 +847,7 @@ package or when debugging this package.\ %_build_vendor %{_host_vendor} %_build_os %{_host_os} %_host @host@ @@ -92,7 +92,7 @@ %_host_cpu @host_cpu@ %_host_vendor @host_vendor@ %_host_os @host_os@ -@@ -991,6 +998,183 @@ done \ +@@ -1009,6 +1016,183 @@ done \ %python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))") %python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])") @@ -276,7 +276,7 @@ #------------------------------------------------------------------------------ # arch macro for all Intel i?86 compatibile processors # (Note: This macro (and it's analogues) will probably be obsoleted when -@@ -1001,7 +1185,9 @@ done \ +@@ -1019,7 +1203,9 @@ done \ #------------------------------------------------------------------------------ # arch macro for all supported ARM processors @@ -286,8 +286,8 @@ +%armb armv4b armv5b armv5teb #------------------------------------------------------------------------------ - # arch macro for all supported Sparc processors -@@ -1127,3 +1313,24 @@ end} + # arch macro for 32-bit MIPS processors +@@ -1174,3 +1360,24 @@ end} # \endverbatim #*/ diff --git a/nobfd.diff b/nobfd.diff new file mode 100644 index 0000000..e2d1698 --- /dev/null +++ b/nobfd.diff @@ -0,0 +1,19 @@ +--- ./tools/sepdebugcrcfix.c.orig 2017-01-19 15:28:12.521321881 +0000 ++++ ./tools/sepdebugcrcfix.c 2017-01-19 15:28:26.895267612 +0000 +@@ -28,7 +28,6 @@ + #include + #include + #include +-#include + + #define _(x) x + #define static_assert(expr) \ +@@ -46,7 +45,7 @@ static const bool false = 0, true = 1; + static unsigned long + calc_gnu_debuglink_crc32 (unsigned long crc, + const unsigned char *buf, +- bfd_size_type len) ++ size_t len) + { + static const unsigned long crc32_table[256] = + { diff --git a/python3-rpm.spec b/python3-rpm.spec index 5886323..d5c3c2b 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -1,7 +1,7 @@ # # spec file for package python3-rpm # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python3-rpm -Version: 4.12.0.1 +Version: 4.13.0 Release: 0 Summary: Python Bindings for Manipulating RPM Packages License: GPL-2.0+ diff --git a/rpm-4.12.0.1-lua-5.3.patch b/rpm-4.12.0.1-lua-5.3.patch deleted file mode 100644 index e7ee9a1..0000000 --- a/rpm-4.12.0.1-lua-5.3.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- luaext/lposix.c -+++ luaext/lposix.c -@@ -361,22 +361,35 @@ static int Pfork(lua_State *L) /** for - - static int Pwait(lua_State *L) /** wait([pid]) */ - { -+#if LUA_VERSION_NUM < 503 - pid_t pid = luaL_optint(L, 1, -1); -+#else -+ pid_t pid = (int)luaL_optinteger(L, 1, -1); -+#endif - return pushresult(L, waitpid(pid, NULL, 0), NULL); - } - - - static int Pkill(lua_State *L) /** kill(pid,[sig]) */ - { -+#if LUA_VERSION_NUM < 503 - pid_t pid = luaL_checkint(L, 1); - int sig = luaL_optint(L, 2, SIGTERM); -+#else -+ pid_t pid = (int)luaL_checkinteger(L, 1); -+ int sig = (int)luaL_optinteger(L, 2, SIGTERM); -+#endif - return pushresult(L, kill(pid, sig), NULL); - } - - - static int Psleep(lua_State *L) /** sleep(seconds) */ - { -+#if LUA_VERSION_NUM < 503 - unsigned int seconds = luaL_checkint(L, 1); -+#else -+ unsigned int seconds = (int)luaL_checkinteger(L, 1); -+#endif - lua_pushnumber(L, sleep(seconds)); - return 1; - } -@@ -529,7 +542,11 @@ static int Pgetprocessid(lua_State *L) - - static int Pttyname(lua_State *L) /** ttyname(fd) */ - { -+#if LUA_VERSION_NUM < 503 - int fd=luaL_optint(L, 1, 0); -+#else -+ int fd = (int)luaL_optinteger(L, 1, 0); -+#endif - lua_pushstring(L, ttyname(fd)); - return 1; - } -@@ -879,8 +896,11 @@ static int exit_override(lua_State *L) - { - if (!have_forked) - return luaL_error(L, "exit not permitted in this context"); -- -+#if LUA_VERSION_NUM < 503 - exit(luaL_optint(L, 1, EXIT_SUCCESS)); -+#else -+ exit((int)luaL_optinteger(L, 1, EXIT_SUCCESS)); -+#endif - } - - static const luaL_Reg os_overrides[] = diff --git a/rpm-4.12.0.1.tar.bz2 b/rpm-4.12.0.1.tar.bz2 deleted file mode 100644 index 25cd4d7..0000000 --- a/rpm-4.12.0.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:77ddd228fc332193c874aa0b424f41db1ff8b7edbb6a338703ef747851f50229 -size 4129093 diff --git a/rpm-4.13.0.tar.bz2 b/rpm-4.13.0.tar.bz2 new file mode 100644 index 0000000..a1686fe --- /dev/null +++ b/rpm-4.13.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:221166b61584721a8ca979d7d8576078a5dadaf09a44208f69cc1b353240ba1b +size 4125583 diff --git a/rpm-findlang-inject-metainfo.patch b/rpm-findlang-inject-metainfo.patch index f5a2a7a..8480ca7 100644 --- a/rpm-findlang-inject-metainfo.patch +++ b/rpm-findlang-inject-metainfo.patch @@ -1,17 +1,15 @@ -Index: scripts/find-lang.sh -=================================================================== ---- scripts/find-lang.sh.orig -+++ scripts/find-lang.sh +--- ./scripts/find-lang.sh.orig 2017-01-19 13:48:53.548472521 +0000 ++++ ./scripts/find-lang.sh 2017-01-19 13:53:09.922690409 +0000 @@ -11,6 +11,8 @@ #in tact and are included with any redistribution of this file or any #work based on this file. +# 2016-05-19 Dominique Leuenberger +# * Add support to create a metainfo.xml for -lang packages + # 2011-11-16 Per Øyvind Karlsen + # * add support for HTML files (from Mandriva) # 2004-06-20 Arkadiusz Miśkiewicz - # * merge PLD changes, kde, all-name (mkochano,pascalek@PLD) - # 1999-10-19 Artur Frysiak -@@ -37,6 +39,7 @@ Additional options: +@@ -41,6 +43,7 @@ Additional options: --with-man find localized man pages --all-name match all package/domain names --without-mo do not find locale files @@ -19,31 +17,31 @@ Index: scripts/find-lang.sh EOF exit 1 } -@@ -66,6 +69,7 @@ ALL_NAME=# +@@ -72,6 +75,7 @@ ALL_NAME=# NO_ALL_NAME= ONLY_C=# NO_C=# -+METAINFO=0 ++METAINFO=# while test $# -gt 0 ; do case "${1}" in -@@ -114,6 +118,11 @@ while test $# -gt 0 ; do +@@ -128,6 +132,11 @@ while test $# -gt 0 ; do NO_C= shift ;; + --metainfo ) -+ METAINFO=1 ++ METAINFO= + METADESKID=${2} + shift 2 + ;; * ) MO_NAME=${1} shift -@@ -278,6 +287,24 @@ if ! grep -q / $MO_NAME_NEW; then +@@ -330,6 +339,24 @@ if ! grep -q / $MO_NAME_NEW; then exit 1 fi -+if [ "${METAINFO}" -gt 0 ]; then ++if [ -z "${METAINFO}" ] ; then + # create a metainfo.xml file for METADESKID + mkdir -p ${TOP_DIR}/usr/share/appdata + cat > ${TOP_DIR}/usr/share/appdata/${METADESKID}-lang.metainfo.xml <>8)&15; @@ -16,9 +16,9 @@ Patch machine detection code: detect transmeta, rename parisc to hppa. [#52713] + sigaction(SIGILL, &oldsa, NULL); - if (cpu < 6) -@@ -1023,6 +1031,12 @@ static void defaultMachine(const char ** - strcpy(un.machine, "mips"); + #define USER686 ((1<<4) | (1<<8) | (1<<15)) +@@ -1101,6 +1109,12 @@ static void defaultMachine(rpmrcCtx ctx, + # endif # endif +#if defined(__linux__) diff --git a/suspendlock.diff b/suspendlock.diff index b89be9a..c902593 100644 --- a/suspendlock.diff +++ b/suspendlock.diff @@ -2,151 +2,114 @@ Suspend exclusive database lock when scriptlets get called, allowing read access in scriptlets. Only needed for DB_PRIVATE (aka global) locking. ---- ./lib/backend/db3.c.orig 2014-08-04 12:25:29.288759808 +0000 -+++ ./lib/backend/db3.c 2014-08-04 12:30:30.829430726 +0000 -@@ -625,6 +625,63 @@ static int dbiFlock(dbiIndex dbi, int mo - return rc; - } +--- ./lib/backend/db3.c.orig 2017-01-19 15:31:32.166569447 +0000 ++++ ./lib/backend/db3.c 2017-01-19 15:32:29.239335811 +0000 +@@ -541,6 +541,46 @@ static void db3_dbSetFSync(rpmdb rdb, in -+int dbiSuspendDBLock(dbiIndex dbi, unsigned int flags) -+{ + static int db3_Ctrl(rpmdb rdb, dbCtrlOp ctrl) + { + struct flock l; -+ int rc = 0; -+ int fdno = -1; -+ DB * db = dbi->dbi_db; -+ -+ if (!dbi->dbi_lockdbfd) -+ return 0; -+ if (!(dbi->dbi_rpmdb->db_mode & (O_RDWR|O_WRONLY))) -+ return 0; -+ if (_lockdbfd == 0) -+ return 0; -+ if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) -+ return 1; -+ memset(&l, 0, sizeof(l)); -+ l.l_whence = 0; -+ l.l_start = 0; -+ l.l_len = 0; -+ l.l_type = F_RDLCK; -+ rc = fcntl(fdno, F_SETLK, (void *)&l); -+ if (rc) -+ rpmlog(RPMLOG_WARNING, _("could not suspend database lock\n")); -+ return rc; -+} -+ -+int dbiResumeDBLock(dbiIndex dbi, unsigned int flags) -+{ -+ struct flock l; -+ int rc = 0; + int tries; + int fdno = -1; -+ DB * db = dbi->dbi_db; ++ dbiIndex dbi; ++ DB * db; + -+ if (!dbi->dbi_lockdbfd) -+ return 0; -+ if (!(dbi->dbi_rpmdb->db_mode & (O_RDWR|O_WRONLY))) -+ return 0; -+ if (_lockdbfd == 0) -+ return 0; -+ if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) ++ switch (ctrl) { ++ case DB_CTRL_SUSPEND_DBLOCK: ++ case DB_CTRL_RESUME_DBLOCK: ++ dbi = rdb->db_pkgs; /* packages db only */ ++ if (!dbi) ++ return 1; ++ if (!dbi->cfg.dbi_lockdbfd || (dbi->dbi_flags & DBI_VERIFYONLY) != 0) ++ return 0; ++ if (!(dbi->dbi_rpmdb->db_mode & (O_RDWR|O_WRONLY))) ++ return 0; ++ if (_lockdbfd == 0) ++ return 0; ++ db = dbi->dbi_db; ++ if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) ++ return 1; ++ for (tries = 0; tries < 2; tries++) { ++ memset(&l, 0, sizeof(l)); ++ l.l_whence = 0; ++ l.l_start = 0; ++ l.l_len = 0; ++ l.l_type = ctrl == DB_CTRL_SUSPEND_DBLOCK ? F_RDLCK : F_WRLCK; ++ if (!fcntl(fdno, tries ? F_SETLKW : F_SETLK, (void *)&l)) ++ return 0; ++ if (ctrl == DB_CTRL_SUSPEND_DBLOCK) { ++ rpmlog(RPMLOG_WARNING, _("could not suspend database lock\n")); ++ return 1; ++ } ++ if (tries == 0) ++ rpmlog(RPMLOG_WARNING, _("waiting to reestablish exclusive database lock\n")); ++ } + return 1; -+ for (tries = 0; tries < 2; tries++) { -+ memset(&l, 0, sizeof(l)); -+ l.l_whence = 0; -+ l.l_start = 0; -+ l.l_len = 0; -+ l.l_type = F_WRLCK; -+ rc = fcntl(fdno, tries ? F_SETLKW : F_SETLK, (void *)&l); -+ if (!rc) -+ break; -+ if (tries == 0) -+ rpmlog(RPMLOG_WARNING, _("waiting to reestablish exclusive database lock\n")); ++ default: ++ break; + } -+ return rc; -+} -+ - int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmtag, dbiIndex * dbip, int flags) - { - const char *dbhome = rpmdbHome(rdb); ---- ./lib/backend/dbi.h.orig 2014-06-26 06:51:54.101820242 +0000 -+++ ./lib/backend/dbi.h 2014-08-04 12:25:29.288759808 +0000 -@@ -92,6 +92,24 @@ struct dbiIndex_s { - extern "C" { - #endif + return 0; + } -+/** \ingroup dbi -+ * Suspend the exclusive lock on the dbi -+ * @param dbi index database handle -+ * @param flags (unused) -+ * @return 0 on success -+ */ -+RPM_GNUC_INTERNAL -+int dbiSuspendDBLock(dbiIndex dbi, unsigned int flags); -+ -+/** \ingroup dbi -+ * Reacquire an exclusive lock on the dbi -+ * @param dbi index database handle -+ * @param flags (unused) -+ * @return 0 on success -+ */ -+RPM_GNUC_INTERNAL -+int dbiResumeDBLock(dbiIndex dbi, unsigned int flags); -+ +--- ./lib/backend/dbi.h.orig 2017-01-19 15:31:32.166569447 +0000 ++++ ./lib/backend/dbi.h 2017-01-19 15:31:34.816559478 +0000 +@@ -17,7 +17,9 @@ typedef enum dbCtrlOp_e { + DB_CTRL_UNLOCK_RO = 2, + DB_CTRL_LOCK_RW = 3, + DB_CTRL_UNLOCK_RW = 4, +- DB_CTRL_INDEXSYNC = 5 ++ DB_CTRL_INDEXSYNC = 5, ++ DB_CTRL_SUSPEND_DBLOCK = 100, ++ DB_CTRL_RESUME_DBLOCK = 101 + } dbCtrlOp; - RPM_GNUC_INTERNAL - /* Globally enable/disable fsync in the backend */ ---- ./lib/psm.c.orig 2014-08-04 12:25:29.289759769 +0000 -+++ ./lib/psm.c 2014-08-04 12:27:04.230340235 +0000 -@@ -291,10 +291,12 @@ static rpmRC runScript(rpmts ts, rpmte t + typedef struct dbiIndex_s * dbiIndex; +--- ./lib/rpmdb.c.orig 2017-01-19 15:31:32.162569461 +0000 ++++ ./lib/rpmdb.c 2017-01-19 15:31:34.817559474 +0000 +@@ -2706,6 +2706,12 @@ int rpmdbCtrl(rpmdb db, rpmdbCtrlOp ctrl + case RPMDB_CTRL_INDEXSYNC: + dbctrl = DB_CTRL_INDEXSYNC; + break; ++ case RPMDB_CTRL_SUSPEND_DBLOCK: ++ dbctrl = DB_CTRL_SUSPEND_DBLOCK; ++ break; ++ case RPMDB_CTRL_RESUME_DBLOCK: ++ dbctrl = DB_CTRL_RESUME_DBLOCK; ++ break; + } + return dbctrl ? dbCtrl(db, dbctrl) : 1; + } +--- ./lib/rpmdb.h.orig 2016-10-03 08:08:36.582686286 +0000 ++++ ./lib/rpmdb.h 2017-01-19 15:31:34.818559471 +0000 +@@ -35,7 +35,9 @@ typedef enum rpmdbCtrlOp_e { + RPMDB_CTRL_UNLOCK_RO = 2, + RPMDB_CTRL_LOCK_RW = 3, + RPMDB_CTRL_UNLOCK_RW = 4, +- RPMDB_CTRL_INDEXSYNC = 5 ++ RPMDB_CTRL_INDEXSYNC = 5, ++ RPMDB_CTRL_SUSPEND_DBLOCK = 100, ++ RPMDB_CTRL_RESUME_DBLOCK = 101 + } rpmdbCtrlOp; + + /** \ingroup rpmdb +--- ./lib/transaction.c.orig 2016-10-21 09:44:00.309962086 +0000 ++++ ./lib/transaction.c 2017-01-19 15:31:34.818559471 +0000 +@@ -1425,15 +1425,18 @@ rpmRC runScript(rpmts ts, rpmte te, ARGV + stag != RPMTAG_PREUN && + stag != RPMTAG_PRETRANS && + stag != RPMTAG_VERIFYSCRIPT); ++ rpmdb rdb = rpmtsGetRdb(ts); + + sfd = rpmtsNotify(ts, te, RPMCALLBACK_SCRIPT_START, stag, 0); if (sfd == NULL) sfd = rpmtsScriptFd(ts); -+ rpmtsSuspendResumeDBLock(ts, 0); ++ rpmdbCtrl(rdb, RPMDB_CTRL_SUSPEND_DBLOCK); rpmswEnter(rpmtsOp(ts, RPMTS_OP_SCRIPTLETS), 0); rc = rpmScriptRun(script, arg1, arg2, sfd, prefixes, warn_only, rpmtsPlugins(ts)); rpmswExit(rpmtsOp(ts, RPMTS_OP_SCRIPTLETS), 0); -+ rpmtsSuspendResumeDBLock(ts, 1); ++ rpmdbCtrl(rdb, RPMDB_CTRL_RESUME_DBLOCK); /* Map warn-only errors to "notfound" for script stop callback */ stoprc = (rc != RPMRC_OK && warn_only) ? RPMRC_NOTFOUND : rc; ---- ./lib/rpmdb.c.orig 2014-08-04 12:25:15.106821818 +0000 -+++ ./lib/rpmdb.c 2014-08-04 12:25:29.289759769 +0000 -@@ -475,6 +475,12 @@ exit: - return rc; - } - -+int rpmdbSuspendResumeDBLock(rpmdb db, int mode) -+{ -+ if (db == NULL) return 0; -+ return dbiForeach(db->db_indexes, db->db_ndbi, mode ? dbiResumeDBLock : dbiSuspendDBLock, 0); -+} -+ - static rpmdb newRpmdb(const char * root, const char * home, - int mode, int perms, int flags) - { ---- ./lib/rpmts.c.orig 2014-06-26 06:51:54.653818721 +0000 -+++ ./lib/rpmts.c 2014-08-04 12:25:29.289759769 +0000 -@@ -101,6 +101,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode) - return rc; - } - -+int rpmtsSuspendResumeDBLock(rpmts ts, int mode) -+{ -+ return rpmdbSuspendResumeDBLock(ts->rdb, mode); -+} -+ - int rpmtsInitDB(rpmts ts, int dbmode) - { - rpmtxn txn = rpmtxnBegin(ts, RPMTXN_WRITE); ---- ./lib/rpmts.h.orig 2014-06-26 06:51:54.655818716 +0000 -+++ ./lib/rpmts.h 2014-08-04 12:25:29.290759730 +0000 -@@ -441,6 +441,8 @@ rpmdb rpmtsGetRdb(rpmts ts); - void * rpmtsNotify(rpmts ts, rpmte te, - rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total); - -+int rpmtsSuspendResumeDBLock(rpmts ts, int mode); -+ - /** \ingroup rpmts - * Return number of (ordered) transaction set elements. - * @param ts transaction set diff --git a/taggedfileindex.diff b/taggedfileindex.diff index b434f5b..c93c42c 100644 --- a/taggedfileindex.diff +++ b/taggedfileindex.diff @@ -1,15 +1,15 @@ This used to be the taggedfileindex patch, but it's gone. The remaining part just strips off the tag. ---- ./lib/backend/db3.c.orig 2014-08-04 12:45:25.907562115 +0000 -+++ ./lib/backend/db3.c 2014-08-04 12:46:22.225318788 +0000 -@@ -833,6 +833,9 @@ static int dbt2set(dbiIndex dbi, DBT * d - _DBSWAP(hdrNum); - _DBSWAP(tagNum); - } -+ /* remove tagged directory info */ -+ if (tagNum.ui & 0x80000000) -+ tagNum.ui &= 0x0000ffff; - set->recs[i].hdrNum = hdrNum.ui; - set->recs[i].tagNum = tagNum.ui; +--- ./lib/backend/db3.c.orig 2017-01-19 12:54:16.141112342 +0000 ++++ ./lib/backend/db3.c 2017-01-19 12:55:14.587945851 +0000 +@@ -1024,6 +1024,9 @@ static int dbt2set(dbiIndex dbi, DBT * d + _DBSWAP(hdrNum); + _DBSWAP(tagNum); } ++ /* remove tagged directory info */ ++ if (tagNum.ui & 0x80000000) ++ tagNum.ui &= 0x0000ffff; + set->recs[i].hdrNum = hdrNum.ui; + set->recs[i].tagNum = tagNum.ui; + } diff --git a/waitlock.diff b/waitlock.diff index 4fd6314..ff44cc0 100644 --- a/waitlock.diff +++ b/waitlock.diff @@ -1,27 +1,27 @@ Fix global (DB_PRIVATE) lock code: fix recursion counter, retry failed lock operations for up to 3 minutes. ---- ./lib/backend/db3.c.orig 2012-05-04 09:47:17.000000000 +0000 -+++ ./lib/backend/db3.c 2012-06-01 10:47:01.000000000 +0000 -@@ -422,6 +422,8 @@ int dbiVerify(dbiIndex dbi, unsigned int - return rc; - } +--- ./lib/backend/db3.c.orig 2017-01-19 14:59:01.432807649 +0000 ++++ ./lib/backend/db3.c 2017-01-19 15:13:18.034716068 +0000 +@@ -33,6 +33,8 @@ struct dbiCursor_s { + static struct dbiConfig_s staticdbicfg; + static struct dbConfig_s staticcfg; +static int _lockdbfd = 0; + - int dbiClose(dbiIndex dbi, unsigned int flags) - { - rpmdb rdb = dbi->dbi_rpmdb; -@@ -439,6 +441,8 @@ int dbiClose(dbiIndex dbi, unsigned int + /** \ingroup dbi + */ + static const struct poptOption rdbOptions[] = { +@@ -744,6 +746,8 @@ static int db3_dbiClose(dbiIndex dbi, un rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n", dbhome, dbi->dbi_file); -+ if (dbi->dbi_lockdbfd && _lockdbfd) ++ if (dbi->cfg.dbi_lockdbfd && !(dbi->dbi_flags & DBI_VERIFYONLY) && _lockdbfd) + _lockdbfd--; } db_fini(rdb, dbhome ? dbhome : ""); -@@ -478,6 +482,7 @@ static int dbiFlock(dbiIndex dbi, int mo +@@ -783,6 +787,7 @@ static int dbiFlock(dbiIndex dbi, int mo rc = 1; } else { const char *dbhome = rpmdbHome(dbi->dbi_rpmdb); @@ -29,7 +29,7 @@ failed lock operations for up to 3 minutes. struct flock l; memset(&l, 0, sizeof(l)); l.l_whence = 0; -@@ -487,20 +492,38 @@ static int dbiFlock(dbiIndex dbi, int mo +@@ -792,20 +797,38 @@ static int dbiFlock(dbiIndex dbi, int mo ? F_RDLCK : F_WRLCK; l.l_pid = 0; @@ -82,7 +82,7 @@ failed lock operations for up to 3 minutes. } } return rc; -@@ -517,7 +540,6 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt +@@ -822,7 +845,6 @@ static int db3_dbiOpen(rpmdb rdb, rpmDbi DB * db = NULL; DBTYPE dbtype = DB_UNKNOWN; uint32_t oflags; @@ -90,15 +90,22 @@ failed lock operations for up to 3 minutes. if (dbip) *dbip = NULL; -@@ -591,7 +613,10 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt - dbi->dbi_db = db; - dbi->dbi_oflags = oflags; - -- if (!verifyonly && rc == 0 && dbi->dbi_lockdbfd && _lockdbfd++ == 0) { +@@ -902,6 +924,8 @@ static int db3_dbiOpen(rpmdb rdb, rpmDbi + dbi->dbi_flags |= DBI_CREATED; + if (oflags & DB_RDONLY) + dbi->dbi_flags |= DBI_RDONLY; + if (verifyonly) -+ dbi->dbi_lockdbfd = 0; /* disable locking in verify mode */ -+ -+ if (rc == 0 && dbi->dbi_lockdbfd && _lockdbfd++ == 0) { - rc = dbiFlock(dbi, rdb->db_mode); - } ++ dbi->dbi_flags |= DBI_VERIFYONLY; + if (!verifyonly && rc == 0 && dbi->cfg.dbi_lockdbfd && _lockdbfd++ == 0) { + rc = dbiFlock(dbi, rdb->db_mode); +--- ./lib/backend/dbi.h.orig 2017-01-19 15:12:26.833899257 +0000 ++++ ./lib/backend/dbi.h 2017-01-19 15:05:43.958347554 +0000 +@@ -83,6 +83,7 @@ enum dbiFlags_e { + DBI_NONE = 0, + DBI_CREATED = (1 << 0), + DBI_RDONLY = (1 << 1), ++ DBI_VERIFYONLY = (1 << 2), + }; + + enum dbcFlags_e { diff --git a/whatrequires-doc.diff b/whatrequires-doc.diff index 96cf15f..5cc652f 100644 --- a/whatrequires-doc.diff +++ b/whatrequires-doc.diff @@ -1,6 +1,6 @@ ---- ./doc/rpm.8.orig 2011-01-05 08:11:09.000000000 +0000 -+++ ./doc/rpm.8 2011-05-11 15:36:18.000000000 +0000 -@@ -564,6 +564,11 @@ Query all packages that provide the \fIC +--- ./doc/rpm.8.orig 2017-01-19 12:57:41.380527116 +0000 ++++ ./doc/rpm.8 2017-01-19 12:58:12.693437688 +0000 +@@ -592,6 +592,11 @@ Query all packages that provide the \fIC .TP \fB--whatrequires \fICAPABILITY\fB\fR Query all packages that require \fICAPABILITY\fR for proper functioning. @@ -9,6 +9,6 @@ +A package usually provides multiple capabilities and file-names on which +other packages may depend. To see the complete dependencies +for a package, use \fB-e --test \fIPACKAGE_NAME\fB\fR - .SS "PACKAGE QUERY OPTIONS:" - .PP .TP + \fB--whatrecommends \fICAPABILITY\fB\fR + Query all packages that recommend \fICAPABILITY\fR.