xen/xen-destdir.diff

240 lines
9.6 KiB
Diff

Index: xen-3.0.5-testing/docs/Makefile
===================================================================
--- xen-3.0.5-testing.orig/docs/Makefile
+++ xen-3.0.5-testing/docs/Makefile
@@ -90,7 +90,8 @@ install: all
$(INSTALL_DIR) $(DESTDIR)$(mandir)
cp -dR man1 $(DESTDIR)$(mandir)
cp -dR man5 $(DESTDIR)$(mandir)
- [ ! -d html ] || cp -dR html $(DESTDIR)$(pkgdocdir)
+ $(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)/html
+ cp -dR html.done/* $(DESTDIR)$(pkgdocdir)/html
pdf/%.pdf: ps/%.ps
$(INSTALL_DIR) $(@D)
@@ -114,3 +115,9 @@ html/%/index.html: src/%.tex
$(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
-numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
$< 1>/dev/null 2>/dev/null
+ rm -rf html.done/$*/
+ mkdir -p html.done/$*/
+ cp html/$*/*.html html/$*/*.css html/$*/*.png html.done/$*/
+ ln -sf $*.html html.done/$*/index.html
+ rm -rf html/
+
Index: xen-3.0.5-testing/tools/xentrace/Makefile
===================================================================
--- xen-3.0.5-testing.orig/tools/xentrace/Makefile
+++ xen-3.0.5-testing/tools/xentrace/Makefile
@@ -38,14 +38,14 @@ install: build
[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
[ -z "$(LIBBIN)" ] || [ -d $(DESTDIR)/usr/$(LIBDIR)/xen/bin ] || \
$(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
- [ -d $(DESTDIR)/usr/share/man/man1 ] || \
- $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man1
- [ -d $(DESTDIR)/usr/share/man/man8 ] || \
- $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man8
+ [ -d $(DESTDIR)$(MANDIR)/man1 ] || \
+ $(INSTALL_DIR) $(DESTDIR)$(MANDIR)/man1
+ [ -d $(DESTDIR)$(MANDIR)/man8 ] || \
+ $(INSTALL_DIR) $(DESTDIR)$(MANDIR)/man8
$(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
[ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
- $(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/share/man/man1
- $(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/share/man/man8
+ $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MANDIR)/man1
+ $(INSTALL_DATA) $(MAN8) $(DESTDIR)$(MANDIR)/man8
.PHONY: clean
clean:
Index: xen-3.0.5-testing/tools/examples/Makefile
===================================================================
--- xen-3.0.5-testing.orig/tools/examples/Makefile
+++ xen-3.0.5-testing/tools/examples/Makefile
@@ -41,18 +41,6 @@ XEN_HOTPLUG_SCRIPTS = xen-backend.agent
UDEV_RULES_DIR = /etc/udev
UDEV_RULES = xen-backend.rules
-DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
-DE = $(if $(DESTDIR),$(shell readlink -f $(DESTDIR)),)
-ifeq ($(findstring $(DI),$(DE)),$(DI))
-HOTPLUGS=install-hotplug install-udev
-else
-ifeq ($(shell [ -x /usr/bin/udevinfo ] && [ `/usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1)
-HOTPLUGS=install-udev
-else
-HOTPLUGS=install-hotplug
-endif
-endif
-
.PHONY: all
all:
@@ -60,15 +48,15 @@ all:
build:
.PHONY: install
-install: all install-initd install-configs install-scripts $(HOTPLUGS)
+install: all install-initd install-configs install-scripts install-udev
.PHONY: install-initd
install-initd:
[ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
- [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
+ [ -d $(DESTDIR)/var/adm/fillup-templates ] || $(INSTALL_DIR) $(DESTDIR)/var/adm/fillup-templates/
$(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
$(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
- $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
+ $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/var/adm/fillup-templates/
.PHONY: install-configs
install-configs: $(XEN_CONFIGS)
@@ -109,9 +97,7 @@ install-udev:
$(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
for i in $(UDEV_RULES); \
do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
- ( cd $(DESTDIR)$(UDEV_RULES_DIR)/rules.d ; \
- ln -sf ../$$i . ) \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
done
.PHONY: clean
Index: xen-3.0.5-testing/tools/security/Makefile
===================================================================
--- xen-3.0.5-testing.orig/tools/security/Makefile
+++ xen-3.0.5-testing/tools/security/Makefile
@@ -69,9 +69,9 @@ install: all $(ACM_CONFIG_FILE)
$(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
$(INSTALL_PROG) $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
ifndef XEN_PYTHON_NATIVE_INSTALL
- python python/setup.py install --home="$(DESTDIR)/usr" --install-lib="$(DESTDIR)$(LIBPATH)/python"
+ python python/setup.py install --home="$(DESTDIR)/usr" --install-lib="$(DESTDIR)$(LIBPATH)/python" --prefix=""
else
- python python/setup.py install --root="$(DESTDIR)"
+ python python/setup.py install --root="$(DESTDIR)" --prefix="/usr"
endif
else
.PHONY: all
Index: xen-3.0.5-testing/tools/pygrub/Makefile
===================================================================
--- xen-3.0.5-testing.orig/tools/pygrub/Makefile
+++ xen-3.0.5-testing/tools/pygrub/Makefile
@@ -16,7 +16,7 @@ install: all
$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
else
install: all
- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
+ CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --prefix="/usr"
$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
endif
Index: xen-3.0.5-testing/tools/python/Makefile
===================================================================
--- xen-3.0.5-testing.orig/tools/python/Makefile
+++ xen-3.0.5-testing/tools/python/Makefile
@@ -60,7 +60,7 @@ install: install-messages install-dtd
CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force --install-lib="$(DESTDIR)$(LIBPATH)/python"
else
install: install-messages install-dtd
- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
+ CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --prefix="/usr" --force
endif
install-dtd: all
Index: xen-3.0.5-testing/tools/Makefile
===================================================================
--- xen-3.0.5-testing.orig/tools/Makefile
+++ xen-3.0.5-testing/tools/Makefile
@@ -25,7 +25,6 @@ SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
# These don't cross-compile
ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
SUBDIRS-$(PYTHON_TOOLS) += python
-SUBDIRS-$(PYTHON_TOOLS) += pygrub
endif
.PHONY: all
Index: xen-3.0.5-testing/docs/Docs.mk
===================================================================
--- xen-3.0.5-testing.orig/docs/Docs.mk
+++ xen-3.0.5-testing/docs/Docs.mk
@@ -8,6 +8,6 @@ POD2MAN := pod2man
DOT := dot
NEATO := neato
-pkgdocdir := /usr/share/doc/xen
-mandir := /usr/share/man
+pkgdocdir := $(DOCDIR)
+mandir := $(MANDIR)
Index: xen-3.0.5-testing/tools/misc/xen-python-path
===================================================================
--- xen-3.0.5-testing.orig/tools/misc/xen-python-path
+++ xen-3.0.5-testing/tools/misc/xen-python-path
@@ -30,7 +30,8 @@ import sys
for p in ['python%s' % sys.version[:3], 'python']:
for l in ['/usr/lib64', '/usr/lib']:
- d = os.path.join(l, p)
+ for s in ['site-packages', '']:
+ d = os.path.join(l, p, s)
if os.path.exists(os.path.join(d, AUXBIN)):
sys.path.append(d)
import xen.util.auxbin
Index: xen-3.0.5-testing/tools/xenstore/Makefile
===================================================================
--- xen-3.0.5-testing.orig/tools/xenstore/Makefile
+++ xen-3.0.5-testing/tools/xenstore/Makefile
@@ -24,6 +24,7 @@ TESTENV = XENSTORED_ROOTDIR=$(TESTDIR)
CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
CLIENTS += xenstore-write
CLIENTS_OBJS := $(patsubst xenstore-%,xenstore_%.o,$(CLIENTS))
+CLIENTS_DOMU := $(patsubst xenstore-%,domu-xenstore-%,$(CLIENTS))
XENSTORED_OBJS = xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o
@@ -33,7 +34,7 @@ XENSTORED_OBJS_$(CONFIG_SunOS) = xenstor
XENSTORED_OBJS += $(XENSTORED_OBJS_y)
.PHONY: all
-all: libxenstore.so libxenstore.a xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls
+all: libxenstore.so libxenstore.a xenstored $(CLIENTS) $(CLIENTS_DOMU) xs_tdb_dump xenstore-control xenstore-ls
test_interleaved_transactions: test_interleaved_transactions.o
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@
@@ -47,6 +48,9 @@ xenstored: $(XENSTORED_OBJS)
$(CLIENTS): xenstore-%: xenstore_%.o libxenstore.so
$(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
+$(CLIENTS_DOMU): domu-xenstore-%: xenstore_%.o libxenstore.a
+ $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lpthread libxenstore.a $(SOCKET_LIBS) -o $@
+
$(CLIENTS_OBJS): xenstore_%.o: xenstore_client.c
$(COMPILE.c) -DCLIENT_$(*F) -o $@ $<
@@ -101,7 +105,7 @@ clean: testsuite-clean
rm -f *.a *.o *.opic *.so*
rm -f xenstored xs_random xs_stress xs_crashme
rm -f xs_test xenstored_test xs_tdb_dump xenstore-control xenstore-ls
- rm -f $(CLIENTS)
+ rm -f $(CLIENTS) $(CLIENTS_DOMU)
$(RM) $(PROG_DEP)
.PHONY: print-dir
@@ -170,11 +174,15 @@ tarball: clean
install: all
$(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
$(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
+ $(INSTALL_DIR) $(DESTDIR)/bin
$(INSTALL_DIR) $(DESTDIR)/usr/bin
$(INSTALL_DIR) $(DESTDIR)/usr/sbin
$(INSTALL_DIR) $(DESTDIR)/usr/include
$(INSTALL_PROG) xenstored $(DESTDIR)/usr/sbin
$(INSTALL_PROG) $(CLIENTS) $(DESTDIR)/usr/bin
+ for client in $(CLIENTS_DOMU); do \
+ $(INSTALL_PROG) $$client $(DESTDIR)/bin/$${client/domu-}; \
+ done
$(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin
$(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin
$(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)