diff --git a/0910c8dc-black-display-if-graphic-mode-vnc-and-listen-type-none.patch b/0910c8dc-black-display-if-graphic-mode-vnc-and-listen-type-none.patch new file mode 100644 index 00000000..a656fea8 --- /dev/null +++ b/0910c8dc-black-display-if-graphic-mode-vnc-and-listen-type-none.patch @@ -0,0 +1,24 @@ +Subject: domain: Use libvirt.VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH (bug 1379581) +From: Cole Robinson crobinso@redhat.com Thu Mar 2 15:08:32 2017 -0500 +Date: Thu Mar 2 15:08:32 2017 -0500: +Git: 0910c8dcfc38d03178d0cb6f2beb41a192eb45be + +It's what virt-viewer uses, and apparently it's needed for VNC +listen type=none + +https://bugzilla.redhat.com/show_bug.cgi?id=1379581 + +Index: virt-manager-1.4.0/virtManager/domain.py +=================================================================== +--- virt-manager-1.4.0.orig/virtManager/domain.py ++++ virt-manager-1.4.0/virtManager/domain.py +@@ -1117,7 +1117,8 @@ class vmmDomain(vmmLibvirtObject): + return self._backend.openConsole(devname, stream, flags) + + def open_graphics_fd(self): +- return self._backend.openGraphicsFD(0) ++ return self._backend.openGraphicsFD(0, ++ libvirt.VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH) + + def refresh_snapshots(self): + self._snapshot_list = None diff --git a/2df8dc39-detect-whether-IP-address-comes-from-DHCP-server.patch b/2df8dc39-detect-whether-IP-address-comes-from-DHCP-server.patch new file mode 100644 index 00000000..b959f1b9 --- /dev/null +++ b/2df8dc39-detect-whether-IP-address-comes-from-DHCP-server.patch @@ -0,0 +1,61 @@ +Subject: virtManager/interface: detect whether IP address comes from DHCP server +From: Pavel Hrdina phrdina@redhat.com Thu Jan 19 18:00:36 2017 +0100 +Date: Mon Feb 6 09:11:00 2017 +0100: +Git: 2df8dc39e8cab71752f7cb28a66f7a0db8aafe04 + +When the network interface is up the active XML contains only IP address +even in case that the inactive XML was configured to get the IP address +from DHCP server. To propagate this information back to UI we need to +get both XMLs to figure out current IP addresses and the configuration. + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1410722 + +Signed-off-by: Pavel Hrdina + +Index: virt-manager-1.4.0/virtManager/interface.py +=================================================================== +--- virt-manager-1.4.0.orig/virtManager/interface.py ++++ virt-manager-1.4.0/virtManager/interface.py +@@ -117,24 +117,35 @@ class vmmInterface(vmmLibvirtObject): + return [x[0] for x in self.get_slaves()] + + def _get_ip(self, iptype): +- obj = self.get_xmlobj() +- found = None +- for protocol in obj.protocols: ++ # Get list of IP addresses from active XML and protocol configuration ++ # from inactive XML to figure out whether the IP address is static or ++ # from DHCP server. ++ activeObj = self.get_xmlobj() ++ inactiveObj = self.get_xmlobj(inactive=True) ++ ++ activeProto = None ++ inactiveProto = None ++ for protocol in activeObj.protocols: ++ if protocol.family == iptype: ++ activeProto = protocol ++ break ++ for protocol in inactiveObj.protocols: + if protocol.family == iptype: +- found = protocol ++ inactiveProto = protocol + break +- if not found: ++ ++ if not activeProto and not inactiveProto: + return None, [] + + ret = [] +- for ip in found.ips: ++ for ip in activeProto.ips: + ipstr = ip.address + if not ipstr: + continue + if ip.prefix: + ipstr += "/%s" % ip.prefix + ret.append(ipstr) +- return found, ret ++ return inactiveProto or activeProto, ret + + def get_ipv4(self): + proto, ips = self._get_ip("ipv4") diff --git a/b8dccf6a-fix-connection-to-remote-spice-with-password.patch b/b8dccf6a-fix-connection-to-remote-spice-with-password.patch new file mode 100644 index 00000000..95918d19 --- /dev/null +++ b/b8dccf6a-fix-connection-to-remote-spice-with-password.patch @@ -0,0 +1,43 @@ +Subject: virtManager/viewers: fix connection to remote SPICE with password +From: Pavel Hrdina phrdina@redhat.com Tue Feb 7 17:46:25 2017 +0100 +Date: Fri Feb 10 09:43:20 2017 +0100: +Git: b8dccf6aca6ba5e5523749b54cf5040404b5ff26 + +When connecting to remote SPICE we use ssh tunnel if the SPICE is +listening only on "localhost". Our ssh tunnel scheduler uses locks +to serialize the requests for FD in order to not spam user for ssh +password. + +However when the main_channel is connected and emits AUTH_ERROR +we ask user for password and request for new FD. Unfortunately +after the new request is handled we didn't unlock the scheduler +and all other request would remain waiting for the lock. + +We need to unlock every FD request for the SPICE main channel not +only the first one when the channel itself is created. + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1401790 + +Signed-off-by: Pavel Hrdina + +Index: virt-manager-1.4.0/virtManager/viewers.py +=================================================================== +--- virt-manager-1.4.0.orig/virtManager/viewers.py ++++ virt-manager-1.4.0/virtManager/viewers.py +@@ -562,6 +562,8 @@ class SpiceViewer(Viewer): + ##################### + + def _main_channel_event_cb(self, channel, event): ++ self._tunnels.unlock() ++ + if event == SpiceClientGLib.ChannelEvent.CLOSED: + self._emit_disconnected() + elif event == SpiceClientGLib.ChannelEvent.ERROR_AUTH: +@@ -614,7 +616,6 @@ class SpiceViewer(Viewer): + + if (type(channel) == SpiceClientGLib.MainChannel and + not self._main_channel): +- self._tunnels.unlock() + self._main_channel = channel + hid = self._main_channel.connect_after("channel-event", + self._main_channel_event_cb) diff --git a/virt-manager.changes b/virt-manager.changes index dafef4be..e2190960 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Mar 3 11:55:53 MST 2017 - carnold@suse.com + +- Upstream bug fixes (bsc#1027942) + 2df8dc39-detect-whether-IP-address-comes-from-DHCP-server.patch + b8dccf6a-fix-connection-to-remote-spice-with-password.patch + 0910c8dc-black-display-if-graphic-mode-vnc-and-listen-type-none.patch + ------------------------------------------------------------------- Thu Jan 26 16:41:16 MST 2017 - carnold@suse.com diff --git a/virt-manager.spec b/virt-manager.spec index 84fa095b..a4578194 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -56,6 +56,9 @@ Patch16: b4858842-fix-bad-version-check-regression.patch Patch17: 5a11cf07-virt-manager-generates-invalid-guest-XML.patch Patch18: 617b9271-dont-return-virtio1.0-net-as-valid-device-name.patch Patch19: f07a3021-fix-wait-to-behave-like-noautoconsole.patch +Patch20: 2df8dc39-detect-whether-IP-address-comes-from-DHCP-server.patch +Patch21: b8dccf6a-fix-connection-to-remote-spice-with-password.patch +Patch22: 0910c8dc-black-display-if-graphic-mode-vnc-and-listen-type-none.patch # SUSE Only Patch70: virtman-desktop.patch Patch71: virtman-kvm.patch @@ -109,8 +112,10 @@ Requires: python-gobject-cairo Recommends: python-SpiceClientGtk Requires: virt-install Requires: virt-manager-common = %{verrel} +%if 0%{?is_opensuse} == 1 # virtman-desktop.patch changes the icon to be yast-vm-management, which is provided by yast2-branding Requires: yast2-branding-openSUSE +%endif %if %{with_guestfs} Requires: python-libguestfs @@ -194,6 +199,9 @@ machine). %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 # SUSE Only %patch70 -p1 %patch71 -p1