New package. Thanks to the many who contributed in bug #70161.
authorChris Bainbridge <chrb@gentoo.org>
Wed, 7 Sep 2005 18:18:59 +0000 (18:18 +0000)
committerChris Bainbridge <chrb@gentoo.org>
Wed, 7 Sep 2005 18:18:59 +0000 (18:18 +0000)
Package-Manager: portage-2.0.51.22-r2

app-emulation/xen/ChangeLog [new file with mode: 0644]
app-emulation/xen/Manifest [new file with mode: 0644]
app-emulation/xen/files/digest-xen-2.0.7 [new file with mode: 0644]
app-emulation/xen/files/digest-xen-3.0.0_pre20050906 [new file with mode: 0644]
app-emulation/xen/files/xend-conf [new file with mode: 0644]
app-emulation/xen/files/xend-init [new file with mode: 0644]
app-emulation/xen/files/xendomains-conf [new file with mode: 0644]
app-emulation/xen/files/xendomains-init [new file with mode: 0644]
app-emulation/xen/metadata.xml [new file with mode: 0644]
app-emulation/xen/xen-2.0.7.ebuild [new file with mode: 0644]
app-emulation/xen/xen-3.0.0_pre20050906.ebuild [new file with mode: 0644]

diff --git a/app-emulation/xen/ChangeLog b/app-emulation/xen/ChangeLog
new file mode 100644 (file)
index 0000000..cef734c
--- /dev/null
@@ -0,0 +1,12 @@
+# ChangeLog for app-emulation/xen
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/ChangeLog,v 1.1 2005/09/07 18:18:59 chrb Exp $
+
+*xen-3.0.0_pre20050906 (07 Sep 2005)
+*xen-2.0.7 (07 Sep 2005)
+
+  07 Sep 2005; Chris Bainbridge <chrb@gentoo.org> +files/xend-conf,
+  +files/xend-init, +files/xendomains-conf, +files/xendomains-init,
+  +metadata.xml, +xen-2.0.7.ebuild, +xen-3.0.0_pre20050906.ebuild:
+  New package. Thanks to the many who contributed in bug #70161.
+
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
new file mode 100644 (file)
index 0000000..482295d
--- /dev/null
@@ -0,0 +1,10 @@
+MD5 625c815b939fd0fdcd0d12f651f1a414 ChangeLog 537
+MD5 23ec60d5040f966fda250a47d8903428 metadata.xml 252
+MD5 47fae8b2b4578e6e44f73da16de526af xen-2.0.7.ebuild 2690
+MD5 6bdec80c76754e7f3a07642ac527bcd0 xen-3.0.0_pre20050906.ebuild 2608
+MD5 16d372298e94a8eef72c1943b1ed5561 files/xend-conf 347
+MD5 8fdc16ee0ddc5db42c85e4a3b7484135 files/xend-init 746
+MD5 9f441f0eaec0c4a04af82df233dadbe0 files/xendomains-conf 22
+MD5 5caa93c9ec5394b7ae89a3bb0c038d6b files/xendomains-init 1221
+MD5 1d06bd45f1c44612f4ab57e8d7c303ac files/digest-xen-3.0.0_pre20050906 75
+MD5 2ff6998aedcb9592a6e6e4d6255f3bbe files/digest-xen-2.0.7 63
diff --git a/app-emulation/xen/files/digest-xen-2.0.7 b/app-emulation/xen/files/digest-xen-2.0.7
new file mode 100644 (file)
index 0000000..b81bef8
--- /dev/null
@@ -0,0 +1 @@
+MD5 dcef63c4d88786d70f418bb361e500c1 xen-2.0.7-src.tgz 1996929
diff --git a/app-emulation/xen/files/digest-xen-3.0.0_pre20050906 b/app-emulation/xen/files/digest-xen-3.0.0_pre20050906
new file mode 100644 (file)
index 0000000..62c9321
--- /dev/null
@@ -0,0 +1 @@
+MD5 275268323779cf0a918393272bf84cb0 xen-unstable-20050906.tar.bz2 3413981
diff --git a/app-emulation/xen/files/xend-conf b/app-emulation/xen/files/xend-conf
new file mode 100644 (file)
index 0000000..e82a727
--- /dev/null
@@ -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/files/xend-conf,v 1.1 2005/09/07 18:18:59 chrb 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/files/xend-init b/app-emulation/xen/files/xend-init
new file mode 100644 (file)
index 0000000..350672b
--- /dev/null
@@ -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/files/xend-init,v 1.1 2005/09/07 18:18:59 chrb Exp $
+
+opts="start stop status restart"
+
+depend() {
+       need net
+       before xendomain
+}
+
+await_daemons_up() {
+       for ((i=0; i<5; i++)); do
+               sleep 1
+               xend status && return 0
+       done
+       return 1
+}
+
+start() {
+       ebegin "Starting Xen control daemon"
+       xend start
+       xend status || await_daemons_up
+       eend $?
+}
+
+stop() {
+       if [ "$(xm list | wc -l)" -gt 2 ]; then
+               ebegin "  Stopping all domain"
+               xm shutdown --all --halt --wait >/dev/null
+               eend $?
+       fi
+
+       ebegin "Stopping Xen control daemon"
+       xend stop
+       eend $?
+}
+
+status() {
+       xend status
+}
diff --git a/app-emulation/xen/files/xendomains-conf b/app-emulation/xen/files/xendomains-conf
new file mode 100644 (file)
index 0000000..e22906b
--- /dev/null
@@ -0,0 +1 @@
+AUTODIR=/etc/xen/auto
diff --git a/app-emulation/xen/files/xendomains-init b/app-emulation/xen/files/xendomains-init
new file mode 100644 (file)
index 0000000..b525884
--- /dev/null
@@ -0,0 +1,52 @@
+#!/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/files/xendomains-init,v 1.1 2005/09/07 18:18:59 chrb Exp $
+
+opts="start stop status restart"
+
+depend() {
+       need xend
+}
+
+get_domname() {
+       sed -ne 's/^[ \t]*name[ \t]*=[ \t]*"\([^"]*\)"/\1/p' $1
+}
+
+is_running() {
+       [ -n "`xm list | grep "^${1} "`" ]
+}
+
+start() {
+       einfo "Starting ${AUTODIR} auto Xen domains"
+       # 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}"
+                       xm create --quiet --defconfig ${dom}
+                       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 --halt --wait ${name} >/dev/null
+                       eend $?
+               else
+                       einfo "  Not Stopping domain ${name} - not running"
+               fi
+       done
+}
+
+status() {
+       xm list
+}
diff --git a/app-emulation/xen/metadata.xml b/app-emulation/xen/metadata.xml
new file mode 100644 (file)
index 0000000..7095824
--- /dev/null
@@ -0,0 +1,9 @@
+<?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>
+</pkgmetadata>
diff --git a/app-emulation/xen/xen-2.0.7.ebuild b/app-emulation/xen/xen-2.0.7.ebuild
new file mode 100644 (file)
index 0000000..877432c
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-2.0.7.ebuild,v 1.1 2005/09/07 18:18:59 chrb Exp $
+
+inherit mount-boot
+
+DESCRIPTION="The Xen virtual machine monitor and Xend daemon"
+HOMEPAGE="http://xen.sourceforge.net"
+SRC_URI="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/${P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="doc debug"
+
+DEPEND="sys-apps/iproute2
+       net-misc/bridge-utils
+       dev-lang/python
+       =dev-python/twisted-1.3.0
+       net-misc/curl
+       sys-libs/zlib
+       doc? (
+               dev-tex/latex2html
+               media-gfx/transfig
+       )"
+
+S="${WORKDIR}/${PN}-2.0"
+
+src_compile() {
+       local myopt
+       if use debug; then
+               myopt="${myopt} debug=y"
+       fi
+
+       unset CFLAGS
+       emake ${myopt} -C xen || die "compiling xen failed"
+       emake ${myopt} -C tools || die "compiling tools failed"
+
+       if use doc; then
+               sh ./docs/check_pkgs || die "package check failed"
+               emake ${myopt} -C docs || die "compiling docs failed"
+       fi
+
+}
+
+src_install() {
+       make DESTDIR=${D} -C xen install || die "installing xen failed"
+
+       make DESTDIR=${D} XEN_PYTHON_NATIVE_INSTALL=1 -C tools install \
+           || die "installing tools failed"
+
+       if use doc; then
+               make DESTDIR=${D} -C docs install \
+                       || die "installing docs failed"
+               # Rename doc/xen to the Gentoo-style doc/xen-2.0
+               mv ${D}/usr/share/doc/{${PN},${PF}}
+       fi
+
+       # bind xend to localhost per default
+       sed -i -e "s/\((xend-address  *\)'')/\1\'localhost\')/" \
+               ${D}/etc/xen/xend-config.sxp
+
+       newinitd ${FILESDIR}/xend-init xend
+       newconfd ${FILESDIR}/xend-conf xend
+       newconfd ${FILESDIR}/xendomains-conf xendomains
+       newinitd ${FILESDIR}/xendomains-init xendomains
+
+       # install kernel specific source patches
+       dodir /usr/share/xen/patches
+       rm patches/linux-2.6.11/linux-2.6.11.12.patch
+       cd patches
+       for x in *; do tar -jcvf ${D}/usr/share/xen/patches/${x}.tar.bz2 ${x}/; done
+       cd ..
+
+       # we need to do whatever mkbuildtree would've done for each platform
+       # linux-2.6: copy public include files, and xenstored.h
+       mkdir linux-2.6-xen-sparse/include/asm-xen/xen-public
+       # include files for kernel
+       rm xen/include/public/COPYING
+       cp -dpPR xen/include/public/* linux-2.6-xen-sparse/include/asm-xen/xen-public
+       # fixme: insert code for other sparse trees here
+
+       # install xen kernel sparse trees
+       mv linux-2.6.11-xen-sparse linux-2.6-xen-sparse
+       mv linux-2.4.30-xen-sparse linux-2.4-xen-sparse
+       for x in *-xen-sparse; do
+           if [ -e ${x}/mkbuildtree ]; then rm ${x}/mkbuildtree; fi
+           tar -jcvf ${D}/usr/share/xen/${x}.tar.bz2 -C ${x} .
+       done
+
+}
+
+pkg_postinst() {
+       einfo "Please visit the Xen and Gentoo wiki:"
+       einfo "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
+}
diff --git a/app-emulation/xen/xen-3.0.0_pre20050906.ebuild b/app-emulation/xen/xen-3.0.0_pre20050906.ebuild
new file mode 100644 (file)
index 0000000..2196694
--- /dev/null
@@ -0,0 +1,94 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-3.0.0_pre20050906.ebuild,v 1.1 2005/09/07 18:18:59 chrb Exp $
+
+inherit mount-boot
+
+DESCRIPTION="The Xen virtual machine monitor and Xend daemon"
+HOMEPAGE="http://xen.sourceforge.net"
+DATE="20050906"
+SRC_URI="mirror://gentoo/xen-unstable-${DATE}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="doc debug"
+
+DEPEND="sys-apps/iproute2
+       net-misc/bridge-utils
+       dev-lang/python
+       net-misc/curl
+       sys-libs/zlib
+       doc? (
+               dev-tex/latex2html
+               media-gfx/transfig
+       )"
+
+S="${WORKDIR}/xen-unstable-${DATE}"
+
+src_compile() {
+       local myopt
+       if use debug; then
+               myopt="${myopt} debug=y"
+       fi
+
+       unset CFLAGS
+       make ${myopt} -C xen || die "compiling xen failed"
+       make ${myopt} -C tools || die "compiling tools failed"
+
+       if use doc; then
+               sh ./docs/check_pkgs || die "package check failed"
+               make ${myopt} -C docs || die "compiling docs failed"
+       fi
+
+}
+
+src_install() {
+       make DESTDIR=${D} -C xen install || die "installing xen failed"
+
+       make DESTDIR=${D} XEN_PYTHON_NATIVE_INSTALL=1 -C tools install \
+           || die "installing tools failed"
+
+       if use doc; then
+               make DESTDIR=${D} -C docs install \
+                       || die "installing docs failed"
+               # Rename doc/xen to the Gentoo-style doc/xen-x.y
+               mv ${D}/usr/share/doc/{${PN},${PF}}
+       fi
+
+       # bind xend to localhost per default
+       sed -i -e "s/\((xend-address  *\)'')/\1\'localhost\')/" \
+               ${D}/etc/xen/xend-config.sxp
+
+       newinitd ${FILESDIR}/xend-init xend
+       newconfd ${FILESDIR}/xend-conf xend
+       newconfd ${FILESDIR}/xendomains-conf xendomains
+       newinitd ${FILESDIR}/xendomains-init xendomains
+
+       # install kernel source patches
+       dodir /usr/share/xen/patches
+       rm patches/linux-2.6.12/patch-2.6.12.5
+       cd patches
+       for x in *; do tar -jcvf ${D}/usr/share/xen/patches/${x}.tar.bz2 ${x}/; done
+       cd ..
+
+       # we need to do whatever mkbuildtree would've done for each platform
+       # linux-2.6: copy public include files, and xenstored.h
+       mkdir linux-2.6-xen-sparse/include/asm-xen/xen-public
+       rm xen/include/public/COPYING
+       cp -dpPR xen/include/public/* linux-2.6-xen-sparse/include/asm-xen/xen-public
+       cp -dpP tools/xenstore/xenstored.h linux-2.6-xen-sparse/drivers/xen/xenbus
+       # fixme: insert code for other sparse trees here
+
+       # install xen kernel sparse trees
+       for x in *-xen-sparse; do
+           if [ -e ${x}/mkbuildtree ]; then rm ${x}/mkbuildtree; fi
+           tar -jcvf ${D}/usr/share/xen/${x}.tar.bz2 -C ${x} .
+       done
+
+}
+
+pkg_postinst() {
+       einfo "Please visit the Xen and Gentoo wiki:"
+       einfo "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
+}