From f00df02125ded8b40dedba8f7f95deb33c8ebe3d Mon Sep 17 00:00:00 2001 From: Andy Tai Date: Sat, 17 Jan 2026 01:00:40 -0800 Subject: gnu: xpra: Update to 6.4.1. * gnu/packages/xorg.scm (xpra): Update to 6.4.1. [source](origin): Update patch file names. [arguments]<#:phases>{fix-paths}: Adapt substitution. * gnu/packages/patches/xpra-6.0-systemd-run.patch: Delete. * gnu/packages/patches/xpra-6.4-systemd-run.patch: New file. * gnu/packages/patches/xpra-6.1-install_libs.patch: Delete. * gnu/packages/patches/xpra-6.4-install_libs.patch: New file. * gnu/local.mk: Unregister deleted files and register new files. Change-Id: Ib026b49114f5afca39ee8ec1a8a209cd6c11c7d6 Signed-off-by: Andreas Enge Signed-off-by: Rutherther --- gnu/local.mk | 4 +- gnu/packages/patches/xpra-6.0-systemd-run.patch | 48 ------------------------ gnu/packages/patches/xpra-6.1-install_libs.patch | 42 --------------------- gnu/packages/patches/xpra-6.4-install_libs.patch | 44 ++++++++++++++++++++++ gnu/packages/patches/xpra-6.4-systemd-run.patch | 45 ++++++++++++++++++++++ gnu/packages/xorg.scm | 10 ++--- 6 files changed, 96 insertions(+), 97 deletions(-) delete mode 100644 gnu/packages/patches/xpra-6.0-systemd-run.patch delete mode 100644 gnu/packages/patches/xpra-6.1-install_libs.patch create mode 100644 gnu/packages/patches/xpra-6.4-install_libs.patch create mode 100644 gnu/packages/patches/xpra-6.4-systemd-run.patch diff --git a/gnu/local.mk b/gnu/local.mk index 1676508e029..da92f92d939 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2534,8 +2534,8 @@ dist_patch_DATA = \ %D%/packages/patches/xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch \ %D%/packages/patches/xpra-5.0-install_libs.patch \ %D%/packages/patches/xpra-5.0-systemd-run.patch \ - %D%/packages/patches/xpra-6.0-systemd-run.patch \ - %D%/packages/patches/xpra-6.1-install_libs.patch \ + %D%/packages/patches/xpra-6.4-systemd-run.patch \ + %D%/packages/patches/xpra-6.4-install_libs.patch \ %D%/packages/patches/xterm-370-explicit-xcursor.patch \ %D%/packages/patches/xygrib-fix-finding-data.patch \ %D%/packages/patches/xygrib-newer-proj.patch \ diff --git a/gnu/packages/patches/xpra-6.0-systemd-run.patch b/gnu/packages/patches/xpra-6.0-systemd-run.patch deleted file mode 100644 index 2d60c294236..00000000000 --- a/gnu/packages/patches/xpra-6.0-systemd-run.patch +++ /dev/null @@ -1,48 +0,0 @@ -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(): diff --git a/gnu/packages/patches/xpra-6.1-install_libs.patch b/gnu/packages/patches/xpra-6.1-install_libs.patch deleted file mode 100644 index 0ec2aee288b..00000000000 --- a/gnu/packages/patches/xpra-6.1-install_libs.patch +++ /dev/null @@ -1,42 +0,0 @@ -Distribution specific patch, not going upstream - -This workaround for Gentoo interferes with our use of --no-compile during -the 'install stage. - -diff --git a/setup.py b/setup.py -index be7a3758e8..28dc1be191 100755 ---- a/setup.py -+++ b/setup.py -@@ -953,8 +953,6 @@ if modules_ENABLED: - # Utility methods for building with Cython - - def do_add_cython_ext(*args, **kwargs) -> None: -- if "--no-compile" in sys.argv and not ("build" in sys.argv and "install" in sys.argv): -- return - if not cython_ENABLED: - raise ValueError(f"cannot build {args}: cython compilation is disabled") - if cython_tracing_ENABLED: -@@ -2175,9 +2173,6 @@ else: - if root_prefix.endswith("/usr"): - # ie: "/" or "/usr/src/rpmbuild/BUILDROOT/xpra-0.18.0-0.20160513r12573.fc23.x86_64/" - root_prefix = root_prefix[:-4] -- for x in sys.argv: -- if x.startswith("--root="): -- root_prefix = x[len("--root="):] - print(f" root_prefix={root_prefix!r}") - build_xpra_conf(root_prefix) - -@@ -2320,13 +2315,6 @@ else: - if uinput_ENABLED: - add_data_files("lib/udev/rules.d/", ["fs/lib/udev/rules.d/71-xpra-virtual-pointer.rules"]) - -- # gentoo does weird things, calls --no-compile with build *and* install -- # then expects to find the cython modules!? ie: -- #> python2.7 setup.py build -b build-2.7 install --no-compile \ -- # --root=/var/tmp/portage/x11-wm/xpra-0.7.0/temp/images/2.7 -- # otherwise we use the flags to skip pkgconfig -- if ("--no-compile" in sys.argv or "--skip-build" in sys.argv) and not ("build" in sys.argv and "install" in sys.argv): # noqa: E501 -- pkgconfig = no_pkgconfig - - if OSX and "py2app" in sys.argv: - import py2app #@UnresolvedImport diff --git a/gnu/packages/patches/xpra-6.4-install_libs.patch b/gnu/packages/patches/xpra-6.4-install_libs.patch new file mode 100644 index 00000000000..c755c34b85e --- /dev/null +++ b/gnu/packages/patches/xpra-6.4-install_libs.patch @@ -0,0 +1,44 @@ +Distribution specific patch, not going upstream + +This workaround for Gentoo interferes with our use of --no-compile during +the 'install stage. + +diff --git a/setup.py b/setup.py +index bd65109379..a97a310ea3 100755 +--- a/setup.py ++++ b/setup.py +@@ -1081,8 +1081,6 @@ if verbose_ENABLED and not os.environ.get("DISTUTILS_DEBUG"): + + + def do_add_cython_ext(*args, **kwargs) -> None: +- if "--no-compile" in sys.argv and not ("build" in sys.argv and "install" in sys.argv): +- return + if not cython_ENABLED: + raise ValueError(f"cannot build {args}: cython compilation is disabled") + if cython_tracing_ENABLED: +@@ -2301,11 +2299,6 @@ else: + + def _get_root_prefix(self) -> str: + root_prefix = "" +- for x in sys.argv: +- if x.startswith("--root="): +- return x[len("--root="):] +- if x.startswith("--prefix="): +- root_prefix = x[len("--prefix="):] + if not root_prefix: + install_dir = self._get_install_dir() + root_prefix = install_dir.rstrip("/") +@@ -2466,13 +2459,6 @@ else: + if uinput_ENABLED: + add_data_files("lib/udev/rules.d/", ["fs/lib/udev/rules.d/71-xpra-virtual-pointer.rules"]) + +- # gentoo does weird things, calls --no-compile with build *and* install +- # then expects to find the cython modules!? ie: +- #> python2.7 setup.py build -b build-2.7 install --no-compile \ +- # --root=/var/tmp/portage/x11-wm/xpra-0.7.0/temp/images/2.7 +- # otherwise we use the flags to skip pkgconfig +- if ("--no-compile" in sys.argv or "--skip-build" in sys.argv) and not ("build" in sys.argv and "install" in sys.argv): # noqa: E501 +- pkgconfig = no_pkgconfig + + if OSX and "py2app" in sys.argv: + import py2app #@UnresolvedImport diff --git a/gnu/packages/patches/xpra-6.4-systemd-run.patch b/gnu/packages/patches/xpra-6.4-systemd-run.patch new file mode 100644 index 00000000000..8ca71e76651 --- /dev/null +++ b/gnu/packages/patches/xpra-6.4-systemd-run.patch @@ -0,0 +1,45 @@ +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 734e488eb9..36410d2d85 100755 +--- a/xpra/scripts/main.py ++++ b/xpra/scripts/main.py +@@ -437,20 +437,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: +- noerr(proc.terminate) ++ 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() -> None: diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 6c476f72869..0cfa552b277 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -6520,7 +6520,7 @@ basic eye-candy effects.") (define-public xpra (package (name "xpra") - (version "6.3.6") + (version "6.4.1") (source (origin (method git-fetch) @@ -6529,9 +6529,9 @@ basic eye-candy effects.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0lrhj1xipgx839bvjwp2mbxf72c1c5g3y66vcaqs0zzk50zvyxwi")) - (patches (search-patches "xpra-6.0-systemd-run.patch" - "xpra-6.1-install_libs.patch")))) + (base32 "0y6b70g16bh1pbjzmwsrrdjgnm0vgw8ff934n1y69vfb93sdfbc0")) + (patches (search-patches "xpra-6.4-systemd-run.patch" + "xpra-6.4-install_libs.patch")))) (build-system pyproject-build-system) (inputs (list bash-minimal ; for wrap-program @@ -6617,7 +6617,7 @@ basic eye-candy effects.") "EndSection\n\n")) (substitute* '("xpra/scripts/config.py" "fs/etc/xpra/conf.d/60_server.conf.in" - "tests/unittests/unit/server/mixins/notification_test.py") + "tests/unittests/unit/server/subsystem/notification_test.py") ;; The trailing -- is intentional, so we only replace it inside ;; a command line. (("dbus-launch --") -- cgit v1.3