aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/xpra-4.0.1-systemd-run.patch
diff options
context:
space:
mode:
authorJakub Kądziołka <kuba@kadziolka.net>2020-07-23 21:43:06 +0200
committerJakub Kądziołka <kuba@kadziolka.net>2020-07-23 21:43:06 +0200
commitd726b954baaeff876ce9728e00920fa45f529f9a (patch)
tree4b767b7586a1082dd2691bc33c3e45ace044e6e5 /gnu/packages/patches/xpra-4.0.1-systemd-run.patch
parent9a74a7db8626bc139307d115f5cec2648f5273ad (diff)
parente165a2492d73d37c8b95d6970d453b9d88911ee6 (diff)
downloadguix-d726b954baaeff876ce9728e00920fa45f529f9a.tar.gz
guix-d726b954baaeff876ce9728e00920fa45f529f9a.zip
Merge branch 'master' into core-updates
Conflicts: gnu/packages/ruby.scm
Diffstat (limited to 'gnu/packages/patches/xpra-4.0.1-systemd-run.patch')
-rw-r--r--gnu/packages/patches/xpra-4.0.1-systemd-run.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/patches/xpra-4.0.1-systemd-run.patch b/gnu/packages/patches/xpra-4.0.1-systemd-run.patch
new file mode 100644
index 0000000000..1ea11830a5
--- /dev/null
+++ b/gnu/packages/patches/xpra-4.0.1-systemd-run.patch
@@ -0,0 +1,34 @@
+Disable systemd-run if the command is not found.
+
+diff -Naur xpra-4.0.1/xpra/scripts/main.py xpra-4.0.1.patched/xpra/scripts/main.py
+--- xpra-4.0.1/xpra/scripts/main.py 2020-05-17 18:12:15.000000000 +0200
++++ xpra-4.0.1.patched/xpra/scripts/main.py 2020-06-01 12:12:18.500257507 +0200
+@@ -312,16 +312,18 @@
+ if not is_systemd_pid1():
+ return False
+ #test it:
+- cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"]
+- proc = Popen(cmd, stdin=None, stdout=None, stderr=None, shell=False)
+- r = pollwait(proc, timeout=1)
+- if r is None:
+- try:
+- proc.terminate()
+- except Exception:
+- pass
+- return r==0
+-
++ try:
++ cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"]
++ proc = Popen(cmd, stdin=None, stdout=None, stderr=None, shell=False)
++ r = pollwait(proc, timeout=1)
++ if r is None:
++ try:
++ proc.terminate()
++ except Exception:
++ pass
++ return r==0
++ except FileNotFoundError:
++ return False
+
+ def run_mode(script_file, error_cb, options, args, mode, defaults):
+ #configure default logging handler: