diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2008-03-17 17:14:00 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2008-03-17 17:14:00 +0000 |
commit | 0397ad4d9c7d7248518f0b4fbb38c9c236dc4354 (patch) | |
tree | 426eec0c9d7305a967797647ebd6533a4afd2f47 /sys-cluster/rgmanager | |
parent | Version bump. 1.0x.00 is scheduled to be removed soon. (diff) | |
download | gentoo-2-0397ad4d9c7d7248518f0b4fbb38c9c236dc4354.tar.gz gentoo-2-0397ad4d9c7d7248518f0b4fbb38c9c236dc4354.tar.bz2 gentoo-2-0397ad4d9c7d7248518f0b4fbb38c9c236dc4354.zip |
Version bump. 1.0x.00 is scheduled to be removed soon.
(Portage version: 2.1.4.4)
Diffstat (limited to 'sys-cluster/rgmanager')
-rw-r--r-- | sys-cluster/rgmanager/files/rgmanager-1.0x.conf (renamed from sys-cluster/rgmanager/files/rgmanager.conf) | 2 | ||||
-rwxr-xr-x | sys-cluster/rgmanager/files/rgmanager-1.0x.rc (renamed from sys-cluster/rgmanager/files/rgmanager.rc) | 2 | ||||
-rw-r--r-- | sys-cluster/rgmanager/files/rgmanager-2.0x.conf | 5 | ||||
-rwxr-xr-x | sys-cluster/rgmanager/files/rgmanager-2.0x.rc | 110 | ||||
-rw-r--r-- | sys-cluster/rgmanager/rgmanager-1.02.00-r1.ebuild | 16 | ||||
-rw-r--r-- | sys-cluster/rgmanager/rgmanager-1.03.00.ebuild | 10 | ||||
-rw-r--r-- | sys-cluster/rgmanager/rgmanager-1.04.00.ebuild | 10 | ||||
-rw-r--r-- | sys-cluster/rgmanager/rgmanager-2.02.00.ebuild | 62 |
8 files changed, 197 insertions, 20 deletions
diff --git a/sys-cluster/rgmanager/files/rgmanager.conf b/sys-cluster/rgmanager/files/rgmanager-1.0x.conf index 86c28d4d44d0..88de9e37b846 100644 --- a/sys-cluster/rgmanager/files/rgmanager.conf +++ b/sys-cluster/rgmanager/files/rgmanager-1.0x.conf @@ -1,5 +1,5 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager.conf,v 1.1 2006/07/13 09:25:23 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager-1.0x.conf,v 1.1 2008/03/17 17:14:00 xmerlin Exp $ RGMGR_OPTS="" diff --git a/sys-cluster/rgmanager/files/rgmanager.rc b/sys-cluster/rgmanager/files/rgmanager-1.0x.rc index e206bb4ce399..b3b8c13d371f 100755 --- a/sys-cluster/rgmanager/files/rgmanager.rc +++ b/sys-cluster/rgmanager/files/rgmanager-1.0x.rc @@ -3,7 +3,7 @@ # Adaption of the original RedHat script # Original Copyright (C) 2003 Red Hat, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager.rc,v 1.1 2006/07/13 09:25:23 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager-1.0x.rc,v 1.1 2008/03/17 17:14:00 xmerlin Exp $ depend() { use net diff --git a/sys-cluster/rgmanager/files/rgmanager-2.0x.conf b/sys-cluster/rgmanager/files/rgmanager-2.0x.conf new file mode 100644 index 000000000000..dd322812cbeb --- /dev/null +++ b/sys-cluster/rgmanager/files/rgmanager-2.0x.conf @@ -0,0 +1,5 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager-2.0x.conf,v 1.1 2008/03/17 17:14:00 xmerlin Exp $ + +RGMGR_OPTS="" diff --git a/sys-cluster/rgmanager/files/rgmanager-2.0x.rc b/sys-cluster/rgmanager/files/rgmanager-2.0x.rc new file mode 100755 index 000000000000..64156f52268e --- /dev/null +++ b/sys-cluster/rgmanager/files/rgmanager-2.0x.rc @@ -0,0 +1,110 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Adaption of the original RedHat script +# Original Copyright (C) 2003 Red Hat, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/files/rgmanager-2.0x.rc,v 1.1 2008/03/17 17:14:00 xmerlin Exp $ + +depend() { + use net + need cman +} + +# We'd like a reload method as well +opts="${opts} reload" + +ID="Cluster Resource Manager" +RGMGRD=$(which clurgmgrd) +RMTABD=$(which clurmtabd) +CFG_FILE="/etc/cluster/cluster.conf" + +LOG_ERR=3 +LOG_WARNING=4 +LOG_NOTICE=5 +LOG_INFO=6 + +# +# If we're not configured, then don't start anything. +# +[ -f "$CFG_FILE" ] || exit 0 + + +# +# log_and_print <level> <message> +# +function log_and_print() +{ + if [ -z "$1" -o -z "$2" ]; then + return 1; + fi + + clulog -p $$ -n "rgmanager" -s $1 "$2" + echo $2 + + return 0; +} + + +# +# Bring down the cluster on a node. +# +function stop_cluster() +{ + kill -TERM $(pidof $RGMGRD) + + while [ 0 ]; do + if [ -n "`pidof $RGMGRD`" ]; then + while [ -n "`pidof $RGMGRD`" ]; do + sleep 1 + done + einfo "Waiting for $(basename ${RGMGRD})" + else + eend "Services are stopped." + fi + + # Ensure all NFS rmtab daemons are dead. + killall $(basename ${RMTABD}) &> /dev/null + + rm -f /var/run/$(basename ${RGMGRD}).pid + + return 0 + done +} + + + +function start() { + ebegin "Starting cluster resource manager" + start-stop-daemon --start --quiet --exec ${RGMGRD} ${RGMGR_OPTS} + ret=$? + if [ $ret -eq 0 ]; then + touch /var/lock/subsys/rgmanager + fi + eend $ret +} + +function restart() { + pidof ${RGMGRD} &> /dev/null + if [ ${?} -ne 1 ]; then + svc_stop + fi + svc_start +} + +function reload() { + clulog -p ${LOG_NOTICE} "Reloading Resource Configuration." + ebegin "Reloading Resource Configuration " + kill -s HUP $(pidof ${RGMGRD} ) + rv=${?} + eend + exit ${rv} +} + +function stop() { + ebegin "Shutting down cluster resource manager" + if [ -n "$(pidof ${RGMGRD})" ]; then + stop_cluster + fi + rm -f /var/lock/subsys/rgmanager + eend +} diff --git a/sys-cluster/rgmanager/rgmanager-1.02.00-r1.ebuild b/sys-cluster/rgmanager/rgmanager-1.02.00-r1.ebuild index ce2e7dcf38de..b22e541f62d5 100644 --- a/sys-cluster/rgmanager/rgmanager-1.02.00-r1.ebuild +++ b/sys-cluster/rgmanager/rgmanager-1.02.00-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/rgmanager-1.02.00-r1.ebuild,v 1.5 2007/03/10 12:06:07 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/rgmanager-1.02.00-r1.ebuild,v 1.6 2008/03/17 17:13:59 xmerlin Exp $ inherit eutils @@ -29,9 +29,9 @@ S="${WORKDIR}/${MY_P}/${PN}" src_unpack() { unpack ${A} - cd ${S} - epatch ${WORKDIR}/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die - epatch ${FILESDIR}/${PN}-${PV}-${CVS_RELEASE}-cvs-clunfslock.patch || die + cd "${S}" + epatch "${WORKDIR}"/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die + epatch "${FILESDIR}"/${PN}-${PV}-${CVS_RELEASE}-cvs-clunfslock.patch || die } src_compile() { @@ -40,8 +40,8 @@ src_compile() { } src_install() { - emake DESTDIR=${D} install || die "install problem" + emake DESTDIR="${D}" install || die "install problem" - newinitd ${FILESDIR}/${PN}.rc ${PN} || die - newconfd ${FILESDIR}/${PN}.conf ${PN} || die + newinitd "${FILESDIR}"/${PN}-1.0x.rc ${PN} || die + newconfd "${FILESDIR}"/${PN}-1.0x.conf ${PN} || die } diff --git a/sys-cluster/rgmanager/rgmanager-1.03.00.ebuild b/sys-cluster/rgmanager/rgmanager-1.03.00.ebuild index 67b3dae03abc..72599e5ce8d2 100644 --- a/sys-cluster/rgmanager/rgmanager-1.03.00.ebuild +++ b/sys-cluster/rgmanager/rgmanager-1.03.00.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/rgmanager-1.03.00.ebuild,v 1.3 2007/03/10 12:06:07 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/rgmanager-1.03.00.ebuild,v 1.4 2008/03/17 17:13:59 xmerlin Exp $ inherit eutils @@ -31,8 +31,8 @@ src_compile() { } src_install() { - emake DESTDIR=${D} install || die "install problem" + emake DESTDIR="${D}" install || die "install problem" - newinitd ${FILESDIR}/${PN}.rc ${PN} || die - newconfd ${FILESDIR}/${PN}.conf ${PN} || die + newinitd "${FILESDIR}"/${PN}-1.0x.rc ${PN} || die + newconfd "${FILESDIR}"/${PN}-1.0x.conf ${PN} || die } diff --git a/sys-cluster/rgmanager/rgmanager-1.04.00.ebuild b/sys-cluster/rgmanager/rgmanager-1.04.00.ebuild index 53925fe529be..d585a02f3b50 100644 --- a/sys-cluster/rgmanager/rgmanager-1.04.00.ebuild +++ b/sys-cluster/rgmanager/rgmanager-1.04.00.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/rgmanager-1.04.00.ebuild,v 1.1 2007/03/10 12:06:07 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/rgmanager-1.04.00.ebuild,v 1.2 2008/03/17 17:13:59 xmerlin Exp $ inherit eutils @@ -31,8 +31,8 @@ src_compile() { } src_install() { - emake DESTDIR=${D} install || die "install problem" + emake DESTDIR="${D}" install || die "install problem" - newinitd ${FILESDIR}/${PN}.rc ${PN} || die - newconfd ${FILESDIR}/${PN}.conf ${PN} || die + newinitd "${FILESDIR}"/${PN}-1.0x.rc ${PN} || die + newconfd "${FILESDIR}"/${PN}-1.0x.conf ${PN} || die } diff --git a/sys-cluster/rgmanager/rgmanager-2.02.00.ebuild b/sys-cluster/rgmanager/rgmanager-2.02.00.ebuild new file mode 100644 index 000000000000..fbd2102c3cbe --- /dev/null +++ b/sys-cluster/rgmanager/rgmanager-2.02.00.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/rgmanager/rgmanager-2.02.00.ebuild,v 1.1 2008/03/17 17:13:59 xmerlin Exp $ + +inherit eutils versionator + +CLUSTER_RELEASE="${PV}" +MY_P="cluster-${CLUSTER_RELEASE}" + +MAJ_PV="$(get_major_version)" +MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)" + +DESCRIPTION="Clustered resource group manager" +HOMEPAGE="http://sources.redhat.com/cluster/" +SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="=sys-cluster/ccs-${CLUSTER_RELEASE}* + =sys-cluster/dlm-lib-${CLUSTER_RELEASE}* + =sys-cluster/cman-lib-${CLUSTER_RELEASE}* + " +DEPEND="${RDEPEND} + dev-libs/libxml2 + =sys-libs/slang-2* + " + +S="${WORKDIR}/${MY_P}/${PN}" + +src_compile() { + (cd "${WORKDIR}"/${MY_P}; + ./configure \ + --cc=$(tc-getCC) \ + --cflags="-Wall" \ + --disable_kernel_check \ + --release_major="$MAJ_PV" \ + --release_minor="$MIN_PV" \ + --dlmlibdir=/usr/lib \ + --dlmincdir=/usr/include \ + --cmanlibdir=/usr/lib \ + --cmanincdir=/usr/include \ + ) || die "configure problem" + + # fix the manual pages have executable bit + sed -i -e ' + /\tinstall -d/s/install/& -m 0755/; t + /\tinstall/s/install/& -m 0644/' \ + man/Makefile + + # There's a problem with -O2 right now, a patch was submitted. + env -u CFLAGS emake -j1 clean all || die "compile problem" +} + +src_install() { + emake DESTDIR="${D}" install || die "install problem" + + newinitd "${FILESDIR}"/${PN}-2.0x.rc ${PN} || die + newconfd "${FILESDIR}"/${PN}-2.0x.conf ${PN} || die +} |