diff options
author | Ian Delaney <johneed@hotmail.com> | 2011-11-19 13:38:10 +0800 |
---|---|---|
committer | Ian Delaney <johneed@hotmail.com> | 2011-11-19 13:38:10 +0800 |
commit | 271eb7f83e63aca3efc009a074b9077e2d327c3d (patch) | |
tree | c2c4ae0222031a0312c3b251cd6988514f51c729 /app-emulation/xen-tools/files | |
parent | [init] Add metadata and repo_name (diff) | |
download | virtualization-271eb7f83e63aca3efc009a074b9077e2d327c3d.tar.gz virtualization-271eb7f83e63aca3efc009a074b9077e2d327c3d.tar.bz2 virtualization-271eb7f83e63aca3efc009a074b9077e2d327c3d.zip |
"EAPI4 tp xen-tools [4.1.2 -9999]"
Diffstat (limited to 'app-emulation/xen-tools/files')
25 files changed, 1374 insertions, 0 deletions
diff --git a/app-emulation/xen-tools/files/ipxe-nopie.patch b/app-emulation/xen-tools/files/ipxe-nopie.patch new file mode 100644 index 0000000..0663eaa --- /dev/null +++ b/app-emulation/xen-tools/files/ipxe-nopie.patch @@ -0,0 +1,27 @@ +2011-10-22 Ralf Glauberman <ralfglauberman@gmx.de> + + #360805 Don't compile ipxe with pie on hardened. + * /tools/firmware/etherboot/patches/ipxe-nopie.patche New patch + * /tools/firmware/etherboot/patches/series Add ipxe-nopie.patch + +--- a/tools/firmware/etherboot/patches/ipxe-nopie.patch 1970-01-01 01:00:00.000000000 +0100 ++++ b/tools/firmware/etherboot/patches/ipxe-nopie.patch 2011-03-27 17:45:13.929697782 +0200 +@@ -0,0 +1,11 @@ ++--- ipxe/src/Makefile~ 2011-03-27 17:41:52.000000000 +0200 +++++ ipxe/src/Makefile 2011-03-27 17:43:20.869446433 +0200 ++@@ -4,7 +4,7 @@ ++ # ++ ++ CLEANUP := ++-CFLAGS := +++CFLAGS := -nopie ++ ASFLAGS := ++ LDFLAGS := ++ MAKEDEPS := Makefile +--- a/tools/firmware/etherboot/patches/series 2011-03-25 11:42:50.000000000 +0100 ++++ b/tools/firmware/etherboot/patches/series 2011-03-27 17:45:45.140446216 +0200 +@@ -1,3 +1,4 @@ + boot_prompt_option.patch + gpxe-git-0edf2405b457 + gpxe-git-a803ef3dfeac ++ipxe-nopie.patch diff --git a/app-emulation/xen-tools/files/xen-consoles.logrotate b/app-emulation/xen-tools/files/xen-consoles.logrotate new file mode 100644 index 0000000..c644523 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-consoles.logrotate @@ -0,0 +1,5 @@ +/var/log/xen-consoles/*.log { + rotate 7 + missingok + compress +} diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch b/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch new file mode 100644 index 0000000..48e7cd5 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch @@ -0,0 +1,26 @@ +Index: xen-3.3.0/tools/ioemu-qemu-xen/Makefile +=================================================================== +--- xen-3.3.0.orig/tools/ioemu-qemu-xen/Makefile ++++ xen-3.3.0/tools/ioemu-qemu-xen/Makefile +@@ -205,7 +205,7 @@ endif + install: all $(if $(BUILD_DOCS),install-doc) + mkdir -p "$(DESTDIR)$(bindir)" + ifneq ($(TOOLS),) +- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" ++ $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)" + endif + mkdir -p "$(DESTDIR)$(datadir)" + set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ +Index: xen-3.3.0/tools/ioemu-qemu-xen/Makefile.target +=================================================================== +--- xen-3.3.0.orig/tools/ioemu-qemu-xen/Makefile.target ++++ xen-3.3.0/tools/ioemu-qemu-xen/Makefile.target +@@ -707,7 +707,7 @@ clean: + + install: all install-hook + ifneq ($(PROGS),) +- $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" ++ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" + endif + + # Include automatically generated dependency files diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.1-sandbox-fix.patch b/app-emulation/xen-tools/files/xen-tools-3.3.1-sandbox-fix.patch new file mode 100644 index 0000000..be0527a --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.3.1-sandbox-fix.patch @@ -0,0 +1,21 @@ +diff -urN xen-3.3.1/tools/ioemu-qemu-xen/xen-setup xen-3.3.1-fix/tools/ioemu-qemu-xen/xen-setup +--- xen-3.3.1/tools/ioemu-qemu-xen/xen-setup 2009-01-05 04:36:22.000000000 -0700 ++++ xen-3.3.1-fix/tools/ioemu-qemu-xen/xen-setup 2009-04-25 17:55:03.000000000 -0600 +@@ -3,6 +3,8 @@ + + # git-clean -x -d && ./xen-setup && make prefix=/usr CMDLINE_CFLAGS='-O0 -g' -j4 && make install DESTDIR=`pwd`/dist/ prefix=/usr && rsync -a --stats --delete . thule:shadow/qemu-iwj.git/ && rsync -a --stats dist/. root@thule:/ + ++target=i386-dm ++ + rm -f $target/Makefile + rm -f $target/config.mak + rm -f config-host.mak +@@ -11,8 +13,6 @@ + + ./configure --disable-gfx-check --disable-gcc-check --disable-curses --disable-slirp "$@" --prefix=/usr + +-target=i386-dm +- + if [ "x$XEN_ROOT" != x ]; then + echo "XEN_ROOT=$XEN_ROOT" >>config-host.mak + fi diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.0-network-bridge-broadcast.patch b/app-emulation/xen-tools/files/xen-tools-3.4.0-network-bridge-broadcast.patch new file mode 100644 index 0000000..c926510 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.4.0-network-bridge-broadcast.patch @@ -0,0 +1,11 @@ +--- xen-3.4.0/tools/hotplug/Linux/network-bridge.orig 2009-05-18 15:05:38.000000000 +0400 ++++ xen-3.4.0/tools/hotplug/Linux/network-bridge 2009-06-09 23:16:05.000000000 +0400 +@@ -101,7 +101,7 @@ + tdev=tmpbridge + + get_ip_info() { +- addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e 's/ .*//'` ++ addr_pfx=`ip addr show dev $1 | egrep '^ *inet ' | sed -e 's/ *inet //' -e "s/$1//"` + gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'` + } + diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-as-needed.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-as-needed.patch new file mode 100644 index 0000000..5d97373 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-as-needed.patch @@ -0,0 +1,13 @@ +--- xen-3.4.2.orig/tools/libxc/Makefile 2009-11-10 16:12:56.000000000 +0100 ++++ xen-3.4.2/tools/libxc/Makefile 2009-12-12 18:46:27.547714651 +0100 +@@ -167,9 +167,8 @@ + xc_dom_bzimageloader.o: CFLAGS += $(call zlib-options,D) + xc_dom_bzimageloader.opic: CFLAGS += $(call zlib-options,D) + +-libxenguest.so.$(MAJOR).$(MINOR): LDFLAGS += $(call zlib-options,l) + 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) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS) $(call zlib-options,l) + + -include $(DEPS) + diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-definitions.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-definitions.patch new file mode 100644 index 0000000..403d612 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-definitions.patch @@ -0,0 +1,16 @@ +--- tools/blktap/lib/blktaplib.h.orig 2011-09-21 19:29:30.240868534 +0800 ++++ tools/blktap/lib/blktaplib.h 2011-09-21 19:34:21.184868372 +0800 +@@ -195,8 +195,13 @@ + pid_t pid; + } msg_pid_t; + ++#ifndef READ + #define READ 0 ++#endif ++ ++#ifndef WRITE + #define WRITE 1 ++#endif + + /*Control Messages between manager and tapdev*/ + #define CTLMSG_PARAMS 1 diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-include.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-include.patch new file mode 100644 index 0000000..2fe3f05 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-include.patch @@ -0,0 +1,28 @@ +--- ./tools/blktap/drivers/blktapctrl.c 2011-09-20 00:27:01.846896986 +0800 ++++ ./tools/blktap/drivers/blktapctrl.c 2011-09-20 00:29:09.910897067 +0800 +@@ -40,6 +40,7 @@ + #include <err.h> + #include <errno.h> + #include <sys/types.h> ++#include <sys/stat.h> + #include <sys/wait.h> + #include <signal.h> + #include <fcntl.h> +--- ./tools/blktap/drivers/block-qcow2.c 2011-09-22 04:15:49.339854677 +0800 ++++ ./tools/blktap/drivers/block-qcow2.c 2009-11-10 23:12:55.000000000 +0800 +@@ -26,6 +26,7 @@ + #include "aes.h" + #include <assert.h> + #include <stdint.h> ++#include <sys/stat.h> + #include <fcntl.h> + #include <stdio.h> + #include <stdlib.h> +--- ./tools/ioemu-qemu-xen/block-qcow2.c 2011-09-19 23:43:40.005898352 +0800 ++++ ./tools/ioemu-qemu-xen/block-qcow2.c 2011-09-19 23:26:53.979898723 +0800 +@@ -26,6 +26,7 @@ + #include <zlib.h> + #include "aes.h" + #include <assert.h> ++#include <sys/stat.h> + diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-ldflags-respect.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-ldflags-respect.patch new file mode 100644 index 0000000..fd77712 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-ldflags-respect.patch @@ -0,0 +1,31 @@ +--- ./tools/fs-back/Makefile 2011-09-26 23:14:30.454759297 +0800 ++++ ./tools/fs-back/Makefile 2011-09-27 16:37:57.445748680 +0800 +@@ -23,7 +23,7 @@ + all: $(IBIN) + + fs-backend: $(OBJS) fs-backend.c +- $(CC) $(CFLAGS) -o fs-backend $(OBJS) $(LIBS) fs-backend.c ++ $(CC) $(CFLAGS) $(LDFLAGS) -o fs-backend $(OBJS) $(LIBS) fs-backend.c + + install: all + $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(SBINDIR) +--- ./tools/libfsimage/common/Makefile 2009-11-10 23:12:56.000000000 +0800 ++++ ./tools/libfsimage/common/Makefile 2011-09-27 16:41:16.516748626 +0800 +@@ -6,7 +6,7 @@ + + LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS + LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU +-LDFLAGS = $(LDFLAGS-y) ++#LDFLAGS = $(LDFLAGS-y) + + LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c + +--- ./tools/misc/lomount/Makefile 2011-09-27 14:23:26.596752233 +0800 ++++ ./tools/misc/lomount/Makefile 2011-09-27 16:37:57.445748680 +0800 +@@ -23,5 +23,5 @@ + $(RM) *.a *.so *.o *.rpm $(BIN) + + %: %.c $(HDRS) Makefile +- $(CC) $(CFLAGS) -o $@ $< ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-remove-default-cflags.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-remove-default-cflags.patch new file mode 100644 index 0000000..8ca546b --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-remove-default-cflags.patch @@ -0,0 +1,257 @@ +Only in xen-3.4.2/: cflags.sh +diff -ur xen-3.4.2.orig//config/StdGNU.mk xen-3.4.2//config/StdGNU.mk +--- xen-3.4.2.orig//config/StdGNU.mk 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//config/StdGNU.mk 2011-09-26 02:18:14.630771549 +0800 +@@ -48,7 +48,7 @@ + SHLIB_CFLAGS = -shared + + ifneq ($(debug),y) +-CFLAGS += -O2 -fomit-frame-pointer ++CFLAGS += -fomit-frame-pointer + else + # Less than -O1 produces bad code and large stack frames + CFLAGS += -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls +diff -ur xen-3.4.2.orig//config/SunOS.mk xen-3.4.2//config/SunOS.mk +--- xen-3.4.2.orig//config/SunOS.mk 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//config/SunOS.mk 2011-09-26 02:18:14.640771549 +0800 +@@ -45,7 +45,7 @@ + SHLIB_CFLAGS = -R $(SunOS_LIBDIR) -shared + + ifneq ($(debug),y) +-CFLAGS += -O2 -fno-omit-frame-pointer ++CFLAGS += -fno-omit-frame-pointer + else + # Less than -O1 produces bad code and large stack frames + CFLAGS += -O1 -fno-omit-frame-pointer +diff -ur xen-3.4.2.orig//Config.mk xen-3.4.2//Config.mk +--- xen-3.4.2.orig//Config.mk 2011-09-26 02:17:29.221771569 +0800 ++++ xen-3.4.2//Config.mk 2011-09-26 02:18:14.686771549 +0800 +@@ -14,7 +14,7 @@ + + # Tools to run on system hosting the build + HOSTCC = gcc +-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer ++HOSTCFLAGS = -Wall -Wstrict-prototypes -fomit-frame-pointer + HOSTCFLAGS += -fno-strict-aliasing + + DISTDIR ?= $(XEN_ROOT)/dist +diff -ur xen-3.4.2.orig//extras/mini-os/arch/ia64/arch.mk xen-3.4.2//extras/mini-os/arch/ia64/arch.mk +--- xen-3.4.2.orig//extras/mini-os/arch/ia64/arch.mk 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//extras/mini-os/arch/ia64/arch.mk 2011-09-26 02:18:14.689771549 +0800 +@@ -1,8 +1,8 @@ + + ARCH_CFLAGS := -mfixed-range=f2-f5,f12-f15,f32-f127 -mconstant-gp +-ARCH_CFLAGS += -O2 ++#ARCH_CFLAGS += -O2 + ARCH_ASFLAGS := -x assembler-with-cpp +-ARCH_ASFLAGS += -mfixed-range=f2-f5,f12-f15,f32-f127 -fomit-frame-pointer ++ARCH_ASFLAGS += -mfixed-range=f2-f5,f12-f15,f32-f127 + ARCH_ASFLAGS += -fno-builtin -fno-common -fno-strict-aliasing -mconstant-gp + + ARCH_LDFLAGS = -warn-common +diff -ur xen-3.4.2.orig//stubdom/grub.patches/00cvs xen-3.4.2//stubdom/grub.patches/00cvs +--- xen-3.4.2.orig//stubdom/grub.patches/00cvs 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//stubdom/grub.patches/00cvs 2011-09-26 02:18:14.549771549 +0800 +@@ -223,8 +223,8 @@ + +++ grub/configure.ac 2008-04-10 23:26:50.000000000 +0100 + @@ -86,13 +86,13 @@ if test "x$ac_cv_prog_gcc" = xyes; then + fi +- STAGE1_CFLAGS="-O2" +- GRUB_CFLAGS="-O2" ++ STAGE1_CFLAGS="" ++ GRUB_CFLAGSS="" + - AC_CACHE_CHECK([whether optimization for size works], size_flag, [ + + AC_CACHE_CHECK([whether optimization for size works], grub_cv_cc_Os, [ + saved_CFLAGS=$CFLAGS +@@ -237,7 +237,7 @@ + + if test "x$grub_cv_cc_Os" = xyes; then + STAGE2_CFLAGS="-Os" + else +- STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops" ++ STAGE2_CFLAGS=" -fno-strength-reduce -fno-unroll-loops" + @@ -100,16 +100,16 @@ if test "x$ac_cv_prog_gcc" = xyes; then + # OpenBSD has a GCC extension for protecting applications from + # stack smashing attacks, but GRUB doesn't want this feature. +diff -ur xen-3.4.2.orig//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure +--- xen-3.4.2.orig//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure 2011-09-26 02:24:37.261771380 +0800 +@@ -1849,7 +1849,7 @@ + GCC=`test $ac_compiler_gnu = yes && echo yes` + ac_test_CFLAGS=${CFLAGS+set} + ac_save_CFLAGS=$CFLAGS +-CFLAGS="-g" ++CFLAGS="" + echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 + echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 + if test "${ac_cv_prog_cc_g+set}" = set; then +@@ -1898,15 +1898,15 @@ + CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then +- CFLAGS="-g -O2" ++ CFLAGS="" + else +- CFLAGS="-g" ++ CFLAGS="" + fi + else + if test "$GCC" = yes; then +- CFLAGS="-O2" ++# CFLAGS="-O2" + else +- CFLAGS= ++ CFLAGS="" + fi + fi + echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +Only in xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver: configure~ +diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/configure xen-3.4.2//tools/ioemu-qemu-xen/configure +--- xen-3.4.2.orig//tools/ioemu-qemu-xen/configure 2011-09-26 02:17:29.223771569 +0800 ++++ xen-3.4.2//tools/ioemu-qemu-xen/configure 2011-09-26 02:22:14.583771444 +0800 +@@ -464,7 +464,7 @@ + + + # default flags for all hosts +-CFLAGS="$CFLAGS -O2 -g -fno-strict-aliasing" ++CFLAGS="$CFLAGS -g -fno-strict-aliasing" + CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls" + LDFLAGS="$LDFLAGS -g" + if test "$werror" = "yes" ; then +diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/cris/Makefile xen-3.4.2//tools/ioemu-qemu-xen/tests/cris/Makefile +--- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/cris/Makefile 2009-11-05 19:44:56.000000000 +0800 ++++ xen-3.4.2//tools/ioemu-qemu-xen/tests/cris/Makefile 2011-09-26 02:18:14.264771549 +0800 +@@ -12,7 +12,7 @@ + OBJCOPY = $(CROSS)objcopy + + # we rely on GCC inline:ing the stuff we tell it to in many places here. +-CFLAGS = -Winline -Wall -g -O2 -static ++CFLAGS = -Winline -Wall -g -static + NOSTDFLAGS = -nostartfiles -nostdlib + ASFLAGS += -g -Wa,-I,$(SRC_PATH)/tests/cris/ + LDLIBS = +diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/hello-mips.c xen-3.4.2//tools/ioemu-qemu-xen/tests/hello-mips.c +--- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/hello-mips.c 2009-11-05 19:44:56.000000000 +0800 ++++ xen-3.4.2//tools/ioemu-qemu-xen/tests/hello-mips.c 2011-09-26 02:18:14.669771549 +0800 +@@ -6,7 +6,7 @@ + * http://www.linux.com/howtos/Assembly-HOWTO/mips.shtml + * + * mipsel-linux-gcc -nostdlib -mno-abicalls -fno-PIC -mabi=32 \ +-* -O2 -static -o hello-mips hello-mips.c ++* -static -o hello-mips hello-mips.c + * + */ + #define __NR_SYSCALL_BASE 4000 +diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/Makefile xen-3.4.2//tools/ioemu-qemu-xen/tests/Makefile +--- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/Makefile 2009-11-05 19:44:56.000000000 +0800 ++++ xen-3.4.2//tools/ioemu-qemu-xen/tests/Makefile 2011-09-26 02:18:14.262771549 +0800 +@@ -2,7 +2,7 @@ + -include ../config-host.mak + VPATH=$(SRC_PATH)/tests + +-CFLAGS=-Wall -O2 -g -fno-strict-aliasing ++CFLAGS=-Wall -g -fno-strict-aliasing + #CFLAGS+=-msse2 + LDFLAGS= + +@@ -52,7 +52,7 @@ + + .PHONY: test-mmap + test-mmap: test-mmap.c +- $(CC) $(CFLAGS) -Wall -static -O2 $(LDFLAGS) -o $@ $< ++ $(CC) $(CFLAGS) -Wall -static $(LDFLAGS) -o $@ $< + -./test-mmap + -$(QEMU) ./test-mmap + -$(QEMU) -p 8192 ./test-mmap 8192 +@@ -88,17 +88,17 @@ + arm-linux-ld -o $@ $< + + hello-arm.o: hello-arm.c +- arm-linux-gcc -Wall -g -O2 -c -o $@ $< ++ arm-linux-gcc -Wall -g -c -o $@ $< + + test-arm-iwmmxt: test-arm-iwmmxt.s + cpp < $< | arm-linux-gnu-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@ + + # MIPS test + hello-mips: hello-mips.c +- mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $< ++ mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -o $@ $< + + hello-mipsel: hello-mips.c +- mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $< ++ mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -o $@ $< + + # testsuite for the CRIS port. + test-cris: +diff -ur xen-3.4.2.orig//tools/libaio/src/Makefile xen-3.4.2//tools/libaio/src/Makefile +--- xen-3.4.2.orig//tools/libaio/src/Makefile 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/libaio/src/Makefile 2011-09-26 02:18:14.288771549 +0800 +@@ -6,7 +6,7 @@ + libdir=$(prefix)/lib + + ARCH := $(shell uname -m | sed -e s/i.86/i386/) +-CFLAGS = -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC ++CFLAGS = -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -fPIC + SO_CFLAGS=-shared $(CFLAGS) + L_CFLAGS=$(CFLAGS) + LINK_FLAGS= +diff -ur xen-3.4.2.orig//tools/libxen/Makefile.dist xen-3.4.2//tools/libxen/Makefile.dist +--- xen-3.4.2.orig//tools/libxen/Makefile.dist 2011-09-26 02:17:29.223771569 +0800 ++++ xen-3.4.2//tools/libxen/Makefile.dist 2011-09-26 02:18:14.553771549 +0800 +@@ -22,7 +22,7 @@ + CFLAGS = -Iinclude \ + $(shell xml2-config --cflags) \ + $(shell curl-config --cflags) \ +- -W -Wall -Wmissing-prototypes -std=c99 -O2 -fPIC ++ -W -Wall -Wmissing-prototypes -std=c99 -fPIC + + LDFLAGS = $(shell xml2-config --libs) \ + $(shell curl-config --libs) +diff -ur xen-3.4.2.orig//tools/vnet/vnet-module/Makefile-2.4 xen-3.4.2//tools/vnet/vnet-module/Makefile-2.4 +--- xen-3.4.2.orig//tools/vnet/vnet-module/Makefile-2.4 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/vnet/vnet-module/Makefile-2.4 2011-09-26 02:18:14.659771549 +0800 +@@ -62,7 +62,7 @@ + CFLAGS += -Wno-unused-parameter + + CFLAGS += -g +-CFLAGS += -O2 ++#CFLAGS += -O2 + CFLAGS += -fno-strict-aliasing + CFLAGS += -fno-common + #CFLAGS += -fomit-frame-pointer +diff -ur xen-3.4.2.orig//extras/mini-os/minios.mk xen-3.4.2//extras/mini-os/minios.mk +--- xen-3.4.2.orig//extras/mini-os/minios.mk 2011-09-26 02:29:41.869771248 +0800 ++++ xen-3.4.2//extras/mini-os/minios.mk 2011-09-26 02:33:55.708771108 +0800 +@@ -23,7 +23,7 @@ + DEF_CFLAGS += -DGNT_DEBUG + DEF_CFLAGS += -DGNTMAP_DEBUG + else +-DEF_CFLAGS += -O3 ++#DEF_CFLAGS += -O3 + endif + + # Make the headers define our internal stuff +diff -ur xen-3.4.2.orig//tools/vnet/libxutil/Makefile xen-3.4.2//tools/vnet/libxutil/Makefile +--- xen-3.4.2.orig//tools/vnet/libxutil/Makefile 2011-09-26 02:29:41.872771248 +0800 ++++ xen-3.4.2//tools/vnet/libxutil/Makefile 2011-09-26 02:37:59.835771029 +0800 +@@ -26,7 +26,7 @@ + + $(call cc-option-add,CFLAGS,CC,-fgnu89-inline) + CFLAGS += -fno-strict-aliasing +-CFLAGS += -O3 ++#CFLAGS += -O3 + #CFLAGS += -g + + MAJOR := 3.0 +diff -ur xen-3.4.2.orig//tools/vnet/vnetd/Makefile xen-3.4.2//tools/vnet/vnetd/Makefile +--- xen-3.4.2.orig//tools/vnet/vnetd/Makefile 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/vnet/vnetd/Makefile 2011-09-26 02:37:59.834771029 +0800 +@@ -44,7 +44,7 @@ + CPPFLAGS += -D __ARCH_I386_ATOMIC__ + + #---------------------------------------------------------------------------- +-CFLAGS += -O3 ++#CFLAGS += -O3 + CFLAGS += $(INCLUDES) $(LIBS) + + LDFLAGS += $(LIBS)
\ No newline at end of file diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-werror-idiocy-v2.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-werror-idiocy-v2.patch new file mode 100644 index 0000000..f9c746d --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-werror-idiocy-v2.patch @@ -0,0 +1,429 @@ +diff -ur xen-3.4.2.orig//Config.mk xen-3.4.2//Config.mk +--- xen-3.4.2.orig//Config.mk 2009-11-10 23:16:03.000000000 +0800 ++++ xen-3.4.2//Config.mk 2011-09-25 02:34:11.605793042 +0800 +@@ -14,7 +14,7 @@ + + # Tools to run on system hosting the build + HOSTCC = gcc +-HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer ++HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer + HOSTCFLAGS += -fno-strict-aliasing + + DISTDIR ?= $(XEN_ROOT)/dist +diff -ur xen-3.4.2.orig//extras/mini-os/minios.mk xen-3.4.2//extras/mini-os/minios.mk +--- xen-3.4.2.orig//extras/mini-os/minios.mk 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//extras/mini-os/minios.mk 2011-09-25 02:34:11.855793042 +0800 +@@ -6,7 +6,7 @@ + + # Define some default flags. + # NB. '-Wcast-qual' is nasty, so I omitted it. +-DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls ++DEF_CFLAGS += -fno-builtin -Wall -Wredundant-decls -Wno-format -Wno-redundant-decls + DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,) + DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline) + DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline +diff -ur xen-3.4.2.orig//tools/blktap/drivers/Makefile xen-3.4.2//tools/blktap/drivers/Makefile +--- xen-3.4.2.orig//tools/blktap/drivers/Makefile 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//tools/blktap/drivers/Makefile 2011-09-25 02:34:11.750793042 +0800 +@@ -5,7 +5,7 @@ + QCOW_UTIL = img2qcow qcow2raw qcow-create + LIBAIO_DIR = ../../libaio/src + +-CFLAGS += -Werror ++CFLAGS += + CFLAGS += -Wno-unused + CFLAGS += -I../lib + CFLAGS += $(CFLAGS_libxenctrl) +diff -ur xen-3.4.2.orig//tools/blktap/lib/Makefile xen-3.4.2//tools/blktap/lib/Makefile +--- xen-3.4.2.orig//tools/blktap/lib/Makefile 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//tools/blktap/lib/Makefile 2011-09-25 02:34:11.748793042 +0800 +@@ -13,7 +13,7 @@ + SRCS := + SRCS += xenbus.c blkif.c xs_api.c + +-CFLAGS += -Werror ++CFLAGS += + CFLAGS += -Wno-unused + CFLAGS += -fPIC + # get asprintf(): +diff -ur xen-3.4.2.orig//tools/console/Makefile xen-3.4.2//tools/console/Makefile +--- xen-3.4.2.orig//tools/console/Makefile 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//tools/console/Makefile 2011-09-25 02:34:11.704793042 +0800 +@@ -2,7 +2,7 @@ + XEN_ROOT=../.. + include $(XEN_ROOT)/tools/Rules.mk + +-CFLAGS += -Werror ++CFLAGS += + + CFLAGS += $(CFLAGS_libxenctrl) + CFLAGS += $(CFLAGS_libxenstore) +diff -ur xen-3.4.2.orig//tools/debugger/xenitp/Makefile xen-3.4.2//tools/debugger/xenitp/Makefile +--- xen-3.4.2.orig//tools/debugger/xenitp/Makefile 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//tools/debugger/xenitp/Makefile 2011-09-25 02:34:11.744793042 +0800 +@@ -1,7 +1,7 @@ + XEN_ROOT=../../.. + include $(XEN_ROOT)/tools/Rules.mk + +-#CFLAGS += -Werror -g -O0 ++#CFLAGS += -g -O0 + + CFLAGS += $(CFLAGS_libxenctrl) + +diff -ur xen-3.4.2.orig//tools/firmware/Rules.mk xen-3.4.2//tools/firmware/Rules.mk +--- xen-3.4.2.orig//tools/firmware/Rules.mk 2009-11-10 23:12:55.000000000 +0800 ++++ xen-3.4.2//tools/firmware/Rules.mk 2011-09-25 02:34:11.565793045 +0800 +@@ -10,7 +10,7 @@ + CFLAGS += -DNDEBUG + endif + +-CFLAGS += -Werror ++CFLAGS += + + # Disable PIE/SSP if GCC supports them. They can break us. + $(call cc-option-add,CFLAGS,CC,-nopie) +diff -ur xen-3.4.2.orig//tools/flask/libflask/Makefile xen-3.4.2//tools/flask/libflask/Makefile +--- xen-3.4.2.orig//tools/flask/libflask/Makefile 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/flask/libflask/Makefile 2011-09-25 02:34:11.657793042 +0800 +@@ -9,7 +9,7 @@ + SRCS := + SRCS += flask_op.c + +-CFLAGS += -Werror ++CFLAGS += + CFLAGS += -fno-strict-aliasing + CFLAGS += $(INCLUDES) -I./include -I$(XEN_LIBXC) -I$(XEN_INCLUDE) + +diff -ur xen-3.4.2.orig//tools/flask/loadpolicy/Makefile xen-3.4.2//tools/flask/loadpolicy/Makefile +--- xen-3.4.2.orig//tools/flask/loadpolicy/Makefile 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/flask/loadpolicy/Makefile 2011-09-25 02:34:11.660793042 +0800 +@@ -6,7 +6,7 @@ + LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask + + PROFILE=#-pg +-BASECFLAGS=-Wall -g -Werror ++BASECFLAGS=-Wall -g + BASECFLAGS+= $(PROFILE) + #BASECFLAGS+= -I$(XEN_ROOT)/tools + BASECFLAGS+= $(CFLAGS_libxenctrl) +diff -ur xen-3.4.2.orig//tools/fs-back/Makefile xen-3.4.2//tools/fs-back/Makefile +--- xen-3.4.2.orig//tools/fs-back/Makefile 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/fs-back/Makefile 2011-09-25 02:34:11.637793042 +0800 +@@ -5,7 +5,7 @@ + + IBIN = fs-backend + +-CFLAGS += -Werror ++CFLAGS += + CFLAGS += -Wno-unused + CFLAGS += -fno-strict-aliasing + CFLAGS += $(CFLAGS_libxenctrl) +diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/configure xen-3.4.2//tools/ioemu-qemu-xen/configure +--- xen-3.4.2.orig//tools/ioemu-qemu-xen/configure 2009-11-05 19:44:56.000000000 +0800 ++++ xen-3.4.2//tools/ioemu-qemu-xen/configure 2011-09-25 02:34:11.888793042 +0800 +@@ -468,7 +468,7 @@ + CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls" + LDFLAGS="$LDFLAGS -g" + if test "$werror" = "yes" ; then +-CFLAGS="$CFLAGS -Werror" ++CFLAGS="$CFLAGS" + fi + + if test "$solaris" = "no" ; then +@@ -1150,7 +1150,7 @@ + echo "sparse enabled $sparse" + echo "profiler $profiler" + echo "static build $static" +-echo "-Werror enabled $werror" ++ + if test "$darwin" = "yes" ; then + echo "Cocoa support $cocoa" + fi +diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/Makefile.target xen-3.4.2//tools/ioemu-qemu-xen/Makefile.target +--- xen-3.4.2.orig//tools/ioemu-qemu-xen/Makefile.target 2011-09-25 02:33:23.946793064 +0800 ++++ xen-3.4.2//tools/ioemu-qemu-xen/Makefile.target 2011-09-25 02:34:11.584793042 +0800 +@@ -26,7 +26,7 @@ + TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) + VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw + CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H +-#CFLAGS+=-Werror ++#CFLAGS+= + LIBS= + # user emulator name + ifndef TARGET_ARCH2 +diff -ur xen-3.4.2.orig//tools/libaio/harness/Makefile xen-3.4.2//tools/libaio/harness/Makefile +--- xen-3.4.2.orig//tools/libaio/harness/Makefile 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/libaio/harness/Makefile 2011-09-25 02:34:11.674793042 +0800 +@@ -4,7 +4,7 @@ + HARNESS_SRCS:=main.c + # io_queue.c + +-CFLAGS=-Wall -Werror -g -O -laio ++CFLAGS=-Wall -g -O -laio + #-lpthread -lrt + + all: $(PROGS) +diff -ur xen-3.4.2.orig//tools/libfsimage/Rules.mk xen-3.4.2//tools/libfsimage/Rules.mk +--- xen-3.4.2.orig//tools/libfsimage/Rules.mk 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/libfsimage/Rules.mk 2011-09-25 02:34:11.566793044 +0800 +@@ -1,6 +1,6 @@ + include $(XEN_ROOT)/tools/Rules.mk + +-CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror ++CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ + LDFLAGS += -L../common/ + + PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) +diff -ur xen-3.4.2.orig//tools/libxc/Makefile xen-3.4.2//tools/libxc/Makefile +--- xen-3.4.2.orig//tools/libxc/Makefile 2011-09-25 02:33:23.987793064 +0800 ++++ xen-3.4.2//tools/libxc/Makefile 2011-09-25 02:34:11.687793042 +0800 +@@ -52,7 +52,7 @@ + + -include $(XEN_TARGET_ARCH)/Makefile + +-CFLAGS += -Werror -Wmissing-prototypes ++CFLAGS += -Wmissing-prototypes + CFLAGS += $(INCLUDES) -I. -I../xenstore -I../include + + # Needed for posix_fadvise64() in xc_linux.c +diff -ur xen-3.4.2.orig//tools/libxen/Makefile.dist xen-3.4.2//tools/libxen/Makefile.dist +--- xen-3.4.2.orig//tools/libxen/Makefile.dist 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/libxen/Makefile.dist 2011-09-25 02:34:11.593793042 +0800 +@@ -22,7 +22,7 @@ + CFLAGS = -Iinclude \ + $(shell xml2-config --cflags) \ + $(shell curl-config --cflags) \ +- -W -Wall -Wmissing-prototypes -Werror -std=c99 -O2 -fPIC ++ -W -Wall -Wmissing-prototypes -std=c99 -O2 -fPIC + + LDFLAGS = $(shell xml2-config --libs) \ + $(shell curl-config --libs) +diff -ur xen-3.4.2.orig//tools/misc/lomount/Makefile xen-3.4.2//tools/misc/lomount/Makefile +--- xen-3.4.2.orig//tools/misc/lomount/Makefile 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/misc/lomount/Makefile 2011-09-25 02:34:11.666793042 +0800 +@@ -1,7 +1,7 @@ + XEN_ROOT=../../.. + include $(XEN_ROOT)/tools/Rules.mk + +-CFLAGS += -Werror ++CFLAGS += + + HDRS = $(wildcard *.h) + OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) +diff -ur xen-3.4.2.orig//tools/misc/Makefile xen-3.4.2//tools/misc/Makefile +--- xen-3.4.2.orig//tools/misc/Makefile 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/misc/Makefile 2011-09-25 02:34:11.669793042 +0800 +@@ -1,7 +1,7 @@ + XEN_ROOT=../.. + include $(XEN_ROOT)/tools/Rules.mk + +-CFLAGS += -Werror ++CFLAGS += + + INCLUDES += -I $(XEN_XC) + INCLUDES += -I $(XEN_LIBXC) +diff -ur xen-3.4.2.orig//tools/pygrub/setup.py xen-3.4.2//tools/pygrub/setup.py +--- xen-3.4.2.orig//tools/pygrub/setup.py 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/pygrub/setup.py 2011-09-25 02:34:11.901793042 +0800 +@@ -3,7 +3,7 @@ + import os + import sys + +-extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] ++extra_compile_args = [ "-fno-strict-aliasing" ] + + XEN_ROOT = "../.." + +diff -ur xen-3.4.2.orig//tools/python/setup.py xen-3.4.2//tools/python/setup.py +--- xen-3.4.2.orig//tools/python/setup.py 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/python/setup.py 2011-09-25 02:34:11.897793042 +0800 +@@ -4,7 +4,7 @@ + + XEN_ROOT = "../.." + +-extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] ++extra_compile_args = [ "-fno-strict-aliasing" ] + + include_dirs = [ XEN_ROOT + "/tools/libxc", + XEN_ROOT + "/tools/xenstore", +diff -ur xen-3.4.2.orig//tools/security/Makefile xen-3.4.2//tools/security/Makefile +--- xen-3.4.2.orig//tools/security/Makefile 2009-11-10 23:12:56.000000000 +0800 ++++ xen-3.4.2//tools/security/Makefile 2011-09-25 02:34:11.701793042 +0800 +@@ -1,7 +1,7 @@ + XEN_ROOT = ../.. + include $(XEN_ROOT)/tools/Rules.mk + +-CFLAGS += -Werror ++CFLAGS += + CFLAGS += -fno-strict-aliasing + CFLAGS += -I. $(CFLAGS_libxenctrl) + +diff -ur xen-3.4.2.orig//tools/vnet/libxutil/Makefile xen-3.4.2//tools/vnet/libxutil/Makefile +--- xen-3.4.2.orig//tools/vnet/libxutil/Makefile 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/vnet/libxutil/Makefile 2011-09-25 02:34:11.694793042 +0800 +@@ -25,7 +25,7 @@ + PIC_OBJS := $(LIB_SRCS:.c=.opic) + + $(call cc-option-add,CFLAGS,CC,-fgnu89-inline) +-CFLAGS += -Werror -fno-strict-aliasing ++CFLAGS += -fno-strict-aliasing + CFLAGS += -O3 + #CFLAGS += -g + +diff -ur xen-3.4.2.orig//tools/vtpm/Rules.mk xen-3.4.2//tools/vtpm/Rules.mk +--- xen-3.4.2.orig//tools/vtpm/Rules.mk 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/vtpm/Rules.mk 2011-09-25 02:34:11.563793044 +0800 +@@ -9,7 +9,7 @@ + TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin + + # General compiler flags +-CFLAGS = -Werror -g3 -I. ++CFLAGS = -g3 -I. + + # Generic project files + HDRS = $(wildcard *.h) +diff -ur xen-3.4.2.orig//tools/vtpm_manager/Rules.mk xen-3.4.2//tools/vtpm_manager/Rules.mk +--- xen-3.4.2.orig//tools/vtpm_manager/Rules.mk 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/vtpm_manager/Rules.mk 2011-09-25 02:34:11.562793042 +0800 +@@ -9,7 +9,7 @@ + TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin + + # General compiler flags +-CFLAGS = -Werror -g3 -I. ++CFLAGS = -g3 -I. + + # Generic project files + HDRS = $(wildcard *.h) +diff -ur xen-3.4.2.orig//tools/xcutils/Makefile xen-3.4.2//tools/xcutils/Makefile +--- xen-3.4.2.orig//tools/xcutils/Makefile 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/xcutils/Makefile 2011-09-25 02:34:11.636793042 +0800 +@@ -11,7 +11,7 @@ + XEN_ROOT = ../.. + include $(XEN_ROOT)/tools/Rules.mk + +-CFLAGS += -Werror ++CFLAGS += + CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) + + PROGRAMS = xc_restore xc_save readnotes lsevtchn +diff -ur xen-3.4.2.orig//tools/xenmon/Makefile xen-3.4.2//tools/xenmon/Makefile +--- xen-3.4.2.orig//tools/xenmon/Makefile 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/xenmon/Makefile 2011-09-25 02:34:11.641793042 +0800 +@@ -13,7 +13,7 @@ + XEN_ROOT=../.. + include $(XEN_ROOT)/tools/Rules.mk + +-CFLAGS += -Werror ++CFLAGS += + CFLAGS += -I $(XEN_XC) + CFLAGS += $(CFLAGS_libxenctrl) + LDFLAGS += $(LDFLAGS_libxenctrl) +diff -ur xen-3.4.2.orig//tools/xenpmd/Makefile xen-3.4.2//tools/xenpmd/Makefile +--- xen-3.4.2.orig//tools/xenpmd/Makefile 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/xenpmd/Makefile 2011-09-25 02:34:11.656793042 +0800 +@@ -1,7 +1,7 @@ + XEN_ROOT=../.. + include $(XEN_ROOT)/tools/Rules.mk + +-CFLAGS += -Werror ++CFLAGS += + CFLAGS += $(CFLAGS_libxenstore) + LDFLAGS += $(LDFLAGS_libxenstore) + +diff -ur xen-3.4.2.orig//tools/xenstat/libxenstat/Makefile xen-3.4.2//tools/xenstat/libxenstat/Makefile +--- xen-3.4.2.orig//tools/xenstat/libxenstat/Makefile 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/xenstat/libxenstat/Makefile 2011-09-25 02:34:11.681793042 +0800 +@@ -34,7 +34,7 @@ + OBJECTS-$(CONFIG_NetBSD) += src/xenstat_netbsd.o + SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR) + +-WARN_FLAGS=-Wall -Werror ++WARN_FLAGS=-Wall + + CFLAGS+=-Isrc -I$(XEN_LIBXC) -I$(XEN_XENSTORE) -I$(XEN_INCLUDE) + LDFLAGS+=-Lsrc -L$(XEN_XENSTORE)/ -L$(XEN_LIBXC)/ +diff -ur xen-3.4.2.orig//tools/xenstat/xentop/Makefile xen-3.4.2//tools/xenstat/xentop/Makefile +--- xen-3.4.2.orig//tools/xenstat/xentop/Makefile 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/xenstat/xentop/Makefile 2011-09-25 02:34:11.684793042 +0800 +@@ -18,7 +18,7 @@ + all install xentop: + else + +-CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT) ++CFLAGS += -DGCC_PRINTF -Wall -I$(XEN_LIBXENSTAT) + LDFLAGS += -L$(XEN_LIBXENSTAT) + LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS) + CFLAGS += -DHOST_$(XEN_OS) +diff -ur xen-3.4.2.orig//tools/xenstore/Makefile xen-3.4.2//tools/xenstore/Makefile +--- xen-3.4.2.orig//tools/xenstore/Makefile 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/xenstore/Makefile 2011-09-25 02:34:11.640793042 +0800 +@@ -4,7 +4,7 @@ + MAJOR = 3.0 + MINOR = 0 + +-CFLAGS += -Werror ++CFLAGS += + CFLAGS += -I. + CFLAGS += $(CFLAGS_libxenctrl) + +diff -ur xen-3.4.2.orig//tools/xenstore/xenstored_core.c xen-3.4.2//tools/xenstore/xenstored_core.c +--- xen-3.4.2.orig//tools/xenstore/xenstored_core.c 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/xenstore/xenstored_core.c 2011-09-25 02:34:11.845793042 +0800 +@@ -865,7 +865,7 @@ + { + unsigned int offset, datalen; + struct node *node; +- char *vec[1] = { NULL }; /* gcc4 + -W + -Werror fucks code. */ ++ char *vec[1] = { NULL }; /* gcc4 + -W + fucks code. */ + char *name; + + /* Extra "strings" can be created by binary data. */ +diff -ur xen-3.4.2.orig//tools/xentrace/Makefile xen-3.4.2//tools/xentrace/Makefile +--- xen-3.4.2.orig//tools/xentrace/Makefile 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//tools/xentrace/Makefile 2011-09-25 02:34:11.745793042 +0800 +@@ -1,7 +1,7 @@ + XEN_ROOT=../.. + include $(XEN_ROOT)/tools/Rules.mk + +-CFLAGS += -Werror ++CFLAGS += + + CFLAGS += $(CFLAGS_libxenctrl) + LDFLAGS += $(LDFLAGS_libxenctrl) +Only in xen-3.4.2/: Werror.sh +diff -ur xen-3.4.2.orig//xen/arch/ia64/Rules.mk xen-3.4.2//xen/arch/ia64/Rules.mk +--- xen-3.4.2.orig//xen/arch/ia64/Rules.mk 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//xen/arch/ia64/Rules.mk 2011-09-25 02:34:11.570793042 +0800 +@@ -68,7 +68,7 @@ + CFLAGS += -DCONFIG_XEN_IA64_TLBFLUSH_CLOCK + endif + ifeq ($(no_warns),y) +-CFLAGS += -Wa,--fatal-warnings -Werror -Wno-uninitialized ++CFLAGS += -Wa,--fatal-warnings -Wno-uninitialized + endif + ifneq ($(vhpt_disable),y) + CFLAGS += -DVHPT_ENABLED=1 +diff -ur xen-3.4.2.orig//xen/arch/x86/boot/build32.mk xen-3.4.2//xen/arch/x86/boot/build32.mk +--- xen-3.4.2.orig//xen/arch/x86/boot/build32.mk 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//xen/arch/x86/boot/build32.mk 2011-09-25 02:34:11.914793042 +0800 +@@ -8,7 +8,7 @@ + $(call cc-option-add,CFLAGS,CC,-fno-stack-protector) + $(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all) + +-CFLAGS += -Werror -fno-builtin -msoft-float ++CFLAGS += -fno-builtin -msoft-float + + # NB. awk invocation is a portable alternative to 'head -n -1' + %.S: %.bin +diff -ur xen-3.4.2.orig//xen/arch/x86/Rules.mk xen-3.4.2//xen/arch/x86/Rules.mk +--- xen-3.4.2.orig//xen/arch/x86/Rules.mk 2009-11-10 23:12:57.000000000 +0800 ++++ xen-3.4.2//xen/arch/x86/Rules.mk 2011-09-25 02:34:11.572793042 +0800 +@@ -17,7 +17,7 @@ + endif + + CFLAGS += -fno-builtin -fno-common +-CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe ++CFLAGS += -iwithprefix include -Wno-pointer-arith -pipe + CFLAGS += -I$(BASEDIR)/include + CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic + CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default diff --git a/app-emulation/xen-tools/files/xen-tools-4.1.1-bridge.patch b/app-emulation/xen-tools/files/xen-tools-4.1.1-bridge.patch new file mode 100644 index 0000000..4b3a4ba --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-4.1.1-bridge.patch @@ -0,0 +1,12 @@ +diff -ur xen-4.1.1.orig//tools/hotplug/Linux/network-bridge xen-4.1.1/tools/hotplug/Linux/network-bridge +--- xen-4.1.1.orig//tools/hotplug/Linux/network-bridge 2011-10-14 02:28:43.481714285 +0800 ++++ xen-4.1.1/tools/hotplug/Linux/network-bridge 2011-10-16 01:06:11.226673108 +0800 +@@ -216,7 +216,7 @@ + return + fi + +- if [ `brctl show | wc -l` != 1 ]; then ++ if [ `brctl show | grep $netdev | wc -l` != 0 ]; then + return + fi + diff --git a/app-emulation/xen-tools/files/xen-tools-4.1.1-curl.patch b/app-emulation/xen-tools/files/xen-tools-4.1.1-curl.patch new file mode 100644 index 0000000..c3fd913 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-4.1.1-curl.patch @@ -0,0 +1,10 @@ +diff -ur xen-4.1.1.orig//tools/check/check_curl xen-4.1.1/tools/check/check_curl +--- xen-4.1.1.orig//tools/check/check_curl 2011-06-15 00:03:44.000000000 +0800 ++++ xen-4.1.1/tools/check/check_curl 2011-10-14 00:42:08.189717078 +0800 +@@ -9,5 +9,6 @@ + fi + + has_or_fail curl-config + curl_libs=`curl-config --libs` || fail "curl-config --libs failed" ++curl_libs=`echo $curl_libs | sed -re 's/-(W|march|mtune|pipe)[^[:space:]]*[[:space:]]//g'` || fail "curl-config --libs failed" + test_link $curl_libs || fail "dependency libraries for curl are missing" diff --git a/app-emulation/xen-tools/files/xen-tools-4.1.1-libxl-tap.patch b/app-emulation/xen-tools/files/xen-tools-4.1.1-libxl-tap.patch new file mode 100644 index 0000000..ba72c49 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-4.1.1-libxl-tap.patch @@ -0,0 +1,37 @@ +Index: xen-tools-4.1.1/tools/libxl/libxl_dm.c +=================================================================== +--- xen-4.1.1.orig/tools/libxl/libxl_dm.c Tue Mar 15 10:14:27 2011 +0000 ++++ xen-4.1.1/tools/libxl/libxl_dm.c Tue Mar 15 18:19:47 2011 +0000 +@@ -828,8 +828,29 @@ + goto out; + } + +- if (nr_disks > 0 && !libxl__blktap_enabled(&gc)) +- ret = 1; ++ if (nr_disks > 0) { ++ int blktap_enabled = -1; ++ for (i = 0; i < nr_disks; i++) { ++ switch (disks[i].backend) { ++ case DISK_BACKEND_TAP: ++ if (blktap_enabled == -1) ++ blktap_enabled = libxl__blktap_enabled(&gc); ++ if (!blktap_enabled) { ++ ret = 1; ++ goto out; ++ } ++ break; ++ ++ case DISK_BACKEND_QDISK: ++ ret = 1; ++ goto out; ++ ++ case DISK_BACKEND_PHY: ++ case DISK_BACKEND_UNKNOWN: ++ break; ++ } ++ } ++ } + + out: + libxl__free_all(&gc); + diff --git a/app-emulation/xen-tools/files/xen-tools-4.1.2-pyxml.patch b/app-emulation/xen-tools/files/xen-tools-4.1.2-pyxml.patch new file mode 100644 index 0000000..5b14e4c --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-4.1.2-pyxml.patch @@ -0,0 +1,12 @@ +--- tools/python/xen/xm/create.py ++++ tools/python/xen/xm/create.py +@@ -1538,6 +1538,9 @@ + SXPPrettyPrint.prettyprint(config) + + if opts.vals.xmldryrun and serverType == SERVER_XEN_API: ++ import xml ++ if hasattr(xml, "use_pyxml"): ++ xml.use_pyxml() + from xml.dom.ext import PrettyPrint as XMLPrettyPrint + XMLPrettyPrint(doc) + diff --git a/app-emulation/xen-tools/files/xenconsoled.confd b/app-emulation/xen-tools/files/xenconsoled.confd new file mode 100644 index 0000000..b2e194b --- /dev/null +++ b/app-emulation/xen-tools/files/xenconsoled.confd @@ -0,0 +1,2 @@ +# /etc/conf.d/xenstored +XENCONSOLED_OPTS="" diff --git a/app-emulation/xen-tools/files/xenconsoled.initd b/app-emulation/xen-tools/files/xenconsoled.initd new file mode 100644 index 0000000..12e4381 --- /dev/null +++ b/app-emulation/xen-tools/files/xenconsoled.initd @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenconsoled.initd,v 1.1 2011/04/05 19:23:05 alexxy Exp $ + +depend() { + need xenstored +} + +start() { + ebegin "Starting xenconsoled daemon" + start-stop-daemon --start --exec /usr/sbin/xenconsoled \ + --pidfile /var/run/xenconsoled.pid \ + -- --pid-file=/var/run/xenconsoled.pid \ + ${XENCONSOLED_OPTS} + eend $* +} + +stop() { + ebegin "Stoping xenconsoled daemon" + start-stop-daemon --stop --exec /usr/sbin/xenconsoled \ + --pidfile /var/run/xenconsoled.pid + eend $* +} + diff --git a/app-emulation/xen-tools/files/xend.initd-r1 b/app-emulation/xen-tools/files/xend.initd-r1 new file mode 100644 index 0000000..d1e49b0 --- /dev/null +++ b/app-emulation/xen-tools/files/xend.initd-r1 @@ -0,0 +1,71 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd-r1,v 1.1 2009/09/01 09:56:36 wschlich Exp $ + +opts="start stop status restart" + +depend() { + need net + before xendomains sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp +} + +await_daemons_up() { + for ((i=0; i<5; i++)); do + /usr/sbin/xend status && return 0 + sleep 1 + done + return 1 +} + +is_privileged_domain() { + grep -qsE '^control_d$' /proc/xen/capabilities + return $? +} + +start() { + if is_privileged_domain ; then + ebegin "Starting Xen control daemon" + /usr/sbin/xend start && await_daemons_up + eend $? + else + eerror "Can't start xend - this is not a privileged domain." + return 1 + fi +} + +stop() { + if [ "$(xm list 2>/dev/null | wc -l)" -gt 2 ]; then + ebegin "Stopping all Xen domains" + /usr/sbin/xm shutdown --all --wait >/dev/null + eend $? + fi + + ebegin "Stopping Xen control daemon" + /usr/sbin/xend stop + eend $? + + #ebegin "Stopping xenconsoled" + #kill $(</var/run/xenconsoled.pid) + #eend $? + + #ebegin "Stopping xenstored" + #kill $(</var/run/xenstore.pid) + #eend $? +} + +restart() { + # IMPORTANT: do NOT restart xenstored/xenconsoled when restarting + # just xend, as this can be fatal! + # When restarting xend, leave alone xenstored/xenconsoled and all + # running domains. + # See http://article.gmane.org/gmane.comp.emulators.xen.user/40656 + ebegin "Restarting Xen control daemon" + /usr/sbin/xend restart + eend $? + # we fool /etc/init.d/runscript.sh:svc_restart() here: svc_stop svc_start +} + +status() { + is_privileged_domain && /usr/sbin/xend status +} diff --git a/app-emulation/xen-tools/files/xend.initd-r2 b/app-emulation/xen-tools/files/xend.initd-r2 new file mode 100644 index 0000000..b790e7f --- /dev/null +++ b/app-emulation/xen-tools/files/xend.initd-r2 @@ -0,0 +1,52 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd-r2,v 1.2 2011/09/10 17:22:46 alexxy Exp $ + +opts="start stop status restart" + +depend() { + need net xenconsoled xenstored + before xendomains sshd +} + +await_daemons_up() { + for ((i=0; i<5; i++)); do + sleep 1 + /usr/sbin/xend status && return 0 + done + return 1 +} + +is_privileged_domain() { + grep -qsE '^control_d$' /proc/xen/capabilities + return $? +} + +start() { + if is_privileged_domain ; then + ebegin "Starting Xen control daemon" + /usr/sbin/xend start + /usr/sbin/xend status || await_daemons_up + eend $? + else + eerror "Can't start xend - this is not a privileged domain." + return 1 + fi +} + +stop() { + if [ "$(xm list | wc -l)" -gt 2 ]; then + ebegin " Stopping all domains" + /usr/sbin/xl shutdown -a -w >/dev/null + eend $? + fi + + ebegin "Stopping Xen control daemon" + /usr/sbin/xend stop + eend $? +} + +status() { + is_privileged_domain && /usr/sbin/xend status +} diff --git a/app-emulation/xen-tools/files/xendomains-screen.confd b/app-emulation/xen-tools/files/xendomains-screen.confd new file mode 100644 index 0000000..1482c0a --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains-screen.confd @@ -0,0 +1,15 @@ +# When SCREEN="yes", domains in AUTODIR have their consoles connected to a +# screen session named SCREEN_NAME, with output logged to individual files +# named after each domain and written to /var/log/xen-consoles/ . These files +# are rotated (using app-admin/logrotate) every time xendomains is started. + +SCREEN="yes" +SCREEN_NAME="xen" + +# Number of seconds between writes to screen's logfiles. +# +# Lower values mean more disk activity and hence a possible performance +# impact, but higher values mean a greater chance of loosing some output +# in the event of a crash. + +SCREEN_LOG_INTERVAL="1" diff --git a/app-emulation/xen-tools/files/xendomains.confd b/app-emulation/xen-tools/files/xendomains.confd new file mode 100644 index 0000000..90c1f52 --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains.confd @@ -0,0 +1,9 @@ +# /etc/conf.d/xendomains + +# Directory of domains to boot. AUTODIR should contain one or more symlinks +# to domain config files in /etc/xen +AUTODIR=/etc/xen/auto + +# Send shutdown commands to all domains in parallel instead of waiting for +# each to shutdown individually +PARALLEL_SHUTDOWN=yes diff --git a/app-emulation/xen-tools/files/xendomains.initd-r1 b/app-emulation/xen-tools/files/xendomains.initd-r1 new file mode 100755 index 0000000..c7f6f88 --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains.initd-r1 @@ -0,0 +1,117 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r1,v 1.2 2011/10/13 19:30:37 alexxy Exp $ + +opts="start stop status restart" + +depend() { + need xend + after dhcp +} + +get_domname() { + local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1) + + if [[ -z ${name_from_file} ]] ; then + basename "${1}" + else + echo ${name_from_file} + fi +} + +is_running() { + /usr/sbin/xm list "${1}" >/dev/null 2>&1 +} + +using_screen() { + [[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]] +} + +set_screen_cmd() { + screen_cmd="screen -c ${SCREENRC:-/dev/null} -q -r ${SCREEN_NAME:=xen} -X" +} + +start() { + set_screen_cmd + + einfo "Starting Xen domains from ${AUTODIR:=/etc/xen/auto}" + if using_screen ; then + ebegin "Creating screen session to hold domain consoles" + ( screen -c ${SCREENRC:-/dev/null} -d -m -S ${SCREEN_NAME} -t dom0 && sleep 3 \ + && ${screen_cmd} zombie dr \ + && logrotate -f /etc/xen/xen-consoles.logrotate \ + && ${screen_cmd} logfile /var/log/xen-consoles/%t.log \ + && ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \ + && ${screen_cmd} log on \ + && ${screen_cmd} deflog on ) >/dev/null + if [[ $? -ne 0 ]] ; then + eend 1 + return 1 + else + eend + fi + fi + # Create all domains with config files in AUTODIR. + for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do + name=$(get_domname ${dom}) + if ! is_running ${name} ; then + ebegin " Starting domain ${name}" + if using_screen ; then + ${screen_cmd} screen -t ${name} xm create ${dom} -c + else + xm create --quiet ${dom} + fi + eend $? + else + einfo " Not starting domain ${name} - already running" + fi + done +} + +stop() { + set_screen_cmd + + einfo "Shutting down Xen domains from ${AUTODIR:=/etc/xen/auto}" + # Stop all domains with config files in AUTODIR. + DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)" + + if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then + for dom in $DOMAINS ; do + name=$(get_domname ${dom}) + if is_running ${name} ; then + ebegin " Asking domain ${name} to shutdown in the background..." + xm shutdown --wait ${name} >/dev/null & + else + einfo " Not stopping domain ${name} - not running" + fi + done + einfo " Waiting for shutdown of domains that are still running" + wait + eend $? + else + for dom in $DOMAINS ; do + name=$(get_domname ${dom}) + if is_running ${name} ; then + ebegin " Waiting for domain ${name} to shutdown" + xm shutdown --wait ${name} >/dev/null + eend $? + else + einfo " Not stopping domain ${name} - not running" + fi + done + fi + if using_screen ; then + if ${screen_cmd} sleep 0 >/dev/null 2>&1 ; then + ebegin "Closing screen session ${SCREEN_NAME}" + ${screen_cmd} quit + eend $? + else + eend 0 + fi + fi +} + +status() { + /usr/sbin/xm list +} diff --git a/app-emulation/xen-tools/files/xendomains.initd-r2 b/app-emulation/xen-tools/files/xendomains.initd-r2 new file mode 100644 index 0000000..9240376 --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains.initd-r2 @@ -0,0 +1,117 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r2,v 1.2 2011/09/10 17:22:46 alexxy Exp $ + +opts="start stop status restart" + +depend() { + need xenstored xenconsoled xend + after dhcp +} + +get_domname() { + local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1) + + if [[ -z ${name_from_file} ]] ; then + basename "${1}" + else + echo ${name_from_file} + fi +} + +is_running() { + /usr/sbin/xl list "${1}" >/dev/null 2>&1 +} + +using_screen() { + [[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]] +} + +set_screen_cmd() { + screen_cmd="screen -c ${SCREENRC:-/dev/null} -q -r ${SCREEN_NAME:=xen} -X" +} + +start() { + set_screen_cmd + + einfo "Starting Xen domains from ${AUTODIR:=/etc/xen/auto}" + if using_screen ; then + ebegin "Creating screen session to hold domain consoles" + ( screen -c ${SCREENRC:-/dev/null} -d -m -S ${SCREEN_NAME} -t dom0 \ + && ${screen_cmd} zombie dr \ + && logrotate -f /etc/xen/xen-consoles.logrotate \ + && ${screen_cmd} logfile /var/log/xen-consoles/%t.log \ + && ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \ + && ${screen_cmd} log on \ + && ${screen_cmd} deflog on ) >/dev/null + if [[ $? -ne 0 ]] ; then + eend 1 + return 1 + else + eend + fi + fi + # Create all domains with config files in AUTODIR. + for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do + name=$(get_domname ${dom}) + if ! is_running ${name} ; then + ebegin " Starting domain ${name}" + if using_screen ; then + ${screen_cmd} screen -t ${name} xl create ${dom} -c + else + xl create --quiet ${dom} + fi + eend $? + else + einfo " Not starting domain ${name} - already running" + fi + done +} + +stop() { + set_screen_cmd + + einfo "Shutting down Xen domains from ${AUTODIR:=/etc/xen/auto}" + # Stop all domains with config files in AUTODIR. + DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)" + + if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then + for dom in $DOMAINS ; do + name=$(get_domname ${dom}) + if is_running ${name} ; then + ebegin " Asking domain ${name} to shutdown in the background..." + xl shutdown -w ${name} >/dev/null & + else + einfo " Not stopping domain ${name} - not running" + fi + done + einfo " Waiting for shutdown of domains that are still running" + wait + eend $? + else + for dom in $DOMAINS ; do + name=$(get_domname ${dom}) + if is_running ${name} ; then + ebegin " Waiting for domain ${name} to shutdown" + xl shutdown -w ${name} >/dev/null + eend $? + else + einfo " Not stopping domain ${name} - not running" + fi + done + fi + if using_screen ; then + if ${screen_cmd} sleep 0 >/dev/null 2>&1 ; then + ebegin "Closing screen session ${SCREEN_NAME}" + ${screen_cmd} quit + eend $? + else + eend 0 + fi + fi +} + +status() { + /usr/sbin/xl list +} diff --git a/app-emulation/xen-tools/files/xenstored.confd b/app-emulation/xen-tools/files/xenstored.confd new file mode 100644 index 0000000..31b9293 --- /dev/null +++ b/app-emulation/xen-tools/files/xenstored.confd @@ -0,0 +1,2 @@ +# /etc/conf.d/xenstored +XENSTORED_OPTS="" diff --git a/app-emulation/xen-tools/files/xenstored.initd b/app-emulation/xen-tools/files/xenstored.initd new file mode 100755 index 0000000..f85aa4f --- /dev/null +++ b/app-emulation/xen-tools/files/xenstored.initd @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenstored.initd,v 1.2 2011/04/05 21:25:03 alexxy Exp $ + +depend() { + need net + before xendomains xend sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp +} + +start() { + ebegin "Starting xenstored daemon" + start-stop-daemon --start --exec /usr/sbin/xenstored \ + --pidfile /var/run/xenstored.pid \ + -- --pid-file=/var/run/xenstored.pid \ + $XENSTORED_OPTS + sleep 15 + einfo "Setting domain0 name record" + /usr/bin/xenstore-write "/local/domain/0/name" "Domain-0" + eend $* +} + +stop() { + ebegin "Stopping xenstored daemon" + start-stop-daemon --stop --exec /usr/sbin/xenstored \ + --pidfile /var/run/xenstored.pid + eend $? +} + |