diff options
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/ganeti/ChangeLog | 12 | ||||
-rw-r--r-- | app-emulation/ganeti/files/ganeti-2.1.0_rc1-fix-brctl-path-for-gentoo.patch | 25 | ||||
-rw-r--r-- | app-emulation/ganeti/files/ganeti-2.1.initd | 89 | ||||
-rw-r--r-- | app-emulation/ganeti/ganeti-2.1.0_rc1.ebuild | 73 |
4 files changed, 198 insertions, 1 deletions
diff --git a/app-emulation/ganeti/ChangeLog b/app-emulation/ganeti/ChangeLog index 1ea1b79ffb7b..650c6059942e 100644 --- a/app-emulation/ganeti/ChangeLog +++ b/app-emulation/ganeti/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for app-emulation/ganeti # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/ChangeLog,v 1.11 2009/12/09 00:41:09 ramereth Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/ChangeLog,v 1.12 2009/12/17 00:47:24 ramereth Exp $ + +*ganeti-2.1.0_rc1 (17 Dec 2009) + + 17 Dec 2009; Lance Albertson <ramereth@gentoo.org> + +ganeti-2.1.0_rc1.ebuild, + +files/ganeti-2.1.0_rc1-fix-brctl-path-for-gentoo.patch, + +files/ganeti-2.1.initd: + Version bump + + - Added new init script based on upstream 09 Dec 2009; Lance Albertson <ramereth@gentoo.org> ganeti-2.0.3.ebuild, ganeti-2.0.4.ebuild: diff --git a/app-emulation/ganeti/files/ganeti-2.1.0_rc1-fix-brctl-path-for-gentoo.patch b/app-emulation/ganeti/files/ganeti-2.1.0_rc1-fix-brctl-path-for-gentoo.patch new file mode 100644 index 000000000000..b44ec57116e2 --- /dev/null +++ b/app-emulation/ganeti/files/ganeti-2.1.0_rc1-fix-brctl-path-for-gentoo.patch @@ -0,0 +1,25 @@ +From 4c41d9025ddbc5d093d58b81bf9b31d735a4a162 Mon Sep 17 00:00:00 2001 +From: Lance Albertson <lance@osuosl.org> +Date: Wed, 9 Dec 2009 00:42:53 -0800 +Subject: Fix brctl path for Gentoo + +--- + lib/hypervisor/hv_kvm.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py +index a153d36..5700034 100644 +--- a/lib/hypervisor/hv_kvm.py ++++ b/lib/hypervisor/hv_kvm.py +@@ -181,7 +181,7 @@ class KVMHypervisor(hv_base.BaseHypervisor): + script.write(" /sbin/ifconfig $INTERFACE 0.0.0.0 up\n") + if nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_BRIDGED: + script.write(" # Connect the interface to the bridge\n") +- script.write(" /usr/sbin/brctl addif $BRIDGE $INTERFACE\n") ++ script.write(" /sbin/brctl addif $BRIDGE $INTERFACE\n") + elif nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_ROUTED: + script.write(" # Route traffic targeted at the IP to the interface\n") + if nic.nicparams[constants.NIC_LINK]: +-- +1.6.2.5 + diff --git a/app-emulation/ganeti/files/ganeti-2.1.initd b/app-emulation/ganeti/files/ganeti-2.1.initd new file mode 100644 index 000000000000..743c5cdb9c81 --- /dev/null +++ b/app-emulation/ganeti/files/ganeti-2.1.initd @@ -0,0 +1,89 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/files/ganeti-2.1.initd,v 1.1 2009/12/17 00:47:16 ramereth Exp $ + +depend() { + need localmount drbd + after bootmisc +} + +NODED="ganeti-noded" +MASTERD="ganeti-masterd" +CONFD="ganeti-confd" +RAPI="ganeti-rapi" +DAEMON_UTIL="/usr/lib/ganeti/daemon-util" + +check_config() { + for fname in /var/lib/ganeti/server.pem + do + if [[ ! -f "$fname" ]] + then + eerror "Config file $fname not found, will not run." + return 1 + fi + done + + return 0 +} + +check_exitcode() { + RC=${1} + case ${RC} in + 0) + eend 0 + ;; + 11) + eend 0 "not master" + ;; + *) + eend 1 "exit code $RC" + ;; + esac +} + +start_action() { + # called as start_action daemon-name + local daemon="${1}" + ebegin "Starting ${daemon}" + ${DAEMON_UTIL} start "${@}" + check_exitcode ${?} +} + +stop_action() { + # called as stop_action daemon-name + local daemon="${1}" + ebegin "Stopping ${daemon}" + ${DAEMON_UTIL} stop "${@}" + check_exitcode ${?} +} + +maybe_do() { + requested="${1}"; shift + action="${1}"; shift + target="${1}" + if [ -z "${requested}" -o "${requested}" = "${target}" ] ; then + ${action} "${@}" + fi +} + +start_all() { + check_config + for i in ${NODED} ${MASTERD} ${CONFD} ${RAPI}; do \ + maybe_do "${1}" start_action ${i} + done +} + +stop_all() { + for i in ${RAPI} ${CONFD} ${MASTERD} ${NODED}; do \ + maybe_do "${1}" stop_action ${i} + done +} + +start() { + start_all +} + +stop() { + stop_all +} diff --git a/app-emulation/ganeti/ganeti-2.1.0_rc1.ebuild b/app-emulation/ganeti/ganeti-2.1.0_rc1.ebuild new file mode 100644 index 000000000000..8e654a887cb9 --- /dev/null +++ b/app-emulation/ganeti/ganeti-2.1.0_rc1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/ganeti-2.1.0_rc1.ebuild,v 1.1 2009/12/17 00:47:24 ramereth Exp $ + +EAPI=2 + +inherit eutils confutils bash-completion + +MY_PV="${PV/_rc/~rc}" +MY_P="${PN}-${MY_PV}" +DESCRIPTION="Ganeti is a virtual server management software tool" +HOMEPAGE="http://code.google.com/p/ganeti/" +SRC_URI="http://ganeti.googlecode.com/files/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="kvm xen drbd" + +S="${WORKDIR}/${MY_P}" + +DEPEND="xen? ( >=app-emulation/xen-3.0 ) + kvm? ( app-emulation/qemu-kvm ) + drbd? ( >=sys-cluster/drbd-8.0 ) + dev-libs/openssl + dev-python/pyopenssl + dev-python/pyparsing + dev-python/pyinotify + dev-python/simplejson + net-analyzer/arping + net-misc/bridge-utils + net-misc/openssh + net-misc/socat + sys-apps/iproute2 + sys-fs/lvm2" +RDEPEND="${DEPEND}" + +src_prepare () { + epatch "${FILESDIR}/${P}-fix-brctl-path-for-gentoo.patch" +} + +pkg_setup () { + confutils_require_any kvm xen +} + +src_configure () { + econf --localstatedir=/var \ + --docdir=/usr/share/doc/${P} \ + --with-ssh-initscript=/etc/init.d/sshd \ + --with-export-dir=/var/lib/ganeti-storage/export \ + --with-os-search-path=/usr/share/ganeti/os \ + --with-file-storage-dir=/var/lib/ganeti-storage/file +} + +src_install () { + emake DESTDIR="${D}" install || die "emake install failed" + newinitd "${FILESDIR}"/ganeti-2.1.initd ganeti + dobashcompletion doc/examples/bash_completion ganeti + dodoc INSTALL NEWS README doc/*.{rst,png} + rm -rf "${D}"/usr/share/doc/ganeti + docinto examples + dodoc doc/examples/{dumb-allocator,ganeti.cron,gnt-config-backup} + docinto examples/hooks + dodoc doc/examples/hooks/{ipsec,ethers} + + keepdir /var/{lib,log,run}/ganeti/ + keepdir /usr/share/ganeti/os/ + keepdir /var/lib/ganeti-storage/{export,file}/ +} + +pkg_postinst () { + bash-completion_pkg_postinst +} |