diff --git a/glibc.fix.sbin.patch b/glibc.fix.sbin.patch new file mode 100644 index 0000000..6f79736 --- /dev/null +++ b/glibc.fix.sbin.patch @@ -0,0 +1,21 @@ +diff -urN glibc-58f7431fd77c0a6dd8df08d50c51ee3e7f09825f/elf/Makefile glibc-58f7431fd77c0a6dd8df08d50c51ee3e7f09825f-patched/elf/Makefile +--- glibc-58f7431fd77c0a6dd8df08d50c51ee3e7f09825f/elf/Makefile 2023-08-06 13:15:21.000000000 +0300 ++++ glibc-58f7431fd77c0a6dd8df08d50c51ee3e7f09825f-patched/elf/Makefile 2023-09-30 17:04:39.312383307 +0300 +@@ -210,7 +210,7 @@ + others = sprof sln + install-bin = sprof + others-static = sln +-install-rootsbin = sln ++install-sbin = sln + sln-modules := static-stubs + extra-objs += $(sln-modules:=.o) + +@@ -218,7 +218,7 @@ + ifeq (yes,$(build-shared)) + others-static += ldconfig + others += ldconfig +-install-rootsbin += ldconfig ++install-sbin += ldconfig + + ldconfig-modules := \ + cache \ diff --git a/glibc.spec b/glibc.spec index 31cfc0b..3f99054 100644 --- a/glibc.spec +++ b/glibc.spec @@ -150,7 +150,7 @@ Version: 2.37 #Source0: http://ftp.gnu.org/gnu/glibc/%{oname}-%{version}.tar.xz # use ./upd.sh to make a tarball and automatically update Release Source0: glibc-%{commit}.tar.xz -Release: 3.git%{commit_short}.1 +Release: 3.git%{commit_short}.2 License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ Group: System/Libraries Url: http://www.gnu.org/software/libc/ @@ -206,6 +206,8 @@ Patch1050: https://803950.bugs.gentoo.org/attachment.cgi?id=757176#/nss-dont-cra # https://www.phoronix.com/news/Glibc-2.36-EAC-Problems # https://sourceware.org/bugzilla/show_bug.cgi?id=29456 Patch1051: https://raw.githubusercontent.com/archlinux/svntogit-packages/e1d69d80d07494e3c086ee2c5458594d5261d2e4/trunk/reenable_DT_HASH.patch +# Rosa patch rosa2023.1: /usr merge +Patch1052: glibc.fix.sbin.patch BuildRequires: autoconf2.5 BuildRequires: %{cross_prefix}binutils >= 2.30-7 @@ -249,6 +251,7 @@ Provides: should-restart = system %define libnssfiles %mklibname nss_files 2 # FIXME remove at some point Provides: /sbin/ldconfig +Provides: /usr/sbin/ldconfig Provides: %{libnssfiles} = %{EVRD} Provides: ldconfig = %{EVRD} Provides: ld.so = %{EVRD} @@ -422,15 +425,15 @@ if st.type ~= "link" then %ifarch riscv64 posix.symlink("%{_libdir}/ld-linux-riscv64-lp64d.so.1", "/%{_lib}/ld-linux-riscv64-lp64d.so.1") %endif - posix.symlink("/sbin/ldconfig", "%{_bindir}/ldconfig") + posix.symlink("/usr/sbin/ldconfig", "%{_bindir}/ldconfig") end -- (3) Rebuild ld.so.cache early. -- If the format of the cache changes then we need to rebuild -- the cache early to avoid any problems running binaries with -- the new glibc. -if not rpm.execute("/sbin/ldconfig") then - io.stdout:write ("Error: call to /sbin/ldconfig failed.\n") +if not rpm.execute("/usr/sbin/ldconfig") then + io.stdout:write ("Error: call to /usr/sbin/ldconfig failed.\n") end -- (4) Update gconv modules cache. @@ -457,10 +460,10 @@ then end %transfiletriggerin -p -P 2000000 -- /lib /lib64 /usr/lib /usr/lib64 /etc/ld.so.conf.d -rpm.execute("/sbin/ldconfig", "-X") +rpm.execute("/usr/sbin/ldconfig", "-X") %transfiletriggerpostun -p -P 2000000 -- /lib /lib64 /usr/lib /usr/lib64 /etc/ld.so.conf.d -rpm.execute("/sbin/ldconfig", "-X") +rpm.execute("/usr/sbin/ldconfig", "-X") %filetriggerin -p -P 2000000 -- /lib /lib64 /usr/lib /etc/ld.so.conf.d -- Transaction-level runs of ldconfigs are not enough: @@ -470,10 +473,10 @@ rpm.execute("/sbin/ldconfig", "-X") -- TODO: remove /lib64 from non-transaction triggers when it becomes a symlink to /usr/lib64 -- ld-linux finds libraries in standard paths (now /lib64 is not a standard path after /usr merge!) -- even if ldconfig was not run. -rpm.execute("/sbin/ldconfig", "-X") +rpm.execute("/usr/sbin/ldconfig", "-X") %filetriggerpostun -p -P 2000000 -- /lib /lib64 /usr/lib /etc/ld.so.conf.d -rpm.execute("/sbin/ldconfig", "-X") +rpm.execute("/usr/sbin/ldconfig", "-X") %endif %posttrans -p @@ -504,7 +507,7 @@ if st.type ~= "link" then %ifarch riscv64 posix.symlink("%{_libdir}/ld-linux-riscv64-lp64d.so.1", "/%{_lib}/ld-linux-riscv64-lp64d.so.1") %endif - posix.symlink("%{_bindir}/ldconfig", "/sbin/ldconfig") + posix.symlink("%{_bindir}/ldconfig", "/usr/sbin/ldconfig") end %if %{with locales} @@ -747,7 +750,7 @@ LANG variable to their preferred language in their %endif %endif %{_localedir}/locale.alias -/sbin/sln +%{_sbindir}/sln %{_prefix}/libexec/getconf %endif %if %isarch %{x86_64} @@ -807,7 +810,7 @@ LANG variable to their preferred language in their %{_bindir}/tzselect %{_bindir}/zdump %{_sbindir}/iconvconfig -/sbin/ldconfig +%{_sbindir}/ldconfig %ghost %{_sysconfdir}/ld.so.cache %dir %{_var}/cache/ldconfig %ghost %{_var}/cache/ldconfig/aux-cache @@ -1716,18 +1719,12 @@ EOF install -m755 build-%{_target_cpu}-linux/elf/ldd %{buildroot}%{_bindir}/ldd %endif -# usrmerge + binmerge -# umask me when we do usr merge -#mv %{buildroot}/sbin/* %{buildroot}%{_bindir}/ -#mv %{buildroot}%{_prefix}/sbin/* %{buildroot}%{_bindir}/ -#rmdir %{buildroot}/sbin %{buildroot}%{_prefix}/sbin - # ldconfig cache mkdir -p %{buildroot}%{_var}/cache/ldconfig truncate -s 0 %{buildroot}%{_var}/cache/ldconfig/aux-cache # Note: This has to happen before creating /etc/ld.so.conf. # ldconfig is statically linked, so we can use the new version. -%{buildroot}/sbin/ldconfig -N -r %{buildroot} +%{buildroot}%{_sbindir}/ldconfig -N -r %{buildroot} echo "include /etc/ld.so.conf.d/*.conf" > %{buildroot}%{_sysconfdir}/ld.so.conf chmod 644 %{buildroot}%{_sysconfdir}/ld.so.conf