Hello community,

here is the log from the commit of package rpm for openSUSE:Factory checked in 
at 2020-10-22 14:19:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rpm (Old)
 and      /work/SRC/openSUSE:Factory/.rpm.new.3463 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rpm"

Thu Oct 22 14:19:52 2020 rev:283 rq:842515 version:4.15.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/rpm/rpm.changes  2020-08-25 09:31:31.343957486 
+0200
+++ /work/SRC/openSUSE:Factory/.rpm.new.3463/rpm.changes        2020-10-22 
14:19:55.178622969 +0200
@@ -1,0 +2,12 @@
+Mon Oct 19 11:53:00 CEST 2020 - m...@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 <guillaume.gar...@opensuse.org>
+
+- Add patch to fix finddebuginfo when no res.* file are found:
+  * finddebuginfo-check-res-file.patch
+
+-------------------------------------------------------------------

New:
----
  finddebuginfo-check-res-file.patch
  touch_backport.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rpm.spec ++++++
--- /var/tmp/diff_new_pack.nyaFGm/_old  2020-10-22 14:19:57.782625307 +0200
+++ /var/tmp/diff_new_pack.nyaFGm/_new  2020-10-22 14:19:57.786625311 +0200
@@ -134,6 +134,8 @@
 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 @@
 %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

++++++ finddebuginfo-check-res-file.patch ++++++
>From a20edbb561f74ba608c0aa36be637e7245e596b5 Mon Sep 17 00:00:00 2001
From: ggardet <guillaume.gar...@opensuse.org>
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
++++++ touch_backport.diff ++++++
--- ./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);
+       }
+    }
 }
 
 /**

Reply via email to