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)
This commit is contained in:
Cole Robinson 2016-12-13 13:53:12 -05:00
parent ee5c6578fa
commit f191876fc7
5 changed files with 166 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
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 <marcandre.lureau@redhat.com>
(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")

View File

@ -0,0 +1,27 @@
From: Cole Robinson <crobinso@redhat.com>
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

View File

@ -0,0 +1,49 @@
From: Cole Robinson <crobinso@redhat.com>
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")

View File

@ -0,0 +1,37 @@
From: Cole Robinson <crobinso@redhat.com>
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))
################

View File

@ -20,7 +20,7 @@
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 <crobinso@redhat.com> - 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 <crobinso@redhat.com> - 1.4.0-4
- Fix fedora24 installs from incorrectly using virtio-input (bz #1391522)
- Fix error checking extra_args for console argument