Fix fedora24 installs from incorrectly using virtio-input (bz #1391522)
Fix error checking extra_args for console argument
This commit is contained in:
parent
4862f4a5c1
commit
ee5c6578fa
83
0002-osdict-Fix-incorrect-usage-of-virtio-input.patch
Normal file
83
0002-osdict-Fix-incorrect-usage-of-virtio-input.patch
Normal file
@ -0,0 +1,83 @@
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Fri, 29 Jul 2016 13:17:36 -0400
|
||||
Subject: [PATCH virt-manager] osdict: Fix incorrect usage of virtio input
|
||||
|
||||
Regression reported with latest libosinfo, when the OS reports
|
||||
virtio-input support:
|
||||
|
||||
http://www.redhat.com/archives/virt-tools-list/2016-July/msg00109.html
|
||||
|
||||
Really our code presently only cares about the USB tablet, so adjust
|
||||
our libosinfo lookup to explicitly check for it
|
||||
|
||||
(cherry picked from commit 1d2cd306773064258f5d02c980b09a683ae77798)
|
||||
---
|
||||
virtinst/guest.py | 11 +++++------
|
||||
virtinst/osdict.py | 28 ++++++++++++----------------
|
||||
2 files changed, 17 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/virtinst/guest.py b/virtinst/guest.py
|
||||
index 6a42536..9df4a1c 100644
|
||||
--- a/virtinst/guest.py
|
||||
+++ b/virtinst/guest.py
|
||||
@@ -1031,15 +1031,14 @@ class Guest(XMLBuilder):
|
||||
return False
|
||||
return all([c.model == "none" for c in controllers])
|
||||
|
||||
- input_type = self._os_object.default_inputtype()
|
||||
- input_bus = self._os_object.default_inputbus()
|
||||
+ input_type = "mouse"
|
||||
+ input_bus = "ps2"
|
||||
if self.os.is_xenpv():
|
||||
input_type = VirtualInputDevice.TYPE_MOUSE
|
||||
input_bus = VirtualInputDevice.BUS_XEN
|
||||
- elif _usb_disabled() and input_bus == "usb":
|
||||
- input_bus = "ps2"
|
||||
- if input_type == "tablet":
|
||||
- input_type = "mouse"
|
||||
+ elif self._os_object.supports_usbtablet() and not _usb_disabled():
|
||||
+ input_type = "tablet"
|
||||
+ input_bus = "usb"
|
||||
|
||||
for inp in self.get_devices("input"):
|
||||
if (inp.type == inp.TYPE_DEFAULT and
|
||||
diff --git a/virtinst/osdict.py b/virtinst/osdict.py
|
||||
index e8c1487..bfc435b 100644
|
||||
--- a/virtinst/osdict.py
|
||||
+++ b/virtinst/osdict.py
|
||||
@@ -457,23 +457,19 @@ class _OsVariant(object):
|
||||
return devname
|
||||
return None
|
||||
|
||||
- def default_inputtype(self):
|
||||
- if self._os:
|
||||
- fltr = libosinfo.Filter()
|
||||
- fltr.add_constraint("class", "input")
|
||||
- devs = self._os.get_all_devices(fltr)
|
||||
- if devs.get_length():
|
||||
- return devs.get_nth(0).get_name()
|
||||
- return "mouse"
|
||||
+ def supports_usbtablet(self):
|
||||
+ if not self._os:
|
||||
+ return False
|
||||
|
||||
- def default_inputbus(self):
|
||||
- if self._os:
|
||||
- fltr = libosinfo.Filter()
|
||||
- fltr.add_constraint("class", "input")
|
||||
- devs = self._os.get_all_devices(fltr)
|
||||
- if devs.get_length():
|
||||
- return devs.get_nth(0).get_bus_type()
|
||||
- return "ps2"
|
||||
+ fltr = libosinfo.Filter()
|
||||
+ fltr.add_constraint("class", "input")
|
||||
+ fltr.add_constraint("name", "tablet")
|
||||
+ devs = self._os.get_all_devices(fltr)
|
||||
+ for idx in range(devs.get_length()):
|
||||
+ dev = devs.get_nth(idx)
|
||||
+ if devs.get_nth(idx).get_bus_type() == "usb":
|
||||
+ return True
|
||||
+ return False
|
||||
|
||||
def supports_virtiodisk(self):
|
||||
if self._os:
|
29
0003-virt-install-Fix-error-checking-extra_args.patch
Normal file
29
0003-virt-install-Fix-error-checking-extra_args.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed, 2 Nov 2016 10:27:14 -0400
|
||||
Subject: [PATCH virt-manager] virt-install: Fix error checking extra_args
|
||||
|
||||
Later bits in the code that want to warn based on extra_args content
|
||||
don't handle the None case. Be consistent and convert it to a list
|
||||
everywhere.
|
||||
|
||||
Mentioned at https://bugzilla.redhat.com/show_bug.cgi?id=1376547#c9
|
||||
|
||||
(cherry picked from commit 7962672c713cf6d35e770f0d00068dee707b6ec9)
|
||||
---
|
||||
virt-install | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/virt-install b/virt-install
|
||||
index 817f4b3..5a4080f 100755
|
||||
--- a/virt-install
|
||||
+++ b/virt-install
|
||||
@@ -595,7 +595,8 @@ def build_guest_instance(conn, options):
|
||||
convert_old_os_options(options)
|
||||
|
||||
# non-xml install options
|
||||
- guest.installer.extraargs = options.extra_args or []
|
||||
+ options.extra_args = options.extra_args or []
|
||||
+ guest.installer.extraargs = options.extra_args
|
||||
guest.installer.initrd_injections = options.initrd_inject
|
||||
guest.autostart = options.autostart
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
Name: virt-manager
|
||||
Version: 1.4.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
%global verrel %{version}-%{release}
|
||||
|
||||
Summary: Desktop tool for managing virtual machines via libvirt
|
||||
@ -32,6 +32,10 @@ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar
|
||||
|
||||
# Fix italian translation from breaking the app (bz #1350185)
|
||||
Patch0001: 0001-Update-translations-and-fix-it.po-problems.patch
|
||||
# Fix fedora24 installs from incorrectly using virtio-input (bz #1391522)
|
||||
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
|
||||
|
||||
|
||||
Requires: virt-manager-common = %{verrel}
|
||||
@ -112,6 +116,10 @@ machine).
|
||||
|
||||
# Fix italian translation from breaking the app (bz #1350185)
|
||||
%patch0001 -p1
|
||||
# Fix fedora24 installs from incorrectly using virtio-input (bz #1391522)
|
||||
%patch0002 -p1
|
||||
# Fix error checking extra_args for console argument
|
||||
%patch0003 -p1
|
||||
|
||||
|
||||
%build
|
||||
@ -234,6 +242,10 @@ fi
|
||||
%{_bindir}/virt-xml
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
* Wed Jun 29 2016 Cole Robinson <crobinso@redhat.com> - 1.4.0-3
|
||||
- Fix italian translation from breaking the app (bz #1350185)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user