From 20a2742d97420d26d901aa4b7c84533fc5c3f56ab19becdf44968f2b4a451f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Wed, 31 Jan 2018 14:06:28 +0000 Subject: [PATCH 1/3] - update to rpm-4.14.1 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=434 --- bigarchive.diff | 66 ------------ brpcompress.diff | 6 +- editdwarf.diff | 20 ---- findksyms.diff | 18 ++-- findlang.diff | 58 ++++++----- hardlink.diff | 156 ----------------------------- langnoc.diff | 40 ++++---- python-rpm.changes | 5 + python-rpm.spec | 2 +- remove-translations.diff | 10 +- rofs.diff | 15 --- rpm-4.14.0.tar.bz2 | 3 - rpm-4.14.1.tar.bz2 | 3 + rpm-findlang-inject-metainfo.patch | 27 ++--- rpm.changes | 15 +++ rpm.spec | 11 +- transfiletriggerpostun.diff | 21 ---- 17 files changed, 106 insertions(+), 370 deletions(-) delete mode 100644 bigarchive.diff delete mode 100644 editdwarf.diff delete mode 100644 hardlink.diff delete mode 100644 rofs.diff delete mode 100644 rpm-4.14.0.tar.bz2 create mode 100644 rpm-4.14.1.tar.bz2 delete mode 100644 transfiletriggerpostun.diff diff --git a/bigarchive.diff b/bigarchive.diff deleted file mode 100644 index e449c45..0000000 --- a/bigarchive.diff +++ /dev/null @@ -1,66 +0,0 @@ ---- lib/signature.c.orig 2018-01-05 10:59:06.358348915 +0000 -+++ lib/signature.c 2018-01-05 12:25:13.224472739 +0000 -@@ -118,6 +118,8 @@ rpmRC rpmGenerateSignature(char *SHA256, - char *reservedSpace; - int spaceSize = 32; /* always reserve a bit of space */ - int gpgSize = rpmExpandNumeric("%{__gpg_reserved_space}"); -+ rpm_off_t size32 = size; -+ rpm_off_t payloadSize32 = payloadSize; - - /* Prepare signature */ - if (SHA256) { -@@ -149,21 +151,32 @@ rpmRC rpmGenerateSignature(char *SHA256, - - rpmtdReset(&td); - td.count = 1; -- if (payloadSize < UINT32_MAX) { -- rpm_off_t p = payloadSize; -- rpm_off_t s = size; -- td.type = RPM_INT32_TYPE; -+ td.type = RPM_INT32_TYPE; - -- td.tag = RPMSIGTAG_PAYLOADSIZE; -- td.data = &p; -- headerPut(sig, &td, HEADERPUT_DEFAULT); -+ td.tag = RPMSIGTAG_PAYLOADSIZE; -+ td.data = &payloadSize32; -+ headerPut(sig, &td, HEADERPUT_DEFAULT); - -- td.tag = RPMSIGTAG_SIZE; -- td.data = &s; -- headerPut(sig, &td, HEADERPUT_DEFAULT); -- } else { -+ td.tag = RPMSIGTAG_SIZE; -+ td.data = &size32; -+ headerPut(sig, &td, HEADERPUT_DEFAULT); -+ -+ if (payloadSize >= UINT32_MAX) { -+ /* -+ * Put the 64bit size variants into the header, but -+ * modify spaceSize so that the resulting header has -+ * the same size. Note that this only works if -+ * RPMSIGTAG_RESERVEDSPACE is the last tag in the header! -+ */ - rpm_loff_t p = payloadSize; - rpm_loff_t s = size; -+ int newsigSize, oldsigSize; -+ -+ oldsigSize = headerSizeof(sig, HEADER_MAGIC_YES); -+ -+ headerDel(sig, RPMSIGTAG_PAYLOADSIZE); -+ headerDel(sig, RPMSIGTAG_SIZE); -+ - td.type = RPM_INT64_TYPE; - - td.tag = RPMSIGTAG_LONGARCHIVESIZE; -@@ -174,8 +187,8 @@ rpmRC rpmGenerateSignature(char *SHA256, - td.data = &s; - headerPut(sig, &td, HEADERPUT_DEFAULT); - -- /* adjust for the size difference between 64- and 32bit tags */ -- spaceSize -= 8; -+ newsigSize = headerSizeof(sig, HEADER_MAGIC_YES); -+ spaceSize -= newsigSize - oldsigSize; - } - - if (gpgSize > 0) diff --git a/brpcompress.diff b/brpcompress.diff index cd334a2..336c097 100644 --- a/brpcompress.diff +++ b/brpcompress.diff @@ -1,5 +1,5 @@ ---- ./scripts/brp-compress.orig 2017-01-19 12:14:04.529812394 +0000 -+++ ./scripts/brp-compress 2017-01-19 12:18:22.488107819 +0000 +--- ./scripts/brp-compress.orig 2018-01-31 13:07:37.130104408 +0000 ++++ ./scripts/brp-compress 2018-01-31 13:07:16.234159981 +0000 @@ -5,51 +5,78 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD exit 0 fi @@ -40,7 +40,7 @@ for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \ ./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \ - ./usr/share/doc/*/man/man* ./usr/lib/*/man/man* + ./usr/share/doc/*/man/man* ./usr/lib/*/man/man* ./usr/share/fish/man/man* do [ -d $d ] || continue - for f in `find $d -type f ! -name dir` diff --git a/editdwarf.diff b/editdwarf.diff deleted file mode 100644 index 8451921..0000000 --- a/editdwarf.diff +++ /dev/null @@ -1,20 +0,0 @@ -debugedit: edit_dwarf2 check lndx is in range before checking r_offset. - -upstream commit 7e9af0c000868ad6272a9577f9daed991599419b ---- ./tools/debugedit.c.orig 2017-12-05 11:59:10.287010024 +0000 -+++ ./tools/debugedit.c 2017-12-05 12:00:02.776862694 +0000 -@@ -2171,10 +2171,10 @@ edit_dwarf2 (DSO *dso) - r_offset = rel.r_offset; - } - -- while (r_offset > (dso->lines.table[lndx].old_idx -- + 4 -- + dso->lines.table[lndx].unit_length) -- && lndx < dso->lines.used) -+ while (lndx < dso->lines.used -+ && r_offset > (dso->lines.table[lndx].old_idx -+ + 4 -+ + dso->lines.table[lndx].unit_length)) - lndx++; - - if (lndx >= dso->lines.used) diff --git a/findksyms.diff b/findksyms.diff index 14d2da4..891a35f 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -1,6 +1,6 @@ ---- ./scripts/Makefile.am.orig 2017-12-01 14:48:23.171746842 +0000 -+++ ./scripts/Makefile.am 2017-12-01 14:49:09.395612962 +0000 -@@ -18,6 +18,7 @@ EXTRA_DIST = \ +--- ./scripts/Makefile.am.orig 2018-01-31 13:08:32.644956731 +0000 ++++ ./scripts/Makefile.am 2018-01-31 13:09:24.081819852 +0000 +@@ -19,6 +19,7 @@ EXTRA_DIST = \ tgpg vpkg-provides.sh \ find-requires find-provides \ find-requires.php find-provides.php \ @@ -8,16 +8,16 @@ mono-find-requires mono-find-provides \ ocaml-find-requires.sh ocaml-find-provides.sh \ pkgconfigdeps.sh libtooldeps.sh metainfo.prov \ -@@ -34,6 +35,7 @@ rpmconfig_SCRIPTS = \ - debuginfo.prov \ +@@ -36,6 +37,7 @@ rpmconfig_SCRIPTS = \ find-lang.sh find-requires find-provides \ perl.prov perl.req pythondeps.sh pythondistdeps.py \ + python-macro-helper \ + find-requires.ksyms find-provides.ksyms \ metainfo.prov \ mono-find-requires mono-find-provides \ pkgconfigdeps.sh libtooldeps.sh \ ---- ./scripts/find-provides.ksyms.orig 2017-12-01 14:48:28.374731785 +0000 -+++ ./scripts/find-provides.ksyms 2017-12-01 14:48:28.374731785 +0000 +--- ./scripts/find-provides.ksyms.orig 2018-01-31 13:08:40.820934977 +0000 ++++ ./scripts/find-provides.ksyms 2018-01-31 13:08:40.820934977 +0000 @@ -0,0 +1,60 @@ +#! /bin/bash + @@ -79,8 +79,8 @@ + | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p" +done \ +| sort -u ---- ./scripts/find-requires.ksyms.orig 2017-12-01 14:48:28.375731781 +0000 -+++ ./scripts/find-requires.ksyms 2017-12-01 14:48:28.375731781 +0000 +--- ./scripts/find-requires.ksyms.orig 2018-01-31 13:08:40.821934974 +0000 ++++ ./scripts/find-requires.ksyms 2018-01-31 13:08:40.820934977 +0000 @@ -0,0 +1,29 @@ +#! /bin/bash + diff --git a/findlang.diff b/findlang.diff index 3cdd203..48cbd47 100644 --- a/findlang.diff +++ b/findlang.diff @@ -1,6 +1,6 @@ ---- ./scripts/find-lang.sh.orig 2017-10-05 10:04:57.586602035 +0000 -+++ ./scripts/find-lang.sh 2017-12-01 14:51:31.189202268 +0000 -@@ -30,11 +30,11 @@ the top of the tree containing the files +--- ./scripts/find-lang.sh.orig 2018-01-16 09:02:23.879253043 +0000 ++++ ./scripts/find-lang.sh 2018-01-31 13:20:30.938048419 +0000 +@@ -22,11 +22,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 @@ -15,7 +15,7 @@ --with-qt find Qt translation files --with-html find HTML files --with-man find localized man pages -@@ -58,9 +58,9 @@ else NAME=$1 +@@ -50,9 +50,9 @@ else NAMES[0]=$1 fi shift @@ -27,7 +27,7 @@ QT=# MAN=# HTML=# -@@ -83,6 +83,14 @@ while test $# -gt 0 ; do +@@ -74,6 +74,14 @@ while test $# -gt 0 ; do KDE= shift ;; @@ -42,28 +42,33 @@ --with-qt ) QT= shift -@@ -111,13 +119,19 @@ while test $# -gt 0 ; do +@@ -103,11 +111,13 @@ while test $# -gt 0 ; do + shift + ;; esac - done +-done ++done +-if [ -f $MO_NAME ]; then +- rm $MO_NAME +if ! test -s $MO_NAME ; then + echo "%defattr (644, root, root, 755)" > $MO_NAME -+fi + fi +MO_NAME_NEW=$MO_NAME.tmp.$$ +rm -f $MO_NAME_NEW -+ - find "$TOP_DIR" -type f -o -type l|sed ' - s:'"$TOP_DIR"':: - '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: + + for NAME in ${NAMES[@]}; do + +@@ -117,7 +127,7 @@ s:'"$TOP_DIR"':: '"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: --/^$/d' > $MO_NAME -+/^$/d' > $MO_NAME_NEW +-/^$/d' >> $MO_NAME ++/^$/d' >> $MO_NAME_NEW find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: -@@ -125,27 +139,27 @@ s:'"$TOP_DIR"':: +@@ -125,27 +135,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) :: @@ -98,7 +103,7 @@ find "$TOP_DIR" -type f|sed ' s:'"$TOP_DIR"':: -@@ -153,7 +167,7 @@ s:'"$TOP_DIR"':: +@@ -153,7 +163,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) :: @@ -107,7 +112,7 @@ find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: -@@ -166,14 +180,14 @@ s:'"$TOP_DIR"':: +@@ -166,14 +176,14 @@ s:'"$TOP_DIR"':: s:%lang(.*) .*/mate/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+/.*:: s:^\([^%].*\):: s:%lang(C) :: @@ -124,7 +129,7 @@ find "$TOP_DIR" -type f|sed ' s:'"$TOP_DIR"':: -@@ -181,7 +195,7 @@ s:'"$TOP_DIR"':: +@@ -181,7 +191,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) :: @@ -133,7 +138,7 @@ KDE3_HTML=`kde-config --expandvars --install html 2>/dev/null` if [ x"$KDE3_HTML" != x -a -d "$TOP_DIR$KDE3_HTML" ]; then -@@ -193,7 +207,7 @@ s:'"$TOP_DIR"':: +@@ -193,7 +203,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: @@ -142,7 +147,7 @@ fi KDE4_HTML=`kde4-config --expandvars --install html 2>/dev/null` -@@ -206,7 +220,7 @@ s:'"$TOP_DIR"':: +@@ -206,7 +216,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: @@ -151,7 +156,7 @@ fi KF5_HTML=`kf5-config --expandvars --install html 2>/dev/null` -@@ -219,7 +233,7 @@ s:'"$TOP_DIR"':: +@@ -219,7 +229,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: @@ -160,7 +165,7 @@ fi find "$TOP_DIR" -type d|sed ' -@@ -230,7 +244,7 @@ s:'"$TOP_DIR"':: +@@ -230,7 +240,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$HTML"'s:\(.*/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: @@ -169,7 +174,7 @@ find "$TOP_DIR" -type f -o -type l|sed ' s:'"$TOP_DIR"':: -@@ -243,7 +257,7 @@ s:'"$TOP_DIR"':: +@@ -243,7 +253,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: s:^[^%].*:: s:%lang(C) :: @@ -178,7 +183,7 @@ find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: -@@ -251,17 +265,22 @@ s:'"$TOP_DIR"':: +@@ -251,19 +261,24 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: s:^\([^%].*\):: s:%lang(C) :: @@ -193,9 +198,12 @@ -/^$/d' >> $MO_NAME +/^$/d' >> $MO_NAME_NEW + done # for NAME in ${NAMES[@]} + -if ! grep -q / $MO_NAME; then +- echo "No translations found for ${NAME} in ${TOP_DIR}" +if ! grep -q / $MO_NAME_NEW; then - echo "No translations found for ${NAME} in ${TOP_DIR}" ++ echo "No translations found for ${NAMES[*]} in ${TOP_DIR}" + rm -f $MO_NAME_NEW exit 1 fi diff --git a/hardlink.diff b/hardlink.diff deleted file mode 100644 index 3e1e057..0000000 --- a/hardlink.diff +++ /dev/null @@ -1,156 +0,0 @@ -Create first hard link file and keep open, write it at end - -upstream commit e276991614fd127f21aba94946f81f22cb7e6b73 -upstream commit 0afe0c3c6cba64d8b7adcdec6ed70f8d32961b58 -upstream commit ef3ff412c33a71be6b3543a50c244377dff3d9e7 ---- ./lib/fsm.c.orig 2017-10-05 10:04:56.977602149 +0000 -+++ ./lib/fsm.c 2017-12-05 12:05:19.529973029 +0000 -@@ -218,56 +218,76 @@ static int linkSane(FD_t wfd, const char - sb.st_dev == lsb.st_dev && sb.st_ino == lsb.st_ino); - } - --/** \ingroup payload -- * Create file from payload stream. -- * @return 0 on success -- */ --static int expandRegular(rpmfi fi, const char *dest, rpmpsm psm, int exclusive, int nodigest, int nocontent) -+static void wfd_close(FD_t *wfdp) - { -- FD_t wfd = NULL; -- int rc = 0; -+ if (wfdp && *wfdp) { -+ int myerrno = errno; -+ static int oneshot = 0; -+ static int flush_io = 0; -+ if (!oneshot) { -+ flush_io = rpmExpandNumeric("%{?_flush_io}"); -+ oneshot = 1; -+ } -+ if (flush_io) { -+ int fdno = Fileno(*wfdp); -+ fsync(fdno); -+ } -+ Fclose(*wfdp); -+ *wfdp = NULL; -+ errno = myerrno; -+ } -+} - -+static int wfd_open(FD_t *wfdp, const char *dest, int exclusive) -+{ -+ int rc = 0; - /* Create the file with 0200 permissions (write by owner). */ - { - mode_t old_umask = umask(0577); -- wfd = Fopen(dest, exclusive ? "wx.ufdio" : "a.ufdio"); -+ *wfdp = Fopen(dest, exclusive ? "wx.ufdio" : "a.ufdio"); - umask(old_umask); - - /* If reopening, make sure the file is what we expect */ -- if (!exclusive && wfd != NULL && !linkSane(wfd, dest)) { -+ if (!exclusive && *wfdp != NULL && !linkSane(*wfdp, dest)) { - rc = RPMERR_OPEN_FAILED; - goto exit; - } - } -- if (Ferror(wfd)) { -+ if (Ferror(*wfdp)) { - rc = RPMERR_OPEN_FAILED; - goto exit; - } - -+ return 0; -+ -+exit: -+ wfd_close(wfdp); -+ return rc; -+} -+ -+/** \ingroup payload -+ * Create file from payload stream. -+ * @return 0 on success -+ */ -+static int expandRegular(rpmfi fi, const char *dest, rpmpsm psm, int exclusive, int nodigest, int nocontent) -+{ -+ FD_t wfd = NULL; -+ int rc; -+ -+ rc = wfd_open(&wfd, dest, exclusive); -+ if (rc != 0) -+ goto exit; -+ - if (!nocontent) - rc = rpmfiArchiveReadToFilePsm(fi, wfd, nodigest, psm); -+ wfd_close(&wfd); - exit: -- if (wfd) { -- int myerrno = errno; -- static int oneshot = 0; -- static int flush_io = 0; -- if (!oneshot) { -- flush_io = rpmExpandNumeric("%{?_flush_io}"); -- oneshot = 1; -- } -- if (flush_io) { -- int fdno = Fileno(wfd); -- fsync(fdno); -- } -- Fclose(wfd); -- errno = myerrno; -- } - return rc; - } - - static int fsmMkfile(rpmfi fi, const char *dest, rpmfiles files, - rpmpsm psm, int nodigest, int *setmeta, -- int * firsthardlink) -+ int * firsthardlink, FD_t *firstlinkfile) - { - int rc = 0; - int numHardlinks = rpmfiFNlink(fi); -@@ -276,7 +296,7 @@ static int fsmMkfile(rpmfi fi, const cha - /* Create first hardlinked file empty */ - if (*firsthardlink < 0) { - *firsthardlink = rpmfiFX(fi); -- rc = expandRegular(fi, dest, psm, 1, nodigest, 1); -+ rc = wfd_open(firstlinkfile, dest, 1); - } else { - /* Create hard links for others */ - char *fn = rpmfilesFN(files, *firsthardlink); -@@ -294,7 +314,8 @@ static int fsmMkfile(rpmfi fi, const cha - rc = expandRegular(fi, dest, psm, 1, nodigest, 0); - } else if (rpmfiArchiveHasContent(fi)) { - if (!rc) -- rc = expandRegular(fi, dest, psm, 0, nodigest, 0); -+ rc = rpmfiArchiveReadToFilePsm(fi, *firstlinkfile, nodigest, psm); -+ wfd_close(firstlinkfile); - *firsthardlink = -1; - } else { - *setmeta = 0; -@@ -861,6 +882,7 @@ int rpmPackageFilesInstall(rpmts ts, rpm - int nodigest = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOFILEDIGEST) ? 1 : 0; - int nofcaps = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOCAPS) ? 1 : 0; - int firsthardlink = -1; -+ FD_t firstlinkfile = NULL; - int skip; - rpmFileAction action; - char *tid = NULL; -@@ -932,7 +954,7 @@ int rpmPackageFilesInstall(rpmts ts, rpm - if (S_ISREG(sb.st_mode)) { - if (rc == RPMERR_ENOENT) { - rc = fsmMkfile(fi, fpath, files, psm, nodigest, -- &setmeta, &firsthardlink); -+ &setmeta, &firsthardlink, &firstlinkfile); - } - } else if (S_ISDIR(sb.st_mode)) { - if (rc == RPMERR_ENOENT) { -@@ -970,7 +992,8 @@ int rpmPackageFilesInstall(rpmts ts, rpm - /* we skip the hard linked file containing the content */ - /* write the content to the first used instead */ - char *fn = rpmfilesFN(files, firsthardlink); -- rc = expandRegular(fi, fn, psm, 0, nodigest, 0); -+ rc = rpmfiArchiveReadToFilePsm(fi, firstlinkfile, nodigest, psm); -+ wfd_close(&firstlinkfile); - firsthardlink = -1; - free(fn); - } diff --git a/langnoc.diff b/langnoc.diff index 95a5604..3bb5177 100644 --- a/langnoc.diff +++ b/langnoc.diff @@ -1,6 +1,6 @@ ---- ./macros.in.orig 2012-06-01 14:10:18.000000000 +0000 -+++ ./macros.in 2012-06-01 14:10:29.000000000 +0000 -@@ -1204,6 +1204,7 @@ EOF +--- ./macros.in.orig 2018-01-31 13:35:52.735593230 +0000 ++++ ./macros.in 2018-01-31 13:35:55.528585772 +0000 +@@ -1351,6 +1351,7 @@ EOF # %files -f %{name}.lang # %find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot} @@ -8,18 +8,18 @@ # Commands + opts to use for retrieving remote files # Proxy opts can be set through --httpproxy/--httpport popt aliases, ---- ./scripts/find-lang.sh.orig 2012-06-01 14:10:18.000000000 +0000 -+++ ./scripts/find-lang.sh 2012-06-01 14:14:47.000000000 +0000 -@@ -62,6 +62,8 @@ MO= - MO_NAME=$NAME.lang +--- ./scripts/find-lang.sh.orig 2018-01-31 13:35:52.726593254 +0000 ++++ ./scripts/find-lang.sh 2018-01-31 13:36:35.806478195 +0000 +@@ -60,6 +60,8 @@ MO= + MO_NAME=${NAMES[0]}.lang ALL_NAME=# NO_ALL_NAME= +ONLY_C=# +NO_C=# - while test $# -gt 0 ; do case "${1}" in -@@ -98,6 +100,14 @@ while test $# -gt 0 ; do + --with-gnome ) +@@ -103,6 +105,14 @@ while test $# -gt 0 ; do NO_ALL_NAME=# shift ;; @@ -32,18 +32,18 @@ + shift + ;; * ) - MO_NAME=${1} - shift -@@ -133,6 +143,8 @@ s:'"$TOP_DIR"':: + if [ $MO_NAME != ${NAMES[$#]}.lang ]; then + NAMES[${#NAMES[@]}]=$MO_NAME +@@ -143,6 +153,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: '"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3: s:^\([^%].*\):: +'"$ONLY_C"'/%lang(C)/!d +'"$NO_C"'/%lang(C)/d s:%lang(C) :: - /^$/d' > $MO_NAME_NEW + /^$/d' >> $MO_NAME_NEW -@@ -141,19 +153,23 @@ s:'"$TOP_DIR"':: +@@ -151,19 +163,23 @@ s:'"$TOP_DIR"':: '"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3\4/: '"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/: s:^\([^%].*\):: @@ -69,7 +69,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -169,6 +185,8 @@ s:'"$TOP_DIR"':: +@@ -179,6 +195,8 @@ s:'"$TOP_DIR"':: '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1: '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: s:^[^%].*:: @@ -78,7 +78,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -181,6 +199,8 @@ s:'"$TOP_DIR"':: +@@ -219,6 +237,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: @@ -87,7 +87,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW fi -@@ -194,6 +214,8 @@ s:'"$TOP_DIR"':: +@@ -232,6 +252,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: @@ -96,7 +96,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW fi -@@ -206,6 +228,8 @@ s:'"$TOP_DIR"':: +@@ -269,6 +291,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: s:^[^%].*:: @@ -105,7 +105,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -214,6 +238,8 @@ s:'"$TOP_DIR"':: +@@ -277,6 +301,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\):: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: s:^\([^%].*\):: @@ -114,7 +114,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -221,6 +247,8 @@ find "$TOP_DIR" -type f -o -type l|sed ' +@@ -284,6 +310,8 @@ find "$TOP_DIR" -type f -o -type l|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/python-rpm.changes b/python-rpm.changes index 10c71f3..aca340c 100644 --- a/python-rpm.changes +++ b/python-rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 31 14:45:33 CET 2018 - mls@suse.de + +- update to rpm-4.14.1 + ------------------------------------------------------------------- Tue Dec 19 09:39:25 UTC 2017 - jengelh@inai.de diff --git a/python-rpm.spec b/python-rpm.spec index 0a05904..2915945 100644 --- a/python-rpm.spec +++ b/python-rpm.spec @@ -18,7 +18,7 @@ Name: python-rpm -Version: 4.14.0 +Version: 4.14.1 Release: 0 #!BuildIgnore: rpmlint-Factory Summary: Python Bindings for Manipulating RPM Packages diff --git a/remove-translations.diff b/remove-translations.diff index 00ddd7e..dcf3cbb 100644 --- a/remove-translations.diff +++ b/remove-translations.diff @@ -1,6 +1,6 @@ ---- ./scripts/find-lang.sh.orig 2012-06-01 13:28:40.000000000 +0000 -+++ ./scripts/find-lang.sh 2012-06-01 13:30:43.000000000 +0000 -@@ -111,6 +111,23 @@ fi +--- ./scripts/find-lang.sh.orig 2018-01-31 13:25:25.229266078 +0000 ++++ ./scripts/find-lang.sh 2018-01-31 13:26:15.128133281 +0000 +@@ -119,6 +119,23 @@ fi MO_NAME_NEW=$MO_NAME.tmp.$$ rm -f $MO_NAME_NEW @@ -21,6 +21,6 @@ + fi +done + + for NAME in ${NAMES[@]}; do + find "$TOP_DIR" -type f -o -type l|sed ' - s:'"$TOP_DIR"':: - '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: diff --git a/rofs.diff b/rofs.diff deleted file mode 100644 index c08abb2..0000000 --- a/rofs.diff +++ /dev/null @@ -1,15 +0,0 @@ -Don't bother retrying locking on read-only filesystem (RhBug:1502134) - -upstream commit f25752a8cd6b161f3002dc7839242872ecb59547 ---- ./lib/rpmlock.c.orig 2017-08-10 08:08:07.122108699 +0000 -+++ ./lib/rpmlock.c 2017-12-05 12:02:26.248459858 +0000 -@@ -30,7 +30,8 @@ static rpmlock rpmlock_new(const char *l - (void) umask(oldmask); - - if (lock->fd == -1) { -- lock->fd = open(lock_path, O_RDONLY); -+ if (errno != EROFS) -+ lock->fd = open(lock_path, O_RDONLY); - if (lock->fd == -1) { - free(lock); - lock = NULL; diff --git a/rpm-4.14.0.tar.bz2 b/rpm-4.14.0.tar.bz2 deleted file mode 100644 index f595a4d..0000000 --- a/rpm-4.14.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06a0ad54600d3c42e42e02701697a8857dc4b639f6476edefffa714d9f496314 -size 4085209 diff --git a/rpm-4.14.1.tar.bz2 b/rpm-4.14.1.tar.bz2 new file mode 100644 index 0000000..80149fd --- /dev/null +++ b/rpm-4.14.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43f40e2ccc3ca65bd3238f8c9f8399d4957be0878c2e83cba2746d2d0d96793b +size 4103880 diff --git a/rpm-findlang-inject-metainfo.patch b/rpm-findlang-inject-metainfo.patch index 8480ca7..92b5ab5 100644 --- a/rpm-findlang-inject-metainfo.patch +++ b/rpm-findlang-inject-metainfo.patch @@ -1,15 +1,6 @@ ---- ./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 -@@ -41,6 +43,7 @@ Additional options: +--- ./scripts/find-lang.sh.orig 2018-01-31 13:37:22.810352621 +0000 ++++ ./scripts/find-lang.sh 2018-01-31 13:39:38.117990971 +0000 +@@ -32,6 +32,7 @@ Additional options: --with-man find localized man pages --all-name match all package/domain names --without-mo do not find locale files @@ -17,15 +8,15 @@ EOF exit 1 } -@@ -72,6 +75,7 @@ ALL_NAME=# +@@ -62,6 +63,7 @@ ALL_NAME=# NO_ALL_NAME= ONLY_C=# NO_C=# +METAINFO=# - while test $# -gt 0 ; do case "${1}" in -@@ -128,6 +132,11 @@ while test $# -gt 0 ; do + --with-gnome ) +@@ -113,6 +115,11 @@ while test $# -gt 0 ; do NO_C= shift ;; @@ -35,9 +26,9 @@ + shift 2 + ;; * ) - MO_NAME=${1} - shift -@@ -330,6 +339,24 @@ if ! grep -q / $MO_NAME_NEW; then + if [ $MO_NAME != ${NAMES[$#]}.lang ]; then + NAMES[${#NAMES[@]}]=$MO_NAME +@@ -323,6 +330,24 @@ if ! grep -q / $MO_NAME_NEW; then exit 1 fi diff --git a/rpm.changes b/rpm.changes index 859dbc4..1eb6e0d 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Wed Jan 31 14:45:33 CET 2018 - mls@suse.de + +- update to rpm-4.14.1 + * Fix arbitrary code execution when evaluating common + python-related macros + * new artifact file marker + * less strict signature header verification [bnc#1078284] +- dropped patches: + * bigarchive.diff + * editdwarf.diff + * hardlink.diff + * rofs.diff + * transfiletriggerpostun.diff + ------------------------------------------------------------------- Mon Jan 22 11:13:48 UTC 2018 - rguenther@suse.com diff --git a/rpm.spec b/rpm.spec index deae3ba..d5b86e9 100644 --- a/rpm.spec +++ b/rpm.spec @@ -51,7 +51,7 @@ Requires(post): %fillup_prereq Summary: The RPM Package Manager License: GPL-2.0+ Group: System/Packages -Version: 4.14.0 +Version: 4.14.1 Release: 0 Source: http://ftp.rpm.org/releases/rpm-4.14.x/rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 @@ -127,13 +127,8 @@ Patch99: enable-postin-scripts-error.diff Patch100: rpm-findlang-inject-metainfo.patch Patch102: emptymanifest.diff Patch103: find-lang-qt-qm.patch -Patch104: editdwarf.diff -Patch105: rofs.diff -Patch106: transfiletriggerpostun.diff -Patch107: hardlink.diff Patch108: debugedit-macro.diff Patch109: pythondistdeps.diff -Patch110: bigarchive.diff Patch111: debugedit-bnc1076819.diff Patch6464: auto-config-update-aarch64-ppc64le.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -230,8 +225,8 @@ rm -f rpmdb/db.h %patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 77 -P 78 %patch -P 85 %patch -P 93 -P 94 -P 99 -%patch -P 100 -P 102 -P 103 -P 104 -P 105 -P 106 -P 107 -P 108 -%patch -P 109 -P 110 -P 111 +%patch -P 100 -P 102 -P 103 -P 108 +%patch -P 109 -P 111 %ifarch aarch64 ppc64le %patch6464 diff --git a/transfiletriggerpostun.diff b/transfiletriggerpostun.diff deleted file mode 100644 index 652737f..0000000 --- a/transfiletriggerpostun.diff +++ /dev/null @@ -1,21 +0,0 @@ -Fix not all %transfiletriggerpostun triggers executing (RhBug:1514085) - -upstream commit db1b99db2543b2c2526a2e116daeffa0498d5de4 ---- ./lib/rpmtriggers.c.orig 2017-10-05 10:04:57.121602122 +0000 -+++ ./lib/rpmtriggers.c 2017-12-05 12:04:35.448096904 +0000 -@@ -106,7 +106,6 @@ void rpmtriggersPrepPostUnTransFileTrigs - rpmfiles files; - rpmds rpmdsTriggers; - rpmds rpmdsTrigger; -- int tix = 0; - - ii = rpmdbIndexIteratorInit(rpmtsGetRdb(ts), RPMDBI_TRANSFILETRIGGERNAME); - mi = rpmdbNewIterator(rpmtsGetRdb(ts), RPMDBI_PACKAGES); -@@ -131,6 +130,7 @@ void rpmtriggersPrepPostUnTransFileTrigs - if (rpmdbGetIteratorCount(mi)) { - /* Filter triggers and save only trans postun triggers into ts */ - while ((trigH = rpmdbNextIterator(mi)) != NULL) { -+ int tix = 0; - rpmdsTriggers = rpmdsNew(trigH, RPMTAG_TRANSFILETRIGGERNAME, 0); - while ((rpmdsTrigger = rpmdsFilterTi(rpmdsTriggers, tix))) { - if ((rpmdsNext(rpmdsTrigger) >= 0) && From 4fe9a12454965a14b978bf193158da87ee31b502364be94e6e434532c78cadb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Mon, 5 Feb 2018 10:09:34 +0000 Subject: [PATCH 2/3] remove shebang from python-macro-helper OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=435 --- pythondistdeps.diff | 11 +++++++++-- rpm.changes | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pythondistdeps.diff b/pythondistdeps.diff index 7324049..cb4b6c8 100644 --- a/pythondistdeps.diff +++ b/pythondistdeps.diff @@ -1,5 +1,12 @@ ---- ./scripts/pythondistdeps.py.orig 2018-01-02 10:03:28.273247676 +0000 -+++ ./scripts/pythondistdeps.py 2018-01-02 10:03:41.527207759 +0000 +--- ./scripts/python-macro-helper.orig 2018-02-05 10:06:51.837690381 +0000 ++++ ./scripts/python-macro-helper 2018-02-05 10:07:22.500594058 +0000 +@@ -1,4 +1,3 @@ +-#!/usr/bin/python -Es + + from distutils.sysconfig import get_python_lib + from platform import python_version_tuple +--- ./scripts/pythondistdeps.py.orig 2017-10-05 10:04:57.587602034 +0000 ++++ ./scripts/pythondistdeps.py 2018-02-05 10:06:37.013736947 +0000 @@ -1,4 +1,3 @@ -#!/usr/bin/python # -*- coding: utf-8 -*- diff --git a/rpm.changes b/rpm.changes index 1eb6e0d..2a40dae 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 5 11:08:12 CET 2018 - mls@suse.de + +- remove shebang from python-macro-helper + ------------------------------------------------------------------- Wed Jan 31 14:45:33 CET 2018 - mls@suse.de From 4be37b014244bed1e05806029a27a19413c64ca77995c608c1303d1b2199fb5c Mon Sep 17 00:00:00 2001 From: Richard Brown Date: Wed, 7 Feb 2018 13:58:48 +0000 Subject: [PATCH 3/3] Accepting request 573617 from home:dimstar:Factory - Update %remove_and_set: This macro needs no fallback to /var/adm/fillup-templates, as it does not work on files provided by the packages, but rather constructs temporary files inside fillup_dir. OBS-URL: https://build.opensuse.org/request/show/573617 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=436 --- rpm-suse_macros | 4 ---- rpm.changes | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/rpm-suse_macros b/rpm-suse_macros index f7f273e..d681c28 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -199,10 +199,6 @@ %{-n:PNAME=%{-n*}}%{!-n:PNAME=%{name}} \ DEF_VAL=%{-y:"yes"}%{!-y:"no"} \ DEL_TEMPL=%{_fillupdir}/$PNAME.del \ - # If template not in new location, fallback to old location \ - if [ ! -f $DEL_TEMPL ] ; then \ - DEL_TEMPL=/var/adm/fillup-templates/$PNAME.del \ - fi \ rm -f $DEL_TEMPL \ for var in %{?*} ; do \ echo -e "#\\n$var=$DEF_VAL\\n" >> $DEL_TEMPL \ diff --git a/rpm.changes b/rpm.changes index 2a40dae..e3b532b 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Feb 7 09:13:41 UTC 2018 - dimstar@opensuse.org + +- Update %remove_and_set: This macro needs no fallback to + /var/adm/fillup-templates, as it does not work on files provided + by the packages, but rather constructs temporary files inside + fillup_dir. + ------------------------------------------------------------------- Mon Feb 5 11:08:12 CET 2018 - mls@suse.de