Hide Forgot
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.
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.
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 \
Verified, glibc-2.17-290.el7 contains stripped binaries, it also produces stripped binaries during rpmbuild -bb
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
*** Bug 1982316 has been marked as a duplicate of this bug. ***