commit:     00aeecac09183fae1050b7282abc1623b33be6b8
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun May 14 14:47:58 2023 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun May 14 14:53:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00aeecac

x11-wm/xpra: Version bump to 4.4.4

Some tests are failing, but I can't figure out why.

Closes: https://bugs.gentoo.org/882613
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 x11-wm/xpra/Manifest                    |   1 +
 x11-wm/xpra/files/xpra-4.4-tests.patch  | 100 +++++++++++++++
 x11-wm/xpra/files/xpra-4.4-xdummy.patch |  24 ++++
 x11-wm/xpra/xpra-4.4.4.ebuild           | 215 ++++++++++++++++++++++++++++++++
 4 files changed, 340 insertions(+)

diff --git a/x11-wm/xpra/Manifest b/x11-wm/xpra/Manifest
index 92b946c95af1..8670ac3604fd 100644
--- a/x11-wm/xpra/Manifest
+++ b/x11-wm/xpra/Manifest
@@ -1,2 +1,3 @@
 DIST xpra-4.3.1-tests.patch 51444 BLAKE2B 
c645aa52bb06c3872f6c1c7aace099c10a6fd46dd4c386ec1a13f6326e3fc8860a71767510ce9b44375cc8b30cef563e4405b2834670a9d2c555d3359d16e99f
 SHA512 
0c70c33e24980db31e904c91f987a73693bd2349958ea8392138987e1dc1852ea42a4ee7e3b238f01c92adc57dbe196e57f4c4accf27aade6c4ea55c1ff9b40c
 DIST xpra-4.3.4.tar.gz 4184031 BLAKE2B 
e01e338398f86c80a1092ea3155126ed26eb959ca97790add4cfcdb0ec8a1c6391937ff101c889ec78bb00bbf38ac0c42c5b85d60e72804ffccbbe5f446aaa3e
 SHA512 
93855ff248f135c70a2144a0afbc66e4830b8d214c9c2017dff1d3e3c7902dac15b1cb03670cde8018b40d5c404bd7c243625faeaba712130f5d0082f562c60c
+DIST xpra-4.4.4.tar.gz 4324840 BLAKE2B 
d39f83b5f6ea960f12170bcc55d3c46d290682bb26424dc57a3ab62f01a4dad513466883287e6197231c96ac81872403d27ff1b65c7c0e520adcda8846766e02
 SHA512 
807fb3b12b5ecc8dbf73aef9dddf509c3397c97d04db4f397d4672b6f097ff977ce71f6ba00fb585ea7dfaf047a4c68e5cca099436da28bc20f4bc2c229c98c9

