[salt] removing patch and updating salt.spec to 0.10.3

Clint Savage herlo at fedoraproject.org
Tue Oct 2 18:08:24 UTC 2012


commit e559498b43b54ac12bc5ec719ad9b3f101f40fa1
Author: Clint Savage <herlo1 at gmail.com>
Date:   Tue Oct 2 12:02:36 2012 -0600

    removing patch and updating salt.spec to 0.10.3

 ...xpect-args-if-they-are-actually-passed-in.patch |   26 -----
 salt.spec                                          |  114 +++++++++++++-------
 2 files changed, 73 insertions(+), 67 deletions(-)
---
diff --git a/salt.spec b/salt.spec
index ee5a96f..df2cba8 100644
--- a/salt.spec
+++ b/salt.spec
@@ -9,8 +9,8 @@
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 
 Name: salt
-Version: 0.10.2
-Release: 2%{?dist}
+Version: 0.10.3
+Release: 1%{?dist}
 Summary: A parallel remote execution system
 
 Group:   System Environment/Daemons
@@ -24,7 +24,6 @@ Source4: %{name}-master.service
 Source5: %{name}-syndic.service
 Source6: %{name}-minion.service
 Source7: README.fedora
-Patch0: 0001-Only-expect-args-if-they-are-actually-passed-in.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch: noarch
@@ -74,6 +73,11 @@ Requires(preun): initscripts
 Requires(postun): initscripts
 
 %else
+  %if 0%{?systemd_preun:1}
+    Requires(post): systemd-units
+    Requires(preun): systemd-units
+    Requires(postun): systemd-units
+  %endif
 
 BuildRequires: systemd-units
 
@@ -107,7 +111,6 @@ Salt minion is queried and controlled from the master.
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
 
@@ -187,80 +190,109 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %{_sysconfdir}/salt/master
 %config %{_sysconfdir}/salt/master.template
 
+# less than RHEL 8 / Fedora 16
+# not sure if RHEL 7 will use systemd yet
 %if ! (0%{?rhel} >= 7 || 0%{?fedora} >= 15)
 
 %preun -n salt-master
-if [ $1 -eq 0 ] ; then
-    /sbin/service salt-master stop >/dev/null 2>&1
-    /sbin/service salt-syndic stop >/dev/null 2>&1
-    /sbin/chkconfig --del salt-master
-    /sbin/chkconfig --del salt-syndic
-fi
+  if [ $1 -eq 0 ] ; then
+      /sbin/service salt-master stop >/dev/null 2>&1
+      /sbin/service salt-syndic stop >/dev/null 2>&1
+      /sbin/chkconfig --del salt-master
+      /sbin/chkconfig --del salt-syndic
+  fi
 
 %preun -n salt-minion
-if [ $1 -eq 0 ] ; then
-    /sbin/service salt-minion stop >/dev/null 2>&1
-    /sbin/chkconfig --del salt-minion
-fi
+  if [ $1 -eq 0 ] ; then
+      /sbin/service salt-minion stop >/dev/null 2>&1
+      /sbin/chkconfig --del salt-minion
+  fi
 
 %post -n salt-master
-/sbin/chkconfig --add salt-master
-/sbin/chkconfig --add salt-syndic
+  /sbin/chkconfig --add salt-master
+  /sbin/chkconfig --add salt-syndic
 
 %post -n salt-minion
-/sbin/chkconfig --add salt-minion
+  /sbin/chkconfig --add salt-minion
 
 %postun -n salt-master
-if [ "$1" -ge "1" ] ; then
-    /sbin/service salt-master condrestart >/dev/null 2>&1 || :
-    /sbin/service salt-syndic condrestart >/dev/null 2>&1 || :
-fi
+  if [ "$1" -ge "1" ] ; then
+      /sbin/service salt-master condrestart >/dev/null 2>&1 || :
+      /sbin/service salt-syndic condrestart >/dev/null 2>&1 || :
+  fi
 
 %postun -n salt-minion
