diff options
author | Michael Marineau <marineam@gentoo.org> | 2007-05-02 04:10:04 +0000 |
---|---|---|
committer | Michael Marineau <marineam@gentoo.org> | 2007-05-02 04:10:04 +0000 |
commit | 52fa31e0e0d2f1964829582f442cb0f154a1bb34 (patch) | |
tree | 2c6b80e1617e025e0d9e18e45b74f5f0d983bc6b /app-emulation/xen-tools | |
parent | Add xen-tools local use flag 'ioemu' (diff) | |
download | gentoo-2-52fa31e0e0d2f1964829582f442cb0f154a1bb34.tar.gz gentoo-2-52fa31e0e0d2f1964829582f442cb0f154a1bb34.tar.bz2 gentoo-2-52fa31e0e0d2f1964829582f442cb0f154a1bb34.zip |
Add xen-tools 3.0.4 from the marineam-xen overlay
(Portage version: 2.1.1-r2)
Diffstat (limited to 'app-emulation/xen-tools')
12 files changed, 430 insertions, 8 deletions
diff --git a/app-emulation/xen-tools/ChangeLog b/app-emulation/xen-tools/ChangeLog index 7596d3540370..340f9d1cc8c4 100644 --- a/app-emulation/xen-tools/ChangeLog +++ b/app-emulation/xen-tools/ChangeLog @@ -1,6 +1,23 @@ # ChangeLog for app-emulation/xen-tools # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.20 2007/03/13 06:26:34 aross Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.21 2007/05/02 04:10:04 marineam Exp $ + +*xen-tools-3.0.4_p1 (02 May 2007) + + 02 May 2007; Michael Marineau <marineam@gentoo.org> + -files/3.0.2-r4/pygrub-progsreiserfs-0.3.1.patch, + -files/3.0.2-r4/xc_ptrace.patch, -files/3.0.2-r4/xend.initd, + -files/3.0.2-r4/xendomains.initd, +files/xen-tools-3.0.2-xc_ptrace.patch, + +files/xen-tools-3.0.2-pygrub-progsreiserfs-0.3.1.patch, + +files/xen-tools-3.0.4_p1--as-needed.patch, + +files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch, + +files/xen-tools-3.0.4_p1-remove-monitor-mode-from-vnc.patch, + +files/xen-tools-3.0.4_p1-vnclisten.patch, +files/xend.initd, + +files/xendomains.initd, -files/xendomains-conf, -files/xendomains-init, + -xen-tools-3.0.2-r2.ebuild, -xen-tools-3.0.2-r3.ebuild, + xen-tools-3.0.2-r4.ebuild, +xen-tools-3.0.4_p1.ebuild: + Add Xen 3.0.4_1 from the marineam-xen overlay. + Clean out some old ebuilds and clean up the files dir. 13 Mar 2007; Andrew Ross <aross@gentoo.org> xen-tools-3.0.2-r3.ebuild, xen-tools-3.0.2-r4.ebuild: diff --git a/app-emulation/xen-tools/files/digest-xen-tools-3.0.4_p1 b/app-emulation/xen-tools/files/digest-xen-tools-3.0.4_p1 new file mode 100644 index 000000000000..7aadef066796 --- /dev/null +++ b/app-emulation/xen-tools/files/digest-xen-tools-3.0.4_p1 @@ -0,0 +1,3 @@ +MD5 e85e16ad3dc354338e3ac4a8951f9649 xen-3.0.4_1-src.tgz 6473636 +RMD160 f869eec35f6afe0bc9824ce2eb4a600f789d423b xen-3.0.4_1-src.tgz 6473636 +SHA256 6b3842393e69a9c8fcdbc2789d05830aba6f1d108a6f97f1448de4a86f92a5cb xen-3.0.4_1-src.tgz 6473636 diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.2-pygrub-progsreiserfs-0.3.1.patch b/app-emulation/xen-tools/files/xen-tools-3.0.2-pygrub-progsreiserfs-0.3.1.patch new file mode 100644 index 000000000000..2132a6378711 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.0.2-pygrub-progsreiserfs-0.3.1.patch @@ -0,0 +1,56 @@ +diff -urN xen-3.0.2/tools/pygrub/src/fsys/reiser/reisermodule.c xen-3.0.2-b/tools/pygrub/src/fsys/reiser/reisermodule.c +--- xen-3.0.2/tools/pygrub/src/fsys/reiser/reisermodule.c 2006-04-09 18:05:53.000000000 -0400 ++++ xen-3.0.2-b/tools/pygrub/src/fsys/reiser/reisermodule.c 2006-08-18 12:51:42.000000000 -0400 +@@ -17,7 +17,7 @@ + #include <stdlib.h> + #include <stdio.h> + +-#include <dal/file_dal.h> ++#include <dal/file.h> + #include <reiserfs/reiserfs.h> + + #if (PYTHON_API_VERSION >= 1011) +@@ -46,8 +46,7 @@ + + if (!dal) return; + +- close((int)(unsigned long)dal->dev); +- dal_free(dal); ++ dal_close(dal); + } + + /* reiser file object */ +@@ -195,7 +194,7 @@ + if (fs->fs != NULL) + { + reiserfs_fs_close(fs->fs); +- file_dal_close(fs->dal); ++ file_close(fs->dal); + fs->fs = NULL; + } + Py_INCREF(Py_None); +@@ -218,13 +217,13 @@ + return NULL; + } + +- if (!(dal = file_dal_open(name, block_size, O_RDONLY))) { ++ if (!(dal = file_open(name, block_size, O_RDONLY))) { + PyErr_SetString(PyExc_ValueError, "Couldn't create device abstraction"); + return NULL; + } + + if (!(rfs = reiserfs_fs_open_fast(dal, dal))) { +- file_dal_close(dal); ++ file_close(dal); + PyErr_SetString(PyExc_ValueError, "unable to open file"); + return NULL; + } +@@ -265,7 +264,7 @@ + if (fs->fs != NULL) + { + reiserfs_fs_close(fs->fs); +- file_dal_close(fs->dal); ++ file_close(fs->dal); + fs->fs = NULL; + } + PyObject_DEL(fs); diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.2-xc_ptrace.patch b/app-emulation/xen-tools/files/xen-tools-3.0.2-xc_ptrace.patch new file mode 100644 index 000000000000..af51c3d88a77 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.0.2-xc_ptrace.patch @@ -0,0 +1,24 @@ +--- tools/libxc/xc_ptrace.c-orig 2006-10-13 15:53:29.000000000 +1000 ++++ tools/libxc/xc_ptrace.c 2006-10-13 15:54:06.000000000 +1000 +@@ -597,17 +597,13 @@ + online_vcpus_changed(cpumap); + break; + +- case PTRACE_SETFPREGS: +- case PTRACE_SETFPXREGS: +- case PTRACE_PEEKUSER: +- case PTRACE_POKEUSER: +- case PTRACE_SYSCALL: +- case PTRACE_KILL: +- goto out_unspported; /* XXX not yet supported */ +- + case PTRACE_TRACEME: + printf("PTRACE_TRACEME is an invalid request under Xen\n"); + goto out_error; ++ ++ default: ++ goto out_unspported; /* XXX not yet supported */ ++ + } + + return retval; diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.4_p1--as-needed.patch b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1--as-needed.patch new file mode 100644 index 000000000000..8243ac8f342e --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1--as-needed.patch @@ -0,0 +1,12 @@ +diff -rpuN xen-3.0.4_1-src.orig/tools/xenmon/Makefile xen-3.0.4_1-src/tools/xenmon/Makefile +--- xen-3.0.4_1-src.orig/tools/xenmon/Makefile 2007-01-08 15:00:51.000000000 +0000 ++++ xen-3.0.4_1-src/tools/xenmon/Makefile 2007-02-09 01:02:08.000000000 +0000 +@@ -42,6 +42,6 @@ clean: + + + %: %.c Makefile +- $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $< ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lxenctrl + xentrace_%: %.c Makefile +- $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $< ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lxenctrl diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch new file mode 100644 index 000000000000..e830de54ae43 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch @@ -0,0 +1,19 @@ +diff -ru xen-3.0.4_1-src.orig/tools/examples/network-bridge xen-3.0.4_1-src/tools/examples/network-bridge +--- xen-3.0.4_1-src.orig/tools/examples/network-bridge 2007-01-08 07:00:48.000000000 -0800 ++++ xen-3.0.4_1-src/tools/examples/network-bridge 2007-03-05 17:37:32.000000000 -0800 +@@ -70,13 +70,13 @@ + vif0="vif0.${vifnum}" + + 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 //'` + } + + do_ifup() { + if ! ifup $1 ; then +- if [ ${addr_pfx} ] ; then ++ if [ "${addr_pfx}" ] ; then + # use the info from get_ip_info() + ip addr flush $1 + ip addr add ${addr_pfx} dev $1 diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-remove-monitor-mode-from-vnc.patch b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-remove-monitor-mode-from-vnc.patch new file mode 100644 index 000000000000..07e9735ea8df --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-remove-monitor-mode-from-vnc.patch @@ -0,0 +1,23 @@ +diff --git a/tools/ioemu/vnc.c b/tools/ioemu/vnc.c +index 6d7cc31..9e2d535 100644 +--- a/tools/ioemu/vnc.c ++++ b/tools/ioemu/vnc.c +@@ -962,18 +962,6 @@ static void do_key_event(VncState *vs, int down, uint32_t sym) + case XK_Num_Lock: + vs->numlock = !vs->numlock; + break; +- +- case XK_1 ... XK_9: +- if ((vs->ctl_keys & 3) != 3) +- break; +- +- console_select(sym - XK_1); +- if (is_graphic_console()) { +- /* tell the vga console to redisplay itself */ +- vga_hw_invalidate(); +- vnc_dpy_update(vs->ds, 0, 0, vs->ds->width, vs->ds->height); +- } +- break; + } + } + } diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-vnclisten.patch b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-vnclisten.patch new file mode 100644 index 000000000000..a22bebefbd32 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-vnclisten.patch @@ -0,0 +1,13 @@ +diff -rpuN xen-3.0.4_1-src.orig/tools/python/xen/xend/XendConfig.py xen-3.0.4_1-src/tools/python/xen/xend/XendConfig.py +--- xen-3.0.4_1-src.orig/tools/python/xen/xend/XendConfig.py Mon Dec 11 15:06:53 2006 +0000 ++++ xen-3.0.4_1-src/tools/python/xen/xend/XendConfig.py Tue Jan 30 13:36:15 2007 -0500 +@@ -229,7 +229,8 @@ LEGACY_IMAGE_CFG = [ + ('sdl', int), + ('vncdisplay', int), + ('vncunused', int), +- ('vncpasswd', str), ++ ('vncpasswd', str), ++ ('vnclisten', str), + ] + + LEGACY_IMAGE_HVM_CFG = [ diff --git a/app-emulation/xen-tools/files/xend.initd b/app-emulation/xen-tools/files/xend.initd new file mode 100644 index 000000000000..a28c6b4eb966 --- /dev/null +++ b/app-emulation/xen-tools/files/xend.initd @@ -0,0 +1,61 @@ +#!/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,v 1.1 2007/05/02 04:10:04 marineam 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 + 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/xm shutdown --all --wait >/dev/null + eend $? + fi + + ebegin "Stopping Xen control daemon" + /usr/sbin/xend stop + eend $? + + # This needs more testing (bug #149321) + #ebegin "Stopping xenconsoled" + #kill $(</var/run/xenconsoled.pid) + #eend $? + + #ebegin "Stopping xenstored" + #kill $(</var/run/xenstore.pid) + #eend $? +} + +status() { + is_privileged_domain && /usr/sbin/xend status +} diff --git a/app-emulation/xen-tools/files/xendomains.initd b/app-emulation/xen-tools/files/xendomains.initd index 15a263a3e9ff..59db8f62b4b5 100755 --- a/app-emulation/xen-tools/files/xendomains.initd +++ b/app-emulation/xen-tools/files/xendomains.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2006 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,v 1.1 2006/08/14 07:11:47 aross Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd,v 1.2 2007/05/02 04:10:04 marineam Exp $ opts="start stop status restart" @@ -11,7 +11,7 @@ depend() { } get_domname() { - local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alpha:]_]+)\"?\W*;?/\1/p' "${1}" | tail -n 1) + 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}" diff --git a/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild index 4dc898b13847..454a34379624 100644 --- a/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild +++ b/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild,v 1.3 2007/03/13 06:26:34 aross Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild,v 1.4 2007/05/02 04:10:04 marineam Exp $ inherit mount-boot flag-o-matic distutils eutils multilib @@ -100,7 +100,7 @@ src_unpack() { if use pygrub; then # Upstream use Debian and hence progsreiserfs-0.3.0, # which has a different API to 0.3.1 - epatch "${FILESDIR}/${PVR}"/pygrub-progsreiserfs-0.3.1.patch + epatch "${FILESDIR}/${P}"-pygrub-progsreiserfs-0.3.1.patch else sed -i -e "/^SUBDIRS += pygrub$/d" "${S}"/tools/Makefile fi @@ -122,7 +122,7 @@ src_unpack() { # Fix compilation error with newer glibc (bug #151014) # Backported from upstream - should be in 3.0.3 - epatch "${FILESDIR}/${PVR}"/xc_ptrace.patch + epatch "${FILESDIR}/${P}"-xc_ptrace.patch } src_compile() { @@ -167,9 +167,9 @@ src_install() { doman docs/man?/* - newinitd "${FILESDIR}/${PVR}"/xend.initd xend + newinitd "${FILESDIR}"/xend.initd xend newconfd "${FILESDIR}"/xendomains.confd xendomains - newinitd "${FILESDIR}/${PVR}"/xendomains.initd xendomains + newinitd "${FILESDIR}"/xendomains.initd xendomains if use screen; then cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains diff --git a/app-emulation/xen-tools/xen-tools-3.0.4_p1.ebuild b/app-emulation/xen-tools/xen-tools-3.0.4_p1.ebuild new file mode 100644 index 000000000000..8ce92e747a21 --- /dev/null +++ b/app-emulation/xen-tools/xen-tools-3.0.4_p1.ebuild @@ -0,0 +1,194 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.0.4_p1.ebuild,v 1.1 2007/05/02 04:10:04 marineam Exp $ + +inherit flag-o-matic distutils eutils multilib + +DESCRIPTION="Xend daemon and tools" +HOMEPAGE="http://www.xensource.com/xen/xen/" +MY_PV=${PV/_p/_} +SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV/_/-}/src.tgz/xen-${MY_PV}-src.tgz" +S="${WORKDIR}/xen-${MY_PV}-src" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc debug screen custom-cflags pygrub ioemu" + +CDEPEND="dev-lang/python + sys-libs/zlib + ioemu? ( media-libs/libsdl )" + +DEPEND="${CDEPEND} + sys-devel/gcc + dev-lang/perl + sys-devel/dev86 + app-misc/pax-utils + x11-proto/xproto + doc? ( + dev-tex/latex2html + media-gfx/transfig + ) + ioemu? ( + net-libs/libvncserver + )" + +RDEPEND="${CDEPEND} + sys-apps/iproute2 + net-misc/bridge-utils + screen? ( + app-misc/screen + app-admin/logrotate + ) + || ( sys-fs/udev sys-apps/hotplug )" + +PYTHON_MODNAME="xen grub" + +# hvmloader is used to bootstrap a fully virtualized kernel +# Approved by QA team in bug #144032 +QA_WX_LOAD="usr/lib/xen/boot/hvmloader" + +pkg_setup() { + if [[ "$(scanelf -s __guard -q `which python`)" ]] ; then + 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" + fi + + if [[ -z ${XEN_TARGET_ARCH} ]] ; then + if 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 +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # 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 {} \; + fi + + # xen tries to be smart and filter out CFLAGs not supported by gcc. + # It doesn't handle no* flags though, but flag-o-matic's test-flag-CC does. + for FLAG in -nopie -fno-stack-protector -fno-stack-protector-all; do + test-flag-CC ${FLAG} && HARDFLAGS="${HARDFLAGS} ${FLAG}" + done + sed -i "s/^CFLAGS :=$/& ${HARDFLAGS}/" \ + "${S}"/tools/firmware/{hvmloader,vmxassist}/Makefile + + + # Disable the 32bit-only vmxassist if we are not on x86 and we don't + # support the x86 ABI. Also disable hvmloader, since it requires vmxassist. + if ! use x86 && ! has x86 $(get_all_abis); then + sed -i -e "/SUBDIRS += vmxassist/d" "${S}"/tools/firmware/Makefile + sed -i -e "/SUBDIRS += hvmloader/d" "${S}"/tools/firmware/Makefile + fi + + if ! use pygrub; then + sed -i -e "/^SUBDIRS-y += pygrub$/d" "${S}"/tools/Makefile + fi + + # Don't bother with ioemu, only needed for fully virtualised guests + if ! use ioemu; then + sed -i -e "/^CONFIG_IOEMU := y$/d" "${S}"/config/*.mk + fi + + # Allow --as-needed LDFLAGS + epatch "${FILESDIR}/${P}"--as-needed.patch + + # Fix vnclisten + epatch "${FILESDIR}/${P}"-vnclisten.patch + + # Fix network broadcast on bridged networks + epatch "${FILESDIR}/${P}"-network-bridge-broadcast.patch + + # Disable QEMU monitor mode in VNC, bug #170917 + epatch "${FILESDIR}/${P}"-remove-monitor-mode-from-vnc.patch +} + +src_compile() { + local myopt myconf + use debug && myopt="${myopt} debug=y" + + use custom-cflags || unset CFLAGS + gcc-specs-ssp && append-flags -fno-stack-protector -fno-stack-protector-all + + if use ioemu; then + myconf="${myconf} --disable-system --disable-user" + (cd tools/ioemu && econf ${myconf}) || die "configure failured" + fi + + emake -C tools ${myopt} || die "compile failed" + + if use doc; then + sh ./docs/check_pkgs || die "package check failed" + emake -C docs || die "compiling docs failed" + fi + + emake -C docs man-pages || die "make man-pages failed" +} + +src_install() { + local myopt="XEN_PYTHON_NATIVE_INSTALL=1" + + make DESTDIR="${D}" ${myopt} install-tools \ + || die "install failed" + + # Remove RedHat-specific stuff + rm -rf "${D}"/etc/sysconfig + + if use doc; then + make DESTDIR="${D}" -C docs install || die "install docs failed" + # Rename doc/xen to the Gentoo-style doc/xen-x.y + mv "${D}"/usr/share/doc/{${PN},${PF}} + fi + + doman docs/man?/* + + newinitd "${FILESDIR}"/xend.initd xend \ + || die "Couldn't install xen.initd" + newconfd "${FILESDIR}"/xendomains.confd xendomains \ + || die "Couldn't install xendomains.confd" + newinitd "${FILESDIR}"/xendomains.initd xendomains \ + || die "Couldn't install xendomains.initd" + + if use screen; then + cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains + cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ + keepdir /var/log/xen-consoles + fi + + # xend expects these to exist + keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen +} + +pkg_postinst() { + elog "Please visit the Xen and Gentoo wiki:" + elog "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo" + + if ! built_with_use 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 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 +} |