...
 
Commits (2)
salt (2018.3.4+dfsg1-4) unstable; urgency=medium
* Cherry-pick upstream patch to fix retrieving systemd version (for 241-3)
-- Benjamin Drung <benjamin.drung@cloud.ionos.com> Fri, 26 Apr 2019 16:38:39 +0200
salt (2018.3.4+dfsg1-3) unstable; urgency=medium
[ Benjamin Drung ]
......
From 94809d0a179958ef251ea38daea46c86821166d3 Mon Sep 17 00:00:00 2001
From: Jordan Jacobelli <jordan@cri.epita.fr>
Date: Sat, 2 Mar 2019 15:46:23 +0100
Subject: [PATCH] Fix retrieve systemd version using regex
Fixes #51745
Signed-off-by: Jordan Jacobelli <jordan@cri.epita.fr>
---
salt/utils/systemd.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/salt/utils/systemd.py b/salt/utils/systemd.py
index 7790b3567d..060bc1e3fb 100644
--- a/salt/utils/systemd.py
+++ b/salt/utils/systemd.py
@@ -6,6 +6,7 @@ Contains systemd related help files
from __future__ import absolute_import, print_function, unicode_literals
import logging
import os
+import re
import subprocess
# Import Salt libs
@@ -65,8 +66,8 @@ def version(context=None):
stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]
outstr = salt.utils.stringutils.to_str(stdout)
try:
- ret = int(outstr.splitlines()[0].split()[-1])
- except (IndexError, ValueError):
+ ret = int(re.search(r'\w+ ([0-9]+)', outstr.splitlines()[0]).group(1))
+ except (AttributeError, IndexError, ValueError):
log.error(
'Unable to determine systemd version from systemctl '
'--version, output follows:\n%s', outstr
--
2.20.1
gitfs-Fix-use-of-deprecated-pygit2-function.patch
Fix-retrieve-systemd-version-using-regex.patch
prevent_intersphinx_network_access.patch
Make-the-Salt-Proxy-environment-aware.patch
remove-privacy-breach.patch
......