[isdn4k-utils] install everything in /usr
Harald Hoyer
harald at fedoraproject.org
Wed Jan 25 19:54:11 UTC 2012
commit 06a596eaf903dbc188e9904d558a47ff48c78bad
Author: Harald Hoyer <harald at redhat.com>
Date: Wed Jan 25 18:44:20 2012 +0100
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.
isdn4k-utils.spec | 39 ++++++++++++++++++++-------------------
1 files changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/isdn4k-utils.spec b/isdn4k-utils.spec
index a735b38..c83cfde 100644
--- a/isdn4k-utils.spec
+++ b/isdn4k-utils.spec
@@ -6,7 +6,7 @@
Summary: Utilities for configuring an ISDN subsystem
Name: isdn4k-utils
Version: 3.2
-Release: 80%{?dist}
+Release: 81%{?dist}
License: GPLv2+ and GPL+ and MIT and BSD and zlib
Group: Applications/System
Url: http://www.isdn4linux.de/
@@ -52,6 +52,9 @@ Requires: udev >= 039-10.14.EL4
Requires: hwdata >= 0.146.18.EL-1
Requires: initscripts >= 5.92
Requires(pre): coreutils, chkconfig, /sbin/service, bzip2
+Conflicts: filesystem < 3
+Conflicts: udev <= 179-1
+Requires: systemd-units >= 39-2
BuildRequires: openjade
BuildRequires: linuxdoc-tools
@@ -70,7 +73,7 @@ BuildRequires: imake
BuildRequires: automake
BuildRequires: libtool
BuildRequires: ppp-devel
-BuildRequires: systemd-units
+BuildRequires: systemd-units >= 39-2
ExcludeArch: s390 s390x
@@ -182,7 +185,7 @@ echo "CONFIG_FAQDIR='/usr/share/doc/isdn4k-utils'" >>.config
echo "CONFIG_DATADIR='%{_datadir}/isdn'" >>.config
echo "LIBDIR='%{_libdir}'" >>.config
echo "CONFIG_FIRMWAREDIR='%{_datadir}/isdn'" >>.config
-echo "CONFIG_CARD_SBINDIR='/sbin'" >>.config
+echo "CONFIG_CARD_SBINDIR='%{_sbindir}'" >>.config
sed -e "s,',,g" .config > .config.h
make subconfig
@@ -202,7 +205,8 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}/dev \
%{buildroot}/etc/{rc.d/init.d,ppp,isdn} \
%{buildroot}/var/{log/vbox,spool/vbox,lock/isdn} \
- %{buildroot}%{_prefix}/{sbin,bin} \
+ %{buildroot}%{_sbindir} \
+ %{buildroot}%{_bindir} \
%{buildroot}%{_mandir}/man1 \
%{buildroot}%{_mandir}/man4 \
%{buildroot}%{_mandir}/man8
@@ -262,17 +266,6 @@ install -m0755 -d %{buildroot}%{_unitdir}
install -m0644 %{SOURCE11} %{buildroot}%{_unitdir}/isdn.service
install -m0644 %{SOURCE8} %{buildroot}%{_unitdir}/capi.service
-# move some binaries into /sbin
-mkdir -p %{buildroot}/sbin
-pushd %{buildroot}%{_sbindir}/
-for i in * ; do
- case $i in
- imon|rcapid|vboxgetty|vboxputty|imontty) continue ;;
- *) mv $i %{buildroot}/sbin && ln -fs ../../sbin/$i .
- esac
-done
-popd
-
%if 0%{?fedora} < 14
# install userisdnctl,isdnup
install -m 755 isdnctrl/userisdnctl %{buildroot}%{_sbindir}/
@@ -300,8 +293,8 @@ echo "# config files" >> %{buildroot}/etc/ppp/ioptions
# install 40-isdn.rules, it's dropped from udev in F14 and later
%if 0%{?fedora} > 13 || 0%{?rhel} > 6
- mkdir -p %{buildroot}/lib/udev/rules.d/
- install -m 644 %{SOURCE10} %{buildroot}/lib/udev/rules.d/
+ mkdir -p %{buildroot}%{_libdir}/udev/rules.d/
+ install -m 644 %{SOURCE10} %{buildroot}%{_libdir}/udev/rules.d/
%endif
# touch zone-de-dtag.cdb, create it later in %post to avoid multilib issue
@@ -347,7 +340,7 @@ rm -rf %{buildroot}
%config(noreplace) /etc/capi.conf
%config(noreplace) /etc/capi20.conf
%if 0%{?fedora} > 13 || 0%{?rhel} > 6
-/lib/udev/rules.d/40-isdn.rules
+%{_libdir}/udev/rules.d/40-isdn.rules
%endif
%{_libdir}/pppd
%{_datadir}/isdn/*.dat
@@ -355,7 +348,11 @@ rm -rf %{buildroot}
%{_libdir}/*.so.*
%{_libdir}/capi/*.so.*
%defattr(755,root,root,755)
-/sbin/*
+%{_sbindir}/avmcapictrl
+%{_sbindir}/hisaxctrl
+%{_sbindir}/icnctrl
+%{_sbindir}/isdnctrl
+%{_sbindir}/pcbitctl
%{_libexecdir}/isdn
%{_unitdir}/isdn.service
%{_unitdir}/capi.service
@@ -439,6 +436,10 @@ rm -rf %{buildroot}
%changelog
+* Wed Jan 25 2012 Harald Hoyer <harald at redhat.com> 3.2-81
+- install everything in /usr
+ https://fedoraproject.org/wiki/Features/UsrMove
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2-80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list