xpra: 4.4.6 -> 5.0.9

Co-authored-by: Daniel Höxtermann <daniel@hxtm.dev>
This commit is contained in:
Alexey Orlenko 2024-04-14 00:38:06 +02:00
parent fcdca53fac
commit dfc6da9fee
No known key found for this signature in database
GPG Key ID: F645CFAA6F4A2CCE
4 changed files with 20 additions and 19 deletions

View File

@ -1,5 +1,5 @@
{ lib
, fetchurl
, fetchFromGitHub
, substituteAll
, pkg-config
, runCommand
@ -70,11 +70,13 @@ let
'';
in buildPythonApplication rec {
pname = "xpra";
version = "4.4.6";
version = "5.0.9";
src = fetchurl {
url = "https://xpra.org/src/${pname}-${version}.tar.xz";
hash = "sha256-BWf3nypfSrYCzpJ0OfBkecoHGbG1lEgu5jLZhfkIejQ=";
src = fetchFromGitHub {
owner = "Xpra-org";
repo = "xpra";
rev = "v${version}";
hash = "sha256-gwo5plCAryGC8/BKVEqyMkgB+3FM8HXG6sESomDOtNM=";
};
patches = [
@ -86,9 +88,8 @@ in buildPythonApplication rec {
./fix-122159.patch # https://github.com/NixOS/nixpkgs/issues/122159
];
# Note: xposix is renamed to posix in v5.
postPatch = lib.optionalString stdenv.isLinux ''
substituteInPlace xpra/platform/xposix/features.py \
substituteInPlace xpra/platform/posix/features.py \
--replace-fail "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open"
'';

View File

@ -1,9 +1,9 @@
diff --git a/xpra/scripts/main.py b/xpra/scripts/main.py
index 031a41f9e..6232ba830 100755
index 58c8bf6464..36f4b3cd3d 100755
--- a/xpra/scripts/main.py
+++ b/xpra/scripts/main.py
@@ -377,11 +377,7 @@ def run_mode(script_file, cmdline, error_cb, options, args, mode, defaults):
"seamless", "desktop", "shadow", "expand",
@@ -389,11 +389,7 @@ def run_mode(script_file:str, cmdline, error_cb, options, args, mode:str, defaul
"seamless", "desktop", "shadow", "shadow-screen", "expand",
"upgrade", "upgrade-seamless", "upgrade-desktop",
) and not display_is_remote and use_systemd_run(options.systemd_run):
- #make sure we run via the same interpreter,
@ -11,6 +11,6 @@ index 031a41f9e..6232ba830 100755
argv = list(cmdline)
- if argv[0].find("python")<0:
- argv.insert(0, "python%i.%i" % (sys.version_info.major, sys.version_info.minor))
return systemd_run_wrap(mode, argv, options.systemd_run_args)
return systemd_run_wrap(mode, argv, options.systemd_run_args, user=getuid()!=0)
configure_env(options.env)
configure_logging(options, mode)

View File

@ -1,15 +1,15 @@
diff --git a/xpra/server/server_util.py b/xpra/server/server_util.py
index f46998ee9f..60068f21b6 100644
index 2e83712bb8..2dd0bf73d2 100644
--- a/xpra/server/server_util.py
+++ b/xpra/server/server_util.py
@@ -157,6 +157,10 @@ def xpra_env_shell_script(socket_dir, env):
return b"\n".join(script)
@@ -166,6 +166,10 @@ def xpra_env_shell_script(socket_dir, env : Dict[str,str]) -> str:
return "\n".join(script)
def xpra_runner_shell_script(xpra_file, starting_dir):
def xpra_runner_shell_script(xpra_file:str, starting_dir:str) -> str:
+ # Nixpkgs contortion:
+ # xpra_file points to a shell wrapper, not to the python script.
+ dirname, basename = os.path.split(xpra_file)
+ xpra_file = os.path.join(dirname, "."+basename+"-wrapped")
script = []
# We ignore failures in cd'ing, b/c it's entirely possible that we were
# started from some temporary directory and all paths are absolute.
qdir = sh_quotemeta(starting_dir)

View File

@ -1,8 +1,8 @@
diff --git a/xpra/x11/fakeXinerama.py b/xpra/x11/fakeXinerama.py
index d5c1c8bb10..88c77e8142 100755
index a5289e0e43..527cdf90c9 100755
--- a/xpra/x11/fakeXinerama.py
+++ b/xpra/x11/fakeXinerama.py
@@ -22,31 +22,7 @@ fakeXinerama_config_files = [
@@ -23,31 +23,7 @@ fakeXinerama_config_files = [
]
def find_libfakeXinerama():
@ -29,7 +29,7 @@ index d5c1c8bb10..88c77e8142 100755
- except Exception as e:
- log("find_libfakeXinerama()", exc_info=True)
- log.error("Error: cannot launch ldconfig -p to locate libfakeXinerama:")
- log.error(" %s", e)
- log.estr(e)
- return find_lib("libfakeXinerama.so.1")
+ return "@libfakeXinerama@/lib/libfakeXinerama.so.1.0"