aboutsummaryrefslogtreecommitdiffstats
path: root/testing/xen/pygrub_alpine.patch
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@entel.upc.edu>2012-01-07 00:46:20 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2012-01-12 20:39:35 +0000
commit49beded59a8d56b930765c9af2bbf3e0983e892c (patch)
tree28f0ddbc9df8725c957e9339314cf072e54463d8 /testing/xen/pygrub_alpine.patch
parent7ea9d9d7e0103e8ba8c023479de918206e52266a (diff)
downloadaports-49beded59a8d56b930765c9af2bbf3e0983e892c.tar.bz2
aports-49beded59a8d56b930765c9af2bbf3e0983e892c.tar.xz
testing/xen: add xen 4.1.2
Build full Xen distribution. Changes since v4: * Removed "opts=" from xencommons init script. * Backported upstream patch to boot Syslinux PV-DomUs with pygrub (allows booting Alpine PV-DomUs). Changes since v3: * Added bash as a runtime dependency, since some hotplug scripts use that instead of /bin/sh. Changes since v2: * Clean and updated init scripts to be as similar as possible to upstream version. Changes since v1: * Removed net from xencommons dependencies and added udev.
Diffstat (limited to 'testing/xen/pygrub_alpine.patch')
-rw-r--r--testing/xen/pygrub_alpine.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/testing/xen/pygrub_alpine.patch b/testing/xen/pygrub_alpine.patch
new file mode 100644
index 0000000000..9d6ee577a8
--- /dev/null
+++ b/testing/xen/pygrub_alpine.patch
@@ -0,0 +1,64 @@
+# HG changeset patch
+# Parent 3e02aa9670b3265e36bdddbd4760415cd87d047b
+pygrub: fix extlinux parsing
+
+pygrub was unable to parse extlinux config files correctly, exactly
+the ones like:
+
+LABEL grsec
+ KERNEL vmlinuz-3.0.10-grsec
+ APPEND initrd=initramfs-3.0.10-grsec
+root=UUID=cfd4a7b4-8c40-4025-b877-8205f1c622ee
+modules=sd-mod,usb-storage,ext4 xen quiet
+
+This patch fixes it, adding a new case when parsing the "append" line,
+that searches for the initrd image.
+
+Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
+
+diff -r 3e02aa9670b3 tools/pygrub/examples/alpine-linux-2.3.2.extlinux
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/tools/pygrub/examples/alpine-linux-2.3.2.extlinux Tue Jan 03 13:11:46 2012 +0100
+@@ -0,0 +1,11 @@
++DEFAULT menu.c32
++PROMPT 0
++MENU TITLE Alpine/Linux Boot Menu
++MENU HIDDEN
++MENU AUTOBOOT Alpine will be booted automatically in # seconds.
++TIMEOUT 30
++LABEL grsec
++ MENU DEFAULT
++ MENU LABEL Linux 3.0.10-grsec
++ KERNEL vmlinuz-3.0.10-grsec
++ APPEND initrd=initramfs-3.0.10-grsec root=UUID=a97ffe64-430f-4fd3-830e-4736d9a27af0 modules=sd-mod,usb-storage,ext4 quiet
+diff -r 3e02aa9670b3 tools/pygrub/src/ExtLinuxConf.py
+--- a/tools/pygrub/src/ExtLinuxConf.py Thu Dec 15 18:55:46 2011 +0100
++++ b/tools/pygrub/src/ExtLinuxConf.py Tue Jan 03 13:11:46 2012 +0100
+@@ -60,6 +60,13 @@ class ExtLinuxImage(object):
+
+ # Bypass regular self.commands handling
+ com = None
++ elif arg.find("initrd="):
++ # find initrd image in append line
++ args = arg.strip().split(" ")
++ for a in args:
++ if a.lower().startswith("initrd="):
++ setattr(self, "initrd", a.replace("initrd=", ""))
++ arg = arg.replace(a, "")
+
+ if com is not None and self.commands.has_key(com):
+ if self.commands[com] is not None:
+@@ -86,10 +93,12 @@ class ExtLinuxImage(object):
+ self._args = args
+ def get_kernel(self):
+ return self._kernel
++ def set_args(self, val):
++ self._args = val
+ def get_args(self):
+ return self._args
+ kernel = property(get_kernel, set_kernel)
+- args = property(get_args)
++ args = property(get_args, set_args)
+
+ def set_initrd(self, val):
+ self._initrd = (None,val)