From 8a309ff688b074fd232d06c965564f9d151ea58c9a1dbf5758187e02f9a3c2cf Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Tue, 10 Mar 2020 22:20:01 +0000 Subject: [PATCH] Accepting request 783558 from home:bfrogers:branches:Virtualization - Update to 0.20.0 * Add gio-unix and gobject dependency >= 2.50 * Bump gtk+ >= 3.22 (optional dependency) * Last release with gtk+ being optional * !4 - Race fixes between client and guest clipboard * !2 - Fix session lookup for new GNOME versions * !3 - Now using GMainLoop and GIO to handle I/O of messages * Several minor covscan fixes - Discovered GLib dependency is now >= 2.58 - Patch dropped (contained in update): vdagentd-Fix-session-lookup-for-new-GNOME-versions.patch OBS-URL: https://build.opensuse.org/request/show/783558 OBS-URL: https://build.opensuse.org/package/show/Virtualization/spice-vdagent?expand=0&rev=35 --- spice-vdagent-0.19.0.tar.bz2 | 3 - spice-vdagent-0.19.0.tar.bz2.sig | Bin 566 -> 0 bytes spice-vdagent-0.20.0.tar.bz2 | 3 + spice-vdagent-0.20.0.tar.bz2.sig | Bin 0 -> 566 bytes spice-vdagent.changes | 15 +++ spice-vdagent.spec | 18 ++-- ...ession-lookup-for-new-GNOME-versions.patch | 100 ------------------ 7 files changed, 27 insertions(+), 112 deletions(-) delete mode 100644 spice-vdagent-0.19.0.tar.bz2 delete mode 100644 spice-vdagent-0.19.0.tar.bz2.sig create mode 100644 spice-vdagent-0.20.0.tar.bz2 create mode 100644 spice-vdagent-0.20.0.tar.bz2.sig delete mode 100644 vdagentd-Fix-session-lookup-for-new-GNOME-versions.patch diff --git a/spice-vdagent-0.19.0.tar.bz2 b/spice-vdagent-0.19.0.tar.bz2 deleted file mode 100644 index 07e8ae9..0000000 --- a/spice-vdagent-0.19.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:63a77c611c84f8120519a78a30256e43e159085831ac82de71643db643972f65 -size 151356 diff --git a/spice-vdagent-0.19.0.tar.bz2.sig b/spice-vdagent-0.19.0.tar.bz2.sig deleted file mode 100644 index df4851efc395cf9dc458118d6283dfe869db136adc908bc590affe8fad198ba9..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmV-60?GY}0y6{v0SEvc79j*6Z96qDR&P5FWpe44*%CeDdPq+N0$i}9UH}RS5SQ5! zJ>z;vPsZyH|3v_-0fy>?ri;PtK98WqL{THW@Ggn!ylseNG)~T4kgKkyJ1ycO7 zL3|*DKmZVnEQw`GH8kbbJGFu!?H5#1Su*pbq@8&35=!W&2e~}gjOc2!O}O-Ug~*pd z-e_@}mo?y68l^0T6>CfUxIzSSELj=lV{aUk@WH~$pmf33yh)G>%G`mMx|IUq>5ZIe zS&gY+;P8!*9XydE#~&N^CkICMa6Gic@NqHMM$;?Cg?N~eM}sS8#q=>uI30@BUC}+& zkB-Z;9BG$O5y?u(S0vu#$o_Ytdyg>d+4l7OIXP|7dE4%p1;}P#B?|5m4wn1K(UX?s zj=x{|#MKxN%;@sM~afJZ3z?xcAa#Qfwt)j?VP1*C?*Oz;vPpF9x{wz2NqA0b^Xa4=BPNk#SJrdT=V!(p$rL0^4a%=Ed9;@+7FqddmyDQCG zQfcS#&L_hB^a=;Z?`-D);KU8t|EMXVc1v3TZtf*U8CS?cm5xJ(*R6B@k6Zg8rBCcd zXVbf_h8+A0)LDouF}h+ww@t=L(ZsV07t z^h1ef5f_}09V&amEHJFrL2+jzjHM~2!SqJsehxUu&{-yiGl>zL8s{F3Kr>x@=|t1( zZ>&tqg{Fjr{8*FmRNiT?t7i=J^4%uV0u*Eh^yd#YCM%=_pwV;1VCW7+(}jYEj{v@8 z0m$tW2cW61&S)?ZzU4=Q5;|!~fwSRY;Qc9jWR)YOZ+7UWDP*2P!kYBii$|X&YN-$g zr#_4qtdP@KF+jm(#N2jT1a|Z9ZCS##KV1IBR2)j^^Dp%wHYdXw!U=4+67#@}R6RPx ztu0nXQB5BPB7a80*vJ$JIL|GTVq5ew&f?i`B#lopXLo8 E{v1CCp8x;= literal 0 HcmV?d00001 diff --git a/spice-vdagent.changes b/spice-vdagent.changes index 0ec6f60..3a3761e 100644 --- a/spice-vdagent.changes +++ b/spice-vdagent.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue Mar 10 21:19:18 UTC 2020 - Bruce Rogers + +- Update to 0.20.0 + * Add gio-unix and gobject dependency >= 2.50 + * Bump gtk+ >= 3.22 (optional dependency) + * Last release with gtk+ being optional + * !4 - Race fixes between client and guest clipboard + * !2 - Fix session lookup for new GNOME versions + * !3 - Now using GMainLoop and GIO to handle I/O of messages + * Several minor covscan fixes +- Discovered GLib dependency is now >= 2.58 +- Patch dropped (contained in update): + vdagentd-Fix-session-lookup-for-new-GNOME-versions.patch + ------------------------------------------------------------------- Thu Dec 19 15:18:43 UTC 2019 - Dominique Leuenberger diff --git a/spice-vdagent.spec b/spice-vdagent.spec index 1191077..69fe523 100644 --- a/spice-vdagent.spec +++ b/spice-vdagent.spec @@ -18,7 +18,7 @@ Name: spice-vdagent -Version: 0.19.0 +Version: 0.20.0 Release: 0 Summary: Agent for Spice guests License: GPL-3.0-or-later @@ -27,20 +27,21 @@ URL: http://spice-space.org/ Source: http://spice-space.org/download/releases/%{name}-%{version}.tar.bz2 Source1: http://spice-space.org/download/releases/%{name}-%{version}.tar.bz2.sig Source2: %{name}.keyring -Patch0: vdagentd-Fix-session-lookup-for-new-GNOME-versions.patch BuildRequires: alsa-devel >= 1.0.22 BuildRequires: desktop-file-utils -BuildRequires: glib2-devel BuildRequires: libXfixes-devel BuildRequires: libXinerama-devel -BuildRequires: libXrandr-devel -BuildRequires: libdrm-devel -BuildRequires: libpciaccess-devel +BuildRequires: libXrandr-devel >= 1.3 +BuildRequires: libpciaccess-devel >= 0.10 BuildRequires: libtool -BuildRequires: spice-protocol-devel >= 0.12.8 BuildRequires: pkgconfig(dbus-1) -BuildRequires: pkgconfig(glib-2.0) >= 2.34 +BuildRequires: pkgconfig(gio-2.0) >= 2.50 +BuildRequires: pkgconfig(glib-2.0) >= 2.58 +BuildRequires: pkgconfig(gobject-2.0) >= 2.50 +BuildRequires: pkgconfig(gtk+-3.0) >= 3.22 +BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(spice-protocol) >= 0.14.1 BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(udev) Supplements: modalias(xorg-x11-server:virtio:d00000003v*) @@ -60,7 +61,6 @@ Features: %prep %setup -q -%patch0 -p1 %build %configure \ diff --git a/vdagentd-Fix-session-lookup-for-new-GNOME-versions.patch b/vdagentd-Fix-session-lookup-for-new-GNOME-versions.patch deleted file mode 100644 index 7b1e603..0000000 --- a/vdagentd-Fix-session-lookup-for-new-GNOME-versions.patch +++ /dev/null @@ -1,100 +0,0 @@ -From b67ff71f1b30992f5b8d4583cc93adb789d247fa Mon Sep 17 00:00:00 2001 -From: Benjamin Berg -Date: Fri, 13 Sep 2019 17:00:27 +0200 -Subject: [PATCH] vdagentd: Fix session lookup for new GNOME versions - -New GNOME versions have started to manage the session using the systemd -user instance. The effect of this is that the spice-vdagent running in -the user session is forked off (indirectly) from the systemd user -instance and does technically not belong to any session. - -The correct way of handling this situation is to simply assume that the -process belongs to the users graphical session. Add a heuristic to find -the graphical session based on the UID, fixing spice-vdagent running on -GNOME 3.34 with systemd integration. - -Acked-by: Victor Toso -[BR: boo#1157235] -Signed-off-by: Bruce Rogers ---- - src/vdagentd/systemd-login.c | 59 +++++++++++++++++++++++++++++++++--- - 1 file changed, 55 insertions(+), 4 deletions(-) - -diff --git a/src/vdagentd/systemd-login.c b/src/vdagentd/systemd-login.c -index a11b66d..0b8f3c1 100644 ---- a/src/vdagentd/systemd-login.c -+++ b/src/vdagentd/systemd-login.c -@@ -286,15 +286,66 @@ const char *session_info_get_active_session(struct session_info *si) - - char *session_info_session_for_pid(struct session_info *si, uint32_t pid) - { -+ int i; - int r; -+ GStrv sessions = NULL; - char *session = NULL; -+ uid_t uid; - - r = sd_pid_get_session(pid, &session); -- if (r < 0) -- syslog(LOG_ERR, "Error getting session for pid %u: %s", -- pid, strerror(-r)); -- else if (si->verbose) -+ if (r >= 0) { -+ goto out; -+ } -+ -+ /* If we could not get a session for the pid then the agent is probably -+ * running in a systemd managed session. In that case we simply assume -+ * it is actually part of the newest graphical session we can find. */ -+ r = sd_pid_get_owner_uid(pid, &uid); -+ if (r < 0) { -+ syslog(LOG_ERR, "Error getting owner UID for pid %u: %s", -+ pid, strerror(-r)); -+ goto out; -+ } -+ -+ r = sd_uid_get_sessions(uid, 0, &sessions); -+ if (r < 0) { -+ syslog(LOG_ERR, "Error getting sessions for UID %d: %s", -+ (int) uid, strerror(-r)); -+ goto out; -+ } -+ -+ for (i = 0; sessions[i] != NULL; i++) { -+ char *session_type = NULL; -+ -+ r = sd_session_get_type(sessions[i], &session_type); -+ -+ if (r < 0) { -+ syslog(LOG_ERR, "Error getting session type for session %s: %s", -+ sessions[i], strerror(-r)); -+ continue; -+ } -+ -+ if (g_strcmp0(session_type, "wayland") == 0 || -+ g_strcmp0(session_type, "x11") == 0 || -+ g_strcmp0(session_type, "mir") == 0) { -+ -+ /* We prefer the newest session (i.e. last entry) from the -+ * user, assuming that any old session that still exist has -+ * just not yet died properly. */ -+ if (session != NULL) -+ free (session); -+ session = g_strdup(sessions[i]); -+ } -+ -+ free(session_type); -+ } -+ -+ g_strfreev(sessions); -+ -+out: -+ if (session != NULL && si->verbose) { - syslog(LOG_INFO, "Session for pid %u: %s", pid, session); -+ } - - return session; - } --- -2.24.0 -