From patchwork Tue Sep 19 06:47:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Tai X-Patchwork-Id: 54050 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 19C5827BBE9; Tue, 19 Sep 2023 07:49:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EC18727BBE2 for ; Tue, 19 Sep 2023 07:49:07 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiUXY-0007p1-RH; Tue, 19 Sep 2023 02:48:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qiUXW-0007nP-50 for guix-patches@gnu.org; Tue, 19 Sep 2023 02:48:54 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiUXV-0004uD-TW for guix-patches@gnu.org; Tue, 19 Sep 2023 02:48:53 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qiUXe-0000vk-Au for guix-patches@gnu.org; Tue, 19 Sep 2023 02:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65849] [PATCH v3] gnu: xpra: Update to 5.0.2 References: In-Reply-To: Resent-From: Andy Tai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Sep 2023 06:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65849 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65849@debbugs.gnu.org Cc: Andy Tai Received: via spool by 65849-submit@debbugs.gnu.org id=B65849.16951060903321 (code B ref 65849); Tue, 19 Sep 2023 06:49:02 +0000 Received: (at 65849) by debbugs.gnu.org; 19 Sep 2023 06:48:10 +0000 Received: from localhost ([127.0.0.1]:55202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiUWn-0000rQ-E1 for submit@debbugs.gnu.org; Tue, 19 Sep 2023 02:48:10 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:56349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiUWj-0000qA-LY for 65849@debbugs.gnu.org; Tue, 19 Sep 2023 02:48:08 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-690bccb0d8aso626013b3a.0 for <65849@debbugs.gnu.org>; Mon, 18 Sep 2023 23:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695106071; x=1695710871; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=ZXqAT+pQr/v/hdunR/FqPMdKuzYd7372VZsjF8JNefs=; b=YqHacmZnsKzjUtX4mhlrfLJnqDB990RMoGf7YpkQa0Pf4eCqwbRTPHFlKfnH9Qv/tV KpQKSWMa/wlPLdeweXor5I6CXfAmMVw9Dx6Tq64WbZgQ1rvqoS/Tf7ELGmVpFmhuYdI1 72g8dg819oA8+huEz4J2tu7OehN/KrDq3gvLzFzeozr6+8IIH39kECQ46QWRdQs1j3kN q6iZg9CiY/2YCPxKTaB2L8V2XLWEnWZr3Qsxg7rZgIxTTnc503iR5mhl/G6v3flfHZQM nGFGnxbLXLm26XGQWFV6FqZPWXZ6M1VxGhJ6NjrPS4SQ2z0msLcFWAsg7I7E9x8alU84 oo2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695106071; x=1695710871; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZXqAT+pQr/v/hdunR/FqPMdKuzYd7372VZsjF8JNefs=; b=X2VyyZw/c7/ABFS7BtR12hWUHn9fPYTJfIntivO/aPJKTPcWvDEj9RuqQaaq8hBMEg 8VbdNYsOhnLpveBBwL/kHkQniYr6mivyoi2DoZ1u+6PqST41uBgP0PaxebcP2QfUXnoA 2ABeJRAObKfiF0qb7W8Tv00JgqNZdbx908at0VaPuFIbafMvJGSCybKCzTp8ksPrQVXY A+hw4fVLK9z35hUHEThxdRMjn5Y0VDpb1soNzzfiMZhRmviQPJtzyTANpithS9WRiJly G8IIr2rXuLTiFPz7RPzuet1wcPqbqrwEVmNfGm+Mf0w7UUReqst2W0Ht5COLB5+EjIjt DtUQ== X-Gm-Message-State: AOJu0Yxj0t4Md1FgrgBpKI1X0RCpautMqRobb0GjbtuKnZ061gBrO3to 6LBwy01pegr42qv43QsvUe1Jextzkqw= X-Google-Smtp-Source: AGHT+IG8ji05IerQEskTOssuqAPt6mRfnkMvOLSuyc05n28HLepJNHFYdHTds2WfwiupUAPsYnOQeg== X-Received: by 2002:a05:6a20:564c:b0:14c:d494:77c3 with SMTP id is12-20020a056a20564c00b0014cd49477c3mr8495651pzc.33.1695106070614; Mon, 18 Sep 2023 23:47:50 -0700 (PDT) Received: from localhost.localdomain ([98.37.226.98]) by smtp.googlemail.com with ESMTPSA id t11-20020a17090b018b00b0027669cbc30asm204784pjs.1.2023.09.18.23.47.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 23:47:49 -0700 (PDT) From: Andy Tai Date: Mon, 18 Sep 2023 23:47:45 -0700 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Andy Tai * gnu/packages/xorg.scm (xpra): Update to 5.0.2. [inputs]: Add cups. * gnu/packages/patches/xpra-5.0-install_libs.patch: New file. * gnu/packages/patches/xpra-5.0-systemd-run.patch: New file. * gnu/packages/patches/xpra-4.2-install_libs.patch: Removed. * gnu/packages/patches/xpra-4.2-systemd-run.patch: Removed. --- ...libs.patch => xpra-5.0-install_libs.patch} | 32 ++++++++++++------- ...d-run.patch => xpra-5.0-systemd-run.patch} | 31 +++++++++--------- gnu/packages/xorg.scm | 14 ++++---- 3 files changed, 43 insertions(+), 34 deletions(-) rename gnu/packages/patches/{xpra-4.2-install_libs.patch => xpra-5.0-install_libs.patch} (52%) rename gnu/packages/patches/{xpra-4.2-systemd-run.patch => xpra-5.0-systemd-run.patch} (66%) base-commit: 7841a624f0c94efbfeb48a5209dbd92575eacc09 diff --git a/gnu/packages/patches/xpra-4.2-install_libs.patch b/gnu/packages/patches/xpra-5.0-install_libs.patch similarity index 52% rename from gnu/packages/patches/xpra-4.2-install_libs.patch rename to gnu/packages/patches/xpra-5.0-install_libs.patch index 65d489a3b8..fd5394d931 100644 --- a/gnu/packages/patches/xpra-4.2-install_libs.patch +++ b/gnu/packages/patches/xpra-5.0-install_libs.patch @@ -1,18 +1,27 @@ -This workaround for Gentoo interferes with our use of --no-compile during -the 'install stage. - ---- a/setup.py 2022-01-04 10:10:05.039825000 +0100 -+++ b/setup.py 2022-01-06 15:10:31.952656039 +0100 -@@ -589,8 +589,6 @@ - }) +diff --git a/setup.py b/setup.py +index e254bf99c..90db55c3f 100755 +--- a/setup.py ++++ b/setup.py +@@ -663,8 +663,6 @@ if modules_ENABLED: + # Utility methods for building with Cython def add_cython_ext(*args, **kwargs): - if "--no-compile" in sys.argv and not ("build" in sys.argv and "install" in sys.argv): - return - assert cython_ENABLED, "cython compilation is disabled" + if not cython_ENABLED: + raise ValueError(f"cannot build {args}: cython compilation is disabled") if cython_tracing_ENABLED: - kwargs["define_macros"] = [ -@@ -1703,14 +1701,6 @@ +@@ -1809,9 +1807,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"install_data_override.run() root_prefix={root_prefix}") + build_xpra_conf(root_prefix) + +@@ -1955,13 +1950,6 @@ else: if uinput_ENABLED: add_data_files("lib/udev/rules.d/", ["fs/lib/udev/rules.d/71-xpra-virtual-pointer.rules"]) @@ -23,7 +32,6 @@ the 'install stage. - #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): - pkgconfig = no_pkgconfig -- + if OSX and "py2app" in sys.argv: import py2app #@UnresolvedImport - assert py2app is not None diff --git a/gnu/packages/patches/xpra-4.2-systemd-run.patch b/gnu/packages/patches/xpra-5.0-systemd-run.patch similarity index 66% rename from gnu/packages/patches/xpra-4.2-systemd-run.patch rename to gnu/packages/patches/xpra-5.0-systemd-run.patch index 8dfd9c82f0..4343b2e8c1 100644 --- a/gnu/packages/patches/xpra-4.2-systemd-run.patch +++ b/gnu/packages/patches/xpra-5.0-systemd-run.patch @@ -1,13 +1,12 @@ -Disable systemd-run if the command is not found. - -diff -ru xpra-4.2~/xpra/scripts/main.py xpra-4.2/xpra/scripts/main.py ---- xpra-4.2~/xpra/scripts/main.py 2021-06-06 08:51:13.756815842 -0700 -+++ xpra-4.2/xpra/scripts/main.py 2021-06-06 16:07:13.371024486 -0700 -@@ -331,23 +331,26 @@ - if not is_systemd_pid1(): - return False # pragma: no cover - #test it: -- cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"] +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) @@ -15,13 +14,13 @@ diff -ru xpra-4.2~/xpra/scripts/main.py xpra-4.2/xpra/scripts/main.py - except TimeoutExpired: # pragma: no cover - r = None - if r is None: -+ cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"] -+ proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False) - try: +- try: - proc.terminate() - except Exception: - pass -- try: ++ 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 @@ -41,5 +40,5 @@ diff -ru xpra-4.2~/xpra/scripts/main.py xpra-4.2/xpra/scripts/main.py + except FileNotFoundError: + return False - - def run_mode(script_file, error_cb, options, args, mode, defaults): + def verify_gir(): + try: diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 08cbd8d757..74d3994912 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -72,6 +72,7 @@ (define-module (gnu packages xorg) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages check) + #:use-module (gnu packages cups) #:use-module (gnu packages compression) #:use-module (gnu packages emacs) #:use-module (gnu packages flex) @@ -6110,16 +6111,16 @@ (define-public xcompmgr (define-public xpra (package (name "xpra") - (version "4.4.6") + (version "5.0.2") (source (origin (method url-fetch) (uri (string-append "https://www.xpra.org/src/xpra-" version ".tar.xz")) (sha256 - (base32 "0d3s13wqbn9jwqp4i55mn4chgjkrckq3jx4jrq1bcjjz5agzfrq5")) - (patches (search-patches "xpra-4.2-systemd-run.patch" - "xpra-4.2-install_libs.patch")))) + (base32 "0gxv0h1spg2jl3g9cc6qxxkq6a7prmb92dqqwk0s6pvrj8w3izlk")) + (patches (search-patches "xpra-5.0-systemd-run.patch" + "xpra-5.0-install_libs.patch")))) (build-system python-build-system) (inputs (list bash-minimal ; for wrap-program @@ -6158,7 +6159,8 @@ (define-public xpra python-dbus ; For desktop notifications. dbus ; For dbus-launch command. python-lz4 ; Faster compression than zlib. - python-netifaces)) + python-netifaces + python-pycups)) (native-inputs (list pkg-config pandoc python-cython)) (arguments (list @@ -6193,7 +6195,7 @@ (define-public xpra (format #f "~s" (search-input-file inputs "bin/xauth")))) ;; Fix directory of config files. (substitute* '("xpra/scripts/config.py" - "xpra/platform/xposix/paths.py") + "xpra/platform/posix/paths.py") (("\"/etc/xpra/?\"") (string-append "\"" #$output "/etc/xpra/\""))) ;; XXX: Stolen from (gnu packages linux)