[cyrus-sasl] temporarilly revert systemd units

Jan F. Chadima jfch2222 at fedoraproject.org
Thu Apr 28 16:20:19 UTC 2011


commit 842cad7440e1e0e2671015e28ba4d205e071bf19
Author: Jan F <jfch at kuscenko.localdomain6>
Date:   Thu Apr 28 18:19:48 2011 +0200

    temporarilly revert systemd units

 cyrus-sasl.spec |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/cyrus-sasl.spec b/cyrus-sasl.spec
index b0a4c95..7d210a8 100644
--- a/cyrus-sasl.spec
+++ b/cyrus-sasl.spec
@@ -4,11 +4,12 @@
 
 %define _plugindir2 %{_libdir}/sasl2
 %define bootstrap_cyrus_sasl 0
+%define systemd		0
 
 Summary: The Cyrus SASL library
 Name: cyrus-sasl
 Version: 2.1.23
-Release: 18%{?dist}
+Release: 19%{?dist}
 License: BSD with advertising
 Group: System Environment/Libraries
 # Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
@@ -291,8 +292,10 @@ install -m755 -d $RPM_BUILD_ROOT/var/run/saslauthd
 # Install the init script for saslauthd and the init script's config file.
 install -m755 -d $RPM_BUILD_ROOT/etc/rc.d/init.d $RPM_BUILD_ROOT/etc/sysconfig
 install -m755 -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/saslauthd
+%if %{systemd}
 install -d -m755 $RPM_BUILD_ROOT/%{_unitdir}
 install -m644 -p %{SOURCE5} $RPM_BUILD_ROOT/%{_unitdir}/saslauthd
+%endif
 install -m644 -p %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/saslauthd
 install -m755 -d $RPM_BUILD_ROOT/etc/tmpfiles.d
 install -m644 -p %{SOURCE11} $RPM_BUILD_ROOT/etc/tmpfiles.d/saslauthd.conf
@@ -324,11 +327,13 @@ useradd -r -g %{username} -d %{homedir} -s /sbin/nologin \
 exit 0
 
 %post
+%if %{systemd}
 if [ -x /bin/systemctl ]; then
 	if [ $1 -eq 1 ]; then
 		/bin/systemctl daemon-reload >/dev/null 2>&1 || :
 	fi
 fi
+%endif
 if [ -x /sbin/chkconfig ]; then
 	/sbin/chkconfig --add saslauthd
 fi
@@ -336,10 +341,12 @@ exit 0
 
 %preun
 if [ $1 -eq 0 ]; then
+%if %{systemd}
 	if [ -x /bin/systemctl ]; then
 		/bin/systemctl disable saslauthd.service >/dev/null 2>&1 || :
 		/bin/systemctl stop saslauthd.service >/dev/null 2>&1 || :
 	fi
+%endif
 	if [ -x /sbin/service ]; then
         	/sbin/service saslauthd stop >/dev/null 2>&1 || :
 	fi
@@ -350,12 +357,14 @@ fi
 exit 0
 
 %postun
+%if %{systemd}
 if [ -x /bin/systemctl ]; then
 	/bin/systemctl daemon-reload >/dev/null 2>&1 || :
 	if [ $1 -ge 1 ]; then
 		/bin/systemctl try-restart saslauthd.service >/dev/null 2>&1 || :
 	fi
 fi
+%endif
 if [ -x /sbin/service ];then
 	if [ $1 -ne 0 ]; then
         	/sbin/service saslauthd condrestart 2>&1 > /dev/null
@@ -376,7 +385,9 @@ exit 0
 %{_sbindir}/testsaslauthd
 %config(noreplace) /etc/sysconfig/saslauthd
 /etc/rc.d/init.d/saslauthd
+%if %{systemd}
 %{_unitdir}/saslauthd
+%endif
 /etc/tmpfiles.d/saslauthd.conf
 %ghost /var/run/saslauthd
 
@@ -430,6 +441,9 @@ exit 0
 %{_sbindir}/sasl2-shared-mechlist
 
 %changelog
+* Thu Apr 28 2011 Jan F. Chadima <jchadima at redhat.com> - 2.1.23-19
+- temporarilly revert systemd units
+
 * Tue Apr 26 2011 Jan F. Chadima <jchadima at redhat.com> - 2.1.23-18
 - update scriptlets
 


More information about the scm-commits mailing list