diff --git a/disable-service-py-for-suse-family.patch b/disable-service-py-for-suse-family.patch new file mode 100644 index 0000000..f9a379b --- /dev/null +++ b/disable-service-py-for-suse-family.patch @@ -0,0 +1,26 @@ +From 372d68180c35213de57b0b0b5a4773ffa92a4e5e Mon Sep 17 00:00:00 2001 +From: Tim Serong +Date: Wed, 6 Aug 2014 16:33:07 +1000 +Subject: [PATCH] Disable service.py for entire SUSE family >= 12 + +Checking os_family allows us to pick up openSUSE and SUSE Linux Enterprise, rather than just checking for os == openSUSE. +--- + salt/modules/service.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/salt/modules/service.py b/salt/modules/service.py +index cfafe24..d581916 100644 +--- a/salt/modules/service.py ++++ b/salt/modules/service.py +@@ -47,7 +47,7 @@ def __virtual__(): + if __grains__['kernel'] != 'Linux': + return False + # Suse >=12.0 uses systemd +- if __grains__.get('os', '') == 'openSUSE': ++ if __grains__.get('os_family', '') == 'Suse': + try: + if int(__grains__.get('osrelease', '').split('.')[0]) >= 12: + return False +-- +2.0.3 + diff --git a/salt.changes b/salt.changes index cb42397..6c34ffe 100644 --- a/salt.changes +++ b/salt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 6 06:36:02 UTC 2014 - tserong@suse.com + +- Ensure salt uses systemd for services on SLES + + Added disable-service-py-for-suse-family.patch + ------------------------------------------------------------------- Mon Aug 4 16:12:14 UTC 2014 - aboe76@gmail.com diff --git a/salt.spec b/salt.spec index ae7cb81..77fda78 100644 --- a/salt.spec +++ b/salt.spec @@ -32,6 +32,8 @@ Patch2: allow-systemd-parameterized-services.patch Patch3: pass-all-systemd-list-units.patch # PATCH-FIX-OPENSUSE use-forking-daemon.patch tserong@suse.com -- We don't have python-systemd, so notify can't work Patch4: use-forking-daemon.patch +# PATCH-FIX-UPSTREAM disable-service-py-for-suse-family.patch tserong@suse.com -- ensure salt uses systemd for services on SLES +Patch5: disable-service-py-for-suse-family.patch #for building BuildRequires: fdupes @@ -234,6 +236,7 @@ Bash command line completion support for %{name}. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build python setup.py build