-if [ "$1" -ge "1" ] ; then
-    /sbin/service salt-master condrestart >/dev/null 2>&1 || :
-    /sbin/service salt-syndic condrestart >/dev/null 2>&1 || :
-fi
+  if [ "$1" -ge "1" ] ; then
+      /sbin/service salt-master condrestart >/dev/null 2>&1 || :
+      /sbin/service salt-syndic condrestart >/dev/null 2>&1 || :
+  fi
 
 %else
 
 %preun -n salt-master
-if [ $1 -eq 0 ] ; then
+%if 0%{?systemd_preun:1}
+  %systemd_preun salt-master.service
+%else
+  if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /bin/systemctl --no-reload disable salt-master.service > /dev/null 2>&1 || :
     /bin/systemctl stop salt-master.service > /dev/null 2>&1 || :
 
     /bin/systemctl --no-reload disable salt-syndic.service > /dev/null 2>&1 || :
     /bin/systemctl stop salt-syndic.service > /dev/null 2>&1 || :
-fi
+  fi
+%endif
 
 %preun -n salt-minion
-if [ $1 -eq 0 ] ; then
-    # Package removal, not upgrade
-    /bin/systemctl --no-reload disable salt-master.service > /dev/null 2>&1 || :
-    /bin/systemctl stop salt-master.service > /dev/null 2>&1 || :
-
-fi
+%if 0%{?systemd_preun:1}
+  %systemd_preun salt-minion.service
+%else
+  if [ $1 -eq 0 ] ; then
+      # Package removal, not upgrade
+      /bin/systemctl --no-reload disable salt-master.service > /dev/null 2>&1 || :
+      /bin/systemctl stop salt-master.service > /dev/null 2>&1 || :
+  fi
+%endif
 
 %post -n salt-master
-/bin/systemctl daemon-reload &>/dev/null || :
+%if 0%{?systemd_post:1}
+  %systemd_post salt-master.service
+%else
+  /bin/systemctl daemon-reload &>/dev/null || :
+%endif
 
 %post -n salt-minion
-/bin/systemctl daemon-reload &>/dev/null || :
+%if 0%{?systemd_post:1}
+  %systemd_post salt-minion.service
+%else
+  /bin/systemctl daemon-reload &>/dev/null || :
+%endif
 
 %postun -n salt-master
-/bin/systemctl daemon-reload &>/dev/null
-[ $1 -gt 0 ] && /bin/systemctl try-restart salt-master.service &>/dev/null || :
-[ $1 -gt 0 ] && /bin/systemctl try-restart salt-syndic.service &>/dev/null || :
+%if 0%{?systemd_post:1}
+  %systemd_postun salt-master.service
+%else
+  /bin/systemctl daemon-reload &>/dev/null
+  [ $1 -gt 0 ] && /bin/systemctl try-restart salt-master.service &>/dev/null || :
+  [ $1 -gt 0 ] && /bin/systemctl try-restart salt-syndic.service &>/dev/null || :
+%endif
 
 %postun -n salt-minion
-/bin/systemctl daemon-reload &>/dev/null
-[ $1 -gt 0 ] && /bin/systemctl try-restart salt-master.service &>/dev/null || :
-[ $1 -gt 0 ] && /bin/systemctl try-restart salt-syndic.service &>/dev/null || :
+%if 0%{?systemd_post:1}
+  %systemd_postun salt-minion.service
+%else
+  /bin/systemctl daemon-reload &>/dev/null
+  [ $1 -gt 0 ] && /bin/systemctl try-restart salt-master.service &>/dev/null || :
+  [ $1 -gt 0 ] && /bin/systemctl try-restart salt-syndic.service &>/dev/null || :
+%endif
 
 %endif
 
 %changelog
+* Tue Oct 2 2012 Clint Savage <herlo1 at gmail.com> - 0.10.3-1
+- Moved to upstream release 0.10.3
+- Added systemd scriplets (RHBZ#850408)
+
 * Thu Aug 2 2012 Clint Savage <herlo1 at gmail.com> - 0.10.2-2
 - Fix upstream bug #1730 per RHBZ#845295
 


More information about the scm-commits mailing list