[Pkg-libvirt-commits] [SCM] Virt Installer packaging branch, master, updated. debian/0.400.0-4-5-g5727f74
Guido Guenther
agx at sigxcpu.org
Wed Nov 19 18:00:18 UTC 2008
The following commit has been merged in the master branch:
commit b63225fe9f73153f676041f4f7947b5b49314318
Author: Guido Günther <agx at sigxcpu.org>
Date: Thu Oct 30 15:02:35 2008 +0100
Add support for xen paravirt installs
(0009-Add-support-for-Debian-Xen-paravirt-installs.patch)
diff --git a/debian/patches/0009-Add-support-for-Debian-Xen-paravirt-installs.patch b/debian/patches/0009-Add-support-for-Debian-Xen-paravirt-installs.patch
new file mode 100644
index 0000000..f07d011
--- /dev/null
+++ b/debian/patches/0009-Add-support-for-Debian-Xen-paravirt-installs.patch
@@ -0,0 +1,81 @@
+From 54b46ed5a7fdb9eb9e2cffc5ae5d387857cf27ae Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Thu, 30 Oct 2008 15:01:16 +0100
+Subject: [PATCH] Add support for Debian Xen paravirt installs
+
+Lenny supports this. Also add support for
+'http://people.debian.org/~joeyh/d-i/' which is the location of the
+debian-installer daily builds but has a slightly different layout (images/daily
+instead of current/images).
+---
+ virtinst/OSDistro.py | 42 ++++++++++++++++++++++++++++++++++--------
+ 1 files changed, 34 insertions(+), 8 deletions(-)
+
+diff --git a/virtinst/OSDistro.py b/virtinst/OSDistro.py
+index 846a165..b4b65a9 100644
+--- a/virtinst/OSDistro.py
++++ b/virtinst/OSDistro.py
+@@ -487,17 +487,25 @@ class SuseDistro(Distro):
+
+
+ class DebianDistro(Distro):
+- def isValidStore(self, fetcher, progresscb):
+- # Don't support any paravirt installs
+- if self.type is not None and self.type != "hvm":
+- return False
++ # location e.g. http://ftp.egr.msu.edu/debian/dists/sarge/main/installer-i386/
++
++ def __init__(self, uri, type=None, scratchdir=None, arch=None):
++ Distro.__init__(self, uri, type, scratchdir, arch)
++ if re.match(r'i[4-9]86', arch):
++ self.arch = 'i386'
++ self._prefix = 'current/images'
+
++ def isValidStore(self, fetcher, progresscb):
+ file = None
+ try:
+ try:
+ file = None
+- if fetcher.hasFile("current/images/MANIFEST"):
+- file = fetcher.acquireFile("current/images/MANIFEST",
++ if fetcher.hasFile("%s/MANIFEST" % self._prefix):
++ file = fetcher.acquireFile("%s/MANIFEST" % self._prefix,
++ progresscb)
++ elif fetcher.hasFile("images/daily/MANIFEST"):
++ self._prefix = "images/daily"
++ file = fetcher.acquireFile("%s/MANIFEST" % self._prefix,
+ progresscb)
+ else:
+ logging.debug("Doesn't look like a Debian distro.")
+@@ -523,8 +531,26 @@ class DebianDistro(Distro):
+ return False
+
+ def acquireBootDisk(self, fetcher, progresscb):
+- # eg from http://ftp.egr.msu.edu/debian/dists/sarge/main/installer-i386/
+- return fetcher.acquireFile("current/images/netboot/mini.iso", progresscb)
++ return fetcher.acquireFile("%s/netboot/mini.iso" % self._prefix, progresscb)
++
++ def acquireKernel(self, fetcher, progresscb):
++ if self.type is None or self.type == "hvm":
++ kernelpath = "%s/netboot/debian-installer/%s/linux" % (self._prefix, self.arch)
++ initrdpath = "%s/netboot/debian-installer/%s/initrd.gz" % (self._prefix, self.arch)
++ else:
++ kernelpath = "%s/netboot/xen/vmlinuz" % self._prefix
++ initrdpath = "%s/netboot/xen/initrd.gz" % self._prefix
++
++ kernel = fetcher.acquireFile(kernelpath, progresscb)
++ try:
++ initrd = fetcher.acquireFile(initrdpath, progresscb)
++ if fetcher.location.startswith("/"):
++ # Local host path, so can't pass a location to guest for install method
++ return (kernel, initrd, "")
++ else:
++ return (kernel, initrd, "method=" + fetcher.location)
++ except:
++ os.unlink(kernel)
+
+
+ class UbuntuDistro(Distro):
+--
+1.6.0.1
+
diff --git a/debian/patches/series b/debian/patches/series
index b321b85..f2778c6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
0006-scratchdir-for-uid-0.patch
0007-create-scratchdir-if-it-doesn-t-exist.patch
0008-use-virtio-for-Lenny-guests.patch
+0009-Add-support-for-Debian-Xen-paravirt-installs.patch
--
Virt Installer packaging
More information about the Pkg-libvirt-commits
mailing list