Hello community, here is the log from the commit of package python-virtinst for openSUSE:Factory checked in at 2013-07-05 15:11:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-virtinst (Old) and /work/SRC/openSUSE:Factory/.python-virtinst.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-virtinst" Changes: -------- --- /work/SRC/openSUSE:Factory/python-virtinst/python-virtinst.changes 2013-06-07 10:08:30.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-virtinst.new/python-virtinst.changes 2013-07-05 15:11:12.000000000 +0200 @@ -1,0 +2,10 @@ +Wed Jul 3 14:52:48 MDT 2013 - carn...@suse.com + +- Allow virt-install to install Xen PV guests from ISO media + virtinst-allow-pv-iso-install.patch +- Detect SUSE installation sources and use as default when found + virtinst-detect-suse-distros.patch +- Include additional SUSE disto versions in pop up menu + virtinst-support-suse-distros.patch + +------------------------------------------------------------------- New: ---- virtinst-allow-pv-iso-install.patch virtinst-detect-suse-distros.patch virtinst-support-suse-distros.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-virtinst.spec ++++++ --- /var/tmp/diff_new_pack.KHuork/_old 2013-07-05 15:11:13.000000000 +0200 +++ /var/tmp/diff_new_pack.KHuork/_new 2013-07-05 15:11:13.000000000 +0200 @@ -47,6 +47,9 @@ Patch15: virtinst-xen-drive-type.patch Patch16: virtinst-s390x-media-paths.patch Patch17: virtinst-clone-disks.patch +Patch18: virtinst-allow-pv-iso-install.patch +Patch19: virtinst-support-suse-distros.patch +Patch20: virtinst-detect-suse-distros.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build #BuildArch: noarch @@ -85,6 +88,9 @@ %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 %build python setup.py build ++++++ virtinst-allow-pv-iso-install.patch ++++++ Index: virtinst-0.600.4/virtinst/DistroInstaller.py =================================================================== --- virtinst-0.600.4.orig/virtinst/DistroInstaller.py +++ virtinst-0.600.4/virtinst/DistroInstaller.py @@ -431,7 +431,7 @@ class DistroInstaller(Installer.Installe return False is_url = not self._location_is_path - mount_dvd = self._location_is_path and not self.cdrom + mount_dvd = self._location_is_path and self.cdrom return bool(is_url or mount_dvd) @@ -440,11 +440,14 @@ class DistroInstaller(Installer.Installe dev = None if self.cdrom: - if self.location: - dev = self._prepare_cdrom(guest, meter) + if self.is_xenpv() and guest._lookup_osdict_key('pv_cdrom_install'): + dev = self._prepare_kernel_and_initrd(guest, meter) else: - # Booting from a cdrom directly allocated to the guest - pass + if self.location: + dev = self._prepare_cdrom(guest, meter) + else: + # Booting from a cdrom directly allocated to the guest + pass else: dev = self._prepare_kernel_and_initrd(guest, meter) ++++++ virtinst-detect-suse-distros.patch ++++++ Index: virtinst-0.600.4/virtinst/OSDistro.py =================================================================== --- virtinst-0.600.4.orig/virtinst/OSDistro.py +++ virtinst-0.600.4/virtinst/OSDistro.py @@ -68,8 +68,15 @@ def _storeForDistro(fetcher, baseuri, ty arch, typ, scratchdir) if dist: return dist + else: + dist = virtinst.OSDistro.distroFromContent(fetcher, progresscb, baseuri, + arch, typ, scratchdir) + skip_treeinfo = True + if dist: + return dist + # FIXME: This 'distro ==' doesn't cut it. 'distro' is from our os # dictionary, so would look like 'fedora9' or 'rhel5', so this needs # to be a bit more intelligent @@ -225,6 +232,55 @@ def distroFromTreeinfo(fetcher, progress return ob +def distroFromContent(fetcher, progresscb, uri, arch, vmtype=None, + scratchdir=None): + # Parse content file for the 'LABEL' field containing the distribution name + # None if no content, GenericDistro if unknown label type. + if not fetcher.hasFile("content"): + return None + + distribution = None + filename = fetcher.acquireFile("content", progresscb) + cbuf = f = None + try: + f = open(filename, "r") + cbuf = f.read() + except: + if f: + f.close() + os.unlink(filename) + return None + f.close() + os.unlink(filename) + + lines = cbuf.splitlines()[1:] + for line in lines: + if line.startswith("LABEL "): + distribution = line.split(' ', 1) + break + if distribution is None or len(distribution) < 2: + return None + + if re.match(".*SUSE Linux Enterprise Server 11.*", distribution[1]): + dclass = SLES11Distro + elif re.match(".*SUSE Linux Enterprise Server 10.*", distribution[1]): + dclass = SLES10Distro + elif re.match(".*SUSE Linux Enterprise Desktop 11.*", distribution[1]): + dclass = SLED11Distro + elif re.match(".*SUSE Linux Enterprise Desktop 10.*", distribution[1]): + dclass = SLED10Distro + elif re.match(".*openSUSE.*", distribution[1]): + dclass = OpensuseDistro + else: + dclass = GenericDistro + + ob = dclass(uri, arch, vmtype, scratchdir) + + # Explictly call this, so we populate os_type/variant info + ob.isValidStore(fetcher, progresscb) + + return ob + # An image store is a base class for retrieving either a bootable # ISO image, or a kernel+initrd pair for a particular OS distribution @@ -902,6 +958,35 @@ class SuseDistro(Distro): #pass os.system("rm -rf " + cpiodir) +# Suse image store is harder - we fetch the kernel RPM and a helper +# RPM and then munge bits together to generate a initrd +class SLED10Distro(SuseDistro): + + os_variant = "sled10" + +# Suse image store is harder - we fetch the kernel RPM and a helper +# RPM and then munge bits together to generate a initrd +class SLED11Distro(SuseDistro): + + os_variant = "sled11" + +# Suse image store is harder - we fetch the kernel RPM and a helper +# RPM and then munge bits together to generate a initrd +class SLES10Distro(SuseDistro): + + os_variant = "sles10" + +# Suse image store is harder - we fetch the kernel RPM and a helper +# RPM and then munge bits together to generate a initrd +class SLES11Distro(SuseDistro): + + os_variant = "sles11" + +# Suse image store is harder - we fetch the kernel RPM and a helper +# RPM and then munge bits together to generate a initrd +class OpensuseDistro(SuseDistro): + + os_variant = "opensuse11" class DebianDistro(Distro): # ex. http://ftp.egr.msu.edu/debian/dists/sarge/main/installer-i386/ ++++++ virtinst-support-suse-distros.patch ++++++ Index: virtinst-0.600.4/virtinst/osdict.py =================================================================== --- virtinst-0.600.4.orig/virtinst/osdict.py +++ virtinst-0.600.4/virtinst/osdict.py @@ -397,6 +397,7 @@ OS_TYPES = { "label": "openSuse 11", "distro": "suse", "supported": True, + "pv_cdrom_install": True, "devices" : { DISK : VIRTIO_DISK, NET : VIRTIO_NET, @@ -406,6 +407,34 @@ OS_TYPES = { "label": "openSuse 12", "distro": "suse", "supported": True, + "pv_cdrom_install": True, + "devices" : { + DISK : VIRTIO_DISK, + NET : VIRTIO_NET, + }, + }, + "opensuse13": { + "label": "openSuse 13", + "distro": "suse", + "supported": True, + "pv_cdrom_install": True, + "devices" : { + DISK : VIRTIO_DISK, + NET : VIRTIO_NET, + }, + }, + + "oes2l": { + "label": "Novell Open Enterprise Server 2", + "distro": "suse", + "supported": True, + "pv_cdrom_install": True, + }, + "oes11": { + "label": "Novell Open Enterprise Server 11", + "distro": "suse", + "supported": True, + "pv_cdrom_install": True, "devices" : { DISK : VIRTIO_DISK, NET : VIRTIO_NET, @@ -416,11 +445,30 @@ OS_TYPES = { "label": "Suse Linux Enterprise Server", "distro": "suse", "supported": True, + "pv_cdrom_install": True, }, "sles11": { "label": "Suse Linux Enterprise Server 11", "distro": "suse", "supported": True, + "pv_cdrom_install": True, + "devices" : { + DISK : VIRTIO_DISK, + NET : VIRTIO_NET, + }, + }, + + "sled10": { + "label": "Suse Linux Enterprise Desktop", + "distro": "suse", + "supported": True, + "pv_cdrom_install": True, + }, + "sled11": { + "label": "Suse Linux Enterprise Desktop 11", + "distro": "suse", + "supported": True, + "pv_cdrom_install": True, "devices" : { DISK : VIRTIO_DISK, NET : VIRTIO_NET, @@ -651,6 +699,12 @@ OS_TYPES = { "sortby": "mswinserv2008", "distro": "winserv", }, + "win2k12": { + "label": "Microsoft Windows Server 2012", + "supported": True, + "sortby": "mswinserv2012", + "distro": "winserv", + }, "vista": { "label": "Microsoft Windows Vista", "supported": True, @@ -663,6 +717,12 @@ OS_TYPES = { "sortby": "mswin7", "distro": "win", }, + "win8": { + "label": "Microsoft Windows 8", + "supported": True, + "sortby": "mswin8", + "distro": "win", + }, }, }, @@ -739,6 +799,13 @@ OS_TYPES = { "apic": False, }, + "rear": { + "label": "Relax and Recover", + "distro": "suse", + "supported": True, + "pv_cdrom_install": True, + }, + "netware4": { "label": "Novell Netware 4", }, @@ -747,6 +814,7 @@ OS_TYPES = { }, "netware6": { "label": "Novell Netware 6", + "supported": True, "pv_cdrom_install": True, }, -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org