mirror of
https://src.fedoraproject.org/rpms/virt-manager.git
synced 2025-07-17 09:34:53 +00:00
Fix connecting to console with specific listen address
Fix regression that dropped spice dependency (bz 819270)
This commit is contained in:
53
virt-manager-fix-listen-address.patch
Normal file
53
virt-manager-fix-listen-address.patch
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
diff -rup virt-manager-0.9.1/src/virtManager/console.py foo/src/virtManager/console.py
|
||||||
|
--- virt-manager-0.9.1/src/virtManager/console.py 2012-06-06 17:05:12.762334674 -0400
|
||||||
|
+++ foo/src/virtManager/console.py 2012-06-06 17:04:59.383045040 -0400
|
||||||
|
@@ -370,6 +370,7 @@ class VNCViewer(Viewer):
|
||||||
|
ignore = user
|
||||||
|
|
||||||
|
if not socketpath:
|
||||||
|
+ logging.debug("VNC connecting to %s:%s" % (host, port))
|
||||||
|
self.display.open_host(host, port)
|
||||||
|
return
|
||||||
|
|
||||||
|
@@ -485,7 +486,6 @@ class SpiceViewer(Viewer):
|
||||||
|
ignore = socketpath
|
||||||
|
|
||||||
|
uri = "spice://"
|
||||||
|
- uri += (user and str(user) or "")
|
||||||
|
uri += str(host) + "?port=" + str(port)
|
||||||
|
logging.debug("spice uri: %s", uri)
|
||||||
|
|
||||||
|
@@ -1084,7 +1084,7 @@ class vmmConsolePages(vmmGObjectUI):
|
||||||
|
|
||||||
|
self.set_enable_accel()
|
||||||
|
|
||||||
|
- if transport in ("ssh", "ext"):
|
||||||
|
+ if (transport in ("ssh", "ext")) and gaddr == "127.0.0.1":
|
||||||
|
if self.tunnels:
|
||||||
|
# Tunnel already open, no need to continue
|
||||||
|
return
|
||||||
|
@@ -1096,8 +1096,10 @@ class vmmConsolePages(vmmGObjectUI):
|
||||||
|
self.viewer.open_fd(fd)
|
||||||
|
|
||||||
|
else:
|
||||||
|
- self.viewer.open_host(connhost, connuser,
|
||||||
|
- str(gport), gsocket)
|
||||||
|
+ host = gaddr
|
||||||
|
+ if gaddr == "127.0.0.1" or gaddr == "0.0.0.0":
|
||||||
|
+ host = connhost
|
||||||
|
+ self.viewer.open_host(host, connuser, str(gport), gsocket)
|
||||||
|
|
||||||
|
except Exception, e:
|
||||||
|
logging.exception("Error connection to graphical console")
|
||||||
|
diff -rup virt-manager-0.9.1/src/virtManager/domain.py foo/src/virtManager/domain.py
|
||||||
|
--- virt-manager-0.9.1/src/virtManager/domain.py 2012-01-29 15:40:49.000000000 -0500
|
||||||
|
+++ foo/src/virtManager/domain.py 2012-06-06 17:04:59.384044912 -0400
|
||||||
|
@@ -952,7 +952,7 @@ class vmmDomain(vmmLibvirtObject):
|
||||||
|
if gport != None:
|
||||||
|
gport = int(gport)
|
||||||
|
gtype = gdev.type
|
||||||
|
- gaddr = "127.0.0.1"
|
||||||
|
+ gaddr = gdev.listen or "127.0.0.1"
|
||||||
|
gsocket = gdev.socket
|
||||||
|
|
||||||
|
if connhost == None:
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
%define _package virt-manager
|
%define _package virt-manager
|
||||||
%define _version 0.9.1
|
%define _version 0.9.1
|
||||||
%define _release 3
|
%define _release 4
|
||||||
%define virtinst_version 0.600.1
|
%define virtinst_version 0.600.1
|
||||||
|
|
||||||
%define qemu_user "qemu"
|
%define qemu_user "qemu"
|
||||||
@@ -14,10 +14,11 @@
|
|||||||
%define with_guestfs 0
|
%define with_guestfs 0
|
||||||
%define with_tui 1
|
%define with_tui 1
|
||||||
|
|
||||||
%ifarch %{ix86} x86_64
|
|
||||||
%define with_spice 1
|
%define with_spice 1
|
||||||
%else
|
%define default_graphics ""
|
||||||
%define with_spice 0
|
|
||||||
|
%if %{with_spice} && %{default_graphics} == ""
|
||||||
|
%define default_graphics "spice"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# End local config
|
# End local config
|
||||||
@@ -52,6 +53,8 @@ Patch5: %{name}-create-reshow.patch
|
|||||||
Patch6: %{name}-console-shortcut-explanation.patch
|
Patch6: %{name}-console-shortcut-explanation.patch
|
||||||
# Actually make spice the default (bz 757874)
|
# Actually make spice the default (bz 757874)
|
||||||
Patch7: %{name}-fix-spice-default.patch
|
Patch7: %{name}-fix-spice-default.patch
|
||||||
|
# Fix connecting to console with specific listen address
|
||||||
|
Patch8: %{name}-fix-listen-address.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@@ -112,9 +115,6 @@ Requires(preun): GConf2
|
|||||||
Requires(post): desktop-file-utils
|
Requires(post): desktop-file-utils
|
||||||
Requires(postun): desktop-file-utils
|
Requires(postun): desktop-file-utils
|
||||||
|
|
||||||
%if %{with_spice}
|
|
||||||
%define default_graphics "spice"
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Virtual Machine Manager provides a graphical tool for administering virtual
|
Virtual Machine Manager provides a graphical tool for administering virtual
|
||||||
@@ -163,6 +163,7 @@ Common files used by the different Virtual Machine Manager interfaces.
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{qemu_user}
|
%if %{qemu_user}
|
||||||
@@ -185,7 +186,7 @@ Common files used by the different Virtual Machine Manager interfaces.
|
|||||||
%define _disable_unsupported_rhel --disable-unsupported-rhel-options
|
%define _disable_unsupported_rhel --disable-unsupported-rhel-options
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?default_graphics}
|
%if %{default_graphics}
|
||||||
%define _default_graphics --with-default-graphics=%{default_graphics}
|
%define _default_graphics --with-default-graphics=%{default_graphics}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@@ -280,6 +281,10 @@ update-desktop-database -q %{_datadir}/applications
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 06 2012 Cole Robinson <crobinso@redhat.com> - 0.9.1-4
|
||||||
|
- Fix connecting to console with specific listen address
|
||||||
|
- Fix regression that dropped spice dependency (bz 819270)
|
||||||
|
|
||||||
* Wed Apr 25 2012 Cole Robinson <crobinso@redhat.com> - 0.9.1-3
|
* Wed Apr 25 2012 Cole Robinson <crobinso@redhat.com> - 0.9.1-3
|
||||||
- Actually make spice the default (bz 757874)
|
- Actually make spice the default (bz 757874)
|
||||||
- Only depend on spice on arch it is available (bz 811030)
|
- Only depend on spice on arch it is available (bz 811030)
|
||||||
|
Reference in New Issue
Block a user