From d25db398e303083e32c3943f588ad09379fdd3c0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 26 2018 15:01:47 +0000 Subject: import spice-gtk-0.34-3.el7_5.1 --- diff --git a/SOURCES/0002-Revert-channel-usbredir-Fix-crash-on-channel-up.patch b/SOURCES/0002-Revert-channel-usbredir-Fix-crash-on-channel-up.patch new file mode 100644 index 0000000..b732d25 --- /dev/null +++ b/SOURCES/0002-Revert-channel-usbredir-Fix-crash-on-channel-up.patch @@ -0,0 +1,48 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Victor Toso +Date: Mon, 11 Jun 2018 12:14:30 +0200 +Subject: [PATCH] Revert "channel-usbredir: Fix crash on channel-up" + +This reverts commit 291f3e4419e6fb4077ae43a5e09eb1c37b9dd729. + +Follow up patch should address rhbz#1399838 mentioned in commit above +in a different way. + +Major reason to revert is that the SpiceUsbDeviceManager object is +kept in SpiceSession as an easy way to share it between different +SpiceUsbredirChannel while SpiceSession itself does not use it. This +causes problems on migration as we start a new session with a new +SpiceUsbDeviceManager object while the previous one still exists. + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1558043 +Signed-off-by: Victor Toso +Acked-by: Christophe Fergeau +--- + src/spice-session.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/src/spice-session.c b/src/spice-session.c +index a729cc3..094dc41 100644 +--- a/src/spice-session.c ++++ b/src/spice-session.c +@@ -281,7 +281,6 @@ static void spice_session_init(SpiceSession *session) + { + SpiceSessionPrivate *s; + gchar *channels; +- GError *err = NULL; + + SPICE_DEBUG("New session (compiled from package " PACKAGE_STRING ")"); + s = session->priv = SPICE_SESSION_GET_PRIVATE(session); +@@ -294,12 +293,6 @@ static void spice_session_init(SpiceSession *session) + s->images = cache_image_new((GDestroyNotify)pixman_image_unref); + s->glz_window = glz_decoder_window_new(); + update_proxy(session, NULL); +- +- s->usb_manager = spice_usb_device_manager_get(session, &err); +- if (err != NULL) { +- SPICE_DEBUG("Could not initialize SpiceUsbDeviceManager - %s", err->message); +- g_clear_error(&err); +- } + } + + static void diff --git a/SOURCES/0003-channel-usbredir-Fix-crash-on-channel-up.patch b/SOURCES/0003-channel-usbredir-Fix-crash-on-channel-up.patch new file mode 100644 index 0000000..06f321e --- /dev/null +++ b/SOURCES/0003-channel-usbredir-Fix-crash-on-channel-up.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Victor Toso +Date: Fri, 6 Apr 2018 09:59:44 +0200 +Subject: [PATCH] channel-usbredir: Fix crash on channel-up + +By adding a guard to not handle channel-up on SpiceUsbredirChannel in +case struct usbredirhost wasn't initialized yet. Same guard is in +place for the generic usbredir_handle_msg() function to avoid handling +Server's message while Client's initialization is not done. + +As mentioned in commit 291f3e4419e6, this isn't a problem for +graphical clients as some initialization is done to present the +shareable usb devices to user. + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1399838 +Signed-off-by: Victor Toso +Acked-by: Christophe Fergeau +--- + src/channel-usbredir.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c +index 1f791bc..306bdd5 100644 +--- a/src/channel-usbredir.c ++++ b/src/channel-usbredir.c +@@ -817,6 +817,7 @@ static void spice_usbredir_channel_up(SpiceChannel *c) + SpiceUsbredirChannel *channel = SPICE_USBREDIR_CHANNEL(c); + SpiceUsbredirChannelPrivate *priv = channel->priv; + ++ g_return_if_fail(priv->host != NULL); + /* Flush any pending writes */ + usbredirhost_write_guest_data(priv->host); + } diff --git a/SPECS/spice-gtk.spec b/SPECS/spice-gtk.spec index e38585f..0ff84c7 100644 --- a/SPECS/spice-gtk.spec +++ b/SPECS/spice-gtk.spec @@ -4,7 +4,7 @@ Name: spice-gtk Version: 0.34 -Release: 3%{?dist} +Release: 3%{?dist}.1 Summary: A GTK+ widget for SPICE clients Group: System Environment/Libraries @@ -14,6 +14,8 @@ URL: https://www.spice-space.org/ Source0: https://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2 Patch0001: 0001-canvas-base-Fix-width-computation-for-palette-images.patch +Patch0002: 0002-Revert-channel-usbredir-Fix-crash-on-channel-up.patch +Patch0003: 0003-channel-usbredir-Fix-crash-on-channel-up.patch Patch1000: 1000-gtk-Makefile.am-add-PIE-flags-to-libspice-client-gli.patch BuildRequires: intltool @@ -116,6 +118,8 @@ spicy-screenshot is a tool to capture screen-shots of a SPICE desktop. %setup -q -n spice-gtk-%{version}%{?_version_suffix} %patch0001 -p1 +%patch0002 -p1 +%patch0003 -p1 %patch1000 -p1 find . -name '*.stamp' | xargs touch @@ -195,6 +199,10 @@ rm -f %{buildroot}%{_libdir}/*.la %{_bindir}/spicy-stats %changelog +* Wed Jun 13 2018 Victor Toso - 0.34-3.1 +- Fix migration failure when USB is enabled + Resolves: rhbz#1590412 + * Thu Dec 21 2017 Frediano Ziglio - 0.34-3 - Fix stride misalignment Resolves: rhbz#1508847