diff --git a/python-virtinst.spec b/python-virtinst.spec index 1fc6055..5ea30e0 100644 --- a/python-virtinst.spec +++ b/python-virtinst.spec @@ -17,8 +17,17 @@ Summary: Python modules and utilities for installing virtual machines Name: python-%{appname} Version: 0.500.0 -Release: 1%{_extra_release} +Release: 2%{_extra_release} Source0: http://virt-manager.org/download/sources/%{appname}/%{appname}-%{version}.tar.gz +# Don't erroneously set limit for amount of virtio devices (bz 499654) +Patch1: %{appname}-%{version}-virtio-dev-limit.patch +# Don't use virtio for cdrom devices (bz 517151) +Patch2: %{appname}-%{version}-virtio-cdrom.patch +# Rawhide/F11 can auto detect keymapping (bz 487735) +Patch3: %{appname}-%{version}-no-default-keymap.patch +# Update test suite to verify patches +Patch4: %{appname}-%{version}-update-testsuite.patch + License: GPLv2+ Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -45,6 +54,10 @@ and install new VMs) and virt-clone (clone an existing virtual machine). %prep %setup -q -n %{appname}-%{version} +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build python setup.py build @@ -80,6 +93,11 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/virt-convert %changelog +* Sun Sep 13 2009 Cole Robinson - 0.500.0-2.fc12 +- Don't erroneously set limit for amount of virtio devices (bz 499654) +- Don't use virtio for cdrom devices (bz 517151) +- Auto detect keymapping (bz 487735) + * Tue Jul 28 2009 Cole Robinson - 0.500.0-1.fc12 - Update to version 0.500.0 - New virt-install device options --serial, --parallel, and --video diff --git a/virtinst-0.500.0-no-default-keymap.patch b/virtinst-0.500.0-no-default-keymap.patch new file mode 100644 index 0000000..94784a1 --- /dev/null +++ b/virtinst-0.500.0-no-default-keymap.patch @@ -0,0 +1,15 @@ +diff -r 712276328f75 virtinst/VirtualGraphics.py +--- a/virtinst/VirtualGraphics.py Wed Apr 08 10:27:20 2009 -0400 ++++ b/virtinst/VirtualGraphics.py Thu Apr 09 09:48:36 2009 -0400 +@@ -55,8 +55,9 @@ + def get_keymap(self): + return self._keymap + def set_keymap(self, val): +- if not val: +- val = _util.default_keymap() ++ if val == None: ++ self._keymap = val ++ return + if not val or type(val) != type("string"): + raise ValueError, _("Keymap must be a string") + if len(val) > 16: diff --git a/virtinst-0.500.0-update-testsuite.patch b/virtinst-0.500.0-update-testsuite.patch new file mode 100644 index 0000000..3b27791 --- /dev/null +++ b/virtinst-0.500.0-update-testsuite.patch @@ -0,0 +1,63 @@ +diff -rup old/tests/testdriver.xml virtinst-0.500.0/tests/testdriver.xml +--- old/tests/testdriver.xml 2009-09-13 19:06:49.000000000 -0400 ++++ virtinst-0.500.0/tests/testdriver.xml 2009-09-13 19:07:02.000000000 -0400 +@@ -62,19 +62,25 @@ + default-vol + 1000000 + 50000 +- ++ ++ ++ + + + testvol1.img + 1000000 + 50000 +- ++ ++ ++ + + + testvol2.img + 1000000 + 50000 +- ++ ++ ++ + + + +@@ -153,7 +159,9 @@ + testvol1.img + 107374182400 + 107374182400 +- ++ ++ ++ + + + +diff -rup old/tests/xmlconfig.py virtinst-0.500.0/tests/xmlconfig.py +--- old/tests/xmlconfig.py 2009-09-13 19:06:49.000000000 -0400 ++++ virtinst-0.500.0/tests/xmlconfig.py 2009-09-13 19:10:56.000000000 -0400 +@@ -28,7 +28,7 @@ from virtinst import VirtualCharDevice + from virtinst import VirtualVideoDevice + import tests + +-conn = libvirt.open("test:///default") ++conn = tests.open_testdriver() + + def get_basic_paravirt_guest(): + g = virtinst.ParaVirtGuest(connection=conn, type="xen") +@@ -41,7 +41,6 @@ def get_basic_paravirt_guest(): + g.vcpus = 5 + return g + +-conn = libvirt.open("test:///default") + def get_basic_fullyvirt_guest(typ="xen"): + g = virtinst.FullVirtGuest(connection=conn, type=typ, + emulator="/usr/lib/xen/bin/qemu-dm", diff --git a/virtinst-0.500.0-virtio-cdrom.patch b/virtinst-0.500.0-virtio-cdrom.patch new file mode 100644 index 0000000..1bbf05e --- /dev/null +++ b/virtinst-0.500.0-virtio-cdrom.patch @@ -0,0 +1,83 @@ +# HG changeset patch +# User Cole Robinson +# Date 1252880415 14400 +# Node ID 252ff7bc5ff9e95f49dd7deb6ef6af07287a5055 +# Parent 726dc69533961f5cf7865e35be2b851f5f686c52 +Don't use virtio for cdrom/floppy devices (bz 517151) + +Also add a test case to prevent against this issue in the future. + +diff -r 726dc6953396 -r 252ff7bc5ff9 tests/xmlconfig-xml/install-f11.xml +--- a/tests/xmlconfig-xml/install-f11.xml Sun Sep 13 13:05:53 2009 -0400 ++++ b/tests/xmlconfig-xml/install-f11.xml Sun Sep 13 18:20:15 2009 -0400 +@@ -17,6 +17,10 @@ + 5 + + /usr/lib/xen/bin/qemu-dm ++ ++ ++ ++ + + + +@@ -25,6 +29,11 @@ + + + ++ ++ ++ ++ ++ + + + +diff -r 726dc6953396 -r 252ff7bc5ff9 tests/xmlconfig.py +--- a/tests/xmlconfig.py Sun Sep 13 13:05:53 2009 -0400 ++++ b/tests/xmlconfig.py Sun Sep 13 18:20:15 2009 -0400 +@@ -57,6 +57,9 @@ + g.vcpus = 5 + return g + ++def get_floppy(path="/default-pool/testvol1.img"): ++ return VirtualDisk(path, conn=conn, device=VirtualDisk.DEVICE_FLOPPY) ++ + def get_filedisk(path="/tmp/test.img"): + return VirtualDisk(path, size=.0001, conn=conn) + +@@ -326,8 +329,11 @@ + g = get_basic_fullyvirt_guest("kvm") + g.os_type = "linux" + g.os_variant = "fedora11" +- g.installer = virtinst.PXEInstaller(type="kvm", os_type="hvm", +- conn=g.conn) ++ g.installer = virtinst.DistroInstaller(type="kvm", os_type="hvm", ++ conn=g.conn, ++ location="/default-pool/default-vol") ++ g.installer.cdrom = True ++ g.disks.append(get_floppy()) + g.disks.append(get_filedisk()) + g.disks.append(get_blkdisk()) + g.nics.append(get_virtual_network()) +diff -r 726dc6953396 -r 252ff7bc5ff9 virtinst/FullVirtGuest.py +--- a/virtinst/FullVirtGuest.py Sun Sep 13 13:05:53 2009 -0400 ++++ b/virtinst/FullVirtGuest.py Sun Sep 13 18:20:15 2009 -0400 +@@ -24,6 +24,7 @@ + + from Guest import Guest + from VirtualDevice import VirtualDevice ++from VirtualDisk import VirtualDisk + from VirtualInputDevice import VirtualInputDevice + from VirtualCharDevice import VirtualCharDevice + +@@ -122,7 +123,8 @@ + if net_model and not net.model: + net.model = net_model + for disk in self._get_install_devs(VirtualDevice.VIRTUAL_DEV_DISK): +- if disk_bus and not disk.bus: ++ if (disk_bus and not disk.bus and ++ disk.device == VirtualDisk.DEVICE_DISK): + disk.bus = disk_bus + + # If no serial devices were attached to the guest, stick the default diff --git a/virtinst-0.500.0-virtio-dev-limit.patch b/virtinst-0.500.0-virtio-dev-limit.patch new file mode 100644 index 0000000..a2e925c --- /dev/null +++ b/virtinst-0.500.0-virtio-dev-limit.patch @@ -0,0 +1,42 @@ +# HG changeset patch +# User Cole Robinson +# Date 1252861553 14400 +# Node ID 726dc69533961f5cf7865e35be2b851f5f686c52 +# Parent 0d3cdc5ff5d091dd73d3ef0fe21123fb63b4d7a0 +Don't erroneously limit the amount of virtio disks (bz 499654) + +Just let qemu error if we add too many. + +diff -r 0d3cdc5ff5d0 -r 726dc6953396 tests/clitest.py +--- a/tests/clitest.py Wed Aug 05 14:37:02 2009 -0400 ++++ b/tests/clitest.py Sun Sep 13 13:05:53 2009 -0400 +@@ -128,6 +128,8 @@ + "--disk vol=%(POOL)s/%(VOL)s", + # 3 IDE and CD + "--disk path=%(EXISTIMG1)s --disk path=%(EXISTIMG1)s --disk path=%(EXISTIMG1)s --disk path=%(EXISTIMG1)s,device=cdrom", ++ # > 16 scsi disks ++ " --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi --disk path=%(EXISTIMG1)s,bus=scsi", + ], + + "invalid": [ +diff -r 0d3cdc5ff5d0 -r 726dc6953396 virtinst/VirtualDisk.py +--- a/virtinst/VirtualDisk.py Wed Aug 05 14:37:02 2009 -0400 ++++ b/virtinst/VirtualDisk.py Sun Sep 13 13:05:53 2009 -0400 +@@ -1142,12 +1142,14 @@ + the passed parameters. + @returns: str prefix, or None if no reasonable guess can be made + """ ++ # The upper limits here aren't necessarilly 1024, but let the HV ++ # error as appropriate. + if self.bus == "virtio": +- return ("vd", 16) ++ return ("vd", 1024) + elif self.bus == "scsi" or self.bus == "usb": +- return ("sd", 16) ++ return ("sd", 1024) + elif self.bus == "xen": +- return ("xvd", 16) ++ return ("xvd", 1024) + elif self.bus == "fdc" or self.device == self.DEVICE_FLOPPY: + return ("fd", 2) + elif self.bus == "ide":