diff options
-rw-r--r-- | app-emulation/xen-tools/ChangeLog | 12 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/digest-xen-tools-3.0.2-r3 | 3 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/xen-consoles.logrotate | 5 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/xendomains-screen.confd | 15 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/xendomains.confd | 7 | ||||
-rwxr-xr-x | app-emulation/xen-tools/files/xendomains.initd | 96 | ||||
-rw-r--r-- | app-emulation/xen-tools/metadata.xml | 18 | ||||
-rw-r--r-- | app-emulation/xen-tools/xen-tools-3.0.2-r2.ebuild | 15 | ||||
-rw-r--r-- | app-emulation/xen-tools/xen-tools-3.0.2-r3.ebuild | 190 |
9 files changed, 335 insertions, 26 deletions
diff --git a/app-emulation/xen-tools/ChangeLog b/app-emulation/xen-tools/ChangeLog index b8929c8cc98a..6cd6a911ebfc 100644 --- a/app-emulation/xen-tools/ChangeLog +++ b/app-emulation/xen-tools/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for app-emulation/xen-tools # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.16 2006/08/10 21:29:01 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.17 2006/08/14 07:11:47 aross Exp $ + +*xen-tools-3.0.2-r3 (15 Aug 2006) + + 15 Aug 2006; Andrew Ross <aross@gentoo.org> +files/xen-consoles.logrotate, + -files/xend-conf, +files/xendomains.confd, +files/xendomains.initd, + +files/xendomains-screen.confd, metadata.xml, -xen-tools-3.0.2-r1.ebuild, + xen-tools-3.0.2-r2.ebuild, +xen-tools-3.0.2-r3.ebuild: + Fix bugs #141981, #142011, #141866, and #137886. Thanks to Brad Plant + <bplant@westnet.com.au>, Nedd Ludd <solar@gentoo.org>, Nick Devito + <nick125@gmail.com>, and Mike Williams <mike@gaima.co.uk>. 10 Aug 2006; Sven Wegener <swegener@gentoo.org> +files/xen-tools-3.0.2-bxclobber.patch, diff --git a/app-emulation/xen-tools/files/digest-xen-tools-3.0.2-r3 b/app-emulation/xen-tools/files/digest-xen-tools-3.0.2-r3 new file mode 100644 index 000000000000..724d092d5489 --- /dev/null +++ b/app-emulation/xen-tools/files/digest-xen-tools-3.0.2-r3 @@ -0,0 +1,3 @@ +MD5 544eab940a0734a55459d648e5c3b224 xen-3.0.2-src.tgz 4933621 +RMD160 34e4431a981891319f8a5ea0c3f604e7d8d7d7af xen-3.0.2-src.tgz 4933621 +SHA256 f18ffab16a457fa721d11933c75f8288f6958c88c2669857c7c11d5107ba2951 xen-3.0.2-src.tgz 4933621 diff --git a/app-emulation/xen-tools/files/xen-consoles.logrotate b/app-emulation/xen-tools/files/xen-consoles.logrotate new file mode 100644 index 000000000000..c6445239b42f --- /dev/null +++ b/app-emulation/xen-tools/files/xen-consoles.logrotate @@ -0,0 +1,5 @@ +/var/log/xen-consoles/*.log { + rotate 7 + missingok + compress +} diff --git a/app-emulation/xen-tools/files/xendomains-screen.confd b/app-emulation/xen-tools/files/xendomains-screen.confd new file mode 100644 index 000000000000..1482c0a25041 --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains-screen.confd @@ -0,0 +1,15 @@ +# When SCREEN="yes", domains in AUTODIR have their consoles connected to a +# screen session named SCREEN_NAME, with output logged to individual files +# named after each domain and written to /var/log/xen-consoles/ . These files +# are rotated (using app-admin/logrotate) every time xendomains is started. + +SCREEN="yes" +SCREEN_NAME="xen" + +# Number of seconds between writes to screen's logfiles. +# +# Lower values mean more disk activity and hence a possible performance +# impact, but higher values mean a greater chance of loosing some output +# in the event of a crash. + +SCREEN_LOG_INTERVAL="1" diff --git a/app-emulation/xen-tools/files/xendomains.confd b/app-emulation/xen-tools/files/xendomains.confd new file mode 100644 index 000000000000..f1d810d6ce4f --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains.confd @@ -0,0 +1,7 @@ +# /etc/conf.d/xendomains + +# Directory of domains to boot. AUTODIR should contain one or more symlinks +# to domain config files in /etc/xen + +AUTODIR=/etc/xen/auto + diff --git a/app-emulation/xen-tools/files/xendomains.initd b/app-emulation/xen-tools/files/xendomains.initd new file mode 100755 index 000000000000..15a263a3e9ff --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains.initd @@ -0,0 +1,96 @@ +#!/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 $ + +opts="start stop status restart" + +depend() { + need xend + after dhcp +} + +get_domname() { + local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alpha:]_]+)\"?\W*;?/\1/p' "${1}" | tail -n 1) + + if [[ -z ${name_from_file} ]] ; then + basename "${1}" + else + echo ${name_from_file} + fi +} + +is_running() { + /usr/sbin/xm list "${1}" >/dev/null 2>&1 +} + +using_screen() { + [[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]] +} + +set_screen_cmd() { + screen_cmd="screen -q -r ${SCREEN_NAME:=xen} -X" +} + +start() { + set_screen_cmd + + einfo "Starting Xen domains from ${AUTODIR:=/etc/xen/auto}" + if using_screen ; then + ebegin "Creating screen session to hold domain consoles" + ( screen -d -m -S ${SCREEN_NAME} -t dom0 \ + && ${screen_cmd} zombie dr \ + && logrotate -f /etc/xen/xen-consoles.logrotate \ + && ${screen_cmd} logfile /var/log/xen-consoles/%t.log \ + && ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \ + && ${screen_cmd} log on \ + && ${screen_cmd} deflog on ) >/dev/null + if [[ $? -ne 0 ]] ; then + eend 1 + return 1 + else + eend + fi + fi + # Create all domains with config files in AUTODIR. + for dom in $(ls "${AUTODIR}/"* 2>/dev/null); do + name=$(get_domname ${dom}) + if ! is_running ${name} ; then + ebegin " Starting domain ${name}" + if using_screen ; then + ${screen_cmd} screen -t ${name} xm create ${dom} -c + else + xm create --quiet ${dom} + fi + eend $? + else + einfo " Not starting domain ${name} - already running" + fi + done +} + +stop() { + set_screen_cmd + + einfo "Shutting down Xen domains from ${AUTODIR:=/etc/xen/auto}" + # Stop all domains with config files in AUTODIR. + for dom in $(ls "${AUTODIR}/"* 2>/dev/null); do + name=$(get_domname ${dom}) + if is_running ${name} ; then + ebegin " Stopping domain ${name}" + xm shutdown --wait ${name} >/dev/null + eend $? + else + einfo " Not stopping domain ${name} - not running" + fi + done + if using_screen ; then + ebegin "Closing screen session ${SCREEN_NAME}" + ${screen_cmd} quit + eend $? + fi +} + +status() { + /usr/sbin/xm list +} diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml index be674b7e1ac6..cc9d568a3360 100644 --- a/app-emulation/xen-tools/metadata.xml +++ b/app-emulation/xen-tools/metadata.xml @@ -1,21 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>no-herd</herd> -<maintainer> - <email>chrb@gentoo.org</email> - <name>Chris Bainbridge</name> -</maintainer> -<maintainer> - <email>agriffis@gentoo.org</email> - <name>Aron Griffis</name> -</maintainer> -<maintainer> - <email>aross@gentoo.org</email> - <name>Andrew Ross</name> -</maintainer> -<maintainer> - <email>swegener@gentoo.org</email> - <name>Sven Wegener</name> -</maintainer> +<herd>xen</herd> </pkgmetadata> diff --git a/app-emulation/xen-tools/xen-tools-3.0.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-3.0.2-r2.ebuild index c66b82c52f9c..48b758448161 100644 --- a/app-emulation/xen-tools/xen-tools-3.0.2-r2.ebuild +++ b/app-emulation/xen-tools/xen-tools-3.0.2-r2.ebuild @@ -1,6 +1,6 @@ # 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/xen-tools-3.0.2-r2.ebuild,v 1.4 2006/08/10 21:29:01 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.0.2-r2.ebuild,v 1.5 2006/08/14 07:11:47 aross Exp $ inherit mount-boot flag-o-matic distutils eutils multilib @@ -123,7 +123,7 @@ src_compile() { src_install() { local myopt="XEN_PYTHON_NATIVE_INSTALL=1" - make DESTDIR=${D} ${myopt} install-tools \ + make DESTDIR="${D}" ${myopt} install-tools \ || die "install failed" if use doc; then @@ -135,7 +135,6 @@ src_install() { doman docs/man?/* newinitd "${FILESDIR}"/xend-init xend - newconfd "${FILESDIR}"/xend-conf xend newconfd "${FILESDIR}"/xendomains-conf xendomains newinitd "${FILESDIR}"/xendomains-init xendomains @@ -153,8 +152,8 @@ src_install() { } pkg_postinst() { - einfo "Please visit the Xen and Gentoo wiki:" - einfo "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo" + 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 @@ -164,8 +163,8 @@ pkg_postinst() { if [[ -n ${XEN_UNSTABLE} ]]; then echo - einfo "This is a snapshot of the xen-unstable tree." - einfo "Please report bugs in xen itself (and not the packaging) to" - einfo "bugzilla.xensource.com" + elog "This is a snapshot of the xen-unstable tree." + elog "Please report bugs in xen itself (and not the packaging) to" + elog "bugzilla.xensource.com" fi } diff --git a/app-emulation/xen-tools/xen-tools-3.0.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-3.0.2-r3.ebuild new file mode 100644 index 000000000000..3457ddd72af1 --- /dev/null +++ b/app-emulation/xen-tools/xen-tools-3.0.2-r3.ebuild @@ -0,0 +1,190 @@ +# 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/xen-tools-3.0.2-r3.ebuild,v 1.1 2006/08/14 07:11:47 aross Exp $ + +inherit mount-boot flag-o-matic distutils eutils multilib + +DESCRIPTION="Xend daemon and tools" +HOMEPAGE="http://xen.sourceforge.net" +if [[ ${PV} == *_p* ]]; then + XEN_UNSTABLE="xen-unstable-${PV#*_p}" + SRC_URI="mirror://gentoo/${XEN_UNSTABLE}.tar.bz2" + S="${WORKDIR}/${XEN_UNSTABLE}" +else + SRC_URI="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-${PV}-src.tgz" + S="${WORKDIR}/xen-${PV}" +fi + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc debug screen custom-cflags hardened vnc sdl" + +CDEPEND="dev-lang/python + sys-libs/zlib + sdl? ( media-libs/libsdl ) + vnc? ( media-libs/libsdl )" + +DEPEND="${CDEPEND} + sys-devel/gcc + dev-lang/perl + app-misc/pax-utils + doc? ( + dev-tex/latex2html + media-gfx/transfig + ) + vnc? ( net-libs/libvncserver )" + +RDEPEND="${CDEPEND} + >=app-emulation/xen-3.0.2 + sys-apps/iproute2 + net-misc/bridge-utils + screen? ( + app-misc/screen + app-admin/logrotate + ) + || ( sys-fs/udev sys-apps/hotplug )" + +PYTHON_MODNAME="xen grub" + +pkg_setup() { + if use vnc && ! use sdl ; then + ewarn "You have the 'vnc' USE flag set, but not 'sdl'." + ewarn "VNC functionality requires SDL support, so it" + ewarn "will be enabled anyway." + fi + + if [[ "$(scanelf -s __guard -q `which python`)" ]] ; then + eerror "xend doesn't work when python is built with stack smashing protection (ssp)." + eerror "Please append the following to your CFLAGS and remerge python:" + eerror " '-fno-stack-protector -fno-stack-protector-all'" + die "python was built with stack smashing protection (ssp)" + 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 + # for some reason the xen gcc checks don't work on gentoo-hardened + if use hardened; then + HARDFLAGS="-nopie -fno-stack-protector -fno-stack-protector-all" + sed -e "s/CFLAGS :=/CFLAGS := ${HARDFLAGS}/" \ + -i "${S}"/tools/firmware/hvmloader/Makefile \ + "${S}"/tools/firmware/vmxassist/Makefile + fi + + # Disable the 32bit-only vmxassist, if we are not on x86 and we don't support the x86 ABI + if ! use x86 && ! has x86 $(get_all_abis); then + sed -i -e "/SUBDIRS += vmxassist/d" "${S}"tools/firmware/Makefile + fi + + # Fixes for hardened and amd64 + epatch "${FILESDIR}"/${P}-bxclobber.patch + epatch "${FILESDIR}"/${P}-pushpop.patch + + # Allow --as-needed LDFLAGS + epatch "${FILESDIR}/${P}"--as-needed.patch + + # Fix upstream's broken test cases (bug #141233) + epatch "${FILESDIR}/${P}"-test-uuid.patch + epatch "${FILESDIR}/${P}"-test-xauthority.patch +} + +src_compile() { + local myopt myconf + use debug && myopt="${myopt} debug=y" + + myconf="${myconf} $(use_enable vnc)" + if use vnc ; then + myconf="${myconf} --enable-sdl" + else + myconf="${myconf} $(use_enable sdl)" + fi + + use custom-cflags || unset CFLAGS + gcc-specs-ssp && append-flags -fno-stack-protector -fno-stack-protector-all + + (cd tools/ioemu && econf ${myconf}) || die "configure failured" + 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-init xend + newconfd "${FILESDIR}"/xendomains.confd xendomains + newinitd "${FILESDIR}"/xendomains.initd xendomains + + 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 + + + # for upstream change tracking + if [[ -n ${XEN_UNSTABLE} ]]; then + dodoc "${S}"/XEN-VERSION + fi +} + +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 + + if [[ -n ${XEN_UNSTABLE} ]]; then + echo + elog "This is a snapshot of the xen-unstable tree." + elog "Please report bugs in xen itself (and not the packaging) to" + elog "bugzilla.xensource.com" + fi +} |