summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@gentoo.org>2008-11-19 17:04:29 +0000
committerJustin Bronder <jsbronder@gentoo.org>2008-11-19 17:04:29 +0000
commitf84cb7eabd1acf36c18fe49d0f9d2ea726e452a1 (patch)
treeb77ccf1f84e9bf19f3c36f621a309dff99ab0a8a /sys-cluster
parentAdd a link to forum sticky about realplayer masking (diff)
downloadgentoo-2-f84cb7eabd1acf36c18fe49d0f9d2ea726e452a1.tar.gz
gentoo-2-f84cb7eabd1acf36c18fe49d0f9d2ea726e452a1.tar.bz2
gentoo-2-f84cb7eabd1acf36c18fe49d0f9d2ea726e452a1.zip
Bump sys-cluster/ganglia-3.1.1: adds blocker on dev-db/firebird for #247213, add automatic configuration for the diskusage metric.
(Portage version: 2.2_rc14/cvs/Linux 2.6.26-gentoo-r1 x86_64)
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/ganglia/ChangeLog10
-rw-r--r--sys-cluster/ganglia/files/ganglia-3.1.1-ctype-c99.patch13
-rw-r--r--sys-cluster/ganglia/files/ganglia-3.1.1-multidisk-group.patch11
-rw-r--r--sys-cluster/ganglia/ganglia-3.1.1.ebuild202
4 files changed, 235 insertions, 1 deletions
diff --git a/sys-cluster/ganglia/ChangeLog b/sys-cluster/ganglia/ChangeLog
index a2dcb9f52a53..b29c8b5f4661 100644
--- a/sys-cluster/ganglia/ChangeLog
+++ b/sys-cluster/ganglia/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-cluster/ganglia
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ganglia/ChangeLog,v 1.18 2008/08/31 17:38:52 jsbronder Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ganglia/ChangeLog,v 1.19 2008/11/19 17:04:28 jsbronder Exp $
+
+*ganglia-3.1.1 (19 Nov 2008)
+
+ 19 Nov 2008; Justin Bronder <jsbronder@gentoo.org>
+ +files/ganglia-3.1.1-ctype-c99.patch,
+ +files/ganglia-3.1.1-multidisk-group.patch, +ganglia-3.1.1.ebuild:
+ Bump sys-cluster/ganglia-3.1.1: adds blocker on dev-db/firebird for #247213,
+ add automatic configuration for the diskusage metric.
31 Aug 2008; Justin Bronder <jsbronder@gentoo.org>
ganglia-3.1.0-r1.ebuild:
diff --git a/sys-cluster/ganglia/files/ganglia-3.1.1-ctype-c99.patch b/sys-cluster/ganglia/files/ganglia-3.1.1-ctype-c99.patch
new file mode 100644
index 000000000000..e462de57a941
--- /dev/null
+++ b/sys-cluster/ganglia/files/ganglia-3.1.1-ctype-c99.patch
@@ -0,0 +1,13 @@
+diff -urN a/ganglia-3.1.1/libmetrics/linux/metrics.c b/ganglia-3.1.1/libmetrics/linux/metrics.c
+--- a/ganglia-3.1.1/libmetrics/linux/metrics.c 2008-08-25 13:44:57.000000000 -0400
++++ b/ganglia-3.1.1/libmetrics/linux/metrics.c 2008-11-18 21:33:01.370635031 -0500
+@@ -3,6 +3,9 @@
+ #ifndef __USE_GNU
+ #define __USE_GNU
+ #endif
++#ifndef __USE_ISOC99
++#define __USE_ISOC99
++#endif
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
diff --git a/sys-cluster/ganglia/files/ganglia-3.1.1-multidisk-group.patch b/sys-cluster/ganglia/files/ganglia-3.1.1-multidisk-group.patch
new file mode 100644
index 000000000000..e908764131e1
--- /dev/null
+++ b/sys-cluster/ganglia/files/ganglia-3.1.1-multidisk-group.patch
@@ -0,0 +1,11 @@
+diff -urN a/ganglia-3.1.1/gmond/python_modules/disk/multidisk.py b/ganglia-3.1.1/gmond/python_modules/disk/multidisk.py
+--- a/ganglia-3.1.1/gmond/python_modules/disk/multidisk.py 2008-08-25 13:44:57.000000000 -0400
++++ b/ganglia-3.1.1/gmond/python_modules/disk/multidisk.py 2008-11-18 21:40:41.768077035 -0500
+@@ -92,6 +92,7 @@
+ 'slope': slope,
+ 'format': fmt,
+ 'description': desc,
++ 'groups': 'disk',
+ 'mount': line[1]}
+ return d
+
diff --git a/sys-cluster/ganglia/ganglia-3.1.1.ebuild b/sys-cluster/ganglia/ganglia-3.1.1.ebuild
new file mode 100644
index 000000000000..48133228987b
--- /dev/null
+++ b/sys-cluster/ganglia/ganglia-3.1.1.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ganglia/ganglia-3.1.1.ebuild,v 1.1 2008/11/19 17:04:28 jsbronder Exp $
+
+WEBAPP_OPTIONAL="yes"
+inherit multilib webapp depend.php python
+
+DESCRIPTION="A scalable distributed monitoring system for clusters and grids"
+HOMEPAGE="http://ganglia.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ganglia/${P}.tar.gz"
+LICENSE="BSD"
+
+WEBAPP_MANUAL_SLOT="yes"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="minimal vhosts python"
+
+DEPEND="
+ dev-libs/confuse
+ dev-libs/expat
+ >=dev-libs/apr-1.0
+ python? ( >=dev-lang/python-2.3 )
+ !dev-db/firebird"
+
+RDEPEND="
+ ${DEPEND}
+ !minimal? ( net-analyzer/rrdtool
+ ${WEBAPP_DEPEND}
+ =virtual/httpd-php-5* )"
+
+pkg_setup() {
+ if ! use minimal ; then
+ require_gd
+ require_php_with_use xml ctype
+ webapp_pkg_setup
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-ctype-c99.patch
+ epatch "${FILESDIR}"/${P}-multidisk-group.patch
+}
+
+src_compile() {
+ econf \
+ --enable-gexec \
+ $(use_enable python) \
+ $(use_with !minimal gmetad) || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ newinitd "${FILESDIR}"/gmond.rc gmond
+ doman mans/{gmetric.1,gmond.1,gstat.1}
+ doman gmond/gmond.conf.5
+ dodoc AUTHORS ChangeLog INSTALL NEWS README
+ dodir /etc/ganglia/conf.d
+ gmond/gmond -t > "${D}"/etc/ganglia/gmond.conf
+
+ # Sadly, there is no install target for any of this.
+ if use python; then
+ # We install the multidisk module, but not the configuration
+ # as this needs to be generated later. See pkg_config
+ local gmond_py="disk/multidisk network/tcpconn"
+ local gmond_py_conf="tcpconn"
+ newdoc gmond/modules/python/README README.python_modules
+ insinto /etc/ganglia/conf.d
+ doins gmond/modules/conf.d/modpython.conf
+ for i in ${gmond_py_conf}; do
+ doins gmond/python_modules/conf.d/${i}.pyconf
+ done
+ dodir /usr/$(get_libdir)/ganglia/python_modules
+ insinto /usr/$(get_libdir)/ganglia/python_modules
+ for i in ${gmond_py}; do
+ doins gmond/python_modules/${i}.py
+ done
+
+ fi
+
+ insinto /etc/ganglia
+ if ! use minimal; then
+ doins gmetad/gmetad.conf
+ doman mans/gmetad.1
+ keepdir /var/lib/ganglia/rrds
+ fowners nobody:nobody /var/lib/ganglia/rrds
+ newinitd "${FILESDIR}"/gmetad.rc gmetad
+
+ webapp_src_preinst
+ insinto "${MY_HTDOCSDIR}"
+ doins -r web/*
+
+ webapp_configfile "${MY_HTDOCSDIR}"/conf.php
+ webapp_src_install
+ fi
+}
+
+pkg_preinst() {
+ if has_version '<sys-cluster/ganglia-3.1.0'; then
+ elog "Previous ganglia installation detected."
+ elog "Copying gmetad configuration to /etc/ganglia"
+ elog "You may have to remove /etc/gmond.conf yourself."
+ mkdir -p "${D}"/etc/ganglia
+ [ -f "${ROOT}"etc/gmetad.conf ] \
+ && cp "${ROOT}"etc/gmetad.conf "${D}"/etc/ganglia
+ fi
+}
+
+pkg_postinst() {
+ elog "A default configuration file for gmond has been generated"
+ elog "for you as a template by running:"
+ elog " /usr/sbin/gmond -t > /etc/ganglia/gmond.conf"
+ elog "customize it from there or provide your own but be aware"
+ elog "the format has changed since 3.0 and so you won't be able"
+ elog "to use your current configuration (if you generated any)"
+ elog "in /etc/gmond.conf directly"
+ elog
+ elog "If you require disk {usage,total} statistics, please run"
+ elog " emerge --config ${PN}"
+ elog "then check ${ROOT}etc/ganglia/conf.d/diskusage.pyconf"
+ elog "for correctness."
+
+ use minimal || webapp_pkg_postinst
+
+ use python && \
+ python_mod_optimize /usr/$(get_libdir)/ganglia/python_modules/
+}
+
+pkg_prerm() {
+ use minimal || webapp_pkg_prerm
+}
+
+pkg_postrm() {
+ use python && \
+ python_mod_cleanup /usr/$(get_libdir)/ganglia/python_modules/
+ [ -d /usr/$(get_libdir)/ganglia ] && \
+ rmdir /usr/$(get_libdir)/ganglia 2>/dev/null
+}
+
+pkg_config() {
+ local disk_used_metrics disk_total_metrics i
+ local disk_pyconf="${ROOT}"etc/ganglia/conf.d/diskusage.pyconf
+
+ if ! use python; then
+ einfo "No configuration necessary :)"
+ exit 0
+ fi
+
+ if [ ! -w ${disk_pyconf} ]; then
+ eerror "Cannot write to ${disk_pyconf}"
+ exit 1
+ fi
+
+ ebegin "Generating disk used/total metric configuration to ${disk_pyconf}"
+ disk_used_metrics=$(${ROOT}/usr/sbin/gmond -m | awk '/-disk_used/{print $1}')
+ disk_total_metrics=$(${ROOT}/usr/sbin/gmond -m | awk '/-disk_total/{print $1}')
+ cat > ${disk_pyconf} <<-EOF
+ #/* Disk usage collection groups for
+ # multidisk python module */
+ #
+ # Autogenerated by pkg_config in the Gentoo ganglia ebuild.
+
+ modules {
+ module {
+ name = "multidisk"
+ language = "python"
+ }
+ }
+
+ collection_group {
+ collect_every = 10
+ time_threshold = 50
+ EOF
+ for i in ${disk_used_metrics}; do
+ printf \
+ "\n metric {\n name = \"%s\"\n value_threshold = 1.0\n }" \
+ ${i} >> ${disk_pyconf}
+ done
+ printf "\n}\n\n" >> ${disk_pyconf}
+
+
+ # Get the disk total metrics.
+ cat >> ${disk_pyconf} <<-EOF
+ collection_group {
+ collect_once = yes
+ time_threshold = 20
+ EOF
+ for i in ${disk_total_metrics}; do
+ printf \
+ "\n metric {\n name = \"%s\"\n }" \
+ ${i} >> ${disk_pyconf}
+ done
+ printf "\n}\n" >> ${disk_pyconf}
+}
+
+
+
+