diff options
author | 2012-08-05 21:33:42 +0000 | |
---|---|---|
committer | 2012-08-05 21:33:42 +0000 | |
commit | 5b5de3159c9e2fe69b6ac2fc4264512aa251c8ea (patch) | |
tree | 242d719ec30cfa16fdad33a6b257b485fac730fe /app-emulation/ganeti | |
parent | Keyword ~arm (diff) | |
download | gentoo-2-5b5de3159c9e2fe69b6ac2fc4264512aa251c8ea.tar.gz gentoo-2-5b5de3159c9e2fe69b6ac2fc4264512aa251c8ea.tar.bz2 gentoo-2-5b5de3159c9e2fe69b6ac2fc4264512aa251c8ea.zip |
Version bump, patch to fix ganeti init issues
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation/ganeti')
-rw-r--r-- | app-emulation/ganeti/ChangeLog | 11 | ||||
-rw-r--r-- | app-emulation/ganeti/files/ganeti-2.5-gentoo-start-stop-daemon.patch | 38 | ||||
-rw-r--r-- | app-emulation/ganeti/files/ganeti-2.6-add-pgrep.patch | 38 | ||||
-rw-r--r-- | app-emulation/ganeti/files/ganeti-2.6-fix-args.patch | 45 | ||||
-rw-r--r-- | app-emulation/ganeti/ganeti-2.5.2-r1.ebuild | 125 | ||||
-rw-r--r-- | app-emulation/ganeti/ganeti-2.6.0.ebuild | 139 | ||||
-rw-r--r-- | app-emulation/ganeti/metadata.xml | 2 |
7 files changed, 397 insertions, 1 deletions
diff --git a/app-emulation/ganeti/ChangeLog b/app-emulation/ganeti/ChangeLog index 2e0fb737e3ef..79e2e5982139 100644 --- a/app-emulation/ganeti/ChangeLog +++ b/app-emulation/ganeti/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-emulation/ganeti # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/ChangeLog,v 1.61 2012/07/25 16:45:02 ramereth Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/ChangeLog,v 1.62 2012/08/05 21:33:42 ramereth Exp $ + +*ganeti-2.6.0 (05 Aug 2012) +*ganeti-2.5.2-r1 (05 Aug 2012) + + 05 Aug 2012; Lance Albertson <ramereth@gentoo.org> +ganeti-2.5.2-r1.ebuild, + +files/ganeti-2.5-gentoo-start-stop-daemon.patch, +ganeti-2.6.0.ebuild, + +files/ganeti-2.6-add-pgrep.patch, +files/ganeti-2.6-fix-args.patch, + metadata.xml: + Version bump, patch to fix ganeti init issues *ganeti-2.5.2 (25 Jul 2012) diff --git a/app-emulation/ganeti/files/ganeti-2.5-gentoo-start-stop-daemon.patch b/app-emulation/ganeti/files/ganeti-2.5-gentoo-start-stop-daemon.patch new file mode 100644 index 000000000000..c668a2131178 --- /dev/null +++ b/app-emulation/ganeti/files/ganeti-2.5-gentoo-start-stop-daemon.patch @@ -0,0 +1,38 @@ +From 041efca59326baf7c2ec08dd505e06ae86dd6954 Mon Sep 17 00:00:00 2001 +From: Lance Albertson <lance@osuosl.org> +Date: Wed, 25 Jul 2012 16:21:21 -0700 +Subject: [PATCH] Check if process is already running and skip if so + +Gentoo uses a modified version of start-stop-daemon which returns an error if it +sees another process running with the same name. This happens during cluster +initialization since ganeti-noded gets fired off first. +--- + daemons/daemon-util.in | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in +index 00fe1b6..8e4ce97 100644 +--- a/daemons/daemon-util.in ++++ b/daemons/daemon-util.in +@@ -172,11 +172,13 @@ start() { + + @PKGLIBDIR@/ensure-dirs + +- start-stop-daemon --start --quiet \ +- --pidfile $(_daemon_pidfile $name) \ +- --exec $(_daemon_executable $name) \ +- --user $(_daemon_usergroup $plain_name) \ +- -- $args "$@" ++ if ! ret=$(/usr/bin/pgrep $name) ; then ++ start-stop-daemon --start --quiet \ ++ --pidfile $(_daemon_pidfile $name) \ ++ --exec $(_daemon_executable $name) \ ++ --user $(_daemon_usergroup $plain_name) \ ++ -- $args "$@" ++ fi + } + + # Stops a daemon +-- +1.7.9.5 + diff --git a/app-emulation/ganeti/files/ganeti-2.6-add-pgrep.patch b/app-emulation/ganeti/files/ganeti-2.6-add-pgrep.patch new file mode 100644 index 000000000000..c69128229a66 --- /dev/null +++ b/app-emulation/ganeti/files/ganeti-2.6-add-pgrep.patch @@ -0,0 +1,38 @@ +From 49767a66e27a1cb61abb8f812b2e61eba03a9594 Mon Sep 17 00:00:00 2001 +From: Lance Albertson <lance@osuosl.org> +Date: Wed, 25 Jul 2012 16:21:21 -0700 +Subject: [PATCH 2/2] Check if process is already running and skip if so + +Gentoo uses a modified version of start-stop-daemon which returns an error if it +sees another process running with the same name. This happens during cluster +initialization since ganeti-noded gets fired off first. +--- + daemons/daemon-util.in | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in +index c19daa7..7be9d8b 100644 +--- a/daemons/daemon-util.in ++++ b/daemons/daemon-util.in +@@ -222,11 +222,13 @@ start() { + @PKGLIBDIR@/ensure-dirs + + if type -p start-stop-daemon >/dev/null; then +- start-stop-daemon --start --quiet \ +- --pidfile $pidfile \ +- --exec $daemonexec \ +- --user $usergroup \ +- -- $args "$@" ++ if ! ret=$(/usr/bin/pgrep $name) ; then ++ start-stop-daemon --start --quiet \ ++ --pidfile $pidfile \ ++ --exec $daemonexec \ ++ --user $usergroup \ ++ -- $args "$@" ++ fi + else + # TODO: Find a way to start daemon with a group, until then the group must + # be removed +-- +1.7.9.5 + diff --git a/app-emulation/ganeti/files/ganeti-2.6-fix-args.patch b/app-emulation/ganeti/files/ganeti-2.6-fix-args.patch new file mode 100644 index 000000000000..6fb5bd0df62f --- /dev/null +++ b/app-emulation/ganeti/files/ganeti-2.6-fix-args.patch @@ -0,0 +1,45 @@ +From 0491397d7648fd70ad0a6cef9e8626b9c2a968e9 Mon Sep 17 00:00:00 2001 +From: Lance Albertson <ramereth@gmail.com> +Date: Mon, 8 Aug 2011 23:34:33 -0700 +Subject: [PATCH 1/2] Remove/fix deprecated start-stop-daemon functions + +daemon-util uses the deprecated functions --startas, --chuid and, most +importantly, --oknodo. The last one causes start-stop-daemon to exit with a +non-zero status, which makes openrc think it crashed (when in reality it just +shut down properly) [1]. + +[1] https://bugs.gentoo.org/show_bug.cgi?id=377905 +--- + daemons/daemon-util.in | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in +index b754e7f..c19daa7 100644 +--- a/daemons/daemon-util.in ++++ b/daemons/daemon-util.in +@@ -222,10 +222,10 @@ start() { + @PKGLIBDIR@/ensure-dirs + + if type -p start-stop-daemon >/dev/null; then +- start-stop-daemon --start --quiet --oknodo \ ++ start-stop-daemon --start --quiet \ + --pidfile $pidfile \ +- --startas $daemonexec \ +- --chuid $usergroup \ ++ --exec $daemonexec \ ++ --user $usergroup \ + -- $args "$@" + else + # TODO: Find a way to start daemon with a group, until then the group must +@@ -248,7 +248,7 @@ stop() { + local pidfile=$(_daemon_pidfile $name) + + if type -p start-stop-daemon >/dev/null; then +- start-stop-daemon --stop --quiet --oknodo --retry 30 \ ++ start-stop-daemon --stop --quiet --retry 30 \ + --pidfile $pidfile + else + _ignore_error killproc -p $pidfile $name +-- +1.7.9.5 + diff --git a/app-emulation/ganeti/ganeti-2.5.2-r1.ebuild b/app-emulation/ganeti/ganeti-2.5.2-r1.ebuild new file mode 100644 index 000000000000..79180fe47209 --- /dev/null +++ b/app-emulation/ganeti/ganeti-2.5.2-r1.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/ganeti-2.5.2-r1.ebuild,v 1.1 2012/08/05 21:33:42 ramereth Exp $ + +EAPI="4" + +inherit eutils confutils bash-completion-r1 + +MY_PV="${PV/_rc/~rc}" +#MY_PV="${PV/_beta/~beta}" +MY_P="${PN}-${MY_PV}" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://git.ganeti.org/ganeti.git" + inherit git-2 + KEYWORDS="" + # you will need to pull in the haskell overlay for pandoc + GIT_DEPEND="app-text/pandoc + dev-python/docutils + dev-python/sphinx + media-libs/gd[fontconfig,jpeg,png,truetype] + media-gfx/graphviz + media-fonts/urw-fonts" +else + SRC_URI="http://ganeti.googlecode.com/files/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Ganeti is a virtual server management software tool" +HOMEPAGE="http://code.google.com/p/ganeti/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="kvm xen lxc drbd +filestorage sharedstorage htools syslog ipv6" + +S="${WORKDIR}/${MY_P}" + +DEPEND="xen? ( >=app-emulation/xen-3.0 ) + kvm? ( app-emulation/qemu-kvm ) + lxc? ( app-emulation/lxc ) + drbd? ( >=sys-cluster/drbd-8.3 ) + ipv6? ( net-misc/ndisc6 ) + htools? ( + >=dev-lang/ghc-6.10 + dev-haskell/json + dev-haskell/curl + dev-haskell/network + dev-haskell/parallel ) + dev-libs/openssl + dev-python/paramiko + dev-python/pyopenssl + >=dev-python/pyparsing-1.4.6 + dev-python/pycurl + dev-python/pyinotify + dev-python/simplejson + net-analyzer/arping + net-misc/bridge-utils + net-misc/curl[ssl] + net-misc/openssh + net-misc/socat + sys-apps/iproute2 + sys-fs/lvm2 + >=sys-apps/baselayout-2.0 + >=dev-lang/python-2.6 + ${GIT_DEPEND}" +RDEPEND="${DEPEND} + !app-emulation/ganeti-htools" + +pkg_setup () { + confutils_require_any kvm xen lxc +} + +src_prepare() { + if [[ ${PV} == "9999" ]] ; then + ./autogen.sh + fi + epatch "${FILESDIR}/${PN}-fix-start-stop.patch" + epatch "${FILESDIR}/${PN}-2.5-gentoo-start-stop-daemon.patch" +} + +src_configure () { + local myconf + if use filestorage ; then + myconf="--with-file-storage-dir=/var/lib/ganeti-storage/file" + else + myconf="--with-file-storage-dir=no" + fi + if use sharedstorage ; then + myconf="--with-shared-file-storage-dir=/var/lib/ganeti-storage/shared" + else + myconf="--with-shared-file-storage-dir=no" + fi + if use kvm && [ -f /usr/bin/qemu-kvm ] ; then + myconf="--with-kvm-path=/usr/bin/qemu-kvm" + fi + 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 \ + $(use_enable syslog) \ + $(use_enable htools) \ + $(use_enable htools htools-rapi) \ + ${myconf} +} + +src_install () { + emake DESTDIR="${D}" install || die "emake install failed" + newinitd "${FILESDIR}"/ganeti-2.1.initd ganeti + newconfd "${FILESDIR}"/ganeti.confd ganeti + use kvm && newinitd "${FILESDIR}"/ganeti-kvm-poweroff.initd ganeti-kvm-poweroff + use kvm && newconfd "${FILESDIR}"/ganeti-kvm-poweroff.confd ganeti-kvm-poweroff + newbashcomp doc/examples/bash_completion ganeti + dodoc INSTALL UPGRADE NEWS README doc/*.rst + rm -rf "${D}"/usr/share/doc/ganeti + docinto examples + #dodoc doc/examples/{basic-oob,ganeti.cron,gnt-config-backup} + dodoc doc/examples/{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,shared}/ +} diff --git a/app-emulation/ganeti/ganeti-2.6.0.ebuild b/app-emulation/ganeti/ganeti-2.6.0.ebuild new file mode 100644 index 000000000000..64b8aa6b485f --- /dev/null +++ b/app-emulation/ganeti/ganeti-2.6.0.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/ganeti-2.6.0.ebuild,v 1.1 2012/08/05 21:33:42 ramereth Exp $ + +EAPI="4" + +inherit eutils confutils bash-completion-r1 + +MY_PV="${PV/_rc/~rc}" +#MY_PV="${PV/_beta/~beta}" +MY_P="${PN}-${MY_PV}" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://git.ganeti.org/ganeti.git" + inherit git-2 + KEYWORDS="" + # you will need to pull in the haskell overlay for pandoc + GIT_DEPEND="app-text/pandoc + dev-python/docutils + dev-python/sphinx + media-libs/gd[fontconfig,jpeg,png,truetype] + media-gfx/graphviz + media-fonts/urw-fonts" +else + SRC_URI="http://ganeti.googlecode.com/files/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Ganeti is a virtual server management software tool" +HOMEPAGE="http://code.google.com/p/ganeti/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="kvm xen lxc drbd +filestorage sharedstorage htools syslog ipv6 + haskell-daemons rbd" + +S="${WORKDIR}/${MY_P}" + +DEPEND="xen? ( >=app-emulation/xen-3.0 ) + kvm? ( app-emulation/qemu-kvm ) + lxc? ( app-emulation/lxc ) + drbd? ( >=sys-cluster/drbd-8.3 ) + rbd? ( sys-cluster/ceph ) + ipv6? ( net-misc/ndisc6 ) + htools? ( + >=dev-lang/ghc-6.10 + dev-haskell/json + dev-haskell/curl + dev-haskell/network + dev-haskell/parallel ) + haskell-daemons? ( + dev-haskell/hslogger + dev-haskell/crypto + dev-haskell/text + dev-haskell/hinotify ) + dev-libs/openssl + dev-python/elementtree + dev-python/paramiko + dev-python/pyopenssl + >=dev-python/pyparsing-1.4.6 + dev-python/pycurl + dev-python/pyinotify + dev-python/simplejson + net-analyzer/arping + net-analyzer/fping + net-misc/bridge-utils + net-misc/curl[ssl] + net-misc/openssh + net-misc/socat + sys-apps/iproute2 + sys-fs/lvm2 + >=sys-apps/baselayout-2.0 + >=dev-lang/python-2.6 + ${GIT_DEPEND}" +RDEPEND="${DEPEND} + !app-emulation/ganeti-htools" + +pkg_setup () { + confutils_require_any kvm xen lxc + confutils_use_depend_all haskell-daemons htools +} + +src_prepare() { + if [[ ${PV} == "9999" ]] ; then + ./autogen.sh + fi + epatch "${FILESDIR}/${PN}-2.6-fix-args.patch" + epatch "${FILESDIR}/${PN}-2.6-add-pgrep.patch" +} + +src_configure () { + local myconf + if use filestorage ; then + myconf="--with-file-storage-dir=/var/lib/ganeti-storage/file" + else + myconf="--with-file-storage-dir=no" + fi + if use sharedstorage ; then + myconf="--with-shared-file-storage-dir=/var/lib/ganeti-storage/shared" + else + myconf="--with-shared-file-storage-dir=no" + fi + if use kvm && [ -f /usr/bin/qemu-kvm ] ; then + myconf="--with-kvm-path=/usr/bin/qemu-kvm" + fi + if use haskell-daemons ; then + myconf="--enable-confd=haskell" + fi + 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 \ + $(use_enable syslog) \ + $(use_enable htools) \ + $(use_enable htools htools-rapi) \ + ${myconf} +} + +src_install () { + emake DESTDIR="${D}" install || die "emake install failed" + newinitd "${FILESDIR}"/ganeti-2.1.initd ganeti + newconfd "${FILESDIR}"/ganeti.confd ganeti + use kvm && newinitd "${FILESDIR}"/ganeti-kvm-poweroff.initd ganeti-kvm-poweroff + use kvm && newconfd "${FILESDIR}"/ganeti-kvm-poweroff.confd ganeti-kvm-poweroff + newbashcomp doc/examples/bash_completion ganeti + dodoc INSTALL UPGRADE NEWS README doc/*.rst doc/*.png + dohtml -r doc/html/* + rm -rf "${D}"/usr/share/doc/ganeti + docinto examples + #dodoc doc/examples/{basic-oob,ganeti.cron,gnt-config-backup} + dodoc doc/examples/{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,shared}/ +} diff --git a/app-emulation/ganeti/metadata.xml b/app-emulation/ganeti/metadata.xml index 532b120ad87d..b73d307c0d32 100644 --- a/app-emulation/ganeti/metadata.xml +++ b/app-emulation/ganeti/metadata.xml @@ -28,6 +28,8 @@ <flag name='filestorage'>Enable File Storage</flag> <flag name='sharedstorage'>Enable Shared Storage support</flag> <flag name='htools'>Enable htools support</flag> + <flag name='haskell-daemons'>Build haskell daemons instead of python</flag> + <flag name='rbd'>Enable rados block device support via sys-cluster/ceph</flag> </use> </pkgmetadata> |