From 2e312e789d4f8a91e578549e68220a27e55da7ef Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Dec 13 2016 18:56:46 +0000 Subject: Fix version check for spice GL support Don't return virtio1.0-net as a valid device name (bz #1399083) Fix window size tracking on wayland (bz #1375175) Fix 'resize to VM' on wayland (bz #1397598) --- diff --git a/0004-virtinst-fix-bad-version-check-regression-from-55327.patch b/0004-virtinst-fix-bad-version-check-regression-from-55327.patch new file mode 100644 index 0000000..77edd5c --- /dev/null +++ b/0004-virtinst-fix-bad-version-check-regression-from-55327.patch @@ -0,0 +1,30 @@ +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +Date: Wed, 9 Nov 2016 11:21:32 +0400 +Subject: [PATCH virt-manager] virtinst: fix bad version check regression from + 55327c81b7 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Marc-André Lureau +(cherry picked from commit b4858842f9e2f4f39ca81ad596fb777d11537a0f) +--- + virtinst/support.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/virtinst/support.py b/virtinst/support.py +index 9516d83..0a57fb8 100644 +--- a/virtinst/support.py ++++ b/virtinst/support.py +@@ -312,9 +312,9 @@ SUPPORT_CONN_MEM_STATS_PERIOD = _make( + function="virDomain.setMemoryStatsPeriod", + version="1.1.1", hv_version={"qemu": 0}) + SUPPORT_CONN_SPICE_GL = _make(version="1.3.3", +- hv_version={"qemu": "2.7.92", "test": 0}) ++ hv_version={"qemu": "2.6.0", "test": 0}) + SUPPORT_CONN_VIDEO_VIRTIO_ACCEL3D = _make(version="1.3.0", +- hv_version={"qemu": "2.7.0", "test": 0}) ++ hv_version={"qemu": "2.5.0", "test": 0}) + SUPPORT_CONN_GRAPHICS_LISTEN_NONE = _make(version="2.0.0") + + diff --git a/0005-osdict-Don-t-return-virtio1.0-net-as-a-valid-device-.patch b/0005-osdict-Don-t-return-virtio1.0-net-as-a-valid-device-.patch new file mode 100644 index 0000000..df5a0c4 --- /dev/null +++ b/0005-osdict-Don-t-return-virtio1.0-net-as-a-valid-device-.patch @@ -0,0 +1,27 @@ +From: Cole Robinson +Date: Tue, 13 Dec 2016 12:58:14 -0500 +Subject: [PATCH virt-manager] osdict: Don't return virtio1.0-net as a valid + device name (bug 1399083) + +We can't depend on libosinfo device names being valid libvirt network +model names, so use a whitelist + +https://bugzilla.redhat.com/show_bug.cgi?id=1399083 +(cherry picked from commit 617b92710f50015c5df5f9db15d25de18867957d) +--- + virtinst/osdict.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/virtinst/osdict.py b/virtinst/osdict.py +index bfc435b..7e4ead2 100644 +--- a/virtinst/osdict.py ++++ b/virtinst/osdict.py +@@ -453,7 +453,7 @@ class _OsVariant(object): + devs = self._os.get_all_devices(fltr) + for idx in range(devs.get_length()): + devname = devs.get_nth(idx).get_name() +- if devname != "virtio-net": ++ if devname in ["pcnet", "ne2k_pci", "rtl8139", "e1000"]: + return devname + return None + diff --git a/0006-manager-Fix-window-size-tracking-on-wayland-bug-1375.patch b/0006-manager-Fix-window-size-tracking-on-wayland-bug-1375.patch new file mode 100644 index 0000000..688ab9f --- /dev/null +++ b/0006-manager-Fix-window-size-tracking-on-wayland-bug-1375.patch @@ -0,0 +1,49 @@ +From: Cole Robinson +Date: Tue, 13 Dec 2016 13:27:06 -0500 +Subject: [PATCH virt-manager] manager: Fix window size tracking on wayland + (bug 1375175) + +The method we were using is a common implementation bug, +explained here: https://wiki.gnome.org/HowDoI/SaveWindowState + +https://bugzilla.redhat.com/show_bug.cgi?id=1375175 +(cherry picked from commit 107aa2b1345f45384086c00c904e4786001e4827) +--- + virtManager/details.py | 4 ++-- + virtManager/manager.py | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/virtManager/details.py b/virtManager/details.py +index b2f451d..38491d4 100644 +--- a/virtManager/details.py ++++ b/virtManager/details.py +@@ -1016,10 +1016,10 @@ class vmmDetails(vmmGObjectUI): + # Window state listeners # + ########################## + +- def window_resized(self, ignore, event): ++ def window_resized(self, ignore, ignore2): + if not self.is_visible(): + return +- self._window_size = (event.width, event.height) ++ self._window_size = self.topwin.get_size() + + def popup_addhw_menu(self, widget, event): + ignore = widget +diff --git a/virtManager/manager.py b/virtManager/manager.py +index d70f4c4..31fe457 100644 +--- a/virtManager/manager.py ++++ b/virtManager/manager.py +@@ -458,10 +458,10 @@ class vmmManager(vmmGObjectUI): + # Action listeners # + #################### + +- def window_resized(self, ignore, event): ++ def window_resized(self, ignore, ignore2): + if not self.is_visible(): + return +- self._window_size = (event.width, event.height) ++ self._window_size = self.topwin.get_size() + + def exit_app(self, src_ignore=None, src2_ignore=None): + self.emit("action-exit-app") diff --git a/0007-console-Fix-resize-to-VM-on-wayland-bug-1397598.patch b/0007-console-Fix-resize-to-VM-on-wayland-bug-1397598.patch new file mode 100644 index 0000000..05762d1 --- /dev/null +++ b/0007-console-Fix-resize-to-VM-on-wayland-bug-1397598.patch @@ -0,0 +1,37 @@ +From: Cole Robinson +Date: Tue, 13 Dec 2016 13:31:17 -0500 +Subject: [PATCH virt-manager] console: Fix resize to VM on wayland (bug + 1397598) + +Yet another issue with not using window.get_size() and instead using +its size allocation directly, which differ on wayland due to client +side decorations. + +https://bugzilla.redhat.com/show_bug.cgi?id=1397598 +(cherry picked from commit 88bfdf4926e1223e75468e138d28a1f3756e3cc6) +--- + virtManager/console.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/virtManager/console.py b/virtManager/console.py +index 1d33115..326671c 100644 +--- a/virtManager/console.py ++++ b/virtManager/console.py +@@ -455,14 +455,14 @@ class vmmConsolePages(vmmGObjectUI): + if not self._viewer.console_get_desktop_resolution(): + return + +- topwin_alloc = self.topwin.get_allocation() ++ top_w, top_h = self.topwin.get_size() + viewer_alloc = self.widget("console-gfx-scroll").get_allocation() + desktop_w, desktop_h = self._viewer.console_get_desktop_resolution() + + self.topwin.unmaximize() + self.topwin.resize( +- desktop_w + (topwin_alloc.width - viewer_alloc.width), +- desktop_h + (topwin_alloc.height - viewer_alloc.height)) ++ desktop_w + (top_w - viewer_alloc.width), ++ desktop_h + (top_h - viewer_alloc.height)) + + + ################ diff --git a/virt-manager.spec b/virt-manager.spec index b7e64f9..d250e8a 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -20,7 +20,7 @@ %global gittag 20160520git2204de62d9 Name: virt-manager Version: 1.4.0 -Release: 4%{?dist} +Release: 5%{?dist} %global verrel %{version}-%{release} Summary: Desktop tool for managing virtual machines via libvirt @@ -36,6 +36,14 @@ Patch0001: 0001-Update-translations-and-fix-it.po-problems.patch Patch0002: 0002-osdict-Fix-incorrect-usage-of-virtio-input.patch # Fix error checking extra_args for console argument Patch0003: 0003-virt-install-Fix-error-checking-extra_args.patch +# Fix version check for spice GL support +Patch0004: 0004-virtinst-fix-bad-version-check-regression-from-55327.patch +# Don't return virtio1.0-net as a valid device name (bz #1399083) +Patch0005: 0005-osdict-Don-t-return-virtio1.0-net-as-a-valid-device-.patch +# Fix window size tracking on wayland (bz #1375175) +Patch0006: 0006-manager-Fix-window-size-tracking-on-wayland-bug-1375.patch +# Fix 'resize to VM' on wayland (bz #1397598) +Patch0007: 0007-console-Fix-resize-to-VM-on-wayland-bug-1397598.patch Requires: virt-manager-common = %{verrel} @@ -120,6 +128,14 @@ machine). %patch0002 -p1 # Fix error checking extra_args for console argument %patch0003 -p1 +# Fix version check for spice GL support +%patch0004 -p1 +# Don't return virtio1.0-net as a valid device name (bz #1399083) +%patch0005 -p1 +# Fix window size tracking on wayland (bz #1375175) +%patch0006 -p1 +# Fix 'resize to VM' on wayland (bz #1397598) +%patch0007 -p1 %build @@ -242,6 +258,12 @@ fi %{_bindir}/virt-xml %changelog +* Tue Dec 13 2016 Cole Robinson - 1.4.0-5 +- Fix version check for spice GL support +- Don't return virtio1.0-net as a valid device name (bz #1399083) +- Fix window size tracking on wayland (bz #1375175) +- Fix 'resize to VM' on wayland (bz #1397598) + * Sun Nov 06 2016 Cole Robinson - 1.4.0-4 - Fix fedora24 installs from incorrectly using virtio-input (bz #1391522) - Fix error checking extra_args for console argument