Author: waldi Date: Fri Aug 3 13:19:50 2007 New Revision: 426 Log: * debian/patches/series: Update. * debian/patches/tools-libfsimage-prefix.diff, debian/patches/tools-pygrub-prefix.diff: Install pygrub into xen tree. * debian/patches/tools-misc-prefix.diff, debian/patches/tools-python-prefix.diff: Add. * debian/patches/tools-prefix-python.diff: Remove. Added: trunk/xen-3/debian/patches/tools-misc-prefix.diff trunk/xen-3/debian/patches/tools-python-prefix.diff Removed: trunk/xen-3/debian/patches/tools-prefix-python.diff Modified: trunk/xen-3/debian/patches/series trunk/xen-3/debian/patches/tools-libfsimage-prefix.diff trunk/xen-3/debian/patches/tools-pygrub-prefix.diff Modified: trunk/xen-3/debian/patches/series =============================================================================--- trunk/xen-3/debian/patches/series (original) +++ trunk/xen-3/debian/patches/series Fri Aug 3 13:19:50 2007 @@ -1,7 +1,8 @@ config-prefix.diff tools-rpath.diff tools-prefix.diff -tools-prefix-python.diff +tools-misc-prefix.diff +tools-python-prefix.diff tools-ldflags.diff version.patch tools-lib-abiname.diff Modified: trunk/xen-3/debian/patches/tools-libfsimage-prefix.diff =============================================================================--- trunk/xen-3/debian/patches/tools-libfsimage-prefix.diff (original) +++ trunk/xen-3/debian/patches/tools-libfsimage-prefix.diff Fri Aug 3 13:19:50 2007 @@ -1,6 +1,6 @@ --- xen-3.orig/tools/libfsimage/Rules.mk +++ xen-3/tools/libfsimage/Rules.mk -@@ -7,11 +7,8 @@ +@@ -7,11 +7,7 @@ PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) @@ -9,19 +9,7 @@ -FSDIR-$(CONFIG_SunOS)-x86_32 = lib/fs/$(FS)/ -FSDIR-$(CONFIG_SunOS) = $(FSDIR-$(CONFIG_SunOS)-$(XEN_TARGET_ARCH)) -FSDIR = $(FSDIR-y) -+LIBDIR = lib/pygrub +FSDIR = $(LIBDIR)/fs/$(FS) FSLIB = fsimage.so ---- xen-3.orig/tools/libfsimage/common/Makefile -+++ xen-3/tools/libfsimage/common/Makefile -@@ -1,6 +1,8 @@ - XEN_ROOT = ../../.. - include $(XEN_ROOT)/tools/Rules.mk - -+LIBDIR = lib/pygrub -+ - CFLAGS += -Werror -Wp,-MD,.$(@F).d - DEPS = .*.d - Added: trunk/xen-3/debian/patches/tools-misc-prefix.diff =============================================================================--- (empty file) +++ trunk/xen-3/debian/patches/tools-misc-prefix.diff Fri Aug 3 13:19:50 2007 @@ -0,0 +1,61 @@ +--- xen-3.orig/tools/misc/xend ++++ xen-3/tools/misc/xend +@@ -31,15 +31,10 @@ + import time + import commands + +-result = commands.getstatusoutput(os.path.join(os.path.dirname(sys.argv[0]), +- ''xen-python-path'')) +-if result[0] != 0: +- print >>sys.stderr, result[1] +- sys.exit(1) +- +-sys.path.append(result[1]) ++sys.path.append(sys.path[0] + ''/../lib/python'') + + from xen.xend.server import SrvDaemon ++from xen.util.auxbin import execute + + class CheckError(ValueError): + pass +@@ -76,19 +71,19 @@ + raise CheckError("invalid user") + + def start_xenstored(): +- XENSTORED_TRACE = os.getenv("XENSTORED_TRACE") +- cmd = "xenstored --pid-file /var/run/xenstore.pid" +- if XENSTORED_TRACE: +- cmd += " -T /var/log/xen/xenstored-trace.log" +- s,o = commands.getstatusoutput(cmd) ++ args = ["--pid-file", "/var/run/xenstore.pid"] ++ if os.getenv("XENSTORED_TRACE"): ++ args.extend(["-T", "/var/log/xen/xenstored-trace.log"]) ++ if os.fork() == 0: ++ execute(''xenstored'', args) + + def start_consoled(): + if os.fork() == 0: +- os.execvp(''xenconsoled'', [''xenconsoled'']) ++ execute(''xenconsoled'') + + def start_blktapctrl(): + if os.fork() == 0: +- os.execvp(''blktapctrl'', [''blktapctrl'']) ++ execute(''blktapctrl'') + + def main(): + try: +--- xen-3.orig/tools/misc/xm ++++ xen-3/tools/misc/xm +@@ -1,10 +1,7 @@ + #!/usr/bin/env python + # -*- mode: python; -*- + import sys +- +-# add fallback path for non-native python path installs if needed +-sys.path.append(''/usr/lib/python'') +-sys.path.append(''/usr/lib64/python'') ++sys.path.append(sys.path[0] + ''/../lib/python'') + from xen.xm import main + + main.main(sys.argv) Modified: trunk/xen-3/debian/patches/tools-pygrub-prefix.diff =============================================================================--- trunk/xen-3/debian/patches/tools-pygrub-prefix.diff (original) +++ trunk/xen-3/debian/patches/tools-pygrub-prefix.diff Fri Aug 3 13:19:50 2007 @@ -1,13 +1,6 @@ --- xen-3.orig/tools/pygrub/Makefile +++ xen-3/tools/pygrub/Makefile -@@ -2,17 +2,19 @@ - XEN_ROOT = ../.. - include $(XEN_ROOT)/tools/Rules.mk - -+BINDIR = bin -+LIBDIR = lib/pygrub -+ - .PHONY: all +@@ -6,13 +6,12 @@ all: build .PHONY: build build: @@ -30,7 +23,7 @@ import getopt -sys.path = [ ''/usr/lib/python'' ] + sys.path -+sys.path = [ ''/usr/lib/pygrub/python'' ] + sys.path ++sys.path.append(sys.path[0] + ''/../lib/python'') import fsimage import grub.GrubConf Added: trunk/xen-3/debian/patches/tools-python-prefix.diff =============================================================================--- (empty file) +++ trunk/xen-3/debian/patches/tools-python-prefix.diff Fri Aug 3 13:19:50 2007 @@ -0,0 +1,42 @@ +--- xen-3.orig/tools/python/xen/util/auxbin.py ++++ xen-3/tools/python/xen/util/auxbin.py +@@ -16,18 +16,11 @@ + #===========================================================================+ + +-LIB_32 = "/usr/lib" +-LIB_64 = "/usr/lib64" +-LIB_BIN_SUFFIX = "xen/bin" +- +-## The architectures on which the LIB_64 directory is used. This +-# deliberately excludes ia64 and ppc64, and Solaris. +-LIB_64_ARCHS = [ ''x86_64'', ''s390x'', ''sparc64''] +- +- + import os + import os.path ++import sys + ++_path = sys.path[0] + + def execute(exe, args = None): + exepath = pathTo(exe) +@@ -42,12 +35,12 @@ + + + def path(): +- return os.path.join(libpath(), LIB_BIN_SUFFIX) ++ return _path ++ ++ ++def root(): ++ return os.path.realpath(os.path.join(path(), ''..'')) + + + def libpath(): +- machine = os.uname()[4] +- if machine in LIB_64_ARCHS and os.path.exists(LIB_64): +- return LIB_64 +- else: +- return LIB_32 ++ return os.path.realpath(os.path.join(path(), ''../lib''))