From cd1953b37e073f181d7fb3c360f64086a5c3c866 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 26 Jul 2011 21:24:26 -0400 Subject: [PATCH 01/19] =?UTF-8?q?Rebased=20to=20version=200.9.0=20Use=20a?= =?UTF-8?q?=20hiding=20toolbar=20for=20fullscreen=20mode=20Use=20libguestf?= =?UTF-8?q?s=20to=20show=20guest=20packagelist=20and=20more=20(Richard=20W?= =?UTF-8?q?.M.=20Jones)=20Basic=20'New=20VM'=20wizard=20support=20for=20LX?= =?UTF-8?q?C=20guests=20Remote=20serial=20console=20access=20(with=20lates?= =?UTF-8?q?t=20libvirt)=20Remote=20URL=20guest=20installs=20(with=20latest?= =?UTF-8?q?=20libvirt)=20Add=20Hardware:=20Support=20=20device?= =?UTF-8?q?s=20Add=20Hardware:=20Support=20=20devices=20(Marc-A?= =?UTF-8?q?ndr=C3=A9=20Lureau)=20Enable=20direct=20interface=20selection?= =?UTF-8?q?=20for=20qemu/kvm=20(Gerhard=20Stenzel)=20Allow=20viewing=20and?= =?UTF-8?q?=20changing=20disk=20serial=20number?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + sources | 2 +- virt-manager-bump-default-mem.patch | 32 -- virt-manager-fix-broken-cspo.patch | 18 - virt-manager-fix-config-options.patch | 35 -- virt-manager-fix-hotplug-fallback.patch | 20 -- virt-manager-gconf-after-fork.patch | 38 --- virt-manager-spicevmc.patch | 436 ------------------------ virt-manager-stop-netcf-flood.patch | 23 -- virt-manager.spec | 165 +++++---- 10 files changed, 102 insertions(+), 668 deletions(-) delete mode 100644 virt-manager-bump-default-mem.patch delete mode 100644 virt-manager-fix-broken-cspo.patch delete mode 100644 virt-manager-fix-config-options.patch delete mode 100644 virt-manager-fix-hotplug-fallback.patch delete mode 100644 virt-manager-gconf-after-fork.patch delete mode 100644 virt-manager-spicevmc.patch delete mode 100644 virt-manager-stop-netcf-flood.patch diff --git a/.gitignore b/.gitignore index a153826..fc7425e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ virt-manager-0.8.4.tar.gz /virt-manager-0.8.5.tar.gz /virt-manager-0.8.6.tar.gz /virt-manager-0.8.7.tar.gz +/virt-manager-0.9.0.tar.gz diff --git a/sources b/sources index 62235c7..8f92cb4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9b1f3ead125d53bf506216c4bc7c4a84 virt-manager-0.8.7.tar.gz +a10331b467f92f4134a39bf636e04adc virt-manager-0.9.0.tar.gz diff --git a/virt-manager-bump-default-mem.patch b/virt-manager-bump-default-mem.patch deleted file mode 100644 index df83cf4..0000000 --- a/virt-manager-bump-default-mem.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 6a14834c7d3a3fd622bb51f9ade18750267e95d3 -Author: Cole Robinson -Date: Thu Apr 28 10:39:12 2011 -0400 - - create: Bump default memory from 512 to 1024MB - - F15 needs more than 512 or the installer crashes, pretty sure recent windows - require at least a GB as well. Long term plan is to track a default mem value - per OS being installed. - -diff --git a/src/virtManager/create.py b/src/virtManager/create.py -index 6bbe23d..f8da9f2 100644 ---- a/src/virtManager/create.py -+++ b/src/virtManager/create.py -@@ -42,6 +42,8 @@ OS_GENERIC = "generic" - # Number of seconds to wait for media detection - DETECT_TIMEOUT = 20 - -+DEFAULT_MEM = 1024 -+ - PAGE_NAME = 0 - PAGE_INSTALL = 1 - PAGE_MEM = 2 -@@ -377,7 +379,7 @@ class vmmCreate(vmmGObjectUI): - self.window.get_widget("install-import-entry").set_text("") - - # Mem / CPUs -- self.window.get_widget("config-mem").set_value(512) -+ self.window.get_widget("config-mem").set_value(DEFAULT_MEM) - self.window.get_widget("config-cpus").set_value(1) - - # Storage diff --git a/virt-manager-fix-broken-cspo.patch b/virt-manager-fix-broken-cspo.patch deleted file mode 100644 index b28ad0b..0000000 --- a/virt-manager-fix-broken-cspo.patch +++ /dev/null @@ -1,18 +0,0 @@ -commit cb56316cf3702f03b05e30f406ff3028e45f7bfb -Author: Cole Robinson -Date: Tue Apr 5 16:21:42 2011 -0400 - - cs.po: Busted Plural-forms crashes python gettext - -diff --git a/po/cs.po b/po/cs.po -index d1808a7..cc13a1b 100644 ---- a/po/cs.po -+++ b/po/cs.po -@@ -16,7 +16,6 @@ msgstr "" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" --"Plural-Forms: \n" - - #: ../src/virt-manager.desktop.in.in.h:1 - msgid "Manage virtual machines" diff --git a/virt-manager-fix-config-options.patch b/virt-manager-fix-config-options.patch deleted file mode 100644 index b045ab7..0000000 --- a/virt-manager-fix-config-options.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- virt-manager-0.8.7/configure 2011-03-24 16:41:26.000000000 -0400 -+++ /home/crobinso/sandbox/upstream/virt-manager/virt-manager.git/configure 2011-03-29 09:27:40.115612001 -0400 -@@ -718,7 +718,7 @@ with_libvirt_package_names - with_kvm_packages - enable_unsupported_rhel_options - with_preferred_distros --with___with_default_graphics -+with_default_graphics - ' - ac_precious_vars='build_alias - host_alias -@@ -6521,7 +6521,9 @@ fi - - # Check whether --enable-unsupported-rhel-options was given. - if test "${enable_unsupported_rhel_options+set}" = set; then : -- enableval=$enable_unsupported_rhel_options; test "x$enableval" == "xno" && ENABLE_UNSUPPORTED_RHEL_OPTS=0 -+ enableval=$enable_unsupported_rhel_options; test "x$enableval" == "xno" && \ -+ ENABLE_UNSUPPORTED_RHEL_OPTS=0 || -+ ENABLE_UNSUPPORTED_RHEL_OPTS=1 - else - ENABLE_UNSUPPORTED_RHEL_OPTS=1 - fi -@@ -6537,9 +6539,9 @@ fi - - - --# Check whether --with---with-default-graphics was given. --if test "${with___with_default_graphics+set}" = set; then : -- withval=$with___with_default_graphics; DEFAULT_GRAPHICS=$withval -+# Check whether --with-default-graphics was given. -+if test "${with_default_graphics+set}" = set; then : -+ withval=$with_default_graphics; DEFAULT_GRAPHICS=$withval - else - DEFAULT_GRAPHICS="vnc" - fi diff --git a/virt-manager-fix-hotplug-fallback.patch b/virt-manager-fix-hotplug-fallback.patch deleted file mode 100644 index 8ae3f57..0000000 --- a/virt-manager-fix-hotplug-fallback.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit 4922222c2c7b13704b6f461aedbee9ec06c01b5b -Author: Cole Robinson -Date: Tue Apr 5 16:15:05 2011 -0400 - - addhw: Fix nonhotplug to running guest - -diff --git a/src/virtManager/addhardware.py b/src/virtManager/addhardware.py -index 885c8b9..7fa5b6e 100644 ---- a/src/virtManager/addhardware.py -+++ b/src/virtManager/addhardware.py -@@ -938,7 +938,8 @@ class vmmAddHardware(vmmGObjectUI): - "Would you like to make the device available after the " - "next VM shutdown?")), - dialog_type=gtk.MESSAGE_WARNING, -- buttons=gtk.BUTTONS_YES_NO) -+ buttons=gtk.BUTTONS_YES_NO, -+ async=False) - - if not res: - return (False, None) diff --git a/virt-manager-gconf-after-fork.patch b/virt-manager-gconf-after-fork.patch deleted file mode 100644 index 984875e..0000000 --- a/virt-manager-gconf-after-fork.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -rup virt-manager-0.8.7/src/virt-manager.py.in foobar/src/virt-manager.py.in ---- virt-manager-0.8.7/src/virt-manager.py.in 2011-03-24 16:39:28.000000000 -0400 -+++ foobar/src/virt-manager.py.in 2011-03-31 11:34:02.389991998 -0400 -@@ -393,9 +393,16 @@ def main(): - dbus.glib.threads_init() - import dbus.service - -- # Specifically init config/gconf before the fork, so that pam -- # doesn't think we closed the app, therefor robbing us of -- # display access -+ # Now we've got basic environment up & running we can fork -+ if not options.nofork and not options.debug: -+ drop_tty() -+ drop_stdio() -+ -+ # Ignore SIGHUP, otherwise a serial console closing drops the whole app -+ signal.signal(signal.SIGHUP, signal.SIG_IGN) -+ -+ # Initing gconf before forking makes the app lockup on f15/rawhide... -+ # https://bugzilla.redhat.com/show_bug.cgi?id=692570 - import virtManager.config - config = virtManager.config.vmmConfig(appname, appversion, - gconf_dir, glade_dir, -@@ -408,14 +415,6 @@ def main(): - config.hv_packages = hv_packages - config.libvirt_packages = libvirt_packages - -- # Now we've got basic environment up & running we can fork -- if not options.nofork and not options.debug: -- drop_tty() -- drop_stdio() -- -- # Ignore SIGHUP, otherwise a serial console closing drops the whole app -- signal.signal(signal.SIGHUP, signal.SIG_IGN) -- - from virtManager.engine import vmmEngine - - gtk.window_set_default_icon_from_file(icon_dir + "/" + diff --git a/virt-manager-spicevmc.patch b/virt-manager-spicevmc.patch deleted file mode 100644 index eefaebf..0000000 --- a/virt-manager-spicevmc.patch +++ /dev/null @@ -1,436 +0,0 @@ -commit 6fa885e5831e637976487e39c877ab3a80325ee8 -Author: Marc-André Lureau -Date: Tue Apr 5 01:35:31 2011 +0200 - - addhardware: allow setting the char device target name - -diff --git a/src/virtManager/addhardware.py b/src/virtManager/addhardware.py -index a8ceb78..91ece33 100644 ---- a/src/virtManager/addhardware.py -+++ b/src/virtManager/addhardware.py -@@ -54,6 +54,7 @@ char_widget_mappings = { - "bind_port" : "char-bind-port", - "bind_host" : "char-bind-host", - "protocol" : "char-use-telnet", -+ "target_name" : "char-target-name", - } - - def get_list_selection(widget): -@@ -117,6 +118,7 @@ class vmmAddHardware(vmmGObjectUI): - "char_host_focus_in": (self.update_doc, "source_host"), - "char_bind_host_focus_in": (self.update_doc, "bind_host"), - "char_telnet_focus_in": (self.update_doc, "protocol"), -+ "char_name_focus_in": (self.update_doc, "target_name"), - }) - util.bind_escape_key_close(self) - -@@ -443,6 +445,7 @@ class vmmAddHardware(vmmGObjectUI): - self.window.get_widget("char-bind-host").set_text("127.0.0.1") - self.window.get_widget("char-bind-port").get_adjustment().value = 4556 - self.window.get_widget("char-use-telnet").set_active(False) -+ self.window.get_widget("char-target-name").set_text("com.redhat.spice.0") - - # Hide all notebook pages, so the wizard isn't as big as the largest - # page -@@ -1143,6 +1146,7 @@ class vmmAddHardware(vmmGObjectUI): - bind_host = self.window.get_widget("char-bind-host").get_text() - source_port = self.window.get_widget("char-port").get_adjustment().value - bind_port = self.window.get_widget("char-bind-port").get_adjustment().value -+ target_name = self.window.get_widget("char-target-name").get_text() - - if self.window.get_widget("char-use-telnet").get_active(): - protocol = VirtualCharDevice.CHAR_PROTOCOL_TELNET -@@ -1156,6 +1160,7 @@ class vmmAddHardware(vmmGObjectUI): - "bind_port": bind_port, - "bind_host": bind_host, - "protocol": protocol, -+ "target_name": target_name, - } - - try: -diff --git a/src/vmm-add-hardware.glade b/src/vmm-add-hardware.glade -index bbd3a42..c5087a1 100644 ---- a/src/vmm-add-hardware.glade -+++ b/src/vmm-add-hardware.glade -@@ -1504,7 +1504,7 @@ to connect to the virtual machine. - - - True -- 5 -+ 6 - 2 - 8 - 8 -@@ -1520,6 +1520,34 @@ to connect to the virtual machine. - - - -+ -+ True -+ True -+ -+ -+ -+ 1 -+ 2 -+ 5 -+ 6 -+ -+ -+ -+ -+ True -+ 0 -+ Name: -+ True -+ char-use-telnet -+ -+ -+ 5 -+ 6 -+ GTK_FILL -+ -+ -+ -+ - - True - True -commit ce9a125728b6622008849dd9c35309e36104913e -Author: Marc-André Lureau -Date: Tue Apr 5 01:35:32 2011 +0200 - - addhardware: fix adding and removing a channel device - -diff --git a/src/virtManager/addhardware.py b/src/virtManager/addhardware.py -index 91ece33..885c8b9 100644 ---- a/src/virtManager/addhardware.py -+++ b/src/virtManager/addhardware.py -@@ -286,19 +286,6 @@ class vmmAddHardware(vmmGObjectUI): - video_dev = self.window.get_widget("video-model") - uihelpers.build_video_combo(self.vm, video_dev) - -- # Char device type -- char_devtype = self.window.get_widget("char-device-type") -- # Type name, desc -- char_devtype_model = gtk.ListStore(str, str) -- char_devtype.set_model(char_devtype_model) -- text = gtk.CellRendererText() -- char_devtype.pack_start(text, True) -- char_devtype.add_attribute(text, 'text', 1) -- for t in VirtualCharDevice.char_types: -- desc = VirtualCharDevice.get_char_type_desc(t) -- row = [t, desc + " (%s)" % t] -- char_devtype_model.append(row) -- - # Character dev mode - char_mode = self.window.get_widget("char-mode") - # Mode name, desc -@@ -358,6 +345,10 @@ class vmmAddHardware(vmmGObjectUI): - self.vm.is_hvm(), - _("Not supported for this guest type."), - "parallel") -+ add_hw_option("Channel", gtk.STOCK_CONNECT, PAGE_CHAR, -+ self.vm.is_hvm(), -+ _("Not supported for this guest type."), -+ "channel") - add_hw_option("USB Host Device", "system-run", PAGE_HOSTDEV, - self.vm.get_connection().is_nodedev_capable(), - _("Connection does not support host device enumeration"), -@@ -688,6 +679,23 @@ class vmmAddHardware(vmmGObjectUI): - def get_hw_selection(self): - return get_list_selection(self.window.get_widget("hardware-list")) - -+ def update_char_device_type_model(self): -+ # Char device type -+ char_devtype = self.window.get_widget("char-device-type") -+ dev_type = self.get_char_type() -+ # Type name, desc -+ char_devtype_model = gtk.ListStore(str, str) -+ char_devtype.clear() -+ char_devtype.set_model(char_devtype_model) -+ text = gtk.CellRendererText() -+ char_devtype.pack_start(text, True) -+ char_devtype.add_attribute(text, 'text', 1) -+ for t in VirtualCharDevice.char_types_for_dev_type[dev_type]: -+ desc = VirtualCharDevice.get_char_type_desc(t) -+ row = [t, desc + " (%s)" % t] -+ char_devtype_model.append(row) -+ char_devtype.set_active(0) -+ - def hw_selected(self, src=None): - ignore = src - self._dev = None -@@ -707,6 +715,7 @@ class vmmAddHardware(vmmGObjectUI): - self.window.get_widget("hardware-info").set_text(msg) - - if page == PAGE_CHAR: -+ self.update_char_device_type_model() - devtype = self.window.get_widget("char-device-type") - self.change_char_device_type(devtype) - -@@ -814,6 +823,8 @@ class vmmAddHardware(vmmGObjectUI): - - if label == "parallel": - return VirtualDevice.VIRTUAL_DEV_PARALLEL -+ elif label == "channel": -+ return VirtualDevice.VIRTUAL_DEV_CHANNEL - return VirtualDevice.VIRTUAL_DEV_SERIAL - - def dev_to_title(self, page): -@@ -849,6 +860,9 @@ class vmmAddHardware(vmmGObjectUI): - - def change_char_device_type(self, src): - self.update_doc(None, None, "char_type") -+ idx = src.get_active() -+ if idx < 0: -+ return - - chartype = self.get_char_type() - devtype = src.get_model()[src.get_active()][0] -@@ -863,7 +877,6 @@ class vmmAddHardware(vmmGObjectUI): - self.window.get_widget(widget_name).set_sensitive(make_visible) - - has_mode = self._dev.supports_property("source_mode") -- - if has_mode and self.window.get_widget("char-mode").get_active() == -1: - self.window.get_widget("char-mode").set_active(0) - -diff --git a/src/virtManager/details.py b/src/virtManager/details.py -index 69e2b1a..ca21c2d 100644 ---- a/src/virtManager/details.py -+++ b/src/virtManager/details.py -@@ -2752,7 +2752,7 @@ class vmmDetails(vmmGObjectUI): - port = chardev.target_port - - label = devtype.capitalize() -- if devtype != "console": -+ if devtype not in ["console", "channel"]: - # Don't show port for console - label += " %s" % (int(port) + 1) - -diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py -index 9730233..7fc66ed 100644 ---- a/src/virtManager/domain.py -+++ b/src/virtManager/domain.py -@@ -46,6 +46,7 @@ def compare_device(origdev, newdev, idx): - "console" : ["char_type", "target_type", "target_port"], - "graphics" : ["type", "vmmindex"], - "controller" : ["type", "index"], -+ "channel" : ["char_type", "target_name"], - } - - if id(origdev) == id(newdev): -@@ -713,8 +714,9 @@ class vmmDomainBase(vmmLibvirtObject): - serials = self._build_device_list("serial") - parallels = self._build_device_list("parallel") - consoles = self._build_device_list("console") -+ channels = self._build_device_list("channel") - -- for devicelist in [serials, parallels, consoles]: -+ for devicelist in [serials, parallels, consoles, channels]: - devs.extend(devicelist) - - # Don't display if it's just a duplicate of -commit 127e065d9ee7c5bee0f221352e51fb51ccff1626 -Author: Marc-André Lureau -Date: Tue Apr 5 01:35:33 2011 +0200 - - details: show char device target name - -diff --git a/src/virtManager/details.py b/src/virtManager/details.py -index ca21c2d..8e6e50e 100644 ---- a/src/virtManager/details.py -+++ b/src/virtManager/details.py -@@ -2495,6 +2495,7 @@ class vmmDetails(vmmGObjectUI): - target_port = chardev.target_port - dev_type = chardev.char_type or "pty" - src_path = chardev.source_path -+ target_name = chardev.target_name - primary = hasattr(chardev, "virtmanager_console_dup") - - typelabel = "" -@@ -2518,6 +2519,7 @@ class vmmDetails(vmmGObjectUI): - self.window.get_widget("char-type").set_markup(typelabel) - self.window.get_widget("char-dev-type").set_text(dev_type) - self.window.get_widget("char-source-path").set_text(src_path or "-") -+ self.window.get_widget("char-target-name").set_text(target_name or "-") - - def refresh_hostdev_page(self): - hostdev = self.get_hw_selection(HW_LIST_COL_DEVICE) -diff --git a/src/vmm-details.glade b/src/vmm-details.glade -index d0d3837..d23c3da 100644 ---- a/src/vmm-details.glade -+++ b/src/vmm-details.glade -@@ -4681,7 +4681,7 @@ I/O: - - True - 3 -- 2 -+ 3 - 2 - 8 - 4 -@@ -4689,7 +4689,7 @@ I/O: - - True - 1 -- Device Type: -+ Device type: - - - GTK_FILL -@@ -4700,7 +4700,7 @@ I/O: - - True - 1 -- Source Path: -+ Source path: - - - 1 -@@ -4710,6 +4710,19 @@ I/O: - - - -+ -+ True -+ 1 -+ Target name: -+ -+ -+ 2 -+ 3 -+ GTK_FILL -+ -+ -+ -+ - - True - 0 -@@ -4739,6 +4752,22 @@ I/O: - - - -+ -+ -+ True -+ 0 -+ label508 -+ True -+ -+ -+ 1 -+ 2 -+ 2 -+ 3 -+ GTK_FILL -+ -+ -+ - - - -commit 69ba897ac35731bf6cfca00a3e8ac30485a9855d -Author: Marc-André Lureau -Date: Tue Apr 5 01:35:34 2011 +0200 - - details: propose to add or remove Spice agent when switching - - crobinso: Improve metric for deciding to ask about add/remove agent - -diff --git a/src/virtManager/details.py b/src/virtManager/details.py -index 8e6e50e..eb5a9e5 100644 ---- a/src/virtManager/details.py -+++ b/src/virtManager/details.py -@@ -1850,17 +1850,54 @@ class vmmDetails(vmmGObjectUI): - (dev_id_info, nettype, source)]) - - # Graphics options -+ def _do_change_spicevmc(self, gdev, newgtype): -+ has_multi_spice = (len(filter( -+ lambda dev: dev.type == dev.TYPE_SPICE, -+ self.vm.get_graphics_devices())) > 1) -+ has_spicevmc = bool(filter( -+ (lambda dev: -+ (dev.dev_type == dev.DEV_CHANNEL and -+ dev.char_type == dev.CHAR_SPICEVMC)), -+ self.vm.get_char_devices())) -+ fromspice = (gdev.type == "spice") -+ tospice = (newgtype == "spice") -+ -+ if fromspice and tospice: -+ return False -+ if not fromspice and not tospice: -+ return False -+ -+ print tospice, fromspice, has_spicevmc, has_multi_spice -+ -+ if tospice and has_spicevmc: -+ return False -+ if fromspice and not has_spicevmc: -+ return False -+ -+ if fromspice and has_multi_spice: -+ # Don't offer to remove if there are other spice displays -+ return False -+ -+ msg = (_("You are switching graphics type to %(gtype)s, " -+ "would you like to %(action)s Spice agent channels?") % -+ {"gtype": newgtype, -+ "action": fromspice and "remove" or "add"}) -+ return self.err.yes_no(msg) -+ - def config_graphics_apply(self, dev_id_info): - gtype = self.get_combo_label_value("gfx-type") - passwd = self.window.get_widget("gfx-password").get_text() or None - keymap = self.get_combo_label_value("gfx-keymap") - -+ change_spicevmc = self._do_change_spicevmc(dev_id_info, gtype) -+ - return self._change_config_helper([self.vm.define_graphics_password, - self.vm.define_graphics_keymap, - self.vm.define_graphics_type], - [(dev_id_info, passwd), - (dev_id_info, keymap), -- (dev_id_info, gtype)], -+ (dev_id_info, gtype, -+ change_spicevmc)], - [self.vm.hotplug_graphics_password], - [(dev_id_info, passwd)]) - -diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py -index 7fc66ed..a4d2f5c 100644 ---- a/src/virtManager/domain.py -+++ b/src/virtManager/domain.py -@@ -26,6 +26,7 @@ import threading - import gobject - - import virtinst -+from virtinst.VirtualCharDevice import VirtualCharSpicevmcDevice - from virtManager import util - import virtinst.support as support - -@@ -450,9 +451,20 @@ class vmmDomainBase(vmmLibvirtObject): - def change(editdev): - editdev.keymap = newval - return self._redefine_device(change, devobj) -- def define_graphics_type(self, devobj, newval): -+ def define_graphics_type(self, devobj, newval, spicevmc): - def change(editdev): - editdev.type = newval -+ if spicevmc: -+ guest = self._get_guest_to_define() -+ if newval == "spice": -+ guest.add_device(VirtualCharSpicevmcDevice(guest.conn)) -+ else: -+ channels = guest.get_devices("channel") -+ channels = filter(lambda x: x.char_type == -+ virtinst.VirtualCharDevice.CHAR_SPICEVMC, channels) -+ for dev in channels: -+ guest.remove_device(dev) -+ - return self._redefine_device(change, devobj) - - def define_sound_model(self, devobj, newmodel): diff --git a/virt-manager-stop-netcf-flood.patch b/virt-manager-stop-netcf-flood.patch deleted file mode 100644 index a0b8beb..0000000 --- a/virt-manager-stop-netcf-flood.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -rup virt-manager-0.8.7/src/virtManager/connection.py tmp/src/virtManager/connection.py ---- virt-manager-0.8.7/src/virtManager/connection.py 2011-03-24 16:39:28.000000000 -0400 -+++ tmp/src/virtManager/connection.py 2011-04-28 10:45:19.836484967 -0400 -@@ -1319,15 +1319,15 @@ class vmmConnection(vmmGObject): - try: - check_obj(name, True) - except: -- logging.exception("Couldn't fetch active " -- "interface '%s'" % name) -+ #logging.debug("Couldn't fetch active interface '%s'" % name) -+ pass - - for name in newInactiveNames: - try: - check_obj(name, False) - except: -- logging.exception("Couldn't fetch inactive " -- "interface '%s'" % name) -+ #logging.debug("Couldn't fetch inactive interface '%s'" % name) -+ pass - - return (stop, start, orig, new, current) - diff --git a/virt-manager.spec b/virt-manager.spec index e195bba..1b7f672 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -1,9 +1,9 @@ # -*- rpm-spec -*- %define _package virt-manager -%define _version 0.8.7 -%define _release 5 -%define virtinst_version 0.500.6-2 +%define _version 0.9.0 +%define _release 1 +%define virtinst_version 0.600.6 %define qemu_user "qemu" %define preferred_distros "fedora,rhel" @@ -12,7 +12,9 @@ %define disable_unsupported_rhel 0 %define default_graphics "spice" +%define with_guestfs 1 %define with_spice 1 +%define with_tui 1 # End local config @@ -25,26 +27,13 @@ Name: %{_package} Version: %{_version} Release: %{_release}%{_extra_release} -Summary: Virtual Machine Manager +%define verrel %{version}-%{release} +Summary: Virtual Machine Manager Group: Applications/Emulators License: GPLv2+ URL: http://virt-manager.org/ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz -# Fix using spice as default graphics type -Patch1: %{name}-fix-config-options.patch -# Fix lockup as non-root (bz 692570) -Patch2: %{name}-gconf-after-fork.patch -# Fix broken cs.po which crashed gettext -Patch3: %{name}-fix-broken-cspo.patch -# Fix offline attach fallback if hotplug fails -Patch4: %{name}-fix-hotplug-fallback.patch -# Offer to attach spicevmc if switching to spice -Patch5: %{name}-spicevmc.patch -# Stop netcf errors from flooding logs (bz 676920) -Patch6: %{name}-stop-netcf-flood.patch -# Bump default mem for new guests to 1GB so F15 installs work (bz 700480) -Patch7: %{name}-bump-default-mem.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -70,8 +59,6 @@ Requires: libxml2-python >= 2.6.23 Requires: python-virtinst >= %{virtinst_version} # Required for loading the glade UI Requires: pygtk2-libglade -# Required for our graphics which are currently SVG format -Requires: librsvg2 # Earlier vte had broken python binding module Requires: vte >= 0.12.2 # For online help @@ -89,6 +76,16 @@ Requires: PolicyKit-gnome %if %{with_spice} Requires: spice-gtk-python %endif +%if %{with_guestfs} +Requires: python-libguestfs +%endif + +%if %{with_tui} == 0 +Obsoletes: virt-manager-common <= %{verrel} +Conflicts: virt-manager-common > %{verrel} +%else +Requires: virt-manager-common = %{verrel} +%endif BuildRequires: gettext BuildRequires: scrollkeeper @@ -107,15 +104,39 @@ connect to a graphical or serial console, and see resource usage statistics for existing VMs on local or remote machines. Uses libvirt as the backend management API. +# TUI package setup +%if %{with_tui} +%package tui +Summary: Virtual Machine Manager text user interface +Group: Applications/Emulators + +Requires: virt-manager-common = %{verrel} +Requires: python-newt_syrup +Requires: libuser-python +Requires: python-IPy + +%description tui +An interactive text user interface for Virtual Machine Manager. + +%package common +Summary: Common files used by the different Virtual Machine Manager interfaces +Group: Applications/Emulators + +# This version not strictly required: virt-manager should work with older, +# however varying amounts of functionality will not be enabled. +Requires: libvirt-python >= 0.7.0 +Requires: dbus-python +# Minimum we've tested with +Requires: libxml2-python >= 2.6.23 +# Absolutely require this version or later +Requires: python-virtinst >= %{virtinst_version} + +%description common +Common files used by the different Virtual Machine Manager interfaces. +%endif + %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 %build %if %{qemu_user} @@ -142,8 +163,13 @@ management API. %define _default_graphics --with-default-graphics=%{default_graphics} %endif +%if %{with_tui} +%define _tui_opt --with-tui +%else +%define _tui_opt --without-tui +%endif -%configure --without-tui \ +%configure %{?_tui_opt} \ %{?_qemu_user} \ %{?_kvm_packages} \ %{?_libvirt_packages} \ @@ -162,36 +188,24 @@ make install DESTDIR=$RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT %pre -if [ "$1" -gt 1 ]; then - export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` - gconftool-2 --makefile-uninstall-rule \ - %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || : -fi +%gconf_schema_prepare %{name} %post -export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` -gconftool-2 --makefile-install-rule \ - %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || : - -update-desktop-database %{_datadir}/applications - -# Revive when we update help docs -#if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update -q -o %{_datadir}/omf/%{name}; fi +update-desktop-database -q %{_datadir}/applications +%gconf_schema_upgrade virt-manager %postun -update-desktop-database %{_datadir}/applications - -# Revive when we update help docs -#if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update -q; fi +update-desktop-database -q %{_datadir}/applications %preun -if [ "$1" -eq 0 ]; then - export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` - gconftool-2 --makefile-uninstall-rule \ - %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || : -fi +%gconf_schema_remove %{name} + +%if %{with_tui} +%files +%else %files -f %{name}.lang +%endif %defattr(-,root,root,-) %doc README COPYING COPYING-DOCS AUTHORS ChangeLog NEWS %{_sysconfdir}/gconf/schemas/%{name}.schemas @@ -200,30 +214,51 @@ fi %{_mandir}/man1/%{name}.1* +%if %{with_tui} == 0 %dir %{_datadir}/%{name} -%{_datadir}/%{name}/*.glade -%{_datadir}/%{name}/*.py* - -%dir %{_datadir}/%{name}/pixmaps/ -%{_datadir}/%{name}/pixmaps/*.png -%{_datadir}/%{name}/pixmaps/*.svg - -%dir %{_datadir}/%{name}/pixmaps/hicolor/ -%dir %{_datadir}/%{name}/pixmaps/hicolor/*/ -%dir %{_datadir}/%{name}/pixmaps/hicolor/*/*/ -%{_datadir}/%{name}/pixmaps/hicolor/*/*/*.png - %dir %{_datadir}/%{name}/virtManager/ %{_datadir}/%{name}/virtManager/*.py* +%endif -# Revive when we update help docs -#%{_datadir}/omf/%{name}/ -#%{_datadir}/gnome/help/%{name} +%{_datadir}/%{name}/*.glade +%{_datadir}/%{name}/%{name}.py* + +%{_datadir}/%{name}/icons +%{_datadir}/icons/hicolor/*/apps/* %{_datadir}/applications/%{name}.desktop %{_datadir}/dbus-1/services/%{name}.service +%if %{with_tui} +%files common -f %{name}.lang +%defattr(-,root,root,-) +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/virtManager/ + +%{_datadir}/%{name}/virtManager/*.py* + +%files tui +%defattr(-,root,root,-) + +%{_bindir}/%{name}-tui +%{_datadir}/%{name}/%{name}-tui.py* + +%{_datadir}/%{name}/virtManagerTui +%endif + %changelog +* Tue Jul 26 2011 Cole Robinson - 0.9.0-1.fc17 +- Rebased to version 0.9.0 +- Use a hiding toolbar for fullscreen mode +- Use libguestfs to show guest packagelist and more (Richard W.M. Jones) +- Basic 'New VM' wizard support for LXC guests +- Remote serial console access (with latest libvirt) +- Remote URL guest installs (with latest libvirt) +- Add Hardware: Support devices +- Add Hardware: Support devices (Marc-André Lureau) +- Enable direct interface selection for qemu/kvm (Gerhard Stenzel) +- Allow viewing and changing disk serial number + * Thu Apr 28 2011 Cole Robinson - 0.8.7-5.fc16 - Stop netcf errors from flooding logs (bz 676920) - Bump default mem for new guests to 1GB so F15 installs work (bz From 11a5cad32916d9d12be9be8c61656dcb31fbfe4b Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 26 Jul 2011 22:08:52 -0400 Subject: [PATCH 02/19] spec: Fix virtinst dep --- virt-manager.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt-manager.spec b/virt-manager.spec index 1b7f672..40f309e 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,8 +2,8 @@ %define _package virt-manager %define _version 0.9.0 -%define _release 1 -%define virtinst_version 0.600.6 +%define _release 2 +%define virtinst_version 0.600.0 %define qemu_user "qemu" %define preferred_distros "fedora,rhel" From 950068a55db18ed1dc2f479db70d5026429f437d Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 26 Jul 2011 22:13:23 -0400 Subject: [PATCH 03/19] spec: Try and work around tagging issues --- virt-manager.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-manager.spec b/virt-manager.spec index 40f309e..dc2ff37 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -26,7 +26,7 @@ Name: %{_package} Version: %{_version} -Release: %{_release}%{_extra_release} +Release: %{_release}%{_extra_release}.1 %define verrel %{version}-%{release} Summary: Virtual Machine Manager From a4ebb483b68790ae64b01674397c1624c64e7567 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 27 Jul 2011 13:13:41 -0400 Subject: [PATCH 04/19] Add BuildRequires: GConf2 to fix pre scriplet error --- virt-manager.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/virt-manager.spec b/virt-manager.spec index dc2ff37..0de822b 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.0 -%define _release 2 +%define _release 3 %define virtinst_version 0.600.0 %define qemu_user "qemu" @@ -26,7 +26,7 @@ Name: %{_package} Version: %{_version} -Release: %{_release}%{_extra_release}.1 +Release: %{_release}%{_extra_release} %define verrel %{version}-%{release} Summary: Virtual Machine Manager @@ -90,6 +90,7 @@ Requires: virt-manager-common = %{verrel} BuildRequires: gettext BuildRequires: scrollkeeper BuildRequires: intltool +BuildRequires: GConf2 Requires(pre): GConf2 Requires(post): GConf2 @@ -247,6 +248,12 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Wed Jul 27 2011 Cole Robinson - 0.9.0-3 +- Add BuildRequires: GConf2 to fix pre scriplet error + +* Tue Jul 26 2011 Cole Robinson - 0.9.0-2 +- Fix virtinst dep + * Tue Jul 26 2011 Cole Robinson - 0.9.0-1.fc17 - Rebased to version 0.9.0 - Use a hiding toolbar for fullscreen mode From 065346e693f61fc82439251189cf604405d70163 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 28 Jul 2011 10:47:31 -0400 Subject: [PATCH 05/19] Fix typo that broke net stats reporting --- virt-manager-fix-net-stats.patch | 19 +++++++++++++++++++ virt-manager.spec | 8 +++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 virt-manager-fix-net-stats.patch diff --git a/virt-manager-fix-net-stats.patch b/virt-manager-fix-net-stats.patch new file mode 100644 index 0000000..eb2b2ce --- /dev/null +++ b/virt-manager-fix-net-stats.patch @@ -0,0 +1,19 @@ +commit 62a762e77f2f5e5298ececda6fb4638b8488da4a +Author: Cole Robinson +Date: Wed Jul 27 12:02:29 2011 -0400 + + domain: Fix typo that broke net stats gathering + +diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py +index d0683db..f9a39b5 100644 +--- a/src/virtManager/domain.py ++++ b/src/virtManager/domain.py +@@ -1448,7 +1448,7 @@ class vmmDomain(vmmLibvirtObject): + def _sample_network_traffic(self): + rx = 0 + tx = 0 +- if (not self._stats_net_supported or not ++ if (not self._stats_net_supported or + not self._enable_net_poll or + not self.is_active()): + return rx, tx diff --git a/virt-manager.spec b/virt-manager.spec index 0de822b..c01cd7b 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.0 -%define _release 3 +%define _release 4 %define virtinst_version 0.600.0 %define qemu_user "qemu" @@ -34,6 +34,8 @@ Group: Applications/Emulators License: GPLv2+ URL: http://virt-manager.org/ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz +# Fix typo that broke net stats reporting +Patch1: %{name}-fix-net-stats.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -138,6 +140,7 @@ Common files used by the different Virtual Machine Manager interfaces. %prep %setup -q +%patch1 -p1 %build %if %{qemu_user} @@ -248,6 +251,9 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Thu Jul 28 2011 Cole Robinson - 0.9.0-4 +- Fix typo that broke net stats reporting + * Wed Jul 27 2011 Cole Robinson - 0.9.0-3 - Add BuildRequires: GConf2 to fix pre scriplet error From e603223f616b4aa6982bc4bc6c8206e77fa26554 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 1 Aug 2011 13:36:22 -0400 Subject: [PATCH 06/19] Don't have a hard dep on libguestfs (bz 726364) Depend on needed python-newt_syrup version --- virt-manager.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/virt-manager.spec b/virt-manager.spec index c01cd7b..345bd4e 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.0 -%define _release 4 +%define _release 5 %define virtinst_version 0.600.0 %define qemu_user "qemu" @@ -12,7 +12,7 @@ %define disable_unsupported_rhel 0 %define default_graphics "spice" -%define with_guestfs 1 +%define with_guestfs 0 %define with_spice 1 %define with_tui 1 @@ -114,7 +114,7 @@ Summary: Virtual Machine Manager text user interface Group: Applications/Emulators Requires: virt-manager-common = %{verrel} -Requires: python-newt_syrup +Requires: python-newt_syrup >= 1.1.2 Requires: libuser-python Requires: python-IPy @@ -196,7 +196,7 @@ rm -rf $RPM_BUILD_ROOT %post update-desktop-database -q %{_datadir}/applications -%gconf_schema_upgrade virt-manager +%gconf_schema_upgrade %{name} %postun update-desktop-database -q %{_datadir}/applications @@ -251,6 +251,10 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Mon Aug 01 2011 Cole Robinson - 0.9.0-5 +- Don't have a hard dep on libguestfs (bz 726364) +- Depend on needed python-newt_syrup version + * Thu Jul 28 2011 Cole Robinson - 0.9.0-4 - Fix typo that broke net stats reporting From 50058043deb415b2acb00d582b97ebaab40d1ed3 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 2 Aug 2011 11:12:56 -0400 Subject: [PATCH 07/19] Fix python-newt_syrup dep --- virt-manager.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/virt-manager.spec b/virt-manager.spec index 345bd4e..d606f02 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.0 -%define _release 5 +%define _release 6 %define virtinst_version 0.600.0 %define qemu_user "qemu" @@ -114,7 +114,7 @@ Summary: Virtual Machine Manager text user interface Group: Applications/Emulators Requires: virt-manager-common = %{verrel} -Requires: python-newt_syrup >= 1.1.2 +Requires: python-newt_syrup >= 0.1.2 Requires: libuser-python Requires: python-IPy @@ -251,6 +251,9 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Tue Aug 02 2011 Cole Robinson - 0.9.0-6 +- Fix python-newt_syrup dep + * Mon Aug 01 2011 Cole Robinson - 0.9.0-5 - Don't have a hard dep on libguestfs (bz 726364) - Depend on needed python-newt_syrup version From 5bdfcd9ae41f479feafdf3e1ee71ad1c68338bfd Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 27 Sep 2011 14:02:13 -0400 Subject: [PATCH 08/19] Fix 'Resize to VM' graphical option (bz 738806) Fix deleting guest with managed save data Fix error when adding default storage Don't flush XML cache on every tick Use labels for non-editable network info fields (bz 738751) Properly update icon cache (bz 733836) --- virt-manager-cache-xml-fix.patch | 25 ++ virt-manager-default-storage-error.patch | 30 +++ virt-manager-fix-resize-to-vm.patch | 38 +++ virt-manager-host-net-labels.patch | 285 +++++++++++++++++++++++ virt-manager-managed-save-delete.patch | 43 ++++ virt-manager.spec | 40 +++- 6 files changed, 458 insertions(+), 3 deletions(-) create mode 100644 virt-manager-cache-xml-fix.patch create mode 100644 virt-manager-default-storage-error.patch create mode 100644 virt-manager-fix-resize-to-vm.patch create mode 100644 virt-manager-host-net-labels.patch create mode 100644 virt-manager-managed-save-delete.patch diff --git a/virt-manager-cache-xml-fix.patch b/virt-manager-cache-xml-fix.patch new file mode 100644 index 0000000..b96e1f0 --- /dev/null +++ b/virt-manager-cache-xml-fix.patch @@ -0,0 +1,25 @@ +commit 9dc799af9c3d4fab926ee41685d68642c95593fe +Author: Cole Robinson +Date: Tue Aug 23 15:47:31 2011 -0400 + + domain: Don't fetch XML on tick to get vcpu count + + It's available in the domain info structure. Saves us from hammering + xenstored and just plain doing to much work on every tick. + +diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py +index bccf75f..2e4ad4f 100644 +--- a/src/virtManager/domain.py ++++ b/src/virtManager/domain.py +@@ -1152,10 +1152,10 @@ class vmmDomain(vmmLibvirtObject): + + if not (info[0] in [libvirt.VIR_DOMAIN_SHUTOFF, + libvirt.VIR_DOMAIN_CRASHED]): ++ guestcpus = info[3] + cpuTime = info[4] - prevCpuTime + cpuTimeAbs = info[4] + hostcpus = self.conn.host_active_processor_count() +- guestcpus = self.vcpu_count() + + pcentbase = (((cpuTime) * 100.0) / + ((now - prevTimestamp) * 1000.0 * 1000.0 * 1000.0)) diff --git a/virt-manager-default-storage-error.patch b/virt-manager-default-storage-error.patch new file mode 100644 index 0000000..33a5363 --- /dev/null +++ b/virt-manager-default-storage-error.patch @@ -0,0 +1,30 @@ +commit 9a46aa41e092e73ed1596c361acbca65ac3cbe95 +Author: Cole Robinson +Date: Tue Aug 30 14:29:08 2011 -0400 + + util: get_default_path: Handle 'None' in collidelist + +diff --git a/src/virtManager/util.py b/src/virtManager/util.py +index d351cb3..0cba349 100644 +--- a/src/virtManager/util.py ++++ b/src/virtManager/util.py +@@ -126,14 +126,14 @@ def get_default_path(conn, name, collidelist=None): + target, ignore, suffix = get_ideal_path_info(conn, name) + + # Sanitize collidelist to work with the collision checker +- for c in collidelist[:]: +- collidelist.remove(c) +- if os.path.dirname(c) == pool.get_target_path(): +- collidelist.append(os.path.basename(c)) ++ newcollidelist = [] ++ for c in collidelist: ++ if c and os.path.dirname(c) == pool.get_target_path(): ++ newcollidelist.append(os.path.basename(c)) + + path = virtinst.Storage.StorageVolume.find_free_name(name, + pool_object=pool.pool, suffix=suffix, +- collidelist=collidelist) ++ collidelist=newcollidelist) + + path = os.path.join(target, path) + diff --git a/virt-manager-fix-resize-to-vm.patch b/virt-manager-fix-resize-to-vm.patch new file mode 100644 index 0000000..91b56a3 --- /dev/null +++ b/virt-manager-fix-resize-to-vm.patch @@ -0,0 +1,38 @@ +commit a815fa17a7c643ddde8ea326399e2bee449dff98 +Author: Marc Deslauriers +Date: Fri Aug 19 11:50:11 2011 -0400 + + virt-manager: Fix "Resize to VM" menu option + + Hello, + + This patch fixes the "Resize to VM" menu option by correcting inverted return + values in autodrawer.py. + + Thanks, + + Marc. + + commit 8e666f4b87926c866ed35e58eb82213d2c514e89 + Author: Marc Deslauriers + Date: Fri Aug 19 11:46:48 2011 -0400 + + Fix inverted width and height + +diff --git a/src/virtManager/autodrawer.py b/src/virtManager/autodrawer.py +index a0ddec6..9682aa9 100644 +--- a/src/virtManager/autodrawer.py ++++ b/src/virtManager/autodrawer.py +@@ -271,10 +271,10 @@ class OverBox(parentclass): + self.underWin = None + + def do_size_request(self, req): +- height, width = self._size_request() ++ width, height = self._size_request() + +- req.height = height + req.width = width ++ req.height = height + + def do_size_allocate(self, newalloc): + self.allocation = newalloc diff --git a/virt-manager-host-net-labels.patch b/virt-manager-host-net-labels.patch new file mode 100644 index 0000000..64781a8 --- /dev/null +++ b/virt-manager-host-net-labels.patch @@ -0,0 +1,285 @@ +commit 3d3ac635e1ba33e13961c0d9663f23a2387fa3c4 +Author: Cole Robinson +Date: Thu Sep 22 10:43:55 2011 -0400 + + host: Don't use text entries for fields that aren't editable + + Also make some interface labels selectable. + +diff --git a/src/vmm-host.glade b/src/vmm-host.glade +index 2a6fde6..532d7c6 100644 +--- a/src/vmm-host.glade ++++ b/src/vmm-host.glade +@@ -511,8 +511,8 @@ + 6 + 4 + 2 +- 3 +- 3 ++ 6 ++ 5 + + + True +@@ -525,19 +525,6 @@ + + + +- +- True +- True +- False +- +- +- +- 1 +- 2 +- +- +- +- + + True + 0 +@@ -551,21 +538,6 @@ + + + +- +- True +- True +- False +- +- +- +- 1 +- 2 +- 1 +- 2 +- +- +- +- + + True + 0 +@@ -646,6 +618,32 @@ + + + ++ ++ ++ True ++ 0 ++ label ++ True ++ ++ ++ 1 ++ 2 ++ ++ ++ ++ ++ True ++ 0 ++ label ++ True ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ ++ + + + +@@ -676,8 +674,8 @@ + 6 + 4 + 2 +- 3 +- 3 ++ 6 ++ 5 + + + True +@@ -716,49 +714,6 @@ + + + +- +- True +- True +- False +- +- +- +- 1 +- 2 +- +- +- +- +- +- True +- True +- False +- +- +- +- 1 +- 2 +- 1 +- 2 +- +- +- +- +- +- True +- True +- False +- +- +- +- 1 +- 2 +- 2 +- 3 +- +- +- +- + + True + 0 +@@ -808,6 +763,49 @@ + GTK_FILL + + ++ ++ ++ True ++ 0 ++ label ++ True ++ ++ ++ 1 ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ True ++ 0 ++ label ++ True ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ True ++ 0 ++ label ++ True ++ ++ ++ 1 ++ 2 ++ 2 ++ 3 ++ GTK_FILL ++ ++ + + + +@@ -1070,7 +1068,7 @@ + 5 + 2 + 8 +- 3 ++ 5 + + + True +@@ -1140,21 +1138,6 @@ + + + +- +- True +- True +- False +- +- +- +- 1 +- 2 +- 2 +- 3 +- +- +- +- + + True + 0 +@@ -1237,6 +1220,20 @@ + + + ++ ++ ++ True ++ 0 ++ label ++ True ++ ++ ++ 1 ++ 2 ++ 2 ++ 3 ++ ++ + + + False +@@ -1611,6 +1608,7 @@ + 0 + 0 + insert mac ++ True + + + 1 +@@ -1792,6 +1790,7 @@ + True + 0 + label ++ True + + + 1 +@@ -1869,6 +1868,7 @@ + 0 + 0 + label ++ True + + + 1 diff --git a/virt-manager-managed-save-delete.patch b/virt-manager-managed-save-delete.patch new file mode 100644 index 0000000..c577d6a --- /dev/null +++ b/virt-manager-managed-save-delete.patch @@ -0,0 +1,43 @@ +commit db21a2a8331c8518f27b136d0013a56cf84df7e6 +Author: Cole Robinson +Date: Mon Aug 29 14:01:40 2011 -0400 + + delete: Properly raise 'undefine' errors + +diff --git a/src/virtManager/delete.py b/src/virtManager/delete.py +index 79d267e..22f3b23 100644 +--- a/src/virtManager/delete.py ++++ b/src/virtManager/delete.py +@@ -183,7 +183,7 @@ class vmmDeleteDialog(vmmGObjectUI): + for errinfo in storage_errors: + storage_errstr += "%s\n%s\n" % (errinfo[0], errinfo[1]) + +- if not storage_errstr: ++ if not storage_errstr and not details: + return + + # We had extra storage errors. If there was another error message, +commit b36ec4b8c2ec7ed72404db7f71cadfaecfea719e +Author: Cole Robinson +Date: Mon Aug 29 14:03:50 2011 -0400 + + domain: Remove managed save state before delete + + Newer libvirt forbids 'undefine' in this case + +diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py +index 2e4ad4f..679dfc4 100644 +--- a/src/virtManager/domain.py ++++ b/src/virtManager/domain.py +@@ -1055,6 +1055,11 @@ class vmmDomain(vmmLibvirtObject): + self.force_update_status() + + def delete(self): ++ if self.hasSavedImage(): ++ try: ++ self._backend.managedSaveRemove(0) ++ except: ++ logging.exception("Failed to remove managed save state") + self._backend.undefine() + + def resume(self): diff --git a/virt-manager.spec b/virt-manager.spec index d606f02..613c5eb 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.0 -%define _release 6 +%define _release 7 %define virtinst_version 0.600.0 %define qemu_user "qemu" @@ -36,6 +36,16 @@ URL: http://virt-manager.org/ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz # Fix typo that broke net stats reporting Patch1: %{name}-fix-net-stats.patch +# Fix 'Resize to VM' graphical option (bz 738806) +Patch2: %{name}-fix-resize-to-vm.patch +# Fix deleting guest with managed save data +Patch3: %{name}-managed-save-delete.patch +# Fix error when adding default storage +Patch4: %{name}-default-storage-error.patch +# Don't flush XML cache on every tick +Patch5: %{name}-cache-xml-fix.patch +# Use labels for non-editable network info fields (bz 738751) +Patch6: %{name}-host-net-labels.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -100,6 +110,10 @@ Requires(preun): GConf2 Requires(post): desktop-file-utils Requires(postun): desktop-file-utils +%if %{with_spice} +%define default_graphics "spice" +%endif + %description Virtual Machine Manager provides a graphical tool for administering virtual machines for KVM, Xen, and QEmu. Start, stop, add or remove virtual devices, @@ -141,6 +155,11 @@ Common files used by the different Virtual Machine Manager interfaces. %prep %setup -q %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build %if %{qemu_user} @@ -163,7 +182,7 @@ Common files used by the different Virtual Machine Manager interfaces. %define _disable_unsupported_rhel --disable-unsupported-rhel-options %endif -%if %{default_graphics} +%if %{?default_graphics} %define _default_graphics --with-default-graphics=%{default_graphics} %endif @@ -178,7 +197,7 @@ Common files used by the different Virtual Machine Manager interfaces. %{?_kvm_packages} \ %{?_libvirt_packages} \ %{?_preferred_distros} \ - %{?_enable_unsupported_rhel} \ + %{?_disable_unsupported_rhel} \ %{?_default_graphics} make %{?_smp_mflags} @@ -195,15 +214,22 @@ rm -rf $RPM_BUILD_ROOT %gconf_schema_prepare %{name} %post +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : update-desktop-database -q %{_datadir}/applications %gconf_schema_upgrade %{name} %postun +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi update-desktop-database -q %{_datadir}/applications %preun %gconf_schema_remove %{name} +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %if %{with_tui} %files @@ -251,6 +277,14 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Tue Sep 27 2011 Cole Robinson - 0.9.0-7 +- Fix 'Resize to VM' graphical option (bz 738806) +- Fix deleting guest with managed save data +- Fix error when adding default storage +- Don't flush XML cache on every tick +- Use labels for non-editable network info fields (bz 738751) +- Properly update icon cache (bz 733836) + * Tue Aug 02 2011 Cole Robinson - 0.9.0-6 - Fix python-newt_syrup dep From 8181b1830390a2e1c51fcce161361c12f76f266a Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Fri, 28 Oct 2011 12:26:13 -0400 Subject: [PATCH 09/19] Fix crashes when deleting a VM (bz 749263) --- virt-manager-console-cleanup-crash.patch | 26 ++++++++++++++++++++++++ virt-manager.spec | 8 +++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 virt-manager-console-cleanup-crash.patch diff --git a/virt-manager-console-cleanup-crash.patch b/virt-manager-console-cleanup-crash.patch new file mode 100644 index 0000000..6bcaf40 --- /dev/null +++ b/virt-manager-console-cleanup-crash.patch @@ -0,0 +1,26 @@ +commit 930a321f8e411cd02f4f43c193f967763e8b6e5c +Author: Cole Robinson +Date: Fri Oct 28 12:20:11 2011 -0400 + + console: Fix crashes when deleting vm on F16 + + The toolbar cleanup order was causing crashed on f16 at app shutdown or + VM delete (when a console window is fully uninstantiated) + +diff --git a/src/virtManager/console.py b/src/virtManager/console.py +index d6d95cd..559bb31 100644 +--- a/src/virtManager/console.py ++++ b/src/virtManager/console.py +@@ -603,10 +603,10 @@ class vmmConsolePages(vmmGObjectUI): + + self.keycombo_menu.destroy() + self.keycombo_menu = None +- self.fs_toolbar.destroy() +- self.fs_toolbar = None + self.fs_drawer.destroy() + self.fs_drawer = None ++ self.fs_toolbar.destroy() ++ self.fs_toolbar = None + + ########################## + # Initialization helpers # diff --git a/virt-manager.spec b/virt-manager.spec index 613c5eb..06bee2d 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.0 -%define _release 7 +%define _release 8 %define virtinst_version 0.600.0 %define qemu_user "qemu" @@ -46,6 +46,8 @@ Patch4: %{name}-default-storage-error.patch Patch5: %{name}-cache-xml-fix.patch # Use labels for non-editable network info fields (bz 738751) Patch6: %{name}-host-net-labels.patch +# Fix crashes when deleting a VM (bz 749263) +Patch7: %{name}-console-cleanup-crash.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -160,6 +162,7 @@ Common files used by the different Virtual Machine Manager interfaces. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build %if %{qemu_user} @@ -277,6 +280,9 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Fri Oct 28 2011 Cole Robinson - 0.9.0-8 +- Fix crashes when deleting a VM (bz 749263) + * Tue Sep 27 2011 Cole Robinson - 0.9.0-7 - Fix 'Resize to VM' graphical option (bz 738806) - Fix deleting guest with managed save data From c481b718ef490c57ead298fa445656aa2b45b1d9 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 14 Jan 2012 01:57:59 -0600 Subject: [PATCH 10/19] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- virt-manager.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-manager.spec b/virt-manager.spec index 06bee2d..ec5ce24 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -26,7 +26,7 @@ Name: %{_package} Version: %{_version} -Release: %{_release}%{_extra_release} +Release: %{_release}%{_extra_release}.1 %define verrel %{version}-%{release} Summary: Virtual Machine Manager @@ -280,6 +280,9 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 0.9.0-8.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Fri Oct 28 2011 Cole Robinson - 0.9.0-8 - Fix crashes when deleting a VM (bz 749263) From ec6e028e7305c94f272b6629cdd22f99105798cb Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 1 Feb 2012 11:18:15 -0500 Subject: [PATCH 11/19] =?UTF-8?q?Rebased=20to=20version=200.9.1=20Support?= =?UTF-8?q?=20for=20adding=20usb=20redirection=20devices=20(Marc-Andr?= =?UTF-8?q?=C3=A9=20Lureau)=20Option=20to=20switch=20usb=20controller=20to?= =?UTF-8?q?=20support=20usb2.0=20(Marc-Andr=C3=A9=20Lureau)=20Option=20to?= =?UTF-8?q?=20specify=20machine=20type=20for=20non-x86=20guests=20(Li=20Zh?= =?UTF-8?q?ang)=20Support=20for=20filesystem=20device=20type=20and=20write?= =?UTF-8?q?=20policy=20(Deepak=20C=20Shetty)=20Many=20bug=20fixes!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + sources | 2 +- virt-manager-cache-xml-fix.patch | 25 -- virt-manager-console-cleanup-crash.patch | 26 --- virt-manager-default-storage-error.patch | 30 --- virt-manager-fix-net-stats.patch | 19 -- virt-manager-fix-resize-to-vm.patch | 38 --- virt-manager-host-net-labels.patch | 285 ----------------------- virt-manager-managed-save-delete.patch | 43 ---- virt-manager.spec | 35 +-- 10 files changed, 13 insertions(+), 491 deletions(-) delete mode 100644 virt-manager-cache-xml-fix.patch delete mode 100644 virt-manager-console-cleanup-crash.patch delete mode 100644 virt-manager-default-storage-error.patch delete mode 100644 virt-manager-fix-net-stats.patch delete mode 100644 virt-manager-fix-resize-to-vm.patch delete mode 100644 virt-manager-host-net-labels.patch delete mode 100644 virt-manager-managed-save-delete.patch diff --git a/.gitignore b/.gitignore index fc7425e..a41a353 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ virt-manager-0.8.4.tar.gz /virt-manager-0.8.6.tar.gz /virt-manager-0.8.7.tar.gz /virt-manager-0.9.0.tar.gz +/virt-manager-0.9.1.tar.gz diff --git a/sources b/sources index 8f92cb4..593e18e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a10331b467f92f4134a39bf636e04adc virt-manager-0.9.0.tar.gz +cfee07b277e315b16d5180cfab5f8307 virt-manager-0.9.1.tar.gz diff --git a/virt-manager-cache-xml-fix.patch b/virt-manager-cache-xml-fix.patch deleted file mode 100644 index b96e1f0..0000000 --- a/virt-manager-cache-xml-fix.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit 9dc799af9c3d4fab926ee41685d68642c95593fe -Author: Cole Robinson -Date: Tue Aug 23 15:47:31 2011 -0400 - - domain: Don't fetch XML on tick to get vcpu count - - It's available in the domain info structure. Saves us from hammering - xenstored and just plain doing to much work on every tick. - -diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py -index bccf75f..2e4ad4f 100644 ---- a/src/virtManager/domain.py -+++ b/src/virtManager/domain.py -@@ -1152,10 +1152,10 @@ class vmmDomain(vmmLibvirtObject): - - if not (info[0] in [libvirt.VIR_DOMAIN_SHUTOFF, - libvirt.VIR_DOMAIN_CRASHED]): -+ guestcpus = info[3] - cpuTime = info[4] - prevCpuTime - cpuTimeAbs = info[4] - hostcpus = self.conn.host_active_processor_count() -- guestcpus = self.vcpu_count() - - pcentbase = (((cpuTime) * 100.0) / - ((now - prevTimestamp) * 1000.0 * 1000.0 * 1000.0)) diff --git a/virt-manager-console-cleanup-crash.patch b/virt-manager-console-cleanup-crash.patch deleted file mode 100644 index 6bcaf40..0000000 --- a/virt-manager-console-cleanup-crash.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit 930a321f8e411cd02f4f43c193f967763e8b6e5c -Author: Cole Robinson -Date: Fri Oct 28 12:20:11 2011 -0400 - - console: Fix crashes when deleting vm on F16 - - The toolbar cleanup order was causing crashed on f16 at app shutdown or - VM delete (when a console window is fully uninstantiated) - -diff --git a/src/virtManager/console.py b/src/virtManager/console.py -index d6d95cd..559bb31 100644 ---- a/src/virtManager/console.py -+++ b/src/virtManager/console.py -@@ -603,10 +603,10 @@ class vmmConsolePages(vmmGObjectUI): - - self.keycombo_menu.destroy() - self.keycombo_menu = None -- self.fs_toolbar.destroy() -- self.fs_toolbar = None - self.fs_drawer.destroy() - self.fs_drawer = None -+ self.fs_toolbar.destroy() -+ self.fs_toolbar = None - - ########################## - # Initialization helpers # diff --git a/virt-manager-default-storage-error.patch b/virt-manager-default-storage-error.patch deleted file mode 100644 index 33a5363..0000000 --- a/virt-manager-default-storage-error.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 9a46aa41e092e73ed1596c361acbca65ac3cbe95 -Author: Cole Robinson -Date: Tue Aug 30 14:29:08 2011 -0400 - - util: get_default_path: Handle 'None' in collidelist - -diff --git a/src/virtManager/util.py b/src/virtManager/util.py -index d351cb3..0cba349 100644 ---- a/src/virtManager/util.py -+++ b/src/virtManager/util.py -@@ -126,14 +126,14 @@ def get_default_path(conn, name, collidelist=None): - target, ignore, suffix = get_ideal_path_info(conn, name) - - # Sanitize collidelist to work with the collision checker -- for c in collidelist[:]: -- collidelist.remove(c) -- if os.path.dirname(c) == pool.get_target_path(): -- collidelist.append(os.path.basename(c)) -+ newcollidelist = [] -+ for c in collidelist: -+ if c and os.path.dirname(c) == pool.get_target_path(): -+ newcollidelist.append(os.path.basename(c)) - - path = virtinst.Storage.StorageVolume.find_free_name(name, - pool_object=pool.pool, suffix=suffix, -- collidelist=collidelist) -+ collidelist=newcollidelist) - - path = os.path.join(target, path) - diff --git a/virt-manager-fix-net-stats.patch b/virt-manager-fix-net-stats.patch deleted file mode 100644 index eb2b2ce..0000000 --- a/virt-manager-fix-net-stats.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 62a762e77f2f5e5298ececda6fb4638b8488da4a -Author: Cole Robinson -Date: Wed Jul 27 12:02:29 2011 -0400 - - domain: Fix typo that broke net stats gathering - -diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py -index d0683db..f9a39b5 100644 ---- a/src/virtManager/domain.py -+++ b/src/virtManager/domain.py -@@ -1448,7 +1448,7 @@ class vmmDomain(vmmLibvirtObject): - def _sample_network_traffic(self): - rx = 0 - tx = 0 -- if (not self._stats_net_supported or not -+ if (not self._stats_net_supported or - not self._enable_net_poll or - not self.is_active()): - return rx, tx diff --git a/virt-manager-fix-resize-to-vm.patch b/virt-manager-fix-resize-to-vm.patch deleted file mode 100644 index 91b56a3..0000000 --- a/virt-manager-fix-resize-to-vm.patch +++ /dev/null @@ -1,38 +0,0 @@ -commit a815fa17a7c643ddde8ea326399e2bee449dff98 -Author: Marc Deslauriers -Date: Fri Aug 19 11:50:11 2011 -0400 - - virt-manager: Fix "Resize to VM" menu option - - Hello, - - This patch fixes the "Resize to VM" menu option by correcting inverted return - values in autodrawer.py. - - Thanks, - - Marc. - - commit 8e666f4b87926c866ed35e58eb82213d2c514e89 - Author: Marc Deslauriers - Date: Fri Aug 19 11:46:48 2011 -0400 - - Fix inverted width and height - -diff --git a/src/virtManager/autodrawer.py b/src/virtManager/autodrawer.py -index a0ddec6..9682aa9 100644 ---- a/src/virtManager/autodrawer.py -+++ b/src/virtManager/autodrawer.py -@@ -271,10 +271,10 @@ class OverBox(parentclass): - self.underWin = None - - def do_size_request(self, req): -- height, width = self._size_request() -+ width, height = self._size_request() - -- req.height = height - req.width = width -+ req.height = height - - def do_size_allocate(self, newalloc): - self.allocation = newalloc diff --git a/virt-manager-host-net-labels.patch b/virt-manager-host-net-labels.patch deleted file mode 100644 index 64781a8..0000000 --- a/virt-manager-host-net-labels.patch +++ /dev/null @@ -1,285 +0,0 @@ -commit 3d3ac635e1ba33e13961c0d9663f23a2387fa3c4 -Author: Cole Robinson -Date: Thu Sep 22 10:43:55 2011 -0400 - - host: Don't use text entries for fields that aren't editable - - Also make some interface labels selectable. - -diff --git a/src/vmm-host.glade b/src/vmm-host.glade -index 2a6fde6..532d7c6 100644 ---- a/src/vmm-host.glade -+++ b/src/vmm-host.glade -@@ -511,8 +511,8 @@ - 6 - 4 - 2 -- 3 -- 3 -+ 6 -+ 5 - - - True -@@ -525,19 +525,6 @@ - - - -- -- True -- True -- False -- -- -- -- 1 -- 2 -- -- -- -- - - True - 0 -@@ -551,21 +538,6 @@ - - - -- -- True -- True -- False -- -- -- -- 1 -- 2 -- 1 -- 2 -- -- -- -- - - True - 0 -@@ -646,6 +618,32 @@ - - - -+ -+ -+ True -+ 0 -+ label -+ True -+ -+ -+ 1 -+ 2 -+ -+ -+ -+ -+ True -+ 0 -+ label -+ True -+ -+ -+ 1 -+ 2 -+ 1 -+ 2 -+ -+ - - - -@@ -676,8 +674,8 @@ - 6 - 4 - 2 -- 3 -- 3 -+ 6 -+ 5 - - - True -@@ -716,49 +714,6 @@ - - - -- -- True -- True -- False -- -- -- -- 1 -- 2 -- -- -- -- -- -- True -- True -- False -- -- -- -- 1 -- 2 -- 1 -- 2 -- -- -- -- -- -- True -- True -- False -- -- -- -- 1 -- 2 -- 2 -- 3 -- -- -- -- - - True - 0 -@@ -808,6 +763,49 @@ - GTK_FILL - - -+ -+ -+ True -+ 0 -+ label -+ True -+ -+ -+ 1 -+ 2 -+ GTK_FILL -+ -+ -+ -+ -+ True -+ 0 -+ label -+ True -+ -+ -+ 1 -+ 2 -+ 1 -+ 2 -+ GTK_FILL -+ -+ -+ -+ -+ True -+ 0 -+ label -+ True -+ -+ -+ 1 -+ 2 -+ 2 -+ 3 -+ GTK_FILL -+ -+ - - - -@@ -1070,7 +1068,7 @@ - 5 - 2 - 8 -- 3 -+ 5 - - - True -@@ -1140,21 +1138,6 @@ - - - -- -- True -- True -- False -- -- -- -- 1 -- 2 -- 2 -- 3 -- -- -- -- - - True - 0 -@@ -1237,6 +1220,20 @@ - - - -+ -+ -+ True -+ 0 -+ label -+ True -+ -+ -+ 1 -+ 2 -+ 2 -+ 3 -+ -+ - - - False -@@ -1611,6 +1608,7 @@ - 0 - 0 - insert mac -+ True - - - 1 -@@ -1792,6 +1790,7 @@ - True - 0 - label -+ True - - - 1 -@@ -1869,6 +1868,7 @@ - 0 - 0 - label -+ True - - - 1 diff --git a/virt-manager-managed-save-delete.patch b/virt-manager-managed-save-delete.patch deleted file mode 100644 index c577d6a..0000000 --- a/virt-manager-managed-save-delete.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit db21a2a8331c8518f27b136d0013a56cf84df7e6 -Author: Cole Robinson -Date: Mon Aug 29 14:01:40 2011 -0400 - - delete: Properly raise 'undefine' errors - -diff --git a/src/virtManager/delete.py b/src/virtManager/delete.py -index 79d267e..22f3b23 100644 ---- a/src/virtManager/delete.py -+++ b/src/virtManager/delete.py -@@ -183,7 +183,7 @@ class vmmDeleteDialog(vmmGObjectUI): - for errinfo in storage_errors: - storage_errstr += "%s\n%s\n" % (errinfo[0], errinfo[1]) - -- if not storage_errstr: -+ if not storage_errstr and not details: - return - - # We had extra storage errors. If there was another error message, -commit b36ec4b8c2ec7ed72404db7f71cadfaecfea719e -Author: Cole Robinson -Date: Mon Aug 29 14:03:50 2011 -0400 - - domain: Remove managed save state before delete - - Newer libvirt forbids 'undefine' in this case - -diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py -index 2e4ad4f..679dfc4 100644 ---- a/src/virtManager/domain.py -+++ b/src/virtManager/domain.py -@@ -1055,6 +1055,11 @@ class vmmDomain(vmmLibvirtObject): - self.force_update_status() - - def delete(self): -+ if self.hasSavedImage(): -+ try: -+ self._backend.managedSaveRemove(0) -+ except: -+ logging.exception("Failed to remove managed save state") - self._backend.undefine() - - def resume(self): diff --git a/virt-manager.spec b/virt-manager.spec index ec5ce24..0eac6c6 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -1,9 +1,9 @@ # -*- rpm-spec -*- %define _package virt-manager -%define _version 0.9.0 -%define _release 8 -%define virtinst_version 0.600.0 +%define _version 0.9.1 +%define _release 1 +%define virtinst_version 0.600.1 %define qemu_user "qemu" %define preferred_distros "fedora,rhel" @@ -34,20 +34,6 @@ Group: Applications/Emulators License: GPLv2+ URL: http://virt-manager.org/ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz -# Fix typo that broke net stats reporting -Patch1: %{name}-fix-net-stats.patch -# Fix 'Resize to VM' graphical option (bz 738806) -Patch2: %{name}-fix-resize-to-vm.patch -# Fix deleting guest with managed save data -Patch3: %{name}-managed-save-delete.patch -# Fix error when adding default storage -Patch4: %{name}-default-storage-error.patch -# Don't flush XML cache on every tick -Patch5: %{name}-cache-xml-fix.patch -# Use labels for non-editable network info fields (bz 738751) -Patch6: %{name}-host-net-labels.patch -# Fix crashes when deleting a VM (bz 749263) -Patch7: %{name}-console-cleanup-crash.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -156,13 +142,6 @@ Common files used by the different Virtual Machine Manager interfaces. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 %build %if %{qemu_user} @@ -280,6 +259,14 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Wed Feb 01 2012 Cole Robinson - 0.9.1-1 +- Rebased to version 0.9.1 +- Support for adding usb redirection devices (Marc-André Lureau) +- Option to switch usb controller to support usb2.0 (Marc-André Lureau) +- Option to specify machine type for non-x86 guests (Li Zhang) +- Support for filesystem device type and write policy (Deepak C Shetty) +- Many bug fixes! + * Sat Jan 14 2012 Fedora Release Engineering - 0.9.0-8.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From 3a8c60db9564f33f3b0a9f7a8035757a3400b9c3 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 1 Feb 2012 11:42:37 -0500 Subject: [PATCH 12/19] Drop extra release bit from spec --- virt-manager.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-manager.spec b/virt-manager.spec index 0eac6c6..7c9c73a 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -26,7 +26,7 @@ Name: %{_package} Version: %{_version} -Release: %{_release}%{_extra_release}.1 +Release: %{_release}%{_extra_release} %define verrel %{version}-%{release} Summary: Virtual Machine Manager From f830495c362a02ca9695c4f5ffd6dd1959ca60e1 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 13 Feb 2012 19:07:57 -0500 Subject: [PATCH 13/19] Fix error reporting for failed remote connections (bz 787011) Fix setting window title when VNC mouse is grabbed (bz 788443) Advertise VDI format in disk details (bz 761300) Don't let an unavailable host hang the app (bz 766769) Don't overwrite existing create dialog when reshowing (bz 754152) Improve tooltip for 'force console shortcuts' (bz 788448) --- virt-manager-conn-hang-app.patch | 121 ++++++++++++++++++ ...manager-console-shortcut-explanation.patch | 22 ++++ virt-manager-create-reshow.patch | 24 ++++ virt-manager-remote-error-reporting.patch | 101 +++++++++++++++ virt-manager-vdi-format.patch | 22 ++++ virt-manager-vnc-grab-recursion.patch | 23 ++++ virt-manager.spec | 28 +++- 7 files changed, 340 insertions(+), 1 deletion(-) create mode 100644 virt-manager-conn-hang-app.patch create mode 100644 virt-manager-console-shortcut-explanation.patch create mode 100644 virt-manager-create-reshow.patch create mode 100644 virt-manager-remote-error-reporting.patch create mode 100644 virt-manager-vdi-format.patch create mode 100644 virt-manager-vnc-grab-recursion.patch diff --git a/virt-manager-conn-hang-app.patch b/virt-manager-conn-hang-app.patch new file mode 100644 index 0000000..7c781d0 --- /dev/null +++ b/virt-manager-conn-hang-app.patch @@ -0,0 +1,121 @@ +commit 13dd371e4840b8dca70508477cfc6820ac5d9a71 +Author: Cole Robinson +Date: Wed Feb 8 14:15:15 2012 -0500 + + Don't let media polling block app if a connection goes down + + If we unplug a remote machine we are connected to, doing the media + timeout with a gobject timeout means running it in the main thread, + which if it's blocking on the remote connection will freeze the whole + app. + +diff --git a/src/virtManager/connection.py b/src/virtManager/connection.py +index 15c1d5e..d649c44 100644 +--- a/src/virtManager/connection.py ++++ b/src/virtManager/connection.py +@@ -1583,6 +1583,9 @@ class vmmConnection(vmmGObject): + "connection doesn't seem to have dropped. " + "Ignoring.") + ++ for dev in self.mediadevs.values(): ++ dev.tick() ++ + if not noStatsUpdate: + self._recalculate_stats(now, updateVMs) + +diff --git a/src/virtManager/mediadev.py b/src/virtManager/mediadev.py +index 3731599..a046d9e 100644 +--- a/src/virtManager/mediadev.py ++++ b/src/virtManager/mediadev.py +@@ -19,6 +19,7 @@ + # + + import logging ++import time + + import virtinst + +@@ -49,7 +50,7 @@ class vmmMediaDevice(vmmGObject): + + obj = vmmMediaDevice(path, key, has_media, media_label, media_key, + dev, drvtype) +- obj.enable_poll_for_media() ++ obj.do_poll = True + + return obj + +@@ -65,7 +66,8 @@ class vmmMediaDevice(vmmGObject): + self.media_type = media_type + + self.nodedev_obj = nodedev_obj +- self.poll_signal = None ++ self.do_poll = False ++ self.last_tick = 0 + + def _cleanup(self): + pass +@@ -130,50 +132,38 @@ class vmmMediaDevice(vmmGObject): + ######################################### + # Nodedev API polling for media updates # + ######################################### +- def enable_poll_for_media(self): +- if self.poll_signal: +- return +- +- self.poll_signal = self.safe_timeout_add(MEDIA_TIMEOUT * 1000, +- self._poll_for_media) +- self.add_gobject_timeout(self.poll_signal) +- +- def disable_poll_for_media(self): +- self.remove_gobject_timeout(self.poll_signal) +- self.poll_signal = None +- +- def _poll_for_media(self): +- if not self.poll_signal: +- return False + ++ def tick(self): + if not self.nodedev_obj: +- return False ++ return + + if not self.nodedev_obj.conn.is_active(): +- return False ++ return ++ ++ if (time.time() - self.last_tick) < MEDIA_TIMEOUT: ++ return ++ self.last_tick = time.time() + + try: + self.nodedev_obj.refresh_xml() + xml = self.nodedev_obj.get_xml() + except: + # Assume the device was removed +- return False ++ return + + try: + vobj = virtinst.NodeDeviceParser.parse(xml) + has_media = vobj.media_available + except: + logging.exception("Node device CDROM polling failed") +- return False ++ return ++ ++ if has_media == self.has_media(): ++ return + +- if has_media != self.has_media(): +- self.set_media(has_media, None, None) +- if has_media: +- self.emit("media-added") +- else: +- self.emit("media-removed") ++ self.set_media(has_media, None, None) ++ self.idle_emit(has_media and "media-added" or "media-removed") + +- return True + + vmmGObject.type_register(vmmMediaDevice) + vmmMediaDevice.signal_new(vmmMediaDevice, "media-added", []) diff --git a/virt-manager-console-shortcut-explanation.patch b/virt-manager-console-shortcut-explanation.patch new file mode 100644 index 0000000..d94aa18 --- /dev/null +++ b/virt-manager-console-shortcut-explanation.patch @@ -0,0 +1,22 @@ +diff -rup virt-manager-0.9.1/src/vmm-preferences.glade new/src/vmm-preferences.glade +--- virt-manager-0.9.1/src/vmm-preferences.glade 2012-01-27 09:38:01.000000000 -0500 ++++ new/src/vmm-preferences.glade 2012-02-13 19:05:22.890465706 -0500 +@@ -398,8 +398,8 @@ Always + + + True +- Force console menu accelerators while the console is active. Enabling this may overwrite keyboard interaction with the guest. +- Force console keyboard shortcuts: ++ When the guest graphical console has keyboard focus, do not disable shortcuts for console window menus (Alt+F -> File, etc.) Normally these are disabled to ensure that typing in the guest does not accidentally perform an operation in virt-manager's console window. ++ Don't disable console shortcuts: + + + False +@@ -412,6 +412,7 @@ Always + True + False + True ++ When the guest graphical console has keyboard focus, do not disable shortcuts for console window menus (Alt+F -> File, etc.) Normally these are disabled to ensure that typing in the guest does not accidentally perform an operation in virt-manager's console window. + + + diff --git a/virt-manager-create-reshow.patch b/virt-manager-create-reshow.patch new file mode 100644 index 0000000..7cb3fb6 --- /dev/null +++ b/virt-manager-create-reshow.patch @@ -0,0 +1,24 @@ +commit f12f4ea1980e68a12129922f456f9275ee897f65 +Author: Cole Robinson +Date: Mon Feb 13 16:19:34 2012 -0500 + + create: reshow shouldn't overwrite values in visible dialog + +diff --git a/src/virtManager/create.py b/src/virtManager/create.py +index 56d4e27..4d02922 100644 +--- a/src/virtManager/create.py ++++ b/src/virtManager/create.py +@@ -169,9 +169,11 @@ class vmmCreate(vmmGObjectUI): + + def show(self, parent, uri=None): + logging.debug("Showing new vm wizard") +- self.reset_state(uri) + +- self.topwin.set_transient_for(parent) ++ if not self.is_visible(): ++ self.reset_state(uri) ++ self.topwin.set_transient_for(parent) ++ + self.topwin.present() + + def close(self, ignore1=None, ignore2=None): diff --git a/virt-manager-remote-error-reporting.patch b/virt-manager-remote-error-reporting.patch new file mode 100644 index 0000000..da481f9 --- /dev/null +++ b/virt-manager-remote-error-reporting.patch @@ -0,0 +1,101 @@ +commit 54d007b2875a887b1579604e45b122dde286b9be +Author: Cole Robinson +Date: Thu Feb 2 16:45:18 2012 -0500 + + manager: Fix error reporting when can't connect remotely + + Also rejigger the error building again to be more useful and + less scary in cases where we are pretty confident we know what the + problem is. + +diff --git a/src/virtManager/manager.py b/src/virtManager/manager.py +index 2e8a679..a4b2df5 100644 +--- a/src/virtManager/manager.py ++++ b/src/virtManager/manager.py +@@ -646,42 +646,55 @@ class vmmManager(vmmGObjectUI): + conn.open() + return True + +- def _connect_error(self, conn, shortmsg, tb, warnconsole): +- shortmsg = shortmsg.strip(" \n") ++ def _connect_error(self, conn, errmsg, tb, warnconsole): ++ errmsg = errmsg.strip(" \n") + tb = tb.strip(" \n") +- msg = _("Unable to connect to libvirt:\n\n%s\n\n") % shortmsg ++ hint = "" ++ show_errmsg = True ++ ++ if conn.is_remote(): ++ logging.debug(conn.get_transport()) ++ if re.search(r"nc: .* -- 'U'", tb): ++ hint += _("The remote host requires a version of netcat/nc\n" ++ "which supports the -U option.") ++ show_errmsg = False ++ elif conn.get_transport()[0] == "ssh" and re.search(r"ssh-askpass", tb): ++ hint += _("You need to install openssh-askpass or similar\n" ++ "to connect to this host.") ++ show_errmsg = False ++ else: ++ hint += _("Verify that the 'libvirtd' daemon is running\n" ++ "on the remote host.") + +- if conn.is_xen() and not conn.is_remote(): +- msg += _("Verify that:\n" +- " - A Xen host kernel was booted\n" +- " - The Xen service has been started\n") +- msg = msg.strip("\n") +- details = "%s\n\n%s" % (msg, tb) ++ elif conn.is_xen(): ++ hint += _("Verify that:\n" ++ " - A Xen host kernel was booted\n" ++ " - The Xen service has been started") + + else: +- hints = [] +- if conn.is_remote() and re.search(r"nc: .* -- 'U'", details): +- hints.append( +- _("\n - The remote netcat understands the '-U' option")) +- + if warnconsole: +- msg += _("Could not detect a local session: if you are \n" +- "running virt-manager over ssh -X or VNC, you \n" +- "may not be able to connect to libvirt as a \n" +- "regular user. Try running as root.\n\n") +- else: +- msg += _("Verify that:\n" + +- " - The 'libvirtd' daemon has been started") +- for hint in hints: +- msg += hint +- +- msg = msg.strip("\n") +- details = (("%s\n\n" % msg) + +- (_("Libvirt URI is: %s\n\n") % conn.get_uri()) + +- tb) +- +- self.err.show_err(msg, details, +- title=_("Virtual Machine Manager Connection Failure")) ++ hint += _("Could not detect a local session: if you are \n" ++ "running virt-manager over ssh -X or VNC, you \n" ++ "may not be able to connect to libvirt as a \n" ++ "regular user. Try running as root.") ++ show_errmsg = False ++ elif re.search(r"libvirt-sock", tb): ++ hint += _("Verify that the 'libvirtd' daemon is running.") ++ show_errmsg = False ++ ++ msg = _("Unable to connect to libvirt.") ++ if show_errmsg: ++ msg += "\n\n%s" % errmsg ++ if hint: ++ msg += "\n\n%s" % hint ++ ++ msg = msg.strip("\n") ++ details = msg ++ details += "\n\n" ++ details += "Libvirt URI is: %s\n\n" % conn.get_uri() ++ details += tb ++ ++ self.err.show_err(msg, details, title=_("Virtual Machine Manager Connection Failure")) + + + #################################### diff --git a/virt-manager-vdi-format.patch b/virt-manager-vdi-format.patch new file mode 100644 index 0000000..3f571e1 --- /dev/null +++ b/virt-manager-vdi-format.patch @@ -0,0 +1,22 @@ +commit 265e04205e4766f459d4ced516dbd784cf2ca57f +Author: Cole Robinson +Date: Tue Feb 7 17:13:59 2012 -0500 + + Add VDI to disk format list + + People actually distribute images in that format: + + https://bugzilla.redhat.com/show_bug.cgi?id=761300 + +diff --git a/src/virtManager/uihelpers.py b/src/virtManager/uihelpers.py +index c274592..3ba4a71 100644 +--- a/src/virtManager/uihelpers.py ++++ b/src/virtManager/uihelpers.py +@@ -397,6 +397,7 @@ def build_storage_format_combo(vm, combo): + formats = ["raw", "qcow2"] + if vm.rhel6_defaults(): + formats.append("vmdk") ++ formats.append("vdi") + + for m in formats: + dev_model.append([m]) diff --git a/virt-manager-vnc-grab-recursion.patch b/virt-manager-vnc-grab-recursion.patch new file mode 100644 index 0000000..724a444 --- /dev/null +++ b/virt-manager-vnc-grab-recursion.patch @@ -0,0 +1,23 @@ +commit c47fc5454039a9e7093f179c1e06ffc576dc1ad3 +Author: Cole Robinson +Date: Mon Feb 6 17:57:14 2012 -0500 + + vnc: Fix accidental recursion we reporting grab keys + +diff --git a/src/virtManager/console.py b/src/virtManager/console.py +index 3b39a6c..13fc755 100644 +--- a/src/virtManager/console.py ++++ b/src/virtManager/console.py +@@ -387,12 +387,6 @@ class VNCViewer(Viewer): + def open_fd(self, fd): + self.display.open_fd(fd) + +- def get_grab_keys(self): +- keystr = self.get_grab_keys() +- if not keystr: +- keystr = "Control_L+Alt_L" +- return keystr +- + def set_credential_username(self, cred): + self.display.set_credential(gtkvnc.CREDENTIAL_USERNAME, cred) + diff --git a/virt-manager.spec b/virt-manager.spec index 7c9c73a..fc58640 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.1 -%define _release 1 +%define _release 2 %define virtinst_version 0.600.1 %define qemu_user "qemu" @@ -34,6 +34,18 @@ Group: Applications/Emulators License: GPLv2+ URL: http://virt-manager.org/ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz +# Fix error reporting for failed remote connections (bz 787011) +Patch1: %{name}-remote-error-reporting.patch +# Fix setting window title when VNC mouse is grabbed (bz 788443) +Patch2: %{name}-vnc-grab-recursion.patch +# Advertise VDI format in disk details (bz 761300) +Patch3: %{name}-vdi-format.patch +# Don't let an unavailable host hang the app (bz 766769) +Patch4: %{name}-conn-hang-app.patch +# Don't overwrite existing create dialog when reshowing (bz 754152) +Patch5: %{name}-create-reshow.patch +# Improve tooltip for 'force console shortcuts' (bz 788448) +Patch6: %{name}-console-shortcut-explanation.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -142,6 +154,12 @@ Common files used by the different Virtual Machine Manager interfaces. %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build %if %{qemu_user} @@ -259,6 +277,14 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Mon Feb 13 2012 Cole Robinson - 0.9.1-2 +- Fix error reporting for failed remote connections (bz 787011) +- Fix setting window title when VNC mouse is grabbed (bz 788443) +- Advertise VDI format in disk details (bz 761300) +- Don't let an unavailable host hang the app (bz 766769) +- Don't overwrite existing create dialog when reshowing (bz 754152) +- Improve tooltip for 'force console shortcuts' (bz 788448) + * Wed Feb 01 2012 Cole Robinson - 0.9.1-1 - Rebased to version 0.9.1 - Support for adding usb redirection devices (Marc-André Lureau) From c2ca85499023f7bf92c92b3539716a5610ecda6a Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 13 Feb 2012 19:10:33 -0500 Subject: [PATCH 14/19] Fix error reporting for failed remote connections (bz 787011) Fix setting window title when VNC mouse is grabbed (bz 788443) Advertise VDI format in disk details (bz 761300) Don't let an unavailable host hang the app (bz 766769) Don't overwrite existing create dialog when reshowing (bz 754152) Improve tooltip for 'force console shortcuts' (bz 788448) --- virt-manager-conn-hang-app.patch | 121 ++++++++++++++++++ ...manager-console-shortcut-explanation.patch | 22 ++++ virt-manager-create-reshow.patch | 24 ++++ virt-manager-remote-error-reporting.patch | 101 +++++++++++++++ virt-manager-vdi-format.patch | 22 ++++ virt-manager-vnc-grab-recursion.patch | 23 ++++ virt-manager.spec | 28 +++- 7 files changed, 340 insertions(+), 1 deletion(-) create mode 100644 virt-manager-conn-hang-app.patch create mode 100644 virt-manager-console-shortcut-explanation.patch create mode 100644 virt-manager-create-reshow.patch create mode 100644 virt-manager-remote-error-reporting.patch create mode 100644 virt-manager-vdi-format.patch create mode 100644 virt-manager-vnc-grab-recursion.patch diff --git a/virt-manager-conn-hang-app.patch b/virt-manager-conn-hang-app.patch new file mode 100644 index 0000000..7c781d0 --- /dev/null +++ b/virt-manager-conn-hang-app.patch @@ -0,0 +1,121 @@ +commit 13dd371e4840b8dca70508477cfc6820ac5d9a71 +Author: Cole Robinson +Date: Wed Feb 8 14:15:15 2012 -0500 + + Don't let media polling block app if a connection goes down + + If we unplug a remote machine we are connected to, doing the media + timeout with a gobject timeout means running it in the main thread, + which if it's blocking on the remote connection will freeze the whole + app. + +diff --git a/src/virtManager/connection.py b/src/virtManager/connection.py +index 15c1d5e..d649c44 100644 +--- a/src/virtManager/connection.py ++++ b/src/virtManager/connection.py +@@ -1583,6 +1583,9 @@ class vmmConnection(vmmGObject): + "connection doesn't seem to have dropped. " + "Ignoring.") + ++ for dev in self.mediadevs.values(): ++ dev.tick() ++ + if not noStatsUpdate: + self._recalculate_stats(now, updateVMs) + +diff --git a/src/virtManager/mediadev.py b/src/virtManager/mediadev.py +index 3731599..a046d9e 100644 +--- a/src/virtManager/mediadev.py ++++ b/src/virtManager/mediadev.py +@@ -19,6 +19,7 @@ + # + + import logging ++import time + + import virtinst + +@@ -49,7 +50,7 @@ class vmmMediaDevice(vmmGObject): + + obj = vmmMediaDevice(path, key, has_media, media_label, media_key, + dev, drvtype) +- obj.enable_poll_for_media() ++ obj.do_poll = True + + return obj + +@@ -65,7 +66,8 @@ class vmmMediaDevice(vmmGObject): + self.media_type = media_type + + self.nodedev_obj = nodedev_obj +- self.poll_signal = None ++ self.do_poll = False ++ self.last_tick = 0 + + def _cleanup(self): + pass +@@ -130,50 +132,38 @@ class vmmMediaDevice(vmmGObject): + ######################################### + # Nodedev API polling for media updates # + ######################################### +- def enable_poll_for_media(self): +- if self.poll_signal: +- return +- +- self.poll_signal = self.safe_timeout_add(MEDIA_TIMEOUT * 1000, +- self._poll_for_media) +- self.add_gobject_timeout(self.poll_signal) +- +- def disable_poll_for_media(self): +- self.remove_gobject_timeout(self.poll_signal) +- self.poll_signal = None +- +- def _poll_for_media(self): +- if not self.poll_signal: +- return False + ++ def tick(self): + if not self.nodedev_obj: +- return False ++ return + + if not self.nodedev_obj.conn.is_active(): +- return False ++ return ++ ++ if (time.time() - self.last_tick) < MEDIA_TIMEOUT: ++ return ++ self.last_tick = time.time() + + try: + self.nodedev_obj.refresh_xml() + xml = self.nodedev_obj.get_xml() + except: + # Assume the device was removed +- return False ++ return + + try: + vobj = virtinst.NodeDeviceParser.parse(xml) + has_media = vobj.media_available + except: + logging.exception("Node device CDROM polling failed") +- return False ++ return ++ ++ if has_media == self.has_media(): ++ return + +- if has_media != self.has_media(): +- self.set_media(has_media, None, None) +- if has_media: +- self.emit("media-added") +- else: +- self.emit("media-removed") ++ self.set_media(has_media, None, None) ++ self.idle_emit(has_media and "media-added" or "media-removed") + +- return True + + vmmGObject.type_register(vmmMediaDevice) + vmmMediaDevice.signal_new(vmmMediaDevice, "media-added", []) diff --git a/virt-manager-console-shortcut-explanation.patch b/virt-manager-console-shortcut-explanation.patch new file mode 100644 index 0000000..d94aa18 --- /dev/null +++ b/virt-manager-console-shortcut-explanation.patch @@ -0,0 +1,22 @@ +diff -rup virt-manager-0.9.1/src/vmm-preferences.glade new/src/vmm-preferences.glade +--- virt-manager-0.9.1/src/vmm-preferences.glade 2012-01-27 09:38:01.000000000 -0500 ++++ new/src/vmm-preferences.glade 2012-02-13 19:05:22.890465706 -0500 +@@ -398,8 +398,8 @@ Always + + + True +- Force console menu accelerators while the console is active. Enabling this may overwrite keyboard interaction with the guest. +- Force console keyboard shortcuts: ++ When the guest graphical console has keyboard focus, do not disable shortcuts for console window menus (Alt+F -> File, etc.) Normally these are disabled to ensure that typing in the guest does not accidentally perform an operation in virt-manager's console window. ++ Don't disable console shortcuts: + + + False +@@ -412,6 +412,7 @@ Always + True + False + True ++ When the guest graphical console has keyboard focus, do not disable shortcuts for console window menus (Alt+F -> File, etc.) Normally these are disabled to ensure that typing in the guest does not accidentally perform an operation in virt-manager's console window. + + + diff --git a/virt-manager-create-reshow.patch b/virt-manager-create-reshow.patch new file mode 100644 index 0000000..7cb3fb6 --- /dev/null +++ b/virt-manager-create-reshow.patch @@ -0,0 +1,24 @@ +commit f12f4ea1980e68a12129922f456f9275ee897f65 +Author: Cole Robinson +Date: Mon Feb 13 16:19:34 2012 -0500 + + create: reshow shouldn't overwrite values in visible dialog + +diff --git a/src/virtManager/create.py b/src/virtManager/create.py +index 56d4e27..4d02922 100644 +--- a/src/virtManager/create.py ++++ b/src/virtManager/create.py +@@ -169,9 +169,11 @@ class vmmCreate(vmmGObjectUI): + + def show(self, parent, uri=None): + logging.debug("Showing new vm wizard") +- self.reset_state(uri) + +- self.topwin.set_transient_for(parent) ++ if not self.is_visible(): ++ self.reset_state(uri) ++ self.topwin.set_transient_for(parent) ++ + self.topwin.present() + + def close(self, ignore1=None, ignore2=None): diff --git a/virt-manager-remote-error-reporting.patch b/virt-manager-remote-error-reporting.patch new file mode 100644 index 0000000..da481f9 --- /dev/null +++ b/virt-manager-remote-error-reporting.patch @@ -0,0 +1,101 @@ +commit 54d007b2875a887b1579604e45b122dde286b9be +Author: Cole Robinson +Date: Thu Feb 2 16:45:18 2012 -0500 + + manager: Fix error reporting when can't connect remotely + + Also rejigger the error building again to be more useful and + less scary in cases where we are pretty confident we know what the + problem is. + +diff --git a/src/virtManager/manager.py b/src/virtManager/manager.py +index 2e8a679..a4b2df5 100644 +--- a/src/virtManager/manager.py ++++ b/src/virtManager/manager.py +@@ -646,42 +646,55 @@ class vmmManager(vmmGObjectUI): + conn.open() + return True + +- def _connect_error(self, conn, shortmsg, tb, warnconsole): +- shortmsg = shortmsg.strip(" \n") ++ def _connect_error(self, conn, errmsg, tb, warnconsole): ++ errmsg = errmsg.strip(" \n") + tb = tb.strip(" \n") +- msg = _("Unable to connect to libvirt:\n\n%s\n\n") % shortmsg ++ hint = "" ++ show_errmsg = True ++ ++ if conn.is_remote(): ++ logging.debug(conn.get_transport()) ++ if re.search(r"nc: .* -- 'U'", tb): ++ hint += _("The remote host requires a version of netcat/nc\n" ++ "which supports the -U option.") ++ show_errmsg = False ++ elif conn.get_transport()[0] == "ssh" and re.search(r"ssh-askpass", tb): ++ hint += _("You need to install openssh-askpass or similar\n" ++ "to connect to this host.") ++ show_errmsg = False ++ else: ++ hint += _("Verify that the 'libvirtd' daemon is running\n" ++ "on the remote host.") + +- if conn.is_xen() and not conn.is_remote(): +- msg += _("Verify that:\n" +- " - A Xen host kernel was booted\n" +- " - The Xen service has been started\n") +- msg = msg.strip("\n") +- details = "%s\n\n%s" % (msg, tb) ++ elif conn.is_xen(): ++ hint += _("Verify that:\n" ++ " - A Xen host kernel was booted\n" ++ " - The Xen service has been started") + + else: +- hints = [] +- if conn.is_remote() and re.search(r"nc: .* -- 'U'", details): +- hints.append( +- _("\n - The remote netcat understands the '-U' option")) +- + if warnconsole: +- msg += _("Could not detect a local session: if you are \n" +- "running virt-manager over ssh -X or VNC, you \n" +- "may not be able to connect to libvirt as a \n" +- "regular user. Try running as root.\n\n") +- else: +- msg += _("Verify that:\n" + +- " - The 'libvirtd' daemon has been started") +- for hint in hints: +- msg += hint +- +- msg = msg.strip("\n") +- details = (("%s\n\n" % msg) + +- (_("Libvirt URI is: %s\n\n") % conn.get_uri()) + +- tb) +- +- self.err.show_err(msg, details, +- title=_("Virtual Machine Manager Connection Failure")) ++ hint += _("Could not detect a local session: if you are \n" ++ "running virt-manager over ssh -X or VNC, you \n" ++ "may not be able to connect to libvirt as a \n" ++ "regular user. Try running as root.") ++ show_errmsg = False ++ elif re.search(r"libvirt-sock", tb): ++ hint += _("Verify that the 'libvirtd' daemon is running.") ++ show_errmsg = False ++ ++ msg = _("Unable to connect to libvirt.") ++ if show_errmsg: ++ msg += "\n\n%s" % errmsg ++ if hint: ++ msg += "\n\n%s" % hint ++ ++ msg = msg.strip("\n") ++ details = msg ++ details += "\n\n" ++ details += "Libvirt URI is: %s\n\n" % conn.get_uri() ++ details += tb ++ ++ self.err.show_err(msg, details, title=_("Virtual Machine Manager Connection Failure")) + + + #################################### diff --git a/virt-manager-vdi-format.patch b/virt-manager-vdi-format.patch new file mode 100644 index 0000000..3f571e1 --- /dev/null +++ b/virt-manager-vdi-format.patch @@ -0,0 +1,22 @@ +commit 265e04205e4766f459d4ced516dbd784cf2ca57f +Author: Cole Robinson +Date: Tue Feb 7 17:13:59 2012 -0500 + + Add VDI to disk format list + + People actually distribute images in that format: + + https://bugzilla.redhat.com/show_bug.cgi?id=761300 + +diff --git a/src/virtManager/uihelpers.py b/src/virtManager/uihelpers.py +index c274592..3ba4a71 100644 +--- a/src/virtManager/uihelpers.py ++++ b/src/virtManager/uihelpers.py +@@ -397,6 +397,7 @@ def build_storage_format_combo(vm, combo): + formats = ["raw", "qcow2"] + if vm.rhel6_defaults(): + formats.append("vmdk") ++ formats.append("vdi") + + for m in formats: + dev_model.append([m]) diff --git a/virt-manager-vnc-grab-recursion.patch b/virt-manager-vnc-grab-recursion.patch new file mode 100644 index 0000000..724a444 --- /dev/null +++ b/virt-manager-vnc-grab-recursion.patch @@ -0,0 +1,23 @@ +commit c47fc5454039a9e7093f179c1e06ffc576dc1ad3 +Author: Cole Robinson +Date: Mon Feb 6 17:57:14 2012 -0500 + + vnc: Fix accidental recursion we reporting grab keys + +diff --git a/src/virtManager/console.py b/src/virtManager/console.py +index 3b39a6c..13fc755 100644 +--- a/src/virtManager/console.py ++++ b/src/virtManager/console.py +@@ -387,12 +387,6 @@ class VNCViewer(Viewer): + def open_fd(self, fd): + self.display.open_fd(fd) + +- def get_grab_keys(self): +- keystr = self.get_grab_keys() +- if not keystr: +- keystr = "Control_L+Alt_L" +- return keystr +- + def set_credential_username(self, cred): + self.display.set_credential(gtkvnc.CREDENTIAL_USERNAME, cred) + diff --git a/virt-manager.spec b/virt-manager.spec index 7c9c73a..fc58640 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.1 -%define _release 1 +%define _release 2 %define virtinst_version 0.600.1 %define qemu_user "qemu" @@ -34,6 +34,18 @@ Group: Applications/Emulators License: GPLv2+ URL: http://virt-manager.org/ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz +# Fix error reporting for failed remote connections (bz 787011) +Patch1: %{name}-remote-error-reporting.patch +# Fix setting window title when VNC mouse is grabbed (bz 788443) +Patch2: %{name}-vnc-grab-recursion.patch +# Advertise VDI format in disk details (bz 761300) +Patch3: %{name}-vdi-format.patch +# Don't let an unavailable host hang the app (bz 766769) +Patch4: %{name}-conn-hang-app.patch +# Don't overwrite existing create dialog when reshowing (bz 754152) +Patch5: %{name}-create-reshow.patch +# Improve tooltip for 'force console shortcuts' (bz 788448) +Patch6: %{name}-console-shortcut-explanation.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -142,6 +154,12 @@ Common files used by the different Virtual Machine Manager interfaces. %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build %if %{qemu_user} @@ -259,6 +277,14 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Mon Feb 13 2012 Cole Robinson - 0.9.1-2 +- Fix error reporting for failed remote connections (bz 787011) +- Fix setting window title when VNC mouse is grabbed (bz 788443) +- Advertise VDI format in disk details (bz 761300) +- Don't let an unavailable host hang the app (bz 766769) +- Don't overwrite existing create dialog when reshowing (bz 754152) +- Improve tooltip for 'force console shortcuts' (bz 788448) + * Wed Feb 01 2012 Cole Robinson - 0.9.1-1 - Rebased to version 0.9.1 - Support for adding usb redirection devices (Marc-André Lureau) From 674de803bf16bdaa7da6971b2065f0231c3256c3 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 25 Apr 2012 09:23:19 -0400 Subject: [PATCH 15/19] Actually make spice the default (bz 757874) Only depend on spice on arch it is available (bz 811030) Depend on libgnome-keyring (bz 811921) --- virt-manager-fix-spice-default.patch | 25 ++++++++++++++++++++++ virt-manager.spec | 32 +++++++++++++++++----------- 2 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 virt-manager-fix-spice-default.patch diff --git a/virt-manager-fix-spice-default.patch b/virt-manager-fix-spice-default.patch new file mode 100644 index 0000000..b115667 --- /dev/null +++ b/virt-manager-fix-spice-default.patch @@ -0,0 +1,25 @@ +commit 45119785c7efbaa1defc3fffd05cb41e39992271 +Author: Cole Robinson +Date: Thu Apr 5 13:28:39 2012 -0400 + + schemas: Fix key for default graphics type + + What we installed didn't match what the app was checking and setting. + Have it match the app key so we don't overwrite users who have changed the + default via the prefs dialog. + +diff --git a/src/virt-manager.schemas.in b/src/virt-manager.schemas.in +index dfcd7ba..8154534 100644 +--- a/src/virt-manager.schemas.in ++++ b/src/virt-manager.schemas.in +@@ -196,8 +196,8 @@ + + + +- /schemas/apps/::PACKAGE::/new-vm/graphics-type +- /apps/::PACKAGE::/new-vm/graphics-type ++ /schemas/apps/::PACKAGE::/new-vm/graphics_type ++ /apps/::PACKAGE::/new-vm/graphics_type + ::PACKAGE:: + string + ::DEFAULT_GRAPHICS:: diff --git a/virt-manager.spec b/virt-manager.spec index fc58640..fda9d49 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.1 -%define _release 2 +%define _release 3 %define virtinst_version 0.600.1 %define qemu_user "qemu" @@ -10,12 +10,16 @@ %define kvm_packages "qemu-system-x86" %define libvirt_packages "libvirt" %define disable_unsupported_rhel 0 -%define default_graphics "spice" %define with_guestfs 0 -%define with_spice 1 %define with_tui 1 +%ifarch %{ix86} x86_64 +%define with_spice 1 +%else +%define with_spice 0 +%endif + # End local config # This macro is used for the continuous automated builds. It just @@ -46,6 +50,8 @@ Patch4: %{name}-conn-hang-app.patch Patch5: %{name}-create-reshow.patch # Improve tooltip for 'force console shortcuts' (bz 788448) Patch6: %{name}-console-shortcut-explanation.patch +# Actually make spice the default (bz 757874) +Patch7: %{name}-fix-spice-default.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -58,8 +64,12 @@ Requires: libvirt-python >= 0.7.0 # Definitely does not work with earlier due to python API changes Requires: dbus-python >= 0.61 Requires: dbus-x11 +%if !0%{?rhel} || 0%{?rhel} > 6 # Might work with earlier, but this is what we've tested Requires: gnome-keyring >= 0.4.9 +%else +Requires: libgnome-keyring +%endif # Minimum we've tested with # Although if you don't have this, comment it out and the app # will work just fine - keyring functionality will simply be @@ -77,14 +87,6 @@ Requires: vte >= 0.12.2 Requires: scrollkeeper # For console widget Requires: gtk-vnc-python >= 0.3.8 -# For local authentication against PolicyKit -# Fedora 12 has no need for a client agent -%if 0%{?fedora} == 11 -Requires: PolicyKit-authentication-agent -%endif -%if 0%{?fedora} >= 9 && 0%{?fedora} < 11 -Requires: PolicyKit-gnome -%endif %if %{with_spice} Requires: spice-gtk-python %endif @@ -160,6 +162,7 @@ Common files used by the different Virtual Machine Manager interfaces. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build %if %{qemu_user} @@ -182,7 +185,7 @@ Common files used by the different Virtual Machine Manager interfaces. %define _disable_unsupported_rhel --disable-unsupported-rhel-options %endif -%if %{?default_graphics} +%if 0%{?default_graphics} %define _default_graphics --with-default-graphics=%{default_graphics} %endif @@ -277,6 +280,11 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Wed Apr 25 2012 Cole Robinson - 0.9.1-3 +- Actually make spice the default (bz 757874) +- Only depend on spice on arch it is available (bz 811030) +- Depend on libgnome-keyring (bz 811921) + * Mon Feb 13 2012 Cole Robinson - 0.9.1-2 - Fix error reporting for failed remote connections (bz 787011) - Fix setting window title when VNC mouse is grabbed (bz 788443) From 5151c6ca23bc5dee8211aed60b0738c0cebe00b3 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 25 Apr 2012 09:40:51 -0400 Subject: [PATCH 16/19] Actually make spice the default (bz 757874) Only depend on spice on arch it is available (bz 811030) Depend on libgnome-keyring (bz 811921) --- virt-manager-fix-spice-default.patch | 25 ++++++++++++++++++++++ virt-manager.spec | 32 +++++++++++++++++----------- 2 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 virt-manager-fix-spice-default.patch diff --git a/virt-manager-fix-spice-default.patch b/virt-manager-fix-spice-default.patch new file mode 100644 index 0000000..b115667 --- /dev/null +++ b/virt-manager-fix-spice-default.patch @@ -0,0 +1,25 @@ +commit 45119785c7efbaa1defc3fffd05cb41e39992271 +Author: Cole Robinson +Date: Thu Apr 5 13:28:39 2012 -0400 + + schemas: Fix key for default graphics type + + What we installed didn't match what the app was checking and setting. + Have it match the app key so we don't overwrite users who have changed the + default via the prefs dialog. + +diff --git a/src/virt-manager.schemas.in b/src/virt-manager.schemas.in +index dfcd7ba..8154534 100644 +--- a/src/virt-manager.schemas.in ++++ b/src/virt-manager.schemas.in +@@ -196,8 +196,8 @@ + + + +- /schemas/apps/::PACKAGE::/new-vm/graphics-type +- /apps/::PACKAGE::/new-vm/graphics-type ++ /schemas/apps/::PACKAGE::/new-vm/graphics_type ++ /apps/::PACKAGE::/new-vm/graphics_type + ::PACKAGE:: + string + ::DEFAULT_GRAPHICS:: diff --git a/virt-manager.spec b/virt-manager.spec index fc58640..fda9d49 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.1 -%define _release 2 +%define _release 3 %define virtinst_version 0.600.1 %define qemu_user "qemu" @@ -10,12 +10,16 @@ %define kvm_packages "qemu-system-x86" %define libvirt_packages "libvirt" %define disable_unsupported_rhel 0 -%define default_graphics "spice" %define with_guestfs 0 -%define with_spice 1 %define with_tui 1 +%ifarch %{ix86} x86_64 +%define with_spice 1 +%else +%define with_spice 0 +%endif + # End local config # This macro is used for the continuous automated builds. It just @@ -46,6 +50,8 @@ Patch4: %{name}-conn-hang-app.patch Patch5: %{name}-create-reshow.patch # Improve tooltip for 'force console shortcuts' (bz 788448) Patch6: %{name}-console-shortcut-explanation.patch +# Actually make spice the default (bz 757874) +Patch7: %{name}-fix-spice-default.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -58,8 +64,12 @@ Requires: libvirt-python >= 0.7.0 # Definitely does not work with earlier due to python API changes Requires: dbus-python >= 0.61 Requires: dbus-x11 +%if !0%{?rhel} || 0%{?rhel} > 6 # Might work with earlier, but this is what we've tested Requires: gnome-keyring >= 0.4.9 +%else +Requires: libgnome-keyring +%endif # Minimum we've tested with # Although if you don't have this, comment it out and the app # will work just fine - keyring functionality will simply be @@ -77,14 +87,6 @@ Requires: vte >= 0.12.2 Requires: scrollkeeper # For console widget Requires: gtk-vnc-python >= 0.3.8 -# For local authentication against PolicyKit -# Fedora 12 has no need for a client agent -%if 0%{?fedora} == 11 -Requires: PolicyKit-authentication-agent -%endif -%if 0%{?fedora} >= 9 && 0%{?fedora} < 11 -Requires: PolicyKit-gnome -%endif %if %{with_spice} Requires: spice-gtk-python %endif @@ -160,6 +162,7 @@ Common files used by the different Virtual Machine Manager interfaces. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build %if %{qemu_user} @@ -182,7 +185,7 @@ Common files used by the different Virtual Machine Manager interfaces. %define _disable_unsupported_rhel --disable-unsupported-rhel-options %endif -%if %{?default_graphics} +%if 0%{?default_graphics} %define _default_graphics --with-default-graphics=%{default_graphics} %endif @@ -277,6 +280,11 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Wed Apr 25 2012 Cole Robinson - 0.9.1-3 +- Actually make spice the default (bz 757874) +- Only depend on spice on arch it is available (bz 811030) +- Depend on libgnome-keyring (bz 811921) + * Mon Feb 13 2012 Cole Robinson - 0.9.1-2 - Fix error reporting for failed remote connections (bz 787011) - Fix setting window title when VNC mouse is grabbed (bz 788443) From 01c05544eb24c611473ff65f6457a538be8114d0 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 6 Jun 2012 17:37:32 -0400 Subject: [PATCH 17/19] Fix connecting to console with specific listen address Fix regression that dropped spice dependency (bz 819270) --- virt-manager-fix-listen-address.patch | 53 +++++++++++++++++++++++++++ virt-manager.spec | 21 +++++++---- 2 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 virt-manager-fix-listen-address.patch diff --git a/virt-manager-fix-listen-address.patch b/virt-manager-fix-listen-address.patch new file mode 100644 index 0000000..4c781a9 --- /dev/null +++ b/virt-manager-fix-listen-address.patch @@ -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: diff --git a/virt-manager.spec b/virt-manager.spec index fda9d49..85db610 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.1 -%define _release 3 +%define _release 4 %define virtinst_version 0.600.1 %define qemu_user "qemu" @@ -14,10 +14,11 @@ %define with_guestfs 0 %define with_tui 1 -%ifarch %{ix86} x86_64 %define with_spice 1 -%else -%define with_spice 0 +%define default_graphics "" + +%if %{with_spice} && %{default_graphics} == "" +%define default_graphics "spice" %endif # End local config @@ -52,6 +53,8 @@ Patch5: %{name}-create-reshow.patch Patch6: %{name}-console-shortcut-explanation.patch # Actually make spice the default (bz 757874) 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) BuildArch: noarch @@ -112,9 +115,6 @@ Requires(preun): GConf2 Requires(post): desktop-file-utils Requires(postun): desktop-file-utils -%if %{with_spice} -%define default_graphics "spice" -%endif %description 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 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %build %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 %endif -%if 0%{?default_graphics} +%if %{default_graphics} %define _default_graphics --with-default-graphics=%{default_graphics} %endif @@ -280,6 +281,10 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Wed Jun 06 2012 Cole Robinson - 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 - 0.9.1-3 - Actually make spice the default (bz 757874) - Only depend on spice on arch it is available (bz 811030) From 08a360a6e8bf5b6e757105c3ad3523fae28f5838 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 6 Jun 2012 17:39:37 -0400 Subject: [PATCH 18/19] Fix connecting to console with specific listen address Fix regression that dropped spice dependency (bz 819270) --- virt-manager-fix-listen-address.patch | 53 +++++++++++++++++++++++++++ virt-manager.spec | 21 +++++++---- 2 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 virt-manager-fix-listen-address.patch diff --git a/virt-manager-fix-listen-address.patch b/virt-manager-fix-listen-address.patch new file mode 100644 index 0000000..4c781a9 --- /dev/null +++ b/virt-manager-fix-listen-address.patch @@ -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: diff --git a/virt-manager.spec b/virt-manager.spec index fda9d49..85db610 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -2,7 +2,7 @@ %define _package virt-manager %define _version 0.9.1 -%define _release 3 +%define _release 4 %define virtinst_version 0.600.1 %define qemu_user "qemu" @@ -14,10 +14,11 @@ %define with_guestfs 0 %define with_tui 1 -%ifarch %{ix86} x86_64 %define with_spice 1 -%else -%define with_spice 0 +%define default_graphics "" + +%if %{with_spice} && %{default_graphics} == "" +%define default_graphics "spice" %endif # End local config @@ -52,6 +53,8 @@ Patch5: %{name}-create-reshow.patch Patch6: %{name}-console-shortcut-explanation.patch # Actually make spice the default (bz 757874) 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) BuildArch: noarch @@ -112,9 +115,6 @@ Requires(preun): GConf2 Requires(post): desktop-file-utils Requires(postun): desktop-file-utils -%if %{with_spice} -%define default_graphics "spice" -%endif %description 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 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %build %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 %endif -%if 0%{?default_graphics} +%if %{default_graphics} %define _default_graphics --with-default-graphics=%{default_graphics} %endif @@ -280,6 +281,10 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Wed Jun 06 2012 Cole Robinson - 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 - 0.9.1-3 - Actually make spice the default (bz 757874) - Only depend on spice on arch it is available (bz 811030) From 13b04c09ba2ae6e746915c73808370498b75b177 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 9 Jul 2012 17:31:30 -0400 Subject: [PATCH 19/19] Rebased to version 0.9.3 Convert to gtkbuilder: UI can now be editted with modern glade tool virt-manager no longer runs on RHEL5, but can manage a remote RHEL5 host Option to configure spapr net and disk devices for pseries (Li Zhang) Offer to install openssh-askpass if we need it (bz 754484) Don't leave defunct SSH processes around (bz 757892) Offer to start libvirtd after install (bz 791152) Fix crash when deleting storage volumes (bz 805950) Show serial device PTY path again (bz 811760) Fix possible crash when rebooting fails (bz 813119) Offer to discard state if restore fails (bz 837236) --- .gitignore | 1 + sources | 2 +- virt-manager-conn-hang-app.patch | 121 ------------------ ...manager-console-shortcut-explanation.patch | 22 ---- virt-manager-create-reshow.patch | 24 ---- virt-manager-fix-listen-address.patch | 53 -------- virt-manager-fix-spice-default.patch | 25 ---- virt-manager-remote-error-reporting.patch | 101 --------------- virt-manager-vdi-format.patch | 22 ---- virt-manager-vnc-grab-recursion.patch | 23 ---- virt-manager.spec | 66 +++++----- 11 files changed, 32 insertions(+), 428 deletions(-) delete mode 100644 virt-manager-conn-hang-app.patch delete mode 100644 virt-manager-console-shortcut-explanation.patch delete mode 100644 virt-manager-create-reshow.patch delete mode 100644 virt-manager-fix-listen-address.patch delete mode 100644 virt-manager-fix-spice-default.patch delete mode 100644 virt-manager-remote-error-reporting.patch delete mode 100644 virt-manager-vdi-format.patch delete mode 100644 virt-manager-vnc-grab-recursion.patch diff --git a/.gitignore b/.gitignore index a41a353..7d71edc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ virt-manager-0.8.4.tar.gz /virt-manager-0.8.7.tar.gz /virt-manager-0.9.0.tar.gz /virt-manager-0.9.1.tar.gz +/virt-manager-0.9.3.tar.gz diff --git a/sources b/sources index 593e18e..e806b20 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cfee07b277e315b16d5180cfab5f8307 virt-manager-0.9.1.tar.gz +4c03f1628c76a891f45c0375bf5590da virt-manager-0.9.3.tar.gz diff --git a/virt-manager-conn-hang-app.patch b/virt-manager-conn-hang-app.patch deleted file mode 100644 index 7c781d0..0000000 --- a/virt-manager-conn-hang-app.patch +++ /dev/null @@ -1,121 +0,0 @@ -commit 13dd371e4840b8dca70508477cfc6820ac5d9a71 -Author: Cole Robinson -Date: Wed Feb 8 14:15:15 2012 -0500 - - Don't let media polling block app if a connection goes down - - If we unplug a remote machine we are connected to, doing the media - timeout with a gobject timeout means running it in the main thread, - which if it's blocking on the remote connection will freeze the whole - app. - -diff --git a/src/virtManager/connection.py b/src/virtManager/connection.py -index 15c1d5e..d649c44 100644 ---- a/src/virtManager/connection.py -+++ b/src/virtManager/connection.py -@@ -1583,6 +1583,9 @@ class vmmConnection(vmmGObject): - "connection doesn't seem to have dropped. " - "Ignoring.") - -+ for dev in self.mediadevs.values(): -+ dev.tick() -+ - if not noStatsUpdate: - self._recalculate_stats(now, updateVMs) - -diff --git a/src/virtManager/mediadev.py b/src/virtManager/mediadev.py -index 3731599..a046d9e 100644 ---- a/src/virtManager/mediadev.py -+++ b/src/virtManager/mediadev.py -@@ -19,6 +19,7 @@ - # - - import logging -+import time - - import virtinst - -@@ -49,7 +50,7 @@ class vmmMediaDevice(vmmGObject): - - obj = vmmMediaDevice(path, key, has_media, media_label, media_key, - dev, drvtype) -- obj.enable_poll_for_media() -+ obj.do_poll = True - - return obj - -@@ -65,7 +66,8 @@ class vmmMediaDevice(vmmGObject): - self.media_type = media_type - - self.nodedev_obj = nodedev_obj -- self.poll_signal = None -+ self.do_poll = False -+ self.last_tick = 0 - - def _cleanup(self): - pass -@@ -130,50 +132,38 @@ class vmmMediaDevice(vmmGObject): - ######################################### - # Nodedev API polling for media updates # - ######################################### -- def enable_poll_for_media(self): -- if self.poll_signal: -- return -- -- self.poll_signal = self.safe_timeout_add(MEDIA_TIMEOUT * 1000, -- self._poll_for_media) -- self.add_gobject_timeout(self.poll_signal) -- -- def disable_poll_for_media(self): -- self.remove_gobject_timeout(self.poll_signal) -- self.poll_signal = None -- -- def _poll_for_media(self): -- if not self.poll_signal: -- return False - -+ def tick(self): - if not self.nodedev_obj: -- return False -+ return - - if not self.nodedev_obj.conn.is_active(): -- return False -+ return -+ -+ if (time.time() - self.last_tick) < MEDIA_TIMEOUT: -+ return -+ self.last_tick = time.time() - - try: - self.nodedev_obj.refresh_xml() - xml = self.nodedev_obj.get_xml() - except: - # Assume the device was removed -- return False -+ return - - try: - vobj = virtinst.NodeDeviceParser.parse(xml) - has_media = vobj.media_available - except: - logging.exception("Node device CDROM polling failed") -- return False -+ return -+ -+ if has_media == self.has_media(): -+ return - -- if has_media != self.has_media(): -- self.set_media(has_media, None, None) -- if has_media: -- self.emit("media-added") -- else: -- self.emit("media-removed") -+ self.set_media(has_media, None, None) -+ self.idle_emit(has_media and "media-added" or "media-removed") - -- return True - - vmmGObject.type_register(vmmMediaDevice) - vmmMediaDevice.signal_new(vmmMediaDevice, "media-added", []) diff --git a/virt-manager-console-shortcut-explanation.patch b/virt-manager-console-shortcut-explanation.patch deleted file mode 100644 index d94aa18..0000000 --- a/virt-manager-console-shortcut-explanation.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -rup virt-manager-0.9.1/src/vmm-preferences.glade new/src/vmm-preferences.glade ---- virt-manager-0.9.1/src/vmm-preferences.glade 2012-01-27 09:38:01.000000000 -0500 -+++ new/src/vmm-preferences.glade 2012-02-13 19:05:22.890465706 -0500 -@@ -398,8 +398,8 @@ Always - - - True -- Force console menu accelerators while the console is active. Enabling this may overwrite keyboard interaction with the guest. -- Force console keyboard shortcuts: -+ When the guest graphical console has keyboard focus, do not disable shortcuts for console window menus (Alt+F -> File, etc.) Normally these are disabled to ensure that typing in the guest does not accidentally perform an operation in virt-manager's console window. -+ Don't disable console shortcuts: - - - False -@@ -412,6 +412,7 @@ Always - True - False - True -+ When the guest graphical console has keyboard focus, do not disable shortcuts for console window menus (Alt+F -> File, etc.) Normally these are disabled to ensure that typing in the guest does not accidentally perform an operation in virt-manager's console window. - - - diff --git a/virt-manager-create-reshow.patch b/virt-manager-create-reshow.patch deleted file mode 100644 index 7cb3fb6..0000000 --- a/virt-manager-create-reshow.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit f12f4ea1980e68a12129922f456f9275ee897f65 -Author: Cole Robinson -Date: Mon Feb 13 16:19:34 2012 -0500 - - create: reshow shouldn't overwrite values in visible dialog - -diff --git a/src/virtManager/create.py b/src/virtManager/create.py -index 56d4e27..4d02922 100644 ---- a/src/virtManager/create.py -+++ b/src/virtManager/create.py -@@ -169,9 +169,11 @@ class vmmCreate(vmmGObjectUI): - - def show(self, parent, uri=None): - logging.debug("Showing new vm wizard") -- self.reset_state(uri) - -- self.topwin.set_transient_for(parent) -+ if not self.is_visible(): -+ self.reset_state(uri) -+ self.topwin.set_transient_for(parent) -+ - self.topwin.present() - - def close(self, ignore1=None, ignore2=None): diff --git a/virt-manager-fix-listen-address.patch b/virt-manager-fix-listen-address.patch deleted file mode 100644 index 4c781a9..0000000 --- a/virt-manager-fix-listen-address.patch +++ /dev/null @@ -1,53 +0,0 @@ -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: diff --git a/virt-manager-fix-spice-default.patch b/virt-manager-fix-spice-default.patch deleted file mode 100644 index b115667..0000000 --- a/virt-manager-fix-spice-default.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit 45119785c7efbaa1defc3fffd05cb41e39992271 -Author: Cole Robinson -Date: Thu Apr 5 13:28:39 2012 -0400 - - schemas: Fix key for default graphics type - - What we installed didn't match what the app was checking and setting. - Have it match the app key so we don't overwrite users who have changed the - default via the prefs dialog. - -diff --git a/src/virt-manager.schemas.in b/src/virt-manager.schemas.in -index dfcd7ba..8154534 100644 ---- a/src/virt-manager.schemas.in -+++ b/src/virt-manager.schemas.in -@@ -196,8 +196,8 @@ - - - -- /schemas/apps/::PACKAGE::/new-vm/graphics-type -- /apps/::PACKAGE::/new-vm/graphics-type -+ /schemas/apps/::PACKAGE::/new-vm/graphics_type -+ /apps/::PACKAGE::/new-vm/graphics_type - ::PACKAGE:: - string - ::DEFAULT_GRAPHICS:: diff --git a/virt-manager-remote-error-reporting.patch b/virt-manager-remote-error-reporting.patch deleted file mode 100644 index da481f9..0000000 --- a/virt-manager-remote-error-reporting.patch +++ /dev/null @@ -1,101 +0,0 @@ -commit 54d007b2875a887b1579604e45b122dde286b9be -Author: Cole Robinson -Date: Thu Feb 2 16:45:18 2012 -0500 - - manager: Fix error reporting when can't connect remotely - - Also rejigger the error building again to be more useful and - less scary in cases where we are pretty confident we know what the - problem is. - -diff --git a/src/virtManager/manager.py b/src/virtManager/manager.py -index 2e8a679..a4b2df5 100644 ---- a/src/virtManager/manager.py -+++ b/src/virtManager/manager.py -@@ -646,42 +646,55 @@ class vmmManager(vmmGObjectUI): - conn.open() - return True - -- def _connect_error(self, conn, shortmsg, tb, warnconsole): -- shortmsg = shortmsg.strip(" \n") -+ def _connect_error(self, conn, errmsg, tb, warnconsole): -+ errmsg = errmsg.strip(" \n") - tb = tb.strip(" \n") -- msg = _("Unable to connect to libvirt:\n\n%s\n\n") % shortmsg -+ hint = "" -+ show_errmsg = True -+ -+ if conn.is_remote(): -+ logging.debug(conn.get_transport()) -+ if re.search(r"nc: .* -- 'U'", tb): -+ hint += _("The remote host requires a version of netcat/nc\n" -+ "which supports the -U option.") -+ show_errmsg = False -+ elif conn.get_transport()[0] == "ssh" and re.search(r"ssh-askpass", tb): -+ hint += _("You need to install openssh-askpass or similar\n" -+ "to connect to this host.") -+ show_errmsg = False -+ else: -+ hint += _("Verify that the 'libvirtd' daemon is running\n" -+ "on the remote host.") - -- if conn.is_xen() and not conn.is_remote(): -- msg += _("Verify that:\n" -- " - A Xen host kernel was booted\n" -- " - The Xen service has been started\n") -- msg = msg.strip("\n") -- details = "%s\n\n%s" % (msg, tb) -+ elif conn.is_xen(): -+ hint += _("Verify that:\n" -+ " - A Xen host kernel was booted\n" -+ " - The Xen service has been started") - - else: -- hints = [] -- if conn.is_remote() and re.search(r"nc: .* -- 'U'", details): -- hints.append( -- _("\n - The remote netcat understands the '-U' option")) -- - if warnconsole: -- msg += _("Could not detect a local session: if you are \n" -- "running virt-manager over ssh -X or VNC, you \n" -- "may not be able to connect to libvirt as a \n" -- "regular user. Try running as root.\n\n") -- else: -- msg += _("Verify that:\n" + -- " - The 'libvirtd' daemon has been started") -- for hint in hints: -- msg += hint -- -- msg = msg.strip("\n") -- details = (("%s\n\n" % msg) + -- (_("Libvirt URI is: %s\n\n") % conn.get_uri()) + -- tb) -- -- self.err.show_err(msg, details, -- title=_("Virtual Machine Manager Connection Failure")) -+ hint += _("Could not detect a local session: if you are \n" -+ "running virt-manager over ssh -X or VNC, you \n" -+ "may not be able to connect to libvirt as a \n" -+ "regular user. Try running as root.") -+ show_errmsg = False -+ elif re.search(r"libvirt-sock", tb): -+ hint += _("Verify that the 'libvirtd' daemon is running.") -+ show_errmsg = False -+ -+ msg = _("Unable to connect to libvirt.") -+ if show_errmsg: -+ msg += "\n\n%s" % errmsg -+ if hint: -+ msg += "\n\n%s" % hint -+ -+ msg = msg.strip("\n") -+ details = msg -+ details += "\n\n" -+ details += "Libvirt URI is: %s\n\n" % conn.get_uri() -+ details += tb -+ -+ self.err.show_err(msg, details, title=_("Virtual Machine Manager Connection Failure")) - - - #################################### diff --git a/virt-manager-vdi-format.patch b/virt-manager-vdi-format.patch deleted file mode 100644 index 3f571e1..0000000 --- a/virt-manager-vdi-format.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 265e04205e4766f459d4ced516dbd784cf2ca57f -Author: Cole Robinson -Date: Tue Feb 7 17:13:59 2012 -0500 - - Add VDI to disk format list - - People actually distribute images in that format: - - https://bugzilla.redhat.com/show_bug.cgi?id=761300 - -diff --git a/src/virtManager/uihelpers.py b/src/virtManager/uihelpers.py -index c274592..3ba4a71 100644 ---- a/src/virtManager/uihelpers.py -+++ b/src/virtManager/uihelpers.py -@@ -397,6 +397,7 @@ def build_storage_format_combo(vm, combo): - formats = ["raw", "qcow2"] - if vm.rhel6_defaults(): - formats.append("vmdk") -+ formats.append("vdi") - - for m in formats: - dev_model.append([m]) diff --git a/virt-manager-vnc-grab-recursion.patch b/virt-manager-vnc-grab-recursion.patch deleted file mode 100644 index 724a444..0000000 --- a/virt-manager-vnc-grab-recursion.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit c47fc5454039a9e7093f179c1e06ffc576dc1ad3 -Author: Cole Robinson -Date: Mon Feb 6 17:57:14 2012 -0500 - - vnc: Fix accidental recursion we reporting grab keys - -diff --git a/src/virtManager/console.py b/src/virtManager/console.py -index 3b39a6c..13fc755 100644 ---- a/src/virtManager/console.py -+++ b/src/virtManager/console.py -@@ -387,12 +387,6 @@ class VNCViewer(Viewer): - def open_fd(self, fd): - self.display.open_fd(fd) - -- def get_grab_keys(self): -- keystr = self.get_grab_keys() -- if not keystr: -- keystr = "Control_L+Alt_L" -- return keystr -- - def set_credential_username(self, cred): - self.display.set_credential(gtkvnc.CREDENTIAL_USERNAME, cred) - diff --git a/virt-manager.spec b/virt-manager.spec index 85db610..c33f477 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -1,33 +1,35 @@ # -*- rpm-spec -*- %define _package virt-manager -%define _version 0.9.1 -%define _release 4 -%define virtinst_version 0.600.1 +%define _version 0.9.3 +%define _release 1 +%define virtinst_version 0.600.2 %define qemu_user "qemu" %define preferred_distros "fedora,rhel" %define kvm_packages "qemu-system-x86" %define libvirt_packages "libvirt" +%define askpass_package "openssh-askpass" %define disable_unsupported_rhel 0 %define with_guestfs 0 %define with_tui 1 %define with_spice 1 -%define default_graphics "" -%if %{with_spice} && %{default_graphics} == "" +# End local config +# Default option handling + +%if %{with_spice} %define default_graphics "spice" %endif -# End local config # This macro is used for the continuous automated builds. It just # allows an extra fragment based on the timestamp to be appended # to the release. This distinguishes automated builds, from formal # Fedora RPM builds -%define _extra_release %{?dist:%{dist}}%{!?dist:%{?extra_release:%{extra_release}}} +%define _extra_release %{?dist:%{dist}}%{?extra_release:%{extra_release}} Name: %{_package} Version: %{_version} @@ -39,22 +41,6 @@ Group: Applications/Emulators License: GPLv2+ URL: http://virt-manager.org/ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz -# Fix error reporting for failed remote connections (bz 787011) -Patch1: %{name}-remote-error-reporting.patch -# Fix setting window title when VNC mouse is grabbed (bz 788443) -Patch2: %{name}-vnc-grab-recursion.patch -# Advertise VDI format in disk details (bz 761300) -Patch3: %{name}-vdi-format.patch -# Don't let an unavailable host hang the app (bz 766769) -Patch4: %{name}-conn-hang-app.patch -# Don't overwrite existing create dialog when reshowing (bz 754152) -Patch5: %{name}-create-reshow.patch -# Improve tooltip for 'force console shortcuts' (bz 788448) -Patch6: %{name}-console-shortcut-explanation.patch -# Actually make spice the default (bz 757874) -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) BuildArch: noarch @@ -82,8 +68,6 @@ Requires: gnome-python2-gnomekeyring >= 2.15.4 Requires: libxml2-python >= 2.6.23 # Absolutely require this version or later Requires: python-virtinst >= %{virtinst_version} -# Required for loading the glade UI -Requires: pygtk2-libglade # Earlier vte had broken python binding module Requires: vte >= 0.12.2 # For online help @@ -115,7 +99,6 @@ Requires(preun): GConf2 Requires(post): desktop-file-utils Requires(postun): desktop-file-utils - %description Virtual Machine Manager provides a graphical tool for administering virtual machines for KVM, Xen, and QEmu. Start, stop, add or remove virtual devices, @@ -156,14 +139,6 @@ Common files used by the different Virtual Machine Manager interfaces. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 %build %if %{qemu_user} @@ -182,11 +157,15 @@ Common files used by the different Virtual Machine Manager interfaces. %define _libvirt_packages --with-libvirt-package-names=%{libvirt_packages} %endif +%if %{askpass_package} +%define _askpass_package --with-askpass-package=%{askpass_package} +%endif + %if %{disable_unsupported_rhel} %define _disable_unsupported_rhel --disable-unsupported-rhel-options %endif -%if %{default_graphics} +%if 0%{?default_graphics:1} %define _default_graphics --with-default-graphics=%{default_graphics} %endif @@ -200,6 +179,7 @@ Common files used by the different Virtual Machine Manager interfaces. %{?_qemu_user} \ %{?_kvm_packages} \ %{?_libvirt_packages} \ + %{?_askpass_package} \ %{?_preferred_distros} \ %{?_disable_unsupported_rhel} \ %{?_default_graphics} @@ -254,7 +234,7 @@ update-desktop-database -q %{_datadir}/applications %{_datadir}/%{name}/virtManager/*.py* %endif -%{_datadir}/%{name}/*.glade +%{_datadir}/%{name}/*.ui %{_datadir}/%{name}/%{name}.py* %{_datadir}/%{name}/icons @@ -281,6 +261,20 @@ update-desktop-database -q %{_datadir}/applications %endif %changelog +* Mon Jul 09 2012 Cole Robinson - 0.9.3-1 +- Rebased to version 0.9.3 +- Convert to gtkbuilder: UI can now be editted with modern glade tool +- virt-manager no longer runs on RHEL5, but can manage a remote RHEL5 + host +- Option to configure spapr net and disk devices for pseries (Li Zhang) +- Offer to install openssh-askpass if we need it (bz 754484) +- Don't leave defunct SSH processes around (bz 757892) +- Offer to start libvirtd after install (bz 791152) +- Fix crash when deleting storage volumes (bz 805950) +- Show serial device PTY path again (bz 811760) +- Fix possible crash when rebooting fails (bz 813119) +- Offer to discard state if restore fails (bz 837236) + * Wed Jun 06 2012 Cole Robinson - 0.9.1-4 - Fix connecting to console with specific listen address - Fix regression that dropped spice dependency (bz 819270)