Bastian Blank
2008-Mar-06 21:50 UTC
[Pkg-xen-changes] r533 - trunk/xen-unstable/debian/patches
Author: waldi Date: Thu Mar 6 21:50:55 2008 New Revision: 533 Log: debian/patches: Use relativ rpaths. Modified: trunk/xen-unstable/debian/patches/doc-remove-unused.diff trunk/xen-unstable/debian/patches/tools-lib-abiname.diff trunk/xen-unstable/debian/patches/tools-prefix.diff trunk/xen-unstable/debian/patches/tools-rpath.diff Modified: trunk/xen-unstable/debian/patches/doc-remove-unused.diff =============================================================================--- trunk/xen-unstable/debian/patches/doc-remove-unused.diff (original) +++ trunk/xen-unstable/debian/patches/doc-remove-unused.diff Thu Mar 6 21:50:55 2008 @@ -1,5 +1,5 @@ ---- xen-3.orig/docs/src/interface.tex -+++ xen-3/docs/src/interface.tex +--- xen-unstable.orig/docs/src/interface.tex ++++ xen-unstable/docs/src/interface.tex @@ -1,6 +1,6 @@ -\documentclass[11pt,twoside,final,openright]{report} -\usepackage{a4,graphicx,html,setspace,times} Modified: trunk/xen-unstable/debian/patches/tools-lib-abiname.diff =============================================================================--- trunk/xen-unstable/debian/patches/tools-lib-abiname.diff (original) +++ trunk/xen-unstable/debian/patches/tools-lib-abiname.diff Thu Mar 6 21:50:55 2008 @@ -54,9 +54,9 @@ - ln -sf $< $@ - -libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS) -- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(PTHREAD_LIBS) +- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) $(call LDFLAGS_RPATH) -o $@ $^ $(PTHREAD_LIBS) +libxenctrl.so: $(CTRL_PIC_OBJS) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ $(PTHREAD_LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) $(call LDFLAGS_RPATH) -o $@ $^ $(PTHREAD_LIBS) # libxenguest @@ -69,9 +69,9 @@ - ln -sf $< $@ - -libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so -- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS) +- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) $(call LDFLAGS_RPATH) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS) +libxenguest.so: $(GUEST_PIC_OBJS) libxenctrl.so -+ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) $(call LDFLAGS_RPATH) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS) -include $(DEPS) @@ -142,12 +142,12 @@ all: $(LIB) @@ -24,9 +21,7 @@ install: all - $(INSTALL_DIR) $(DESTDIR)$(LIBDIR) + $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_LIBDIR) $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR) -- $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR) -- ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libfsimage.so.$(MAJOR) -- ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libfsimage.so -+ $(INSTALL_PROG) libfsimage.so $(DESTDIR)$(LIBDIR) +- $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(PRIVATE_LIBDIR) +- ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(PRIVATE_LIBDIR)/libfsimage.so.$(MAJOR) +- ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(PRIVATE_LIBDIR)/libfsimage.so ++ $(INSTALL_PROG) libfsimage.so $(DESTDIR)$(PRIVATE_LIBDIR) $(INSTALL_DATA) fsimage.h $(DESTDIR)$(INCLUDEDIR) $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR) $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR) @@ -176,8 +176,7 @@ XEN_ROOT = ../../.. include $(XEN_ROOT)/tools/Rules.mk -@@ -21,8 +18,8 @@ - LIB_OBJS := $(patsubst %.c,%.o,$(SRCS)) +@@ -22,7 +19,7 @@ PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS)) LIB := libflask.a @@ -186,7 +185,7 @@ .PHONY: all all: build -@@ -35,10 +31,8 @@ +@@ -35,10 +32,8 @@ install: build $(INSTALL_DIR) $(DESTDIR)$(LIBDIR) $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR) @@ -198,10 +197,7 @@ $(INSTALL_DATA) include/flask.h $(DESTDIR)$(INCLUDEDIR) .PHONY: TAGS -@@ -51,15 +45,10 @@ - - # libflask - +@@ -54,12 +49,7 @@ libflask.a: $(LIB_OBJS) $(AR) rc $@ $^ @@ -216,3 +212,42 @@ + $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ -include $(DEPS) +--- xen-unstable.orig/tools/xenstore/Makefile ++++ xen-unstable/tools/xenstore/Makefile +@@ -2,9 +2,6 @@ + include $(XEN_ROOT)/tools/Rules.mk + XEN_LIBXC = $(XEN_ROOT)/tools/libxc + +-MAJOR = 3.0 +-MINOR = 0 +- + PROFILE=#-pg + BASECFLAGS=-Werror + # Make gcc generate dependencies. +@@ -62,13 +59,8 @@ + xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@ + +-libxenstore.so: libxenstore.so.$(MAJOR) +- ln -sf $< $@ +-libxenstore.so.$(MAJOR): libxenstore.so.$(MAJOR).$(MINOR) +- ln -sf $< $@ +- +-libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic +- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenstore.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(SOCKET_LIBS) -lpthread ++libxenstore.so: xs.opic xs_lib.opic ++ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ $(SOCKET_LIBS) -lpthread + + libxenstore.a: xs.o xs_lib.o + $(AR) rcs libxenstore.a $^ +@@ -100,9 +92,7 @@ + $(INSTALL_PROG) xenstore-control $(DESTDIR)$(PRIVATE_BINDIR) + $(INSTALL_PROG) xenstore-ls $(DESTDIR)$(PRIVATE_BINDIR) + $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_LIBDIR) +- $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(PRIVATE_LIBDIR) +- ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(PRIVATE_LIBDIR)/libxenstore.so.$(MAJOR) +- ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(PRIVATE_LIBDIR)/libxenstore.so ++ $(INSTALL_PROG) libxenstore.so $(DESTDIR)$(PRIVATE_LIBDIR) + $(INSTALL_DATA) libxenstore.a $(DESTDIR)$(PRIVATE_LIBDIR) + $(INSTALL_DATA) xs.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) xs_lib.h $(DESTDIR)$(INCLUDEDIR) Modified: trunk/xen-unstable/debian/patches/tools-prefix.diff =============================================================================--- trunk/xen-unstable/debian/patches/tools-prefix.diff (original) +++ trunk/xen-unstable/debian/patches/tools-prefix.diff Thu Mar 6 21:50:55 2008 @@ -1,6 +1,6 @@ --- xen-unstable.orig/tools/console/Makefile +++ xen-unstable/tools/console/Makefile -@@ -29,7 +29,5 @@ +@@ -30,7 +30,5 @@ .PHONY: install install: $(BIN) @@ -113,7 +113,7 @@ clean: --- xen-unstable.orig/tools/xenstore/Makefile +++ xen-unstable/tools/xenstore/Makefile -@@ -93,18 +93,17 @@ +@@ -95,18 +95,17 @@ install: all $(INSTALL_DIR) $(DESTDIR)/var/run/xenstored $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored @@ -230,3 +230,21 @@ $(INSTALL_DIR) $(DESTDIR)$(MAN1DIR) $(INSTALL_DATA) xentop.1 $(DESTDIR)$(MAN1DIR)/xentop.1 +--- xen-unstable.orig/tools/libfsimage/common/Makefile ++++ xen-unstable/tools/libfsimage/common/Makefile +@@ -22,11 +22,11 @@ + + .PHONY: install + install: all +- $(INSTALL_DIR) $(DESTDIR)$(LIBDIR) ++ $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_LIBDIR) + $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR) +- $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR) +- ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libfsimage.so.$(MAJOR) +- ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libfsimage.so ++ $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(PRIVATE_LIBDIR) ++ ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(PRIVATE_LIBDIR)/libfsimage.so.$(MAJOR) ++ ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(PRIVATE_LIBDIR)/libfsimage.so + $(INSTALL_DATA) fsimage.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR) Modified: trunk/xen-unstable/debian/patches/tools-rpath.diff =============================================================================--- trunk/xen-unstable/debian/patches/tools-rpath.diff (original) +++ trunk/xen-unstable/debian/patches/tools-rpath.diff Thu Mar 6 21:50:55 2008 @@ -4,31 +4,18 @@ include $(XEN_ROOT)/Config.mk -+LDFLAGS_RPATH := -Wl,-rpath,$(PRIVATE_LIBDIR) ++LDFLAGS_RPATH = -Wl,-rpath,''$${ORIGIN}$(if $(1),/$(1))'' + XEN_INCLUDE = $(XEN_ROOT)/tools/include XEN_XC = $(XEN_ROOT)/tools/python/xen/lowlevel/xc XEN_LIBXC = $(XEN_ROOT)/tools/libxc -@@ -14,10 +16,10 @@ - CFLAGS_include = -I$(XEN_INCLUDE) - - CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include) --LDFLAGS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl -+LDFLAGS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl $(LDFLAGS_RPATH) - - CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_include) --LDFLAGS_libxenguest = -L$(XEN_LIBXC) -lxenguest -+LDFLAGS_libxenguest = -L$(XEN_LIBXC) -lxenguest $(LDFLAGS_RPATH) - - CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_include) - LDFLAGS_libxenstore = -L$(XEN_XENSTORE) -lxenstore --- xen-unstable.orig/tools/python/setup.py +++ xen-unstable/tools/python/setup.py @@ -5,6 +5,7 @@ XEN_ROOT = "../.." extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] -+extra_link_args = [ "-Wl,-rpath,/usr/%s" % os.environ[''LIBDIR''] ] ++extra_link_args = [ "-Wl,-rpath,${ORIGIN}/../../../.." ] include_dirs = [ XEN_ROOT + "/tools/libxc", XEN_ROOT + "/tools/xenstore", @@ -86,8 +73,133 @@ VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc64.ld endif -+VL_LDFLAGS+=$(LDFLAGS_RPATH) ++VL_LDFLAGS+=$(call LDFLAGS_RPATH,../lib) + ifdef CONFIG_WIN32 SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole endif +--- xen-unstable.orig/tools/libxc/Makefile ++++ xen-unstable/tools/libxc/Makefile +@@ -146,7 +146,7 @@ + ln -sf $< $@ + + libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(PTHREAD_LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) $(call LDFLAGS_RPATH) -o $@ $^ $(PTHREAD_LIBS) + + # libxenguest + +@@ -159,7 +159,7 @@ + ln -sf $< $@ + + libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so +- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) $(call LDFLAGS_RPATH) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS) + + -include $(DEPS) + +--- xen-unstable.orig/tools/xcutils/Makefile ++++ xen-unstable/tools/xcutils/Makefile +@@ -20,7 +20,7 @@ + + PROGRAMS = xc_restore xc_save readnotes + +-LDLIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore) ++LDLIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore) $(call LDFLAGS_RPATH,../lib) + + .PHONY: all + all: build +--- xen-unstable.orig/tools/xenstat/xentop/Makefile ++++ xen-unstable/tools/xenstat/xentop/Makefile +@@ -19,7 +19,7 @@ + else + + CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT) +-LDFLAGS += -L$(XEN_LIBXENSTAT) ++LDFLAGS += -L$(XEN_LIBXENSTAT) $(call LDFLAGS_RPATH,../lib) + LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS) + CFLAGS += -DHOST_$(XEN_OS) + +--- xen-unstable.orig/tools/misc/Makefile ++++ xen-unstable/tools/misc/Makefile +@@ -45,4 +45,4 @@ + $(CC) -c $(CFLAGS) -o $@ $< + + xenperf: %: %.o Makefile +- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_libxenctrl) ++ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_libxenctrl) $(call LDFLAGS_RPATH,../lib) +--- xen-unstable.orig/tools/xentrace/Makefile ++++ xen-unstable/tools/xentrace/Makefile +@@ -4,7 +4,7 @@ + CFLAGS += -Werror + + CFLAGS += $(CFLAGS_libxenctrl) +-LDFLAGS += $(LDFLAGS_libxenctrl) ++LDFLAGS += $(LDFLAGS_libxenctrl) $(call LDFLAGS_RPATH,../lib) + + HDRS = $(wildcard *.h) + OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) +--- xen-unstable.orig/tools/console/Makefile ++++ xen-unstable/tools/console/Makefile +@@ -8,6 +8,7 @@ + CFLAGS += $(CFLAGS_libxenstore) + LDFLAGS += $(LDFLAGS_libxenctrl) + LDFLAGS += $(LDFLAGS_libxenstore) ++LDFLAGS += $(call LDFLAGS_RPATH,../lib) + + BIN = xenconsoled xenconsole + +--- xen-unstable.orig/tools/xenmon/Makefile ++++ xen-unstable/tools/xenmon/Makefile +@@ -16,7 +16,7 @@ + CFLAGS += -Werror + CFLAGS += -I $(XEN_XC) + CFLAGS += $(CFLAGS_libxenctrl) +-LDFLAGS += $(LDFLAGS_libxenctrl) ++LDFLAGS += $(LDFLAGS_libxenctrl) $(call LDFLAGS_RPATH,../lib) + + BIN = xentrace_setmask xenbaked + SCRIPTS = xenmon.py +--- xen-unstable.orig/tools/libfsimage/Rules.mk ++++ xen-unstable/tools/libfsimage/Rules.mk +@@ -3,7 +3,7 @@ + DEPS = .*.d + + CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror -Wp,-MD,.$(@F).d +-LDFLAGS += -L../common/ ++LDFLAGS += -L../common/ $(call LDFLAGS_RPATH,../../) + + PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) + +--- xen-unstable.orig/tools/xenstore/Makefile ++++ xen-unstable/tools/xenstore/Makefile +@@ -17,6 +17,9 @@ + CFLAGS += $(BASECFLAGS) + LDFLAGS += $(PROFILE) + ++LDFLAGS_libxenctrl += $(call LDFLAGS_RPATH,../lib) ++LDFLAGS_libxenstore = -L. -lxenstore $(call LDFLAGS_RPATH,../lib) ++ + CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod + CLIENTS += xenstore-write + CLIENTS_OBJS := $(patsubst xenstore-%,xenstore_%.o,$(CLIENTS)) +@@ -48,16 +51,16 @@ + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) $(LDFLAGS_libxenctrl) $(SOCKET_LIBS) -o $@ + + $(CLIENTS): xenstore-%: xenstore_%.o libxenstore.so +- $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@ ++ $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) $(LDFLAGS_libxenstore) $(SOCKET_LIBS) -o $@ + + $(CLIENTS_OBJS): xenstore_%.o: xenstore_client.c + $(COMPILE.c) -DCLIENT_$(*F) -o $@ $< + + xenstore-control: xenstore_control.o libxenstore.so +- $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@ ++ $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) $(LDFLAGS_libxenstore) $(SOCKET_LIBS) -o $@ + + xenstore-ls: xsls.o libxenstore.so +- $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@ ++ $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) $(LDFLAGS_libxenstore) $(SOCKET_LIBS) -o $@ + + xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@