Use UsrMove (Changes/UsrMerge) path destination in the RPMs (#1063607)
This commit updates most occurrences of /%{_lib} to %{_libdir}. The glibc build process is not changed, instead the symbolic links are created right before installing the files, to redirect them to their final locations. The symbolic links are removed again so that they do not end up in the shipped packages.
This commit is contained in:
parent
2adb452981
commit
33b0330cd6
97
glibc.spec
97
glibc.spec
@ -170,7 +170,7 @@ Version: %{glibcversion}
|
|||||||
# - It allows using the Release number without the %%dist tag in the dependency
|
# - It allows using the Release number without the %%dist tag in the dependency
|
||||||
# generator to make the generated requires interchangeable between Rawhide
|
# generator to make the generated requires interchangeable between Rawhide
|
||||||
# and ELN (.elnYY < .fcXX).
|
# and ELN (.elnYY < .fcXX).
|
||||||
%global baserelease 25
|
%global baserelease 26
|
||||||
Release: %{baserelease}%{?dist}
|
Release: %{baserelease}%{?dist}
|
||||||
|
|
||||||
# Licenses:
|
# Licenses:
|
||||||
@ -317,7 +317,7 @@ local original = rpm.expand("%{macrobody:__debug_install_post}")
|
|||||||
-- Avoid embedded newlines that confuse the macro definition.
|
-- Avoid embedded newlines that confuse the macro definition.
|
||||||
original = original:match("^%s*(.-)%s*$"):gsub("\\\n", "")
|
original = original:match("^%s*(.-)%s*$"):gsub("\\\n", "")
|
||||||
rpm.define("__debug_install_post bash " .. wrapper
|
rpm.define("__debug_install_post bash " .. wrapper
|
||||||
.. " " .. sysroot .. " %{glibc_ldso} " .. original)
|
.. " " .. sysroot .. " %{_prefix}%{glibc_ldso} " .. original)
|
||||||
}
|
}
|
||||||
|
|
||||||
# sysroot package support. These contain arch-specific packages, so
|
# sysroot package support. These contain arch-specific packages, so
|
||||||
@ -472,6 +472,8 @@ Obsoletes: nscd < 2.35
|
|||||||
Provides: ldconfig
|
Provides: ldconfig
|
||||||
Provides: /sbin/ldconfig
|
Provides: /sbin/ldconfig
|
||||||
Provides: /usr/sbin/ldconfig
|
Provides: /usr/sbin/ldconfig
|
||||||
|
# Historic file paths provided for backwards compatibility.
|
||||||
|
Provides: %{glibc_ldso}
|
||||||
|
|
||||||
# The dynamic linker supports DT_GNU_HASH
|
# The dynamic linker supports DT_GNU_HASH
|
||||||
Provides: rtld(GNU_HASH)
|
Provides: rtld(GNU_HASH)
|
||||||
@ -1547,11 +1549,20 @@ build build-%{target}-power10 \
|
|||||||
# distribution that supports multiple installed glibc versions.
|
# distribution that supports multiple installed glibc versions.
|
||||||
%global glibc_sysroot $RPM_BUILD_ROOT
|
%global glibc_sysroot $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
# Create symbolic links for Features/UsrMove (aka UsrMerge, MoveToUsr).
|
||||||
|
# See below: Remove UsrMove symbolic links.
|
||||||
|
usrmove_file_names="bin lib lib64 sbin"
|
||||||
|
for d in $usrmove_file_names ; do
|
||||||
|
mkdir -p "%{glibc_sysroot}/usr/$d"
|
||||||
|
ln -s "usr/$d" "%{glibc_sysroot}/$d"
|
||||||
|
done
|
||||||
|
|
||||||
%ifarch riscv64
|
%ifarch riscv64
|
||||||
# RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d.
|
# RISC-V ABI wants to install everything in /usr/lib64/lp64d.
|
||||||
|
# Make these be symlinks to /usr/lib64. See:
|
||||||
# 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 %{glibc_sysroot}%{_libdir} %{glibc_sysroot}/%{_lib}; do
|
for d in %{glibc_sysroot}%{_libdir}; do
|
||||||
mkdir -p $d
|
mkdir -p $d
|
||||||
(cd $d && ln -sf . lp64d)
|
(cd $d && ln -sf . lp64d)
|
||||||
done
|
done
|
||||||
@ -1563,11 +1574,10 @@ pushd build-%{target}-32
|
|||||||
%make_build install_root=%{glibc_sysroot} install
|
%make_build install_root=%{glibc_sysroot} install
|
||||||
popd
|
popd
|
||||||
pushd %{glibc_sysroot}
|
pushd %{glibc_sysroot}
|
||||||
rm -rf etc sbin var usr/bin usr/lib/gconv usr/libexec usr/sbin usr/share
|
rm -rf etc var usr/bin usr/lib/gconv usr/libexec usr/sbin usr/share
|
||||||
rm -f lib/libnss_db* lib/libnss_hesiod* lib/libnsl* usr/lib/libnsl* usr/lib/libnss*
|
rm -f lib/libnss_db* lib/libnss_hesiod* lib/libnsl* usr/lib/libnsl* usr/lib/libnss*
|
||||||
rm usr/lib/libc_malloc_debug.so
|
rm usr/lib/libc_malloc_debug.so
|
||||||
strip -g usr/lib/*.o
|
strip -g usr/lib/*.o
|
||||||
mv lib/{libmemusage,libpcprofile}.so usr/lib/
|
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -1626,7 +1636,7 @@ 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 %{glibc_sysroot}/%{_lib}/${libbase}.so.*)
|
libbaseso=$(basename %{glibc_sysroot}/%{_libdir}/${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
|
||||||
@ -1651,11 +1661,10 @@ popd
|
|||||||
# 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 %{glibc_sysroot}/%{_libdir}/libNoVersion*
|
rm -f %{glibc_sysroot}/%{_libdir}/libNoVersion*
|
||||||
rm -f %{glibc_sysroot}/%{_lib}/libNoVersion*
|
|
||||||
|
|
||||||
# Remove the old nss modules.
|
# Remove the old nss modules.
|
||||||
rm -f %{glibc_sysroot}/%{_lib}/libnss1-*
|
rm -f %{glibc_sysroot}%{_libdir}/libnss1-*
|
||||||
rm -f %{glibc_sysroot}/%{_lib}/libnss-*.so.1
|
rm -f %{glibc_sysroot}%{_libdir}/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
|
||||||
@ -1814,13 +1823,6 @@ popd
|
|||||||
rm -f %{glibc_sysroot}%{_infodir}/dir
|
rm -f %{glibc_sysroot}%{_infodir}/dir
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Move libpcprofile.so and libmemusage.so into the proper library directory.
|
|
||||||
# They can be moved without any real consequences because users would not use
|
|
||||||
# them directly.
|
|
||||||
mkdir -p %{glibc_sysroot}%{_libdir}
|
|
||||||
mv -f %{glibc_sysroot}/%{_lib}/lib{pcprofile,memusage}.so \
|
|
||||||
%{glibc_sysroot}%{_libdir}
|
|
||||||
|
|
||||||
# Disallow linking against libc_malloc_debug.
|
# Disallow linking against libc_malloc_debug.
|
||||||
rm %{glibc_sysroot}%{_libdir}/libc_malloc_debug.so
|
rm %{glibc_sysroot}%{_libdir}/libc_malloc_debug.so
|
||||||
|
|
||||||
@ -1846,7 +1848,14 @@ done
|
|||||||
# that have old linker scripts that reference this file. We ship this only
|
# that have old linker scripts that reference this file. We ship this only
|
||||||
# in compat-libpthread-nonshared sub-package.
|
# in compat-libpthread-nonshared sub-package.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
ar cr %{glibc_sysroot}%{_prefix}/%{_lib}/libpthread_nonshared.a
|
ar cr %{glibc_sysroot}%{_libdir}/libpthread_nonshared.a
|
||||||
|
|
||||||
|
# Remove UsrMove symbolic links.
|
||||||
|
# These should not end in the packaged contents.
|
||||||
|
# They are part of the filesystem package.
|
||||||
|
for d in $usrmove_file_names ; do
|
||||||
|
rm "%{glibc_sysroot}/$d"
|
||||||
|
done
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Sysroot package creation.
|
# Sysroot package creation.
|
||||||
@ -2067,12 +2076,12 @@ fi
|
|||||||
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 %{glibc_sysroot}/%{_lib}/ld-*.so | sed -n -e "$PLTCMD"
|
readelf -Wr %{glibc_sysroot}%{_libdir}/ld-*.so | sed -n -e "$PLTCMD"
|
||||||
echo ====================PLT RELOCS LIBC.SO==============
|
echo ====================PLT RELOCS LIBC.SO==============
|
||||||
readelf -Wr %{glibc_sysroot}/%{_lib}/libc-*.so | sed -n -e "$PLTCMD"
|
readelf -Wr %{glibc_sysroot}%{_libdir}/libc-*.so | sed -n -e "$PLTCMD"
|
||||||
echo ====================PLT RELOCS END==================
|
echo ====================PLT RELOCS END==================
|
||||||
|
|
||||||
run_ldso="%{glibc_sysroot}/%{glibc_ldso} --library-path %{glibc_sysroot}/%{_lib}"
|
run_ldso="%{glibc_sysroot}/%{_prefix}%{glibc_ldso} --library-path %{glibc_sysroot}/%{_libdir}"
|
||||||
|
|
||||||
# Show the auxiliary vector as seen by the new library
|
# Show the auxiliary vector as seen by the new library
|
||||||
# (even if we do not perform the valgrind test).
|
# (even if we do not perform the valgrind test).
|
||||||
@ -2284,32 +2293,32 @@ update_gconv_modules_cache ()
|
|||||||
update_gconv_modules_cache ()
|
update_gconv_modules_cache ()
|
||||||
|
|
||||||
%files -f glibc.filelist
|
%files -f glibc.filelist
|
||||||
/sbin/ldconfig
|
%{_sbindir}/ldconfig
|
||||||
%{_sbindir}/iconvconfig
|
%{_sbindir}/iconvconfig
|
||||||
%{_libexecdir}/getconf
|
%{_libexecdir}/getconf
|
||||||
%{glibc_ldso}
|
%{_prefix}%{glibc_ldso}
|
||||||
/%{_lib}/libBrokenLocale.so.1
|
%{_libdir}/libBrokenLocale.so.1
|
||||||
/%{_lib}/libanl.so.1
|
%{_libdir}/libanl.so.1
|
||||||
/%{_lib}/libc.so.6
|
%{_libdir}/libc.so.6
|
||||||
/%{_lib}/libdl.so.2
|
%{_libdir}/libdl.so.2
|
||||||
/%{_lib}/libm.so.6
|
%{_libdir}/libm.so.6
|
||||||
/%{_lib}/libnss_compat.so.2
|
%{_libdir}/libnss_compat.so.2
|
||||||
/%{_lib}/libnss_dns.so.2
|
%{_libdir}/libnss_dns.so.2
|
||||||
/%{_lib}/libnss_files.so.2
|
%{_libdir}/libnss_files.so.2
|
||||||
/%{_lib}/libpthread.so.0
|
%{_libdir}/libpthread.so.0
|
||||||
/%{_lib}/libresolv.so.2
|
%{_libdir}/libresolv.so.2
|
||||||
/%{_lib}/librt.so.1
|
%{_libdir}/librt.so.1
|
||||||
/%{_lib}/libthread_db.so.1
|
%{_libdir}/libthread_db.so.1
|
||||||
/%{_lib}/libutil.so.1
|
%{_libdir}/libutil.so.1
|
||||||
%{_libdir}/libpcprofile.so
|
%{_libdir}/libpcprofile.so
|
||||||
%{_libdir}/audit
|
%{_libdir}/audit
|
||||||
%if %{glibc_has_libmvec}
|
%if %{glibc_has_libmvec}
|
||||||
/%{_lib}/libmvec.so.1
|
%{_libdir}/libmvec.so.1
|
||||||
%endif
|
%endif
|
||||||
%ifarch %{ix86}
|
%ifarch %{ix86}
|
||||||
# Needs to be in glibc.i686 so that glibc-utils.x86_64 can use it.
|
# Needs to be in glibc.i686 so that glibc-utils.x86_64 can use it.
|
||||||
%{_libdir}/libmemusage.so
|
%{_libdir}/libmemusage.so
|
||||||
/%{_lib}/libc_malloc_debug.so.0
|
%{_libdir}/libc_malloc_debug.so.0
|
||||||
%endif
|
%endif
|
||||||
%if %{buildpower10}
|
%if %{buildpower10}
|
||||||
%{_libdir}/glibc-hwcaps
|
%{_libdir}/glibc-hwcaps
|
||||||
@ -2424,7 +2433,7 @@ update_gconv_modules_cache ()
|
|||||||
%ifnarch %{ix86}
|
%ifnarch %{ix86}
|
||||||
# Needs to be in glibc.i686 so that glibc-utils.x86_64 can use it.
|
# Needs to be in glibc.i686 so that glibc-utils.x86_64 can use it.
|
||||||
%{_libdir}/libmemusage.so
|
%{_libdir}/libmemusage.so
|
||||||
/%{_lib}/libc_malloc_debug.so.0
|
%{_libdir}/libc_malloc_debug.so.0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f gconv-extra.filelist gconv-extra
|
%files -f gconv-extra.filelist gconv-extra
|
||||||
@ -2432,10 +2441,10 @@ update_gconv_modules_cache ()
|
|||||||
|
|
||||||
%files -n nss_db
|
%files -n nss_db
|
||||||
%{_bindir}/makedb
|
%{_bindir}/makedb
|
||||||
/%{_lib}/libnss_db.so.2
|
%{_libdir}/libnss_db.so.2
|
||||||
/var/db/Makefile
|
/var/db/Makefile
|
||||||
%files -n nss_hesiod
|
%files -n nss_hesiod
|
||||||
/%{_lib}/libnss_hesiod.so.2
|
%{_libdir}/libnss_hesiod.so.2
|
||||||
%doc hesiod/README.hesiod
|
%doc hesiod/README.hesiod
|
||||||
%files nss-devel
|
%files nss-devel
|
||||||
%{_libdir}/libnss_compat.so
|
%{_libdir}/libnss_compat.so
|
||||||
@ -2443,7 +2452,7 @@ update_gconv_modules_cache ()
|
|||||||
%{_libdir}/libnss_hesiod.so
|
%{_libdir}/libnss_hesiod.so
|
||||||
|
|
||||||
%files -n libnsl
|
%files -n libnsl
|
||||||
/%{_lib}/libnsl.so.1
|
%{_libdir}/libnsl.so.1
|
||||||
|
|
||||||
%if %{with benchtests}
|
%if %{with benchtests}
|
||||||
%files benchtests
|
%files benchtests
|
||||||
@ -2466,10 +2475,12 @@ update_gconv_modules_cache ()
|
|||||||
%{_prefix}/lib/*.o
|
%{_prefix}/lib/*.o
|
||||||
%{_prefix}/lib/*.so*
|
%{_prefix}/lib/*.so*
|
||||||
%{_prefix}/lib/audit/*
|
%{_prefix}/lib/audit/*
|
||||||
/lib/*.so*
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 5 2024 Florian Weimer <fweimer@redhat.com> - 2.39-26
|
||||||
|
- Complete Features/UsrMove (aka UsrMerge, MoveToUsr) transition (#1063607)
|
||||||
|
|
||||||
* Mon Nov 4 2024 Florian Weimer <fweimer@redhat.com> - 2.39-25
|
* Mon Nov 4 2024 Florian Weimer <fweimer@redhat.com> - 2.39-25
|
||||||
- Rework filelist construction
|
- Rework filelist construction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user