[shellinabox/el5] Update systemd requirements and refresh distro checks for fedpkg > 1.10
Simone Caronni
slaanesh at fedoraproject.org
Wed Oct 17 08:43:07 UTC 2012
commit b1ef160350b86773bdc7d13b59438d8d14671d45
Author: Simone Caronni <negativo17 at gmail.com>
Date: Wed Oct 17 10:42:36 2012 +0200
Update systemd requirements and refresh distro checks for fedpkg > 1.10
shellinabox.spec | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/shellinabox.spec b/shellinabox.spec
index 1c81a87..3e3a044 100644
--- a/shellinabox.spec
+++ b/shellinabox.spec
@@ -18,18 +18,30 @@ Patch0: %{name}-2.14-fixkeys.patch
BuildRequires: openssl-devel
BuildRequires: zlib-devel
-%if 0%{?fedora} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: systemd-units
-Requires(post): systemd-sysv
+%endif
+
+%if 0%{?fedora} == 16 || 0%{?fedora} == 17
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
-%else
+%endif
+
+%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
+Requires(post): systemd-sysv
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+%endif
+
+%if 0%{?rhel} == 5 || 0%{?rhel} == 6
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service
%endif
+
Requires(pre): shadow-utils
%description
@@ -63,7 +75,7 @@ install -p -m 644 shellinabox/white-on-black.css %{buildroot}%{_datadir}/%{name}
install -p -m 644 shellinabox/color.css %{buildroot}%{_datadir}/%{name}
install -p -m 644 shellinabox/monochrome.css %{buildroot}%{_datadir}/%{name}
-%if 0%{?fedora} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel} >= 7
# Systemd unit files
install -p -m 644 -D %{SOURCE2} %{buildroot}%{_unitdir}/shellinaboxd.service
@@ -85,9 +97,7 @@ getent passwd %username >/dev/null || useradd -r -s /sbin/nologin \
-d %{_sharedstatedir}/shellinabox -M -c 'Shellinabox' -g %username %username &>/dev/null || :
exit 0
-# Until this is fixed upstream in fedpkg, leave it like this
-# http://permalink.gmane.org/gmane.linux.redhat.fedora.devel/168291
-%if (0%{?fedora} == 16 || 0%{?fedora} == 17) && !0%{?rhel}
+%if 0%{?fedora} == 16 || 0%{?fedora} == 17
%post
if [ $1 -eq 1 ] ; then
@@ -151,7 +161,7 @@ fi
%{_mandir}/man1/shellinaboxd.1.*
%{_datadir}/%{name}
%{_sbindir}/shellinaboxd
-%if 0%{?fedora} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel} >= 7
%{_unitdir}/shellinaboxd.service
%else
%{_initrddir}/shellinaboxd
More information about the scm-commits
mailing list