From 89e3f8b764d3c38c1f1424bc63ebd263710f3215 Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Thu, 29 Apr 2021 21:50:16 +0300 Subject: [PATCH] Use system provided debugedit Debugedit is split into a separate package, use it. References: https://sourceware.org/bugzilla/show_bug.cgi?id=27351 http://lists.rpm.org/pipermail/rpm-ecosystem/2021-February/000734.html https://sourceware.org/debugedit/ --- rpm-4_0.spec | 1 + scripts/find-debuginfo-files.in | 2 +- scripts/process-debuginfo.in | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rpm-4_0.spec b/rpm-4_0.spec index dd23153..49c91a1 100644 --- a/rpm-4_0.spec +++ b/rpm-4_0.spec @@ -92,6 +92,7 @@ BuildPreReq: rpm >= 3.0.6-ipl24mdk, %_bindir/subst # For debugedit. BuildPreReq: elfutils-devel BuildRequires: librpm-devel +BuildRequires: debugedit # Automatically added by buildreq on Thu Apr 23 2009 and edited manually. BuildRequires: libdb4.7-devel libelf-devel liblzma-devel libpopt-devel zlib-devel diff --git a/scripts/find-debuginfo-files.in b/scripts/find-debuginfo-files.in index 95a91dd..150c1d9 100755 --- a/scripts/find-debuginfo-files.in +++ b/scripts/find-debuginfo-files.in @@ -65,7 +65,7 @@ while read -r f; do # Save canonical file name for later symlinks filtering. readlink -ve "$debugf" >> .tmp/files-can - id=$(@RPMCONFIGDIR@/debugedit -n -i "$debugf") + id=$(debugedit -n -i "$debugf") [ -n "$id" ] || continue link=./usr/lib/debug/.build-id/${id:0:2}/${id:2} diff --git a/scripts/process-debuginfo.in b/scripts/process-debuginfo.in index e471ad3..71c27a7 100755 --- a/scripts/process-debuginfo.in +++ b/scripts/process-debuginfo.in @@ -62,7 +62,7 @@ for pat in ${RPM_BRP_STRIP_NONE-}; do done timestamp=$(date --iso-8601=ns --reference="$f") -@RPMCONFIGDIR@/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l .tmp/src.$$ "$f" +debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l .tmp/src.$$ "$f" if [ ! -s .tmp/src.$$ ] && [ -x /usr/bin/eu-elfcompress ]; then # debugedit has failed to extract sources list, possibly # due to ELF compression - uncompress and try again. @@ -78,7 +78,7 @@ if [ ! -s .tmp/src.$$ ] && [ -x /usr/bin/eu-elfcompress ]; then rm .tmp/sections.$$ if [ -n "$zmode" ]; then LD_ORIGIN_PATH=/usr/bin eu-elfcompress --type=none "$f" - @RPMCONFIGDIR@/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l .tmp/src.$$ "$f" + debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l .tmp/src.$$ "$f" LD_ORIGIN_PATH=/usr/bin eu-elfcompress --type=$zmode "$f" fi fi