[Pkg-xen-changes] r324 - trunk/xen-unstable/debian/patches
Bastian Blank
waldi at costa.debian.org
Thu Sep 21 21:40:58 UTC 2006
Author: waldi
Date: Thu Sep 21 21:40:58 2006
New Revision: 324
Added:
trunk/xen-unstable/debian/patches/path-relative.dpatch (contents, props changed)
Modified:
trunk/xen-unstable/debian/patches/00list
Log:
* debian/patches/00list: Add path-relative.
* debian/patches/path-relative.dpatch: Add.
Modified: trunk/xen-unstable/debian/patches/00list
==============================================================================
--- trunk/xen-unstable/debian/patches/00list (original)
+++ trunk/xen-unstable/debian/patches/00list Thu Sep 21 21:40:58 2006
@@ -6,4 +6,5 @@
libs
qemu-arch
blktap-disable
+path-relative
abi-revert-1
Added: trunk/xen-unstable/debian/patches/path-relative.dpatch
==============================================================================
--- (empty file)
+++ trunk/xen-unstable/debian/patches/path-relative.dpatch Thu Sep 21 21:40:58 2006
@@ -0,0 +1,54 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## kernel-path-relative.dpatch by Bastian Blank <waldi at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad xen-unstable~/tools/python/xen/xm/create.py xen-unstable/tools/python/xen/xm/create.py
+--- xen-unstable~/tools/python/xen/xm/create.py 2006-09-21 21:44:56.000000000 +0200
++++ xen-unstable/tools/python/xen/xm/create.py 2006-09-21 23:24:49.000000000 +0200
+@@ -462,6 +462,14 @@
+ else:
+ return s
+
++def abspath(file, dir):
++ if file[0] == '/':
++ return file
++
++ import xen.util.auxbin
++ path = xen.util.auxbin.root()
++ return os.path.join(path, dir, file)
++
+ def configure_image(vals):
+ """Create the image config.
+ """
+@@ -469,9 +477,9 @@
+ return None
+ config_image = [ vals.builder ]
+ if vals.kernel:
+- config_image.append([ 'kernel', os.path.abspath(vals.kernel) ])
++ config_image.append([ 'kernel', abspath(vals.kernel, 'boot') ])
+ if vals.ramdisk:
+- config_image.append([ 'ramdisk', os.path.abspath(vals.ramdisk) ])
++ config_image.append([ 'ramdisk', abspath(vals.ramdisk, 'boot') ])
+ if vals.cmdline_ip:
+ cmdline_ip = strip('ip=', vals.cmdline_ip)
+ config_image.append(['ip', cmdline_ip])
+@@ -634,13 +642,15 @@
+ def configure_hvm(config_image, vals):
+ """Create the config for HVM devices.
+ """
+- args = [ 'device_model', 'pae', 'vcpus', 'boot', 'fda', 'fdb',
++ args = [ 'pae', 'vcpus', 'boot', 'fda', 'fdb',
+ 'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
+ 'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'sdl', 'display',
+ 'acpi', 'apic', 'xauthority', 'usb', 'usbdevice' ]
+ for a in args:
+ if (vals.__dict__[a]):
+ config_image.append([a, vals.__dict__[a]])
++ if vals.device_model:
++ config_image.append([ 'device_model', abspath(vals.device_model, 'bin') ])
+
+ def run_bootloader(vals, config_image):
+ if not os.access(vals.bootloader, os.X_OK):
More information about the Pkg-xen-changes
mailing list