diff --git a/x11-wm/xpra/files/xpra-4.4-tests.patch 
b/x11-wm/xpra/files/xpra-4.4-tests.patch
new file mode 100644
index 000000000000..28691606304d
--- /dev/null
+++ b/x11-wm/xpra/files/xpra-4.4-tests.patch
@@ -0,0 +1,100 @@
+From 5e657b3fbed2f8495272d6b207d1b3c0a660a72f Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <[email protected]>
+Date: Sun, 2 Oct 2022 22:59:17 +0100
+Subject: [PATCH 1/3] Fix test_root_window_model by formatting geometry string
+ correctly
+
+You can't use `{geometry:24}` style formatting on a list or tuple. It
+must be converted to a string first.
+---
+ xpra/server/shadow/root_window_model.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xpra/server/shadow/root_window_model.py 
b/xpra/server/shadow/root_window_model.py
+index cb89466ef..e69949e7d 100644
+--- a/xpra/server/shadow/root_window_model.py
++++ b/xpra/server/shadow/root_window_model.py
+@@ -65,7 +65,7 @@ class RootWindowModel:
+         self.signal_listeners = {}
+
+     def __repr__(self):
+-        return f"RootWindowModel({self.capture} : {self.geometry:24})"
++        return f"RootWindowModel({self.capture} : {str(self.geometry):24})"
+
+     def get_info(self) -> dict:
+         info = {}
+--
+2.38.0
+
+
+From 3fe12855383831f10442a1f4451d206dfee2cb92 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <[email protected]>
+Date: Sun, 2 Oct 2022 21:51:01 +0100
+Subject: [PATCH 2/3] Fix test_get_version_info when the revision is 0
+
+The 4.4 tarball has revision 0, which causes it to not be included in
+the version info dict. Check for `not None` instead of truthiness.
+---
+ xpra/version_util.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xpra/version_util.py b/xpra/version_util.py
+index 17c0ec27a..5dd38fd3e 100755
+--- a/xpra/version_util.py
++++ b/xpra/version_util.py
+@@ -158,7 +158,7 @@ def get_version_info(full=1) -> dict:
+                 "branch"                : BRANCH,
+                 "commit"                : COMMIT,
+                 }.items():
+-                if v and v!="unknown":
++                if v is not None and v!="unknown":
+                     props[k] = v
+         except ImportError as e:
+             warn("missing some source information: %s", e)
+@@ -181,7 +181,7 @@ def get_version_info_full() -> dict:
+                     "cython"               : "CYTHON_VERSION",
+                   }.items():
+             v = getattr(build_info, bk, None)
+-            if v:
++            if v is not None:
+                 props[k] = v
+         #record library versions:
+         d = dict((k.lstrip("lib_"), getattr(build_info, k)) for k in 
dir(build_info) if k.startswith("lib_"))
+--
+2.38.0
+
+
+From 79573c7f1241225922bee992f2caaf730cfbe3ac Mon Sep 17 00:00:00 2001
+From: totaam <[email protected]>
+Date: Sun, 9 Oct 2022 21:37:39 +0700
+Subject: [PATCH 3/3] Revert "don't use GLib directly"
+
+This reverts commit bc8bf26c44d1b151d709232460483f5432f79f5b.
+---
+ xpra/server/mixins/child_command_server.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/xpra/server/mixins/child_command_server.py 
b/xpra/server/mixins/child_command_server.py
+index 8dea3c1f7..1c2a60e27 100644
+--- a/xpra/server/mixins/child_command_server.py
++++ b/xpra/server/mixins/child_command_server.py
+@@ -11,6 +11,8 @@ import os.path
+ from time import monotonic
+ from subprocess import Popen
+
++from gi.repository import GLib
++
+ from xpra.platform.features import COMMAND_SIGNALS
+ from xpra.child_reaper import getChildReaper, reaper_cleanup
+ from xpra.os_util import (
+@@ -72,7 +74,7 @@ class ChildCommandServer(StubServerMixin):
+         #even if __init__ is called multiple times:
+         if not getattr(self, "late_start_requested", False):
+             self.late_start_requested = True
+-            self.idle_add(self.late_start)
++            GLib.idle_add(self.late_start)
+
+     def late_start(self):
+         def do_late_start():
+--
+2.38.0

diff --git a/x11-wm/xpra/files/xpra-4.4-xdummy.patch 
b/x11-wm/xpra/files/xpra-4.4-xdummy.patch
new file mode 100644
index 000000000000..2326e63498ce
--- /dev/null
+++ b/x11-wm/xpra/files/xpra-4.4-xdummy.patch
@@ -0,0 +1,24 @@
+From 7c384b517fb391065b84b60fa8f1ec3338ed4fce Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <[email protected]>
+Date: Sat, 16 Apr 2022 22:30:11 +0100
+Subject: [PATCH] Avoid Xdummy version detection, assume 0.4.0
+
+---
+ setup.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/setup.py b/setup.py
+index 40bfba61c..e4636cb46 100755
+--- a/setup.py
++++ b/setup.py
+@@ -657,6 +657,7 @@ def get_gcc_version():
+     return GCC_VERSION
+ 
+ def get_dummy_driver_version():
++    return (0, 4)
+     def vernum(s):
+         return tuple(int(v) for v in s.split("-", 1)[0].split("."))
+     #try various rpm names:
+-- 
+2.34.1
+

diff --git a/x11-wm/xpra/xpra-4.4.4.ebuild b/x11-wm/xpra/xpra-4.4.4.ebuild
new file mode 100644
index 000000000000..5683ea5b33ce
--- /dev/null
+++ b/x11-wm/xpra/xpra-4.4.4.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} = 9999* ]]; then
+       EGIT_REPO_URI="https://github.com/Xpra-org/xpra.git";
+       inherit git-r3
+else
+       inherit pypi
+       KEYWORDS="~amd64 ~x86"
+fi
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_SINGLE_IMPL=yes
+DISTUTILS_USE_SETUPTOOLS=no
+
+inherit xdg xdg-utils distutils-r1 tmpfiles udev
+
+DESCRIPTION="X Persistent Remote Apps (xpra) and Partitioning WM (parti) based 
on wimpiggy"
+HOMEPAGE="https://xpra.org/";
+LICENSE="GPL-2 BSD"
+SLOT="0"
+IUSE="brotli +client +clipboard crypt csc cups dbus doc ffmpeg jpeg html ibus 
+lz4 lzo minimal oauth opengl pillow pinentry pulseaudio +server sound systemd 
test udev vpx webcam webp xdg xinerama"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+       || ( client server )
+       cups? ( dbus )
+       oauth? ( server )
+       opengl? ( client )
+       test? ( client clipboard crypt dbus html server sound xdg xinerama )
+"
+
+TEST_DEPEND="
+       $(python_gen_cond_dep '
+               dev-python/netifaces[${PYTHON_USEDEP}]
+               dev-python/pillow[jpeg?,${PYTHON_USEDEP}]
+               dev-python/rencode[${PYTHON_USEDEP}]
+               dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
+               xdg? ( dev-python/pyxdg[${PYTHON_USEDEP}] )
+       ')
+       html? ( www-apps/xpra-html5 )
+       server? (
+               x11-base/xorg-server[-minimal,xvfb]
+               x11-drivers/xf86-input-void
+       )
+       xinerama? ( x11-libs/libfakeXinerama )
+"
+DEPEND="
+       ${PYTHON_DEPS}
+       $(python_gen_cond_dep '
+               dev-python/pygobject:3[${PYTHON_USEDEP},cairo]
+               opengl? ( dev-python/pyopengl[${PYTHON_USEDEP}] )
+               sound? ( dev-python/gst-python:1.0[${PYTHON_USEDEP}] )
+       ')
+       x11-libs/gtk+:3[introspection]
+       x11-libs/libX11
+       x11-libs/libXcomposite
+       x11-libs/libXdamage
+       x11-libs/libXfixes
+       x11-libs/libXrandr
+       x11-libs/libXres
+       x11-libs/libXtst
+       x11-libs/libxkbfile
+       brotli? ( app-arch/brotli )
+       csc? ( >=media-video/ffmpeg-1.2.2:0= )
+       ffmpeg? ( >=media-video/ffmpeg-3.2.2:0=[x264] )
+       jpeg? ( media-libs/libjpeg-turbo )
+       pulseaudio? (
+               media-sound/pulseaudio
+               media-plugins/gst-plugins-pulse:1.0
+       )
+       sound? (
+               media-libs/gstreamer:1.0
+               media-libs/gst-plugins-base:1.0
+       )
+       vpx? ( media-libs/libvpx media-video/ffmpeg )
+       webp? ( media-libs/libwebp )
+"
+RDEPEND="
+       ${DEPEND}
+       ${TEST_DEPEND}
+       $(python_gen_cond_dep '
+               crypt? ( dev-python/cryptography[${PYTHON_USEDEP}] )
+               cups? ( dev-python/pycups[${PYTHON_USEDEP}] )
+               lz4? ( dev-python/lz4[${PYTHON_USEDEP}] )
+               lzo? ( >=dev-python/python-lzo-0.7.0[${PYTHON_USEDEP}] )
+               oauth? ( dev-python/oauthlib[${PYTHON_USEDEP}] )
+               opengl? ( dev-python/pyopengl_accelerate[${PYTHON_USEDEP}] )
+               webcam? (
+                       dev-python/numpy[${PYTHON_USEDEP}]
+                       dev-python/pyinotify[${PYTHON_USEDEP}]
+                       media-libs/opencv[${PYTHON_USEDEP},python]
+               )
+       ')
+       acct-group/xpra
+       virtual/ssh
+       x11-apps/xauth
+       x11-apps/xmodmap
+       ibus? ( app-i18n/ibus )
+       pinentry? ( app-crypt/pinentry )
+       udev? ( virtual/udev )
+"
+DEPEND+="
+       test? ( ${TEST_DEPEND} )
+"
+BDEPEND="
+       $(python_gen_cond_dep '
+               >=dev-python/cython-0.16[${PYTHON_USEDEP}]
+       ')
+       virtual/pkgconfig
+       doc? ( app-text/pandoc )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-4.3-no-service.patch
+       "${FILESDIR}"/${PN}-4.4-xdummy.patch
+)
+
+python_prepare_all() {
+       distutils-r1_python_prepare_all
+
+       # FIXME: There are hardcoded paths all over the place but the following
+       # double-prefixes some files under /etc. Looks tricky to fix. :(
+       #hprefixify $(find -type f \( -name "*.py" -o -name "*.conf" \))
+
+       sed -r -e "/\bdoc_dir =/s:/${PN}\":/${PF}/html\":" \
+               -i setup.py || die
+
+       if use minimal; then
+               sed -r -e '/pam_ENABLED/s/DEFAULT/False/' \
+                       -e 's/^(xdg_open)_ENABLED = .*/\1_ENABLED = False/' \
+                       -i setup.py || die
+       fi
+}
+
+python_configure_all() {
+       sed -e "/'pulseaudio'/s:DEFAULT_PULSEAUDIO:$(usex pulseaudio True 
False):" \
+               -i setup.py || die
+
+       DISTUTILS_ARGS=(
+               --without-PIC
+               --without-Xdummy
+               $(use_with client)
+               $(use_with clipboard)
+               $(use_with csc csc_swscale)
+               --without-csc_libyuv
+               --without-cuda_rebuild
+               --without-cuda_kernels
+               $(use_with cups printing)
+               --without-debug
+               $(use_with dbus)
+               $(use_with doc docs)
+               $(use_with ffmpeg dec_avcodec2)
+               $(use_with ffmpeg enc_ffmpeg)
+               $(use_with ffmpeg enc_x264)
+               --without-enc_x265
+               --with-gtk3
+               $(use_with jpeg jpeg_encoder)
+               $(use_with jpeg jpeg_decoder)
+               --without-mdns
+               $(use_with opengl)
+               $(use_with server shadow)
+               $(use_with server)
+               $(use_with sound)
+               --with-strict
+               $(use_with vpx)
+               --with-warn
+               $(use_with webcam)
+               $(use_with webp)
+               --with-x11
+       )
+
+       export XPRA_SOCKET_DIRS="${EPREFIX}/run/xpra"
+}
+
+python_test() {
+       export XAUTHORITY=${HOME}/.Xauthority
+       touch "${XAUTHORITY}" || die
+
+       distutils_install_for_testing
+       xdg_environment_reset
+
+       env -u WAYLAND_DISPLAY -u XDG_SESSION_TYPE \
+       PYTHONPATH="${S}/tests/unittests:${BUILD_DIR}/test/lib" \
+       XPRA_SYSTEMD_RUN=$(usex systemd) XPRA_TEST_COVERAGE=0 \
+               "${PYTHON}" "${S}"/tests/unittests/unit/run.py || die
+}
+
+python_install_all() {
+       distutils-r1_python_prepare_all
+
+       # Move udev dir to the right place.
+       if use udev; then
+               local dir=$(get_udevdir)
+               dodir "${dir%/*}"
+               mv -vnT "${ED}"/usr/lib/udev "${ED}${dir}" || die
+       else
+               rm -vr "${ED}"/usr/lib/udev || die
+               rm -v "${ED}"/usr/bin/xpra_udev_product_version || die
+       fi
+}
+
+pkg_postinst() {
+       tmpfiles_process xpra.conf
+       xdg_pkg_postinst
+       use udev && udev_reload
+}
+
+pkg_postrm() {
+       xdg_pkg_postinst
+       use udev && udev_reload
+}

Reply via email to