diff options
author | Andy Tai <ltai@roku.com> | 2023-09-27 09:36:13 -0700 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-09-28 11:44:09 +0200 |
commit | be9b7e0f653e27030c402194c7020aea873f30a5 (patch) | |
tree | 513e46abd8fac05a38297193c84596d57d4398fb /gnu/packages/patches/xpra-5.0-systemd-run.patch | |
parent | fe7b5df00ccecd46b6c06f5fef4fe42a5c8536be (diff) | |
download | guix-be9b7e0f653e27030c402194c7020aea873f30a5.tar.gz guix-be9b7e0f653e27030c402194c7020aea873f30a5.zip |
gnu: xpra: Update to 5.0.2
* gnu/packages/patches/xpra-4.2-install_libs.patch: Move to ...
* gnu/packages/patches/xpra-5.0-install_libs.patch: ... this file.
* gnu/packages/patches/xpra-4.2-systemd-run.patch: Move to ...
* gnu/packages/patches/xpra-5.0-systemd-run.patch: ... this file.
* gnu/local.mk (dist_patch_DATA): Update accordingly.
* gnu/packages/xorg.scm (xpra): Update to 5.0.2.
[source] <patches>: Rename per version changes
[inputs]: Add cups.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/patches/xpra-5.0-systemd-run.patch')
-rw-r--r-- | gnu/packages/patches/xpra-5.0-systemd-run.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/patches/xpra-5.0-systemd-run.patch b/gnu/packages/patches/xpra-5.0-systemd-run.patch new file mode 100644 index 0000000000..437a8cc37f --- /dev/null +++ b/gnu/packages/patches/xpra-5.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 3813331a5..46e2c83a6 100755 +--- a/xpra/scripts/main.py ++++ b/xpra/scripts/main.py +@@ -337,23 +337,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(): + try: |