From 344f554411b5e23b8c7f3008e84c3f021f8a5dd2 Mon Sep 17 00:00:00 2001 From: mlschroe <> Date: Dec 07 2020 05:25:15 +0000 Subject: Update rpm to version 4.15.1 / rev 283 via SR 842515 https://build.opensuse.org/request/show/842515 by user mlschroe + dimstar_suse - Backport FA_TOUCH fixes from upsteam [bnc#1175025] [bnc#1177428] --- diff --git a/.files b/.files index 1a86b18..baf3244 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index 2cb7ad1..7c85aee 100644 --- a/.rev +++ b/.rev @@ -2211,4 +2211,12 @@ See bugzilla 1167537 for the gory details. * modified patch: platformin.diff 819007 + + 8a3a9aa76e6446cc92ef174ce1382112 + 4.15.1 + + dimstar_suse + - Backport FA_TOUCH fixes from upsteam [bnc#1175025] [bnc#1177428] + 842515 + diff --git a/finddebuginfo-check-res-file.patch b/finddebuginfo-check-res-file.patch new file mode 100644 index 0000000..0fbefc9 --- /dev/null +++ b/finddebuginfo-check-res-file.patch @@ -0,0 +1,25 @@ +From a20edbb561f74ba608c0aa36be637e7245e596b5 Mon Sep 17 00:00:00 2001 +From: ggardet +Date: Fri, 9 Oct 2020 13:10:09 +0200 +Subject: [PATCH] Do not fail if there is no "$temp"/res.* file + +find-debuginfo is multi-threaded and rpm runs +scripts usually with "-e" to abort on error. +If the debug-splitting tool fails, that job will abort. +But if you have X files that are problematic in the tree, +and you have X or less jobs, find-debuginfo will abort +as no single res.$number has been written. +But if you have more than X jobs, the build will succeed, +which makes the whole process random. +This commit remove this randomness. + +--- scripts/find-debuginfo.sh.orig ++++ scripts/find-debuginfo.sh +@@ -498,6 +498,7 @@ else + wait + ) + for f in "$temp"/res.*; do ++ test -f "$f" || continue + res=$(< "$f") + if [ "$res" != "0" ]; then + exit 1 diff --git a/rpm.changes b/rpm.changes index 3386b4a..b0a9f2a 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,4 +1,16 @@ ------------------------------------------------------------------- +Mon Oct 19 11:53:00 CEST 2020 - mls@suse.de + +- Backport FA_TOUCH fixes from upsteam [bnc#1175025] [bnc#1177428] + * new patch: touch_backport.diff + +------------------------------------------------------------------- +Fri Oct 9 13:28:33 UTC 2020 - Guillaume GARDET + +- Add patch to fix finddebuginfo when no res.* file are found: + * finddebuginfo-check-res-file.patch + +------------------------------------------------------------------- Mon Jul 6 16:35:40 CEST 2020 - Martin Liška - Default to zstd compression (level 19). diff --git a/rpm.spec b/rpm.spec index 1fcac83..8bea542 100644 --- a/rpm.spec +++ b/rpm.spec @@ -134,6 +134,8 @@ Patch122: db_conversion.diff Patch123: initgcrypt.diff Patch124: gcryptdsa2.diff Patch125: ndb_backport2.diff +Patch126: touch_backport.diff +Patch127: finddebuginfo-check-res-file.patch Patch6464: auto-config-update-aarch64-ppc64le.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -259,6 +261,7 @@ cp config.guess config.sub db/dist/ %patch -P 100 -P 102 -P 103 %patch -P 109 -P 117 %patch -P 118 -P 119 -P 120 -P 121 -P 122 -P 123 -P 124 -P 125 +%patch -P 126 -P 127 %ifarch aarch64 ppc64le riscv64 %patch6464 diff --git a/touch_backport.diff b/touch_backport.diff new file mode 100644 index 0000000..1d753f7 --- /dev/null +++ b/touch_backport.diff @@ -0,0 +1,64 @@ +--- ./lib/fsm.c.orig 2019-06-26 14:17:31.407985702 +0000 ++++ ./lib/fsm.c 2020-10-19 09:49:02.709129763 +0000 +@@ -926,10 +926,6 @@ int rpmPackageFilesInstall(rpmts ts, rpm + if (!skip) { + int setmeta = 1; + +- /* When touching we don't need any of this... */ +- if (action == FA_TOUCH) +- goto touch; +- + /* Directories replacing something need early backup */ + if (!suffix) { + rc = fsmBackup(fi, action); +@@ -941,6 +937,17 @@ int rpmPackageFilesInstall(rpmts ts, rpm + rc = RPMERR_ENOENT; + } + ++ /* See if the file was removed while our attention was elsewhere */ ++ if (rc == RPMERR_ENOENT && action == FA_TOUCH) { ++ rpmlog(RPMLOG_DEBUG, "file %s vanished unexpectedly\n", fpath); ++ action = FA_CREATE; ++ fsmDebug(fpath, action, &sb); ++ } ++ ++ /* When touching we don't need any of this... */ ++ if (action == FA_TOUCH) ++ goto touch; ++ + if (S_ISREG(sb.st_mode)) { + if (rc == RPMERR_ENOENT) { + rc = fsmMkfile(fi, fpath, files, psm, nodigest, +--- ./lib/transaction.c.orig 2020-10-19 09:47:25.761418056 +0000 ++++ ./lib/transaction.c 2020-10-19 09:48:20.837254277 +0000 +@@ -483,13 +483,6 @@ static void handleInstInstalledFile(cons + rpmfsSetAction(fs, fx, action); + } + +- /* Skip already existing files - if 'minimize_writes' is set. */ +- if ((!isCfgFile) && (rpmfsGetAction(fs, fx) == FA_UNKNOWN) && ts->min_writes) { +- if (rpmfileContentsEqual(otherFi, ofx, fi, fx)) { +- rpmfsSetAction(fs, fx, FA_TOUCH); +- } +- } +- + otherFileSize = rpmfilesFSize(otherFi, ofx); + + /* Only account for the last file of a hardlink set */ +@@ -499,6 +492,16 @@ static void handleInstInstalledFile(cons + + /* Add one to make sure the size is not zero */ + rpmfilesSetFReplacedSize(fi, fx, otherFileSize + 1); ++ ++ /* Just touch already existing files if minimize_writes is enabled */ ++ if (ts->min_writes) { ++ if ((!isCfgFile) && (rpmfsGetAction(fs, fx) == FA_UNKNOWN)) { ++ /* XXX fsm can't handle FA_TOUCH of hardlinked files */ ++ int nolinks = (nlink == 1 && rpmfilesFNlink(fi, fx) == 1); ++ if (nolinks && rpmfileContentsEqual(otherFi, ofx, fi, fx)) ++ rpmfsSetAction(fs, fx, FA_TOUCH); ++ } ++ } + } + + /**