1
0
mirror of https://src.fedoraproject.org/rpms/virt-manager.git synced 2025-07-15 16:53:32 +00:00

Add dep on dconf and dbus-x11 (bz #1039803)

Fix clone name validation error (bz #1039803)
Fix scaling=always behavior (bz #994456)
This commit is contained in:
Cole Robinson
2014-02-17 12:32:38 -05:00
parent 44c81f3163
commit f50eac93be
14 changed files with 295 additions and 10 deletions

View File

@ -1,4 +1,4 @@
From 4d22adaf9306248350fca5f5542afa01d3cf992a Mon Sep 17 00:00:00 2001
From ca87c73cb4148e17192085c0f920a3d158219727 Mon Sep 17 00:00:00 2001
From: Lars Seipel <lars.seipel@gmail.com>
Date: Mon, 29 Jul 2013 12:28:22 -0400
Subject: [PATCH] Fix rawhide URL installs

View File

@ -1,4 +1,4 @@
From 1cbf848d4e7bb5938c8d74484484d6e0376295a2 Mon Sep 17 00:00:00 2001
From 4b89c62f5f3e8b7828dfae5a46ef2c5605d364ef Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Sun, 1 Sep 2013 16:08:14 -0400
Subject: [PATCH] console: Fix spice with TLS (bz #904295)

View File

@ -1,4 +1,4 @@
From 3b85e3ebb39f7a374235827ab86b49f4f19fa6a3 Mon Sep 17 00:00:00 2001
From 24ccc61b17f92ee75dfb6a0152c12885bbdd14ff Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Sun, 1 Sep 2013 21:35:23 -0400
Subject: [PATCH] manager: Disable graph data func if graph isn't visible

View File

@ -1,4 +1,4 @@
From e3a0d7f0246dcc115d8c62d6aa29b7cc526a28df Mon Sep 17 00:00:00 2001
From 6c9020ba65619e32640edb99b19841961aa07065 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 28 Jun 2013 18:45:53 +0100
Subject: [PATCH] inspection: Check can_set_row_none before setting icon to

View File

@ -1,4 +1,4 @@
From 8b3bb638f500f2aa4ef21f704771edaa16b2d9e7 Mon Sep 17 00:00:00 2001
From 730d58a2b4082a73da59cc22d1536e684ea1052d Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivan@redhat.com>
Date: Fri, 16 Aug 2013 15:59:33 +0200
Subject: [PATCH] virt-manager: ignore VIR_ERR_NO_DOMAIN when a domain was just

View File

@ -1,4 +1,4 @@
From 2f8eb759c74783f6440c81cfcb714cb313a7aebb Mon Sep 17 00:00:00 2001
From ffdd47edf7144ec3d0d72ccdfea4177f49b0f782 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Sun, 1 Sep 2013 18:36:58 -0400
Subject: [PATCH] manager: Merge some row creation, drop unneeded row keys

View File

@ -1,4 +1,4 @@
From 28445979692b178f5e3fdbbd7e8178f4c7b5628c Mon Sep 17 00:00:00 2001
From 36259b404f32f2a8f495df0e82f513531e2e7472 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 2 Sep 2013 09:09:31 -0400
Subject: [PATCH] manager: Separate stats and state update callbacks

View File

@ -1,4 +1,4 @@
From b3e2f2a146209459fcd3467f059657687e7aaa65 Mon Sep 17 00:00:00 2001
From 86ab2026d7f73bfdfc1f348616338fd47e421e43 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 9 Sep 2013 10:50:56 -0400
Subject: [PATCH] addhw: disk cache default should be 'default' not 'none'

View File

@ -1,4 +1,4 @@
From a4e1df7fb3c835cb84344a59df82fa33cf1fe1aa Mon Sep 17 00:00:00 2001
From 30409b06663f9eed75f61c8bef42b9c6324f04ab Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Sun, 6 Oct 2013 15:30:01 -0400
Subject: [PATCH] console: Fix console_active() logic

View File

@ -0,0 +1,25 @@
From 6f5c872379ecf616eba1d57a43a88df6b48f5f80 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Fri, 4 Oct 2013 16:34:19 -0400
Subject: [PATCH] Remove gconf dep, Require dconf
(cherry picked from commit 7c3c70d3d092c67809d9bb028c836a5dbca10419)
---
virt-manager.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virt-manager.spec.in b/virt-manager.spec.in
index 22b6a15..9929d5b 100644
--- a/virt-manager.spec.in
+++ b/virt-manager.spec.in
@@ -47,9 +47,9 @@ Requires: virt-manager-common = %{verrel}
Requires: pygobject3
Requires: gtk3
Requires: libvirt-glib >= 0.0.9
-Requires: gnome-python2-gconf
Requires: libxml2-python
Requires: vte3
+Requires: dconf
# For console widget
Requires: gtk-vnc2

View File

@ -0,0 +1,27 @@
From ba9a37c8c3ee3de1dee624bea8520306f0164f7d Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Sat, 14 Dec 2013 11:43:19 -0500
Subject: [PATCH] spec: Require dbus-x11 (bz 1039803)
virt-manager is one of those tools that people will often install when
no traditional desktop is present. dbus-x11 is pulled in by desktop
environments, but not by gtk3 for (presumably) legitimate reasons.
But we need it to do anything worthwhile with dbus.
(cherry picked from commit e57cd46904689c07befd1eed82a7f8163a3956a1)
---
virt-manager.spec.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/virt-manager.spec.in b/virt-manager.spec.in
index 9929d5b..bb1d718 100644
--- a/virt-manager.spec.in
+++ b/virt-manager.spec.in
@@ -50,6 +50,7 @@ Requires: libvirt-glib >= 0.0.9
Requires: libxml2-python
Requires: vte3
Requires: dconf
+Requires: dbus-x11
# For console widget
Requires: gtk-vnc2

View File

@ -0,0 +1,39 @@
From 8a0134c48cd6dab97ddf2420b10231b3547e6126 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 17 Feb 2014 12:16:59 -0500
Subject: [PATCH] CloneManager: Don't validate guest name (bz 1054771)
---
virtinst/CloneManager.py | 2 +-
virtinst/Guest.py | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/virtinst/CloneManager.py b/virtinst/CloneManager.py
index 5350348..620920a 100644
--- a/virtinst/CloneManager.py
+++ b/virtinst/CloneManager.py
@@ -184,7 +184,7 @@ class CloneDesign(object):
return self._clone_name
def set_clone_name(self, name):
try:
- self._valid_guest.set_name(name)
+ self._valid_guest.set_name(name, validate=False)
except ValueError, e:
raise ValueError(_("Invalid name for new guest: %s") % e)
diff --git a/virtinst/Guest.py b/virtinst/Guest.py
index 6702444..35103d2 100644
--- a/virtinst/Guest.py
+++ b/virtinst/Guest.py
@@ -291,8 +291,9 @@ class Guest(XMLBuilderDomain.XMLBuilderDomain):
# Domain name of the guest
def get_name(self):
return self._name
- def set_name(self, val):
- util.validate_name(_("Guest"), val, lencheck=True)
+ def set_name(self, val, validate=True):
+ if validate:
+ util.validate_name(_("Guest"), val, lencheck=True)
do_fail = False
if self.replace is not True:

View File

@ -0,0 +1,174 @@
From 6d64a5e9682644b0adb327cdc169de53dd953756 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Wed, 29 Jan 2014 16:58:34 -0500
Subject: [PATCH] console: Bunch of scaling fixes (bz 969416)
Make scaling=always work correctly with spice
Make 'resize to vm' work with scaling enabled
Simplify it all
(cherry picked from commit b9bbf4686dbaa6e0ade09464973dc5d5d383c25c)
Conflicts:
virtManager/console.py
---
virtManager/console.py | 83 ++++++++++++++++----------------------------------
1 file changed, 26 insertions(+), 57 deletions(-)
diff --git a/virtManager/console.py b/virtManager/console.py
index 8058af9..868d390 100644
--- a/virtManager/console.py
+++ b/virtManager/console.py
@@ -307,6 +307,9 @@ class VNCViewer(Viewer):
self.display.set_keyboard_grab(True)
self.display.set_pointer_grab(True)
+ self.display.connect("size-allocate",
+ self.console.viewer_allocate_cb)
+
self.display.connect("vnc-pointer-grab", self.console.pointer_grabbed)
self.display.connect("vnc-pointer-ungrab", self.console.pointer_ungrabbed)
self.display.connect("vnc-auth-credential", self._auth_credential)
@@ -456,8 +459,13 @@ class SpiceViewer(Viewer):
self.console.refresh_scaling()
self.display.realize()
- self.display.connect("mouse-grab", lambda src, g: g and self.console.pointer_grabbed(src))
- self.display.connect("mouse-grab", lambda src, g: g or self.console.pointer_ungrabbed(src))
+ self.display.connect("size-allocate",
+ self.console.viewer_allocate_cb)
+
+ self.display.connect("mouse-grab",
+ lambda src, g: g and self.console.pointer_grabbed(src))
+ self.display.connect("mouse-grab",
+ lambda src, g: g or self.console.pointer_ungrabbed(src))
self.display.connect("focus-in-event",
self.console.viewer_focus_changed)
@@ -607,6 +615,7 @@ class vmmConsolePages(vmmGObjectUI):
self.pointer_is_grabbed = False
self.change_title()
self.vm.connect("config-changed", self.change_title)
+ self.force_resize = False
# State for disabling modifiers when keyboard is grabbed
self.accel_groups = Gtk.accel_groups_from_object(self.topwin)
@@ -829,7 +838,6 @@ class vmmConsolePages(vmmGObjectUI):
curscale = self.viewer.get_scaling()
fs = self.widget("control-fullscreen").get_active()
- vnc_scroll = self.widget("console-gfx-scroll")
if (self.scale_type == self.config.CONSOLE_SCALE_NEVER
and curscale is True):
@@ -842,7 +850,7 @@ class vmmConsolePages(vmmGObjectUI):
self.viewer.set_scaling(fs)
# Refresh viewer size
- vnc_scroll.queue_resize()
+ self.widget("console-gfx-scroll").queue_resize()
def auth_login(self, ignore):
self.set_credentials()
@@ -875,6 +883,9 @@ class vmmConsolePages(vmmGObjectUI):
self.update_scaling()
+ def viewer_allocate_cb(self, src, req):
+ self.widget("console-gfx-scroll").queue_resize()
+
def size_to_vm(self, src_ignore):
# Resize the console to best fit the VM resolution
if not self.viewer:
@@ -882,10 +893,10 @@ class vmmConsolePages(vmmGObjectUI):
if not self.viewer.get_desktop_resolution():
return
- w, h = self.viewer.get_desktop_resolution()
self.topwin.unmaximize()
self.topwin.resize(1, 1)
- self.queue_scroll_resize_helper(w, h)
+ self.force_resize = True
+ self.widget("console-gfx-scroll").queue_resize()
def send_key(self, src, keys):
ignore = src
@@ -1176,52 +1187,6 @@ class vmmConsolePages(vmmGObjectUI):
self.config.set_console_password(self.vm, passwd.get_text(),
username.get_text())
- def queue_scroll_resize_helper(self, w, h):
- """
- Resize the VNC container widget to the requested size. The new size
- isn't a hard requirment so the user can still shrink the window
- again, as opposed to set_size_request
- """
- widget = self.widget("console-gfx-scroll")
- signal_holder = []
-
- def restore_scroll(src):
- is_scale = self.viewer.get_scaling()
-
- if is_scale:
- w_policy = Gtk.PolicyType.NEVER
- h_policy = Gtk.PolicyType.NEVER
- else:
- w_policy = Gtk.PolicyType.AUTOMATIC
- h_policy = Gtk.PolicyType.AUTOMATIC
-
- src.set_policy(w_policy, h_policy)
- return False
-
- def unset_cb(src):
- src.queue_resize_no_redraw()
- self.idle_add(restore_scroll, src)
- return False
-
- def request_cb(src, req):
- signal_id = signal_holder[0]
- req.width = w
- req.height = h
-
- src.disconnect(signal_id)
-
- self.idle_add(unset_cb, widget)
- return False
-
- # Disable scroll bars while we resize, since resizing to the VM's
- # dimensions can erroneously show scroll bars when they aren't needed
- widget.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
-
- signal_id = widget.connect("size-allocate", request_cb)
- signal_holder.append(signal_id)
-
- widget.queue_resize()
-
def scroll_size_allocate(self, src_ignore, req):
if not self.viewer or not self.viewer.get_desktop_resolution():
return
@@ -1238,16 +1203,20 @@ class vmmConsolePages(vmmGObjectUI):
return
desktop_ratio = float(desktop_w) / float(desktop_h)
- if not is_scale:
+ if is_scale or self.force_resize:
+ # Make sure we never show scrollbars when scaling
+ scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
+ else:
+ scroll.set_policy(Gtk.PolicyType.AUTOMATIC,
+ Gtk.PolicyType.AUTOMATIC)
+
+ if not is_scale or self.force_resize:
# Scaling disabled is easy, just force the VNC widget size. Since
# we are inside a scrollwindow, it shouldn't cause issues.
- scroll.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
+ self.force_resize = False
self.viewer.display.set_size_request(desktop_w, desktop_h)
return
- # Make sure we never show scrollbars when scaling
- scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
-
# Make sure there is no hard size requirement so we can scale down
self.viewer.display.set_size_request(-1, -1)

View File

@ -21,7 +21,7 @@
%define _version 0.10.0
%define _release 4
%define _release 5
# This macro is used for the continuous automated builds. It just
@ -55,6 +55,13 @@ Patch0007: 0007-manager-Separate-stats-and-state-update-callbacks.patch
Patch0008: 0008-addhw-disk-cache-default-should-be-default-not-none.patch
# Another fix for TLS (bz #904295)
Patch0009: 0009-console-Fix-console_active-logic.patch
# Add dep on dconf and dbus-x11 (bz #1039803)
Patch0010: 0010-Remove-gconf-dep-Require-dconf.patch
Patch0011: 0011-spec-Require-dbus-x11-bz-1039803.patch
# Fix clone name validation error (bz #1039803)
Patch0012: 0012-CloneManager-Don-t-validate-guest-name-bz-1054771.patch
# Fix scaling=always behavior (bz #994456)
Patch0013: 0013-console-Bunch-of-scaling-fixes-bz-969416.patch
BuildArch: noarch
@ -63,6 +70,7 @@ Requires: pygobject3
Requires: gtk3
Requires: libvirt-glib >= 0.0.9
Requires: dconf
Requires: dbus-x11
Requires: libxml2-python
Requires: vte3
@ -133,6 +141,13 @@ machine).
%patch0008 -p1
# Another fix for TLS (bz #904295)
%patch0009 -p1
# Add dep on dconf and dbus-x11 (bz #1039803)
%patch0010 -p1
%patch0011 -p1
# Fix clone name validation error (bz #1039803)
%patch0012 -p1
# Fix scaling=always behavior (bz #994456)
%patch0013 -p1
%build
%if %{qemu_user}
@ -243,6 +258,11 @@ fi
%changelog
* Mon Feb 17 2014 Cole Robinson <crobinso@redhat.com> - 0.10.0-5
- Add dep on dconf and dbus-x11 (bz #1039803)
- Fix clone name validation error (bz #1039803)
- Fix scaling=always behavior (bz #994456)
* Sun Oct 06 2013 Cole Robinson <crobinso@redhat.com> - 0.10.0-4
- Another fix for TLS (bz #904295)
- Add dep on dconf (bz #1012884)