removing patch and updating salt.spec to 0.10.3

e9
Clint Savage 12 years ago
parent ac8d18101c
commit e559498b43

@ -1,26 +0,0 @@
From 4d65fbe3ef36e74c41d96f3c33aa3cf35ab4b09b Mon Sep 17 00:00:00 2001
From: Joseph Hall <perlhoser@gmail.com>
Date: Tue, 31 Jul 2012 05:34:27 -0600
Subject: [PATCH 12/13] Only expect args if they are actually passed in
---
salt/modules/disk.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/salt/modules/disk.py b/salt/modules/disk.py
index 0fca708..0964962 100644
--- a/salt/modules/disk.py
+++ b/salt/modules/disk.py
@@ -33,7 +33,8 @@ def usage(args=None):
cmd = 'df -kP'
else:
cmd = 'df'
- cmd = cmd + ' -' + args
+ if args:
+ cmd = cmd + ' -' + args
ret = {}
out = __salt__['cmd.run'](cmd).split('\n')
for line in out:
--
1.7.11.2

@ -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
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
fi
%preun -n salt-minion
if [ $1 -eq 0 ] ; then
if [ $1 -eq 0 ] ; then
/sbin/service salt-minion stop >/dev/null 2>&1
/sbin/chkconfig --del salt-minion
fi
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
if [ "$1" -ge "1" ] ; then
/sbin/service salt-master condrestart >/dev/null 2>&1 || :
/sbin/service salt-syndic condrestart >/dev/null 2>&1 || :
fi
fi
%postun -n salt-minion
if [ "$1" -ge "1" ] ; then
if [ "$1" -ge "1" ] ; then
/sbin/service salt-master condrestart >/dev/null 2>&1 || :
/sbin/service salt-syndic condrestart >/dev/null 2>&1 || :
fi
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
%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
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@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@gmail.com> - 0.10.2-2
- Fix upstream bug #1730 per RHBZ#845295

Loading…
Cancel
Save