Restructure package and subpackage file list generation.

The file list geneation for the main package and subpackages was
unorganized and poorly structured. With this commit we change this
in three siginifcant ways:

* All file lists are built independent of each other from a master
  list of files e.g. rpm.list. This is the important cleanup.

* All files are installed into %{glibc_sysroot}, which defaults
  to $RPM_BUILD_ROOT. This supports future experimentation with
  alternate glibc installs via this new variable.

* Redundant code is removed which is no longer required, like the
  debuginfo list de-duplication; simplifying the install process.

The changes were tested by carrying out a file-by-file comparison
to ensure no file changed packages or installed location after
the patch.
This commit is contained in:
Carlos O'Donell 2018-03-14 13:33:34 -06:00 committed by Carlos O'Donell
parent e4aafbc505
commit 6f4d10f912

View File

@ -540,7 +540,7 @@ The nscd daemon caches name service lookups and can improve
performance with LDAP, and may help with DNS as well. performance with LDAP, and may help with DNS as well.
############################################################################## ##############################################################################
# Subpackages for NSS modules except nss_files, nss_dns # Subpackages for NSS modules except nss_files, nss_compat, nss_dns
############################################################################## ##############################################################################
# This should remain it's own subpackage or "Provides: nss_db" to allow easy # This should remain it's own subpackage or "Provides: nss_db" to allow easy
@ -853,6 +853,12 @@ build
############################################################################## ##############################################################################
%install %install
# The built glibc is installed into a subdirectory of $RPM_BUILD_ROOT.
# For a system glibc that subdirectory is "/" (the root of the filesystem).
# This is called a sysroot (system root) and can be changed if we have a
# distribution that supports multiple installed glibc versions.
%define glibc_sysroot $RPM_BUILD_ROOT
# Remove existing file lists. # Remove existing file lists.
find . -type f -name '*.filelist' -exec rm -rf {} \; find . -type f -name '*.filelist' -exec rm -rf {} \;
@ -872,20 +878,20 @@ GCC=`cat Gcc`
# RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d. # RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d.
# Make these be symlinks to /lib64 or /usr/lib64 respectively. See: # Make these be symlinks to /lib64 or /usr/lib64 respectively. See:
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DRHT5YTPK4WWVGL3GIN5BF2IKX2ODHZ3/ # https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DRHT5YTPK4WWVGL3GIN5BF2IKX2ODHZ3/
for d in $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT/%{_lib}; do for d in %{glibc_sysroot}%{_libdir} %{glibc_sysroot}/%{_lib}; do
mkdir -p $d mkdir -p $d
(cd $d && ln -sf . lp64d) (cd $d && ln -sf . lp64d)
done done
%endif %endif
# Build and install. # Build and install:
make -j1 install_root=$RPM_BUILD_ROOT install -C build-%{target} make -j1 install_root=%{glibc_sysroot} install -C build-%{target}
# If we are not building an auxiliary arch then install all of the supported # If we are not building an auxiliary arch then install all of the supported
# locales. # locales.
%ifnarch %{auxarches} %ifnarch %{auxarches}
pushd build-%{target} pushd build-%{target}
make %{?_smp_mflags} -O install_root=$RPM_BUILD_ROOT \ make %{?_smp_mflags} -O install_root=%{glibc_sysroot} \
install-locales -C ../localedata objdir=`pwd` install-locales -C ../localedata objdir=`pwd`
popd popd
%endif %endif
@ -925,14 +931,14 @@ install_different()
libbase=${lib#*/} libbase=${lib#*/}
# Take care that `libbaseso' has a * that needs expanding so # Take care that `libbaseso' has a * that needs expanding so
# take care with quoting. # take care with quoting.
libbaseso=$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}-*.so) libbaseso=$(basename %{glibc_sysroot}/%{_lib}/${libbase}-*.so)
# Only install if different from default build library. # Only install if different from default build library.
if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then
ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso
else else
cp -a ${lib}.so $libdestdir/$libbaseso cp -a ${lib}.so $libdestdir/$libbaseso
fi fi
dlib=$libdestdir/$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}.so.*) dlib=$libdestdir/$(basename %{glibc_sysroot}/%{_lib}/${libbase}.so.*)
ln -sf $libbaseso $dlib ln -sf $libbaseso $dlib
done done
} }
@ -950,18 +956,18 @@ popd
# Remove the libNoVersion files. # Remove the libNoVersion files.
# XXX: This looks like a bug in glibc that accidentally installed these # XXX: This looks like a bug in glibc that accidentally installed these
# wrong files. We probably don't need this today. # wrong files. We probably don't need this today.
rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion* rm -f %{glibc_sysroot}/%{_libdir}/libNoVersion*
rm -f $RPM_BUILD_ROOT/%{_lib}/libNoVersion* rm -f %{glibc_sysroot}/%{_lib}/libNoVersion*
# Remove the old nss modules. # Remove the old nss modules.
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss1-* rm -f %{glibc_sysroot}/%{_lib}/libnss1-*
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss-*.so.1 rm -f %{glibc_sysroot}/%{_lib}/libnss-*.so.1
# This statically linked binary is no longer necessary in a world where # This statically linked binary is no longer necessary in a world where
# the default Fedora install uses an initramfs, and further we have rpm-ostree # the default Fedora install uses an initramfs, and further we have rpm-ostree
# which captures the whole userspace FS tree. # which captures the whole userspace FS tree.
# Further, see https://github.com/projectatomic/rpm-ostree/pull/1173#issuecomment-355014583 # Further, see https://github.com/projectatomic/rpm-ostree/pull/1173#issuecomment-355014583
rm -f ${RPM_BUILD_ROOT}/{usr/,}sbin/sln rm -f %{glibc_sysroot}/{usr/,}sbin/sln
###################################################################### ######################################################################
# Run ldconfig to create all the symbolic links we need # Run ldconfig to create all the symbolic links we need
@ -969,11 +975,11 @@ rm -f ${RPM_BUILD_ROOT}/{usr/,}sbin/sln
# Note: This has to happen before creating /etc/ld.so.conf. # Note: This has to happen before creating /etc/ld.so.conf.
mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig mkdir -p %{glibc_sysroot}/var/cache/ldconfig
truncate -s 0 $RPM_BUILD_ROOT/var/cache/ldconfig/aux-cache truncate -s 0 %{glibc_sysroot}/var/cache/ldconfig/aux-cache
# ldconfig is statically linked, so we can use the new version. # ldconfig is statically linked, so we can use the new version.
${RPM_BUILD_ROOT}/sbin/ldconfig -N -r ${RPM_BUILD_ROOT} %{glibc_sysroot}/sbin/ldconfig -N -r %{glibc_sysroot}
############################################################################## ##############################################################################
# Install info files # Install info files
@ -981,18 +987,18 @@ ${RPM_BUILD_ROOT}/sbin/ldconfig -N -r ${RPM_BUILD_ROOT}
%if %{with docs} %if %{with docs}
# Move the info files if glibc installed them into the wrong location. # Move the info files if glibc installed them into the wrong location.
if [ -d $RPM_BUILD_ROOT%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then if [ -d %{glibc_sysroot}%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then
mkdir -p $RPM_BUILD_ROOT%{_infodir} mkdir -p %{glibc_sysroot}%{_infodir}
mv -f $RPM_BUILD_ROOT%{_prefix}/info/* $RPM_BUILD_ROOT%{_infodir} mv -f %{glibc_sysroot}%{_prefix}/info/* %{glibc_sysroot}%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/info rm -rf %{glibc_sysroot}%{_prefix}/info
fi fi
# Compress all of the info files. # Compress all of the info files.
gzip -9nvf $RPM_BUILD_ROOT%{_infodir}/libc* gzip -9nvf %{glibc_sysroot}%{_infodir}/libc*
%else %else
rm -f $RPM_BUILD_ROOT%{_infodir}/dir rm -f %{glibc_sysroot}%{_infodir}/dir
rm -f $RPM_BUILD_ROOT%{_infodir}/libc.info* rm -f %{glibc_sysroot}%{_infodir}/libc.info*
%endif %endif
############################################################################## ##############################################################################
@ -1001,14 +1007,14 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/libc.info*
%ifnarch %{auxarches} %ifnarch %{auxarches}
olddir=`pwd` olddir=`pwd`
pushd ${RPM_BUILD_ROOT}%{_prefix}/lib/locale pushd %{glibc_sysroot}%{_prefix}/lib/locale
rm -f locale-archive rm -f locale-archive
# Intentionally we do not pass --alias-file=, aliases will be added # Intentionally we do not pass --alias-file=, aliases will be added
# by build-locale-archive. # by build-locale-archive.
$olddir/build-%{target}/elf/ld.so \ $olddir/build-%{target}/elf/ld.so \
--library-path $olddir/build-%{target}/ \ --library-path $olddir/build-%{target}/ \
$olddir/build-%{target}/locale/localedef \ $olddir/build-%{target}/locale/localedef \
--prefix ${RPM_BUILD_ROOT} --add-to-archive \ --prefix %{glibc_sysroot} --add-to-archive \
*_* *_*
# Setup the locale-archive template for use by glibc-all-langpacks. # Setup the locale-archive template for use by glibc-all-langpacks.
mv locale-archive{,.tmpl} mv locale-archive{,.tmpl}
@ -1023,51 +1029,51 @@ do
echo "%{_prefix}/lib/locale/$i/*" >> langpack-${lang}.filelist echo "%{_prefix}/lib/locale/$i/*" >> langpack-${lang}.filelist
done done
popd popd
pushd ${RPM_BUILD_ROOT}%{_prefix}/share/locale pushd %{glibc_sysroot}%{_prefix}/share/locale
for i in */LC_MESSAGES/libc.mo for i in */LC_MESSAGES/libc.mo
do do
locale=${i%%%%/*} locale=${i%%%%/*}
lang=${locale%%%%_*} lang=${locale%%%%_*}
echo "%lang($lang) %{_prefix}/share/locale/${i}" \ echo "%lang($lang) %{_prefix}/share/locale/${i}" \
>> ${RPM_BUILD_ROOT}%{_prefix}/lib/locale/langpack-${lang}.filelist >> %{glibc_sysroot}%{_prefix}/lib/locale/langpack-${lang}.filelist
done done
popd popd
mv ${RPM_BUILD_ROOT}%{_prefix}/lib/locale/*.filelist . mv %{glibc_sysroot}%{_prefix}/lib/locale/*.filelist .
%endif %endif
############################################################################## ##############################################################################
# Install configuration files for services # Install configuration files for services
############################################################################## ##############################################################################
install -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT/etc/nsswitch.conf install -p -m 644 %{SOURCE7} %{glibc_sysroot}/etc/nsswitch.conf
%ifnarch %{auxarches} %ifnarch %{auxarches}
# This is for ncsd - in glibc 2.2 # This is for ncsd - in glibc 2.2
install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT/etc install -m 644 nscd/nscd.conf %{glibc_sysroot}/etc
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir} mkdir -p %{glibc_sysroot}%{_tmpfilesdir}
install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir} install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system mkdir -p %{glibc_sysroot}/lib/systemd/system
install -m 644 nscd/nscd.service nscd/nscd.socket $RPM_BUILD_ROOT/lib/systemd/system install -m 644 nscd/nscd.service nscd/nscd.socket %{glibc_sysroot}/lib/systemd/system
%endif %endif
# Include ld.so.conf # Include ld.so.conf
echo 'include ld.so.conf.d/*.conf' > $RPM_BUILD_ROOT/etc/ld.so.conf echo 'include ld.so.conf.d/*.conf' > %{glibc_sysroot}/etc/ld.so.conf
truncate -s 0 $RPM_BUILD_ROOT/etc/ld.so.cache truncate -s 0 %{glibc_sysroot}/etc/ld.so.cache
chmod 644 $RPM_BUILD_ROOT/etc/ld.so.conf chmod 644 %{glibc_sysroot}/etc/ld.so.conf
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d mkdir -p %{glibc_sysroot}/etc/ld.so.conf.d
%ifnarch %{auxarches} %ifnarch %{auxarches}
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig mkdir -p %{glibc_sysroot}/etc/sysconfig
truncate -s 0 $RPM_BUILD_ROOT/etc/sysconfig/nscd truncate -s 0 %{glibc_sysroot}/etc/sysconfig/nscd
truncate -s 0 $RPM_BUILD_ROOT/etc/gai.conf truncate -s 0 %{glibc_sysroot}/etc/gai.conf
%endif %endif
# Include %{_libdir}/gconv/gconv-modules.cache # Include %{_libdir}/gconv/gconv-modules.cache
truncate -s 0 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache truncate -s 0 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache
chmod 644 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache chmod 644 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache
# Install the upgrade program # Install the upgrade program
install -m 700 build-%{target}/elf/glibc_post_upgrade \ install -m 700 build-%{target}/elf/glibc_post_upgrade \
$RPM_BUILD_ROOT%{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu} %{glibc_sysroot}%{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu}
############################################################################## ##############################################################################
# Install debug copies of unstripped static libraries # Install debug copies of unstripped static libraries
@ -1078,14 +1084,14 @@ install -m 700 build-%{target}/elf/glibc_post_upgrade \
# If we are building a debug package then copy all of the static archives # If we are building a debug package then copy all of the static archives
# into the debug directory to keep them as unstripped copies. # into the debug directory to keep them as unstripped copies.
%if 0%{?_enable_debug_packages} %if 0%{?_enable_debug_packages}
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir} mkdir -p %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}
cp -a $RPM_BUILD_ROOT%{_libdir}/*.a \ cp -a %{glibc_sysroot}%{_libdir}/*.a \
$RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/ %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}/
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/*_p.a rm -f %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}/*_p.a
%endif %endif
# Remove the zoneinfo files # Remove any zoneinfo files; they are maintained by tzdata.
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo rm -rf %{glibc_sysroot}%{_prefix}/share/zoneinfo
# Make sure %config files have the same timestamp across multilib packages. # Make sure %config files have the same timestamp across multilib packages.
# #
@ -1093,8 +1099,8 @@ rm -rf $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo
# doesn't seem to be any macro to give us that. So we do the next best thing, # doesn't seem to be any macro to give us that. So we do the next best thing,
# which is to at least keep the timestamp consistent. The choice of using # which is to at least keep the timestamp consistent. The choice of using
# glibc_post_upgrade.c is arbitrary. # glibc_post_upgrade.c is arbitrary.
touch -r %{SOURCE0} $RPM_BUILD_ROOT/etc/ld.so.conf touch -r %{SOURCE0} %{glibc_sysroot}/etc/ld.so.conf
touch -r sunrpc/etc.rpc $RPM_BUILD_ROOT/etc/rpc touch -r sunrpc/etc.rpc %{glibc_sysroot}/etc/rpc
pushd build-%{target} pushd build-%{target}
$GCC -Os -g -static -o build-locale-archive %{SOURCE1} \ $GCC -Os -g -static -o build-locale-archive %{SOURCE1} \
@ -1104,7 +1110,7 @@ $GCC -Os -g -static -o build-locale-archive %{SOURCE1} \
-I. -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \ -I. -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \
-L../build-%{target} \ -L../build-%{target} \
-B../build-%{target}/csu/ -lc -lc_nonshared -B../build-%{target}/csu/ -lc -lc_nonshared
install -m 700 build-locale-archive $RPM_BUILD_ROOT%{_prefix}/sbin/build-locale-archive install -m 700 build-locale-archive %{glibc_sysroot}%{_prefix}/sbin/build-locale-archive
popd popd
# Lastly copy some additional documentation for the packages. # Lastly copy some additional documentation for the packages.
@ -1115,8 +1121,8 @@ cp posix/gai.conf documentation/
%ifarch s390x %ifarch s390x
# Compatibility symlink # Compatibility symlink
mkdir -p $RPM_BUILD_ROOT/lib mkdir -p %{glibc_sysroot}/lib
ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/lib/ld64.so.1 ln -sf /%{_lib}/ld64.so.1 %{glibc_sysroot}/lib/ld64.so.1
%endif %endif
%if %{with benchtests} %if %{with benchtests}
@ -1126,17 +1132,17 @@ make BENCH_DURATION=1 bench-build
popd popd
# Copy over benchmark binaries. # Copy over benchmark binaries.
mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests mkdir -p %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests
cp $(find build-%{target}/benchtests -type f -executable) $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/ cp $(find build-%{target}/benchtests -type f -executable) %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
# ... and the makefile. # ... and the makefile.
for b in %{SOURCE9} %{SOURCE10}; do for b in %{SOURCE9} %{SOURCE10}; do
cp $b $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/ cp $b %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
done done
# .. and finally, the comparison scripts. # .. and finally, the comparison scripts.
cp benchtests/scripts/benchout.schema.json $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/ cp benchtests/scripts/benchout.schema.json %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
cp benchtests/scripts/compare_bench.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/ cp benchtests/scripts/compare_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
cp benchtests/scripts/import_bench.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/ cp benchtests/scripts/import_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
cp benchtests/scripts/validate_benchout.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/ cp benchtests/scripts/validate_benchout.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
%if 0%{?_enable_debug_packages} %if 0%{?_enable_debug_packages}
# The #line directives gperf generates do not give the proper # The #line directives gperf generates do not give the proper
@ -1151,25 +1157,25 @@ popd
%if %{with docs} %if %{with docs}
# Remove the `dir' info-heirarchy file which will be maintained # Remove the `dir' info-heirarchy file which will be maintained
# by the system as it adds info files to the install. # by the system as it adds info files to the install.
rm -f $RPM_BUILD_ROOT%{_infodir}/dir rm -f %{glibc_sysroot}%{_infodir}/dir
%endif %endif
%ifnarch %{auxarches} %ifnarch %{auxarches}
truncate -s 0 $RPM_BUILD_ROOT/%{_prefix}/lib/locale/locale-archive truncate -s 0 %{glibc_sysroot}/%{_prefix}/lib/locale/locale-archive
mkdir -p $RPM_BUILD_ROOT/var/{db,run}/nscd mkdir -p %{glibc_sysroot}/var/{db,run}/nscd
touch $RPM_BUILD_ROOT/var/{db,run}/nscd/{passwd,group,hosts,services} touch %{glibc_sysroot}/var/{db,run}/nscd/{passwd,group,hosts,services}
touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid} touch %{glibc_sysroot}/var/run/nscd/{socket,nscd.pid}
%endif %endif
# Move libpcprofile.so and libmemusage.so into the proper library directory. # Move libpcprofile.so and libmemusage.so into the proper library directory.
# They can be moved without any real consequences because users would not use # They can be moved without any real consequences because users would not use
# them directly. # them directly.
mkdir -p $RPM_BUILD_ROOT%{_libdir} mkdir -p %{glibc_sysroot}%{_libdir}
mv -f $RPM_BUILD_ROOT/%{_lib}/lib{pcprofile,memusage}.so \ mv -f %{glibc_sysroot}/%{_lib}/lib{pcprofile,memusage}.so \
$RPM_BUILD_ROOT%{_libdir} %{glibc_sysroot}%{_libdir}
# Strip all of the installed object files. # Strip all of the installed object files.
strip -g $RPM_BUILD_ROOT%{_libdir}/*.o strip -g %{glibc_sysroot}%{_libdir}/*.o
############################################################################### ###############################################################################
# Rebuild libpthread.a using --whole-archive to ensure all of libpthread # Rebuild libpthread.a using --whole-archive to ensure all of libpthread
@ -1180,13 +1186,27 @@ strip -g $RPM_BUILD_ROOT%{_libdir}/*.o
# such that static linking works and produces the most minimally sized # such that static linking works and produces the most minimally sized
# static application possible. # static application possible.
############################################################################### ###############################################################################
pushd $RPM_BUILD_ROOT%{_prefix}/%{_lib}/ pushd %{glibc_sysroot}%{_prefix}/%{_lib}/
$GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a $GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a
rm libpthread.a rm libpthread.a
ar rcs libpthread.a libpthread.o ar rcs libpthread.a libpthread.o
rm libpthread.o rm libpthread.o
popd popd
# The xtrace and memusage scripts have hard-coded paths that need to be
# translated to a correct set of paths using the $LIB token which is
# dynamically translated by ld.so as the default lib directory.
for i in %{glibc_sysroot}%{_prefix}/bin/{xtrace,memusage}; do
%if %{with bootstrap}
test -w $i || continue
%endif
sed -e 's~=/%{_lib}/libpcprofile.so~=%{_libdir}/libpcprofile.so~' \
-e 's~=/%{_lib}/libmemusage.so~=%{_libdir}/libmemusage.so~' \
-e 's~='\''/\\\$LIB/libpcprofile.so~='\''%{_prefix}/\\$LIB/libpcprofile.so~' \
-e 's~='\''/\\\$LIB/libmemusage.so~='\''%{_prefix}/\\$LIB/libmemusage.so~' \
-i $i
done
############################################################################## ##############################################################################
# Beyond this point in the install process we no longer modify the set of # Beyond this point in the install process we no longer modify the set of
# installed files, with one exception, for auxarches we cleanup the file list # installed files, with one exception, for auxarches we cleanup the file list
@ -1199,35 +1219,61 @@ popd
############################################################################## ##############################################################################
# There are several main file lists (and many more for # There are several main file lists (and many more for
# the langpack sub-packages (langpack-${lang}.filelist)): # the langpack sub-packages (langpack-${lang}.filelist)):
# * rpm.fileslist # * rpm.filelist
# - Master file list. Eventually, after removing files from this list # - Master file list from which all other lists are built.
# we are left with the list of files for the glibc package. # * glibc.filelist
# - Files for the glibc packages.
# * common.filelist # * common.filelist
# - Contains the list of flies for the common subpackage. # - Flies for the common subpackage.
# * utils.filelist # * utils.filelist
# - Contains the list of files for the utils subpackage. # - Files for the utils subpackage.
# * nscd.filelist # * nscd.filelist
# - Contains the list of files for the nscd subpackage. # - Files for the nscd subpackage.
# * devel.filelist # * devel.filelist
# - Contains the list of files for the devel subpackage. # - Files for the devel subpackage.
# * headers.filelist # * headers.filelist
# - Contains the list of files for the headers subpackage. # - Files for the headers subpackage.
# * static.filelist # * static.filelist
# - Contains the list of files for the static subpackage. # - Files for the static subpackage.
# * libnsl.filelist # * libnsl.filelist
# - Contains the list of files for the libnsl subpackage # - Files for the libnsl subpackage
# * nss_db.filelist, nss_hesiod.filelist # * nss_db.filelist
# * nss_hesiod.filelist
# - File lists for nss_* NSS module subpackages. # - File lists for nss_* NSS module subpackages.
# * nss-devel.filelist # * nss-devel.filelist
# - File list with the .so symbolic links for NSS packages. # - File list with the .so symbolic links for NSS packages.
# * debuginfo.filelist # * debuginfo.filelist
# - Contains the list of files for the glibc debuginfo package. # - Files for the glibc debuginfo package.
# * debuginfocommon.filelist # * debuginfocommon.filelist
# - Contains the list of files for the glibc common debuginfo package. # - Files for the glibc common debuginfo package.
# #
# Create the main file lists. This way we can append to any one of them later
# wihtout having to create it. Note these are removed at the start of the
# install phase.
touch rpm.filelist
touch glibc.filelist
touch common.filelist
touch utils.filelist
touch nscd.filelist
touch devel.filelist
touch headers.filelist
touch static.filelist
touch libnsl.filelist
touch nss_db.filelist
touch nss_hesiod.filelist
touch nss-devel.filelist
touch debuginfo.filelist
touch debuginfocommon.filelist
###############################################################################
# Master file list, excluding a few things.
###############################################################################
{ {
find $RPM_BUILD_ROOT \( -type f -o -type l \) \ # List all files or links that we have created during install.
# Files with 'etc' are configuration files, likewise 'gconv-modules'
# and 'gconv-modules.cache' are caches, and we exclude them.
find %{glibc_sysroot} \( -type f -o -type l \) \
\( \ \( \
-name etc -printf "%%%%config " -o \ -name etc -printf "%%%%config " -o \
-name gconv-modules \ -name gconv-modules \
@ -1236,9 +1282,9 @@ popd
-printf "%%%%verify(not md5 size mtime) " \ -printf "%%%%verify(not md5 size mtime) " \
, \ , \
! -path "*/lib/debug/*" -printf "/%%P\n" \) ! -path "*/lib/debug/*" -printf "/%%P\n" \)
# Print all directories with a %%dir prefix. We omit the info directory and # List all directories with a %%dir prefix. We omit the info directory and
# all directories in (and including) /usr/share/locale. # all directories in (and including) /usr/share/locale.
find $RPM_BUILD_ROOT -type d \ find %{glibc_sysroot} -type d \
\( -path '*%{_prefix}/share/locale' -prune -o \ \( -path '*%{_prefix}/share/locale' -prune -o \
\( -path '*%{_prefix}/share/*' \ \( -path '*%{_prefix}/share/*' \
%if %{with docs} %if %{with docs}
@ -1247,9 +1293,6 @@ popd
-path "*%{_prefix}/include/*" \ -path "*%{_prefix}/include/*" \
\) -printf "%%%%dir /%%P\n" \) \) -printf "%%%%dir /%%P\n" \)
} | { } | {
# primary filelist
# Also remove the *.mo entries. We will add them to the # Also remove the *.mo entries. We will add them to the
# language specific sub-packages. # language specific sub-packages.
# libnss_ files go into subpackages related to NSS modules. # libnss_ files go into subpackages related to NSS modules.
@ -1258,32 +1301,93 @@ popd
sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \ sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \
-e '\,.*/share/i18n/locales/.*,d' \ -e '\,.*/share/i18n/locales/.*,d' \
-e '\,.*/share/i18n/charmaps/.*,d' \ -e '\,.*/share/i18n/charmaps/.*,d' \
-e '\,/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \ -e '\,.*/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \
-e '\,/%{_libdir}/lib\(pcprofile\|memusage\)\.so,d' \ -e '\,.*/%{_libdir}/lib\(pcprofile\|memusage\)\.so,d' \
-e '\,bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d' -e '\,.*/bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d'
} | sort > rpm.filelist } | sort > rpm.filelist
touch common.filelist # The master file list is now used by each subpackage to list their own
# files. We go through each package and subpackage now and create their lists.
# Each subpackage picks the files from the master list that they need.
# The order of the subpackage list generation does not matter.
# The xtrace and memusage scripts have hard-coded paths that need to be ###############################################################################
# translated to a correct set of paths using the $LIB token which is # glibc
# dynamically translated by ld.so as the default lib directory. ###############################################################################
for i in $RPM_BUILD_ROOT%{_prefix}/bin/{xtrace,memusage}; do
%if %{with bootstrap} # Add all files with the following exceptions:
test -w $i || continue # - The info files '%{_infodir}/dir'
%endif # - The partial (lib*_p.a) static libraries, include files.
sed -e 's~=/%{_lib}/libpcprofile.so~=%{_libdir}/libpcprofile.so~' \ # - The static files, objects, unversioned DSOs, and nscd.
-e 's~=/%{_lib}/libmemusage.so~=%{_libdir}/libmemusage.so~' \ # - The bin, locale, some sbin, and share.
-e 's~='\''/\\\$LIB/libpcprofile.so~='\''%{_prefix}/\\$LIB/libpcprofile.so~' \ # - The use of [^gi] is meant to exclude all files except glibc_post_upgrade,
-e 's~='\''/\\\$LIB/libmemusage.so~='\''%{_prefix}/\\$LIB/libmemusage.so~' \ # and iconvconfig, which we want in the main packages.
-i $i # - All the libnss files (we add back the ones we want later).
# - All bench test binaries.
# - The aux-cache, since it's handled specially in the files section.
# - The build-locale-archive binary since it's in the common package.
cat rpm.filelist \
| grep -v \
-e '%{_infodir}' \
-e '%{_libdir}/lib.*_p.a' \
-e '%{_prefix}/include' \
-e '%{_libdir}/lib.*\.a' \
-e '%{_libdir}/.*\.o' \
-e '%{_libdir}/lib.*\.so' \
-e 'nscd' \
-e '%{_prefix}/bin' \
-e '%{_prefix}/lib/locale' \
-e '%{_prefix}/sbin/[^gi]' \
-e '%{_prefix}/share' \
-e '/var/db/Makefile' \
-e '/libnss_.*\.so[0-9.]*$' \
-e '/libnsl' \
-e 'glibc-benchtests' \
-e 'aux-cache' \
-e 'build-locale-archive' \
> glibc.filelist
# Add specific files:
# - The nss_files, nss_compat, and nss_db files.
# - The libmemusage.so and libpcprofile.so used by utils.
for module in compat files dns; do
cat rpm.filelist \
| grep -E \
-e "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \
>> glibc.filelist
done done
grep -e "libmemusage.so" -e "libpcprofile.so" rpm.filelist >> glibc.filelist
###############################################################################
# glibc-devel
###############################################################################
%if %{with docs} %if %{with docs}
# Put the info files into the devel file list. # Put the info files into the devel file list, but exclude the generated dir.
grep '%{_infodir}' < rpm.filelist | grep -v '%{_infodir}/dir' > devel.filelist grep '%{_infodir}' rpm.filelist | grep -v '%{_infodir}/dir' > devel.filelist
%endif %endif
# Put some static files into the devel package.
grep '%{_libdir}/lib.*\.a' rpm.filelist \
| grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
>> devel.filelist
# Put all of the object files and *.so (not the versioned ones) into the
# devel package.
grep '%{_libdir}/.*\.o' < rpm.filelist >> devel.filelist
grep '%{_libdir}/lib.*\.so' < rpm.filelist >> devel.filelist
# The exceptions are:
# - libmemusage.so and libpcprofile.so in glibc used by utils.
# - libnss_*.so which are in nss-devel.
sed -i -e '\,libmemusage.so,d' \
-e '\,libpcprofile.so,d' \
-e '\,/libnss_[a-z]*\.so$,d' \
devel.filelist
###############################################################################
# glibc-headers
###############################################################################
# The glibc-headers package includes only common files which are identical # The glibc-headers package includes only common files which are identical
# across all multilib packages. We must keep gnu/stubs.h and gnu/lib-names.h # across all multilib packages. We must keep gnu/stubs.h and gnu/lib-names.h
# in the glibc-headers package, but the -32, -64, -64-v1, and -64-v2 versions # in the glibc-headers package, but the -32, -64, -64-v1, and -64-v2 versions
@ -1296,73 +1400,50 @@ grep '%{_prefix}/include' < rpm.filelist \
| egrep -v '%{_prefix}/include/gnu/lib-names-.*\.h$' \ | egrep -v '%{_prefix}/include/gnu/lib-names-.*\.h$' \
> headers.filelist > headers.filelist
# Remove partial (lib*_p.a) static libraries, include files, and info files from ###############################################################################
# the core glibc package. # glibc-static
sed -i -e '\|%{_libdir}/lib.*_p.a|d' \ ###############################################################################
-e '\|%{_prefix}/include|d' \
-e '\|%{_infodir}|d' \
rpm.filelist
# Put some static files into the devel package.
grep '%{_libdir}/lib.*\.a' < rpm.filelist \
| grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
>> devel.filelist
# Put the rest of the static files into the static package. # Put the rest of the static files into the static package.
grep '%{_libdir}/lib.*\.a' < rpm.filelist \ grep '%{_libdir}/lib.*\.a' < rpm.filelist \
| grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \ | grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
> static.filelist > static.filelist
# Put all of the object files and *.so (not the versioned ones) into the ###############################################################################
# devel package. # glibc-common
grep '%{_libdir}/.*\.o' < rpm.filelist >> devel.filelist ###############################################################################
grep '%{_libdir}/lib.*\.so' < rpm.filelist >> devel.filelist
# The exception is that libmemusage.so and libpcprofile.so are in glibc
# because they are used by the utils.
sed -i -e '\,libmemusage.so,d' -e '\,libpcprofile.so,d' devel.filelist
# Remove all of the static, object, unversioned DSOs, and nscd from the core # All of the bin and certain sbin files go into the common package except
# glibc package. # glibc_post_upgrade.* and iconvconfig which need to go in glibc. Likewise
sed -i -e '\|%{_libdir}/lib.*\.a|d' \ # nscd is excluded because it goes in nscd.
-e '\|%{_libdir}/.*\.o|d' \ grep '%{_prefix}/bin' rpm.filelist >> common.filelist
-e '\|%{_libdir}/lib.*\.so|d' \ grep '%{_prefix}/sbin/[^gi]' rpm.filelist \
-e '\|nscd|d' rpm.filelist | grep -v 'nscd' >> common.filelist
# All of the files under share go into the common package since they should be
# All of the bin and certain sbin files go into the common package. # multilib-independent.
# We explicitly exclude certain sbin files that need to go into # Exceptions:
# the core glibc package for use during upgrades. # - The actual share directory, not owned by us.
grep '%{_prefix}/bin' < rpm.filelist >> common.filelist # - The info files which go in devel, and the info directory.
grep '%{_prefix}/sbin/[^gi]' < rpm.filelist >> common.filelist grep '%{_prefix}/share' rpm.filelist \
# All of the files under share go into the common package since | grep -v \
# they should be multilib-independent. -e '%{_prefix}/share/info/libc.info.*' \
grep '%{_prefix}/share' < rpm.filelist | \ -e '%%dir %{prefix}/share/info' \
grep -v -e '%{_prefix}/share/zoneinfo' -e '%%dir %{prefix}/share' \ -e '%%dir %{prefix}/share' \
>> common.filelist >> common.filelist
# Remove the bin, locale, some sbin, and share from the
# core glibc package. We cheat a bit and use the slightly dangerous
# /usr/sbin/[^gi] to match the inverse of the search that put the
# files into common.filelist. It's dangerous in that additional files
# that start with g, or i would get put into common.filelist and
# rpm.filelist.
sed -i -e '\|%{_prefix}/bin|d' \
-e '\|%{_prefix}/lib/locale|d' \
-e '\|%{_prefix}/sbin/[^gi]|d' \
-e '\|%{_prefix}/share|d' rpm.filelist
# Add the binary to build locales to the common subpackage. # Add the binary to build locales to the common subpackage.
echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist
###############################################################################
# nscd
###############################################################################
# The nscd binary must go into the nscd subpackage. # The nscd binary must go into the nscd subpackage.
echo '%{_prefix}/sbin/nscd' > nscd.filelist echo '%{_prefix}/sbin/nscd' > nscd.filelist
# The memusage and pcprofile libraries are put back into the core ###############################################################################
# glibc package even though they are only used by utils package # glibc-utils
# scripts.. ###############################################################################
cat >> rpm.filelist <<EOF
%{_libdir}/libmemusage.so
%{_libdir}/libpcprofile.so
EOF
# Add the utils scripts and programs to the utils subpackage. # Add the utils scripts and programs to the utils subpackage.
cat > utils.filelist <<EOF cat > utils.filelist <<EOF
@ -1375,27 +1456,36 @@ cat > utils.filelist <<EOF
%{_prefix}/bin/xtrace %{_prefix}/bin/xtrace
EOF EOF
###############################################################################
# nss_db, nss_hesiod
###############################################################################
# Move the NSS-related files to the NSS subpackages. Be careful not # Move the NSS-related files to the NSS subpackages. Be careful not
# to pick up .debug files, and the -devel symbolic links. # to pick up .debug files, and the -devel symbolic links.
for module in db compat hesiod files dns; do for module in db hesiod; do
grep -E "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \ grep -E "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \
rpm.filelist > nss_$module.filelist rpm.filelist > nss_$module.filelist
done done
###############################################################################
# nss-devel
###############################################################################
# Symlinks go into the nss-devel package (instead of the main devel # Symlinks go into the nss-devel package (instead of the main devel
# package). # package).
grep '/libnss_[a-z]*\.so$' devel.filelist > nss-devel.filelist grep '/libnss_[a-z]*\.so$' rpm.filelist > nss-devel.filelist
# /var/db/Makefile goes into nss_db, remove the other files from
# the main and devel file list. ###############################################################################
sed -i -e '\,/libnss_.*\.so[0-9.]*$,d' \ # libnsl
-e '\,/var/db/Makefile,d' \ ###############################################################################
rpm.filelist devel.filelist
# Restore the built-in NSS modules.
cat nss_files.filelist nss_dns.filelist nss_compat.filelist >> rpm.filelist
# Prepare the libnsl-related file lists. # Prepare the libnsl-related file lists.
grep '/libnsl-[0-9.]*.so$' rpm.filelist > libnsl.filelist grep '/libnsl-[0-9.]*.so$' rpm.filelist > libnsl.filelist
test $(wc -l < libnsl.filelist) -eq 1 test $(wc -l < libnsl.filelist) -eq 1
sed -i -e '\,/libnsl,d' rpm.filelist
###############################################################################
# glibc-benchtests
###############################################################################
# List of benchmarks. # List of benchmarks.
find build-%{target}/benchtests -type f -executable | while read b; do find build-%{target}/benchtests -type f -executable | while read b; do
@ -1414,7 +1504,7 @@ echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.f
sed -i -e '\,glibc-benchtests,d' rpm.filelist sed -i -e '\,glibc-benchtests,d' rpm.filelist
############################################################################### ###############################################################################
# Process debug information. # glibc-debuginfocommon, and glibc-debuginfo
############################################################################### ###############################################################################
find_debuginfo_args='--strict-build-id -g' find_debuginfo_args='--strict-build-id -g'
@ -1426,28 +1516,29 @@ find_debuginfo_args="$find_debuginfo_args \
-p '.*/(sbin|libexec)/.*' \ -p '.*/(sbin|libexec)/.*' \
-o debuginfocommon.filelist \ -o debuginfocommon.filelist \
-l nss_db.filelist -l nss_hesiod.filelist \ -l nss_db.filelist -l nss_hesiod.filelist \
-l libnsl.filelist -l rpm.filelist \ -l libnsl.filelist -l glibc.filelist \
%if %{with benchtests} %if %{with benchtests}
-l benchtests.filelist -l benchtests.filelist
%endif %endif
" "
%endif %endif
/usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args -o debuginfo.filelist /usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args -o debuginfo.filelist
# List all of the *.a archives in the debug directory. # List all of the *.a archives in the debug directory.
list_debug_archives() list_debug_archives()
{ {
local dir=%{_prefix}/lib/debug%{_libdir} local dir=%{_prefix}/lib/debug%{_libdir}
find $RPM_BUILD_ROOT$dir -name "*.a" -printf "$dir/%%P\n" find %{glibc_sysroot}$dir -name "*.a" -printf "$dir/%%P\n"
} }
%ifarch %{debuginfocommonarches} %ifarch %{debuginfocommonarches}
# Remove the source files from the common package debuginfo. # Remove the source files from the common package debuginfo.
sed -i '\#^%{_prefix}/src/debug/#d' debuginfocommon.filelist sed -i '\#^%{glibc_sysroot}%{_prefix}/src/debug/#d' debuginfocommon.filelist
# Create a list of all of the source files we copied to the debug directory. # Create a list of all of the source files we copied to the debug directory.
find $RPM_BUILD_ROOT%{_prefix}/src/debug \ find %{glibc_sysroot}%{_prefix}/src/debug \
\( -type d -printf '%%%%dir ' \) , \ \( -type d -printf '%%%%dir ' \) , \
-printf '%{_prefix}/src/debug/%%P\n' > debuginfocommon.sources -printf '%{_prefix}/src/debug/%%P\n' > debuginfocommon.sources
@ -1482,25 +1573,8 @@ egrep -v "$auxarches_debugsources" \
# the common debuginfo package. # the common debuginfo package.
list_debug_archives >> debuginfocommon.filelist list_debug_archives >> debuginfocommon.filelist
# It happens that find-debuginfo.sh produces duplicate entries even
# though the inputs are unique. Therefore we sort and unique the
# entries in the debug file lists. This avoids the following warnings:
# ~~~
# Processing files: glibc-debuginfo-common-2.17.90-10.fc20.x86_64
# warning: File listed twice: /usr/lib/debug/usr/sbin/build-locale-archive.debug
# warning: File listed twice: /usr/lib/debug/usr/sbin/nscd.debug
# warning: File listed twice: /usr/lib/debug/usr/sbin/zdump.debug
# warning: File listed twice: /usr/lib/debug/usr/sbin/zic.debug
# ~~~
sort -u debuginfocommon.filelist > debuginfocommon2.filelist
mv debuginfocommon2.filelist debuginfocommon.filelist
%endif # %{debuginfocommonarches} %endif # %{debuginfocommonarches}
# Remove any duplicates output by a buggy find-debuginfo.sh.
sort -u debuginfo.filelist > debuginfo2.filelist
mv debuginfo2.filelist debuginfo.filelist
# Remove some common directories from the common package debuginfo so that we # Remove some common directories from the common package debuginfo so that we
# don't end up owning them. # don't end up owning them.
exclude_common_dirs() exclude_common_dirs()
@ -1521,13 +1595,12 @@ exclude_common_dirs debuginfo.filelist
%endif # 0%{?_enable_debug_packages} %endif # 0%{?_enable_debug_packages}
%ifarch %{auxarches}
############################################################################## ##############################################################################
# Delete files that we do not intended to ship with the auxarch. # Delete files that we do not intended to ship with the auxarch.
# This is the only place where we touch the installed files after generating # This is the only place where we touch the installed files after generating
# the file lists. # the file lists.
############################################################################## ##############################################################################
%ifarch %{auxarches}
echo Cutting down the list of unpackaged files echo Cutting down the list of unpackaged files
sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \ sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \
common.filelist devel.filelist static.filelist headers.filelist \ common.filelist devel.filelist static.filelist headers.filelist \
@ -1535,7 +1608,7 @@ sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \
%ifarch %{debuginfocommonarches} %ifarch %{debuginfocommonarches}
debuginfocommon.filelist \ debuginfocommon.filelist \
%endif %endif
| (cd $RPM_BUILD_ROOT; xargs --no-run-if-empty rm -f 2> /dev/null || :) | (cd %{glibc_sysroot}; xargs --no-run-if-empty rm -f 2> /dev/null || :)
%endif # %{auxarches} %endif # %{auxarches}
############################################################################## ##############################################################################
@ -1605,9 +1678,9 @@ popd
echo ====================TESTING END===================== echo ====================TESTING END=====================
PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p' PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p'
echo ====================PLT RELOCS LD.SO================ echo ====================PLT RELOCS LD.SO================
readelf -Wr $RPM_BUILD_ROOT/%{_lib}/ld-*.so | sed -n -e "$PLTCMD" readelf -Wr %{glibc_sysroot}/%{_lib}/ld-*.so | sed -n -e "$PLTCMD"
echo ====================PLT RELOCS LIBC.SO============== echo ====================PLT RELOCS LIBC.SO==============
readelf -Wr $RPM_BUILD_ROOT/%{_lib}/libc-*.so | sed -n -e "$PLTCMD" readelf -Wr %{glibc_sysroot}/%{_lib}/libc-*.so | sed -n -e "$PLTCMD"
echo ====================PLT RELOCS END================== echo ====================PLT RELOCS END==================
# Finally, check if valgrind runs with the new glibc. # Finally, check if valgrind runs with the new glibc.