Hello community,

here is the log from the commit of package salt for openSUSE:Factory checked in 
at 2014-08-20 17:51:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/salt (Old)
 and      /work/SRC/openSUSE:Factory/.salt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "salt"

Changes:
--------
--- /work/SRC/openSUSE:Factory/salt/salt.changes        2014-08-11 
10:07:23.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.salt.new/salt.changes   2014-08-20 
17:51:58.000000000 +0200
@@ -1,0 +2,11 @@
+Mon Aug 18 13:06:07 UTC 2014 - [email protected]
+
+- Fix service.py version parsing for SLE 11
+  + Added fix-service-py-version-parsing-sles.patch
+
+-------------------------------------------------------------------
+Tue Aug 12 09:44:43 UTC 2014 - [email protected]
+
+- Remove salt-master's hard requirement for git and python-GitPython on SLE 12
+
+-------------------------------------------------------------------

New:
----
  fix-service-py-version-parsing-sles.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ salt.spec ++++++
--- /var/tmp/diff_new_pack.ZJVQl2/_old  2014-08-20 17:52:00.000000000 +0200
+++ /var/tmp/diff_new_pack.ZJVQl2/_new  2014-08-20 17:52:00.000000000 +0200
@@ -34,6 +34,8 @@
 Patch4:         use-forking-daemon.patch
 # PATCH-FIX-UPSTREAM disable-service-py-for-suse-family.patch [email protected] 
-- ensure salt uses systemd for services on SLES
 Patch5:         disable-service-py-for-suse-family.patch
+# PATCH-FIX-UPSTREAM fix-service-py-version-parsing-sles.patch 
[email protected] -- fix SLES 11 version parsing
+Patch6:         fix-service-py-version-parsing-sles.patch
 
 #for building
 BuildRequires:  fdupes
@@ -146,8 +148,13 @@
 Summary:        Management component for salt, a parallel remote execution 
system
 Group:          System/Monitoring
 Requires:       %{name} = %{version}
+%if 0%{?suse_version} == 1315
+Recommends:     git
+Recommends:     python-GitPython
+%else
 Requires:       git
 Requires:       python-GitPython
+%endif
 Requires:       python-M2Crypto
 Requires:       python-msgpack-python
 Requires:       python-pycrypto
@@ -237,6 +244,7 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 python setup.py build

++++++ fix-service-py-version-parsing-sles.patch ++++++
>From 1539d14a40d976b94724b14a17aff77f9a273a9a Mon Sep 17 00:00:00 2001
From: Tim Serong <[email protected]>
Date: Mon, 18 Aug 2014 23:00:39 +1000
Subject: [PATCH] Fix service.py version parsing for SLE 11

"osrelease" on SLES 11 is in the form "11 SP3", i.e. major version, then a 
space, then service pack number. This means we can't just split on '.' to get 
the major number for comparisons. Rather we need to split on non-digit 
characters to handle both space-delimited and dot-delimited release formats 
(yuck).
---
 salt/modules/service.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/salt/modules/service.py b/salt/modules/service.py
index d581916..dab0817 100644
--- a/salt/modules/service.py
+++ b/salt/modules/service.py
@@ -49,7 +49,12 @@ def __virtual__():
     # Suse >=12.0 uses systemd
     if __grains__.get('os_family', '') == 'Suse':
         try:
-            if int(__grains__.get('osrelease', '').split('.')[0]) >= 12:
+            # osrelease might be in decimal format (e.g. "12.1"), or for
+            # SLES might include service pack (e.g. "11 SP3"), so split on
+            # non-digit characters, and the zeroth element is the major
+            # number (it'd be so much simpler if it was always "X.Y"...)
+            import re
+            if int(re.split('\D+', __grains__.get('osrelease', ''))[0]) >= 12:
                 return False
         except ValueError:
             return False
-- 
2.0.3

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to