From 3c830524423b1d77e7bd1de142e7aeb47c9a00f1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 25 Jan 2012 18:43:32 +0100 Subject: [PATCH] install everything in /usr This patch is needed for the /usr-move feature https://fedoraproject.org/wiki/Features/UsrMove This package requires now 'filesystem' >= 3, which is only installable on a system which has /bin, /sbin, /lib, /lib64 as symlinks to /usr and not regular directories. The 'filesystem' package acts as a guard, to prevent *this* package to be installed on old unconverted systems. New installations will have the 'filesystem' >=3 layout right away, old installations need to be converted with anaconda or dracut first; only after that, the 'filesystem' package, and also *this* package can be installed. Packages *should* not install files in /bin, /sbin, /lib, /lib64, but only in the corresponding directories in /usr. Packages *must* not install conflicting files with the same names in the corresponding directories in / and /usr. Especially compatibility symlinks must not be installed. Feel free to modify any of the changes to the spec file, but keep the above in mind. --- iputils.spec | 59 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/iputils.spec b/iputils.spec index 30df20b..b38af2c 100644 --- a/iputils.spec +++ b/iputils.spec @@ -1,7 +1,7 @@ Summary: Network monitoring tools including ping Name: iputils Version: 20101006 -Release: 13%{?dist} +Release: 14%{?dist} License: BSD URL: http://www.skbuff.net/iputils Group: System Environment/Daemons @@ -43,6 +43,12 @@ Requires(preun): /sbin/chkconfig Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units +BuildRequires: systemd-units +Conflicts: filesystem < 3 +Provides: /bin/ping +Provides: /bin/ping6 +Provides: /sbin/arping +Provides: /sbin/rdisc %description The iputils package contains basic utilities for monitoring a network, @@ -99,24 +105,23 @@ make -C doc man rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} -mkdir -p ${RPM_BUILD_ROOT}/{bin,sbin} -mkdir -p $RPM_BUILD_ROOT/lib/systemd/system +mkdir -p ${RPM_BUILD_ROOT}%{_bindir} +mkdir -p $RPM_BUILD_ROOT/%{_unitdir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -c clockdiff ${RPM_BUILD_ROOT}%{_sbindir}/ -install -cp arping ${RPM_BUILD_ROOT}/sbin/ -ln -s /sbin/arping ${RPM_BUILD_ROOT}%{_sbindir}/arping -install -cp ping ${RPM_BUILD_ROOT}/bin/ -install -cp ifenslave ${RPM_BUILD_ROOT}/sbin/ -install -cp rdisc ${RPM_BUILD_ROOT}/sbin/ -install -cp ping6 ${RPM_BUILD_ROOT}/bin/ -install -cp tracepath ${RPM_BUILD_ROOT}/bin/ -install -cp tracepath6 ${RPM_BUILD_ROOT}/bin/ +install -cp arping ${RPM_BUILD_ROOT}%{_sbindir}/ +install -cp ping ${RPM_BUILD_ROOT}%{_bindir}/ +install -cp ifenslave ${RPM_BUILD_ROOT}%{_sbindir}/ +install -cp rdisc ${RPM_BUILD_ROOT}%{_sbindir}/ +install -cp ping6 ${RPM_BUILD_ROOT}%{_bindir}/ +install -cp tracepath ${RPM_BUILD_ROOT}%{_bindir}/ +install -cp tracepath6 ${RPM_BUILD_ROOT}%{_bindir}/ mkdir -p ${RPM_BUILD_ROOT}%{_bindir} -ln -sf /bin/ping6 ${RPM_BUILD_ROOT}%{_sbindir} -ln -sf /bin/tracepath ${RPM_BUILD_ROOT}%{_sbindir} -ln -sf /bin/tracepath6 ${RPM_BUILD_ROOT}%{_sbindir} +ln -sf ../bin/ping6 ${RPM_BUILD_ROOT}%{_sbindir} +ln -sf ../bin/tracepath ${RPM_BUILD_ROOT}%{_sbindir} +ln -sf ../bin/tracepath6 ${RPM_BUILD_ROOT}%{_sbindir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8 install -cp doc/clockdiff.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/ @@ -131,14 +136,14 @@ ln -s tracepath.8.gz ${RPM_BUILD_ROOT}%{_mandir}/man8/tracepath6.8.gz install -dp ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d install -m 755 -p %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d/rdisc install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/rdisc -install -m 644 %SOURCE4 ${RPM_BUILD_ROOT}/lib/systemd/system +install -m 644 %SOURCE4 ${RPM_BUILD_ROOT}/%{_unitdir} iconv -f ISO88591 -t UTF8 RELNOTES -o RELNOTES.tmp touch -r RELNOTES RELNOTES.tmp mv -f RELNOTES.tmp RELNOTES %post -/bin/systemctl daemon-reload >/dev/null 2>&1 || : +%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || : %preun if [ $1 = 0 ]; then @@ -147,7 +152,7 @@ if [ $1 = 0 ]; then fi %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : +%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || : if [ "$1" -ge "1" ]; then /bin/systemctl try-restart rdisc.service >/dev/null 2>&1 || : @@ -166,16 +171,16 @@ rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %doc RELNOTES README.bonding -/lib/systemd/system/rdisc.service +%{_unitdir}/rdisc.service %{_sbindir}/clockdiff -/sbin/arping %{_sbindir}/arping -%attr(0755,root,root) %caps(cap_net_raw=ep) /bin/ping -/sbin/ifenslave -/sbin/rdisc -%attr(0755,root,root) %caps(cap_net_raw=ep) /bin/ping6 -/bin/tracepath -/bin/tracepath6 +%{_sbindir}/arping +%attr(0755,root,root) %caps(cap_net_raw=ep) %{_bindir}/ping +%{_sbindir}/ifenslave +%{_sbindir}/rdisc +%attr(0755,root,root) %caps(cap_net_raw=ep) %{_bindir}/ping6 +%{_bindir}/tracepath +%{_bindir}/tracepath6 %{_sbindir}/ping6 %{_sbindir}/tracepath %{_sbindir}/tracepath6 @@ -186,6 +191,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_sysconfdir}/rc.d/init.d/rdisc %changelog +* Wed Jan 25 2012 Harald Hoyer 20101006-14 +- install everything in /usr + https://fedoraproject.org/wiki/Features/UsrMove + * Fri Jan 13 2012 Fedora Release Engineering - 20101006-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild