summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <della5@iinet.com.au>2013-02-12 21:22:07 +0800
committerIan Delaney <della5@iinet.com.au>2013-02-12 21:22:07 +0800
commit93613e861446f3a9191b8e0f6fff81c5b618830b (patch)
tree2f0245fa0b2fd66b84db210024e3f3b2e059d778
parent[xen-stubdom] Name of contributor added to metadata.xml (diff)
downloadvirtualization-93613e861446f3a9191b8e0f6fff81c5b618830b.tar.gz
virtualization-93613e861446f3a9191b8e0f6fff81c5b618830b.tar.bz2
virtualization-93613e861446f3a9191b8e0f6fff81c5b618830b.zip
Drop xen-tools-4.1.2-r[2,3], add xen-tools-4.2.1-r2 adapted to work towards a fix for Bug #351648
Package-Manager: portage-2.1.11.40
-rw-r--r--app-emulation/xen-tools/Manifest3
-rw-r--r--app-emulation/xen-tools/files/ipxe-nopie.patch8
-rw-r--r--app-emulation/xen-tools/files/stubs-32.h20
-rw-r--r--app-emulation/xen-tools/files/xen-4-CVE-2012-6075-XSA-41.patch39
-rw-r--r--app-emulation/xen-tools/files/xen-4-fix_dotconfig-gcc.patch245
-rw-r--r--app-emulation/xen-tools/files/xen-tools-4-docfix.patch12
-rw-r--r--app-emulation/xen-tools/metadata.xml4
-rw-r--r--app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild324
-rw-r--r--app-emulation/xen-tools/xen-tools-4.2.1-r2.ebuild (renamed from app-emulation/xen-tools/xen-tools-4.1.2-r3.ebuild)213
9 files changed, 438 insertions, 430 deletions
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 6d7274e..3e187d1 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,6 +1,5 @@
DIST ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz 2888480 SHA256 ea2a52a999afab7fefa6300e0f1b38409c170a7503a51d8b572d790e71f2d0f0 SHA512 02314727af850bdf51c1963e8da258a65868f3ef116e9833918c770b8737cd1501891d4dc90d787702a1f34e35198e57373d730b7e2e6671e5fa93ece7c2f073 WHIRLPOOL 9a232852c3dee266dcbd27fae6814497814a0f65123484c37196a99c6cc746a348cf38c77ba084e62e052c64e950b34aa2f152a154e99c0366746f97941b23d7
-DIST ipxe-git-v1.0.0.tar.gz 1996881 SHA256 d3128bfda9a1542049c278755f85bbcbb8441da7bfd702d511ce237fcf86a723 SHA512 6921fb857ca615899a5912d5590ca36b6f46daf828b85edc75461c08a189d9fed71ee74a82e42724da7a1355e45070d28a0a61694b3a4872c3554390e4bb4147 WHIRLPOOL 160e24eea479c9d67a8a5c7c5182864904ee594167f061adc40a3e74974197b6befe2ecdb76af1c101ff1a5697b060dae71dd3f9f969c8e18054526584d57031
DIST ipxe.tar.gz 2867999 SHA256 632ce8c193ccacc3012bd354bdb733a4be126f7c098e111930aa41dad537405c SHA512 c5cb1cdff40d2d71fd3e692a9d0efadf2aa17290daf5195391a1c81ddd9dfc913a8e44d5be2b12be85b2a5565ea31631c99c7053564f2fb2225c80ea0bb0e4a4 WHIRLPOOL 58b7459aaf7323968e2f4d1cdcb563a04a0ee40d7d0e8fc600495baf6914127fbbbcddfb66199cd9f462eb59565b3d1ae90a05b3c771b8f13c2d2dcb6070eebc
DIST seabios-0-20121121.tar.bz2 2199282 SHA256 f7f67181c6c0b4cea3a9db48e2569fdcbbc81b732a2f672079c42fb44153ee62 SHA512 4f886088ebaa911590b8cb19db5c5dbc8f1384d2d5a7c4bf04df083e177513b3123b1839dad744171670eded8b69ce092a774288aec1804d00aa32b1b6778599 WHIRLPOOL f2e62682d7213ee5eaecbc2590637ef36d9c86f746840c0ee758c0c153139f485032ea2cd098c87bb8a2b5f17f91375b8fb65599e3b71b45b1645df85a88887f
-DIST xen-4.1.2.tar.gz 10365786 SHA256 7d9c93057cf480d3f1efa792b19285a84fa3c06060ea5c5c453be00887389b0d SHA512 8f50f238b0b474ec5556279cbd51d704b4365033f2541a5d0376f287b26b7e8f0193172041109d97bb76d35ace3adf71e12f89f5766ff79a8ea861e7282f00d7 WHIRLPOOL 93a4bdd05125ef722464ef682798191c8b3db7228cbc0a27bcbe7932a7776491f90e727e1fcc4a9e7ec3eada7f56c567c07ad61cdda2f514109f702800fe5566
DIST xen-4.2.0.tar.gz 15587687 SHA256 43f4a086e4e0330145a27b7ace8365c42b5afbc95cefadafe067be91bd3e5cfb SHA512 4fb56c79d722fb307bc657f16d02079c6636427e7650c4354193632d38d2d1db8e588f844ff0ca6e757c108ed639a528565ec9fc7c00bb4d5b6fbc9d122d8a70 WHIRLPOOL 369a109375864cb61920b56cf501522051d28513e738f0fd0e7b76244c3e08a8a0a6ff6cf245872d9bbd9c0f22c7da76c9cbc0f852bad6108ca25fd42dc677c0
+DIST xen-4.2.1.tar.gz 15593695 SHA256 fb8df5827ce3e2d2d3b078d9e5afde502beb5e7ab9442e51a94087061bd450c6 SHA512 fe27a965e2b34035bd025482eda9fc4d4e82523c929323fd30813367d5ffbe2fa1ed3d7d4479f2632e8b5625972448b7bd6a7768e8dc1dcd1b6747d281cc1a9e WHIRLPOOL 226bbed059541e804f1a44e721023ffbc04bae43000653b1d7d6a9bfec0d9efbf7a48b1b0a7ad3fcb8e34f8b91e1c620c2a8eddf97baad487e9db37d49a58f37
diff --git a/app-emulation/xen-tools/files/ipxe-nopie.patch b/app-emulation/xen-tools/files/ipxe-nopie.patch
index 0663eaa..c5be735 100644
--- a/app-emulation/xen-tools/files/ipxe-nopie.patch
+++ b/app-emulation/xen-tools/files/ipxe-nopie.patch
@@ -20,8 +20,10 @@
+ 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 @@
+@@ -1,4 +1,5 @@
boot_prompt_option.patch
- gpxe-git-0edf2405b457
- gpxe-git-a803ef3dfeac
+ build_fix_1.patch
+ build_fix_2.patch
+ build_fix_3.patch
+ipxe-nopie.patch
+
diff --git a/app-emulation/xen-tools/files/stubs-32.h b/app-emulation/xen-tools/files/stubs-32.h
new file mode 100644
index 0000000..a421528
--- /dev/null
+++ b/app-emulation/xen-tools/files/stubs-32.h
@@ -0,0 +1,20 @@
+/* This file is automatically generated.
+ It defines a symbol `__stub_FUNCTION' for each function
+ in the C library which is a stub, meaning it will fail
+ every time called, usually setting errno to ENOSYS. */
+
+#ifdef _LIBC
+ #error Applications may not define the macro _LIBC
+#endif
+
+#define __stub_chflags
+#define __stub_fattach
+#define __stub_fchflags
+#define __stub_fdetach
+#define __stub_gtty
+#define __stub_lchmod
+#define __stub_revoke
+#define __stub_setlogin
+#define __stub_sigreturn
+#define __stub_sstk
+#define __stub_stty
diff --git a/app-emulation/xen-tools/files/xen-4-CVE-2012-6075-XSA-41.patch b/app-emulation/xen-tools/files/xen-4-CVE-2012-6075-XSA-41.patch
new file mode 100644
index 0000000..7513ac3
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4-CVE-2012-6075-XSA-41.patch
@@ -0,0 +1,39 @@
+authorMichael Contreras <michael@inetric.com>
+ Mon, 3 Dec 2012 04:11:22 +0000 (20:11 -0800)
+committerAnthony Liguori <aliguori@us.ibm.com>
+ Mon, 3 Dec 2012 14:14:10 +0000 (08:14 -0600)
+
+The e1000_receive function for the e1000 needs to discard packets longer than
+1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes
+this behavior and allocates memory based on this assumption.
+
+Signed-off-by: Michael Contreras <michael@inetric.com>
+Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
+hw/e1000.c
+
+--- tools/qemu-xen/hw/e1000.c
++++ tools/qemu-xen/hw/e1000.c
+@@ -59,6 +59,9 @@ static int debugflags = DBGBIT(TXERR) | DBGBIT(GENERAL);
+ #define PNPMMIO_SIZE 0x20000
+ #define MIN_BUF_SIZE 60 /* Min. octets in an ethernet frame sans FCS */
+
++/* this is the size past which hardware will drop packets when setting LPE=0 */
++#define MAXIMUM_ETHERNET_VLAN_SIZE 1522
++
+ /*
+ * HW models:
+ * E1000_DEV_ID_82540EM works with Windows and Linux
+@@ -805,6 +808,13 @@ e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size)
+ size = sizeof(min_buf);
+ }
+
++ /* Discard oversized packets if !LPE and !SBP. */
++ if (size > MAXIMUM_ETHERNET_VLAN_SIZE
++ && !(s->mac_reg[RCTL] & E1000_RCTL_LPE)
++ && !(s->mac_reg[RCTL] & E1000_RCTL_SBP)) {
++ return size;
++ }
++
+ if (!receive_filter(s, buf, size))
+ return size;
+
diff --git a/app-emulation/xen-tools/files/xen-4-fix_dotconfig-gcc.patch b/app-emulation/xen-tools/files/xen-4-fix_dotconfig-gcc.patch
new file mode 100644
index 0000000..4e08a30
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4-fix_dotconfig-gcc.patch
@@ -0,0 +1,245 @@
+# Fix gcc-4.6
+diff -ur xen-4.2.0.orig/extras/mini-os/minios.mk xen-4.2.0/extras/mini-os/minios.mk
+--- extras/mini-os/minios.mk 2012-09-17 18:21:17.000000000 +0800
++++ extras/mini-os/minios.mk 2012-12-05 14:01:10.653260260 +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-4.2.0.orig/tools/libxc/Makefile xen-4.2.0/tools/libxc/Makefile
+--- tools/libxc/Makefile 2012-09-17 18:21:18.000000000 +0800
++++ tools/libxc/Makefile 2012-12-05 14:01:10.653260260 +0800
+@@ -73,7 +73,7 @@
+
+ -include $(XEN_TARGET_ARCH)/Makefile
+
+-CFLAGS += -Werror -Wmissing-prototypes
++CFLAGS += -Wmissing-prototypes
+ CFLAGS += -I. $(CFLAGS_xeninclude)
+
+ # Needed for posix_fadvise64() in xc_linux.c
+# Drop .config
+diff -ur xen-4.2.0.orig/Config.mk xen-4.2.0/Config.mk
+--- Config.mk 2012-09-17 18:23:12.000000000 +0800
++++ Config.mk 2012-12-05 14:01:10.641260261 +0800
+@@ -7,7 +7,6 @@ Drop .config
+ # fallback for older make
+ realpath = $(wildcard $(foreach file,$(1),$(shell cd -P $(dir $(file)) && echo "$$PWD/$(notdir $(file))")))
+
+--include $(XEN_ROOT)/.config
+
+ # A debug build of Xen and tools?
+ debug ?= n
+@@ -24,7 +24,7 @@
+
+ # Tools to run on system hosting the build
+ HOSTCC = gcc
+-HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
++HOSTCFLAGS = -Wstrict-prototypes -O2 -fomit-frame-pointer
+ HOSTCFLAGS += -fno-strict-aliasing
+
+ DISTDIR ?= $(XEN_ROOT)/dist
+@@ -156,7 +156,7 @@
+
+ CFLAGS += -std=gnu99
+
+-CFLAGS += -Wall -Wstrict-prototypes
++CFLAGS += -Wstrict-prototypes
+
+ # Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...'
+ # and is over-zealous with the printf format lint
+diff -ur xen-4.2.1.orig/tools/blktap2/drivers/Makefile xen-4.2.1/tools/blktap2/drivers/Makefile
+--- tools/blktap2/drivers/Makefile 2012-12-17 23:00:11.000000000 +0800
++++ tools/blktap2/drivers/Makefile 2013-01-30 12:31:43.539941099 +0800
+@@ -9,7 +9,7 @@
+ LOCK_UTIL = lock-util
+ INST_DIR = $(SBINDIR)
+
+-CFLAGS += -Werror -g
++CFLAGS += -g
+ CFLAGS += -Wno-unused
+ CFLAGS += -fno-strict-aliasing
+ CFLAGS += -I$(BLKTAP_ROOT)/include -I$(BLKTAP_ROOT)/drivers
+diff -ur xen-4.2.1.orig/tools/debugger/gdbsx/Rules.mk xen-4.2.1/tools/debugger/gdbsx/Rules.mk
+--- tools/debugger/gdbsx/Rules.mk 2012-12-17 23:00:22.000000000 +0800
++++ tools/debugger/gdbsx/Rules.mk 2013-01-30 12:31:43.516941098 +0800
+@@ -1,4 +1,4 @@
+ include $(XEN_ROOT)/tools/Rules.mk
+
+-CFLAGS += -Werror -Wmissing-prototypes
++CFLAGS += -Wmissing-prototypes
+ # (gcc 4.3x and later) -Wconversion -Wno-sign-conversion
+diff -ur xen-4.2.1.orig/tools/debugger/xenitp/Makefile xen-4.2.1/tools/debugger/xenitp/Makefile
+--- tools/debugger/xenitp/Makefile 2012-12-17 23:00:22.000000000 +0800
++++ tools/debugger/xenitp/Makefile 2013-01-30 12:31:43.516941098 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=$(CURDIR)/../../..
+ include $(XEN_ROOT)/tools/Rules.mk
+
+-#CFLAGS += -Werror -g -O0
++#CFLAGS += -g -O0
+
+ CFLAGS += $(CFLAGS_libxenctrl)
+
+diff -ur xen-4.2.1.orig/tools/libaio/harness/Makefile xen-4.2.1/tools/libaio/harness/Makefile
+--- tools/libaio/harness/Makefile 2012-12-17 23:00:35.000000000 +0800
++++ tools/libaio/harness/Makefile 2013-01-30 12:31:43.541941099 +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-4.2.1.orig/tools/libfsimage/Rules.mk xen-4.2.1/tools/libfsimage/Rules.mk
+--- tools/libfsimage/Rules.mk 2012-12-17 23:00:36.000000000 +0800
++++ tools/libfsimage/Rules.mk 2013-01-30 12:31:43.515941097 +0800
+@@ -1,7 +1,7 @@
+ include $(XEN_ROOT)/tools/Rules.mk
+
+ CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\"
+-CFLAGS += -Werror -D_GNU_SOURCE
++CFLAGS += -D_GNU_SOURCE
+ LDFLAGS += -L../common/
+
+ PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
+diff -ur xen-4.2.1.orig/tools/libxl/Makefile xen-4.2.1/tools/libxl/Makefile
+--- tools/libxl/Makefile 2012-12-17 23:01:08.000000000 +0800
++++ tools/libxl/Makefile 2013-01-30 12:31:43.541941099 +0800
+@@ -11,7 +11,7 @@
+ XLUMAJOR = 1.0
+ XLUMINOR = 1
+
+-CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
++CFLAGS += -Wno-format-zero-length -Wmissing-declarations \
+ -Wno-declaration-after-statement -Wformat-nonliteral
+ CFLAGS += -I. -fPIC
+
+diff -ur xen-4.2.1.orig/tools/qemu-xen/pc-bios/optionrom/Makefile xen-4.2.1/tools/qemu-xen/pc-bios/optionrom/Makefile
+--- tools/qemu-xen/pc-bios/optionrom/Makefile 2012-09-11 02:10:52.000000000 +0800
++++ tools/qemu-xen/pc-bios/optionrom/Makefile 2013-01-30 12:31:43.528941098 +0800
+@@ -9,7 +9,7 @@
+
+ .PHONY : all clean build-all
+
+-CFLAGS := -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
++CFLAGS := -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-builtin
+ CFLAGS += -I$(SRC_PATH)
+ CFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector)
+ QEMU_CFLAGS = $(CFLAGS)
+diff -ur xen-4.2.1.orig/tools/vtpm/Rules.mk xen-4.2.1/tools/vtpm/Rules.mk
+--- tools/vtpm/Rules.mk 2012-12-17 23:01:35.000000000 +0800
++++ tools/vtpm/Rules.mk 2013-01-30 12:31:43.515941097 +0800
+@@ -6,7 +6,7 @@
+ #
+
+ # General compiler flags
+-CFLAGS = -Werror -g3
++CFLAGS = -g3
+
+ # Generic project files
+ HDRS = $(wildcard *.h)
+diff -ur xen-4.2.1.orig/tools/vtpm_manager/Rules.mk xen-4.2.1/tools/vtpm_manager/Rules.mk
+--- tools/vtpm_manager/Rules.mk 2012-12-17 23:01:35.000000000 +0800
++++ tools/vtpm_manager/Rules.mk 2013-01-30 12:31:43.511941097 +0800
+@@ -6,7 +6,7 @@
+ #
+
+ # General compiler flags
+-CFLAGS = -Werror -g3
++CFLAGS = -g3
+
+ # Generic project files
+ HDRS = $(wildcard *.h)
+diff -ur xen-4.2.1.orig/tools/xenstat/xentop/Makefile xen-4.2.1/tools/xenstat/xentop/Makefile
+--- tools/xenstat/xentop/Makefile 2012-12-17 23:01:35.000000000 +0800
++++ tools/xenstat/xentop/Makefile 2013-01-30 12:31:43.535941098 +0800
+@@ -18,7 +18,7 @@
+ all install xentop:
+ else
+
+-CFLAGS += -DGCC_PRINTF -Wall -Werror $(CFLAGS_libxenstat)
++CFLAGS += -DGCC_PRINTF -Wall $(CFLAGS_libxenstat)
+ LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(SOCKET_LIBS)
+ CFLAGS += -DHOST_$(XEN_OS)
+
+diff -ur xen-4.2.1.orig/xen/arch/arm/Rules.mk xen-4.2.1/xen/arch/arm/Rules.mk
+--- xen/arch/arm/Rules.mk 2012-12-17 23:01:37.000000000 +0800
++++ xen/arch/arm/Rules.mk 2013-01-30 12:31:43.498941097 +0800
+@@ -9,7 +9,7 @@
+ HAS_DEVICE_TREE := y
+
+ CFLAGS += -fno-builtin -fno-common -Wredundant-decls
+-CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
++CFLAGS += -iwithprefix include -Wno-pointer-arith -pipe
+ CFLAGS += -I$(BASEDIR)/include
+
+ # Prevent floating-point variables from creeping into Xen.
+diff -ur xen-4.2.1.orig/xen/arch/x86/Rules.mk xen-4.2.1/xen/arch/x86/Rules.mk
+--- xen/arch/x86/Rules.mk 2012-12-17 23:01:37.000000000 +0800
++++ xen/arch/x86/Rules.mk 2013-01-30 12:31:43.490941096 +0800
+@@ -24,7 +24,7 @@
+ endif
+
+ CFLAGS += -fno-builtin -fno-common -Wredundant-decls
+-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 -ur xen-4.2.1.orig/xen/include/Makefile xen-4.2.1/xen/include/Makefile
+--- xen/include/Makefile 2012-12-17 23:01:55.000000000 +0800
++++ xen/include/Makefile 2013-01-30 12:31:43.502941097 +0800
+@@ -78,7 +78,7 @@
+ all: headers.chk
+
+ headers.chk: $(filter-out public/arch-% public/%ctl.h public/xsm/% public/%hvm/save.h, $(wildcard public/*.h public/*/*.h) $(public-y)) Makefile
+- for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -Werror -S -o /dev/null -xc $$i || exit 1; echo $$i; done >$@.new
++ for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -S -o /dev/null -xc $$i || exit 1; echo $$i; done >$@.new
+ mv $@.new $@
+
+ endif
+diff -ur xen-4.2.1.orig/tools/tests/mce-test/tools/Makefile xen-4.2.1/tools/tests/mce-test/tools/Makefile
+--- tools/tests/mce-test/tools/Makefile 2012-12-17 23:01:35.000000000 +0800
++++ tools/tests/mce-test/tools/Makefile 2013-01-30 13:01:44.890020152 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=$(CURDIR)/../../../..
+ include $(XEN_ROOT)/tools/Rules.mk
+
+-CFLAGS += -Werror
++CFLAGS +=
+ CFLAGS += $(CFLAGS_libxenctrl)
+ CFLAGS += $(CFLAGS_libxenguest)
+ CFLAGS += $(CFLAGS_libxenstore)
+diff -ur xen-4.2.1.orig/tools/tests/mem-sharing/Makefile xen-4.2.1/tools/tests/mem-sharing/Makefile
+--- tools/tests/mem-sharing/Makefile 2012-12-17 23:01:35.000000000 +0800
++++ tools/tests/mem-sharing/Makefile 2013-01-30 13:01:44.890020152 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=$(CURDIR)/../../..
+ include $(XEN_ROOT)/tools/Rules.mk
+
+-CFLAGS += -Werror
++CFLAGS +=
+
+ CFLAGS += $(CFLAGS_libxenctrl)
+ CFLAGS += $(CFLAGS_xeninclude)
+diff -ur xen-4.2.1.orig/tools/tests/xen-access/Makefile xen-4.2.1/tools/tests/xen-access/Makefile
+--- tools/tests/xen-access/Makefile 2012-12-17 23:01:35.000000000 +0800
++++ tools/tests/xen-access/Makefile 2013-01-30 13:01:44.891020152 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=$(CURDIR)/../../..
+ include $(XEN_ROOT)/tools/Rules.mk
+
+-CFLAGS += -Werror
++CFLAGS +=
+
+ CFLAGS += $(CFLAGS_libxenctrl)
+ CFLAGS += $(CFLAGS_libxenguest)
+
diff --git a/app-emulation/xen-tools/files/xen-tools-4-docfix.patch b/app-emulation/xen-tools/files/xen-tools-4-docfix.patch
new file mode 100644
index 0000000..c9205a4
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4-docfix.patch
@@ -0,0 +1,12 @@
+diff -ur xen-4.2.0.orig/tools/qemu-xen-traditional/Makefile xen-4.2.0/tools/qemu-xen-traditional/Makefile
+--- xen-4.2.0.orig/tools/qemu-xen-traditional/Makefile 2012-09-07 00:05:30.000000000 +0800
++++ xen-4.2.0/tools/qemu-xen-traditional/Makefile 2013-01-29 11:12:20.502989453 +0800
+@@ -275,7 +275,7 @@
+
+ # documentation
+ %.html: %.texi
+- texi2html -monolithic -number $<
++ texi2html -monolithic $<
+
+ %.info: %.texi
+ makeinfo $< -o $@
diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index f4c43a5..6101069 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -3,8 +3,8 @@
<pkgmetadata>
<herd>xen</herd>
<maintainer>
- <email>johneed@hotmail.com</email>
- <name>Ian Delaney aka idella4 proxy maintainer</name>
+ <email>idella4@gentoo.org</email>
+ <name>Ian Delaney</name>
</maintainer>
<use>
<flag name='api'>Build the C libxenapi bindings</flag>
diff --git a/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild
deleted file mode 100644
index 3ce8a54..0000000
--- a/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild
+++ /dev/null
@@ -1,324 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild,v 1.3 2012/01/12 13:40:01 alexxy Exp $
-
-EAPI="4"
-PYTHON_DEPEND="2"
-PYTHON_USE_WITH="xml threads"
-
-if [[ $PV == *9999 ]]; then
- KEYWORDS=""
- REPO="xen-unstable.hg"
- EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
- S="${WORKDIR}/${REPO}"
- live_eclass="mercurial"
-else
- KEYWORDS="~amd64 ~x86"
- XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
- SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
- $XEN_EXTFILES_URL/ipxe-git-v1.0.0.tar.gz"
- S="${WORKDIR}/xen-${PV}"
-fi
-
-inherit flag-o-matic eutils multilib python toolchain-funcs ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool docs/ChangeLog )
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen xend"
-
-REQUIRED_USE="hvm? ( qemu )"
-
-QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
- /usr/share/xen/qemu/openbios-sparc64 \
- /usr/share/xen/qemu/openbios-sparc32"
-QA_WX_LOAD=${QA_PRESTRIPPED}
-
-CDEPEND="<dev-libs/yajl-2
- dev-python/lxml
- dev-python/pypam
- dev-python/pyxml
- sys-libs/zlib
- hvm? ( media-libs/libsdl
- sys-power/iasl )
- api? ( dev-libs/libxml2 net-misc/curl )"
-
-DEPEND="${CDEPEND}
- sys-devel/gcc
- dev-lang/perl
- app-misc/pax-utils
- dev-ml/findlib
- doc? (
- app-doc/doxygen
- dev-tex/latex2html[png,gif]
- media-gfx/transfig
- media-gfx/graphviz
- dev-tex/xcolor
- dev-texlive/texlive-latexextra
- virtual/latex-base
- dev-tex/latexmk
- dev-texlive/texlive-latex
- dev-texlive/texlive-pictures
- dev-texlive/texlive-latexrecommended
- )
- hvm? (
- x11-proto/xproto
- sys-devel/dev86
- ) pygrub? ( dev-lang/python[ncurses] )
- "
-
-RDEPEND="${CDEPEND}
- sys-apps/iproute2
- net-misc/bridge-utils
- >=dev-lang/ocaml-3.12.0
- screen? (
- app-misc/screen
- app-admin/logrotate
- )
- || ( sys-fs/udev sys-apps/hotplug )"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
-QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
- usr/share/xen/qemu/openbios-sparc64"
-RESTRICT="test"
-
-pkg_setup() {
- python_set_active_version 2
- python_pkg_setup
- export "CONFIG_LOMOUNT=y"
-
- if use qemu; then
- export "CONFIG_IOEMU=y"
- else
- export "CONFIG_IOEMU=n"
- fi
-
- if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
- eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
- eerror "an amd64 multilib profile is required. Remove the hvm use flag"
- eerror "to build xen-tools on your current profile."
- die "USE=hvm is unsupported on this system."
- fi
-
- if [[ -z ${XEN_TARGET_ARCH} ]] ; then
- if use x86 && use amd64; then
- die "Confusion! Both x86 and amd64 are set in your use flags!"
- elif use x86; then
- export XEN_TARGET_ARCH="x86_32"
- elif use amd64 ; then
- export XEN_TARGET_ARCH="x86_64"
- else
- die "Unsupported architecture!"
- fi
- fi
-
- use api && export "LIBXENAPI_BINDINGS=y"
- use flask && export "FLASK_ENABLE=y"
-}
-
-src_prepare() {
- cp "$DISTDIR/ipxe-git-v1.0.0.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
- sed -e 's/-Wall//' -i Config.mk || die "Couldn't sanitize CFLAGS"
-
- # Drop .config
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
- # Xend
- if ! use xend; then
- sed -e 's:xm xen-bugtool xen-python-path xend:xen-bugtool xen-python-path:' \
- -i tools/misc/Makefile || die "Disabling xend failed" || die
- sed -e 's:^XEND_INITD:#XEND_INITD:' \
- -i tools/examples/Makefile || "Disabling xend failed" || die
- fi
- # if the user *really* wants to use their own custom-cflags, let them
- if use custom-cflags; then
- einfo "User wants their own CFLAGS - removing defaults"
-
- # try and remove all the default custom-cflags
- find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
- -i {} \; || die "failed to re-set custom-cflags"
- fi
-
- if ! use pygrub; then
- sed -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' -i tools/Makefile || die
- fi
-
- # Disable hvm support on systems that don't support x86_32 binaries.
- if ! use hvm; then
- chmod 644 tools/check/check_x11_devel
- sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk || die
- sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
- fi
-
- # Don't bother with qemu, only needed for fully virtualised guests
- if ! use qemu; then
- sed -e "/^CONFIG_IOEMU := y$/d" -i config/*.mk || die
- sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" -i Makefile || die
- fi
-
- # Fix build for gcc-4.6
- sed -e "s:-Werror::g" -i tools/xenstat/xentop/Makefile || die
-
- # Fix network broadcast on bridged networks
- epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
-
- # Do not strip binaries
- epatch "${FILESDIR}/${PN}-3.3.0-nostrip.patch"
-
- # Prevent the downloading of ipxe
- sed -e 's:^\tif ! wget -O _$T:#\tif ! wget -O _$T:' \
- -e 's:^\tfi:#\tfi:' -i \
- -e 's:^\tmv _$T $T:#\tmv _$T $T:' \
- -i tools/firmware/etherboot/Makefile || die
-
- # Fix bridge by idella4, bug #362575
- epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
-
- # Remove check_curl, new fix to Bug #386487
- epatch "${FILESDIR}/${PN}-4.1.1-curl.patch"
- sed -i -e 's|has_or_fail curl-config|has_or_fail curl-config\nset -ux|' \
- tools/check/check_curl || die
-
- # Don't build ipxe with pie on hardened, Bug #360805
- if gcc-specs-pie; then
- epatch "${FILESDIR}/ipxe-nopie.patch"
- fi
-
- # Fix create.py for pyxml Bug 367735
- epatch "${FILESDIR}/xen-tools-4.1.2-pyxml.patch"
-}
-
-src_compile() {
- export VARTEXFONTS="${T}/fonts"
- local myopt
- use debug && myopt="${myopt} debug=y"
-
- use custom-cflags || unset CFLAGS
- if test-flag-CC -fno-strict-overflow; then
- append-flags -fno-strict-overflow
- fi
-
- unset LDFLAGS
- emake CC=$(tc-getCC) LD=$(tc-getLD) -C tools ${myopt}
-
- if use doc; then
- sh ./docs/check_pkgs || die "package check failed"
- emake docs
- emake dev-docs
- fi
-
- emake -C docs man-pages
-}
-
-src_install() {
- # Override auto-detection in the build system, bug #382573
- export INITD_DIR=/etc/init.d
- export CONFIG_LEAF_DIR=default
-
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools
- python_convert_shebangs -r 2 "${ED}"
-
- # Remove RedHat-specific stuff
- rm -rf "${ED}"/etc/init.d/xen* "${ED}"/etc/default || die
-
- # uncomment lines in xl.conf
- sed -e 's:^#autoballoon=1:autoballoon=1:' \
- -e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \
- -e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
- -i tools/examples/xl.conf || die
-
-# dodoc README docs/README.xen-bugtool docs/ChangeLog
- if use doc; then
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
- dohtml -r docs/api/
- docinto pdf
- dodoc ${DOCS[@]}
- #docs/api/tools/python/latex/refman.pdf
- [ -d "${ED}"/usr/share/doc/xen ] && mv "${ED}"/usr/share/doc/xen/* "${ED}"/usr/share/doc/${PF}/html
- fi
- rm -rf "${ED}"/usr/share/doc/xen/
- doman docs/man?/*
-
- if use xend; then
- newinitd "${FILESDIR}"/xend.initd-r2 xend || die "Couldn't install xen.initd"
- fi
- newconfd "${FILESDIR}"/xendomains.confd xendomains
- newconfd "${FILESDIR}"/xenstored.confd xenstored
- newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
- newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
- newinitd "${FILESDIR}"/xenstored.initd xenstored
- newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-
- if use screen; then
- cat "${FILESDIR}"/xendomains-screen.confd >> "${ED}"/etc/conf.d/xendomains || die
- cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die
- keepdir /var/log/xen-consoles
- fi
-
- python_convert_shebangs -r 2 "${ED}"
- # xend expects these to exist
- keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
-
- # for xendomains
- keepdir /etc/xen/auto
-}
-
-pkg_postinst() {
- elog "Official Xen Guide and the unoffical wiki page:"
- elog " http://www.gentoo.org/doc/en/xen-guide.xml"
- elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
-
- if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
- echo
- ewarn "xend may not work when python is built with stack smashing protection (ssp)."
- ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
- ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
- fi
-
- if ! has_version "dev-lang/python[ncurses]"; then
- echo
- ewarn "NB: Your dev-lang/python is built without USE=ncurses."
- ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
- fi
-
- if has_version "sys-apps/iproute2[minimal]"; then
- echo
- ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
- ewarn "will not work until you rebuild iproute2 without USE=minimal."
- fi
-
- if ! use hvm; then
- echo
- elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
- elog "support enable the hvm use flag."
- elog "An x86 or amd64 multilib system is required to build HVM support."
- echo
- elog "The qemu use flag has been removed and replaced with hvm."
- fi
-
- if use xend; then
- echo
- elog "xend capability has been enabled and installed"
- fi
-
- if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
- echo
- elog "xensv is broken upstream (Gentoo bug #142011)."
- elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
- fi
- python_mod_optimize $(use pygrub && echo grub) xen
-}
-
-pkg_postrm() {
- python_mod_cleanup $(use pygrub && echo grub) xen
-}
diff --git a/app-emulation/xen-tools/xen-tools-4.1.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.2.1-r2.ebuild
index 4d22347..c238f7c 100644
--- a/app-emulation/xen-tools/xen-tools-4.1.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.1-r2.ebuild
@@ -1,10 +1,14 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild,v 1.3 2012/01/12 13:40:01 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.2.1-r2.ebuild,v 1.5 2013/02/12 06:34:04 idella4 Exp $
-EAPI="4"
-PYTHON_DEPEND="2"
-PYTHON_USE_WITH="xml threads"
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+PYTHON_REQ_USE='xml,threads'
+
+IPXE_TARBALL_URL="http://dev.gentoo.org/~idella4/tarballs/ipxe.tar.gz"
+XEN_SEABIOS_URL="http://dev.gentoo.org/~idella4/tarballs/seabios-0-20121121.tar.bz2"
if [[ $PV == *9999 ]]; then
KEYWORDS=""
@@ -14,43 +18,41 @@ if [[ $PV == *9999 ]]; then
live_eclass="mercurial"
else
KEYWORDS="~amd64 ~x86"
- XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
- SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
- $XEN_EXTFILES_URL/ipxe-git-v1.0.0.tar.gz"
+ SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
+ $IPXE_TARBALL_URL
+ $XEN_SEABIOS_URL"
S="${WORKDIR}/xen-${PV}"
fi
-inherit flag-o-matic eutils multilib python toolchain-funcs ${live_eclass}
+inherit flag-o-matic eutils multilib python-single-r1 toolchain-funcs udev ${live_eclass}
DESCRIPTION="Xend daemon and tools"
HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool docs/ChangeLog )
+DOCS=( README docs/README.xen-bugtool )
LICENSE="GPL-2"
SLOT="0"
-IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen static-libs xend"
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml pygrub screen static-libs xend"
REQUIRED_USE="hvm? ( qemu )"
-QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
- /usr/share/xen/qemu/openbios-sparc64 \
- /usr/share/xen/qemu/openbios-sparc32"
-QA_WX_LOAD=${QA_PRESTRIPPED}
-
CDEPEND="<dev-libs/yajl-2
- dev-python/lxml
- dev-python/pypam
- dev-python/pyxml
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/pypam[${PYTHON_USEDEP}]
sys-libs/zlib
- hvm? ( media-libs/libsdl
- sys-power/iasl )
- api? ( dev-libs/libxml2 net-misc/curl )"
-
+ sys-power/iasl
+ ocaml? ( dev-ml/findlib )
+ hvm? ( media-libs/libsdl )
+ ${PYTHON_DEPS}
+ api? ( dev-libs/libxml2
+ net-misc/curl )
+ ${PYTHON_DEPS}
+ pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )"
DEPEND="${CDEPEND}
- sys-devel/gcc
+ sys-devel/bin86
+ sys-devel/dev86
dev-lang/perl
app-misc/pax-utils
- dev-ml/findlib
doc? (
app-doc/doxygen
dev-tex/latex2html[png,gif]
@@ -64,34 +66,32 @@ DEPEND="${CDEPEND}
dev-texlive/texlive-pictures
dev-texlive/texlive-latexrecommended
)
- hvm? (
- x11-proto/xproto
- sys-devel/dev86
- ) pygrub? ( dev-lang/python[ncurses] )
- "
-
+ hvm? ( x11-proto/xproto
+ )"
RDEPEND="${CDEPEND}
sys-apps/iproute2
net-misc/bridge-utils
- >=dev-lang/ocaml-3.12.0
+ ocaml? ( >=dev-lang/ocaml-3.12.0 )
screen? (
app-misc/screen
app-admin/logrotate
)
- || ( sys-fs/udev sys-apps/hotplug )"
+ virtual/udev"
# hvmloader is used to bootstrap a fully virtualized kernel
# Approved by QA team in bug #144032
QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
-QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
- usr/share/xen/qemu/openbios-sparc64"
+
RESTRICT="test"
pkg_setup() {
- python_set_active_version 2
- python_pkg_setup
+ python-single-r1_pkg_setup
export "CONFIG_LOMOUNT=y"
+ if has_version dev-libs/libgcrypt; then
+ export "CONFIG_GCRYPT=y"
+ fi
+
if use qemu; then
export "CONFIG_IOEMU=y"
else
@@ -122,30 +122,30 @@ pkg_setup() {
}
src_prepare() {
- cp "$DISTDIR/ipxe-git-v1.0.0.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
- sed -e 's/-Wall//' -i Config.mk || die "Couldn't sanitize CFLAGS"
+ # Drop .config, fixes to gcc-4.6
+ epatch "${FILESDIR}"/${PN/-tools/}-4-fix_dotconfig-gcc.patch
- # Drop .config
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
# Xend
if ! use xend; then
sed -e 's:xm xen-bugtool xen-python-path xend:xen-bugtool xen-python-path:' \
- -i tools/misc/Makefile || die "Disabling xend failed" || die
+ -i tools/misc/Makefile || die "Disabling xend failed"
sed -e 's:^XEND_INITD:#XEND_INITD:' \
- -i tools/examples/Makefile || "Disabling xend failed" || die
+ -i tools/examples/Makefile || die "Disabling xend failed"
fi
+
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
- # try and remove all the default custom-cflags
- find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
- -i {} \; || die "failed to re-set custom-cflags"
+ # try and remove all the default cflags
+ find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+ -exec sed \
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+ -i {} + || die "failed to re-set custom-cflags"
fi
if ! use pygrub; then
@@ -154,7 +154,6 @@ src_prepare() {
# Disable hvm support on systems that don't support x86_32 binaries.
if ! use hvm; then
- chmod 644 tools/check/check_x11_devel
sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk || die
sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
fi
@@ -165,36 +164,41 @@ src_prepare() {
sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" -i Makefile || die
fi
- # Fix build for gcc-4.6
- sed -e "s:-Werror::g" -i tools/xenstat/xentop/Makefile || die
+ # Fix texi2html build error with new texi2html
+ epatch "${FILESDIR}"/${PN}-4-docfix.patch
# Fix network broadcast on bridged networks
epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
- # Do not strip binaries
- epatch "${FILESDIR}/${PN}-3.3.0-nostrip.patch"
-
- # Prevent the downloading of ipxe
- sed -e 's:^\tif ! wget -O _$T:#\tif ! wget -O _$T:' \
- -e 's:^\tfi:#\tfi:' -i \
- -e 's:^\tmv _$T $T:#\tmv _$T $T:' \
- -i tools/firmware/etherboot/Makefile || die
+ # Prevent the downloading of ipxe, seabios
+ epatch "${FILESDIR}"/${PN/-tools/}-4.2.0-anti-download.patch
+ cp "${DISTDIR}"/ipxe.tar.gz tools/firmware/etherboot/ || die
+ mv ../seabios-dir-remote tools/firmware/ || die
+ pushd tools/firmware/ > /dev/null
+ ln -s seabios-dir-remote seabios-dir || die
+ popd > /dev/null
# Fix bridge by idella4, bug #362575
epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
- # Remove check_curl, new fix to Bug #386487
- epatch "${FILESDIR}/${PN}-4.1.1-curl.patch"
- sed -i -e 's|has_or_fail curl-config|has_or_fail curl-config\nset -ux|' \
- tools/check/check_curl || die
-
# Don't build ipxe with pie on hardened, Bug #360805
if gcc-specs-pie; then
- epatch "${FILESDIR}/ipxe-nopie.patch"
+ epatch "${FILESDIR}"/ipxe-nopie.patch
fi
- # Fix create.py for pyxml Bug 367735
- epatch "${FILESDIR}/xen-tools-4.1.2-pyxml.patch"
+ # Prevent double stripping of files at install
+ epatch "${FILESDIR}"/${PN/-tools/}-4.2.0-nostrip.patch
+
+ # fix jobserver in Makefile
+ epatch "${FILESDIR}"/${PN/-tools/}-4.2.0-jserver.patch
+
+ #Sec patch, currently valid
+ epatch "${FILESDIR}"/xen-4-CVE-2012-6075-XSA-41.patch
+
+ if use hvm; then
+ cp -r "${FILESDIR}"/stubs-32.h xen/tools/include || die "copy of header file failed"
+ einfo "stubs-32.h added"
+ fi
}
src_compile() {
@@ -208,27 +212,30 @@ src_compile() {
fi
unset LDFLAGS
- emake CC=$(tc-getCC) LD=$(tc-getLD) -C tools ${myopt}
-
- if use doc; then
- sh ./docs/check_pkgs || die "package check failed"
- emake docs
- emake dev-docs
- fi
+ unset CFLAGS
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" -C tools ${myopt}
+ use doc && emake -C docs txt html
emake -C docs man-pages
}
src_install() {
# Override auto-detection in the build system, bug #382573
- export INITD_DIR=/etc/init.d
- export CONFIG_LEAF_DIR=default
+ export INITD_DIR=/tmp/init.d
+ export CONFIG_LEAF_DIR=../tmp/default
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools
- python_convert_shebangs -r 2 "${ED}"
+ # Let the build system compile installed Python modules.
+ local PYTHONDONTWRITEBYTECODE
+ export PYTHONDONTWRITEBYTECODE
+
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-tools
+# XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+ # Fix the remaining Python shebangs.
+ python_fix_shebang "${D}"
# Remove RedHat-specific stuff
- rm -rf "${ED}"/etc/init.d/xen* "${ED}"/etc/default || die
+ rm -rf "${D}"tmp || die
# uncomment lines in xl.conf
sed -e 's:^#autoballoon=1:autoballoon=1:' \
@@ -236,17 +243,16 @@ src_install() {
-e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
-i tools/examples/xl.conf || die
-# dodoc README docs/README.xen-bugtool docs/ChangeLog
if use doc; then
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-docs
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
- dohtml -r docs/api/
+ dohtml -r docs/
docinto pdf
dodoc ${DOCS[@]}
- #docs/api/tools/python/latex/refman.pdf
- [ -d "${ED}"/usr/share/doc/xen ] && mv "${ED}"/usr/share/doc/xen/* "${ED}"/usr/share/doc/${PF}/html
+ [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
fi
- rm -rf "${ED}"/usr/share/doc/xen/
+
+ rm -rf "${D}"/usr/share/doc/xen/
doman docs/man?/*
if use xend; then
@@ -260,22 +266,35 @@ src_install() {
newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
if use screen; then
- cat "${FILESDIR}"/xendomains-screen.confd >> "${ED}"/etc/conf.d/xendomains || die
- cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die
+ cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+ cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
keepdir /var/log/xen-consoles
fi
+ if use qemu; then
+ mkdir -p "${D}"usr/lib64/xen/bin || die
+ mv "${D}"usr/lib/xen/bin/qemu* "${D}"usr/lib64/xen/bin/ || die
+ fi
+
# For -static-libs wrt Bug 384355
if ! use static-libs; then
- rm -f ${ED}usr/$(get_libdir)/*.a ${ED}usr/$(get_libdir)/ocaml/*/*.a
+ rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
fi
- python_convert_shebangs -r 2 "${ED}"
# xend expects these to exist
keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
# for xendomains
keepdir /etc/xen/auto
+
+ # Temp QA workaround
+ dodir "$(udev_get_udevdir)"
+ mv "${D}"/etc/udev/* "${D}/$(udev_get_udevdir)"
+ rm -rf "${D}"/etc/udev
+
+ # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+ find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+ -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
}
pkg_postinst() {
@@ -283,13 +302,14 @@ pkg_postinst() {
elog " http://www.gentoo.org/doc/en/xen-guide.xml"
elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
- if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
+ if [[ "$(scanelf -s __guard -q "${PYTHON}")" ]] ; then
echo
ewarn "xend may not work when python is built with stack smashing protection (ssp)."
ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
- ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
+ ewarn "This problem may be resolved as of Xen 3.0.4, if not post in the bug."
fi
+ # TODO: we need to have the current Python slot here.
if ! has_version "dev-lang/python[ncurses]"; then
echo
ewarn "NB: Your dev-lang/python is built without USE=ncurses."
@@ -321,9 +341,4 @@ pkg_postinst() {
elog "xensv is broken upstream (Gentoo bug #142011)."
elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
fi
- python_mod_optimize $(use pygrub && echo grub) xen
-}
-
-pkg_postrm() {
- python_mod_cleanup $(use pygrub && echo grub) xen
}