diff --git a/fileattrs/debuginfo.attr b/fileattrs/debuginfo.attr index 03f453843..92c516c71 100644 --- a/fileattrs/debuginfo.attr +++ b/fileattrs/debuginfo.attr @@ -1,2 +1,6 @@ -%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov -%__debuginfo_path ^/usr/lib/debug/ +%__debuginfo_provides() %{lua: + local file = rpm.expand("%1") + local b1, b2 = file:match("/([0-9a-f]+)/([0-9a-f]+)\.debug$") + print(string.format("debuginfo(build-id) = %s%s\\n", b1, b2)) +} +%__debuginfo_path ^/usr/lib/debug/.build-id/[^/]+/[^/]+\\.debug$ diff --git a/scripts/Makefile.am b/scripts/Makefile.am index b4160e099..f2788ccf3 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -11,7 +11,6 @@ EXTRA_DIST = \ brp-strip-shared brp-strip-static-archive \ check-files check-prereqs \ check-buildroot check-rpaths check-rpaths-worker \ - debuginfo.prov \ find-debuginfo.sh find-lang.sh \ perl.prov perl.req pythondistdeps.py \ rpmdb_dump rpmdb_load \ @@ -29,7 +28,6 @@ rpmconfig_SCRIPTS = \ brp-strip-shared brp-strip-static-archive \ check-files check-prereqs \ check-buildroot check-rpaths check-rpaths-worker \ - debuginfo.prov \ find-lang.sh find-requires find-provides \ perl.prov perl.req pythondistdeps.py \ pkgconfigdeps.sh libtooldeps.sh \ diff --git a/scripts/debuginfo.prov b/scripts/debuginfo.prov deleted file mode 100755 index a8636c976..000000000 --- a/scripts/debuginfo.prov +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -while read instfile; do - case "$instfile" in - */usr/lib/debug/.build-id/*.debug) - if [ -f "$instfile" ]; then - BUILDID=$(echo "$instfile" | sed -ne 's|.*/usr/lib/debug/.build-id/\([0-9a-f]\+\)/\([0-9a-f]\+\)\.debug|\1\2|p') - if [ -n "$BUILDID" ]; then - echo "debuginfo(build-id) = $BUILDID" - fi - fi - ;; - esac -done