me
/
guix
Archived
1
0
Fork 0

gnu: xpra: Update to 4.2.

Fixes <https://issues.guix.gnu.org/issue/48890>.

* gnu/packages/xorg.scm (xpra): Update to 4.2.
[source]: Switch to ".tar.gz" archive and update patch file.
[native-inputs]: Add pandoc.
[arguments]: Adjust custom 'fix-paths phase for changes in source.
* gnu/packages/patches/xpra-4.2-systemd-run.patch: Adapt to new version
and rename file.
* gnu/local.mk (dist_patch_DATA): Rename file.

Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
master
Lars-Dominik Braun 2021-06-07 09:31:03 +02:00
parent 4604d43c0e
commit dbe607925a
No known key found for this signature in database
GPG Key ID: F663943E08D8092A
4 changed files with 56 additions and 42 deletions

View File

@ -1830,7 +1830,7 @@ dist_patch_DATA = \
%D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch \
%D%/packages/patches/xplanet-1.3.1-libimage_gif.c.patch \
%D%/packages/patches/xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch \
%D%/packages/patches/xpra-4.0.1-systemd-run.patch \
%D%/packages/patches/xpra-4.2-systemd-run.patch \
%D%/packages/patches/xsane-fix-memory-leak.patch \
%D%/packages/patches/xsane-fix-pdf-floats.patch \
%D%/packages/patches/xsane-fix-snprintf-buffer-length.patch \

View File

@ -1,34 +0,0 @@
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:

View File

@ -0,0 +1,45 @@
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"]
- 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:
+ cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"]
+ proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False)
try:
- proc.terminate()
- except Exception:
- pass
- 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 run_mode(script_file, error_cb, options, args, mode, defaults):

View File

@ -54,6 +54,7 @@
#:use-module (guix build-system python)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages aidc)
#:use-module (gnu packages anthy)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bison)
@ -69,6 +70,7 @@
#:use-module (gnu packages gnupg)
#:use-module (gnu packages gperf)
#:use-module (gnu packages gtk)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages inkscape)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
@ -6300,15 +6302,15 @@ basic eye-candy effects.")
(define-public xpra
(package
(name "xpra")
(version "4.0.6")
(version "4.2")
(source
(origin
(method url-fetch)
(uri (string-append "https://www.xpra.org/src/xpra-"
version ".tar.xz"))
version ".tar.gz"))
(sha256
(base32 "1s49y2s75a8a70vj0micnmpic5zv1n32yjxy8fkxsqa6j5njyrww"))
(patches (search-patches "xpra-4.0.1-systemd-run.patch"))))
(base32 "1yg9asi3i3wf73ibc006xv3g77axvbyp81lyinwq27syabh30i1a"))
(patches (search-patches "xpra-4.2-systemd-run.patch"))))
(build-system python-build-system)
;; see also http://xpra.org/trac/wiki/Dependencies
(inputs `(
@ -6347,6 +6349,7 @@ basic eye-candy effects.")
("python-lz4" ,python-lz4) ; Faster compression than zlib.
("python-netifaces" ,python-netifaces)))
(native-inputs `(("pkg-config" ,pkg-config)
("pandoc" ,pandoc)
("python-cython" ,python-cython)))
(arguments
`(#:configure-flags '("--without-Xdummy"
@ -6383,7 +6386,7 @@ basic eye-candy effects.")
(close-port file)))
;; Add Xorg module paths.
(append-to-file
"etc/xpra/xorg.conf"
"fs/etc/xpra/xorg.conf"
(string-append "\nSection \"Files\"\nModulePath \""
(assoc-ref inputs "xf86-video-dummy") "/lib/xorg/modules,"
(assoc-ref inputs "xf86-input-mouse") "/lib/xorg/modules,"
@ -6391,8 +6394,8 @@ basic eye-candy effects.")
(assoc-ref inputs "xorg-server") "/lib/xorg/modules\"\n"
"EndSection\n\n"))
(substitute* '("xpra/scripts/config.py"
"etc/xpra/conf.d/60_server.conf.in"
"unittests/unit/server/mixins/notification_test.py")
"fs/etc/xpra/conf.d/60_server.conf.in"
"tests/unittests/unit/server/mixins/notification_test.py")
;; The trailing -- is intentional, so we only replace it inside
;; a command line.
(("dbus-launch --")