RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1661508 - glibc: Adjust to rpm's find-debuginfo.sh changes, to keep stripping binaries [rhel-7.7]
Summary: glibc: Adjust to rpm's find-debuginfo.sh changes, to keep stripping binaries ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: glibc
Version: 7.7
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Florian Weimer
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
: 1982316 (view as bug list)
Depends On: 1661510 1663264
Blocks: 1655768 1982316
TreeView+ depends on / blocked
 
Reported: 2018-12-21 12:12 UTC by Florian Weimer
Modified: 2021-07-16 14:16 UTC (History)
12 users (show)

Fixed In Version: glibc-2.17-290.el7
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1661510 1980650 1982316 1982317 (view as bug list)
Environment:
Last Closed: 2019-08-06 12:49:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2118 0 None None None 2019-08-06 12:49:54 UTC

Internal Links: 1540653

Description Florian Weimer 2018-12-21 12:12:27 UTC
The fix for bug 1540653 has the side effect that binaries are no longer stripped because glibc.spec uses the -g option.  This adds a measurable overhead to the packages.

We need to fix this in some way, if necessary by calling strip explicitly.

This issue did not effect the glibc binaries in Red Hat Enterprise Linux 7.6 because those were built with an rpm version that did not contain the changes for bug 1540653.

Comment 2 Florian Weimer 2019-01-03 14:58:20 UTC
I tried to restore the old behavior with the current find-debuginfo.sh script, with a change like this:

diff --git a/glibc.spec b/glibc.spec
index 5a388aed..6bb329bc 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -3692,16 +3692,26 @@ ls -l $RPM_BUILD_ROOT/usr/bin/getconf
 ls -l $RPM_BUILD_ROOT/usr/libexec/getconf
 eu-readelf -hS $RPM_BUILD_ROOT/usr/bin/getconf $RPM_BUILD_ROOT/usr/libexec/getconf/*
 
-find_debuginfo_args='--strict-build-id -g'
+find_debuginfo_args='--strict-build-id'
 %ifarch %{debuginfocommonarches}
-find_debuginfo_args="$find_debuginfo_args \
+# glibc-common contains no libraries, so everything can be stripped
+# (no -g).
+bash /usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args \
   -l common.filelist -l utils.filelist -l nscd.filelist \
-  -p '.*/(sbin|libexec)/.*' \
-  -o debuginfocommon.filelist \
-  -l rpm.filelist -l nosegneg.filelist \
-"
+  -o debuginfocommon.filelist
 %endif
-eval /usr/lib/rpm/find-debuginfo.sh "$find_debuginfo_args" -o debuginfo.filelist
+
+# For the glibc package, we must only use -g for the main libraries.
+lib_pattern='.*/lib[^/]*/[^/]+(\.so\.[^/]+|\.so)$'
+grep -hE "$lib_pattern" rpm.filelist nosegneg.filelist \
+  > libonly-rpm.filelist
+grep -hEv "$lib_pattern" rpm.filelist nosegneg.filelist \
+  > nolib-rpm.filelist
+bash /usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args -g \
+  -o libonly-debuginfo.filelist -l libonly-rpm.filelist
+bash /usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args \
+  -o nolib-debuginfo.filelist -l nolib-rpm.filelist
+cat libonly-debuginfo.filelist nolib-debuginfo.filelist > debuginfo.filelist
 
 # List all of the *.a archives in the debug directory.
 list_debug_archives()

But I don't think invoking the script multiple times like this will work because find-debuginfo.sh is really designed to process all files and then handle the -l split afterwards.

Comment 5 Florian Weimer 2019-04-02 11:37:54 UTC
Fixed with this patch:

diff --git a/glibc.spec b/glibc.spec
index d950a2a5..85bc411f 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -1677,6 +1677,9 @@ BuildRequires: systemd
 # the required semantics.
 BuildRequires: gcc >= 4.8.5-25
 
+# This RPM version introduced --g-libs.
+BuildRequires: rpm-build >= 4.11.3-38.el7
+
 %define enablekernel 2.6.32
 Conflicts: kernel < %{enablekernel}
 %define target %{_target_cpu}-redhat-linux
@@ -3812,7 +3815,7 @@ ls -l $RPM_BUILD_ROOT/usr/bin/getconf
 ls -l $RPM_BUILD_ROOT/usr/libexec/getconf
 eu-readelf -hS $RPM_BUILD_ROOT/usr/bin/getconf $RPM_BUILD_ROOT/usr/libexec/getconf/*
 
-find_debuginfo_args='--strict-build-id -g'
+find_debuginfo_args='--strict-build-id --g-libs'
 %ifarch %{debuginfocommonarches}
 find_debuginfo_args="$find_debuginfo_args \
   -l common.filelist -l utils.filelist -l nscd.filelist \

Comment 7 Sergey Kolosov 2019-06-14 09:41:11 UTC
Verified,

glibc-2.17-290.el7 contains stripped binaries, it also produces stripped binaries during rpmbuild -bb

Comment 9 errata-xmlrpc 2019-08-06 12:49:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2118

Comment 13 Carlos O'Donell 2021-07-15 19:52:44 UTC
*** Bug 1982316 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.