From a319351e7b7c6c19e3310ba99840d6e6bdc0a0a7 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 28 Mar 2018 16:05:40 +0300 Subject: [PATCH] Update to 4.13.1 --- .gitignore | 1 + ...LBACK_ELEM_PROGRESS-available-header.patch | 95 ---------------- rpm-4.13.x-writable-tmp-dir.patch | 106 ------------------ rpm.spec | 10 +- sources | 2 +- 5 files changed, 6 insertions(+), 208 deletions(-) delete mode 100644 rpm-4.13.x-RPMCALLBACK_ELEM_PROGRESS-available-header.patch delete mode 100644 rpm-4.13.x-writable-tmp-dir.patch diff --git a/.gitignore b/.gitignore index a56e0ea..f290fc4 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /rpm-4.13.0.tar.bz2 /rpm-4.13.0.1.tar.bz2 /rpm-4.13.0.2.tar.bz2 +/rpm-4.13.1.tar.bz2 diff --git a/rpm-4.13.x-RPMCALLBACK_ELEM_PROGRESS-available-header.patch b/rpm-4.13.x-RPMCALLBACK_ELEM_PROGRESS-available-header.patch deleted file mode 100644 index 12137e5..0000000 --- a/rpm-4.13.x-RPMCALLBACK_ELEM_PROGRESS-available-header.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 73c9bab57f9d1a5176744b833e00205e4e5a7238 Mon Sep 17 00:00:00 2001 -From: Florian Festi -Date: Tue, 22 Nov 2016 09:10:26 +0100 -Subject: [PATCH] Move RPMCALLBACK_ELEM_PROGRESS to rpmteProcess to have header - available - -The header of the rpmte is only available after rpmteOpen(). -Added num param to rpmteProcess to be able to signal the progress to the -callback. - -(cherry picked from commit 124ed29259b05fdf574d5e3e145bc1201b24ae4d) ---- - lib/rpmte.c | 7 ++++++- - lib/rpmte_internal.h | 2 +- - lib/transaction.c | 8 +++----- - 3 files changed, 10 insertions(+), 7 deletions(-) - -diff --git a/lib/rpmte.c b/lib/rpmte.c -index 248956cf0..d571d7fd4 100644 ---- a/lib/rpmte.c -+++ b/lib/rpmte.c -@@ -737,7 +737,7 @@ rpmfs rpmteGetFileStates(rpmte te) - return te->fs; - } - --int rpmteProcess(rpmte te, pkgGoal goal) -+int rpmteProcess(rpmte te, pkgGoal goal, int num) - { - /* Only install/erase resets pkg file info */ - int scriptstage = (goal != PKG_INSTALL && goal != PKG_ERASE); -@@ -753,6 +753,11 @@ int rpmteProcess(rpmte te, pkgGoal goal) - } - - if (rpmteOpen(te, reset_fi)) { -+ if (!scriptstage) { -+ rpmtsNotify(te->ts, te, RPMCALLBACK_ELEM_PROGRESS, num, -+ rpmtsMembers(te->ts)->orderCount); -+ } -+ - failed = rpmpsmRun(te->ts, te, goal); - rpmteClose(te, reset_fi); - } -diff --git a/lib/rpmte_internal.h b/lib/rpmte_internal.h -index 464f47628..a5a991ec5 100644 ---- a/lib/rpmte_internal.h -+++ b/lib/rpmte_internal.h -@@ -58,7 +58,7 @@ RPM_GNUC_INTERNAL - FD_t rpmtePayload(rpmte te); - - RPM_GNUC_INTERNAL --int rpmteProcess(rpmte te, pkgGoal goal); -+int rpmteProcess(rpmte te, pkgGoal goal, int num); - - RPM_GNUC_INTERNAL - void rpmteAddProblem(rpmte te, rpmProblemType type, -diff --git a/lib/transaction.c b/lib/transaction.c -index 4f90782ac..31308d10c 100644 ---- a/lib/transaction.c -+++ b/lib/transaction.c -@@ -1194,11 +1194,12 @@ static int runTransScripts(rpmts ts, pkgGoal goal) - rpmte p; - rpmtsi pi = rpmtsiInit(ts); - rpmElementTypes types = TR_ADDED; -+ int i = 0; - if (goal == PKG_TRANSFILETRIGGERUN) - types = TR_REMOVED; - - while ((p = rpmtsiNext(pi, types)) != NULL) { -- rc += rpmteProcess(p, goal); -+ rc += rpmteProcess(p, goal, i++); - } - rpmtsiFree(pi); - return rc; -@@ -1345,7 +1346,6 @@ exit: - static int rpmtsProcess(rpmts ts) - { - rpmtsi pi; rpmte p; -- tsMembers tsmem = rpmtsMembers(ts); - int rc = 0; - int i = 0; - -@@ -1353,12 +1353,10 @@ static int rpmtsProcess(rpmts ts) - while ((p = rpmtsiNext(pi, 0)) != NULL) { - int failed; - -- rpmtsNotify(ts, NULL, RPMCALLBACK_ELEM_PROGRESS, i++, -- tsmem->orderCount); - rpmlog(RPMLOG_DEBUG, "========== +++ %s %s-%s 0x%x\n", - rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p)); - -- failed = rpmteProcess(p, rpmteType(p)); -+ failed = rpmteProcess(p, rpmteType(p), i++); - if (failed) { - rpmlog(RPMLOG_ERR, "%s: %s %s\n", rpmteNEVRA(p), - rpmteTypeString(p), failed > 1 ? _("skipped") : _("failed")); diff --git a/rpm-4.13.x-writable-tmp-dir.patch b/rpm-4.13.x-writable-tmp-dir.patch deleted file mode 100644 index 63a8c4a..0000000 --- a/rpm-4.13.x-writable-tmp-dir.patch +++ /dev/null @@ -1,106 +0,0 @@ -commit c707ab26362e795d3f9dba4eb87dc7ed99a28bcb -Author: Robin Lee -Date: Sat Apr 8 21:21:39 2017 +0800 - - Fix non-standard inherented modes of directories in debuginfo - - In case that binary compiled from source generated in /tmp, a - /usr/src/debug/tmp directory will be created with the same mode as - /tmp, a.k.a 777, which should be avoided. - - Fixes: rhbz#641022 - -diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh -old mode 100644 -new mode 100755 -index 547dbd9..6f38e19 ---- a/scripts/find-debuginfo.sh -+++ b/scripts/find-debuginfo.sh -@@ -396,9 +396,10 @@ - mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug" - LC_ALL=C sort -z -u "$SOURCEFILE" | grep -E -v -z '(|)$' | - (cd "$RPM_BUILD_DIR"; cpio -pd0mL "${RPM_BUILD_ROOT}/usr/src/debug") -- # stupid cpio creates new directories in mode 0700, fixup -+ # stupid cpio creates new directories in mode 0700, -+ # and non-standard modes may be inherented from original directories, fixup - find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 | -- xargs --no-run-if-empty -0 chmod a+rx -+ xargs --no-run-if-empty -0 chmod 0755 - fi - - if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; then - -commit e795899780337dea751d85db8f381eff3fe75275 -Author: Mark Wielaard -Date: Fri Apr 21 17:33:26 2017 +0200 - - debugedit: Only output comp_dir under build dir (once). - - The fix for rhbz#444310 (commit c1a5eb - Include empty CU current dirs) - was a little greedy. It would also include comp_dirs outside the build - root. Those are unnecessary and we don't have a good way to store them. - Such dirs (e.g. /tmp) would then show up at the root of /usr/src/debug. - - Fix this by including only comp_dirs under base_dir. Also only output - all dirs once (during phase zero) and don't output empty dirs (which - was harmless but would produce a warning from cpio). - - This still includes all empty dirs from the original rhbz#444310 - nodir testcase and it is an alternative fix for rhbz#641022 - (commit c707ab). - - Both fixes are necessary in case of an unexpected mode for a directory - actually in the build root that we want to include in the source list. - - Signed-off-by: Mark Wielaard - -diff --git a/tools/debugedit.c b/tools/debugedit.c -index 8444e03..bf11513 100644 ---- a/tools/debugedit.c -+++ b/tools/debugedit.c -@@ -926,27 +926,29 @@ - /* Ensure the CU current directory will exist even if only empty. Source - filenames possibly located in its parent directories refer relatively to - it and the debugger (GDB) cannot safely optimize out the missing -- CU current dir subdirectories. */ -- if (comp_dir && list_file_fd != -1) -+ CU current dir subdirectories. Only do this once in phase one. And -+ only do this for dirs under our build/base_dir. Don't output the -+ empty string (in case the comp_dir == base_dir). */ -+ if (phase == 0 && base_dir && comp_dir && list_file_fd != -1) - { - char *p; - size_t size; - -- if (base_dir && has_prefix (comp_dir, base_dir)) -- p = comp_dir + strlen (base_dir); -- else if (dest_dir && has_prefix (comp_dir, dest_dir)) -- p = comp_dir + strlen (dest_dir); -- else -- p = comp_dir; -- -- size = strlen (p) + 1; -- while (size > 0) -+ if (has_prefix (comp_dir, base_dir)) - { -- ssize_t ret = write (list_file_fd, p, size); -- if (ret == -1) -- break; -- size -= ret; -- p += ret; -+ char *p = comp_dir + strlen (base_dir); -+ if (p[0] != '\0') -+ { -+ size_t size = strlen (p) + 1; -+ while (size > 0) -+ { -+ ssize_t ret = write (list_file_fd, p, size); -+ if (ret == -1) -+ break; -+ size -= ret; -+ p += ret; -+ } -+ } - } - } - diff --git a/rpm.spec b/rpm.spec index 610109e..67989d1 100644 --- a/rpm.spec +++ b/rpm.spec @@ -17,7 +17,7 @@ %define rpmhome /usr/lib/rpm -%global rpmver 4.13.0.2 +%global rpmver 4.13.1 #global snapver rc2 %global srcver %{version}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(v=%{version}; echo ${v%.*}.x)} @@ -64,15 +64,10 @@ Patch140: rpm-4.13.x-brp-python-bytecompile-Python3-only.patch # Upstream PR: https://github.com/rpm-software-management/rpm/pull/154 # rhbz#1421776 Patch141: rpm-4.13.x-pythondistdeps.py-fix-processing-wheels.patch -# https://github.com/rpm-software-management/rpm/commit/124ed29259b05fdf574d5e3e145bc1201b24ae4d -Patch143: rpm-4.13.x-RPMCALLBACK_ELEM_PROGRESS-available-header.patch # Fedora-specific (python3) patch (RHBZ #1405483) Patch200: rpm-4.13.x-pythondistdeps-python3.patch -# World writable empty (tmp) dirs in debuginfo packages (#641022) -Patch280: rpm-4.13.x-writable-tmp-dir.patch - # These are not yet upstream Patch302: rpm-4.7.1-geode-i686.patch # Probably to be upstreamed in slightly different form @@ -573,6 +568,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Wed Mar 28 2018 Panu Matilainen - 4.13.1-1 +- Update to 4.13.1 (http://rpm.org/wiki/Releases/4.13.1) + * Thu Oct 26 2017 Panu Matilainen - 4.13.0.2-1 - Update to 4.13.0.2 ((http://rpm.org/wiki/Releases/4.13.0.2) diff --git a/sources b/sources index 8bf4a58..d2c3fd8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rpm-4.13.0.2.tar.bz2) = 9b15acb2684bc963f7164763568615b2484478eaec0cea8b3bd4ddb94b862a70b2f4b4ab432d896e5885c9a191c4d7d2ede573a5feabc8ec290108956a8a4917 +SHA512 (rpm-4.13.1.tar.bz2) = 3aa3fc6ec0c2199058708f24b42672db831a96c89981bca1669b2e39c2427f0afb7ec36075e47aebecf4ff3627434f4ca47ba617b6f552c85e7bfde5c6f5c647