summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Buchholz <rbu@gentoo.org>2008-09-01 00:41:08 +0000
committerRobert Buchholz <rbu@gentoo.org>2008-09-01 00:41:08 +0000
commit911c09e1b171a6adcb04dabf3d6761fd78aa2408 (patch)
treef87b6e60f1283ca4934090541b2b6f3daa7615bb /app-emulation
parent Version bump to Xen 3.3 (bug #201792). (diff)
downloadgentoo-2-911c09e1b171a6adcb04dabf3d6761fd78aa2408.tar.gz
gentoo-2-911c09e1b171a6adcb04dabf3d6761fd78aa2408.tar.bz2
gentoo-2-911c09e1b171a6adcb04dabf3d6761fd78aa2408.zip
Version bump to Xen 3.3 (bug #201792). Fixes bugs:
* Add USE flags for ACM and FLASK Xen Security Modules * Properly compile and uninstall python bytecode * RDEPEND on pyxml (bug #201255) * Remove libvncserver dependency * Shutdown xendomains in reverse start order (bug #210445) * Allow for parallel shutdown of xendomains (bug #162833) * Check that python is built with threading (bug #236092) (Portage version: 2.2_rc8/cvs/Linux 2.6.27-rc4-git1 x86_64)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/xen-tools/ChangeLog19
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.3.0--as-needed.patch30
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch26
-rw-r--r--app-emulation/xen-tools/files/xen-tools-3.3.0-xen-detect-nopie-fix.patch12
-rw-r--r--app-emulation/xen-tools/files/xendomains.confd4
-rwxr-xr-xapp-emulation/xen-tools/files/xendomains.initd20
-rw-r--r--app-emulation/xen-tools/metadata.xml5
-rw-r--r--app-emulation/xen-tools/xen-tools-3.3.0.ebuild (renamed from app-emulation/xen-tools/xen-tools-3.2.0.ebuild)80
8 files changed, 167 insertions, 29 deletions
diff --git a/app-emulation/xen-tools/ChangeLog b/app-emulation/xen-tools/ChangeLog
index c14d27c6f9d2..85ac30204f9a 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-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.39 2008/07/30 01:03:09 rbu Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.40 2008/09/01 00:41:07 rbu Exp $
+
+*xen-tools-3.3.0 (01 Sep 2008)
+
+ 01 Sep 2008; Robert Buchholz <rbu@gentoo.org>
+ +files/xen-tools-3.3.0--as-needed.patch,
+ +files/xen-tools-3.3.0-nostrip.patch,
+ +files/xen-tools-3.3.0-xen-detect-nopie-fix.patch, files/xendomains.confd,
+ files/xendomains.initd, metadata.xml, -xen-tools-3.2.0.ebuild,
+ +xen-tools-3.3.0.ebuild:
+ Version bump to Xen 3.3 (bug #201792). Fixes bugs:
+ * Add USE flags for ACM and FLASK Xen Security Modules
+ * Properly compile and uninstall python bytecode
+ * RDEPEND on pyxml (bug #201255)
+ * Remove libvncserver dependency
+ * Shutdown xendomains in reverse start order (bug #210445)
+ * Allow for parallel shutdown of xendomains (bug #162833)
+ * Check that python is built with threading (bug #236092)
30 Jul 2008; Robert Buchholz <rbu@gentoo.org> xen-tools-3.2.1.ebuild:
Set VARTEXFONTS so LaTeX does not try to write out of the sandbox (bug #233120)
diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.0--as-needed.patch b/app-emulation/xen-tools/files/xen-tools-3.3.0--as-needed.patch
new file mode 100644
index 000000000000..f320bd33d7ec
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.3.0--as-needed.patch
@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Keir Fraser <keir.fraser@citrix.com>
+# Date 1219920254 -3600
+# Node ID e92dedc72471c02c8d6b05b74afed0d32ae86171
+# Parent 18a18a7dec2b6ad8eabb3281a1535e8bec05d8d5
+tools/xenmon/Makefile: Move LDFLAGS after $<
+
+gcc expects libraries needed for object files to be specified after
+the object. Linking usually does not fail, unless it is optimized (for
+instance, using -Wl,-as-needed).
+
+The related Gentoo bug is 135145 [ https://bugs.gentoo.org/135145 ].
+
+From: Robert Buchholz <rbu@gentoo.org>
+Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
+xen-unstable changeset: 18386:ab8212bd5604f58635e2b8bc6ffec6eddd211cf9
+xen-unstable date: Wed Aug 27 15:02:38 2008 +0100
+
+--- a/tools/xenmon/Makefile Thu Aug 28 11:43:40 2008 +0100
++++ b/tools/xenmon/Makefile Thu Aug 28 11:44:14 2008 +0100
+@@ -42,6 +42,6 @@ clean:
+
+
+ %: %.c Makefile
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
+ xentrace_%: %.c Makefile
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
+
diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch b/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch
new file mode 100644
index 000000000000..48e7cd5778bc
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch
@@ -0,0 +1,26 @@
+Index: xen-3.3.0/tools/ioemu-qemu-xen/Makefile
+===================================================================
+--- xen-3.3.0.orig/tools/ioemu-qemu-xen/Makefile
++++ xen-3.3.0/tools/ioemu-qemu-xen/Makefile
+@@ -205,7 +205,7 @@ endif
+ install: all $(if $(BUILD_DOCS),install-doc)
+ mkdir -p "$(DESTDIR)$(bindir)"
+ ifneq ($(TOOLS),)
+- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
++ $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)"
+ endif
+ mkdir -p "$(DESTDIR)$(datadir)"
+ set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
+Index: xen-3.3.0/tools/ioemu-qemu-xen/Makefile.target
+===================================================================
+--- xen-3.3.0.orig/tools/ioemu-qemu-xen/Makefile.target
++++ xen-3.3.0/tools/ioemu-qemu-xen/Makefile.target
+@@ -707,7 +707,7 @@ clean:
+
+ install: all install-hook
+ ifneq ($(PROGS),)
+- $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
++ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+ endif
+
+ # Include automatically generated dependency files
diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.0-xen-detect-nopie-fix.patch b/app-emulation/xen-tools/files/xen-tools-3.3.0-xen-detect-nopie-fix.patch
new file mode 100644
index 000000000000..f1039d89fac5
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.3.0-xen-detect-nopie-fix.patch
@@ -0,0 +1,12 @@
+Index: xen-3.3.0/tools/misc/Makefile
+===================================================================
+--- xen-3.3.0.orig/tools/misc/Makefile
++++ xen-3.3.0/tools/misc/Makefile
+@@ -51,3 +51,7 @@ clean:
+
+ xenperf: %: %.o Makefile
+ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_libxenctrl)
++
++xen-detect: %: %.c Makefile
++ $(CC) $(CFLAGS) $(LDFLAGS) $(call cc-option,$(CC),-nopie,) -o $@ $<
++
diff --git a/app-emulation/xen-tools/files/xendomains.confd b/app-emulation/xen-tools/files/xendomains.confd
index f1d810d6ce4f..90c1f5256c62 100644
--- a/app-emulation/xen-tools/files/xendomains.confd
+++ b/app-emulation/xen-tools/files/xendomains.confd
@@ -2,6 +2,8 @@
# Directory of domains to boot. AUTODIR should contain one or more symlinks
# to domain config files in /etc/xen
-
AUTODIR=/etc/xen/auto
+# Send shutdown commands to all domains in parallel instead of waiting for
+# each to shutdown individually
+PARALLEL_SHUTDOWN=yes
diff --git a/app-emulation/xen-tools/files/xendomains.initd b/app-emulation/xen-tools/files/xendomains.initd
index 59db8f62b4b5..9d8a06392485 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.2 2007/05/02 04:10:04 marineam Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd,v 1.3 2008/09/01 00:41:08 rbu Exp $
opts="start stop status restart"
@@ -53,7 +53,7 @@ start() {
fi
fi
# Create all domains with config files in AUTODIR.
- for dom in $(ls "${AUTODIR}/"* 2>/dev/null); do
+ for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do
name=$(get_domname ${dom})
if ! is_running ${name} ; then
ebegin " Starting domain ${name}"
@@ -74,10 +74,22 @@ stop() {
einfo "Shutting down Xen domains from ${AUTODIR:=/etc/xen/auto}"
# Stop all domains with config files in AUTODIR.
- for dom in $(ls "${AUTODIR}/"* 2>/dev/null); do
+ DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)"
+
+ if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then
+ for dom in $DOMAINS ; do
+ name=$(get_domname ${dom})
+ if is_running ${name} ; then
+ ebegin " Asking domain ${name} to shutdown..."
+ xm shutdown ${name} >/dev/null
+ eend $?
+ fi
+ done
+ fi
+ for dom in $DOMAINS ; do
name=$(get_domname ${dom})
if is_running ${name} ; then
- ebegin " Stopping domain ${name}"
+ ebegin " Waiting for domain ${name} to shutdown"
xm shutdown --wait ${name} >/dev/null
eend $?
else
diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index deef4556a097..73fe00afe281 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -10,5 +10,10 @@
<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='xsm'>Enable the Xen Security Modules (XSM)</flag>
+ <flag name='acm'>Enable the ACM/sHype XSM module from IBM</flag>
+ <flag name='flask'>Enable the Flask XSM module from NSA</flag>
+ <flag name='api'>Build the C libxenapi bindings</flag>
+<!-- <flag name='vtpm'>Enable TPM emulation</flag> -->
</use>
</pkgmetadata>
diff --git a/app-emulation/xen-tools/xen-tools-3.2.0.ebuild b/app-emulation/xen-tools/xen-tools-3.3.0.ebuild
index 99c509a0f564..325bf5da6552 100644
--- a/app-emulation/xen-tools/xen-tools-3.2.0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-3.3.0.ebuild
@@ -1,41 +1,48 @@
# Copyright 1999-2008 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.2.0.ebuild,v 1.1 2008/02/08 22:17:46 marineam Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.3.0.ebuild,v 1.1 2008/09/01 00:41:07 rbu Exp $
-inherit flag-o-matic eutils multilib
+inherit flag-o-matic eutils multilib python
+
+# TPMEMUFILE=tpm_emulator-0.4.tar.gz
DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://www.xensource.com/xen/xen/"
-SRC_URI="mirror://gentoo/xen-${PV}.tar.bz2"
+HOMEPAGE="http://xen.org/"
+SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
+# vtpm? ( mirror://berlios/tpm-emulator/${TPMEMUFILE} )"
S="${WORKDIR}/xen-${PV}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="doc debug screen custom-cflags pygrub hvm"
+IUSE="doc debug screen custom-cflags pygrub hvm api acm flask"
CDEPEND="dev-lang/python
sys-libs/zlib
- hvm? ( media-libs/libsdl )"
+ hvm? ( media-libs/libsdl )
+ acm? ( dev-libs/libxml2 )
+ api? ( dev-libs/libxml2 net-misc/curl )"
+# vtpm? ( dev-libs/gmp dev-libs/openssl )
DEPEND="${CDEPEND}
sys-devel/gcc
dev-lang/perl
app-misc/pax-utils
doc? (
+ app-doc/doxygen
dev-tex/latex2html
media-gfx/transfig
media-gfx/graphviz
)
hvm? (
x11-proto/xproto
- net-libs/libvncserver
sys-devel/dev86
)"
RDEPEND="${CDEPEND}
sys-apps/iproute2
net-misc/bridge-utils
+ dev-python/pyxml
screen? (
app-misc/screen
app-admin/logrotate
@@ -47,8 +54,12 @@ 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"
+QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
+ usr/share/xen/qemu/openbios-sparc64"
pkg_setup() {
+ export "CONFIG_LOMOUNT=y"
+
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"
@@ -80,11 +91,23 @@ pkg_setup() {
eerror "'ncurses' to your use flags and re-emerge python"
die "python is missing ncurses flags"
fi
+
+ if ! built_with_use dev-lang/python threads; then
+ eerror "Python is required to be built with threading support. Please add"
+ eerror "'threads' to your use flags and re-emerge python"
+ die "python is missing threads flags"
+ fi
+
+# use vtpm && export "VTPM_TOOLS=y"
+ use api && export "LIBXENAPI_BINDINGS=y"
+ use acm && export "ACM_SECURITY=y"
+ use flask && export "FLASK_ENABLE=y"
}
src_unpack() {
unpack ${A}
cd "${S}"
+# use vtpm && cp "${DISTDIR}"/${TPMEMUFILE} tools/vtpm
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
@@ -107,21 +130,25 @@ src_unpack() {
fi
if ! use pygrub; then
- sed -i -e "/^SUBDIRS-y += pygrub$/d" "${S}"/tools/Makefile
+ sed -i -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' "${S}"/tools/Makefile
fi
# Allow --as-needed LDFLAGS
- epatch "${FILESDIR}/${PN}-3.0.4_p1--as-needed.patch"
+ epatch "${FILESDIR}/${P}--as-needed.patch"
# Fix network broadcast on bridged networks
epatch "${FILESDIR}/${PN}-3.1.3-network-bridge-broadcast.patch"
# Fix building small dumb utility called 'xen-detect' on hardened
- epatch "${FILESDIR}/${PN}-3.1.0-xen-detect-nopie-fix.patch"
+ epatch "${FILESDIR}/${P}-xen-detect-nopie-fix.patch"
+
+ # Do not strip binaries
+ epatch "${FILESDIR}/"${P}-nostrip.patch
}
src_compile() {
- local myopt myconf
+ export VARTEXFONTS="${T}/fonts"
+ local myopt
use debug && myopt="${myopt} debug=y"
use custom-cflags || unset CFLAGS
@@ -129,35 +156,36 @@ src_compile() {
append-flags -fno-strict-overflow
fi
- if use hvm; 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"
+ emake docs || die "compiling docs failed"
+ emake dev-docs || die "make dev-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}" -C tools ${myopt} install \
+ make DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools \
|| die "install failed"
# Remove RedHat-specific stuff
rm -rf "${D}"/etc/sysconfig
+ dodoc README docs/README.xen-bugtool docs/ChangeLog
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}}
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs \
+ || die "install docs failed"
+
+ dohtml -r docs/api/
+ docinto pdf
+ dodoc docs/api/tools/python/latex/refman.pdf
+
+ [ -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?/*
@@ -219,4 +247,10 @@ 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
+}
+
+pkg_postrm() {
+ python_mod_cleanup
}