From 549dab560a1f8529f651fa46c9029d8ba66799c4c12d2ffd4eac5bff00940114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Tue, 12 Nov 2024 10:15:46 +0000 Subject: [PATCH 1/2] Accepting request 1223365 from home:michals - Update to version 5.1 (bsc#1233156) * Architecture support for hppa and loongarch * Switch to xxhash for buildid recomputation (much faster!) * find-debuginfo supports -v,--verbose and -q,--quiet * find-debuginfo passes -j down to dwz * debugedit now handles Handle DWARF5 * debugedit handles compressed DWARF debug sections - Refresh debugsubpkg.patch finddebuginfo.patch - Remove upstreamed remove-bad-shift.patch OBS-URL: https://build.opensuse.org/request/show/1223365 OBS-URL: https://build.opensuse.org/package/show/Base:System/debugedit?expand=0&rev=11 --- .gitattributes | 23 ++++++++ .gitignore | 1 + debugedit-5.0.tar.xz | 3 + debugedit-5.0.tar.xz.sig | Bin 0 -> 310 bytes debugedit-5.1.tar.xz | 3 + debugedit-5.1.tar.xz.sig | Bin 0 -> 310 bytes debugedit.changes | 49 ++++++++++++++++ debugedit.keyring | Bin 0 -> 5236 bytes debugedit.spec | 82 ++++++++++++++++++++++++++ debuginfo-mono.patch | 21 +++++++ debuglink.patch | 13 +++++ debugsubpkg.patch | 45 ++++++++++++++ finddebuginfo-absolute-links.patch | 30 ++++++++++ finddebuginfo.patch | 91 +++++++++++++++++++++++++++++ remove-bad-shift.patch | 10 ++++ 15 files changed, 371 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 debugedit-5.0.tar.xz create mode 100644 debugedit-5.0.tar.xz.sig create mode 100644 debugedit-5.1.tar.xz create mode 100644 debugedit-5.1.tar.xz.sig create mode 100644 debugedit.changes create mode 100644 debugedit.keyring create mode 100644 debugedit.spec create mode 100644 debuginfo-mono.patch create mode 100644 debuglink.patch create mode 100644 debugsubpkg.patch create mode 100644 finddebuginfo-absolute-links.patch create mode 100644 finddebuginfo.patch create mode 100644 remove-bad-shift.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/debugedit-5.0.tar.xz b/debugedit-5.0.tar.xz new file mode 100644 index 0000000..287e2f9 --- /dev/null +++ b/debugedit-5.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e +size 164820 diff --git a/debugedit-5.0.tar.xz.sig b/debugedit-5.0.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..9d6f510ebc8dccba4c82bc135107f53a8f694bfff4c479129964e6598d5dd1c3 GIT binary patch literal 310 zcmV-60m=S}0W$;u0SEvc79j)@c8ZpHS&$HV4KLsPSL4jA*_wC-0$~3@B>)Nu5d2r; z%&gg(csU6N|7oJ<+IM~{BVe4G`PRHX?9D}Pp|9lMKdnN|zg8u*|KSVveef(pJRt2& zrS$GJYd~R`-u#+Rx?k5XOF6j8QR@p(Kc?84el=P*KGbPaMl)~Rs_+D#eV9%N!4*Z& zxD_nC$|$jU5~DinRn+_IIP zt|(`9jTPCk_W4(y$;yge*Tbe0PMYFozLFm@TR#Ws?M=CLNGD?>+%trzE1%v0^|pA2 zXsL-c$^Y49?;mnxq0|~S?yzDkh~5c+*#ah84GRy1;DWutV_BZ + +- Update to version 5.1 (bsc#1233156) + * Architecture support for hppa and loongarch + * Switch to xxhash for buildid recomputation (much faster!) + * find-debuginfo supports -v,--verbose and -q,--quiet + * find-debuginfo passes -j down to dwz + * debugedit now handles Handle DWARF5 + * debugedit handles compressed DWARF debug sections +- Refresh debugsubpkg.patch finddebuginfo.patch +- Remove upstreamed remove-bad-shift.patch + +------------------------------------------------------------------- +Wed Nov 16 07:28:09 UTC 2022 - Ludwig Nussel + +- don't hard require gdb (boo#1205344) + +------------------------------------------------------------------- +Sun Sep 4 10:29:29 UTC 2022 - Andreas Stieger + +- finddebuginfo.patch: convert obsolete egrep to grep -E + (boo#1203092) + +------------------------------------------------------------------- +Wed Jul 6 12:43:49 UTC 2022 - Ludwig Nussel + +- move find-debuginfo and sepdebugcrcfix which are basically tools + for use by rpmbuild only to /usr/lib/rpm where they used to be + when debugedit was bundled with rpm. + +------------------------------------------------------------------- +Mon Jun 27 11:36:59 UTC 2022 - Ludwig Nussel + +- refresh patches to apply clean +- add git url +- add requires + +------------------------------------------------------------------- +Wed Jun 30 13:06:47 UTC 2021 - Callum Farmer + +- initial version 5.0 +- Added patches from rpm: + * finddebuginfo.patch + * finddebuginfo-absolute-links.patch + * debugsubpkg.patch + * debuglink.patch + * debuginfo-mono.patch +- Add patch to fix bad shift: remove-bad-shift.patch diff --git a/debugedit.keyring b/debugedit.keyring new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..e58d47598c64678cc93ecd7996ec7fe1c8d6a767d1f26786a25884feeb57e43e GIT binary patch literal 5236 zcma);WmFW5wuYG@hYl%+7)nyQTN;LL25@Lly1N7cDFKmgK@gBmNy(uVgkk6qkWT5i zo?7=?>)w0r`McNtwb%2!`^^LrV3^5EPXdV1+WXh%VAri~0syPIZ66z-@2{^0YLGgs zE3H4@lTGoSLbCEL%70)B#rv?rANxI#+F6?1P9#C?7MB}wOvBq#CU?q5B`7~CA>PPl( zyQnw(IrzE?G2By zU!;y$G~aD$?^`ACIpz-kq>%s%+vr8YRGwrQ=SSyoA!s|{G3)P&0PmvY6`YVSyo*yq z!EZ+~BQuxsLhml+t+P>t)R>7Gq07V(CA?^41~Upl-f)233WRC0^0w&ut{X>_n>4EC zG-bsJ4IC}v)T6sJ+OE4-H&t?k(l&&rJQm_(NOxcsJ zu;F_P340-YXW6{5(=L^ncXWf)wK}-E`!K;{M81tveK=fivk=KVi$|FKnsLGruKY5o zw!?NsXh6Uo@q@d-s0Mp|1$BxkcHNe_#|m3Q|5_$7Kk@?mf=iV1N=atoAYr|e1z@!M zeT~*sj6(YNZE&|-2qbttcB1;H*mrVzPt*$J!{w8~jn`gVyBaW_*z0oH986f^-A_x` zxE_F-gva1V^-9EprbB`Kx5nJ@4Kxw}8lZtr!_vbMV)Vk+$rr0YnD?=>R~=Ff?2c@xPXTr4Zfom7_{!Q#4eh``!0LU{z@84v7wn#RHd1 z;gTb3qjsWr9PhB~&>{korL6t*_V@&i1?2rFLb6pk3(+yKM0tpc+3DC$5yGh?EU%bnxI%x z>jU>gPcg#ViZz5(D+AL)5A@Ce$DhuK{a&-R8#ny;pr_zTL`{N;nX~ic1;likyiPTnf92nlTKojCe??3x zS~x^?!r0Cc>kKTk98+2u=y!5jcwaOHf6^=;T}&x1T14p+UbXp(uR$e0i$T*36tAEy z!NJ_x*%G?tjE~eJWs@Vh8s5AVCvQKMjw?kUh-^EB+E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Wy3-HxZwqS0=3H?}(V*>Qj0|Fwy2Kx>Xi;<|C4f2%=A|~T zYa-k13P+;)OL89uZ5h|B=Uw@I1K8f6IDfU05Fu(7Ad;s{+NZsA6(g&)8MDSO1cXRF zXCxMIcy-lOaR^CwxKT)Ei-;+k7wp^BuE*-2gC2`I^cfyysx&Y82OL*X)F2@ zKLz?J_SU1TC#ze>%Y6rVOgHm+nrDN26ogP!=Eo#o@#^gQxWsRv^SKRsOtMLVj37Fb zw~PhT;pEn_B4j3|v`Z(nj*^4t!UNb@J5`KUrbnZe$XId7LIXm?VN1*#}QTY{57cW~$F49WJlEOe+B&s3~G{Qksk832ivkw2DAt!PRUpbr>+628r-a-7#4S|bIVN=NfC zLt+Y%t542e3T(*NK396ysbB5w(h{{c|Lr8kk`&TGx90K#7%yaDa$cI+(?9p*)bl_7 z<84JiFyya)oSvHK!Hr{$g!!1rgGO2qf*U+uNDvYCOM`L zF@IW3&6*o#xO>0 zw*I<$p(Ja@Zp)A$W3N|4tPkrY%UqaA$dE8NFH{brkj^SK?{*mNn^K7HQK5v|vyL<#URb2=&1 +-find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*" -type l -print | +-while read f +-do +- t=$(readlink -m "$f").debug +- f=${f#$RPM_BUILD_ROOT} +- t=${t#$RPM_BUILD_ROOT} +- if [ -f "$debugdir$t" ]; then +- $verbose && echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug" +- debug_link "/usr/lib/debug$t" "${f}.debug" +- fi +-done ++# We used to make a .debug symlink for each symlink whose target ++# has a .debug file to that file. This is not necessary because ++# the debuglink section contains only the destination of those links. ++# Creating those links anyway results in debuginfo packages for ++# devel packages just because of the .so symlinks in them. ++ ++## For each symlink whose target has a .debug file, ++## make a .debug symlink to that file. ++#$quiet || echo "Creating .debug symlinks for symlinks to ELF files" 2>&1 ++#find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*" -type l -print | ++#while read f ++#do ++# t=$(readlink -m "$f").debug ++# f=${f#$RPM_BUILD_ROOT} ++# t=${t#$RPM_BUILD_ROOT} ++# if [ -f "$debugdir$t" ]; then ++# $verbose && echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug" ++# debug_link "/usr/lib/debug$t" "${f}.debug" ++# fi ++#done + + if [ -s "$SOURCEFILE" ]; then + # See also debugedit invocation. Directories must match up. diff --git a/finddebuginfo-absolute-links.patch b/finddebuginfo-absolute-links.patch new file mode 100644 index 0000000..62fe12a --- /dev/null +++ b/finddebuginfo-absolute-links.patch @@ -0,0 +1,30 @@ +From: Jan Blunck +Subject: Do the symbolic links right in the first place + +Since brp-symlink relinks symbolic links to enforce a certain policy we should +do it right in the first place. So this patch changes find-debuginfo.sh scripts +behavior to reflect that policy. + +Signed-off-by: Jan Blunck + +--- ./scripts/find-debuginfo.in.orig 2017-12-01 15:26:21.939199791 +0000 ++++ ./scripts/find-debuginfo.in 2017-12-01 15:27:03.153081225 +0000 +@@ -305,7 +305,17 @@ debug_link() + local l="/usr/lib/debug$2" + local t="$1" + echo >> "$LINKSFILE" "$l $t" +- link_relative "$t" "$l" "$RPM_BUILD_ROOT" ++ ++ # this should correspond to what brp-symlink is doing ++ case $t in ++ /usr*) ++ link_relative "$t" "$l" "$RPM_BUILD_ROOT" ++ ;; ++ *) ++ mkdir -p "$(dirname "$RPM_BUILD_ROOT$l")" && \ ++ ln -snf "$t" "$RPM_BUILD_ROOT$l" ++ ;; ++ esac + } + + get_debugfn() diff --git a/finddebuginfo.patch b/finddebuginfo.patch new file mode 100644 index 0000000..6ee0587 --- /dev/null +++ b/finddebuginfo.patch @@ -0,0 +1,91 @@ +Index: scripts/find-debuginfo.in +=================================================================== +--- scripts/find-debuginfo.in.orig ++++ scripts/find-debuginfo.in +@@ -434,12 +434,18 @@ trap 'rm -rf "$temp"' EXIT + + # Build a list of unstripped ELF files and their hardlinks + touch "$temp/primary" +-find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \ +- \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \ +- -print | LC_ALL=C sort | +-file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped.*/\1/p' | +-xargs --no-run-if-empty stat -c '%h %D_%i %n' | ++find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \( -perm /111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" -print0 | LC_ALL=C sort -z | ++xargs --no-run-if-empty -0 stat -c '%h %D_%i %n' | + while read nlinks inum f; do ++ case $(objdump -h $f 2>/dev/null | grep -E -o '(debug[\.a-z_]*|gnu.version)') in ++ *debuglink*) continue ;; ++ *debug*) ;; ++ *gnu.version*) ++ echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!" ++ continue ++ ;; ++ *) continue ;; ++ esac + if [ $nlinks -gt 1 ]; then + var=seen_$inum + if test -n "${!var}"; then +@@ -472,6 +478,8 @@ do_file() + if [ "$no_recompute_build_id" = "true" ]; then + no_recompute="-n" + fi ++ mode=$(stat -c %a "$f") ++ chmod +w "$f" + id=$(debugedit -b "$debug_base_name" -d "$debug_dest_name" \ + $no_recompute -i \ + ${build_id_seed:+--build-id-seed="$build_id_seed"} \ +@@ -503,17 +511,30 @@ do_file() + # just has its file names collected and adjusted. + case "$dn" in + /usr/lib/debug/*) ++ chmod $mode "$f" + return ;; + esac + + mkdir -p "${debugdn}" +- if test -w "$f"; then +- strip_to_debug "${debugfn}" "$f" +- else +- chmod u+w "$f" +- strip_to_debug "${debugfn}" "$f" +- chmod u-w "$f" +- fi ++ objcopy --only-keep-debug "$f" "$debugfn" || : ++ ( ++ shopt -s extglob ++ strip_option="--strip-all" ++ case "$f" in ++ *.ko) ++ strip_option="--strip-debug" ;; ++ *$STRIP_KEEP_SYMTAB*) ++ if test -n "$STRIP_KEEP_SYMTAB"; then ++ strip_option="--strip-debug" ++ fi ++ ;; ++ esac ++ if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then ++ strip_option= ++ fi ++ objcopy --add-gnu-debuglink="$debugfn" -R .comment -R .GCC.command.line $strip_option "$f" ++ chmod $mode "$f" ++ ) || : + + # strip -g implies we have full symtab, don't add mini symtab in that case. + # It only makes sense to add a minisymtab for executables and shared +@@ -689,12 +710,14 @@ if [ -s "$SOURCEFILE" ]; then + # and non-standard modes may be inherented from original directories, fixup + find "${RPM_BUILD_ROOT}${debug_dest_name}" -type d -print0 | + xargs --no-run-if-empty -0 chmod 0755 ++ find "${RPM_BUILD_ROOT}${debug_dest_name}" -type f -print0 | ++ xargs --no-run-if-empty -0 chmod a+r + fi + + if [ -d "${RPM_BUILD_ROOT}/usr/lib" ] || [ -d "${RPM_BUILD_ROOT}/usr/src" ]; then + ((nout > 0)) || + test ! -d "${RPM_BUILD_ROOT}/usr/lib" || +- (cd "${RPM_BUILD_ROOT}/usr/lib"; find debug -type d) | ++ (cd "${RPM_BUILD_ROOT}/usr/lib"; test ! -d debug || find debug -type d) | + sed 's,^,%dir /usr/lib/,' >> "$LISTFILE" + + (cd "${RPM_BUILD_ROOT}/usr" diff --git a/remove-bad-shift.patch b/remove-bad-shift.patch new file mode 100644 index 0000000..fd78b12 --- /dev/null +++ b/remove-bad-shift.patch @@ -0,0 +1,10 @@ +--- ./scripts/find-debuginfo.in.orig 2017-12-01 15:40:27.006764372 +0000 ++++ ./scripts/find-debuginfo.in 2017-12-01 15:41:17.270619182 +0000 +@@ -168,7 +168,6 @@ + ;; + --dwz-single-file-mode) + dwz_single_file_mode=true +- shift + ;; + --build-id-seed) + build_id_seed=$2 From c287d004e024bc3ad3d63fca3076cbad5750835b77f0c614c64a7db8812499f7 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 21 Nov 2024 08:40:35 +0000 Subject: [PATCH 2/2] * debugedit now handles DWARF5 - Add workaround-missing-linked-file.patch (boo#1233368) - Use -p1 with autosetup OBS-URL: https://build.opensuse.org/package/show/Base:System/debugedit?expand=0&rev=12 --- debugedit.changes | 4 +++- debugedit.spec | 3 ++- debuginfo-mono.patch | 4 ++-- debuglink.patch | 4 ++-- debugsubpkg.patch | 4 ++-- finddebuginfo-absolute-links.patch | 4 ++-- finddebuginfo.patch | 4 ++-- workaround-missing-linked-file.patch | 20 ++++++++++++++++++++ 8 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 workaround-missing-linked-file.patch diff --git a/debugedit.changes b/debugedit.changes index a8a38e1..e0ab680 100644 --- a/debugedit.changes +++ b/debugedit.changes @@ -6,10 +6,12 @@ Mon Nov 11 08:23:09 UTC 2024 - Michal Suchanek * Switch to xxhash for buildid recomputation (much faster!) * find-debuginfo supports -v,--verbose and -q,--quiet * find-debuginfo passes -j down to dwz - * debugedit now handles Handle DWARF5 + * debugedit now handles DWARF5 * debugedit handles compressed DWARF debug sections - Refresh debugsubpkg.patch finddebuginfo.patch - Remove upstreamed remove-bad-shift.patch +- Add workaround-missing-linked-file.patch (boo#1233368) +- Use -p1 with autosetup ------------------------------------------------------------------- Wed Nov 16 07:28:09 UTC 2022 - Ludwig Nussel diff --git a/debugedit.spec b/debugedit.spec index 756389d..902f26c 100644 --- a/debugedit.spec +++ b/debugedit.spec @@ -32,6 +32,7 @@ Patch1: finddebuginfo-absolute-links.patch Patch2: debugsubpkg.patch Patch3: debuglink.patch Patch4: debuginfo-mono.patch +Patch5: workaround-missing-linked-file.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: help2man @@ -55,7 +56,7 @@ debugedit provides programs and scripts for creating debuginfo and source file d collect build-ids and rewrite source paths in DWARF data for debugging, tracing and profiling. %prep -%autosetup -p0 +%autosetup -p1 %build autoreconf -fiv diff --git a/debuginfo-mono.patch b/debuginfo-mono.patch index 7952fca..ea93093 100644 --- a/debuginfo-mono.patch +++ b/debuginfo-mono.patch @@ -1,7 +1,7 @@ Index: scripts/find-debuginfo.in =================================================================== ---- scripts/find-debuginfo.in.orig -+++ scripts/find-debuginfo.in +--- a/scripts/find-debuginfo.in ++++ b/scripts/find-debuginfo.in @@ -434,6 +434,16 @@ while read nlinks inum f; do ;; *) continue ;; diff --git a/debuglink.patch b/debuglink.patch index bfd58dd..dc24616 100644 --- a/debuglink.patch +++ b/debuglink.patch @@ -1,7 +1,7 @@ Index: scripts/find-debuginfo.in =================================================================== ---- scripts/find-debuginfo.in.orig -+++ scripts/find-debuginfo.in +--- a/scripts/find-debuginfo.in ++++ b/scripts/find-debuginfo.in @@ -407,7 +407,7 @@ debug_link() get_debugfn() { diff --git a/debugsubpkg.patch b/debugsubpkg.patch index 4ee0b33..df71d72 100644 --- a/debugsubpkg.patch +++ b/debugsubpkg.patch @@ -1,7 +1,7 @@ Index: scripts/find-debuginfo.in =================================================================== ---- scripts/find-debuginfo.in.orig -+++ scripts/find-debuginfo.in +--- a/scripts/find-debuginfo.in ++++ b/scripts/find-debuginfo.in @@ -684,20 +684,26 @@ if $run_dwz \ fi fi diff --git a/finddebuginfo-absolute-links.patch b/finddebuginfo-absolute-links.patch index 62fe12a..61cfcec 100644 --- a/finddebuginfo-absolute-links.patch +++ b/finddebuginfo-absolute-links.patch @@ -7,8 +7,8 @@ behavior to reflect that policy. Signed-off-by: Jan Blunck ---- ./scripts/find-debuginfo.in.orig 2017-12-01 15:26:21.939199791 +0000 -+++ ./scripts/find-debuginfo.in 2017-12-01 15:27:03.153081225 +0000 +--- a/scripts/find-debuginfo.in 2017-12-01 15:26:21.939199791 +0000 ++++ b/scripts/find-debuginfo.in 2017-12-01 15:27:03.153081225 +0000 @@ -305,7 +305,17 @@ debug_link() local l="/usr/lib/debug$2" local t="$1" diff --git a/finddebuginfo.patch b/finddebuginfo.patch index 6ee0587..f8c8eb9 100644 --- a/finddebuginfo.patch +++ b/finddebuginfo.patch @@ -1,7 +1,7 @@ Index: scripts/find-debuginfo.in =================================================================== ---- scripts/find-debuginfo.in.orig -+++ scripts/find-debuginfo.in +--- a/scripts/find-debuginfo.in ++++ b/scripts/find-debuginfo.in @@ -434,12 +434,18 @@ trap 'rm -rf "$temp"' EXIT # Build a list of unstripped ELF files and their hardlinks diff --git a/workaround-missing-linked-file.patch b/workaround-missing-linked-file.patch new file mode 100644 index 0000000..f6b7b57 --- /dev/null +++ b/workaround-missing-linked-file.patch @@ -0,0 +1,20 @@ +Previously this error was ignored but now return value of parallel jobs is +propagated, and missing this file fails package build. + +It is not clear if this is the correct fix (ie the file accumulates link data, +and initially is missing because no data is accumulated yet) or if this should +have been created elsewhere. + +Index: debugedit-5.1/scripts/find-debuginfo.in +=================================================================== +--- debugedit-5.1.orig/scripts/find-debuginfo.in ++++ debugedit-5.1/scripts/find-debuginfo.in +@@ -578,7 +578,7 @@ do_file() + # If this file has multiple links, make the corresponding .debug files + # all links to one file too. + if [ $nlinks -gt 1 ]; then +- grep "^$inum " "$temp/linked" | while read inum linked; do ++ { grep -s "^$inum " "$temp/linked" ||: ; } | while read inum linked; do + link=$debugfn + get_debugfn "$linked" + $verbose && echo "hard linked $link to $debugfn"