diff --git a/finddebuginfo-check-res-file.patch b/finddebuginfo-check-res-file.patch new file mode 100644 index 0000000..2450058 --- /dev/null +++ b/finddebuginfo-check-res-file.patch @@ -0,0 +1,30 @@ +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 | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh +index 081e24148..e0c36ebb6 100755 +--- a/scripts/find-debuginfo.sh ++++ b/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 14d0787..a67ee65 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 + ------------------------------------------------------------------- Fri Oct 2 15:20:13 UTC 2020 - Callum Farmer diff --git a/rpm.spec b/rpm.spec index 4d2e11a..53e9064 100644 --- a/rpm.spec +++ b/rpm.spec @@ -73,6 +73,8 @@ Source12: baselibs.conf Source13: rpmconfigcheck.service Patch2: db.diff Patch5: usr-lib-sysimage-rpm.patch +# PATCH-FIX-UPSTREAM - https://github.com/rpm-software-management/rpm/pull/1391 +Patch6: finddebuginfo-check-res-file.patch # quilt patches start here Patch11: debugedit.diff Patch13: ignore-auxv.diff @@ -239,6 +241,7 @@ rm -f rpmdb/db.h cp config.guess config.sub db/dist/ %endif %patch5 -p1 +%patch6 -p1 %patch -P 11 -P 12 -P 13 -P 15 -P 16 -P 18 %patch -P 20 -P 21 -P 24 -P 25 -P 26 -P 27 -P 29 %patch -P 30 -P 32 -P 33 -P 34 -P 35 -P 36 -P 38