diff options
author | Andy Tai <atai@atai.org> | 2024-05-13 08:43:29 -0700 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-05-14 12:05:25 +0100 |
commit | 61140300c20609f540029e30b72b7bf466f259cd (patch) | |
tree | 35a3e5672507a0546b04eda0707ca2f6a9af06f2 /gnu/packages/patches/xpra-6.0-systemd-run.patch | |
parent | 49ec9f4ba32657528e0924df402f6aa6e5509fd5 (diff) |
gnu: xpra: Update to 6.0.
* gnu/packages/xorg.scm (xpra): Update to 6.0.
[inputs]: Add xxhash.
[native-inputs]: Change python-cython to python-cython-3.
* gnu/packages/patches/xpra-6.0-install_libs.patch: New file.
* gnu/packages/patches/xpra-6.0-systemd-run.patch: New file.
* gnu/packages/patches/xpra-5.0-install_libs.patch: Removed.
* gnu/packages/patches/xpra-5.0-systemd-run.patch: Removed.
* gnu/local.mk (dist_patch_DATA): Update accordingly
Change-Id: Ic8ec98296220aebabb3d94951e11a3c957a8fcbc
Signed-off-by: Christopher Baines <mail@cbaines.net>
Diffstat (limited to 'gnu/packages/patches/xpra-6.0-systemd-run.patch')
-rw-r--r-- | gnu/packages/patches/xpra-6.0-systemd-run.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/patches/xpra-6.0-systemd-run.patch b/gnu/packages/patches/xpra-6.0-systemd-run.patch new file mode 100644 index 0000000000..2d60c29423 --- /dev/null +++ b/gnu/packages/patches/xpra-6.0-systemd-run.patch @@ -0,0 +1,48 @@ +Distriction specific patch, not going upstream + +Disable systemd-run if the command is not found. + +diff --git a/xpra/scripts/main.py b/xpra/scripts/main.py +index 1c5e8ddaad..084aabe792 100755 +--- a/xpra/scripts/main.py ++++ b/xpra/scripts/main.py +@@ -396,23 +396,26 @@ def use_systemd_run(s) -> bool: + cmd = ["systemd-run", "--quiet"] + if getuid() != 0: + cmd += ["--user"] +- cmd += ["--scope", "--", "true"] +- proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False) + try: +- proc.communicate(timeout=2) +- r = proc.returncode +- except TimeoutExpired: # pragma: no cover +- r = None +- if r is None: +- try: +- proc.terminate() +- except Exception: +- pass ++ cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"] ++ proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False) + try: +- proc.communicate(timeout=1) ++ proc.communicate(timeout=2) ++ r = proc.returncode + except TimeoutExpired: # pragma: no cover + r = None +- return r == 0 ++ if r is None: ++ try: ++ proc.terminate() ++ except Exception: ++ pass ++ try: ++ proc.communicate(timeout=1) ++ except TimeoutExpired: # pragma: no cover ++ r = None ++ return r==0 ++ except FileNotFoundError: ++ return False + + + def verify_gir(): |