diff --git a/glibc.spec b/glibc.spec index fb3cd14..ea7b3e1 100644 --- a/glibc.spec +++ b/glibc.spec @@ -47,6 +47,7 @@ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: glibc-profile < 2.4 Obsoletes: nss_db Provides: ldconfig +Provides: /sbin/ldconfig # The dynamic linker supports DT_GNU_HASH Provides: rtld(GNU_HASH) Requires: glibc-common = %{version}-%{release} @@ -65,6 +66,8 @@ BuildRequires: systemtap-sdt-devel BuildRequires: gcc >= 3.2 %define enablekernel 2.6.32 Conflicts: kernel < %{enablekernel} +Conflicts: filesystem < 3 +Provides: %{_libdir}/libc.so.6 %define target %{_target_cpu}-redhat-linux %ifarch %{arm} %define target %{_target_cpu}-redhat-linuxeabi @@ -109,6 +112,7 @@ Linux system will not function. Summary: The GNU libc libraries (optimized for running under Xen) Group: System Environment/Libraries Requires: glibc = %{version}-%{release}, glibc-utils = %{version}-%{release} +Conflicts: filesystem < 3 %description xen The standard glibc package is optimized for native kernels and does not @@ -191,6 +195,8 @@ Requires(pre): /usr/sbin/useradd, coreutils Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units, /usr/sbin/userdel +Conflicts: systemd < 38 +Conflicts: filesystem < 3 %description -n nscd Nscd caches name service lookups and can dramatically improve @@ -411,6 +417,11 @@ GCC=`cat Gcc` rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT +ln -fs usr/bin $RPM_BUILD_ROOT/bin +ln -fs usr/sbin $RPM_BUILD_ROOT/sbin +ln -fs usr/lib $RPM_BUILD_ROOT/lib +ln -fs usr/%{_lib} $RPM_BUILD_ROOT/%{_lib} + make -j1 install_root=$RPM_BUILD_ROOT install -C build-%{target} %{silentrules} chmod +x $RPM_BUILD_ROOT%{_prefix}/libexec/pt_chown %ifnarch %{auxarches} @@ -616,7 +627,7 @@ rm -f $RPM_BUILD_ROOT%{_sbindir}/rpcinfo } | sort > rpm.filelist mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{_lib} -mv -f $RPM_BUILD_ROOT/%{_lib}/lib{pcprofile,memusage}.so $RPM_BUILD_ROOT%{_prefix}/%{_lib} +#mv -f $RPM_BUILD_ROOT/%{_lib}/lib{pcprofile,memusage}.so $RPM_BUILD_ROOT%{_prefix}/%{_lib} for i in $RPM_BUILD_ROOT%{_prefix}/bin/{xtrace,memusage}; do sed -e 's~=/%{_lib}/libpcprofile.so~=%{_prefix}/%{_lib}/libpcprofile.so~' \ -e 's~=/%{_lib}/libmemusage.so~=%{_prefix}/%{_lib}/libmemusage.so~' \ @@ -654,7 +665,7 @@ sed -i -e '\|%{_prefix}/%{_lib}/lib.*\.a|d' \ grep '%{_prefix}/bin' < rpm.filelist >> common.filelist grep '%{_prefix}/sbin/[^gi]' < rpm.filelist >> common.filelist grep '%{_prefix}/share' < rpm.filelist | \ - grep -v -e '%{_prefix}/share/zoneinfo' -e '%%dir %{prefix}/share' \ + grep -v -e '%{_prefix}/share/zoneinfo' -e '%%dir %{_prefix}/share' \ >> common.filelist sed -i -e '\|%{_prefix}/bin|d' \ @@ -882,6 +893,15 @@ touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid} mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig > $RPM_BUILD_ROOT/var/cache/ldconfig/aux-cache +rm -f $RPM_BUILD_ROOT/bin +rm -f $RPM_BUILD_ROOT/sbin +rm -f $RPM_BUILD_ROOT/lib +rm -f $RPM_BUILD_ROOT/lib64 + +sed -i -e 's#^/lib#/usr/lib#g' *.filelist +sed -i -e 's#^/bin#/usr/bin#g' *.filelist +sed -i -e 's#^/sbin#/usr/sbin#g' *.filelist + %pre -p -- Check that the running kernel is new enough required = '%{enablekernel}' @@ -1011,30 +1031,30 @@ rm -f *.filelist* %files -f rpm.filelist %defattr(-,root,root) %ifarch %{rtkaioarches} -%dir /%{_lib}/rtkaio +%dir %{_libdir}/rtkaio %endif %if %{buildxen} && !%{xenpackage} -%dir /%{_lib}/%{nosegneg_subdir_base} -%dir /%{_lib}/%{nosegneg_subdir} +%dir %{_libdir}/%{nosegneg_subdir_base} +%dir %{_libdir}/%{nosegneg_subdir} %ifarch %{rtkaioarches} -%dir /%{_lib}/rtkaio/%{nosegneg_subdir_base} -%dir /%{_lib}/rtkaio/%{nosegneg_subdir} +%dir %{_libdir}/rtkaio/%{nosegneg_subdir_base} +%dir %{_libdir}/rtkaio/%{nosegneg_subdir} %endif %endif %if %{buildpower6} -%dir /%{_lib}/power6 -%dir /%{_lib}/power6x +%dir %{_libdir}/power6 +%dir %{_libdir}/power6x %ifarch %{rtkaioarches} -%dir /%{_lib}/rtkaio/power6 -%dir /%{_lib}/rtkaio/power6x +%dir %{_libdir}/rtkaio/power6 +%dir %{_libdir}/rtkaio/power6x %endif %endif %ifarch s390x -/lib/ld64.so.1 +%{_libdir}/ld64.so.1 %endif %ifarch ia64 %if "%{_lib}" == "lib64" -/lib/ld-linux-ia64.so.2 +%{_libdir}/ld-linux-ia64.so.2 %endif %endif %verify(not md5 size mtime) %config(noreplace) /etc/localtime @@ -1043,7 +1063,7 @@ rm -f *.filelist* %verify(not md5 size mtime) %config(noreplace) /etc/rpc %dir /etc/ld.so.conf.d %dir %{_prefix}/libexec/getconf -%dir %{_prefix}/%{_lib}/gconv +%dir %{_libdir}/gconv %dir %attr(0700,root,root) /var/cache/ldconfig %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache @@ -1055,8 +1075,8 @@ rm -f *.filelist* %if %{xenpackage} %files -f nosegneg.filelist xen %defattr(-,root,root) -%dir /%{_lib}/%{nosegneg_subdir_base} -%dir /%{_lib}/%{nosegneg_subdir} +%dir %{_libdir}/%{nosegneg_subdir_base} +%dir %{_libdir}/%{nosegneg_subdir} %endif %ifnarch %{auxarches} @@ -1086,8 +1106,8 @@ rm -f *.filelist* %config(noreplace) /etc/nscd.conf %dir %attr(0755,root,root) /var/run/nscd %dir %attr(0755,root,root) /var/db/nscd -/lib/systemd/system/nscd.service -/lib/systemd/system/nscd.socket +/usr/lib/systemd/system/nscd.service +/usr/lib/systemd/system/nscd.socket /usr/lib/tmpfiles.d/nscd.conf %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid %attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket