diff --git a/0002-Fix-systemd-service-status.patch b/0002-Fix-systemd-service-status.patch deleted file mode 100644 index cf77c58..0000000 --- a/0002-Fix-systemd-service-status.patch +++ /dev/null @@ -1,48 +0,0 @@ -From d21f01128f378cd9bbcf59e7436114594ddf08e4 Mon Sep 17 00:00:00 2001 -From: "Jeffrey C. Ollie" -Date: Tue, 23 Oct 2012 09:20:38 -0500 -Subject: [PATCH] Fix systemd service status. - -Under systemd, not every service has a "Main PID" so using that to -determine whether a service was running failed for a number of useful -cases, especially services that use systemd's init script -compatibility layer. - -Instead, use the 'systemctl is-active' command to determine the status -of a service. ---- - salt/modules/systemd.py | 13 ++++--------- - 1 file changed, 4 insertions(+), 9 deletions(-) - -diff --git a/salt/modules/systemd.py b/salt/modules/systemd.py -index 2e37718..185b1d5 100644 ---- a/salt/modules/systemd.py -+++ b/salt/modules/systemd.py -@@ -166,20 +166,15 @@ def reload(name): - # system - def status(name, sig=None): - ''' -- Return the status for a service via systemd, returns the PID if the service -- is running or an empty string if the service is not running -+ Return the status for a service via systemd, returns a bool -+ whether the service is running. - - CLI Example:: - - salt '*' service.status - ''' -- ret = __salt__['cmd.run'](_systemctl_cmd('show', name)) -- index1 = ret.find('\nMainPID=') -- index2 = ret.find('\n', index1+9) -- mainpid = ret[index1+9:index2] -- if mainpid == '0': -- return '' -- return mainpid -+ cmd = 'systemctl is-active {0}'.format(name) -+ return not __salt__['cmd.retcode'](cmd) - - - def enable(name): --- -1.7.11.7 - diff --git a/salt.spec b/salt.spec index d6afa3b..572b7ee 100644 --- a/salt.spec +++ b/salt.spec @@ -9,7 +9,7 @@ %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: salt -Version: 0.10.4 +Version: 0.10.5 Release: 1%{?dist} Summary: A parallel remote execution system @@ -24,15 +24,16 @@ Source4: %{name}-master.service Source5: %{name}-syndic.service Source6: %{name}-minion.service Source7: README.fedora -Patch0: 0002-Fix-systemd-service-status.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %ifarch %{ix86} x86_64 - Requires: dmidecode +Requires: dmidecode %endif +Requires: pciutils + %if 0%{?with_python26} BuildRequires: python26-zmq BuildRequires: python26-crypto @@ -115,7 +116,6 @@ Salt minion is queried and controlled from the master. %prep %setup -q -%patch0 -p1 -b .systemd %build @@ -294,6 +294,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sun Nov 18 2012 Clint Savage - 0.10.5-1 +- Moved to upstream release 0.10.5 +- Added pciutils as Requires + * Tue Oct 24 2012 Clint Savage - 0.10.4-1 - Moved to upstream release 0.10.4 - Patched jcollie/systemd-service-status (SALT@GH#2335) (RHBZ#869669)