summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2014-02-28 17:24:02 +0800
committerYixun Lan <dlan@gentoo.org>2014-02-28 17:24:02 +0800
commitc87a500d3cf68b754f525e32cdc161c2aeb5de10 (patch)
treead13929d44061024488c9ef8ae4e99495b205641
parentapp-emulation/xen: add xen-4.4.0_rc6 (diff)
downloadvirtualization-c87a500d3cf68b754f525e32cdc161c2aeb5de10.tar.gz
virtualization-c87a500d3cf68b754f525e32cdc161c2aeb5de10.tar.bz2
virtualization-c87a500d3cf68b754f525e32cdc161c2aeb5de10.zip
app-emulation/xen-tools: bump 4.4.0_rc6
Signed-off-by: Yixun Lan <dlan@gentoo.org>
-rw-r--r--app-emulation/xen-tools/Manifest1
-rw-r--r--app-emulation/xen-tools/files/fix-gold-ld.patch14
-rw-r--r--app-emulation/xen-tools/files/xen-4.2-configsxp.patch24
-rw-r--r--app-emulation/xen-tools/files/xen-4.3-jserver.patch32
-rw-r--r--app-emulation/xen-tools/files/xen-4.4-nostrip.patch13
-rw-r--r--app-emulation/xen-tools/files/xen-4.4-qemu-bridge.patch79
-rw-r--r--app-emulation/xen-tools/files/xen-tools-4-unbundle-ipxe.patch33
-rw-r--r--app-emulation/xen-tools/files/xen-tools-4.3-ar-cc.patch84
-rw-r--r--app-emulation/xen-tools/files/xen-tools-4.4-api-fix.patch48
-rw-r--r--app-emulation/xen-tools/files/xencommons.confd4
-rw-r--r--app-emulation/xen-tools/files/xencommons.initd80
-rw-r--r--app-emulation/xen-tools/files/xenconsoled.initd23
-rw-r--r--app-emulation/xen-tools/files/xend.initd-r210
-rw-r--r--app-emulation/xen-tools/files/xendomains-screen.confd4
-rw-r--r--app-emulation/xen-tools/files/xendomains.initd-r212
-rw-r--r--app-emulation/xen-tools/files/xenqemudev.confd7
-rw-r--r--app-emulation/xen-tools/files/xenqemudev.initd81
-rwxr-xr-xapp-emulation/xen-tools/files/xenstored.initd28
-rw-r--r--app-emulation/xen-tools/metadata.xml6
-rw-r--r--app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild435
20 files changed, 991 insertions, 27 deletions
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index c7c17da..18f3b2a 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -3,3 +3,4 @@ DIST seabios-0-20121121.tar.bz2 2199282 SHA256 f7f67181c6c0b4cea3a9db48e2569fdcb
DIST seabios-dir-remote-20130720.tar.gz 3201017 SHA256 0cf06b54e8ae1cfc25f2942eea1490a9e7e01f478541577025f6eef76e0c76de SHA512 e9ebe3711e3f678d3632f8e8e645f8be4fb65608aff04aeeb0e1152521bf571bc4d879f136d23bb0aa8bd4c4ec20f294b472cf54dc70916e52d330328aadd357 WHIRLPOOL 6138271f72fd96fabe3cffc07a6efcb9c0e195ed96f4ad708d00e85e0a84a03900dc41389cd4f26d533a3aa42142a9e17708d7b87d722f1c9348f61a5db3e59d
DIST xen-4.2.2.tar.gz 15602746 SHA256 c9bfe91a5e72f8545acebad9889d64368020359bfe18044c0e683133e55ae005 SHA512 4943b18016ed8c2b194a3b55e6655b3b734b39ffb8cb7ee0a0580f2f4460a1d0e92e1de8ac23f5186272914fad1650586af51fd7c3644d0310eb16f2e11c5e80 WHIRLPOOL 519eb87cb2da694696cbc3e72070a0a3bdb07c46fa266d855d8379eec3a92adfa4d434af3ac01c37834ce4a9174081a6c40030b185a70902329b185cb8d0bbea
DIST xen-4.3.0.tar.gz 16425975 SHA256 e1e9faabe4886e2227aacdbde74410653b233d66642ca1972a860cbec6439961 SHA512 e6b8f64e15e48704ea5cee5585cd6151fe6a5a62bc4670caf0b762c1aa71c9598db236c637ac34c42c92c6e8a5001acdd3d9d4b9305401a26273279358f481d6 WHIRLPOOL a91f14bc6535127ab17d3867b92fb3e008089453d5ba7996fd1d0b5c6d32a881c07df320f018c928e919f28de7b4ab4757c6bdb020e0cdb7d67960d4cab9dda0
+DIST xen-4.4.0-rc6.tar.gz 18116817 SHA256 0949d3d5c79312e3f053e6456216206e0c062d4f6962545521e972bc09a290dc SHA512 84d499ca725fd12fefb0cb345a5fd3ad52245863ca1700d90739a317349ea130418dc1bb83063b1c89378a862f4501847684e76363a338962ed64504ad935d6b WHIRLPOOL 20ff9d1f5317c228cf6d0bd01fab85864be49b3d3e72c928d6245363854693f9808c1bc002e99340592ed187d40f5257397505b5ec7547ef814774f9fe787292
diff --git a/app-emulation/xen-tools/files/fix-gold-ld.patch b/app-emulation/xen-tools/files/fix-gold-ld.patch
new file mode 100644
index 0000000..654eb25
--- /dev/null
+++ b/app-emulation/xen-tools/files/fix-gold-ld.patch
@@ -0,0 +1,14 @@
+diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile
+index cbd60b4..d2b83dd 100644
+--- a/tools/libfsimage/common/Makefile
++++ b/tools/libfsimage/common/Makefile
+@@ -5,7 +5,7 @@ MAJOR = 1.0
+ MINOR = 0
+
+ LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
+-LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
++LDFLAGS-$(CONFIG_Linux) =
+ LDFLAGS = $(LDFLAGS-y)
+
+ CFLAGS += $(PTHREAD_CFLAGS)
+
diff --git a/app-emulation/xen-tools/files/xen-4.2-configsxp.patch b/app-emulation/xen-tools/files/xen-4.2-configsxp.patch
new file mode 100644
index 0000000..4c159c1
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4.2-configsxp.patch
@@ -0,0 +1,24 @@
+diff -ur xen-4.2.1.orig/tools/examples/xend-config.sxp xen-4.2.1/tools/examples/xend-config.sxp
+--- tools/examples/xend-config.sxp 2012-12-17 23:00:23.000000000 +0800
++++ tools/examples/xend-config.sxp 2013-06-27 21:32:50.198221774 +0800
+@@ -200,7 +200,7 @@
+ #(network-script network-nat)
+ #(vif-script vif-nat)
+
+-# dom0-min-mem is the lowest permissible memory level (in MB) for dom0.
++# dom0-min-mem is the lowest permissible memory level (in kb) for dom0.
+ # This is a minimum both for auto-ballooning (as enabled by
+ # enable-dom0-ballooning below) and for xm mem-set when applied to dom0.
+ (dom0-min-mem 196)
+diff -ur xen-4.2.1.orig/tools/python/xen/xend/tests/xend-config.sxp xen-4.2.1/tools/python/xen/xend/tests/xend-config.sxp
+--- tools/python/xen/xend/tests/xend-config.sxp 2012-12-17 23:01:27.000000000 +0800
++++ tools/python/xen/xend/tests/xend-config.sxp 2013-06-27 21:32:02.726225130 +0800
+@@ -116,7 +116,7 @@
+
+
+ # Dom0 will balloon out when needed to free memory for domU.
+-# dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.
++# dom0-min-mem is the lowest memory level (in kb) dom0 will get down to.
+ # If dom0-min-mem=0, dom0 will never balloon out.
+ (dom0-min-mem 196)
+
diff --git a/app-emulation/xen-tools/files/xen-4.3-jserver.patch b/app-emulation/xen-tools/files/xen-4.3-jserver.patch
new file mode 100644
index 0000000..514fd05
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4.3-jserver.patch
@@ -0,0 +1,32 @@
+diff -ur xen-4.2.0.orig/tools/tests/x86_emulator/Makefile xen-4.2.0/tools/tests/x86_emulator/Makefile
+--- tools/tests/x86_emulator/Makefile 2012-09-17 18:21:19.000000000 +0800
++++ tools/tests/x86_emulator/Makefile 2012-11-24 05:06:24.355778737 +0800
+@@ -14,13 +14,13 @@
+ .PHONY: blowfish.h
+ blowfish.h:
+ rm -f blowfish.bin
+- XEN_TARGET_ARCH=x86_32 make -f blowfish.mk all
++ XEN_TARGET_ARCH=x86_32 $(MAKE) -f blowfish.mk all
+ (echo "static unsigned int blowfish32_code[] = {"; \
+ od -v -t x blowfish.bin | sed 's/^[0-9]* /0x/' | sed 's/ /, 0x/g' | sed 's/$$/,/';\
+ echo "};") >$@
+ rm -f blowfish.bin
+ ifeq ($(XEN_COMPILE_ARCH),x86_64)
+- XEN_TARGET_ARCH=x86_64 make -f blowfish.mk all
++ XEN_TARGET_ARCH=x86_64 $(MAKE) -f blowfish.mk all
+ (echo "static unsigned int blowfish64_code[] = {"; \
+ od -v -t x blowfish.bin | sed 's/^[0-9]* /0x/' | sed 's/ /, 0x/g' | sed 's/$$/,/';\
+ echo "};") >>$@
+
+diff -ur xen-4.2.0.orig/tools/firmware/vgabios/Makefile xen-4.2.0/tools/firmware/vgabios/Makefile
+--- tools/firmware/vgabios/Makefile 2013-02-04 13:56:50.973533544 +0800
++++ tools/firmware/vgabios/Makefile 2013-02-04 13:57:21.380535958 +0800
+@@ -27,7 +27,7 @@
+
+ .PHONY: release
+ release:
+- VGABIOS_VERS=\"-DVGABIOS_VERS=\\\"$(RELVERS)\\\"\" make bios cirrus-bios
++ VGABIOS_VERS=\"-DVGABIOS_VERS=\\\"$(RELVERS)\\\"\" $(MAKE) bios cirrus-bios
+ /bin/rm -f *.o *.s *.ld86 \
+ temp.awk.* vgabios.*.orig _vgabios_.*.c core *.bak .#*
+ cp VGABIOS-lgpl-latest.bin ../$(RELEASE).bin
diff --git a/app-emulation/xen-tools/files/xen-4.4-nostrip.patch b/app-emulation/xen-tools/files/xen-4.4-nostrip.patch
new file mode 100644
index 0000000..7ddd354
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4.4-nostrip.patch
@@ -0,0 +1,13 @@
+diff -ur xen-4.2.0.orig/tools/qemu-xen/Makefile.target xen-4.2.0/tools/qemu-xen/Makefile.target
+--- tools/qemu-xen/Makefile.target 2012-09-11 02:10:52.000000000 +0800
++++ tools/qemu-xen/Makefile.target 2012-11-22 07:13:38.894263291 +0800
+@@ -437,9 +437,6 @@
+ install: all
+ ifneq ($(PROGS),)
+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+-ifneq ($(STRIP),)
+- $(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS))
+-endif
+ endif
+ ifdef CONFIG_TRACE_SYSTEMTAP
+ ifdef CONFIG_TRACE_SYSTEMTAP
diff --git a/app-emulation/xen-tools/files/xen-4.4-qemu-bridge.patch b/app-emulation/xen-tools/files/xen-4.4-qemu-bridge.patch
new file mode 100644
index 0000000..8544561
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4.4-qemu-bridge.patch
@@ -0,0 +1,79 @@
+diff --git a/tools/qemu-xen/Makefile b/tools/qemu-xen/Makefile
+index 4d257f1..db2c2ad 100644
+--- a/tools/qemu-xen/Makefile
++++ b/tools/qemu-xen/Makefile
+@@ -62,7 +62,7 @@ $(call set-vpath, $(SRC_PATH))
+
+ LIBS+=-lz $(LIBS_TOOLS)
+
+-HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
++HELPERS-$(CONFIG_LINUX) = xen-bridge-helper$(EXESUF)
+
+ ifdef BUILD_DOCS
+ DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt
+@@ -186,7 +186,7 @@ qemu-img$(EXESUF): qemu-img.o $(block-obj-y) libqemuutil.a libqemustub.a
+ qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) libqemuutil.a libqemustub.a
+ qemu-io$(EXESUF): qemu-io.o $(block-obj-y) libqemuutil.a libqemustub.a
+
+-qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
++xen-bridge-helper$(EXESUF): xen-bridge-helper.o
+
+ fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o libqemuutil.a libqemustub.a
+ fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
+diff --git a/tools/qemu-xen/include/net/net.h b/tools/qemu-xen/include/net/net.h
+index 30e4b04..6691ff0 100644
+--- a/tools/qemu-xen/include/net/net.h
++++ b/tools/qemu-xen/include/net/net.h
+@@ -178,7 +178,7 @@ NetClientState *net_hub_port_find(int hub_id);
+
+ #define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
+ #define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
+-#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper"
++#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/xen-bridge-helper"
+ #define DEFAULT_BRIDGE_INTERFACE "br0"
+
+ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd);
+diff --git a/tools/qemu-xen/qemu-bridge-helper.c b/tools/qemu-xen/qemu-bridge-helper.c
+index 6a0974e..74b4635 100644
+--- a/tools/qemu-xen/qemu-bridge-helper.c
++++ b/tools/qemu-xen/qemu-bridge-helper.c
+@@ -67,7 +67,7 @@ typedef QSIMPLEQ_HEAD(ACLList, ACLRule) ACLList;
+ static void usage(void)
+ {
+ fprintf(stderr,
+- "Usage: qemu-bridge-helper [--use-vnet] --br=bridge --fd=unixfd\n");
++ "Usage: xen-bridge-helper [--use-vnet] --br=bridge --fd=unixfd\n");
+ }
+
+ static int parse_acl_file(const char *filename, ACLList *acl_list)
+diff --git a/tools/qemu-xen/qemu-options.hx b/tools/qemu-xen/qemu-options.hx
+index d15338e..f7104f1 100644
+--- a/tools/qemu-xen/qemu-options.hx
++++ b/tools/qemu-xen/qemu-options.hx
+@@ -1601,7 +1601,7 @@ to disable script execution.
+
+ If running QEMU as an unprivileged user, use the network helper
+ @var{helper} to configure the TAP interface. The default network
+-helper executable is @file{/usr/local/libexec/qemu-bridge-helper}.
++helper executable is @file{/usr/local/libexec/xen-bridge-helper}.
+
+ @option{fd}=@var{h} can be used to specify the handle of an already
+ opened host TAP interface.
+@@ -1625,7 +1625,7 @@ qemu-system-i386 linux.img \
+ #launch a QEMU instance with the default network helper to
+ #connect a TAP device to bridge br0
+ qemu-system-i386 linux.img \
+- -net nic -net tap,"helper=/usr/local/libexec/qemu-bridge-helper"
++ -net nic -net tap,"helper=/usr/local/libexec/xen-bridge-helper"
+ @end example
+
+ @item -netdev bridge,id=@var{id}[,br=@var{bridge}][,helper=@var{helper}]
+@@ -1634,7 +1634,7 @@ Connect a host TAP network interface to a host bridge device.
+
+ Use the network helper @var{helper} to configure the TAP interface and
+ attach it to the bridge. The default network helper executable is
+-@file{/usr/local/libexec/qemu-bridge-helper} and the default bridge
++@file{/usr/local/libexec/xen-bridge-helper} and the default bridge
+ device is @file{br0}.
+
+ Examples:
diff --git a/app-emulation/xen-tools/files/xen-tools-4-unbundle-ipxe.patch b/app-emulation/xen-tools/files/xen-tools-4-unbundle-ipxe.patch
new file mode 100644
index 0000000..902c9ac
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4-unbundle-ipxe.patch
@@ -0,0 +1,33 @@
+--- xen-4.2.0/tools/firmware/hvmloader/Makefile.orig 2012-05-27 21:57:04.481812859 +0100
++++ xen-4.2.0/tools/firmware/hvmloader/Makefile 2012-06-02 18:52:44.935034128 +0100
+@@ -48,7 +48,7 @@
+ else
+ CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.bin
+ endif
+-ETHERBOOT_ROMS := $(addprefix ../etherboot/ipxe/src/bin/, $(addsuffix .rom, $(ETHERBOOT_NICS)))
++ETHERBOOT_ROMS := $(addprefix /usr/share/ipxe/, $(addsuffix .rom, $(ETHERBOOT_NICS)))
+ endif
+
+ ROMS :=
+--- xen-4.2.0/Config.mk.orig 2012-05-27 21:57:04.479812884 +0100
++++ xen-4.2.0/Config.mk 2012-06-02 18:55:14.087169469 +0100
+@@ -206,7 +206,7 @@
+ # Wed Jun 26 16:30:45 2013 +0100
+ # xen: Don't perform SMP setup.
+
+-ETHERBOOT_NICS ?= rtl8139 8086100e
++ETHERBOOT_NICS ?= 10ec8139 8086100e
+
+ # Specify which qemu-dm to use. This may be `ioemu' to use the old
+ # Mercurial in-tree version, or a local directory, or a git URL.
+--- xen-4.2.0/tools/firmware/Makefile.orig 2012-05-27 21:57:04.480812871 +0100
++++ xen-4.2.0/tools/firmware/Makefile 2012-06-02 19:03:52.254691484 +0100
+@@ -10,7 +10,7 @@
+ #SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
+ SUBDIRS-$(CONFIG_ROMBIOS) += rombios
+ SUBDIRS-$(CONFIG_ROMBIOS) += vgabios
+-SUBDIRS-$(CONFIG_ROMBIOS) += etherboot
++#SUBDIRS-$(CONFIG_ROMBIOS) += etherboot
+ SUBDIRS-y += hvmloader
+
+ ovmf:
diff --git a/app-emulation/xen-tools/files/xen-tools-4.3-ar-cc.patch b/app-emulation/xen-tools/files/xen-tools-4.3-ar-cc.patch
new file mode 100644
index 0000000..174b404
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.3-ar-cc.patch
@@ -0,0 +1,84 @@
+diff -ur xen-4.3.0.orig/tools/debugger/gdbsx/gx/Makefile xen-4.3.0/tools/debugger/gdbsx/gx/Makefile
+--- tools/debugger/gdbsx/gx/Makefile 2013-07-09 18:46:56.000000000 +0800
++++ tools/debugger/gdbsx/gx/Makefile 2013-07-23 16:14:53.930752663 +0800
+@@ -3,6 +3,7 @@
+
+ GX_OBJS := gx_comm.o gx_main.o gx_utils.o gx_local.o
+ GX_HDRS := $(wildcard *.h)
++AR="ar"
+
+ .PHONY: all
+ all: gx_all.a
+@@ -16,5 +17,5 @@
+ # $(CC) -c $(CFLAGS) -o $@ $<
+
+ gx_all.a: $(GX_OBJS) Makefile $(GX_HDRS)
+- ar cr $@ $(GX_OBJS) # problem with ld using -m32
++ $(AR) cr $@ $(GX_OBJS) # problem with ld using -m32
+
+diff -ur xen-4.3.0.orig/tools/firmware/rombios/Makefile xen-4.3.0/tools/firmware/rombios/Makefile
+--- tools/firmware/rombios/Makefile 2013-07-09 18:46:56.000000000 +0800
++++ tools/firmware/rombios/Makefile 2013-07-23 21:57:21.258085143 +0800
+@@ -1,5 +1,6 @@
+ XEN_ROOT = $(CURDIR)/../../..
+ include $(XEN_ROOT)/tools/Rules.mk
++CC="gcc"
+
+ SUBDIRS := 32bit
+
+@@ -16,7 +17,7 @@
+ rm -f $(DEPS)
+
+ BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c
+- gcc -DBX_SMP_PROCESSORS=1 -E -P $< > _rombios_.c
++ $(CC) -DBX_SMP_PROCESSORS=1 -E -P $< > _rombios_.c
+ bcc -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c
+ sed -e 's/^\.text//' -e 's/^\.data//' rombios.s > _rombios_.s
+ as86 _rombios_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombios.txt
+@@ -26,6 +27,6 @@
+ rm -f _rombios_.s
+
+ biossums: biossums.c
+- gcc -o biossums biossums.c
++ $(CC) -o biossums biossums.c
+
+ -include $(DEPS)
+diff -ur xen-4.3.0.orig/tools/firmware/vgabios/Makefile xen-4.3.0/tools/firmware/vgabios/Makefile
+--- tools/firmware/vgabios/Makefile 2013-07-09 18:46:56.000000000 +0800
++++ tools/firmware/vgabios/Makefile 2013-07-23 22:42:39.041261388 +0800
+@@ -37,7 +37,7 @@
+ tar czvf ../$(RELEASE).tgz --exclude CVS -C .. $(RELEASE)/
+
+ vgabios.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h
+- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE $(VGABIOS_DATE) > _vgabios_.c
++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE $(VGABIOS_DATE) > _vgabios_.c
+ $(BCC) -o vgabios.s -C-c -D__i86__ -S -0 _vgabios_.c
+ sed -e 's/^\.text//' -e 's/^\.data//' vgabios.s > _vgabios_.s
+ $(AS86) _vgabios_.s -b vgabios.bin -u -w- -g -0 -j -O -l vgabios.txt
+@@ -47,7 +47,7 @@
+ ls -l VGABIOS-lgpl-latest.bin
+
+ vgabios.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h
+- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c
++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c
+ $(BCC) -o vgabios-debug.s -C-c -D__i86__ -S -0 _vgabios-debug_.c
+ sed -e 's/^\.text//' -e 's/^\.data//' vgabios-debug.s > _vgabios-debug_.s
+ $(AS86) _vgabios-debug_.s -b vgabios.debug.bin -u -w- -g -0 -j -O -l vgabios.debug.txt
+@@ -57,7 +57,7 @@
+ ls -l VGABIOS-lgpl-latest.debug.bin
+
+ vgabios-cirrus.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c
+- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus_.c
++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus_.c
+ $(BCC) -o vgabios-cirrus.s -C-c -D__i86__ -S -0 _vgabios-cirrus_.c
+ sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus.s > _vgabios-cirrus_.s
+ $(AS86) _vgabios-cirrus_.s -b vgabios-cirrus.bin -u -w- -g -0 -j -O -l vgabios-cirrus.txt
+@@ -67,7 +67,7 @@
+ ls -l VGABIOS-lgpl-latest.cirrus.bin
+
+ vgabios-cirrus.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c
+- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c
++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c
+ $(BCC) -o vgabios-cirrus-debug.s -C-c -D__i86__ -S -0 _vgabios-cirrus-debug_.c
+ sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus-debug.s > _vgabios-cirrus-debug_.s
+ $(AS86) _vgabios-cirrus-debug_.s -b vgabios-cirrus.debug.bin -u -w- -g -0 -j -O -l vgabios-cirrus.debug.txt
diff --git a/app-emulation/xen-tools/files/xen-tools-4.4-api-fix.patch b/app-emulation/xen-tools/files/xen-tools-4.4-api-fix.patch
new file mode 100644
index 0000000..fc0124c
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.4-api-fix.patch
@@ -0,0 +1,48 @@
+diff --git a/tools/configure b/tools/configure
+index afc3000..6187468 100755
+--- a/tools/configure
++++ b/tools/configure
+@@ -4615,7 +4615,7 @@ if test x"${PERL}" = x"no"
+ then
+ as_fn_error $? "Unable to find perl, please install perl" "$LINENO" 5
+ fi
+-if test "x$xapi" = "xy"; then :
++if test "x$xenapi" = "xy"; then :
+
+ # Extract the first word of "curl-config", so it can be a program name with args.
+ set dummy curl-config; ac_word=$2
+diff --git a/tools/configure.ac b/tools/configure.ac
+index 0754f0e..cc884f7 100644
+--- a/tools/configure.ac
++++ b/tools/configure.ac
+@@ -150,7 +150,7 @@ AC_PROG_INSTALL
+ AC_PATH_PROG([BISON], [bison])
+ AC_PATH_PROG([FLEX], [flex])
+ AX_PATH_PROG_OR_FAIL([PERL], [perl])
+-AS_IF([test "x$xapi" = "xy"], [
++AS_IF([test "x$xenapi" = "xy"], [
+ AX_PATH_PROG_OR_FAIL([CURL], [curl-config])
+ AX_PATH_PROG_OR_FAIL([XML], [xml2-config])
+ ])
+diff --git a/tools/libxen/Makefile b/tools/libxen/Makefile
+index b66f0bc..94b854b 100644
+--- a/tools/libxen/Makefile
++++ b/tools/libxen/Makefile
+@@ -22,12 +22,15 @@ MAJOR = 1.0
+ MINOR = 0
+
+ CFLAGS += -Iinclude \
+- $(shell $(XML2_CONFIG) --cflags) \
+- $(shell $(CURL_CONFIG) --cflags) \
+ -fPIC
+
++ifeq ($(LIBXENAPI_BINDINGS),y)
++CFLAGS += $(shell $(XML2_CONFIG) --cflags) \
++ $(shell $(CURL_CONFIG) --cflags)
++
+ LDFLAGS += $(shell $(XML2_CONFIG) --libs) \
+ $(shell $(CURL_CONFIG) --libs)
++endif
+
+ LIBXENAPI_HDRS = $(wildcard include/xen/api/*.h) include/xen/api/xen_all.h
+ LIBXENAPI_OBJS = $(patsubst %.c, %.o, $(wildcard src/*.c))
diff --git a/app-emulation/xen-tools/files/xencommons.confd b/app-emulation/xen-tools/files/xencommons.confd
new file mode 100644
index 0000000..b9e2248
--- /dev/null
+++ b/app-emulation/xen-tools/files/xencommons.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/xencommons
+
+# Load xen's kernel modules, and this will override defaults
+XEN_KERNEL_MODULES=""
diff --git a/app-emulation/xen-tools/files/xencommons.initd b/app-emulation/xen-tools/files/xencommons.initd
new file mode 100644
index 0000000..5ece118
--- /dev/null
+++ b/app-emulation/xen-tools/files/xencommons.initd
@@ -0,0 +1,80 @@
+#!/sbin/runscript
+# 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/files/xencommons.initd,v 1.1 2013/12/06 23:34:11 idella4 Exp $
+
+depend() {
+ before xenstored
+}
+
+is_privileged_domain() {
+ grep -qsE '^control_d$' /proc/xen/capabilities
+ return $?
+}
+
+handle_kernel_modules() {
+ local XEN_DEFAULT_KERNEL_MODULES="
+ xen-evtchn
+ xen-gntdev
+ xen-gntalloc
+ xen-blkback
+ xen-netback
+ xen-pciback
+ gntdev
+ netbk
+ blkbk
+ xen-scsibk
+ usbbk
+ pciback
+ xen-acpi-processor
+ blktap2
+ blktap
+ "
+
+ [ "$1" = "remove" ] && OPTS="-r"
+
+ XEN_KERNEL_MODULES="${XEN_KERNEL_MODULES:-${XEN_DEFAULT_KERNEL_MODULES}}"
+ for i in ${XEN_KERNEL_MODULES}; do
+ modprobe ${OPTS} $i 2>/dev/null
+ done
+ return 0
+}
+
+start() {
+ ebegin "Starting xencommons daemon"
+
+ # not running in Xen dom0 or domU
+ if [ ! -d /proc/xen ]; then
+ eend 1 "Not running in Xen mode"
+ return 1
+ fi
+
+ # mount xenfs in dom0 or domU with a pv_ops kernel
+ if ! test -f /proc/xen/capabilities && \
+ ! grep '^xenfs ' /proc/mounts >/dev/null;
+ then
+ mount -t xenfs xenfs /proc/xen
+ fi
+
+ if ! is_privileged_domain; then
+ eend 1 "Not running on a privileged domain. xencommons not started"
+ return 1
+ fi
+
+ handle_kernel_modules
+
+ eend $? "Failed to start xencommons"
+}
+
+stop () {
+ ebegin "Stopping xencommons"
+ if ! is_privileged_domain; then
+ eend 1 "Not running on a privileged domain. xencommons not started"
+ return 1
+ fi
+
+ handle_kernel_modules remove
+
+ eend $? "Failed to stop xencommons"
+}
+
diff --git a/app-emulation/xen-tools/files/xenconsoled.initd b/app-emulation/xen-tools/files/xenconsoled.initd
index 12e4381..e2d245f 100644
--- a/app-emulation/xen-tools/files/xenconsoled.initd
+++ b/app-emulation/xen-tools/files/xenconsoled.initd
@@ -1,25 +1,34 @@
#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2014 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 $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenconsoled.initd,v 1.6 2014/02/13 07:59:09 dlan Exp $
depend() {
need xenstored
+ after lvm
+}
+
+# bug #498720
+shutdown_all_domU() {
+ # Note: shutdown all domU, including manually started ones
+ local V=$(xl info| awk "/xen_minor/ { print \$3 }")
+ # 4.2.2 do not support "-a" option
+ [ $V -gt 2 ] && xl shutdown -a -w >/dev/null
}
start() {
ebegin "Starting xenconsoled daemon"
start-stop-daemon --start --exec /usr/sbin/xenconsoled \
- --pidfile /var/run/xenconsoled.pid \
- -- --pid-file=/var/run/xenconsoled.pid \
+ --pidfile /run/xenconsoled.pid \
+ -- --pid-file=/run/xenconsoled.pid \
${XENCONSOLED_OPTS}
eend $*
}
stop() {
- ebegin "Stoping xenconsoled daemon"
+ ebegin "Stopping xenconsoled daemon"
+ shutdown_all_domU
start-stop-daemon --stop --exec /usr/sbin/xenconsoled \
- --pidfile /var/run/xenconsoled.pid
+ --pidfile /run/xenconsoled.pid
eend $*
}
-
diff --git a/app-emulation/xen-tools/files/xend.initd-r2 b/app-emulation/xen-tools/files/xend.initd-r2
index e7b6ec0..837decc 100644
--- a/app-emulation/xen-tools/files/xend.initd-r2
+++ b/app-emulation/xen-tools/files/xend.initd-r2
@@ -1,7 +1,9 @@
#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2014 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 $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd-r2,v 1.5 2014/01/02 04:58:53 idella4 Exp $
+
+extra_commands="status"
depend() {
need net xenconsoled xenstored
@@ -44,3 +46,7 @@ stop() {
/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
index a180c13..e75e19d 100644
--- a/app-emulation/xen-tools/files/xendomains-screen.confd
+++ b/app-emulation/xen-tools/files/xendomains-screen.confd
@@ -2,11 +2,11 @@
# Directory of domains to boot. AUTODIR should contain one or more symlinks
# to domain config files in /etc/xen
-AUTODIR=/etc/xen/auto
+# AUTODIR=/etc/xen/auto
# Send shutdown commands to all domains in parallel instead of waiting for
# each to shutdown individually
-PARALLEL_SHUTDOWN=yes
+# PARALLEL_SHUTDOWN=yes
# When SCREEN="yes", domains in AUTODIR have their consoles connected to a
# screen session named SCREEN_NAME, with output logged to individual files
diff --git a/app-emulation/xen-tools/files/xendomains.initd-r2 b/app-emulation/xen-tools/files/xendomains.initd-r2
index b7c72e1..103384c 100644
--- a/app-emulation/xen-tools/files/xendomains.initd-r2
+++ b/app-emulation/xen-tools/files/xendomains.initd-r2
@@ -1,7 +1,7 @@
#!/sbin/runscript
# 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/files/xendomains.initd-r2,v 1.6 2013/02/24 10:39:11 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r2,v 1.8 2013/07/27 06:11:03 idella4 Exp $
extra_commands="status"
@@ -13,10 +13,10 @@ depend() {
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
+ if [ -z ${name_from_file} ] ; then
basename "${1}"
else
- echo ${name_from_file}
+ echo ${name_from_file}
fi
}
@@ -25,7 +25,7 @@ is_running() {
}
using_screen() {
- [[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]]
+ [ "${SCREEN}" = "yes" -o "${SCREEN}" = "YES" ]
}
set_screen_cmd() {
@@ -46,7 +46,7 @@ start() {
&& ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \
&& ${screen_cmd} log on \
&& ${screen_cmd} deflog on ) >/dev/null
- if [[ $? -ne 0 ]] ; then
+ if [ $? -ne 0 ] ; then
eend 1
return 1
else
@@ -77,7 +77,7 @@ stop() {
# Stop all domains with config files in AUTODIR.
DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)"
- if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then
+ if [[ "$PARALLEL_SHUTDOWN" == "yes" ]] ; then
for dom in $DOMAINS ; do
name=$(get_domname ${dom})
if is_running ${name} ; then
diff --git a/app-emulation/xen-tools/files/xenqemudev.confd b/app-emulation/xen-tools/files/xenqemudev.confd
new file mode 100644
index 0000000..5b49520
--- /dev/null
+++ b/app-emulation/xen-tools/files/xenqemudev.confd
@@ -0,0 +1,7 @@
+# /etc/conf.d/xenqemudev
+
+# To enable QEMU file backend, set to 'yes'
+XENQEMUDEV_FILE_BACKEND_ENABLE=""
+
+# Common options for xenqemudev
+XENQEMUDEV_OPTS=""
diff --git a/app-emulation/xen-tools/files/xenqemudev.initd b/app-emulation/xen-tools/files/xenqemudev.initd
new file mode 100644
index 0000000..6f7066e
--- /dev/null
+++ b/app-emulation/xen-tools/files/xenqemudev.initd
@@ -0,0 +1,81 @@
+#!/sbin/runscript
+# 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/files/xenqemudev.initd,v 1.2 2013/12/07 06:49:41 idella4 Exp $
+
+depend() {
+ need xencommons xenstored xenconsoled
+}
+
+is_privileged_domain() {
+ grep -qsE '^control_d$' /proc/xen/capabilities
+ return $?
+}
+
+xen_setvars() {
+ . /etc/xen/scripts/hotplugpath.sh
+
+ XENQEMUDEV_PIDFILE=/run/xenqemudev.pid
+ XEN_QEMU="${LIBEXEC}/qemu-system-i386"
+}
+
+xen_qemu_start() {
+ if [ -z "${XENQEMUDEV_FILE_BACKEND_ENABLE}" ]; then
+ ewarn " QEMU disk backend not enabled"
+ ewarn " enable XENQEMUDEV_FILE_BACKEND_ENABLE in /etc/conf.d/xenqemudev"
+ return 1
+ fi
+
+ xen_setvars
+
+ if [ ! -c /dev/xen/gntdev ]; then
+ einfo " Xen gntdev driver not loaded"
+ return 1
+ fi
+
+ if [ -e "${XEN_QEMU}" ]; then
+ einfo " Starting QEMU as disk backend for dom0"
+
+ XENQEMUDEV_DEFAULT_OPTS="-xen-domid 0 -xen-attach -name dom0 \
+ -nographic -M xenpv -daemonize \
+ -monitor /dev/null -serial /dev/null -parallel /dev/null"
+
+ XENQEMUDEV_OPTS=${XENQEMUDEV_OPTS:-${XENQEMUDEV_DEFAULT_OPTS}}
+
+ start-stop-daemon --start --exec ${XEN_QEMU} \
+ --pidfile ${XENQEMUDEV_PIDFILE} \
+ -- -pidfile ${XENQEMUDEV_PIDFILE} \
+ ${XENQEMUDEV_OPTS}
+ return $?
+ fi
+}
+
+start() {
+ ebegin "Starting xenqemudev daemon"
+
+ # not running in Xen dom0 or domU
+ if [ ! -d /proc/xen ]; then
+ eend 1 "Not running in Xen mode"
+ return 1
+ fi
+
+ if ! is_privileged_domain; then
+ eend 1 "Not running on a privileged domain. xenqemudev not started"
+ return 1
+ fi
+
+ xen_qemu_start
+
+ eend $? "Failed to start xenqemudev"
+}
+
+stop () {
+ ebegin "Stopping xenqemudev"
+
+ xen_setvars
+
+ start-stop-daemon --stop --exec ${XEN_QEMU} \
+ --pidfile ${XENQEMUDEV_PIDFILE}
+
+ eend $? "Stopping xenqemudev, as it cannot be restarted."
+}
diff --git a/app-emulation/xen-tools/files/xenstored.initd b/app-emulation/xen-tools/files/xenstored.initd
index 108da29..09009ea 100755
--- a/app-emulation/xen-tools/files/xenstored.initd
+++ b/app-emulation/xen-tools/files/xenstored.initd
@@ -1,28 +1,44 @@
#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 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.3 2013/03/16 16:46:57 idella4 Exp $
depend() {
before xendomains xend sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp
+ need xencommons
+}
+
+xenstored_dir_check() {
+ # create dir dynamically
+ local i
+ for i in /var/lock/subsys /run/xen /run/xend/boot /run/xenstored; do
+ [ -x $i ] || mkdir -p $i
+ done
}
start() {
ebegin "Starting xenstored daemon"
+ xenstored_dir_check
start-stop-daemon --start --exec /usr/sbin/xenstored \
- --pidfile /var/run/xenstored.pid \
- -- --pid-file=/var/run/xenstored.pid \
+ --pidfile /run/xenstored.pid \
+ -- --pid-file=/run/xenstored.pid \
$XENSTORED_OPTS
- sleep 15
+ until xenstore-exists \ || ((15 < ++i))
+ do
+ echo -n .
+ sleep 1
+ done
einfo "Setting domain0 name record"
/usr/bin/xenstore-write "/local/domain/0/name" "Domain-0"
+ local V=$(xl info| awk "/xen_minor/ { print \$3 }")
+ [ $V -ge 4 ] && /usr/bin/xenstore-write "/local/domain/0/domid" 0
+
eend $*
}
stop() {
ebegin "Stopping xenstored daemon"
start-stop-daemon --stop --exec /usr/sbin/xenstored \
- --pidfile /var/run/xenstored.pid
+ --pidfile /run/xenstored.pid
eend $?
}
diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index 6101069..bd4d8c1 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -2,10 +2,6 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>xen</herd>
- <maintainer>
- <email>idella4@gentoo.org</email>
- <name>Ian Delaney</name>
- </maintainer>
<use>
<flag name='api'>Build the C libxenapi bindings</flag>
<flag name='flask'>Enable the Flask XSM module from NSA</flag>
@@ -14,5 +10,7 @@
<flag name='pygrub'>Install the pygrub boot loader</flag>
<flag name='screen'>Enable support for running domain U console in an <pkg>app-misc/screen</pkg> session</flag>
<flag name='xend'>Enable support the xend and xm to manage xen</flag>
+ <flag name='ocaml'>Enable support for the ocaml language</flag>
+ <flag name='pam'>Enable pam support</flag>
</use>
</pkgmetadata>
diff --git a/app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild b/app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild
new file mode 100644
index 0000000..29af48a
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild
@@ -0,0 +1,435 @@
+# 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.3.1-r3.ebuild,v 1.4 2013/12/22 12:01:08 idella4 Exp $
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+PYTHON_REQ_USE='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"
+ UPSTREAM_VER=
+ GENTOO_VER=
+
+ [[ -n ${UPSTREAM_VER} ]] && \
+ UPSTRAM_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+ [[ -n ${GENTOO_VER} ]] && \
+ GENTOO_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+
+ SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+ ${UPSTRAM_PATCHSET_URI}
+ ${GENTOO_PATCHSET_URI}"
+ S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc xsm flask hvm qemu ocaml +pam python pygrub screen static-libs xend"
+
+REQUIRED_USE="hvm? ( qemu )
+ ${PYTHON_REQUIRED_USE}
+ pygrub? ( python )"
+
+DEPEND="dev-libs/lzo:2
+ dev-libs/glib:2
+ dev-libs/yajl
+ dev-libs/libgcrypt
+ dev-python/lxml[${PYTHON_USEDEP}]
+ pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+ sys-libs/zlib
+ sys-power/iasl
+ sys-firmware/seabios
+ sys-firmware/ipxe
+ hvm? ( media-libs/libsdl )
+ ${PYTHON_DEPS}
+ api? ( dev-libs/libxml2
+ net-misc/curl )
+ pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+ sys-devel/bin86
+ sys-devel/dev86
+ dev-lang/perl
+ app-misc/pax-utils
+ dev-python/markdown
+ doc? (
+ app-doc/doxygen
+ dev-tex/latex2html[png,gif]
+ media-gfx/graphviz
+ dev-tex/xcolor
+ media-gfx/transfig
+ 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
+ !net-libs/libiscsi )
+ qemu? ( x11-libs/pixman )
+ ocaml? ( dev-ml/findlib
+ >=dev-lang/ocaml-4 )"
+RDEPEND="sys-apps/iproute2
+ net-misc/bridge-utils
+ screen? (
+ app-misc/screen
+ app-admin/logrotate
+ )
+ 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"
+
+RESTRICT="test"
+
+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 xsm; then
+ export "XSM_ENABLE=y"
+ if use flask; then
+ export "FLASK_ENABLE=y"
+ fi
+ else
+ export "XSM_ENABLE=n"
+ fi
+
+ if use qemu; then
+ export "CONFIG_IOEMU=y"
+ else
+ export "CONFIG_IOEMU=n"
+ fi
+
+ if use xend; then
+ export "CONFIG_XEND=y"
+ else
+ export "CONFIG_XEND=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
+ #bug 472438
+ export BASH_COMPLETION_DIR=/usr/share/bash-completion
+}
+
+src_prepare() {
+ # Upstream's patchset
+ if [[ -n ${UPSTREAM_VER} ]]; then
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}"/patches-upstream
+ fi
+
+ # Gentoo's patchset
+ if [[ -n ${GENTOO_VER} ]]; then
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}"/patches-gentoo
+ fi
+
+ # Fix texi2html build error with new texi2html, qemu.doc.html
+ epatch "${FILESDIR}"/${PN}-4-docfix.patch
+
+ # Fix network broadcast on bridged networks
+ epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
+
+ # Bug 496708
+ epatch "${FILESDIR}"/${PN}-4-unbundle-ipxe.patch
+
+ # Fix bridge by idella4, bug #362575
+ epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
+
+ # Prevent double stripping of files at install
+ epatch "${FILESDIR}"/${PN/-tools/}-4.4-nostrip.patch
+
+ # fix jobserver in Makefile
+ epatch "${FILESDIR}"/${PN/-tools/}-4.3-jserver.patch
+
+ # Set dom0-min-mem to kb; Bug #472982
+ epatch "${FILESDIR}"/${PN/-tools/}-4.2-configsxp.patch
+
+ # Bug 477676
+ epatch "${FILESDIR}"/${PN}-4.3-ar-cc.patch
+
+ # Bug 379537
+ epatch "${FILESDIR}"/fix-gold-ld.patch
+
+ # Prevent file collision with qemu package Bug 478064
+ epatch "${FILESDIR}"/xen-4.4-qemu-bridge.patch
+ mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+ epatch "${FILESDIR}"/${PN}-4.4-api-fix.patch
+
+ use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+ sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+ -i tools/firmware/Makefile || die
+
+ # Drop .config, fixes to gcc-4.6
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
+
+ # 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 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-y += pygrub/d' -i tools/Makefile || die
+ fi
+
+ if ! use python; then
+ sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+ fi
+
+ # Disable hvm support on systems that don't support x86_32 binaries.
+ if ! use hvm; then
+ 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 "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+ fi
+
+ # Bug 472438
+ sed -e 's:^BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(SHARE_DIR)/bash-completion:' \
+ -i Config.mk || die
+
+
+ # xencommons, Bug #492332, sed lighter weight than patching
+ sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+ -i tools/hotplug/Linux/init.d/xencommons || die
+
+ # respect multilib, usr/lib/libcacard.so.0.0.0
+ sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+ -i tools/qemu-xen/configure || die
+
+ # fix QA warning, create /var/run/, /var/lock dynamically
+ sed -i -e "/\$(INSTALL_DIR) \$(DESTDIR)\$(XEN_RUN_DIR)/d" \
+ tools/libxl/Makefile || die
+
+ sed -i -e "/\/var\/run\//d" \
+ tools/xenstore/Makefile \
+ tools/pygrub/Makefile || die
+
+ sed -i -e "/\/var\/lock\/subsys/d" \
+ tools/Makefile || die
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf="--prefix=/usr \
+ --libdir=/usr/$(get_libdir) \
+ --disable-werror \
+ --with-system-seabios=/usr/share/seabios/bios.bin \
+ $(use_enable pam) \
+ $(use_enable api xenapi) \
+ $(use_enable ocaml ocamltools) \
+ "
+ econf ${myconf}
+}
+
+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
+ unset CFLAGS
+ emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -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=/tmp/init.d
+ export CONFIG_LEAF_DIR=../tmp/default
+
+ # Let the build system compile installed Python modules.
+ local PYTHONDONTWRITEBYTECODE
+ export PYTHONDONTWRITEBYTECODE
+
+ emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+ XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+ # Fix the remaining Python shebangs.
+ python_fix_shebang "${D}"
+
+ # Remove RedHat-specific stuff
+ rm -rf "${D}"tmp || 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
+
+ # Reset bash completion dir; Bug 472438
+ mv "${D}"bash-completion "${D}"usr/share/ || die
+
+ if use doc; then
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+ dohtml -r docs/
+ docinto pdf
+ dodoc ${DOCS[@]}
+ [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+ fi
+
+ rm -rf "${D}"/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
+ newinitd "${FILESDIR}"/xencommons.initd xencommons
+ newconfd "${FILESDIR}"/xencommons.confd xencommons
+ newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+ newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+ if use screen; then
+ 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
+
+ # Move files built with use qemu, Bug #477884
+ if [[ "${ARCH}" == 'amd64' ]] && use qemu; then
+ mkdir -p "${D}"usr/$(get_libdir)/xen/bin || die
+ mv "${D}"usr/lib/xen/bin/* "${D}"usr/$(get_libdir)/xen/bin/ || die
+ fi
+
+ # For -static-libs wrt Bug 384355
+ if ! use static-libs; then
+ rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+ fi
+
+ # xend expects these to exist
+ keepdir /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() {
+ elog "Official Xen Guide and the offical wiki page:"
+ elog "https://wiki.gentoo.org/wiki/Xen"
+ elog "http://wiki.xen.org/wiki/Main_Page"
+ elog ""
+ elog "Recommended to utilise the xencommons script to config sytem At boot"
+ elog "Add by use of rc-update on completion of the install"
+
+ 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 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."
+ 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."
+ fi
+
+ if use xend; then
+ elog"";elog "xend capability has been enabled and installed"
+ fi
+
+ if use qemu; then
+ elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+ elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
+ elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
+ elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+ 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
+}