From d0f9c30916148ed6bcb2a34add3f3bb77b91eda8 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Mon, 24 Mar 2014 15:05:15 +0000 Subject: [PATCH] =?UTF-8?q?-=20Update=20to=20virt-manager=20version=201.0.?= =?UTF-8?q?1=20=20=20virt-manager-1.0.1.tar.bz2=20=20=20*=20virt-install/v?= =?UTF-8?q?irt-xml:=20New=20--memorybacking=20option=20(Chen=20Hanxiao)=20?= =?UTF-8?q?=20=20*=20virt-install/virt-xml:=20New=20--memtune=20option=20(?= =?UTF-8?q?Chen=20Hanxiao)=20=20=20*=20virt-manager:=20UI=20for=20LXC=20=20(Chen=20Hanxiao)=20=20=20*=20virt-manager:=20gsettings?= =?UTF-8?q?=20key=20to=20disable=20keygrab=20(Kj=C3=B6=20Hansi=20Glaz)=20?= =?UTF-8?q?=20=20*=20virt-manager:=20Show=20domain=20state=20reason=20in?= =?UTF-8?q?=20the=20UI=20(Giuseppe=20Scrivano)=20=20=20*=20Fix=20a=20numbe?= =?UTF-8?q?r=20of=20bugs=20found=20since=20the=201.0.0=20release=20-=20Dro?= =?UTF-8?q?pped=2035=20timestamp=20named=20patches=20now=20contained=20in?= =?UTF-8?q?=20new=20tarball?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - bnc#869165 - virt-manager: add connection - missing avahi virt-manager.spec - bnc#863821 - Xen unable to boot paravirtualized VMs installed with btrfs virtinst-pvgrub2-bootloader.patch - Switch out redhat defaults for suse defaults virtman-stable-os-support.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=155 --- 53022930-lxc-connection-fix.patch | 19 -- 530229cb-non-x86-kvm-creation-fix.patch | 20 -- ...nt-alter-caps-machine-list-on-create.patch | 19 -- 53030858-generate_target-fix.patch | 58 ---- ...-not-customizing-generate_target-fix.patch | 40 --- 53047532-dont-get-duplicated-disks.patch | 21 -- 53047595-calculate-disk-bus-properly.patch | 22 -- 530987c4-disk-bus-calculation-fix.patch | 63 ---- ...pt-empty-path-on-virDomainBlockStats.patch | 39 --- 530cd6ab-log-broken-xml.patch | 34 --- 530cf4de-allow-numbered-object-names.patch | 23 -- ...close-connection-on-tick-failure-fix.patch | 65 ---- 530f80f5-handle-missing-storage-volumes.patch | 34 --- ...9-console-fix-unsetting-resize-guest.patch | 20 -- 5310e3ac-set-show_arrow-to-true.patch | 18 -- ...s-toggle-visibilities-on-page-change.patch | 25 -- ...s-toggle-visibilities-on-page-change.patch | 23 -- ...e52d-fix-setting-default-window-size.patch | 23 -- 5318a2cd-cpu-model-fallback-failure-fix.patch | 30 -- 5318a626-adding-filesystem-device-fix.patch | 22 -- 5318aa88-invalid-libvirt-volume-XML.patch | 32 -- 5318b486-virtinstall-location-iso-fix.patch | 287 ------------------ 5319db07-customize-add-disk-fix.patch | 28 -- 531db6a7-new-volume-tooltip-logic.patch | 42 --- ...s-when-deregistering-events-on-close.patch | 48 --- 531dd0ca-lxc-define-private-network.patch | 70 ----- 53207f40-invalidate-cached-caps.patch | 22 -- ...-fix-adding-empty-cdrom-floppy-drive.patch | 24 -- ...rop-cpu_map-parsing-of-arch-features.patch | 102 ------- ...irtinst-drop-parsing-of-cpu-features.patch | 111 ------- ...irtinst-use-libvirt-getCPUModelNames.patch | 176 ----------- ...elect_all-members-before-clear-model.patch | 63 ---- ...ction-immediately-if-detection-fails.patch | 93 ------ 532a3213-fix-url-autodetect-timeout.patch | 24 -- ...3-pass-correct-connection-to-install.patch | 19 -- virt-manager-1.0.0.tar.bz2 | 3 - virt-manager-1.0.1.tar.bz2 | 3 + virt-manager.changes | 24 ++ virt-manager.spec | 78 +---- virtinst-modify-gui-defaults.patch | 16 +- virtinst-pvgrub2-bootloader.patch | 31 ++ virtman-autorestart.patch | 28 +- virtman-autoyast-support.patch | 18 +- virtman-cdrom.patch | 8 +- virtman-default-guest-from-host-os.patch | 10 +- virtman-default-to-xen-pv.patch | 16 +- virtman-device-flags.patch | 36 +-- virtman-eepro100.patch | 8 +- virtman-keycombo.patch | 8 +- virtman-qed.patch | 8 +- virtman-show-suse-install-repos.patch | 14 +- virtman-stable-os-support.patch | 14 + virtman-update-backend.patch | 8 +- 53 files changed, 166 insertions(+), 1924 deletions(-) delete mode 100644 53022930-lxc-connection-fix.patch delete mode 100644 530229cb-non-x86-kvm-creation-fix.patch delete mode 100644 53023f56-dont-alter-caps-machine-list-on-create.patch delete mode 100644 53030858-generate_target-fix.patch delete mode 100644 53037798-not-customizing-generate_target-fix.patch delete mode 100644 53047532-dont-get-duplicated-disks.patch delete mode 100644 53047595-calculate-disk-bus-properly.patch delete mode 100644 530987c4-disk-bus-calculation-fix.patch delete mode 100644 530c021c-attempt-empty-path-on-virDomainBlockStats.patch delete mode 100644 530cd6ab-log-broken-xml.patch delete mode 100644 530cf4de-allow-numbered-object-names.patch delete mode 100644 530cfa5e-close-connection-on-tick-failure-fix.patch delete mode 100644 530f80f5-handle-missing-storage-volumes.patch delete mode 100644 5310bd89-console-fix-unsetting-resize-guest.patch delete mode 100644 5310e3ac-set-show_arrow-to-true.patch delete mode 100644 5310e3ac-vmmConsolePages-toggle-visibilities-on-page-change.patch delete mode 100644 5310e3ac-vmmDetails-toggle-visibilities-on-page-change.patch delete mode 100644 5310e52d-fix-setting-default-window-size.patch delete mode 100644 5318a2cd-cpu-model-fallback-failure-fix.patch delete mode 100644 5318a626-adding-filesystem-device-fix.patch delete mode 100644 5318aa88-invalid-libvirt-volume-XML.patch delete mode 100644 5318b486-virtinstall-location-iso-fix.patch delete mode 100644 5319db07-customize-add-disk-fix.patch delete mode 100644 531db6a7-new-volume-tooltip-logic.patch delete mode 100644 531dbfa7-handle-errors-when-deregistering-events-on-close.patch delete mode 100644 531dd0ca-lxc-define-private-network.patch delete mode 100644 53207f40-invalidate-cached-caps.patch delete mode 100644 5320c976-fix-adding-empty-cdrom-floppy-drive.patch delete mode 100644 5321d3cd-virtinst-drop-cpu_map-parsing-of-arch-features.patch delete mode 100644 5321d3d0-virtinst-drop-parsing-of-cpu-features.patch delete mode 100644 5321f256-virtinst-use-libvirt-getCPUModelNames.patch delete mode 100644 532255b4-unselect_all-members-before-clear-model.patch delete mode 100644 532a3213-exit-URL-detection-immediately-if-detection-fails.patch delete mode 100644 532a3213-fix-url-autodetect-timeout.patch delete mode 100644 532a3213-pass-correct-connection-to-install.patch delete mode 100644 virt-manager-1.0.0.tar.bz2 create mode 100644 virt-manager-1.0.1.tar.bz2 create mode 100644 virtinst-pvgrub2-bootloader.patch create mode 100644 virtman-stable-os-support.patch diff --git a/53022930-lxc-connection-fix.patch b/53022930-lxc-connection-fix.patch deleted file mode 100644 index b1c7ba75..00000000 --- a/53022930-lxc-connection-fix.patch +++ /dev/null @@ -1,19 +0,0 @@ -Subject: connect: Fix connecting to lxc:/// URI -From: Cole Robinson crobinso@redhat.com Mon Feb 17 10:22:24 2014 -0500 -Date: Mon Feb 17 10:22:24 2014 -0500: -Git: 0169042c1ee45fed779fc106476fc98265236651 - - -diff --git a/virtManager/connect.py b/virtManager/connect.py -index 7cd4da7..1247d75 100644 ---- a/virtManager/connect.py -+++ b/virtManager/connect.py -@@ -364,7 +364,7 @@ class vmmConnect(vmmGObjectUI): - hvstr = "" - if hv == HV_XEN: - hvstr = "xen" -- elif hv == HV_QEMU or HV_QEMU_SESSION: -+ elif hv == HV_QEMU or hv == HV_QEMU_SESSION: - hvstr = "qemu" - else: - hvstr = "lxc" diff --git a/530229cb-non-x86-kvm-creation-fix.patch b/530229cb-non-x86-kvm-creation-fix.patch deleted file mode 100644 index ce33df66..00000000 --- a/530229cb-non-x86-kvm-creation-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -Subject: create: Fix non-x86 qemu/kvm guest creation -From: Cole Robinson crobinso@redhat.com Mon Feb 17 10:24:41 2014 -0500 -Date: Mon Feb 17 10:24:59 2014 -0500: -Git: a37b200f69347922800d58342968307b74ec9ded - - -diff --git a/virtManager/create.py b/virtManager/create.py -index d8e68c3..f1c57b7 100644 ---- a/virtManager/create.py -+++ b/virtManager/create.py -@@ -1376,7 +1376,8 @@ class vmmCreate(vmmGObjectUI): - - guest.add_default_devices() - -- if self.conn.check_support(self.conn.SUPPORT_CONN_PM_DISABLE): -+ if (guest.os.is_x86() and -+ self.conn.check_support(self.conn.SUPPORT_CONN_PM_DISABLE)): - guest.pm.suspend_to_mem = False - guest.pm.suspend_to_disk = False - diff --git a/53023f56-dont-alter-caps-machine-list-on-create.patch b/53023f56-dont-alter-caps-machine-list-on-create.patch deleted file mode 100644 index de6c716d..00000000 --- a/53023f56-dont-alter-caps-machine-list-on-create.patch +++ /dev/null @@ -1,19 +0,0 @@ -Subject: create: Don't alter caps machine list -From: Cole Robinson crobinso@redhat.com Mon Feb 17 11:56:54 2014 -0500 -Date: Mon Feb 17 11:56:54 2014 -0500: -Git: 7c516b382cbb94c2ecafb07baedae19b8d1a2b67 - - -diff --git a/virtManager/create.py b/virtManager/create.py -index 2af62c4..b4b1dfe 100644 ---- a/virtManager/create.py -+++ b/virtManager/create.py -@@ -689,7 +689,7 @@ class vmmCreate(vmmGObjectUI): - model = lst.get_model() - model.clear() - -- machines = self.capsdomain.machines -+ machines = self.capsdomain.machines[:] - if self.capsguest.arch in ["i686", "x86_64"]: - machines = [] - machines.sort() diff --git a/53030858-generate_target-fix.patch b/53030858-generate_target-fix.patch deleted file mode 100644 index cbdeed2a..00000000 --- a/53030858-generate_target-fix.patch +++ /dev/null @@ -1,58 +0,0 @@ -Subject: Fix generate_target once more -From: Martin Kletzander mkletzan@redhat.com Mon Feb 17 16:41:02 2014 +0100 -Date: Tue Feb 18 08:14:32 2014 +0100: -Git: 55d5b35e504f1e6c21fbd24f5b351ed4ab4c603f - -Passing a zero to the generate_target() function's as pref_ctrl -parameter makes the 'if pref_ctrl' conditions obviously false. Also -the range created was starting from 0 and not from 1. Apart from -fixing this, also fix tests so they actually test something this time. - -Signed-off-by: Martin Kletzander - -diff --git a/tests/xmlconfig.py b/tests/xmlconfig.py -index 9db51cb..5d08ca0 100644 ---- a/tests/xmlconfig.py -+++ b/tests/xmlconfig.py -@@ -1045,7 +1045,8 @@ class TestXMLConfig(unittest.TestCase): - self.assertEquals("hdc", disk.generate_target(["hdb", "sda"])) - self.assertEquals("hdb", disk.generate_target(["hda", "hdd"])) - -- disk.bus = "scsi" -+ disk.bus = "virtio-scsi" -+ self.assertEquals("sdb", disk.generate_target(["sda", "sdg", "sdi"], 0)) - self.assertEquals("sdh", disk.generate_target(["sda", "sdg"], 1)) - - def testFedoraTreeinfo(self): -diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py -index 28c55ba..6e7c6c8 100644 ---- a/virtinst/devicedisk.py -+++ b/virtinst/devicedisk.py -@@ -925,14 +925,14 @@ class VirtualDisk(VirtualDevice): - def get_target(): - first_found = None - -- ran = range(1, maxnode + 1) -- if pref_ctrl: -+ ran = range(maxnode) -+ if pref_ctrl is not None: - # We assume narrow SCSI bus and libvirt assigning 7 -- # (0-6, 7-13, etc.) devices per controller -+ # (1-7, 8-14, etc.) devices per controller - ran = range(pref_ctrl * 7, (pref_ctrl + 1) * 7) - - for i in ran: -- gen_t = prefix + self.num_to_target(i) -+ gen_t = prefix + self.num_to_target(i + 1) - if gen_t in skip_targets: - skip_targets.remove(gen_t) - continue -@@ -948,7 +948,7 @@ class VirtualDisk(VirtualDevice): - self.target = ret - return ret - -- if pref_ctrl: -+ if pref_ctrl is not None: - # This basically means that we either chose full - # controller or didn't add any - raise ValueError(_("Controller number %d for disk of type %s has " diff --git a/53037798-not-customizing-generate_target-fix.patch b/53037798-not-customizing-generate_target-fix.patch deleted file mode 100644 index 9fce73cf..00000000 --- a/53037798-not-customizing-generate_target-fix.patch +++ /dev/null @@ -1,40 +0,0 @@ -Subject: addhardware: generate target only if not customizing -From: Martin Kletzander mkletzan@redhat.com Tue Feb 18 11:38:56 2014 +0100 -Date: Tue Feb 18 16:09:12 2014 +0100: -Git: bc5d84b0407257b1e257e7cabaf619430a7e8f83 - -Commit 078e1a4d0503d98884b5b61df83021941bf32e8d changed the fact that -disk target was generated only when adding new disk, not when current -disk is being customized, so fix that back. - -Signed-off-by: Martin Kletzander - -diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py -index ecb5fc8..b1f6251 100644 ---- a/virtManager/addhardware.py -+++ b/virtManager/addhardware.py -@@ -1471,20 +1471,22 @@ class vmmAddHardware(vmmGObjectUI): - return disk - - try: -+ used = [] - disk.bus = bus - if cache: - disk.driver_cache = cache - - # Generate target - if not self.is_customize_dialog: -- used = [] - disks = (self.vm.get_disk_devices() + - self.vm.get_disk_devices(inactive=True)) - for d in disks: - used.append(d.target) - - prefer_ctrl = self._set_disk_controller(disk, controller_model, disks) -- disk.generate_target(used, prefer_ctrl) -+ -+ if not self.is_customize_dialog: -+ disk.generate_target(used, prefer_ctrl) - - except Exception, e: - return self.err.val_err(_("Storage parameter error."), e) diff --git a/53047532-dont-get-duplicated-disks.patch b/53047532-dont-get-duplicated-disks.patch deleted file mode 100644 index 2bac54f3..00000000 --- a/53047532-dont-get-duplicated-disks.patch +++ /dev/null @@ -1,21 +0,0 @@ -Subject: addhardware: don't get duplicated disks -From: Martin Kletzander mkletzan@redhat.com Wed Feb 19 10:11:14 2014 +0100 -Date: Wed Feb 19 10:11:14 2014 +0100: -Git: 7c437f6a6f07c81bcf20cecece462c857d0b5848 - -Signed-off-by: Martin Kletzander - -diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py -index b446a9d..ed25c26 100644 ---- a/virtManager/addhardware.py -+++ b/virtManager/addhardware.py -@@ -1481,7 +1481,8 @@ class vmmAddHardware(vmmGObjectUI): - disks = (self.vm.get_disk_devices() + - self.vm.get_disk_devices(inactive=True)) - for d in disks: -- used.append(d.target) -+ if d.target not in used: -+ used.append(d.target) - - prefer_ctrl = self._set_disk_controller(disk, controller_model, disks) - diff --git a/53047595-calculate-disk-bus-properly.patch b/53047595-calculate-disk-bus-properly.patch deleted file mode 100644 index b4740235..00000000 --- a/53047595-calculate-disk-bus-properly.patch +++ /dev/null @@ -1,22 +0,0 @@ -Subject: disk: calculate the disk bus properly -From: Martin Kletzander mkletzan@redhat.com Wed Feb 19 10:12:46 2014 +0100 -Date: Wed Feb 19 10:12:53 2014 +0100: -Git: 466c2bcf9cb07f16690cb41684d67d0265d2d47e - -I forgot to amend this change when changing it the last time. - -Signed-off-by: Martin Kletzander - -diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py -index 6e7c6c8..9ebcc11 100644 ---- a/virtinst/devicedisk.py -+++ b/virtinst/devicedisk.py -@@ -484,7 +484,7 @@ class VirtualDisk(VirtualDevice): - # This case is here for 'xvda' - tgt = tgt[1:] - for i, c in enumerate(reversed(tgt[2:])): -- num += (ord(c) - ord('a') + 1) * (26 ** i) -+ num += (ord(c) - ord('a')) * (26 ** i) - return num - - diff --git a/530987c4-disk-bus-calculation-fix.patch b/530987c4-disk-bus-calculation-fix.patch deleted file mode 100644 index 8d33b276..00000000 --- a/530987c4-disk-bus-calculation-fix.patch +++ /dev/null @@ -1,63 +0,0 @@ -Subject: virtinst: fix an issue of disk bus caculation -From: Chen Hanxiao chenhanxiao@cn.fujitsu.com Sun Feb 23 13:31:48 2014 +0800 -Date: Sun Feb 23 13:31:48 2014 +0800: -Git: 0dceb24b3ba567aad3976fe3c6af524db9e1ac6d - -commit 466c2bcf9cb07f16690cb41684d67d0265d2d47e -will generate the same index for -'hda' and 'hdaa'. -Also break test cases. - -This patch will fix this. - -Signed-off-by: Chen Hanxiao - -diff --git a/tests/xmlconfig.py b/tests/xmlconfig.py -index 5d08ca0..022d278 100644 ---- a/tests/xmlconfig.py -+++ b/tests/xmlconfig.py -@@ -1027,15 +1027,15 @@ class TestXMLConfig(unittest.TestCase): - self.assertEquals("zz", VirtualDisk.num_to_target(27 * 26)) - self.assertEquals("aaa", VirtualDisk.num_to_target(27 * 26 + 1)) - -- self.assertEquals(VirtualDisk.target_to_num("hda"), 1) -- self.assertEquals(VirtualDisk.target_to_num("hdb"), 2) -- self.assertEquals(VirtualDisk.target_to_num("sdz"), 26) -- self.assertEquals(VirtualDisk.target_to_num("sdaa"), 27) -- self.assertEquals(VirtualDisk.target_to_num("vdab"), 28) -- self.assertEquals(VirtualDisk.target_to_num("vdaz"), 52) -- self.assertEquals(VirtualDisk.target_to_num("xvdba"), 53) -- self.assertEquals(VirtualDisk.target_to_num("xvdzz"), 27 * 26) -- self.assertEquals(VirtualDisk.target_to_num("xvdaaa"), 27 * 26 + 1) -+ self.assertEquals(VirtualDisk.target_to_num("hda"), 0) -+ self.assertEquals(VirtualDisk.target_to_num("hdb"), 1) -+ self.assertEquals(VirtualDisk.target_to_num("sdz"), 25) -+ self.assertEquals(VirtualDisk.target_to_num("sdaa"), 26) -+ self.assertEquals(VirtualDisk.target_to_num("vdab"), 27) -+ self.assertEquals(VirtualDisk.target_to_num("vdaz"), 51) -+ self.assertEquals(VirtualDisk.target_to_num("xvdba"), 52) -+ self.assertEquals(VirtualDisk.target_to_num("xvdzz"), 26 * (25 + 1) + 25) -+ self.assertEquals(VirtualDisk.target_to_num("xvdaaa"), 26 * 26 * 1 + 26 * 1 + 0) - - disk = virtinst.VirtualDisk(utils.get_conn()) - disk.bus = "ide" -diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py -index 9ebcc11..2d692f1 100644 ---- a/virtinst/devicedisk.py -+++ b/virtinst/devicedisk.py -@@ -480,11 +480,14 @@ class VirtualDisk(VirtualDevice): - Convert disk /dev number (like hda, hdb, hdaa, etc.) to an index - """ - num = 0 -+ k = 0 - if tgt[0] == 'x': - # This case is here for 'xvda' - tgt = tgt[1:] - for i, c in enumerate(reversed(tgt[2:])): -- num += (ord(c) - ord('a')) * (26 ** i) -+ if i != 0: -+ k = 1 -+ num += (ord(c) - ord('a') + k) * (26 ** i) - return num - - diff --git a/530c021c-attempt-empty-path-on-virDomainBlockStats.patch b/530c021c-attempt-empty-path-on-virDomainBlockStats.patch deleted file mode 100644 index 392e0518..00000000 --- a/530c021c-attempt-empty-path-on-virDomainBlockStats.patch +++ /dev/null @@ -1,39 +0,0 @@ -Subject: Attempt empty path on virDomainBlockStats -From: Thorsten Behrens tbehrens@suse.com Fri Feb 21 11:38:41 2014 +0100 -Date: Mon Feb 24 21:38:20 2014 -0500: -Git: b5c3fe1da5f67e0a83a3bc5c9358cbc779157354 - -libvirt for some backends yields summary domain stats for empty -disk path - which saves us the looping on our side. - -Index: virt-manager-1.0.0/virtManager/domain.py -=================================================================== ---- virt-manager-1.0.0.orig/virtManager/domain.py -+++ virt-manager-1.0.0/virtManager/domain.py -@@ -270,6 +270,7 @@ class vmmDomain(vmmLibvirtObject): - self._enable_disk_poll = False - self._stats_disk_supported = True - self._stats_disk_skip = [] -+ self._summary_disk_stats_skip = False - - self.inspection = vmmInspectionData() - -@@ -1769,6 +1770,18 @@ class vmmDomain(vmmLibvirtObject): - self._stats_disk_skip = [] - return rd, wr - -+ # Some drivers support this method for getting all usage at once -+ if not self._summary_disk_stats_skip: -+ try: -+ io = self._backend.blockStats('') -+ if io: -+ rd = io[1] -+ wr = io[3] -+ return rd, wr -+ except libvirt.libvirtError: -+ self._summary_disk_stats_skip = True -+ -+ # did not work, iterate over all disks - for disk in self.get_disk_devices(refresh_if_nec=False): - dev = disk.target - if not dev: diff --git a/530cd6ab-log-broken-xml.patch b/530cd6ab-log-broken-xml.patch deleted file mode 100644 index 49c267a3..00000000 --- a/530cd6ab-log-broken-xml.patch +++ /dev/null @@ -1,34 +0,0 @@ -Subject: xmlbuilder: Log broken XML if we can't parse it -From: Cole Robinson crobinso@redhat.com Tue Feb 25 12:45:15 2014 -0500 -Date: Tue Feb 25 12:45:15 2014 -0500: -Git: 87c2ff1a14f3a78648c8a17cfa72e83098763ec8 - -Related to https://bugzilla.redhat.com/show_bug.cgi?id=1066564 - -diff --git a/virtinst/xmlbuilder.py b/virtinst/xmlbuilder.py -index d46738c..328f6f2 100644 ---- a/virtinst/xmlbuilder.py -+++ b/virtinst/xmlbuilder.py -@@ -20,6 +20,7 @@ - # MA 02110-1301 USA. - - import copy -+import logging - import os - import re - -@@ -686,7 +686,13 @@ class _XMLState(object): - else: - if not xml: - xml = self.make_xml_stub() -- doc = libxml2.parseDoc(xml) -+ -+ try: -+ doc = libxml2.parseDoc(xml) -+ except: -+ logging.debug("Error parsing xml=\n%s", xml) -+ raise -+ - self.xml_root_doc = _DocCleanupWrapper(doc) - self.xml_node = doc.children - self.xml_node.virtinst_is_build = self.is_build diff --git a/530cf4de-allow-numbered-object-names.patch b/530cf4de-allow-numbered-object-names.patch deleted file mode 100644 index d5c9eb2f..00000000 --- a/530cf4de-allow-numbered-object-names.patch +++ /dev/null @@ -1,23 +0,0 @@ -Subject: Don't forbid object names that are only all numbers (bz 1067127) -From: Cole Robinson crobinso@redhat.com Tue Feb 25 14:54:06 2014 -0500 -Date: Tue Feb 25 14:54:06 2014 -0500: -Git: 3efbefe91a1ec23cbcf3d4f5a72a02fab87daa83 - -Just let libvirt error, since in the case of things like storage pools -this is totally legitimate. - -diff --git a/virtinst/util.py b/virtinst/util.py -index 31ccd38..2fe00d3 100644 ---- a/virtinst/util.py -+++ b/virtinst/util.py -@@ -140,10 +140,6 @@ def validate_uuid(val): - - - def validate_name(name_type, val): -- if re.match("^[0-9]+$", val): -- raise ValueError(_("%s name can not be only numeric characters") % -- name_type) -- - # Rather than try and match libvirt's regex, just forbid things we - # know don't work - forbid = [" "] diff --git a/530cfa5e-close-connection-on-tick-failure-fix.patch b/530cfa5e-close-connection-on-tick-failure-fix.patch deleted file mode 100644 index eefc539d..00000000 --- a/530cfa5e-close-connection-on-tick-failure-fix.patch +++ /dev/null @@ -1,65 +0,0 @@ -Subject: engine: Fix closing connection when tick() fails (bz 1069351) -From: Cole Robinson crobinso@redhat.com Tue Feb 25 15:17:34 2014 -0500 -Date: Tue Feb 25 15:17:34 2014 -0500: -Git: ce64d037bff56db994fedd065a9a34b8e827dda2 - - -diff --git a/virtManager/engine.py b/virtManager/engine.py -index cef3d20..0e5e15d 100644 ---- a/virtManager/engine.py -+++ b/virtManager/engine.py -@@ -344,30 +344,39 @@ class vmmEngine(vmmGObject): - return 1 - - def _tick_single_conn(self, conn, kwargs): -+ e = None - try: - conn.tick(**kwargs) - except KeyboardInterrupt: - raise -- except libvirt.libvirtError, e: -- from_remote = getattr(libvirt, "VIR_FROM_REMOTE", None) -- from_rpc = getattr(libvirt, "VIR_FROM_RPC", None) -- sys_error = getattr(libvirt, "VIR_ERR_SYSTEM_ERROR", None) -+ except Exception, e: -+ pass -+ -+ if e is None: -+ return - -+ from_remote = getattr(libvirt, "VIR_FROM_REMOTE", None) -+ from_rpc = getattr(libvirt, "VIR_FROM_RPC", None) -+ sys_error = getattr(libvirt, "VIR_ERR_SYSTEM_ERROR", None) -+ -+ dom = -1 -+ code = -1 -+ if isinstance(e, libvirt.libvirtError): - dom = e.get_error_domain() - code = e.get_error_code() - -- if (dom in [from_remote, from_rpc] and -- code in [sys_error]): -- logging.exception("Could not refresh connection %s", -- conn.get_uri()) -- logging.debug("Closing connection since libvirtd " -- "appears to have stopped") -- else: -- error_msg = _("Error polling connection '%s': %s") \ -- % (conn.get_uri(), e) -- self.idle_add(lambda: self.err.show_err(error_msg)) -+ if (dom in [from_remote, from_rpc] and -+ code in [sys_error]): -+ logging.exception("Could not refresh connection %s", -+ conn.get_uri()) -+ logging.debug("Closing connection since libvirtd " -+ "appears to have stopped") -+ else: -+ error_msg = _("Error polling connection '%s': %s") \ -+ % (conn.get_uri(), e) -+ self.idle_add(lambda: self.err.show_err(error_msg)) - -- self.idle_add(conn.close) -+ self.idle_add(conn.close) - - - def increment_window_counter(self, src): diff --git a/530f80f5-handle-missing-storage-volumes.patch b/530f80f5-handle-missing-storage-volumes.patch deleted file mode 100644 index b9db77e8..00000000 --- a/530f80f5-handle-missing-storage-volumes.patch +++ /dev/null @@ -1,34 +0,0 @@ -Subject: vmm connection: Handle missing storage volumes (bz 1070883) -From: Cole Robinson crobinso@redhat.com Thu Feb 27 13:16:21 2014 -0500 -Date: Thu Feb 27 13:16:21 2014 -0500: -Git: f67df117017e6de855a8c0e900e47fe920dfaa48 - -Similar to what was done in a808bd669293ac66047a716b2e84a5a64c99667b -for the virtinst connection wrapper. - -diff --git a/virtManager/connection.py b/virtManager/connection.py -index 6f6c838..96dfa1c 100644 ---- a/virtManager/connection.py -+++ b/virtManager/connection.py -@@ -172,10 +172,17 @@ class vmmConnection(vmmGObject): - self._backend.cb_fetch_all_pools = ( - lambda: [obj.get_xmlobj(refresh_if_nec=False) - for obj in self.pools.values()]) -- self._backend.cb_fetch_all_vols = ( -- lambda: [obj.get_xmlobj(refresh_if_nec=False) -- for pool in self.pools.values() -- for obj in pool.get_volumes(refresh=False).values()]) -+ -+ def fetch_all_vols(): -+ ret = [] -+ for pool in self.pools.values(): -+ for vol in pool.get_volumes(refresh=False).values(): -+ try: -+ ret.append(vol.get_xmlobj(refresh_if_nec=False)) -+ except libvirt.libvirtError, e: -+ logging.debug("Fetching volume XML failed: %s", e) -+ return ret -+ self._backend.cb_fetch_all_vols = fetch_all_vols - - def clear_cache(pools=False): - if not pools: diff --git a/5310bd89-console-fix-unsetting-resize-guest.patch b/5310bd89-console-fix-unsetting-resize-guest.patch deleted file mode 100644 index fbea7c5e..00000000 --- a/5310bd89-console-fix-unsetting-resize-guest.patch +++ /dev/null @@ -1,20 +0,0 @@ -Subject: console: Fix unsetting 'resize-guest' property from UI -From: Cole Robinson crobinso@redhat.com Fri Feb 28 11:46:05 2014 -0500 -Date: Fri Feb 28 11:47:05 2014 -0500: -Git: 4a2493f1e4bede671eac713081f61965f036d6ed - -Reported in the followup of bz 754559 - -diff --git a/virtManager/console.py b/virtManager/console.py -index ccbd6bf..122bf27 100644 ---- a/virtManager/console.py -+++ b/virtManager/console.py -@@ -1092,7 +1092,7 @@ class vmmConsolePages(vmmGObjectUI): - - def resizeguest_ui_changed_cb(self, src): - # Called from details.py -- if not src.get_active(): -+ if not src.get_sensitive(): - return - - val = int(self.widget("details-menu-view-resizeguest").get_active()) diff --git a/5310e3ac-set-show_arrow-to-true.patch b/5310e3ac-set-show_arrow-to-true.patch deleted file mode 100644 index 6bb48185..00000000 --- a/5310e3ac-set-show_arrow-to-true.patch +++ /dev/null @@ -1,18 +0,0 @@ -Subject: details-toolbar: set show_arrow to true -From: Maros Zatko mzatko@redhat.com Fri Feb 28 19:35:50 2014 +0100 -Date: Fri Feb 28 14:29:48 2014 -0500: -Git: 44d4c1d3293348d93bebc8c376691add15a4fcea - - -Index: virt-manager-1.0.0/ui/details.ui -=================================================================== ---- virt-manager-1.0.0.orig/ui/details.ui -+++ virt-manager-1.0.0/ui/details.ui -@@ -371,7 +371,6 @@ - - True - False -- False - - - True diff --git a/5310e3ac-vmmConsolePages-toggle-visibilities-on-page-change.patch b/5310e3ac-vmmConsolePages-toggle-visibilities-on-page-change.patch deleted file mode 100644 index 4ba00dbe..00000000 --- a/5310e3ac-vmmConsolePages-toggle-visibilities-on-page-change.patch +++ /dev/null @@ -1,25 +0,0 @@ -Subject: vmmConsolePages: toggle visibilities on page change -From: Maros Zatko mzatko@redhat.com Fri Feb 28 19:35:48 2014 +0100 -Date: Fri Feb 28 14:29:48 2014 -0500: -Git: dfa23765b569721effba959f35e5217aff908fea - - -diff --git a/virtManager/console.py b/virtManager/console.py -index 122bf27..dec2657 100644 ---- a/virtManager/console.py -+++ b/virtManager/console.py -@@ -1319,8 +1319,13 @@ class vmmConsolePages(vmmGObjectUI): - self.widget("details-menu-usb-redirection").set_sensitive(True) - return - -- def page_changed(self, ignore1=None, ignore2=None, ignore3=None): -+ def page_changed(self, ignore1=None, ignore2=None, newpage=None): - pagenum = self.widget("console-pages").get_current_page() -+ -+ for i in range(self.widget("console-pages").get_n_pages()): -+ w = self.widget("console-pages").get_nth_page(i) -+ w.set_visible(i == newpage) -+ - if pagenum < CONSOLE_PAGE_OFFSET: - self.last_gfx_page = pagenum - self.set_allow_fullscreen() diff --git a/5310e3ac-vmmDetails-toggle-visibilities-on-page-change.patch b/5310e3ac-vmmDetails-toggle-visibilities-on-page-change.patch deleted file mode 100644 index 1458d7c9..00000000 --- a/5310e3ac-vmmDetails-toggle-visibilities-on-page-change.patch +++ /dev/null @@ -1,23 +0,0 @@ -Subject: vmmDetails: toggle visibilities on page change -From: Maros Zatko mzatko@redhat.com Fri Feb 28 19:35:49 2014 +0100 -Date: Fri Feb 28 14:29:48 2014 -0500: -Git: 74e6d439035a7826f9ed0a70b1c4f0b1141997cc - - -Index: virt-manager-1.0.0/virtManager/details.py -=================================================================== ---- virt-manager-1.0.0.orig/virtManager/details.py -+++ virt-manager-1.0.0/virtManager/details.py -@@ -1269,7 +1269,11 @@ class vmmDetails(vmmGObjectUI): - finally: - self.ignoreDetails = False - -- def switch_page(self, ignore1=None, ignore2=None, newpage=None): -+ def switch_page(self, notebook=None, ignore2=None, newpage=None): -+ for i in range(notebook.get_n_pages()): -+ w = notebook.get_nth_page(i) -+ w.set_visible(i == newpage) -+ - self.page_refresh(newpage) - - self.sync_details_console_view(newpage) diff --git a/5310e52d-fix-setting-default-window-size.patch b/5310e52d-fix-setting-default-window-size.patch deleted file mode 100644 index bb2b3598..00000000 --- a/5310e52d-fix-setting-default-window-size.patch +++ /dev/null @@ -1,23 +0,0 @@ -Subject: details: Fix setting default window size -From: Cole Robinson crobinso@redhat.com Fri Feb 28 14:36:13 2014 -0500 -Date: Fri Feb 28 14:36:13 2014 -0500: -Git: 3fcc2c2fed3f9ec0eb8a379080a6b616e18287f7 - - -Index: virt-manager-1.0.0/virtManager/details.py -=================================================================== ---- virt-manager-1.0.0.orig/virtManager/details.py -+++ virt-manager-1.0.0/virtManager/details.py -@@ -521,7 +521,11 @@ class vmmDetails(vmmGObjectUI): - - # Set default window size - w, h = self.vm.get_details_window_size() -- self.topwin.set_default_size(w or 800, h or 600) -+ if w <= 0: -+ w = 800 -+ if h <= 0: -+ h = 600 -+ self.topwin.set_default_size(w, h) - - self.oldhwkey = None - self.addhwmenu = None diff --git a/5318a2cd-cpu-model-fallback-failure-fix.patch b/5318a2cd-cpu-model-fallback-failure-fix.patch deleted file mode 100644 index 949539cb..00000000 --- a/5318a2cd-cpu-model-fallback-failure-fix.patch +++ /dev/null @@ -1,30 +0,0 @@ -Subject: details: Fix fallback if fetching CPU models fails (bz 1072704) -From: Cole Robinson crobinso@redhat.com Thu Mar 6 11:31:09 2014 -0500 -Date: Thu Mar 6 11:31:09 2014 -0500: -Git: b078ba8c3d69b62fe748d9182babef8971914277 - - -Index: virt-manager-1.0.0/virtManager/details.py -=================================================================== ---- virt-manager-1.0.0.orig/virtManager/details.py -+++ virt-manager-1.0.0/virtManager/details.py -@@ -969,8 +969,9 @@ class vmmDetails(vmmGObjectUI): - no_default = not self.is_customize_dialog - - try: -- cpu_values = caps.get_cpu_values(self.vm.get_arch()) -+ cpu_names = caps.get_cpu_values(self.vm.get_arch()).cpus - except: -+ cpu_names = [] - logging.exception("Error populating CPU model list") - - # CPU model combo -@@ -991,7 +992,7 @@ class vmmDetails(vmmGObjectUI): - model.append([_("Clear CPU configuration"), "3", - virtinst.CPU.SPECIAL_MODE_CLEAR, False]) - model.append([None, None, None, True]) -- for name in [c.model for c in cpu_values.cpus]: -+ for name in [c.model for c in cpu_names]: - model.append([name, name, name, False]) - - # Disk cache combo diff --git a/5318a626-adding-filesystem-device-fix.patch b/5318a626-adding-filesystem-device-fix.patch deleted file mode 100644 index 1a453f21..00000000 --- a/5318a626-adding-filesystem-device-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -Subject: fsdetails: Fix adding a filesystem device (bz 1073067) -From: Cole Robinson crobinso@redhat.com Thu Mar 6 11:45:26 2014 -0500 -Date: Thu Mar 6 11:45:26 2014 -0500: -Git: 9074fc6c6080cf650cf97457dda799700ee2b635 - - -Index: virt-manager-1.0.0/virtManager/fsdetails.py -=================================================================== ---- virt-manager-1.0.0.orig/virtManager/fsdetails.py -+++ virt-manager-1.0.0/virtManager/fsdetails.py -@@ -158,8 +158,9 @@ class vmmFSDetails(vmmGObjectUI): - rowindex=0, check_visible=True) - - def get_config_fs_readonly(self): -- return uiutil.get_list_selection(self.widget("fs-readonly"), -- rowindex=0, check_visible=True) -+ if not self.widget("fs-readonly").is_visible(): -+ return None -+ return self.widget("fs-readonly").get_active() - - def get_config_fs_driver(self): - return uiutil.get_list_selection(self.widget("fs-driver-combo"), diff --git a/5318aa88-invalid-libvirt-volume-XML.patch b/5318aa88-invalid-libvirt-volume-XML.patch deleted file mode 100644 index 7be8c3a0..00000000 --- a/5318aa88-invalid-libvirt-volume-XML.patch +++ /dev/null @@ -1,32 +0,0 @@ -Subject: Handle libvirt generating invalid volume XML (bz 1072770) -From: Cole Robinson crobinso@redhat.com Thu Mar 6 12:04:08 2014 -0500 -Date: Thu Mar 6 12:04:08 2014 -0500: -Git: df7012a68b6a13a676e2019523f6863617a110d8 - - -diff --git a/virtManager/connection.py b/virtManager/connection.py -index 96dfa1c..57e143d 100644 ---- a/virtManager/connection.py -+++ b/virtManager/connection.py -@@ -179,7 +179,7 @@ class vmmConnection(vmmGObject): - for vol in pool.get_volumes(refresh=False).values(): - try: - ret.append(vol.get_xmlobj(refresh_if_nec=False)) -- except libvirt.libvirtError, e: -+ except Exception, e: - logging.debug("Fetching volume XML failed: %s", e) - return ret - self._backend.cb_fetch_all_vols = fetch_all_vols -diff --git a/virtinst/connection.py b/virtinst/connection.py -index a915f25..3cc5b79 100644 ---- a/virtinst/connection.py -+++ b/virtinst/connection.py -@@ -222,7 +222,7 @@ class VirtualConnection(object): - try: - xml = vol.XMLDesc(0) - ret.append(StorageVolume(weakref.ref(self), parsexml=xml)) -- except libvirt.libvirtError, e: -+ except Exception, e: - logging.debug("Fetching volume XML failed: %s", e) - - if self.cache_object_fetch: diff --git a/5318b486-virtinstall-location-iso-fix.patch b/5318b486-virtinstall-location-iso-fix.patch deleted file mode 100644 index 788b59a7..00000000 --- a/5318b486-virtinstall-location-iso-fix.patch +++ /dev/null @@ -1,287 +0,0 @@ -Subject: virt-install: Fix --location iso again, and test it (bz 1071513) -From: Cole Robinson crobinso@redhat.com Thu Mar 6 12:35:01 2014 -0500 -Date: Thu Mar 6 12:46:46 2014 -0500: -Git: 797afb3b273d08a74119c878b689730f0b36a252 - - -Index: virt-manager-1.0.0/tests/__init__.py -=================================================================== ---- virt-manager-1.0.0.orig/tests/__init__.py -+++ virt-manager-1.0.0/tests/__init__.py -@@ -21,6 +21,8 @@ import logging - import os - - os.environ["VIRTINST_TEST_SUITE"] = "1" -+os.environ["VIRTINST_TEST_URL_DIR"] = os.path.abspath( -+ "tests/cli-test-xml/fakefedoratree/") - - import virtinst - virtinst.stable_defaults = False -Index: virt-manager-1.0.0/tests/cli-test-xml/compare/virt-install-location-iso.xml -=================================================================== ---- /dev/null -+++ virt-manager-1.0.0/tests/cli-test-xml/compare/virt-install-location-iso.xml -@@ -0,0 +1,129 @@ -+ -+ foobar -+ 00000000-1111-2222-3333-444444444444 -+ 65536 -+ 65536 -+ 1 -+ -+ hvm -+ ./virtinst-vmlinuz. -+ ./virtinst-initrd.img. -+ -+ -+ -+ -+ -+ -+ -+ core2duo -+ -+ -+ -+ -+ -+ -+ destroy -+ destroy -+ destroy -+ -+ /usr/bin/qemu-kvm -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ foobar -+ 00000000-1111-2222-3333-444444444444 -+ 65536 -+ 65536 -+ 1 -+ -+ hvm -+ -+ -+ -+ -+ -+ -+ -+ -+ core2duo -+ -+ -+ -+ -+ -+ -+ destroy -+ restart -+ restart -+ -+ /usr/bin/qemu-kvm -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -Index: virt-manager-1.0.0/tests/clitest.py -=================================================================== ---- virt-manager-1.0.0.orig/tests/clitest.py -+++ virt-manager-1.0.0/tests/clitest.py -@@ -528,6 +528,7 @@ c.add_compare("--os-variant fedora20 --n - c.add_compare("--arch armv7l --machine vexpress-a9 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,dtb=/f19-arm.dtb,extra_args=\"console=ttyAMA0 rw root=/dev/mmcblk0p3\" --disk %(EXISTIMG1)s --nographics", "arm-vexpress-plain", skip_check=support.SUPPORT_CONN_DISK_SD) - c.add_compare("--arch armv7l --machine vexpress-a15 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,dtb=/f19-arm.dtb,kernel_args=\"console=ttyAMA0 rw root=/dev/vda3\",extra_args=foo --disk %(EXISTIMG1)s --nographics --os-variant fedora19", "arm-vexpress-f19", skip_check=support.SUPPORT_CONN_VIRTIO_MMIO) - c.add_compare("--arch ppc64 --machine pseries --boot network --disk %(EXISTIMG1)s --os-variant fedora20", "ppc64-pseries-f20") -+c.add_compare("--nodisks --location tests/cli-test-xml/fake.iso", "location-iso") # Using --location iso mounting - c.add_valid("--cdrom %(EXISTIMG2)s --file %(EXISTIMG1)s --os-variant win2k3 --wait 0 --sound") # HVM windows install with disk - c.add_valid("--os-variant fedora20 --file %(EXISTIMG1)s --location %(TREEDIR)s --extra-args console=ttyS0 --sound") # F14 Directory tree URL install with extra-args - c.add_invalid("--nodisks --boot network --machine foobar") # Unknown machine type -Index: virt-manager-1.0.0/virtinst/distroinstaller.py -=================================================================== ---- virt-manager-1.0.0.orig/virtinst/distroinstaller.py -+++ virt-manager-1.0.0/virtinst/distroinstaller.py -@@ -299,11 +299,12 @@ def _upload_media(conn, scratchdir, syst - - - # Enum of the various install media types we can have --(MEDIA_LOCATION_PATH, -+(MEDIA_LOCATION_DIR, -+ MEDIA_LOCATION_CDROM, - MEDIA_LOCATION_URL, - MEDIA_CDROM_PATH, - MEDIA_CDROM_URL, -- MEDIA_CDROM_IMPLIED) = range(1, 6) -+ MEDIA_CDROM_IMPLIED) = range(1, 7) - - - class DistroInstaller(Installer): -@@ -324,7 +325,11 @@ class DistroInstaller(Installer): - - if self.location and _is_url(self.conn, self.location): - return self.cdrom and MEDIA_CDROM_URL or MEDIA_LOCATION_URL -- return self.cdrom and MEDIA_CDROM_PATH or MEDIA_LOCATION_PATH -+ if self.cdrom: -+ return MEDIA_CDROM_PATH -+ if self.location and os.path.isdir(self.location): -+ return MEDIA_LOCATION_DIR -+ return MEDIA_LOCATION_CDROM - - def _prepare_local(self): - transient = True -@@ -374,7 +379,7 @@ class DistroInstaller(Installer): - def _get_bootdev(self, isinstall, guest): - mediatype = self._get_media_type() - local = mediatype in [MEDIA_CDROM_PATH, MEDIA_CDROM_IMPLIED, -- MEDIA_LOCATION_PATH] -+ MEDIA_LOCATION_DIR, MEDIA_LOCATION_CDROM] - persistent_cd = (local and - self.cdrom and - self.livecd) -@@ -420,9 +425,10 @@ class DistroInstaller(Installer): - return - - dev = None -- if mediatype == MEDIA_CDROM_PATH: -+ if mediatype == MEDIA_CDROM_PATH or mediatype == MEDIA_LOCATION_CDROM: - dev = self._prepare_local() -- else: -+ -+ if mediatype != MEDIA_CDROM_PATH: - fetcher = urlfetcher.fetcherForURI(self.location, - scratchdir, meter) - try: -@@ -454,7 +460,7 @@ class DistroInstaller(Installer): - - mediatype = self._get_media_type() - return mediatype in [MEDIA_CDROM_URL, MEDIA_LOCATION_URL, -- MEDIA_LOCATION_PATH] -+ MEDIA_LOCATION_DIR, MEDIA_LOCATION_CDROM] - - def check_location(self, guest): - mediatype = self._get_media_type() -Index: virt-manager-1.0.0/virtinst/urlfetcher.py -=================================================================== ---- virt-manager-1.0.0.orig/virtinst/urlfetcher.py -+++ virt-manager-1.0.0/virtinst/urlfetcher.py -@@ -189,10 +189,16 @@ class _MountedImageFetcher(_LocalImageFe - Fetcher capable of extracting files from a NFS server - or loopback mounted file, or local CDROM device - """ -+ _in_test_suite = bool("VIRTINST_TEST_SUITE" in os.environ) -+ - def prepareLocation(self): - cmd = None -- self.srcdir = tempfile.mkdtemp(prefix="virtinstmnt.", -- dir=self.scratchdir) -+ -+ if self._in_test_suite: -+ self.srcdir = os.environ["VIRTINST_TEST_URL_DIR"] -+ else: -+ self.srcdir = tempfile.mkdtemp(prefix="virtinstmnt.", -+ dir=self.scratchdir) - mountcmd = "/bin/mount" - - logging.debug("Preparing mount at " + self.srcdir) -@@ -207,21 +213,24 @@ class _MountedImageFetcher(_LocalImageFe - - logging.debug("mount cmd: %s", cmd) - -- ret = subprocess.call(cmd) -- if ret != 0: -- self.cleanupLocation() -- raise ValueError(_("Mounting location '%s' failed") % -- (self.location)) -+ if not self._in_test_suite: -+ ret = subprocess.call(cmd) -+ if ret != 0: -+ self.cleanupLocation() -+ raise ValueError(_("Mounting location '%s' failed") % -+ (self.location)) - return True - - def cleanupLocation(self): - logging.debug("Cleaning up mount at " + self.srcdir) -- cmd = ["/bin/umount", self.srcdir] -- subprocess.call(cmd) -- try: -- os.rmdir(self.srcdir) -- except: -- pass -+ -+ if not self._in_test_suite: -+ cmd = ["/bin/umount", self.srcdir] -+ subprocess.call(cmd) -+ try: -+ os.rmdir(self.srcdir) -+ except: -+ pass - - - class _DirectImageFetcher(_LocalImageFetcher): diff --git a/5319db07-customize-add-disk-fix.patch b/5319db07-customize-add-disk-fix.patch deleted file mode 100644 index d0a4f620..00000000 --- a/5319db07-customize-add-disk-fix.patch +++ /dev/null @@ -1,28 +0,0 @@ -Subject: addhardware: Fix adding disk through 'customize' dialog (bz 1073808) -From: Cole Robinson crobinso@redhat.com Fri Mar 7 09:37:08 2014 -0500 -Date: Fri Mar 7 09:43:19 2014 -0500: -Git: 7ef9d7fbfc4173b6a6e88b6fb74e895293ffda55 - - -diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py -index 75238d2..18f2aef 100644 ---- a/virtManager/addhardware.py -+++ b/virtManager/addhardware.py -@@ -1477,6 +1477,7 @@ class vmmAddHardware(vmmGObjectUI): - disk.driver_cache = cache - - # Generate target -+ disks = [] - if not self.is_customize_dialog: - disks = (self.vm.get_disk_devices() + - self.vm.get_disk_devices(inactive=True)) -@@ -1484,7 +1485,8 @@ class vmmAddHardware(vmmGObjectUI): - if d.target not in used: - used.append(d.target) - -- prefer_ctrl = self._set_disk_controller(disk, controller_model, disks) -+ prefer_ctrl = self._set_disk_controller( -+ disk, controller_model, disks) - - if not self.is_customize_dialog: - disk.generate_target(used, prefer_ctrl) diff --git a/531db6a7-new-volume-tooltip-logic.patch b/531db6a7-new-volume-tooltip-logic.patch deleted file mode 100644 index bd22b432..00000000 --- a/531db6a7-new-volume-tooltip-logic.patch +++ /dev/null @@ -1,42 +0,0 @@ -Subject: storagebrowse: Duplicate tooltip logic for 'new volume' button -From: Cole Robinson crobinso@redhat.com Mon Mar 10 08:56:51 2014 -0400 -Date: Mon Mar 10 08:57:11 2014 -0400: -Git: cfc52051b71bcfbf3f58ea6eddf457298f186727 - - -diff --git a/virtManager/storagebrowse.py b/virtManager/storagebrowse.py -index 314a6ab..3f61352 100644 ---- a/virtManager/storagebrowse.py -+++ b/virtManager/storagebrowse.py -@@ -208,7 +208,8 @@ class vmmStorageBrowser(vmmGObjectUI): - self.local_args["dialog_type"] = data.get("dialog_type") - self.local_args["choose_button"] = data.get("choose_button") - -- self.widget("new-volume").set_visible(self.can_new_volume) -+ self.widget("new-volume").set_visible( -+ self.can_new_volume and self.allow_create()) - - - # Convenience helpers -@@ -302,13 +303,17 @@ class vmmStorageBrowser(vmmGObjectUI): - def pool_selected(self, src_ignore=None): - pool = self.current_pool() - -- newvol = bool(pool) -+ can_new_vol = False -+ tt = "" - if pool: - pool.tick() -- newvol = pool.is_active() -+ can_new_vol = (pool.is_active() and -+ pool.supports_volume_creation()) -+ if not can_new_vol: -+ tt = _("Pool does not support volume creation") - -- newvol = newvol and self.allow_create() -- self.widget("new-volume").set_sensitive(newvol) -+ self.widget("new-volume").set_sensitive(can_new_vol) -+ self.widget("new-volume").set_tooltip_text(tt) - - self.populate_storage_volumes() - diff --git a/531dbfa7-handle-errors-when-deregistering-events-on-close.patch b/531dbfa7-handle-errors-when-deregistering-events-on-close.patch deleted file mode 100644 index 26de9d73..00000000 --- a/531dbfa7-handle-errors-when-deregistering-events-on-close.patch +++ /dev/null @@ -1,48 +0,0 @@ -Subject: connection: Handle errors when deregistering events on close (bz 1069351) -From: Cole Robinson crobinso@redhat.com Mon Mar 10 09:33:04 2014 -0400 -Date: Mon Mar 10 09:35:35 2014 -0400: -Git: 081e34715ffa5a210e1e0c8670fe3a1a3ec5180b - -Otherwise this interrupts the close/cleanup routine, and the connection -never appears to disconnect in the UI. This causes error dialog spamming -when libvirtd goes down. - -diff --git a/virtManager/connection.py b/virtManager/connection.py -index 57e143d..4c034b8 100644 ---- a/virtManager/connection.py -+++ b/virtManager/connection.py -@@ -929,16 +929,25 @@ class vmmConnection(vmmGObject): - def close(self): - def cleanup(devs): - for dev in devs.values(): -- dev.cleanup() -- -- if not self._backend.is_closed(): -- if self._domain_cb_id is not None: -- self._backend.domainEventDeregisterAny(self._domain_cb_id) -- self._domain_cb_id = None -+ try: -+ dev.cleanup() -+ except: -+ logging.debug("Failed to cleanup %s", exc_info=True) - -- if self._network_cb_id is not None: -- self._backend.networkEventDeregisterAny(self._network_cb_id) -- self._network_cb_id = None -+ try: -+ if not self._backend.is_closed(): -+ if self._domain_cb_id is not None: -+ self._backend.domainEventDeregisterAny( -+ self._domain_cb_id) -+ self._domain_cb_id = None -+ -+ if self._network_cb_id is not None: -+ self._backend.networkEventDeregisterAny( -+ self._network_cb_id) -+ self._network_cb_id = None -+ except: -+ logging.debug("Failed to deregister events in conn cleanup", -+ exc_info=True) - - self._backend.close() - self.record = [] diff --git a/531dd0ca-lxc-define-private-network.patch b/531dd0ca-lxc-define-private-network.patch deleted file mode 100644 index e3de166d..00000000 --- a/531dd0ca-lxc-define-private-network.patch +++ /dev/null @@ -1,70 +0,0 @@ -Subject: lxc: define a private network for OS containers -From: Giuseppe Scrivano gscrivan@redhat.com Mon Mar 10 15:25:14 2014 +0100 -Date: Mon Mar 10 15:48:42 2014 +0100: -Git: 75349b9cf075b229c027ef1fcabeb5ebac981cc8 - -By default, specify the the "" feature with LXC operating -system containers. - -Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1040406 -Signed-off-by: Giuseppe Scrivano - -Index: virt-manager-1.0.0/tests/cli-test-xml/compare/virt-install-fs-default.xml -=================================================================== ---- virt-manager-1.0.0.orig/tests/cli-test-xml/compare/virt-install-fs-default.xml -+++ virt-manager-1.0.0/tests/cli-test-xml/compare/virt-install-fs-default.xml -@@ -8,6 +8,9 @@ - exe - /sbin/init - -+ -+ -+ - destroy - restart - restart -Index: virt-manager-1.0.0/virtinst/guest.py -=================================================================== ---- virt-manager-1.0.0.orig/virtinst/guest.py -+++ virt-manager-1.0.0/virtinst/guest.py -@@ -1,7 +1,7 @@ - # - # Common code for all guests - # --# Copyright 2006-2009, 2013 Red Hat, Inc. -+# Copyright 2006-2009, 2013, 2014 Red Hat, Inc. - # Jeremy Katz - # - # This program is free software; you can redistribute it and/or modify -@@ -645,12 +645,18 @@ class Guest(XMLBuilder): - self._set_video_defaults() - self._set_sound_defaults() - -+ def _is_os_container(self): -+ if not self.os.is_container(): -+ return False -+ for fs in self.get_devices("filesystem"): -+ if fs.target == "/": -+ return True -+ return False -+ - def _set_osxml_defaults(self): - if self.os.is_container() and not self.os.init: -- for fs in self.get_devices("filesystem"): -- if fs.target == "/": -- self.os.init = "/sbin/init" -- break -+ if self._is_os_container(): -+ self.os.init = "/sbin/init" - self.os.init = self.os.init or "/bin/sh" - - if not self.os.loader and self.os.is_hvm() and self.type == "xen": -@@ -736,6 +742,8 @@ class Guest(XMLBuilder): - self.features.acpi = None - self.features.apic = None - self.features.pae = None -+ if self._is_os_container(): -+ self.features.privnet = True - return - - if not self.os.is_hvm(): diff --git a/53207f40-invalidate-cached-caps.patch b/53207f40-invalidate-cached-caps.patch deleted file mode 100644 index 8ca472db..00000000 --- a/53207f40-invalidate-cached-caps.patch +++ /dev/null @@ -1,22 +0,0 @@ -Subject: create: Invalidate cached caps across similar connections (bz 1075444) -From: Cole Robinson crobinso@redhat.com Wed Mar 12 11:37:36 2014 -0400 -Date: Wed Mar 12 11:37:36 2014 -0400: -Git: 1cf8b629909ebbfb3caee235d03c7e9bb149091e - - -diff --git a/virtManager/create.py b/virtManager/create.py -index b4b1dfe..e8259dc 100644 ---- a/virtManager/create.py -+++ b/virtManager/create.py -@@ -214,9 +214,9 @@ class vmmCreate(vmmGObjectUI): - self.addstorage = None - - def remove_conn(self): -- if not self.conn: -- return - self.conn = None -+ self.capsguest = None -+ self.capsdomain = None - - def set_conn(self, newconn, force_validate=False): - if self.conn == newconn and not force_validate: diff --git a/5320c976-fix-adding-empty-cdrom-floppy-drive.patch b/5320c976-fix-adding-empty-cdrom-floppy-drive.patch deleted file mode 100644 index 700ef00f..00000000 --- a/5320c976-fix-adding-empty-cdrom-floppy-drive.patch +++ /dev/null @@ -1,24 +0,0 @@ -Subject: addhw: Fix adding empty cdrom/floppy drive -From: Cole Robinson crobinso@redhat.com Wed Mar 12 16:54:14 2014 -0400 -Date: Wed Mar 12 16:54:14 2014 -0400: -Git: abb3920ac6b1e24d2f50faad2772e31ddabcb1c9 - - -diff --git a/virtManager/addstorage.py b/virtManager/addstorage.py -index 68558c9..2d15a57 100644 ---- a/virtManager/addstorage.py -+++ b/virtManager/addstorage.py -@@ -324,11 +324,11 @@ class vmmAddStorage(vmmGObjectUI): - if is_default: - path = self._check_ideal_path(path, vmname, collidelist) - -- if not path and device != "disk": -+ if not path and device in ["disk", "lun"]: - return self.err.val_err(_("A storage path must be specified.")) - - disk = virtinst.VirtualDisk(conn) -- disk.path = path -+ disk.path = path or None - disk.read_only = readonly - disk.device = device - disk.set_create_storage(size=size, sparse=sparse, diff --git a/5321d3cd-virtinst-drop-cpu_map-parsing-of-arch-features.patch b/5321d3cd-virtinst-drop-cpu_map-parsing-of-arch-features.patch deleted file mode 100644 index 746368bd..00000000 --- a/5321d3cd-virtinst-drop-cpu_map-parsing-of-arch-features.patch +++ /dev/null @@ -1,102 +0,0 @@ -Subject: virtinst: drop cpu_map parsing of arch features -From: Giuseppe Scrivano gscrivan@redhat.com Wed Mar 12 12:36:17 2014 +0100 -Date: Thu Mar 13 16:50:37 2014 +0100: -Git: 143a68959277e01f8fb90f09e2ba9e9d4b0fd9d1 - -This information is not used anywhere and there is no way to read -it directly from libvirt without parsing the cpu_map.xml file. - -Signed-off-by: Giuseppe Scrivano - -diff --git a/tests/capabilities.py b/tests/capabilities.py -index b712f8d..b718dc1 100644 ---- a/tests/capabilities.py -+++ b/tests/capabilities.py -@@ -1,4 +1,4 @@ --# Copyright (C) 2013 Red Hat, Inc. -+# Copyright (C) 2013, 2014 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -225,14 +225,12 @@ class TestCapabilities(unittest.TestCase): - cpu_32 = caps.get_cpu_values("i486") - cpu_random = caps.get_cpu_values("mips") - -- def test_cpu_map(cpumap, vendors, features, cpus): -+ def test_cpu_map(cpumap, vendors, cpus): - cpunames = sorted([c.model for c in cpumap.cpus], - key=str.lower) - - for v in vendors: - self.assertTrue(v in cpumap.vendors) -- for f in features: -- self.assertTrue(f in cpumap.features) - for c in cpus: - self.assertTrue(c in cpunames) - -@@ -244,25 +242,14 @@ class TestCapabilities(unittest.TestCase): - self.assertEquals(cpu_64, cpu_32) - - x86_vendors = ["AMD", "Intel"] -- x86_features = [ -- '3dnow', '3dnowext', '3dnowprefetch', 'abm', 'acpi', 'apic', -- 'cid', 'clflush', 'cmov', 'cmp_legacy', 'cr8legacy', 'cx16', -- 'cx8', 'dca', 'de', 'ds', 'ds_cpl', 'est', 'extapic', 'fpu', -- 'fxsr', 'fxsr_opt', 'ht', 'hypervisor', 'ia64', 'lahf_lm', 'lm', -- 'mca', 'mce', 'misalignsse', 'mmx', 'mmxext', 'monitor', 'msr', -- 'mtrr', 'nx', 'osvw', 'pae', 'pat', 'pbe', 'pdpe1gb', 'pge', 'pn', -- 'pni', 'popcnt', 'pse', 'pse36', 'rdtscp', 'sep', 'skinit', 'ss', -- 'sse', 'sse2', 'sse4.1', 'sse4.2', 'sse4a', 'ssse3', 'svm', -- 'syscall', 'tm', 'tm2', 'tsc', 'vme', 'vmx', 'wdt', 'x2apic', -- 'xtpr'] - x86_cpunames = [ - '486', 'athlon', 'Conroe', 'core2duo', 'coreduo', 'n270', - 'Nehalem', 'Opteron_G1', 'Opteron_G2', 'Opteron_G3', 'Penryn', - 'pentium', 'pentium2', 'pentium3', 'pentiumpro', 'phenom', - 'qemu32', 'qemu64'] - -- test_cpu_map(cpu_64, x86_vendors, x86_features, x86_cpunames) -- test_cpu_map(cpu_random, [], [], []) -+ test_cpu_map(cpu_64, x86_vendors, x86_cpunames) -+ test_cpu_map(cpu_random, [], []) - - athlon_features = [ - '3dnow', '3dnowext', 'apic', 'cmov', 'cx8', 'de', 'fpu', 'fxsr', -diff --git a/virtinst/capabilities.py b/virtinst/capabilities.py -index b8d3330..2fe2c0a 100644 ---- a/virtinst/capabilities.py -+++ b/virtinst/capabilities.py -@@ -1,7 +1,7 @@ - # - # Some code for parsing libvirt's capabilities XML - # --# Copyright 2007, 2012-2013 Red Hat, Inc. -+# Copyright 2007, 2012-2014 Red Hat, Inc. - # Mark McLoughlin - # - # This program is free software; you can redistribute it and/or modify -@@ -75,7 +75,6 @@ class CPUValuesArch(object): - self.arch = arch - self.vendors = [] - self.cpus = [] -- self.features = [] - - if node: - self._parseXML(node) -@@ -85,8 +84,6 @@ class CPUValuesArch(object): - while child: - if child.name == "vendor": - self.vendors.append(child.prop("name")) -- if child.name == "feature": -- self.features.append(child.prop("name")) - if child.name == "model": - newcpu = CPUValuesModel(child) - if newcpu.parent: -@@ -98,7 +95,6 @@ class CPUValuesArch(object): - child = child.next - - self.vendors.sort() -- self.features.sort() - - def get_cpu(self, model): - for c in self.cpus: diff --git a/5321d3d0-virtinst-drop-parsing-of-cpu-features.patch b/5321d3d0-virtinst-drop-parsing-of-cpu-features.patch deleted file mode 100644 index 2f6e0c86..00000000 --- a/5321d3d0-virtinst-drop-parsing-of-cpu-features.patch +++ /dev/null @@ -1,111 +0,0 @@ -Subject: virtinst: drop parsing of cpu features -From: Giuseppe Scrivano gscrivan@redhat.com Wed Mar 12 20:59:33 2014 +0100 -Date: Thu Mar 13 16:50:40 2014 +0100: -Git: 6c2645f0d2a33bdd189858b07ad771d9242ea4a5 - -As for the previous patch, this information is not used anywhere and -this information should be retrieved using the libvirt baselineCPU -API. - -Signed-off-by: Giuseppe Scrivano - -diff --git a/tests/capabilities.py b/tests/capabilities.py -index b718dc1..c062e4c 100644 ---- a/tests/capabilities.py -+++ b/tests/capabilities.py -@@ -225,37 +225,23 @@ class TestCapabilities(unittest.TestCase): - cpu_32 = caps.get_cpu_values("i486") - cpu_random = caps.get_cpu_values("mips") - -- def test_cpu_map(cpumap, vendors, cpus): -+ def test_cpu_map(cpumap, cpus): - cpunames = sorted([c.model for c in cpumap.cpus], - key=str.lower) - -- for v in vendors: -- self.assertTrue(v in cpumap.vendors) - for c in cpus: - self.assertTrue(c in cpunames) - -- def test_single_cpu(cpumap, model, vendor, features): -- cpu = cpumap.get_cpu(model) -- self.assertEquals(cpu.vendor, vendor) -- self.assertEquals(cpu.features, features) -- - self.assertEquals(cpu_64, cpu_32) - -- x86_vendors = ["AMD", "Intel"] - x86_cpunames = [ - '486', 'athlon', 'Conroe', 'core2duo', 'coreduo', 'n270', - 'Nehalem', 'Opteron_G1', 'Opteron_G2', 'Opteron_G3', 'Penryn', - 'pentium', 'pentium2', 'pentium3', 'pentiumpro', 'phenom', - 'qemu32', 'qemu64'] - -- test_cpu_map(cpu_64, x86_vendors, x86_cpunames) -- test_cpu_map(cpu_random, [], []) -- -- athlon_features = [ -- '3dnow', '3dnowext', 'apic', 'cmov', 'cx8', 'de', 'fpu', 'fxsr', -- 'mce', 'mmx', 'mmxext', 'msr', 'mtrr', 'pae', 'pat', 'pge', 'pse', -- 'pse36', 'sep', 'sse', 'sse2', 'tsc', 'vme'] -- test_single_cpu(cpu_64, "athlon", "AMD", athlon_features) -+ test_cpu_map(cpu_64, x86_cpunames) -+ test_cpu_map(cpu_random, []) - - if __name__ == "__main__": - unittest.main() -diff --git a/virtinst/capabilities.py b/virtinst/capabilities.py -index 2fe2c0a..2ab39cd 100644 ---- a/virtinst/capabilities.py -+++ b/virtinst/capabilities.py -@@ -37,34 +37,10 @@ def xpathString(node, path, default=None): - - class CPUValuesModel(object): - """ -- Single definition from cpu_map -+ Single CPU model - """ -- def __init__(self, node): -- self.model = node.prop("name") -- self.features = [] -- self.parent = None -- self.vendor = None -- -- self._parseXML(node) -- -- def _parseXML(self, node): -- child = node.children -- while child: -- if child.name == "model": -- self.parent = child.prop("name") -- if child.name == "vendor": -- self.vendor = child.prop("name") -- if child.name == "feature": -- self.features.append(child.prop("name")) -- -- child = child.next -- -- self.features.sort() -- -- def inheritParent(self, parentcpu): -- self.vendor = parentcpu.vendor or self.vendor -- self.features += parentcpu.features -- self.features.sort() -+ def __init__(self, model): -+ self.model = model - - - class CPUValuesArch(object): -@@ -85,11 +61,7 @@ class CPUValuesArch(object): - if child.name == "vendor": - self.vendors.append(child.prop("name")) - if child.name == "model": -- newcpu = CPUValuesModel(child) -- if newcpu.parent: -- for chkcpu in self.cpus: -- if chkcpu.model == newcpu.parent: -- newcpu.inheritParent(chkcpu) -+ newcpu = CPUValuesModel(child.prop("name")) - self.cpus.append(newcpu) - - child = child.next diff --git a/5321f256-virtinst-use-libvirt-getCPUModelNames.patch b/5321f256-virtinst-use-libvirt-getCPUModelNames.patch deleted file mode 100644 index 027ea619..00000000 --- a/5321f256-virtinst-use-libvirt-getCPUModelNames.patch +++ /dev/null @@ -1,176 +0,0 @@ -Subject: virtinst: use libvirt getCPUModelNames when available -From: Giuseppe Scrivano gscrivan@redhat.com Thu Mar 13 12:52:51 2014 +0100 -Date: Thu Mar 13 19:00:54 2014 +0100: -Git: 81696a514441f2320ea10299e1852795f8cb1682 - -Read the list of CPU models trough getCPUModelNames instead of -accessing directly the file cpu_map.xml. - -Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1060316 - -Signed-off-by: Giuseppe Scrivano - -Index: virt-manager-1.0.0/tests/capabilities.py -=================================================================== ---- virt-manager-1.0.0.orig/tests/capabilities.py -+++ virt-manager-1.0.0/tests/capabilities.py -@@ -18,6 +18,7 @@ - import os - import unittest - -+from tests import utils - from virtinst import CapabilitiesParser as capabilities - - -@@ -221,13 +222,12 @@ class TestCapabilities(unittest.TestCase - - def testCPUMap(self): - caps = self._buildCaps("libvirt-0.7.6-qemu-caps.xml") -- cpu_64 = caps.get_cpu_values("x86_64") -- cpu_32 = caps.get_cpu_values("i486") -- cpu_random = caps.get_cpu_values("mips") -+ cpu_64 = caps.get_cpu_values(None, "x86_64") -+ cpu_32 = caps.get_cpu_values(None, "i486") -+ cpu_random = caps.get_cpu_values(None, "mips") - - def test_cpu_map(cpumap, cpus): -- cpunames = sorted([c.model for c in cpumap.cpus], -- key=str.lower) -+ cpunames = sorted([c.model for c in cpumap], key=str.lower) - - for c in cpus: - self.assertTrue(c in cpunames) -@@ -243,5 +243,10 @@ class TestCapabilities(unittest.TestCase - test_cpu_map(cpu_64, x86_cpunames) - test_cpu_map(cpu_random, []) - -+ conn = utils.open_testdriver() -+ cpu_64 = caps.get_cpu_values(conn, "x86_64") -+ self.assertTrue(len(cpu_64) > 0) -+ -+ - if __name__ == "__main__": - unittest.main() -Index: virt-manager-1.0.0/virtManager/details.py -=================================================================== ---- virt-manager-1.0.0.orig/virtManager/details.py -+++ virt-manager-1.0.0/virtManager/details.py -@@ -969,7 +969,8 @@ class vmmDetails(vmmGObjectUI): - no_default = not self.is_customize_dialog - - try: -- cpu_names = caps.get_cpu_values(self.vm.get_arch()).cpus -+ cpu_names = caps.get_cpu_values(self.conn.get_backend(), -+ self.vm.get_arch()) - except: - cpu_names = [] - logging.exception("Error populating CPU model list") -Index: virt-manager-1.0.0/virtinst/capabilities.py -=================================================================== ---- virt-manager-1.0.0.orig/virtinst/capabilities.py -+++ virt-manager-1.0.0/virtinst/capabilities.py -@@ -77,13 +77,33 @@ class CPUValuesArch(object): - - class CPUValues(object): - """ -- Lists valid values for domain parameters, parsed from libvirt's -- local cpu_map.xml -+ Lists valid values for cpu models obtained trough libvirt's getCPUModelNames - """ -- def __init__(self, cpu_filename=None): -+ def __init__(self): -+ self._cpus = None -+ -+ def get_cpus(self, arch, conn): -+ if self._cpus is not None: -+ return self._cpus -+ -+ if (conn and -+ conn.check_support(conn.SUPPORT_CONN_CPU_MODEL_NAMES)): -+ self._cpus = [CPUValuesModel(i) for i in -+ conn.libvirtconn.getCPUModelNames(arch, 0)] -+ return self._cpus -+ -+ return [] -+ -+ -+class CPUMapFileValues(CPUValues): -+ """ -+ Fallback method to lists cpu models, parsed directly from libvirt's local -+ cpu_map.xml -+ """ -+ def __init__(self): -+ CPUValues.__init__(self) - self.archmap = {} -- if not cpu_filename: -- cpu_filename = "/usr/share/libvirt/cpu_map.xml" -+ cpu_filename = "/usr/share/libvirt/cpu_map.xml" - xml = file(cpu_filename).read() - - util.parse_node_helper(xml, "cpus", -@@ -99,7 +119,8 @@ class CPUValues(object): - - child = child.next - -- def get_arch(self, arch): -+ def get_cpus(self, arch, conn): -+ ignore = conn - if not arch: - return None - if re.match(r'i[4-9]86', arch): -@@ -112,7 +133,7 @@ class CPUValues(object): - cpumap = CPUValuesArch(arch) - self.archmap[arch] = cpumap - -- return cpumap -+ return cpumap.cpus - - - class Features(object): -@@ -613,12 +634,19 @@ class Capabilities(object): - self.guests.append(Guest(child)) - child = child.next - -- def get_cpu_values(self, arch): -- if not self._cpu_values: -- self._cpu_values = CPUValues() -- -- return self._cpu_values.get_arch(arch) -+ def get_cpu_values(self, conn, arch): -+ if self._cpu_values: -+ return self._cpu_values.get_cpus(arch, conn) -+ -+ # Iterate over the available methods until a set of CPU models is found -+ for mode in (CPUValues, CPUMapFileValues): -+ cpu_values = mode() -+ cpus = cpu_values.get_cpus(arch, conn) -+ if cpus and len(cpus) > 0: -+ self._cpu_values = cpu_values -+ return cpus - -+ return [] - - def guest_lookup(self, os_type=None, arch=None, typ=None, - accelerated=False, machine=None): -Index: virt-manager-1.0.0/virtinst/support.py -=================================================================== ---- virt-manager-1.0.0.orig/virtinst/support.py -+++ virt-manager-1.0.0/virtinst/support.py -@@ -1,7 +1,7 @@ - # - # Helper functions for determining if libvirt supports certain features - # --# Copyright 2009, 2013 Red Hat, Inc. -+# Copyright 2009, 2013, 2014 Red Hat, Inc. - # Cole Robinson - # - # This program is free software; you can redistribute it and/or modify -@@ -288,6 +288,8 @@ SUPPORT_CONN_USBREDIR = _make( - version="0.9.5", hv_version={"qemu": "1.3.0", "test": 0}) - SUPPORT_CONN_DEVICE_BOOTORDER = _make( - version="0.8.8", hv_version={"qemu": 0, "test": 0}) -+SUPPORT_CONN_CPU_MODEL_NAMES = _make(function="virConnect.getCPUModelNames", -+ run_args=("x86_64", 0)) - - - # Domain checks diff --git a/532255b4-unselect_all-members-before-clear-model.patch b/532255b4-unselect_all-members-before-clear-model.patch deleted file mode 100644 index f5a175e8..00000000 --- a/532255b4-unselect_all-members-before-clear-model.patch +++ /dev/null @@ -1,63 +0,0 @@ -Subject: host: unselect_all members before clear model -From: Chen Hanxiao chenhanxiao@cn.fujitsu.com Fri Mar 14 09:04:34 2014 +0800 -Date: Fri Mar 14 09:04:52 2014 +0800: -Git: 1d3980015a942e5aceee0233c9b90d2bbe32ffdd - -Interface_selected is being triggered by model.clear() in -populate_interfaces. It usually calls interface_selected -on every interface after the current selected row. - -So the gtk code is probably removing the first -row over and over, and when it removes the -current selection (the interface we are deleting), -it selects the next row in line. -It will raise a KeyError. - -This patch will fix this issue. - -Signed-off-by: Chen Hanxiao - -diff --git a/virtManager/host.py b/virtManager/host.py -index c8d7ee0..a1aa2fd 100644 ---- a/virtManager/host.py -+++ b/virtManager/host.py -@@ -679,6 +679,7 @@ class vmmHost(vmmGObjectUI): - curnet = self.current_network() - - net_list = self.widget("net-list") -+ net_list.get_selection().unselect_all() - model.clear() - for uuid in self.conn.list_net_uuids(): - net = self.conn.get_net(uuid) -@@ -1220,6 +1221,7 @@ class vmmHost(vmmGObjectUI): - curiface = self.current_interface() - - iface_list = self.widget("interface-list") -+ iface_list.get_selection().unselect_all() - model.clear() - for name in self.conn.list_interface_names(): - iface = self.conn.get_interface(name) -@@ -1234,6 +1236,7 @@ class vmmHost(vmmGObjectUI): - interface = self.current_interface() - child_list = self.widget("interface-child-list") - model = child_list.get_model() -+ child_list.get_selection().unselect_all() - model.clear() - - if not interface: -@@ -1278,6 +1281,7 @@ def populate_storage_pools(pool_list, conn, curpool): - model = pool_list.get_model() - # Prevent events while the model is modified - pool_list.set_model(None) -+ pool_list.get_selection().unselect_all() - model.clear() - for uuid in conn.list_pool_uuids(): - per = get_pool_size_percent(conn, uuid) -@@ -1297,6 +1301,7 @@ def populate_storage_pools(pool_list, conn, curpool): - def populate_storage_volumes(list_widget, pool, sensitive_cb): - vols = pool and pool.get_volumes() or {} - model = list_widget.get_model() -+ list_widget.get_selection().unselect_all() - model.clear() - - for key in vols.keys(): diff --git a/532a3213-exit-URL-detection-immediately-if-detection-fails.patch b/532a3213-exit-URL-detection-immediately-if-detection-fails.patch deleted file mode 100644 index a8a3924a..00000000 --- a/532a3213-exit-URL-detection-immediately-if-detection-fails.patch +++ /dev/null @@ -1,93 +0,0 @@ -Subject: create: Exit URL detection immediately if detection fails -From: Cole Robinson crobinso@redhat.com Wed Mar 19 20:09:58 2014 -0400 -Date: Wed Mar 19 20:10:59 2014 -0400: -Git: 633669ed31c7079d79a503650aec63e6fc3cac2f - - -Index: virt-manager-1.0.0/virtManager/create.py -=================================================================== ---- virt-manager-1.0.0.orig/virtManager/create.py -+++ virt-manager-1.0.0/virtManager/create.py -@@ -44,6 +44,8 @@ from virtManager.addstorage import vmmAd - - # Number of seconds to wait for media detection - DETECT_TIMEOUT = 20 -+DETECT_INPROGRESS = -1 -+DETECT_FAILED = -2 - - DEFAULT_MEM = 1024 - -@@ -93,8 +95,7 @@ class vmmCreate(vmmGObjectUI): - self.storage_browser = None - - # Distro detection state variables -- self.detectedDistro = -1 -- self.detecting = False -+ self.detectedDistro = None - self.mediaDetected = False - self.show_all_os = False - -@@ -1113,11 +1114,13 @@ class vmmCreate(vmmGObjectUI): - self.change_caps(self.capsguest.os_type, arch) - - def url_box_changed(self, ignore): -+ self.mediaDetected = False -+ - # If the url_entry has focus, don't fire detect_media_os, it means - # the user is probably typing -- self.mediaDetected = False - if self.widget("install-url-box").get_child().has_focus(): - return -+ - self.detect_media_os() - - def should_detect_media(self): -@@ -1917,7 +1920,8 @@ class vmmCreate(vmmGObjectUI): - try: - base = _("Detecting") - -- if (self.detectedDistro == -1) and (idx < (DETECT_TIMEOUT * 2)): -+ if (self.detectedDistro == DETECT_INPROGRESS and -+ (idx < (DETECT_TIMEOUT * 2))): - detect_str = base + ("." * ((idx % 3) + 1)) - self.set_distro_labels(detect_str, detect_str) - -@@ -1929,25 +1933,25 @@ class vmmCreate(vmmGObjectUI): - except: - logging.exception("Error in distro detect timeout") - -- if results == -1: -+ if results in [DETECT_INPROGRESS, DETECT_FAILED]: - results = None -+ - self.widget("create-forward").set_sensitive(True) - self.mediaDetected = True -- self.detecting = False - logging.debug("Finished OS detection.") - self.set_distro_selection(results) - if forward: - self.idle_add(self.forward, ()) - - def start_detection(self, forward): -- if self.detecting: -+ if self.detectedDistro == DETECT_INPROGRESS: - return - - media = self.get_config_detectable_media() - if not media: - return - -- self.detectedDistro = -1 -+ self.detectedDistro = DETECT_INPROGRESS - - logging.debug("Starting OS detection thread for media=%s", media) - self.widget("create-forward").set_sensitive(False) -@@ -1968,7 +1972,7 @@ class vmmCreate(vmmGObjectUI): - self.detectedDistro = installer.detect_distro(self.guest) - except: - logging.exception("Error detecting distro.") -- self.detectedDistro = -1 -+ self.detectedDistro = DETECT_FAILED - - def _browse_file_cb(self, ignore, widget): - self._browse_file(widget) diff --git a/532a3213-fix-url-autodetect-timeout.patch b/532a3213-fix-url-autodetect-timeout.patch deleted file mode 100644 index 787f31d9..00000000 --- a/532a3213-fix-url-autodetect-timeout.patch +++ /dev/null @@ -1,24 +0,0 @@ -Subject: create: Fix URL autodetect timeout detection -From: Charles Arnold carnold@suse.com Wed Mar 19 16:26:52 2014 -0600 -Date: Wed Mar 19 20:10:59 2014 -0400: -Git: f113a8db29ea3d8a4080f767d2fc6f5e8488eb09 - -When 'Network Install' is selected and a malformed url is entered in the -'URL:' box virt-manager will hang forever 'Detecting...'. For example, -leave the 'http://' off the url when 'Automatically detect...' is enabled. - -Signed-off-by: Charles Arnold - -Index: virt-manager-1.0.0/virtManager/create.py -=================================================================== ---- virt-manager-1.0.0.orig/virtManager/create.py -+++ virt-manager-1.0.0/virtManager/create.py -@@ -1917,7 +1917,7 @@ class vmmCreate(vmmGObjectUI): - try: - base = _("Detecting") - -- if (self.detectedDistro == -1) or (idx >= (DETECT_TIMEOUT * 2)): -+ if (self.detectedDistro == -1) and (idx < (DETECT_TIMEOUT * 2)): - detect_str = base + ("." * ((idx % 3) + 1)) - self.set_distro_labels(detect_str, detect_str) - diff --git a/532a3213-pass-correct-connection-to-install.patch b/532a3213-pass-correct-connection-to-install.patch deleted file mode 100644 index 8240f1a9..00000000 --- a/532a3213-pass-correct-connection-to-install.patch +++ /dev/null @@ -1,19 +0,0 @@ -Subject: create: Pass correct connection to install for detection -From: Cole Robinson crobinso@redhat.com Wed Mar 19 19:56:19 2014 -0400 -Date: Wed Mar 19 20:10:59 2014 -0400: -Git: bd27910b6f77275b4e82cd2dae247e72d9489b1d - - -Index: virt-manager-1.0.0/virtManager/create.py -=================================================================== ---- virt-manager-1.0.0.orig/virtManager/create.py -+++ virt-manager-1.0.0/virtManager/create.py -@@ -1962,7 +1962,7 @@ class vmmCreate(vmmGObjectUI): - - def actually_detect(self, media): - try: -- installer = virtinst.DistroInstaller(self.conn) -+ installer = virtinst.DistroInstaller(self.conn.get_backend()) - installer.location = media - - self.detectedDistro = installer.detect_distro(self.guest) diff --git a/virt-manager-1.0.0.tar.bz2 b/virt-manager-1.0.0.tar.bz2 deleted file mode 100644 index 7a1aa3b0..00000000 --- a/virt-manager-1.0.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4327f3de1848356ed4a066f6e2183775f0bb587efaef97fb89d5c1dd4d028156 -size 1308101 diff --git a/virt-manager-1.0.1.tar.bz2 b/virt-manager-1.0.1.tar.bz2 new file mode 100644 index 00000000..dde7b3d5 --- /dev/null +++ b/virt-manager-1.0.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aff2bd548f2b474404a7fc6dbf76db2beb1014a06589c8a289949d0eb097a215 +size 1323967 diff --git a/virt-manager.changes b/virt-manager.changes index 9b021d94..bece9a87 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +Sat Mar 22 17:00:52 MDT 2014 - carnold@suse.com + +- Update to virt-manager version 1.0.1 + virt-manager-1.0.1.tar.bz2 + * virt-install/virt-xml: New --memorybacking option (Chen Hanxiao) + * virt-install/virt-xml: New --memtune option (Chen Hanxiao) + * virt-manager: UI for LXC (Chen Hanxiao) + * virt-manager: gsettings key to disable keygrab (Kjö Hansi Glaz) + * virt-manager: Show domain state reason in the UI (Giuseppe Scrivano) + * Fix a number of bugs found since the 1.0.0 release +- Dropped 35 timestamp named patches now contained in new tarball + +------------------------------------------------------------------- +Fri Mar 21 13:18:52 MDT 2014 - carnold@suse.com + +- bnc#869165 - virt-manager: add connection - missing avahi + virt-manager.spec +- bnc#863821 - Xen unable to boot paravirtualized VMs installed + with btrfs + virtinst-pvgrub2-bootloader.patch +- Switch out redhat defaults for suse defaults + virtman-stable-os-support.patch + ------------------------------------------------------------------- Wed Mar 19 13:12:57 MDT 2014 - carnold@suse.com diff --git a/virt-manager.spec b/virt-manager.spec index d6b60f3c..63621ac1 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -23,7 +23,7 @@ %define libvirt_xen_packages "libvirt-daemon-xen" %define preferred_distros "sles,opensuse" %define kvm_packages "qemu-x86" -%define _version 1.0.0 +%define _version 1.0.1 %define _release 1 Name: virt-manager @@ -36,41 +36,6 @@ Url: http://virt-manager.org/ Source0: %{name}-%{version}.tar.bz2 Source1: virt-install.rb Source2: virt-install.desktop -Patch1: 53022930-lxc-connection-fix.patch -Patch2: 530229cb-non-x86-kvm-creation-fix.patch -Patch3: 53023f56-dont-alter-caps-machine-list-on-create.patch -Patch4: 53030858-generate_target-fix.patch -Patch5: 53037798-not-customizing-generate_target-fix.patch -Patch6: 53047532-dont-get-duplicated-disks.patch -Patch7: 53047595-calculate-disk-bus-properly.patch -Patch8: 530987c4-disk-bus-calculation-fix.patch -Patch9: 530c021c-attempt-empty-path-on-virDomainBlockStats.patch -Patch10: 530cd6ab-log-broken-xml.patch -Patch11: 530cf4de-allow-numbered-object-names.patch -Patch12: 530cfa5e-close-connection-on-tick-failure-fix.patch -Patch13: 530f80f5-handle-missing-storage-volumes.patch -Patch14: 5310bd89-console-fix-unsetting-resize-guest.patch -Patch15: 5310e3ac-set-show_arrow-to-true.patch -Patch16: 5310e3ac-vmmConsolePages-toggle-visibilities-on-page-change.patch -Patch17: 5310e3ac-vmmDetails-toggle-visibilities-on-page-change.patch -Patch18: 5310e52d-fix-setting-default-window-size.patch -Patch19: 5318a2cd-cpu-model-fallback-failure-fix.patch -Patch20: 5318a626-adding-filesystem-device-fix.patch -Patch21: 5318aa88-invalid-libvirt-volume-XML.patch -Patch22: 5318b486-virtinstall-location-iso-fix.patch -Patch23: 5319db07-customize-add-disk-fix.patch -Patch24: 531db6a7-new-volume-tooltip-logic.patch -Patch25: 531dbfa7-handle-errors-when-deregistering-events-on-close.patch -Patch26: 531dd0ca-lxc-define-private-network.patch -Patch27: 53207f40-invalidate-cached-caps.patch -Patch28: 5320c976-fix-adding-empty-cdrom-floppy-drive.patch -Patch29: 5321d3cd-virtinst-drop-cpu_map-parsing-of-arch-features.patch -Patch30: 5321d3d0-virtinst-drop-parsing-of-cpu-features.patch -Patch31: 5321f256-virtinst-use-libvirt-getCPUModelNames.patch -Patch32: 532255b4-unselect_all-members-before-clear-model.patch -Patch33: 532a3213-pass-correct-connection-to-install.patch -Patch34: 532a3213-fix-url-autodetect-timeout.patch -Patch35: 532a3213-exit-URL-detection-immediately-if-detection-fails.patch Patch50: virtman-desktop.patch Patch51: virtman-cdrom.patch Patch52: virtman-kvm.patch @@ -90,6 +55,7 @@ Patch71: virtman-show-suse-install-repos.patch Patch72: virtman-packages.patch Patch73: virtman-load-stored-uris.patch Patch74: virtman-libvirtd-not-running.patch +Patch75: virtman-stable-os-support.patch Patch150: virtinst-cdrom.patch Patch151: virtinst-storage-ocfs2.patch Patch152: virtinst-qed.patch @@ -97,10 +63,12 @@ Patch153: virtinst-support-suse-distros.patch Patch154: virtinst-detect-suse-distros.patch Patch155: virtinst-xen-drive-type.patch Patch156: virtinst-modify-gui-defaults.patch +Patch157: virtinst-pvgrub2-bootloader.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build %define verrel %{version}-%{release} +Requires: avahi Requires: dbus-1-x11 Requires: dconf Requires: gtk3 @@ -153,6 +121,7 @@ Group: System/Monitoring # This version not strictly required: virt-manager should work with older, # however varying amounts of functionality will not be enabled. +Requires: grub2-x86_64-xen Requires: libvirt-python >= 0.7.0 Requires: python-ipaddr Requires: python-libxml2 @@ -184,41 +153,6 @@ machine). %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 -%patch34 -p1 -%patch35 -p1 %patch50 -p1 %patch51 -p1 %patch52 -p1 @@ -238,6 +172,7 @@ machine). %patch72 -p1 %patch73 -p1 %patch74 -p1 +%patch75 -p1 #%patch150 -p1 use 'c' for cdrom %patch151 -p1 %patch152 -p1 @@ -245,6 +180,7 @@ machine). %patch154 -p1 %patch155 -p1 %patch156 -p1 +%patch157 -p1 %build %if %{qemu_user} diff --git a/virtinst-modify-gui-defaults.patch b/virtinst-modify-gui-defaults.patch index a3290402..014b5b59 100644 --- a/virtinst-modify-gui-defaults.patch +++ b/virtinst-modify-gui-defaults.patch @@ -1,13 +1,13 @@ -Index: virt-manager-1.0.0/virtManager/create.py +Index: virt-manager-1.0.1/virtManager/create.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/create.py -+++ virt-manager-1.0.0/virtManager/create.py -@@ -338,7 +338,18 @@ class vmmCreate(vmmGObjectUI): +--- virt-manager-1.0.1.orig/virtManager/create.py ++++ virt-manager-1.0.1/virtManager/create.py +@@ -337,7 +337,18 @@ class vmmCreate(vmmGObjectUI): self.widget("method-local").set_active(True) self.widget("create-conn").set_active(-1) activeconn = self.populate_conn_list(urihint) - self.widget("arch-expander").set_expanded(False) -+ if activeconn.is_xen(): ++ if activeconn and activeconn.is_xen(): + self.widget("arch-expander").set_expanded(True) + else: + self.widget("arch-expander").set_expanded(False) @@ -22,10 +22,10 @@ Index: virt-manager-1.0.0/virtManager/create.py try: self.set_conn(activeconn, force_validate=True) -Index: virt-manager-1.0.0/virtManager/netlist.py +Index: virt-manager-1.0.1/virtManager/netlist.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/netlist.py -+++ virt-manager-1.0.0/virtManager/netlist.py +--- virt-manager-1.0.1.orig/virtManager/netlist.py ++++ virt-manager-1.0.1/virtManager/netlist.py @@ -174,10 +174,20 @@ class vmmNetworkList(vmmGObjectUI): if nic.target_dev and nic.target_dev not in vnet_taps: vnet_taps.append(nic.target_dev) diff --git a/virtinst-pvgrub2-bootloader.patch b/virtinst-pvgrub2-bootloader.patch new file mode 100644 index 00000000..9ea10a89 --- /dev/null +++ b/virtinst-pvgrub2-bootloader.patch @@ -0,0 +1,31 @@ +Index: virt-manager-1.0.1/virtinst/guest.py +=================================================================== +--- virt-manager-1.0.1.orig/virtinst/guest.py ++++ virt-manager-1.0.1/virtinst/guest.py +@@ -331,7 +331,15 @@ class Guest(XMLBuilder): + this.) + @type disk_boot: C{bool} + """ +- osblob_install = install and not disk_boot ++ boot_pvgrub2 = False ++ os_ver = self._get_os_variant() ++ if install == False and (os_ver == "sles12" or os_ver == "sled12"): ++ boot_pvgrub2 = True ++ self.installer._install_kernel = "/usr/lib/grub2/x86_64-xen/grub.xen" ++ self.installer._install_initrd = None ++ self.installer.extraargs = None ++ logging.info("Using grub.xen to boot guest") ++ osblob_install = (install or boot_pvgrub2) and not disk_boot + if osblob_install and not self.installer.has_install_phase(): + return None + +@@ -348,7 +356,8 @@ class Guest(XMLBuilder): + if (not install and + self.os.is_xenpv() and + not self.os.kernel): +- self.bootloader = "/usr/bin/pygrub" ++ if boot_pvgrub2 is False: ++ self.bootloader = "/usr/bin/pygrub" + self.os.clear() + + return self.get_xml_config() diff --git a/virtman-autorestart.patch b/virtman-autorestart.patch index 901fc859..f7c303eb 100644 --- a/virtman-autorestart.patch +++ b/virtman-autorestart.patch @@ -1,15 +1,13 @@ Index: virt-manager-1.0.0/virtManager/details.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/details.py -+++ virt-manager-1.0.0/virtManager/details.py -@@ -2019,12 +2019,10 @@ class vmmDetails(vmmGObjectUI): +--- virt-manager-1.0.1/virtManager/details.py.orig 2014-03-22 16:46:50.641411724 -0600 ++++ virt-manager-1.0.1/virtManager/details.py 2014-03-22 16:55:45.703098510 -0600 +@@ -2034,10 +2034,10 @@ class vmmDetails(vmmGObjectUI): + return self._change_config_helper(self.vm.define_memory, kwargs, + hotplug_args=hotplug_args) - return self._change_config_helper(df, da, hf, ha) - -- # Boot device / Autostart - def config_boot_options_apply(self): -- df, da, add_define, hf, ha, add_hotplug = self.make_apply_data() -- ignore = add_hotplug +- kwargs = {} - - if self.edited(EDIT_AUTOSTART): + # Autostart - See bnc#624250 - L3: virt-manager doesn't update @@ -19,19 +17,17 @@ Index: virt-manager-1.0.0/virtManager/details.py auto = self.widget("config-autostart") try: self.vm.set_autostart(auto.get_active()) -@@ -2033,6 +2031,11 @@ class vmmDetails(vmmGObjectUI): +@@ -2046,6 +2046,9 @@ class vmmDetails(vmmGObjectUI): (_("Error changing autostart value: %s") % str(e))) return False -+ # Boot device + def config_boot_options_apply(self): -+ df, da, add_define, hf, ha, add_hotplug = self.make_apply_data() -+ ignore = add_hotplug ++ kwargs = {} + if self.edited(EDIT_BOOTORDER): - bootdevs = self.get_config_boot_order() - add_define(self.vm.set_boot_order, bootdevs) -@@ -2387,6 +2390,8 @@ class vmmDetails(vmmGObjectUI): + kwargs["boot_order"] = self.get_config_boot_order() + +@@ -2359,6 +2362,8 @@ class vmmDetails(vmmGObjectUI): buttons=Gtk.ButtonsType.OK, dialog_type=dtype) @@ -39,4 +35,4 @@ Index: virt-manager-1.0.0/virtManager/details.py + return True - ######################## + diff --git a/virtman-autoyast-support.patch b/virtman-autoyast-support.patch index 823a48b0..f35cf18b 100644 --- a/virtman-autoyast-support.patch +++ b/virtman-autoyast-support.patch @@ -1,8 +1,8 @@ -Index: virt-manager-1.0.0/virtManager/create.py +Index: virt-manager-1.0.1/virtManager/create.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/create.py -+++ virt-manager-1.0.0/virtManager/create.py -@@ -1220,11 +1220,34 @@ class vmmCreate(vmmGObjectUI): +--- virt-manager-1.0.1.orig/virtManager/create.py ++++ virt-manager-1.0.1/virtManager/create.py +@@ -1216,11 +1216,34 @@ class vmmCreate(vmmGObjectUI): variant = self.widget("install-os-version") variant.set_active(0) @@ -37,7 +37,7 @@ Index: virt-manager-1.0.0/virtManager/create.py # Get previous type_row = self._selected_os_row() if not type_row: -@@ -1579,7 +1602,10 @@ class vmmCreate(vmmGObjectUI): +@@ -1575,7 +1598,10 @@ class vmmCreate(vmmGObjectUI): if extra: extraargs += extra if ks: @@ -49,7 +49,7 @@ Index: virt-manager-1.0.0/virtManager/create.py if extraargs: self.guest.installer.extraargs = extraargs -@@ -1972,6 +1998,7 @@ class vmmCreate(vmmGObjectUI): +@@ -1971,6 +1997,7 @@ class vmmCreate(vmmGObjectUI): dl = self.set_os_val(self.widget("install-os-type"), distro_type) vl = self.set_os_val(self.widget("install-os-version"), distro_var) self.set_distro_labels(dl, vl) @@ -57,10 +57,10 @@ Index: virt-manager-1.0.0/virtManager/create.py def check_detection(self, idx, forward): results = None -Index: virt-manager-1.0.0/ui/create.ui +Index: virt-manager-1.0.1/ui/create.ui =================================================================== ---- virt-manager-1.0.0.orig/ui/create.ui -+++ virt-manager-1.0.0/ui/create.ui +--- virt-manager-1.0.1.orig/ui/create.ui ++++ virt-manager-1.0.1/ui/create.ui @@ -869,7 +869,7 @@ bar 6 4 diff --git a/virtman-cdrom.patch b/virtman-cdrom.patch index 1afbe0b3..1b41cb55 100644 --- a/virtman-cdrom.patch +++ b/virtman-cdrom.patch @@ -1,8 +1,8 @@ -Index: virt-manager-0.10.1/virtManager/addhardware.py +Index: virt-manager-1.0.1/virtManager/addhardware.py =================================================================== ---- virt-manager-0.10.1.orig/virtManager/addhardware.py -+++ virt-manager-0.10.1/virtManager/addhardware.py -@@ -778,7 +778,7 @@ class vmmAddHardware(vmmGObjectUI): +--- virt-manager-1.0.1.orig/virtManager/addhardware.py ++++ virt-manager-1.0.1/virtManager/addhardware.py +@@ -760,7 +760,7 @@ class vmmAddHardware(vmmGObjectUI): disk_buses = ["ide", "sata", "scsi", "sd", "usb", "virtio", "virtio-scsi", "xen"] floppy_buses = ["fdc"] diff --git a/virtman-default-guest-from-host-os.patch b/virtman-default-guest-from-host-os.patch index c7427cd5..d857f218 100644 --- a/virtman-default-guest-from-host-os.patch +++ b/virtman-default-guest-from-host-os.patch @@ -1,7 +1,7 @@ -Index: virt-manager-1.0.0/virtManager/create.py +Index: virt-manager-1.0.1/virtManager/create.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/create.py -+++ virt-manager-1.0.0/virtManager/create.py +--- virt-manager-1.0.1.orig/virtManager/create.py ++++ virt-manager-1.0.1/virtManager/create.py @@ -21,6 +21,8 @@ import logging import threading @@ -11,7 +11,7 @@ Index: virt-manager-1.0.0/virtManager/create.py # pylint: disable=E0611 from gi.repository import GObject -@@ -1133,6 +1135,55 @@ class vmmCreate(vmmGObjectUI): +@@ -1129,6 +1131,55 @@ class vmmCreate(vmmGObjectUI): return self.start_detection(forward=forward) @@ -67,7 +67,7 @@ Index: virt-manager-1.0.0/virtManager/create.py def toggle_detect_os(self, src): dodetect = src.get_active() -@@ -1144,6 +1195,8 @@ class vmmCreate(vmmGObjectUI): +@@ -1140,6 +1191,8 @@ class vmmCreate(vmmGObjectUI): if dodetect: self.mediaDetected = False self.detect_media_os() diff --git a/virtman-default-to-xen-pv.patch b/virtman-default-to-xen-pv.patch index 77595e82..5ecbe229 100644 --- a/virtman-default-to-xen-pv.patch +++ b/virtman-default-to-xen-pv.patch @@ -1,14 +1,14 @@ -Index: virt-manager-1.0.0/virtManager/create.py +Index: virt-manager-1.0.1/virtManager/create.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/create.py -+++ virt-manager-1.0.0/virtManager/create.py -@@ -856,7 +856,12 @@ class vmmCreate(vmmGObjectUI): - # If none specified, prefer HVM. This way, the default install - # options won't be limited because we default to PV. If hvm not - # supported, differ to guest_lookup +--- virt-manager-1.0.1.orig/virtManager/create.py ++++ virt-manager-1.0.1/virtManager/create.py +@@ -857,7 +857,12 @@ class vmmCreate(vmmGObjectUI): + if gtype is None: + # If none specified, prefer HVM so install options aren't limited + # with a default PV choice. + # If xen connection, favor PV installation + conn_is_xen = self.conn.is_xen() - for g in self.caps.guests: + for g in self.conn.caps.guests: + if conn_is_xen and g.os_type == "xen": + gtype = "xen" + break diff --git a/virtman-device-flags.patch b/virtman-device-flags.patch index 40c129d7..f13c9454 100644 --- a/virtman-device-flags.patch +++ b/virtman-device-flags.patch @@ -1,8 +1,8 @@ -Index: virt-manager-1.0.0/virtManager/addhardware.py +Index: virt-manager-1.0.1/virtManager/addhardware.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/addhardware.py -+++ virt-manager-1.0.0/virtManager/addhardware.py -@@ -1287,6 +1287,18 @@ class vmmAddHardware(vmmGObjectUI): +--- virt-manager-1.0.1.orig/virtManager/addhardware.py ++++ virt-manager-1.0.1/virtManager/addhardware.py +@@ -1276,6 +1276,18 @@ class vmmAddHardware(vmmGObjectUI): if controller is not None: logging.debug("Adding controller:\n%s", controller.get_xml_config()) @@ -21,11 +21,11 @@ Index: virt-manager-1.0.0/virtManager/addhardware.py # Hotplug device attach_err = False try: -Index: virt-manager-1.0.0/virtManager/details.py +Index: virt-manager-1.0.1/virtManager/details.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/details.py -+++ virt-manager-1.0.0/virtManager/details.py -@@ -2280,6 +2280,17 @@ class vmmDetails(vmmGObjectUI): +--- virt-manager-1.0.1.orig/virtManager/details.py ++++ virt-manager-1.0.1/virtManager/details.py +@@ -2268,6 +2268,17 @@ class vmmDetails(vmmGObjectUI): text1=(_("Are you sure you want to remove this device?"))): return @@ -42,12 +42,12 @@ Index: virt-manager-1.0.0/virtManager/details.py + # Define the change try: - self.vm.remove_device(dev_id_info) -Index: virt-manager-1.0.0/virtManager/domain.py + self.vm.remove_device(devobj) +Index: virt-manager-1.0.1/virtManager/domain.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/domain.py -+++ virt-manager-1.0.0/virtManager/domain.py -@@ -898,6 +898,10 @@ class vmmDomain(vmmLibvirtObject): +--- virt-manager-1.0.1.orig/virtManager/domain.py ++++ virt-manager-1.0.1/virtManager/domain.py +@@ -928,6 +928,10 @@ class vmmDomain(vmmLibvirtObject): devxml = devobj.get_xml_config() self._backend.attachDevice(devxml) @@ -58,14 +58,14 @@ Index: virt-manager-1.0.0/virtManager/domain.py def detach_device(self, devobj): """ Hotunplug device from running guest -@@ -916,6 +920,10 @@ class vmmDomain(vmmLibvirtObject): - xml = devobj.get_xml_config() +@@ -946,6 +950,10 @@ class vmmDomain(vmmLibvirtObject): + logging.debug("Calling update_device with xml=\n%s", xml) self._backend.updateDeviceFlags(xml, flags) + def detach_device_flags(self, devtype, dev_id_info, flags): + xml = self._get_device_xml(devtype, dev_id_info) + self._backend.detachDeviceFlags(xml, flags) + - def hotplug_vcpus(self, vcpus): - vcpus = int(vcpus) - if vcpus != self.vcpu_count(): + def hotplug(self, vcpus=_SENTINEL, memory=_SENTINEL, maxmem=_SENTINEL, + description=_SENTINEL, title=_SENTINEL, storage_path=_SENTINEL, + device=_SENTINEL): diff --git a/virtman-eepro100.patch b/virtman-eepro100.patch index 7ec7d802..9747d757 100644 --- a/virtman-eepro100.patch +++ b/virtman-eepro100.patch @@ -1,8 +1,8 @@ -Index: virt-manager-0.10.1/virtManager/addhardware.py +Index: virt-manager-1.0.1/virtManager/addhardware.py =================================================================== ---- virt-manager-0.10.1.orig/virtManager/addhardware.py -+++ virt-manager-0.10.1/virtManager/addhardware.py -@@ -553,6 +553,7 @@ class vmmAddHardware(vmmGObjectUI): +--- virt-manager-1.0.1.orig/virtManager/addhardware.py ++++ virt-manager-1.0.1/virtManager/addhardware.py +@@ -555,6 +555,7 @@ class vmmAddHardware(vmmGObjectUI): if vm.is_hvm(): mod_list = ["rtl8139", "ne2k_pci", "pcnet", "e1000"] if vm.get_hv_type() in ["kvm", "qemu", "test"]: diff --git a/virtman-keycombo.patch b/virtman-keycombo.patch index e9d9b0bb..5d00c17d 100644 --- a/virtman-keycombo.patch +++ b/virtman-keycombo.patch @@ -1,8 +1,8 @@ -Index: virt-manager-0.10.1/virtManager/console.py +Index: virt-manager-1.0.1/virtManager/console.py =================================================================== ---- virt-manager-0.10.1.orig/virtManager/console.py -+++ virt-manager-0.10.1/virtManager/console.py -@@ -922,6 +922,16 @@ class vmmConsolePages(vmmGObjectUI): +--- virt-manager-1.0.1.orig/virtManager/console.py ++++ virt-manager-1.0.1/virtManager/console.py +@@ -935,6 +935,16 @@ class vmmConsolePages(vmmGObjectUI): make_item("Ctrl+Alt+_Backspace", ["Control_L", "Alt_L", "BackSpace"]) make_item("Ctrl+Alt+_Delete", ["Control_L", "Alt_L", "Delete"]) menu.add(Gtk.SeparatorMenuItem()) diff --git a/virtman-qed.patch b/virtman-qed.patch index b5b077d4..004c7ad3 100644 --- a/virtman-qed.patch +++ b/virtman-qed.patch @@ -1,8 +1,8 @@ -Index: virt-manager-0.10.1/virtManager/addhardware.py +Index: virt-manager-1.0.1/virtManager/addhardware.py =================================================================== ---- virt-manager-0.10.1.orig/virtManager/addhardware.py -+++ virt-manager-0.10.1/virtManager/addhardware.py -@@ -717,11 +717,14 @@ class vmmAddHardware(vmmGObjectUI): +--- virt-manager-1.0.1.orig/virtManager/addhardware.py ++++ virt-manager-1.0.1/virtManager/addhardware.py +@@ -700,11 +700,14 @@ class vmmAddHardware(vmmGObjectUI): combo.set_model(model) uiutil.set_combo_text_column(combo, 0) diff --git a/virtman-show-suse-install-repos.patch b/virtman-show-suse-install-repos.patch index 2e7cc18b..a9522240 100644 --- a/virtman-show-suse-install-repos.patch +++ b/virtman-show-suse-install-repos.patch @@ -1,7 +1,7 @@ -Index: virt-manager-1.0.0/virtManager/create.py +Index: virt-manager-1.0.1/virtManager/create.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/create.py -+++ virt-manager-1.0.0/virtManager/create.py +--- virt-manager-1.0.1.orig/virtManager/create.py ++++ virt-manager-1.0.1/virtManager/create.py @@ -18,6 +18,7 @@ # MA 02110-1301 USA. # @@ -10,7 +10,7 @@ Index: virt-manager-1.0.0/virtManager/create.py import logging import threading import time -@@ -367,7 +368,13 @@ class vmmCreate(vmmGObjectUI): +@@ -365,7 +366,13 @@ class vmmCreate(vmmGObjectUI): self.widget("install-url-options").set_expanded(False) urlmodel = self.widget("install-url-box").get_model() ksmodel = self.widget("install-ks-box").get_model() @@ -25,10 +25,10 @@ Index: virt-manager-1.0.0/virtManager/create.py self.populate_media_model(ksmodel, self.config.get_kickstart_urls()) self.set_distro_labels("-", "-", force=True) -Index: virt-manager-1.0.0/virtinst/util.py +Index: virt-manager-1.0.1/virtinst/util.py =================================================================== ---- virt-manager-1.0.0.orig/virtinst/util.py -+++ virt-manager-1.0.0/virtinst/util.py +--- virt-manager-1.0.1.orig/virtinst/util.py ++++ virt-manager-1.0.1/virtinst/util.py @@ -23,12 +23,14 @@ import os import random import re diff --git a/virtman-stable-os-support.patch b/virtman-stable-os-support.patch new file mode 100644 index 00000000..00673d51 --- /dev/null +++ b/virtman-stable-os-support.patch @@ -0,0 +1,14 @@ +--- virt-manager-1.0.0/virtManager/create.py.orig 2014-03-21 10:30:13.000000000 -0600 ++++ virt-manager-1.0.0/virtManager/create.py 2014-03-21 10:56:45.000000000 -0600 +@@ -66,8 +66,9 @@ INSTALL_PAGE_CONTAINER_APP = 4 + INSTALL_PAGE_CONTAINER_OS = 5 + + STABLE_OS_SUPPORT = [ +- "rhel3", "rhel4", "rhel5.4", "rhel6", +- "win2k3", "winxp", "win2k8", "vista", "win7", ++ "oes11", "sles10", "sles11", "sles12", ++ "sled10", "sled11", "sled12", ++ "win2k3", "win2k8", "win2k12", "win7", "win8", + ] + + diff --git a/virtman-update-backend.patch b/virtman-update-backend.patch index 0bff78ec..4ea56f50 100644 --- a/virtman-update-backend.patch +++ b/virtman-update-backend.patch @@ -1,8 +1,8 @@ -Index: virt-manager-1.0.0/virtManager/domain.py +Index: virt-manager-1.0.1/virtManager/domain.py =================================================================== ---- virt-manager-1.0.0.orig/virtManager/domain.py -+++ virt-manager-1.0.0/virtManager/domain.py -@@ -1849,7 +1849,14 @@ class vmmDomain(vmmLibvirtObject): +--- virt-manager-1.0.1.orig/virtManager/domain.py ++++ virt-manager-1.0.1/virtManager/domain.py +@@ -1892,7 +1892,14 @@ class vmmDomain(vmmLibvirtObject): info = [] if not self._using_events() or self._enable_cpu_stats: