diff options
author | Aron Griffis <agriffis@gentoo.org> | 2006-03-24 23:55:01 +0000 |
---|---|---|
committer | Aron Griffis <agriffis@gentoo.org> | 2006-03-24 23:55:01 +0000 |
commit | 3bf221fb5585d9978e340f4dd5bda8a6a81973a1 (patch) | |
tree | aa75586ccd8ae70105466d581f7d2160d0b34997 /app-emulation/xen-tools | |
parent | Mark 3.4.3 stable on ia64 (diff) | |
download | gentoo-2-3bf221fb5585d9978e340f4dd5bda8a6a81973a1.tar.gz gentoo-2-3bf221fb5585d9978e340f4dd5bda8a6a81973a1.tar.bz2 gentoo-2-3bf221fb5585d9978e340f4dd5bda8a6a81973a1.zip |
Split xen-tools from xen; this package installs xend and the tools, but not
the hypervisor or include files. Unify the release and snapshot ebuilds for
easier maintenance. Switch to a snapshot versioning scheme that keeps
release/snapshot versions in order. Add myself as an additional maintainer
in metadata.xml
(Portage version: 2.1_pre5-r4)
Diffstat (limited to 'app-emulation/xen-tools')
-rw-r--r-- | app-emulation/xen-tools/ChangeLog | 16 | ||||
-rw-r--r-- | app-emulation/xen-tools/Manifest | 27 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/digest-xen-tools-3.0.1 | 3 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/digest-xen-tools-3.0.1_p9029 | 3 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/xend-conf | 7 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/xend-init | 42 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/xendomains-conf | 6 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/xendomains-init | 68 | ||||
-rw-r--r-- | app-emulation/xen-tools/metadata.xml | 13 | ||||
-rw-r--r-- | app-emulation/xen-tools/xen-tools-3.0.1.ebuild | 117 | ||||
-rw-r--r-- | app-emulation/xen-tools/xen-tools-3.0.1_p9029.ebuild | 117 |
11 files changed, 419 insertions, 0 deletions
diff --git a/app-emulation/xen-tools/ChangeLog b/app-emulation/xen-tools/ChangeLog new file mode 100644 index 000000000000..09a5600ceace --- /dev/null +++ b/app-emulation/xen-tools/ChangeLog @@ -0,0 +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.1 2006/03/24 23:55:01 agriffis Exp $ + +*xen-tools-3.0.1_p9029 (24 Mar 2006) +*xen-tools-3.0.1 (24 Mar 2006) + + 24 Mar 2006; Aron Griffis <agriffis@gentoo.org> +files/xend-conf, + +files/xend-init, +files/xendomains-conf, +files/xendomains-init, + +metadata.xml, +xen-tools-3.0.1.ebuild, +xen-tools-3.0.1_p9029.ebuild: + Split xen-tools from xen; this package installs xend and the tools, but not + the hypervisor or include files. Unify the release and snapshot ebuilds for + easier maintenance. Switch to a snapshot versioning scheme that keeps + release/snapshot versions in order. Add myself as an additional maintainer + in metadata.xml + diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest new file mode 100644 index 000000000000..e4b485a6ca4c --- /dev/null +++ b/app-emulation/xen-tools/Manifest @@ -0,0 +1,27 @@ +MD5 f286994bc4b6be508d4a9e943b44794b files/digest-xen-tools-3.0.1 235 +RMD160 77a42023b130ceef29f79a0c28742a7e8731eadf files/digest-xen-tools-3.0.1 235 +SHA256 2bdbb205f6f9f9ed4a9a06093a63768214a9d14df48cf32e0f10c2cbfbfb8098 files/digest-xen-tools-3.0.1 235 +MD5 2ddf0133ffa840ddb0ff85770d2a8770 files/digest-xen-tools-3.0.1_p9029 259 +RMD160 79c9eaf49563f42eea950aea8597fa1cc309786e files/digest-xen-tools-3.0.1_p9029 259 +SHA256 a035a6a1cd2752da07db13617674322479f049833240b801f7ad828ddab38557 files/digest-xen-tools-3.0.1_p9029 259 +MD5 16d372298e94a8eef72c1943b1ed5561 files/xend-conf 347 +RMD160 8cc17df2b744342f728f933dea16f61295d52ad0 files/xend-conf 347 +SHA256 3a3f6c87fd4bda91ec944ec7d81e3240e3669f7a089280c5c27385b7062a37ae files/xend-conf 347 +MD5 b16cb40a29cb947b2a9b76cc8f9f3894 files/xend-init 844 +RMD160 9d95e22738333da4767c8aa5a53fd993ef79c977 files/xend-init 844 +SHA256 9f6c5f5e3ca65599cccf2058399a2723b1fdf1d58d572e93ba1303c9915ae6f3 files/xend-init 844 +MD5 11ef318e35fcfed12931f182fc01955a files/xendomains-conf 180 +RMD160 17f791a0369e9e1f1cbd15c7513a4ca14d3f5f18 files/xendomains-conf 180 +SHA256 78427be48c93ec744206df4dcafaedb584dee8a200efbbc54cba432d96cf0ca3 files/xendomains-conf 180 +MD5 a3c0c26c30ce1271b439661b68ca9e74 files/xendomains-init 1671 +RMD160 e2dbb7b4da5ff8be60532e5a393988f47f28c036 files/xendomains-init 1671 +SHA256 19aac7da0ba103ae800ed10b7d151912b3a9476edf63c3651073a197ea291e49 files/xendomains-init 1671 +MD5 23ec60d5040f966fda250a47d8903428 metadata.xml 252 +RMD160 b29f688b9ee017b00ff5a8a6a71edc39087c93ad metadata.xml 252 +SHA256 3482ccebd39bcc165316fdbcc79ad9f01922ce91798a7d83455e884e696ac658 metadata.xml 252 +MD5 cfdb93cab48ed0859743d84914e5f7c7 xen-tools-3.0.1.ebuild 3141 +RMD160 b8406b0ee71d58d43f6a619319f280f7ed051a1d xen-tools-3.0.1.ebuild 3141 +SHA256 eb56e2c18b55c98ab81946026a403324648d9e275ed00abf5892594ea473a1e8 xen-tools-3.0.1.ebuild 3141 +MD5 604a75675b6262912d4121e43a330962 xen-tools-3.0.1_p9029.ebuild 3140 +RMD160 3b738c5bfa793ec81e05b080fad5ace217003397 xen-tools-3.0.1_p9029.ebuild 3140 +SHA256 e4c58e9c20d60ece77b2d0fbf15e2419df8b1ddc37e9cf85a6a563b14ad0aa97 xen-tools-3.0.1_p9029.ebuild 3140 diff --git a/app-emulation/xen-tools/files/digest-xen-tools-3.0.1 b/app-emulation/xen-tools/files/digest-xen-tools-3.0.1 new file mode 100644 index 000000000000..c7c0c449d579 --- /dev/null +++ b/app-emulation/xen-tools/files/digest-xen-tools-3.0.1 @@ -0,0 +1,3 @@ +MD5 d30f17294957d8c0234f8a4ce6d68671 xen-3.0.1-src.tgz 4631469 +RMD160 f68960aed74b7ceae3f7b435af05c273263363ee xen-3.0.1-src.tgz 4631469 +SHA256 4ea553ea07c46ba5cf53c693472f988eb644d85e1b2ed7a9c49a392eeb2733ad xen-3.0.1-src.tgz 4631469 diff --git a/app-emulation/xen-tools/files/digest-xen-tools-3.0.1_p9029 b/app-emulation/xen-tools/files/digest-xen-tools-3.0.1_p9029 new file mode 100644 index 000000000000..8d1f70052bf1 --- /dev/null +++ b/app-emulation/xen-tools/files/digest-xen-tools-3.0.1_p9029 @@ -0,0 +1,3 @@ +MD5 d8183137f5cffdb1078c675c8b05369e xen-unstable-9029.tar.bz2 3450223 +RMD160 8face26212998bfe5965ddbab4ced697a0d5fc61 xen-unstable-9029.tar.bz2 3450223 +SHA256 1a1871deda3cfd91b07eaf4d6263083ce7615d3999b44a56e689e46f3075ea86 xen-unstable-9029.tar.bz2 3450223 diff --git a/app-emulation/xen-tools/files/xend-conf b/app-emulation/xen-tools/files/xend-conf new file mode 100644 index 000000000000..ad59105b2087 --- /dev/null +++ b/app-emulation/xen-tools/files/xend-conf @@ -0,0 +1,7 @@ +# 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-conf,v 1.1 2006/03/24 23:55:01 agriffis Exp $ + +# set to YES to enable the web frontend to xend on port 8080. +# To change the port, edit /usr/lib/python/xen/sv/params.py +XENSV="NO" diff --git a/app-emulation/xen-tools/files/xend-init b/app-emulation/xen-tools/files/xend-init new file mode 100644 index 000000000000..891ab66b9b4b --- /dev/null +++ b/app-emulation/xen-tools/files/xend-init @@ -0,0 +1,42 @@ +#!/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-init,v 1.1 2006/03/24 23:55:01 agriffis Exp $ + +opts="start stop status restart" + +depend() { + need net + before xendomains sshd 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 +} + +start() { + ebegin "Starting Xen control daemon" + /usr/sbin/xend start + /usr/sbin/xend status || await_daemons_up + eend $? +} + +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 $? +} + +status() { + /usr/sbin/xend status +} diff --git a/app-emulation/xen-tools/files/xendomains-conf b/app-emulation/xen-tools/files/xendomains-conf new file mode 100644 index 000000000000..bbc8ff6c3b0d --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains-conf @@ -0,0 +1,6 @@ +# Directory of domain configs to automatically boot +AUTODIR=/etc/xen/auto + +# set to yes to run all auto 'xm create's in screen +# with logging to /var/log/xen-consoles/ +SCREEN="no" diff --git a/app-emulation/xen-tools/files/xendomains-init b/app-emulation/xen-tools/files/xendomains-init new file mode 100644 index 000000000000..41f5dce08c9d --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains-init @@ -0,0 +1,68 @@ +#!/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/xendomains-init,v 1.1 2006/03/24 23:55:01 agriffis Exp $ + +opts="start stop status restart" + +depend() { + need xend + after dhcp +} + +get_domname() { + sed -ne 's/^[ \t]*name[ \t]*=[ \t]*"\([^"]*\)"/\1/p' $1 +} + +is_running() { + [ -n "`/usr/sbin/xm list | grep "^${1} "`" ] +} + +start() { + einfo "Starting ${AUTODIR} Xen domains" + if [[ ${SCREEN} == "yes" ]]; then + screen -d -m -S xen -t dom0 + screen -r xen -X zombie dr + logrotate -f /usr/share/xen/xen-consoles-logrotate + screen -r xen -X logfile /var/log/xen-consoles/%t + screen -r xen -X logfile flush 1 + screen -r xen -X deflog on + 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 [[ ${SCREEN} == "yes" ]]; then + screen -r xen -X screen -t ${name} xm create ${dom} -c + else + xm create --quiet ${dom} + fi + eend $? + else + einfo " Not Starting domain ${name} - allready running" + fi + done +} + +stop() { + einfo "Shutting down ${AUTODIR} Xen domains" + # 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 [[ ${SCREEN} == "yes" ]]; then + screen -r xen -X quit + fi +} + +status() { + /usr/sbin/xm list +} diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml new file mode 100644 index 000000000000..16aa7478b44c --- /dev/null +++ b/app-emulation/xen-tools/metadata.xml @@ -0,0 +1,13 @@ +<?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> +</pkgmetadata> diff --git a/app-emulation/xen-tools/xen-tools-3.0.1.ebuild b/app-emulation/xen-tools/xen-tools-3.0.1.ebuild new file mode 100644 index 000000000000..5c9592b77b01 --- /dev/null +++ b/app-emulation/xen-tools/xen-tools-3.0.1.ebuild @@ -0,0 +1,117 @@ +# 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.1.ebuild,v 1.1 2006/03/24 23:55:01 agriffis Exp $ + +inherit mount-boot flag-o-matic + +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 ~ia64 ~x86" +IUSE="doc debug screen custom-cflags" + +DEPEND="sys-devel/gcc + dev-lang/python" + +RDEPEND="!<app-emulation/xen-3.0.1-r5 + dev-lang/python + sys-apps/iproute2 + net-misc/bridge-utils + sys-libs/zlib + doc? ( + dev-tex/latex2html + media-gfx/transfig + ) + screen? ( + app-misc/screen + app-admin/logrotate + ) + || ( sys-fs/udev sys-apps/hotplug )" + +src_unpack() { + unpack ${A} + # 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 {} \; + # odd fixes + sed -e "s/int mode/int mode=-1/" -i ${S}/tools/misc/xc_shadow.c + fi +} + +src_compile() { + local myopt + use debug && myopt="${myopt} debug=y" + + if use custom-cflags; then + filter-flags -fPIE -fstack-protector + else + unset CFLAGS + fi + + emake -C tools ${myopt} || die "compile failed" + + if use doc; then + sh ./docs/check_pkgs || die "package check failed" + make -C docs ${myopt} || die "compiling docs failed" + fi +} + +src_install() { + local myopt="XEN_PYTHON_NATIVE_INSTALL=1" + + make DESTDIR=${D} ${myopt} install-tools \ + || die "install failed" + + 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 + + newinitd ${FILESDIR}/xend-init xend + newconfd ${FILESDIR}/xend-conf xend + newconfd ${FILESDIR}/xendomains-conf xendomains + newinitd ${FILESDIR}/xendomains-init xendomains + + if use screen; then + sed -i -e 's/SCREEN="no"/SCREEN="yes"/' ${D}/etc/init.d/xendomains + 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() { + einfo "Please visit the Xen and Gentoo wiki:" + einfo "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo" + + 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" + fi +} diff --git a/app-emulation/xen-tools/xen-tools-3.0.1_p9029.ebuild b/app-emulation/xen-tools/xen-tools-3.0.1_p9029.ebuild new file mode 100644 index 000000000000..cb41c9bd0339 --- /dev/null +++ b/app-emulation/xen-tools/xen-tools-3.0.1_p9029.ebuild @@ -0,0 +1,117 @@ +# 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.1_p9029.ebuild,v 1.1 2006/03/24 23:55:01 agriffis Exp $ + +inherit mount-boot flag-o-matic + +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 ~ia64 ~x86" +IUSE="doc debug screen custom-cflags" + +DEPEND="sys-devel/gcc + dev-lang/python" + +RDEPEND="!<app-emulation/xen-3.0.1-r5 + dev-lang/python + sys-apps/iproute2 + net-misc/bridge-utils + sys-libs/zlib + doc? ( + dev-tex/latex2html + media-gfx/transfig + ) + screen? ( + app-misc/screen + app-admin/logrotate + ) + || ( sys-fs/udev sys-apps/hotplug )" + +src_unpack() { + unpack ${A} + # 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 {} \; + # odd fixes + sed -e "s/int mode/int mode=-1/" -i ${S}/tools/misc/xc_shadow.c + fi +} + +src_compile() { + local myopt + use debug && myopt="${myopt} debug=y" + + if use custom-cflags; then + filter-flags -fPIE -fstack-protector + else + unset CFLAGS + fi + + emake -C tools ${myopt} || die "compile failed" + + if use doc; then + sh ./docs/check_pkgs || die "package check failed" + make -C docs ${myopt} || die "compiling docs failed" + fi +} + +src_install() { + local myopt="XEN_PYTHON_NATIVE_INSTALL=1" + + make DESTDIR=${D} ${myopt} install-tools \ + || die "install failed" + + 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 + + newinitd ${FILESDIR}/xend-init xend + newconfd ${FILESDIR}/xend-conf xend + newconfd ${FILESDIR}/xendomains-conf xendomains + newinitd ${FILESDIR}/xendomains-init xendomains + + if use screen; then + sed -i -e 's/SCREEN="no"/SCREEN="yes"/' ${D}/etc/init.d/xendomains + 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() { + einfo "Please visit the Xen and Gentoo wiki:" + einfo "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo" + + 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" + fi +} |