public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Add automatic provides debuginfo(build-id) = ... into debuginfo subpackages
@ 2026-11-23  9:31 Igor Gnatenko
  0 siblings, 0 replies; only message in thread
From: Igor Gnatenko @ 2026-11-23  9:31 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : 323283e27ffa86a8b1dd22361ab455ce13357b8e
            Author : Igor Gnatenko <ignatenkobrain@fedoraproject.org>
            Date   : 2017-07-12T11:04:25+02:00
            Stats  : +110/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/323283e27ffa86a8b1dd22361ab455ce13357b8e?branch=pmatilai-v6

            Log:
            Add automatic provides debuginfo(build-id) = ... into debuginfo subpackages

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>

---
diff --git a/0055-let-debuginfo-packages-provide-the-build-id.patch b/0055-let-debuginfo-packages-provide-the-build-id.patch
new file mode 100644
index 0000000..7de7aca
--- /dev/null
+++ b/0055-let-debuginfo-packages-provide-the-build-id.patch
@@ -0,0 +1,103 @@
+From 7bac47a54fef8fc01fa29865a9622677dbdfa28d Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <ignatenko@redhat.com>
+Date: Wed, 3 Aug 2016 11:14:05 +0200
+Subject: [PATCH 55/55] let debuginfo packages provide the build-id
+
+This patch lets debuginfo packages provide build-id like follows:
+
+ debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517
+
+Originally this patch was written by Jan Blunck <jblunck@suse.de>.
+
+Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
+(cherry picked from commit 95712183458748ea6cafebac1bdd5daa097d9bee)
+---
+ fileattrs/Makefile.am    |  4 ++--
+ fileattrs/debuginfo.attr |  2 ++
+ macros.in                |  3 ++-
+ scripts/Makefile.am      |  2 ++
+ scripts/debuginfo.prov   | 14 ++++++++++++++
+ 5 files changed, 22 insertions(+), 3 deletions(-)
+ create mode 100644 fileattrs/debuginfo.attr
+ create mode 100755 scripts/debuginfo.prov
+
+diff --git a/fileattrs/Makefile.am b/fileattrs/Makefile.am
+index e54395b3b..148d2ff0d 100644
+--- a/fileattrs/Makefile.am
++++ b/fileattrs/Makefile.am
+@@ -5,8 +5,8 @@ include $(top_srcdir)/rpm.am
+ fattrsdir = $(rpmconfigdir)/fileattrs
+ 
+ fattrs_DATA = \
+-	appdata.attr desktop.attr elf.attr font.attr libtool.attr perl.attr \
+-	perllib.attr pkgconfig.attr python.attr ocaml.attr script.attr \
++	appdata.attr debuginfo.attr desktop.attr elf.attr font.attr libtool.attr \
++	perl.attr perllib.attr pkgconfig.attr python.attr ocaml.attr script.attr \
+ 	mono.attr
+ 
+ EXTRA_DIST = $(fattrs_DATA)
+diff --git a/fileattrs/debuginfo.attr b/fileattrs/debuginfo.attr
+new file mode 100644
+index 000000000..03f453843
+--- /dev/null
++++ b/fileattrs/debuginfo.attr
+@@ -0,0 +1,2 @@
++%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov
++%__debuginfo_path ^/usr/lib/debug/
+diff --git a/macros.in b/macros.in
+index 2a114ccd7..962b84ade 100644
+--- a/macros.in
++++ b/macros.in
+@@ -200,7 +200,8 @@
+ %package debuginfo\
+ Summary: Debug information for package %{name}\
+ Group: Development/Debug\
+-AutoReqProv: 0\
++AutoReq: 0\
++AutoProv: 1\
+ %description debuginfo\
+ This package provides debug information for package %{name}.\
+ Debug information is useful when developing applications that use this\
+diff --git a/scripts/Makefile.am b/scripts/Makefile.am
+index 036105d63..8e60c3ce7 100644
+--- a/scripts/Makefile.am
++++ b/scripts/Makefile.am
+@@ -10,6 +10,7 @@ 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 pythondeps.sh \
+ 	rpmdb_loadcvt rpm.daily rpm.log rpm.supp rpm2cpio.sh \
+@@ -29,6 +30,7 @@ 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 pythondeps.sh \
+ 	mono-find-requires mono-find-provides \
+diff --git a/scripts/debuginfo.prov b/scripts/debuginfo.prov
+new file mode 100755
+index 000000000..a8636c976
+--- /dev/null
++++ b/scripts/debuginfo.prov
+@@ -0,0 +1,14 @@
++#!/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
+-- 
+2.13.2
+

diff --git a/rpm.spec b/rpm.spec
index 0a66e61..a59c630 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -33,7 +33,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}30%{?dist}
+Release: %{?snapver:0.%{snapver}.}31%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://ftp.rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2
@@ -142,6 +142,9 @@ Patch323: 0053-Change-mkattr-to-always-create-a-defattr-with-explic.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=1468476
 Patch330: 0054-rpmfc-fix-ternary-operator.patch
 
+# debuginfo packages should automatically provide debuginfo(build-id) = ...
+Patch331: 0055-let-debuginfo-packages-provide-the-build-id.patch
+
 # These are not yet upstream
 Patch902: rpm-4.7.1-geode-i686.patch
 # Probably to be upstreamed in slightly different form
@@ -640,6 +643,9 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Wed Jul 12 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.13.0.1-31
+- Add automatic provides debuginfo(build-id) = ... into debuginfo subpackages
+
 * Fri Jul 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.13.0.1-30
 - Fix brokeness when using %%filter_setup (RHBZ #1468476)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  9:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:31 [rpms/rpm] pmatilai-v6: Add automatic provides debuginfo(build-id) = ... into debuginfo subpackages Igor Gnatenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox