import spice-vdagent-0.21.0-5.el9

This commit is contained in:
CentOS Sources 2023-03-28 12:12:10 +00:00 committed by Stepan Oksanichenko
parent 0d6aa02d43
commit 07fd175eec
3 changed files with 88 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From 0717474feca8753bce7b8933bd10b3bab62a2f14 Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <freddy77@gmail.com>
Date: Sat, 12 Feb 2022 21:12:57 +0000
Subject: [PATCH] Do not process X11 events in vdagent_x11_create
Processing events requires some more initialisation between
VDAgentDisplay and vdagent_x11.
Postpone that after initialisation.
This fix a crash on Fedora 36, see
https://bugzilla.redhat.com/show_bug.cgi?id=2042877.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
src/vdagent/x11.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/vdagent/x11.c b/src/vdagent/x11.c
index 05a41d7..4af4bdc 100644
--- a/src/vdagent/x11.c
+++ b/src/vdagent/x11.c
@@ -302,9 +302,6 @@ struct vdagent_x11 *vdagent_x11_create(UdscsConnection *vdagentd,
x11->height[i] = attrib.height;
}
- /* Flush output buffers and consume any pending events */
- vdagent_x11_do_read(x11);
-
return x11;
}
--
2.38.1

View File

@ -0,0 +1,48 @@
From bcbbea34d93d07d33b767f808ff3adf628b1ea0f Mon Sep 17 00:00:00 2001
From: Victor Toso <victortoso@redhat.com>
Date: Fri, 13 Jan 2023 13:54:06 +0100
Subject: [PATCH] vdagent: Remove watch event on vdagent_display_destroy()
To avoid main loop calling it when GIOChannel for x11 was already
destroyed.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2145004
Signed-off-by: Victor Toso <victortoso@redhat.com>
---
src/vdagent/display.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/vdagent/display.c b/src/vdagent/display.c
index 790d9ad..602ab65 100644
--- a/src/vdagent/display.c
+++ b/src/vdagent/display.c
@@ -60,6 +60,7 @@ struct VDAgentDisplay {
UdscsConnection *vdagentd;
int debug;
GIOChannel *x11_channel;
+ guint io_watch_source_id;
VDAgentMutterDBus *mutter;
};
@@ -296,7 +297,8 @@ VDAgentDisplay* vdagent_display_create(UdscsConnection *vdagentd, int debug, int
return NULL;
}
- g_io_add_watch(display->x11_channel, G_IO_IN, x11_io_channel_cb, display);
+ display->io_watch_source_id =
+ g_io_add_watch(display->x11_channel, G_IO_IN, x11_io_channel_cb, display);
/* Since we are started at the same time as the wm,
@@ -323,7 +325,7 @@ void vdagent_display_destroy(VDAgentDisplay *display, int vdagentd_disconnected)
return;
}
-
+ g_source_remove(display->io_watch_source_id);
g_clear_pointer(&display->x11_channel, g_io_channel_unref);
vdagent_x11_destroy(display->x11, vdagentd_disconnected);
--
2.39.0

View File

@ -1,6 +1,6 @@
Name: spice-vdagent
Version: 0.21.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Agent for Spice guests
License: GPLv3+
URL: https://spice-space.org/
@ -11,6 +11,8 @@ Source2: jrope-7FDAB9AF.keyring
Patch0001: 0001-Fix-g_memdup-deprecation-warning-with-glib-2.68.patch
Patch0002: 0002-vdagent-udscs-limit-retry-to-connect-to-vdagentd.patch
Patch0003: 0003-udscs-udscs_connect-return-error-to-caller.patch
Patch0004: 0004-Do-not-process-X11-events-in-vdagent_x11_create.patch
Patch0005: 0005-vdagent-Remove-watch-event-on-vdagent_display_destro.patch
BuildRequires: make
BuildRequires: systemd-devel
@ -83,6 +85,10 @@ make install DESTDIR=$RPM_BUILD_ROOT V=2
%changelog
* Mon Jan 16 2023 Victor Toso <victortoso@redhat.com> 0.21.0-5
- Avoid crash due use before initialisation of X11 events
Related: rhbz#2160750
* Tue Dec 21 2021 Victor Toso <victortoso@redhat.com> 0.21.0-4
- Limit session agent to (re)connect to system agent to a minute
Related: rhbz#2028013