summary refs log tree commit diff
path: root/gnu/packages/patches/sssd-optional-systemd.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-06-08 14:46:24 +0200
committerLudovic Courtès <ludo@gnu.org>2022-06-08 14:46:24 +0200
commit8c3e9da13a3c92a7db308db8c0d81cb474ad7799 (patch)
tree88d06952aa5cc3a9c4991d9c43eb7950ff174fe1 /gnu/packages/patches/sssd-optional-systemd.patch
parent5439c04ebdb7b6405f5ea2446b375f1d155a8d95 (diff)
parent0c5299200ffcd16370f047b7ccb187c60f30da34 (diff)
downloadguix-8c3e9da13a3c92a7db308db8c0d81cb474ad7799.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/sssd-optional-systemd.patch')
-rw-r--r--gnu/packages/patches/sssd-optional-systemd.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/patches/sssd-optional-systemd.patch b/gnu/packages/patches/sssd-optional-systemd.patch
new file mode 100644
index 0000000000..0784fdc7aa
--- /dev/null
+++ b/gnu/packages/patches/sssd-optional-systemd.patch
@@ -0,0 +1,45 @@
+Allow running sss_analyze without Python modules for systemd.
+Upstream PR: https://github.com/SSSD/sssd/pull/6125
+
+diff --git a/src/tools/analyzer/modules/request.py b/src/tools/analyzer/modules/request.py
+index b96a23c05..28ac2f194 100644
+--- a/src/tools/analyzer/modules/request.py
++++ b/src/tools/analyzer/modules/request.py
+@@ -1,8 +1,6 @@
+ import re
+ import logging
+ 
+-from sssd.source_files import Files
+-from sssd.source_journald import Journald
+ from sssd.parser import SubparsersAction
+ from sssd.parser import Option
+ 
+@@ -77,8 +75,10 @@ class RequestAnalyzer:
+             Instantiated source object
+         """
+         if args.source == "journald":
++            from sssd.source_journald import Journald
+             source = Journald()
+         else:
++            from sssd.source_files import Files
+             source = Files(args.logdir)
+         return source
+ 
+@@ -143,7 +143,7 @@ class RequestAnalyzer:
+             self.consumed_logs.append(line.rstrip(line[-1]))
+         else:
+             # files source includes newline
+-            if isinstance(source, Files):
++            if type(source).__name__ == 'Files':
+                 print(line, end='')
+             else:
+                 print(line)
+@@ -225,7 +225,7 @@ class RequestAnalyzer:
+         source.set_component(component, False)
+         self.done = ""
+         for line in self.matched_line(source, patterns):
+-            if isinstance(source, Journald):
++            if type(source).__name__ == 'Journald':
+                 print(line)
+             else:
+                 self.print_formatted(line, args.verbose)