Move memory tracing libraries to glibc-utils (RHEL-2283)
libc_malloc_debug.so.0 and libmemusage.so are memory tracing libraries
and therefore should not be installed by default. Since they need to
be preloaded in order to use memory tracing tools in glibc-utils, they
belong alongside them.
On x86_64, glibc-utils will now only contain the 64-bit version of these
libraries but still need the 32-bit version (in order to support tracing
i686 applications). Therefore, on i686 the libraries remain in the main
glibc package.
rawhide commits:
* 2d5af83031edfa8191254814609961e4e57766fc
* e9d072eb64a251e09a121122941605f4a22d170a
Resolves: RHEL-2283
Related: RHEL-35602
Fedora 40 commit: 2c1b0f092c
This commit is contained in:
parent
13116ab92d
commit
53900028ae
36
glibc.spec
36
glibc.spec
@ -170,7 +170,7 @@ Version: %{glibcversion}
|
||||
# - It allows using the Release number without the %%dist tag in the dependency
|
||||
# generator to make the generated requires interchangeable between Rawhide
|
||||
# and ELN (.elnYY < .fcXX).
|
||||
%global baserelease 12
|
||||
%global baserelease 13
|
||||
Release: %{baserelease}%{?dist}
|
||||
|
||||
# Licenses:
|
||||
@ -299,6 +299,18 @@ rpm.define("__debug_install_post bash " .. wrapper
|
||||
%global _no_recompute_build_ids 1
|
||||
%undefine _unique_build_ids
|
||||
|
||||
%ifarch %{ix86}
|
||||
# The memory tracing tools (like mtrace, memusage) in glibc-utils only work
|
||||
# when the corresponding memory tracing libraries are preloaded. So we ship
|
||||
# memory allocation tracing/checking libraries in glibc-utils, except on
|
||||
# i686 where we need to ship them in glibc.i686. This is because
|
||||
# glibc-utils.x86_64 will contain only the 64-bit version of these
|
||||
# libraries.
|
||||
%global glibc_ship_tracelibs_in_utils 0
|
||||
%else
|
||||
%global glibc_ship_tracelibs_in_utils 1
|
||||
%endif
|
||||
|
||||
##############################################################################
|
||||
# Patches:
|
||||
# - See each individual patch file for origin and upstream status.
|
||||
@ -1928,6 +1940,7 @@ chmod 0444 master.filelist
|
||||
# a double negation of -v and [^i] so it removes all files in
|
||||
# sbin *but* iconvconfig.
|
||||
# - All the libnss files (we add back the ones we want later).
|
||||
# - libc_malloc_debug.so, since it is a debugging library.
|
||||
# - All bench test binaries.
|
||||
# - The aux-cache, since it's handled specially in the files section.
|
||||
# - Extra gconv modules. We add the required modules later.
|
||||
@ -1948,6 +1961,9 @@ cat master.filelist \
|
||||
-e '/var/db/Makefile' \
|
||||
-e '/libnss_.*\.so[0-9.]*$' \
|
||||
-e '/libnsl' \
|
||||
%if %{glibc_ship_tracelibs_in_utils}
|
||||
-e 'libc_malloc_debug\.so' \
|
||||
%endif
|
||||
-e 'glibc-benchtests' \
|
||||
-e 'aux-cache' \
|
||||
%ifarch x86_64
|
||||
@ -1971,7 +1987,12 @@ for module in compat files dns; do
|
||||
%endif
|
||||
>> glibc.filelist
|
||||
done
|
||||
grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist \
|
||||
grep \
|
||||
%if ! %{glibc_ship_tracelibs_in_utils}
|
||||
-e "libmemusage.so" \
|
||||
%endif
|
||||
-e "libpcprofile.so" \
|
||||
master.filelist \
|
||||
%ifarch x86_64
|
||||
%dnl Exclude 32-bit libraries built for glibc32.
|
||||
| grep -v -e /lib/lib \
|
||||
@ -2027,6 +2048,7 @@ grep '%{_libdir}/lib.*\.a' master.filelist \
|
||||
# devel package.
|
||||
grep '%{_libdir}/.*\.o' < master.filelist >> devel.filelist
|
||||
grep '%{_libdir}/lib.*\.so' < master.filelist >> devel.filelist
|
||||
|
||||
# The exceptions are:
|
||||
# - libmemusage.so and libpcprofile.so in glibc used by utils.
|
||||
# - libnss_*.so which are in nss-devel.
|
||||
@ -2146,6 +2168,13 @@ cat > utils.filelist <<EOF
|
||||
%{_prefix}/bin/xtrace
|
||||
EOF
|
||||
|
||||
%if %{glibc_ship_tracelibs_in_utils}
|
||||
grep \
|
||||
-e '%{_lib}/libc_malloc_debug\.so' \
|
||||
-e '%{_lib}/libmemusage.so' \
|
||||
< master.filelist >> utils.filelist
|
||||
%endif
|
||||
|
||||
###############################################################################
|
||||
# nss_db, nss_hesiod
|
||||
###############################################################################
|
||||
@ -2572,6 +2601,9 @@ update_gconv_modules_cache ()
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed May 15 2024 Arjun Shankar <arjun@redhat.com> - 2.39-13
|
||||
- Move memory tracing libraries to glibc-utils
|
||||
|
||||
* Fri May 10 2024 Florian Weimer <fweimer@redhat.com> - 2.39-12
|
||||
- Use unsigned types in <utmp.h>/<utmpx.h> (RHEL-22226)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user