Accepting request 1225465 from Base:System

OBS-URL: https://build.opensuse.org/request/show/1225465
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/debugedit?expand=0&rev=6
This commit is contained in:
Ana Guerrero 2024-11-22 22:51:14 +00:00 committed by Git OBS Bridge
commit d6376d2feb
13 changed files with 63 additions and 35 deletions

BIN
debugedit-5.0.tar.xz (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

3
debugedit-5.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee9b688b2ed8fa62551c54cb5dc31aaa05853e7dedbd9e1237c77894ea5e3626
size 186320

BIN
debugedit-5.1.tar.xz.sig Normal file

Binary file not shown.

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Mon Nov 11 08:23:09 UTC 2024 - Michal Suchanek <msuchanek@suse.de>
- 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 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 <lnussel@suse.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package debugedit
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: debugedit
Version: 5.0
Version: 5.1
Release: 0
Summary: Debuginfo extraction
License: GPL-3.0-or-later
@ -32,12 +32,13 @@ Patch1: finddebuginfo-absolute-links.patch
Patch2: debugsubpkg.patch
Patch3: debuglink.patch
Patch4: debuginfo-mono.patch
Patch5: remove-bad-shift.patch
Patch5: workaround-missing-linked-file.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: help2man
BuildRequires: pkgconfig(libdw)
BuildRequires: pkgconfig(libelf)
BuildRequires: pkgconfig(libxxhash)
# /usr/bin/gdb-add-index is optional
Suggests: gdb
Requires: binutils
@ -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

View File

@ -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 ;;

View File

@ -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()
{

View File

@ -1,13 +1,14 @@
Index: scripts/find-debuginfo.in
===================================================================
--- scripts/find-debuginfo.in.orig
+++ scripts/find-debuginfo.in
@@ -643,19 +643,25 @@ if $run_dwz \
--- a/scripts/find-debuginfo.in
+++ b/scripts/find-debuginfo.in
@@ -684,20 +684,26 @@ if $run_dwz \
fi
fi
-# 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
@ -15,7 +16,7 @@ Index: scripts/find-debuginfo.in
- f=${f#$RPM_BUILD_ROOT}
- t=${t#$RPM_BUILD_ROOT}
- if [ -f "$debugdir$t" ]; then
- echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug"
- $verbose && echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug"
- debug_link "/usr/lib/debug$t" "${f}.debug"
- fi
-done
@ -27,6 +28,7 @@ Index: scripts/find-debuginfo.in
+
+## 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
@ -34,7 +36,7 @@ Index: scripts/find-debuginfo.in
+# f=${f#$RPM_BUILD_ROOT}
+# t=${t#$RPM_BUILD_ROOT}
+# if [ -f "$debugdir$t" ]; then
+# echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug"
+# $verbose && echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug"
+# debug_link "/usr/lib/debug$t" "${f}.debug"
+# fi
+#done

View File

@ -7,8 +7,8 @@ behavior to reflect that policy.
Signed-off-by: Jan Blunck <jblunck@suse.de>
--- ./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"

View File

@ -1,8 +1,8 @@
Index: scripts/find-debuginfo.in
===================================================================
--- scripts/find-debuginfo.in.orig
+++ scripts/find-debuginfo.in
@@ -412,12 +412,18 @@ trap 'rm -rf "$temp"' EXIT
--- 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
touch "$temp/primary"
@ -26,16 +26,16 @@ Index: scripts/find-debuginfo.in
if [ $nlinks -gt 1 ]; then
var=seen_$inum
if test -n "${!var}"; then
@@ -450,6 +456,8 @@ do_file()
@@ -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=$(${install_dir}/debugedit -b "$debug_base_name" -d "$debug_dest_name" \
id=$(debugedit -b "$debug_base_name" -d "$debug_dest_name" \
$no_recompute -i \
${build_id_seed:+--build-id-seed="$build_id_seed"} \
@@ -477,17 +485,30 @@ do_file()
@@ -503,17 +511,30 @@ do_file()
# just has its file names collected and adjusted.
case "$dn" in
/usr/lib/debug/*)
@ -73,7 +73,7 @@ Index: scripts/find-debuginfo.in
# 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
@@ -646,12 +667,14 @@ if [ -s "$SOURCEFILE" ]; then
@@ -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

View File

@ -1,10 +0,0 @@
--- ./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

View File

@ -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"