Bastian Blank
2010-Aug-17 21:15 UTC
[Pkg-xen-changes] r802 - in trunk/xen/debian: . patches
Author: waldi Date: Tue Aug 17 21:14:56 2010 New Revision: 802 Log: * debian/changelog: Update. * debian/patches/series: Add patch. * debian/patches/tools-pygrub-remove-static-solaris-support.patch: Add. Added: trunk/xen/debian/patches/tools-pygrub-remove-static-solaris-support.patch Modified: trunk/xen/debian/changelog trunk/xen/debian/patches/series Modified: trunk/xen/debian/changelog =============================================================================--- trunk/xen/debian/changelog Tue Aug 17 21:02:21 2010 (r801) +++ trunk/xen/debian/changelog Tue Aug 17 21:14:56 2010 (r802) @@ -7,6 +7,7 @@ - Add check for GRUB2 commandline behaviour. - Fix handling of invalid kernel images. - Allow usage of powernow. + * Remove lowlevel python modules usage from pygrub. (closes: #588811) -- Bastian Blank <waldi at debian.org> Tue, 17 Aug 2010 21:40:17 +0200 Modified: trunk/xen/debian/patches/series =============================================================================--- trunk/xen/debian/patches/series Tue Aug 17 21:02:21 2010 (r801) +++ trunk/xen/debian/patches/series Tue Aug 17 21:14:56 2010 (r802) @@ -40,6 +40,7 @@ tools-disable.diff +tools-pygrub-remove-static-solaris-support.patch tools-blktap-crypto.patch tools-include-install.diff Added: trunk/xen/debian/patches/tools-pygrub-remove-static-solaris-support.patch =============================================================================--- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/xen/debian/patches/tools-pygrub-remove-static-solaris-support.patch Tue Aug 17 21:14:56 2010 (r802) @@ -0,0 +1,71 @@ +--- a/tools/pygrub/src/pygrub ++++ b/tools/pygrub/src/pygrub +@@ -17,7 +17,6 @@ + import copy + import logging + import platform +-import xen.lowlevel.xc + + import curses, _curses, curses.wrapper, curses.textpad, curses.ascii + import getopt +@@ -578,48 +577,6 @@ + + return grubcfg + +-def supports64bitPVguest(): +- xc = xen.lowlevel.xc.xc() +- caps = xc.xeninfo()[''xen_caps''].split(" ") +- for cap in caps: +- if cap == "xen-3.0-x86_64": +- return True +- return False +- +-# If nothing has been specified, look for a Solaris domU. If found, perform the +-# necessary tweaks. +-def sniff_solaris(fs, cfg): +- if not fs.file_exists("/platform/i86xpv/kernel/unix"): +- return cfg +- +- if not cfg["kernel"]: +- if supports64bitPVguest() and \ +- fs.file_exists("/platform/i86xpv/kernel/amd64/unix"): +- cfg["kernel"] = "/platform/i86xpv/kernel/amd64/unix" +- cfg["ramdisk"] = "/platform/i86pc/amd64/boot_archive" +- else: +- cfg["kernel"] = "/platform/i86xpv/kernel/unix" +- cfg["ramdisk"] = "/platform/i86pc/boot_archive" +- +- # Unpleasant. Typically we''ll have ''root=foo -k'' or ''root=foo /kernel -k'', +- # and we need to maintain Xen properties (root= and ip=) and the kernel +- # before any user args. +- +- xenargs = "" +- userargs = "" +- +- if not cfg["args"]: +- cfg["args"] = cfg["kernel"] +- else: +- for arg in cfg["args"].split(): +- if re.match("^root=", arg) or re.match("^ip=", arg): +- xenargs += arg + " " +- elif arg != cfg["kernel"]: +- userargs += arg + " " +- cfg["args"] = xenargs + " " + cfg["kernel"] + " " + userargs +- +- return cfg +- + def sniff_netware(fs, cfg): + if not fs.file_exists("/nwserver/xnloader.sys"): + return cfg +@@ -706,10 +663,7 @@ + else: + fs = fsimage.open(file, get_fs_offset(file)) + +- chosencfg = sniff_solaris(fs, incfg) +- +- if not chosencfg["kernel"]: +- chosencfg = sniff_netware(fs, incfg) ++ chosencfg = sniff_netware(fs, incfg) + + if not chosencfg["kernel"]: + chosencfg = run_grub(file, entry, fs, incfg["args"])