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.
This commit is contained in:
Harald Hoyer 2012-01-25 18:43:32 +01:00
parent f4b52c798e
commit 3c83052442

View File

@ -1,7 +1,7 @@
Summary: Network monitoring tools including ping Summary: Network monitoring tools including ping
Name: iputils Name: iputils
Version: 20101006 Version: 20101006
Release: 13%{?dist} Release: 14%{?dist}
License: BSD License: BSD
URL: http://www.skbuff.net/iputils URL: http://www.skbuff.net/iputils
Group: System Environment/Daemons Group: System Environment/Daemons
@ -43,6 +43,12 @@ Requires(preun): /sbin/chkconfig
Requires(post): systemd-units Requires(post): systemd-units
Requires(preun): systemd-units Requires(preun): systemd-units
Requires(postun): 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 %description
The iputils package contains basic utilities for monitoring a network, The iputils package contains basic utilities for monitoring a network,
@ -99,24 +105,23 @@ make -C doc man
rm -rf ${RPM_BUILD_ROOT} rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
mkdir -p ${RPM_BUILD_ROOT}/{bin,sbin} mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -c clockdiff ${RPM_BUILD_ROOT}%{_sbindir}/ install -c clockdiff ${RPM_BUILD_ROOT}%{_sbindir}/
install -cp arping ${RPM_BUILD_ROOT}/sbin/ install -cp arping ${RPM_BUILD_ROOT}%{_sbindir}/
ln -s /sbin/arping ${RPM_BUILD_ROOT}%{_sbindir}/arping install -cp ping ${RPM_BUILD_ROOT}%{_bindir}/
install -cp ping ${RPM_BUILD_ROOT}/bin/ install -cp ifenslave ${RPM_BUILD_ROOT}%{_sbindir}/
install -cp ifenslave ${RPM_BUILD_ROOT}/sbin/ install -cp rdisc ${RPM_BUILD_ROOT}%{_sbindir}/
install -cp rdisc ${RPM_BUILD_ROOT}/sbin/ install -cp ping6 ${RPM_BUILD_ROOT}%{_bindir}/
install -cp ping6 ${RPM_BUILD_ROOT}/bin/ install -cp tracepath ${RPM_BUILD_ROOT}%{_bindir}/
install -cp tracepath ${RPM_BUILD_ROOT}/bin/ install -cp tracepath6 ${RPM_BUILD_ROOT}%{_bindir}/
install -cp tracepath6 ${RPM_BUILD_ROOT}/bin/
mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
ln -sf /bin/ping6 ${RPM_BUILD_ROOT}%{_sbindir} ln -sf ../bin/ping6 ${RPM_BUILD_ROOT}%{_sbindir}
ln -sf /bin/tracepath ${RPM_BUILD_ROOT}%{_sbindir} ln -sf ../bin/tracepath ${RPM_BUILD_ROOT}%{_sbindir}
ln -sf /bin/tracepath6 ${RPM_BUILD_ROOT}%{_sbindir} ln -sf ../bin/tracepath6 ${RPM_BUILD_ROOT}%{_sbindir}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8 mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
install -cp doc/clockdiff.8 ${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 -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 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 %{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 iconv -f ISO88591 -t UTF8 RELNOTES -o RELNOTES.tmp
touch -r RELNOTES RELNOTES.tmp touch -r RELNOTES RELNOTES.tmp
mv -f RELNOTES.tmp RELNOTES mv -f RELNOTES.tmp RELNOTES
%post %post
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
%preun %preun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
@ -147,7 +152,7 @@ if [ $1 = 0 ]; then
fi fi
%postun %postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
if [ "$1" -ge "1" ]; then if [ "$1" -ge "1" ]; then
/bin/systemctl try-restart rdisc.service >/dev/null 2>&1 || : /bin/systemctl try-restart rdisc.service >/dev/null 2>&1 || :
@ -166,16 +171,16 @@ rm -rf ${RPM_BUILD_ROOT}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc RELNOTES README.bonding %doc RELNOTES README.bonding
/lib/systemd/system/rdisc.service %{_unitdir}/rdisc.service
%{_sbindir}/clockdiff %{_sbindir}/clockdiff
/sbin/arping
%{_sbindir}/arping %{_sbindir}/arping
%attr(0755,root,root) %caps(cap_net_raw=ep) /bin/ping %{_sbindir}/arping
/sbin/ifenslave %attr(0755,root,root) %caps(cap_net_raw=ep) %{_bindir}/ping
/sbin/rdisc %{_sbindir}/ifenslave
%attr(0755,root,root) %caps(cap_net_raw=ep) /bin/ping6 %{_sbindir}/rdisc
/bin/tracepath %attr(0755,root,root) %caps(cap_net_raw=ep) %{_bindir}/ping6
/bin/tracepath6 %{_bindir}/tracepath
%{_bindir}/tracepath6
%{_sbindir}/ping6 %{_sbindir}/ping6
%{_sbindir}/tracepath %{_sbindir}/tracepath
%{_sbindir}/tracepath6 %{_sbindir}/tracepath6
@ -186,6 +191,10 @@ rm -rf ${RPM_BUILD_ROOT}
%{_sysconfdir}/rc.d/init.d/rdisc %{_sysconfdir}/rc.d/init.d/rdisc
%changelog %changelog
* Wed Jan 25 2012 Harald Hoyer <harald@redhat.com> 20101006-14
- install everything in /usr
https://fedoraproject.org/wiki/Features/UsrMove
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20101006-13 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20101006-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild