Update xpra to 5.0.6

This commit is contained in:
Sérgio M. Basto 2024-02-23 14:11:42 +00:00
commit ea007192d5
3 changed files with 2 additions and 103 deletions

1
.gitignore vendored
View file

@ -87,3 +87,4 @@
/xpra-5.0.1.tar.gz
/xpra-5.0.2.tar.gz
/xpra-5.0.3.tar.gz
/xpra-5.0.6.tar.gz

View file

@ -1,102 +0,0 @@
From d8790b37d0da7fdcad9cad6e2a1d23e574965395 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
Date: Wed, 31 Jan 2024 15:43:23 +0100
Subject: [PATCH] GCC 14
---
setup.py | 2 +-
xpra/platform/posix/proc_libproc.pyx | 44 +++++++++++-----------------
2 files changed, 18 insertions(+), 28 deletions(-)
diff --git a/setup.py b/setup.py
index 48c55ce..c38f7a2 100755
--- a/setup.py
+++ b/setup.py
@@ -2189,7 +2189,7 @@ if pam_ENABLED:
#platform:
tace(sd_listen_ENABLED, "xpra.platform.posix.sd_listen", "libsystemd")
tace(proc_ENABLED and proc_use_procps, "xpra.platform.posix.proc_procps", "libprocps", extra_compile_args = "-Wno-error")
-tace(proc_ENABLED and proc_use_libproc, "xpra.platform.posix.proc_libproc", "libproc2", extra_compile_args = "-Wno-error")
+tace(proc_ENABLED and proc_use_libproc, "xpra.platform.posix.proc_libproc", "libproc2", language="c++")
#codecs:
toggle_packages(enc_proxy_ENABLED, "xpra.codecs.proxy")
diff --git a/xpra/platform/posix/proc_libproc.pyx b/xpra/platform/posix/proc_libproc.pyx
index 577a542..0de8914 100644
--- a/xpra/platform/posix/proc_libproc.pyx
+++ b/xpra/platform/posix/proc_libproc.pyx
@@ -1,10 +1,8 @@
# This file is part of Xpra.
-# Copyright (C) 2022 Antoine Martin <antoine@xpra.org>
+# Copyright (C) 2022-2024 Antoine Martin <antoine@xpra.org>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.
-from libc.string cimport memset
-
from xpra.log import Logger
log = Logger("util", "exec")
@@ -14,6 +12,9 @@ DEF PROC_PID = 0x1000 #process id numbers ( 0 terminated )
cdef extern from "libproc2/pids.h":
+ ctypedef enum pids_item:
+ PIDS_ID_PPID
+
# Opaque handle used by procps to store its buffers
struct pids_info:
pass
@@ -38,36 +39,25 @@ cdef extern from "libproc2/pids.h":
pids_counts *counts
pids_stack **stacks
- # Flag used to query the parent process, part of the pids_item enum
- int PIDS_ID_PPID
-
- # Flag used to return one value per process, part of pids_select_type enum.
- # All we care about here is PPID which is the same for each thread within a
- # process.
- int PIDS_SELECT_PID
+ ctypedef enum pids_select_type:
+ PIDS_SELECT_PID
+ PIDS_SELECT_PID_THREADS
+ PIDS_SELECT_UID
+ PIDS_SELECT_UID_THREADS
- int procps_pids_new(pids_info **info, int *items, int numitems)
+ int procps_pids_new(pids_info **info, pids_item *items, int numitems)
int procps_pids_unref(pids_info **info)
- pids_fetch *procps_pids_select(pids_info *info, unsigned int *pids, int pidcount, int select_type)
+ pids_fetch *procps_pids_select(pids_info *info, unsigned*pids, int pidcount, int select_type)
-def get_parent_pid(int pid) -> int:
- cdef pids_info *handle
- cdef int selector
-
- handle = NULL
- selector = PIDS_ID_PPID
+def get_parent_pid(unsigned int pid) -> int:
+ cdef pids_info *handle = NULL
+ cdef pids_item selector = PIDS_ID_PPID
if procps_pids_new(&handle, &selector, 1) != 0:
return 0
- cdef unsigned int upid
- cdef pids_fetch *query
- cdef int retval
-
- upid = pid
- query = procps_pids_select(handle, &upid, 1, PIDS_SELECT_PID)
- if query == NULL or query.counts.total != 1 or query.stacks[0].head.item != PIDS_ID_PPID:
- retval = 0
- else:
+ cdef pids_fetch *query = procps_pids_select(handle, &pid, 1, PIDS_SELECT_PID)
+ cdef int retval = 0
+ if query != NULL and query.counts.total == 1 and query.stacks[0].head.item == PIDS_ID_PPID:
retval = query.stacks[0].head.result.s_int
procps_pids_unref(&handle)
--
2.43.0

View file

@ -1 +1 @@
SHA512 (xpra-5.0.3.tar.gz) = 8c028f0437213e5d0849258e2bb93a227ae3404b768853b597515db9b31b05fbbe60b45c58e4a2ed17349c4b77b9e0d15dbb8c48bef8cc27fe378ac8caba3686
SHA512 (xpra-5.0.6.tar.gz) = c25a763f4925c2ee987d7994cb040538635ba32bdfec830f386cae48e6acf4644b68198f79f42ddfef8174a16d6b40cdcedd75756fec1b23baa2319947a573be