summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@gentoo.org>2009-01-18 21:12:50 +0000
committerJustin Bronder <jsbronder@gentoo.org>2009-01-18 21:12:50 +0000
commit1d69bfd4c88f7d91298476501089d28fe9b717b7 (patch)
tree20f88717fadd0eae6d35a887d2901666f30ddccc /sys-cluster/ganglia
parentUpdate DOCS per bug #254260. (diff)
downloadhistorical-1d69bfd4c88f7d91298476501089d28fe9b717b7.tar.gz
historical-1d69bfd4c88f7d91298476501089d28fe9b717b7.tar.bz2
historical-1d69bfd4c88f7d91298476501089d28fe9b717b7.zip
Bump ganglia-3.1.1-r1. Patch added to prevent a buffer overflow. Gentoo #255366, Ganglia #223.
Package-Manager: portage-2.2_rc14/cvs/Linux 2.6.27-gentoo-r2 x86_64
Diffstat (limited to 'sys-cluster/ganglia')
-rw-r--r--sys-cluster/ganglia/ChangeLog12
-rw-r--r--sys-cluster/ganglia/Manifest14
-rw-r--r--sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow.patch39
-rw-r--r--sys-cluster/ganglia/ganglia-3.1.1-r1.ebuild200
4 files changed, 262 insertions, 3 deletions
diff --git a/sys-cluster/ganglia/ChangeLog b/sys-cluster/ganglia/ChangeLog
index 7b70fc035696..cf12f7009d0f 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.20 2008/11/19 17:11:16 jsbronder Exp $
+# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ganglia/ChangeLog,v 1.21 2009/01/18 21:12:50 jsbronder Exp $
+
+*ganglia-3.1.1-r1 (18 Jan 2009)
+
+ 18 Jan 2009; Justin Bronder <jsbronder@gentoo.org>
+ +files/ganglia-3.1.1-process_path-overflow.patch,
+ +ganglia-3.1.1-r1.ebuild:
+ Bump ganglia-3.1.1-r1. Patch added to prevent a buffer overflow. Gentoo
+ #255366, Ganglia #223.
19 Nov 2008; Justin Bronder <jsbronder@gentoo.org>
-ganglia-3.0.6-r1.ebuild, -ganglia-3.0.7.ebuild, -ganglia-3.1.0.ebuild:
diff --git a/sys-cluster/ganglia/Manifest b/sys-cluster/ganglia/Manifest
index 0d7e4cf721a8..29cb7f030773 100644
--- a/sys-cluster/ganglia/Manifest
+++ b/sys-cluster/ganglia/Manifest
@@ -1,7 +1,11 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX ganglia-3.1-gmond-python-tcpconn-concurrency.patch 1714 RMD160 fa0b5602420ff96743cdce0252d4091700855cc1 SHA1 f75b60c84ed11052e960dd7ebad98d34c30a7aa2 SHA256 068429c839ddddcf8a1d149ba1bd7eea8938c765a2673e9b3875df9cb88bcfb3
AUX ganglia-3.1.0-gmetad-hierarchical.patch 481 RMD160 a5293da532de60ca4d1c80538cffa1b0c435955f SHA1 6dd26d86eccc6798fd0f53eb1f29de1d6410022b SHA256 e87656c3e89fba7dd17920274aba0e3d19dae6c2d6b90fb49256e45b6ab93d0e
AUX ganglia-3.1.1-ctype-c99.patch 437 RMD160 19083e2102e7ed73725f9800d73e655b84c58dd8 SHA1 bb56f766c475c5d6e23259673e85311887c39c5e SHA256 385397d0e6b3810f19fe420fbb7db70ab9978089fe8388eed2ea6a8d8deafcf8
AUX ganglia-3.1.1-multidisk-group.patch 482 RMD160 d46699b88fed699c8864b10ebb4eca0a06965a0f SHA1 f942d0427469b9acb51e8eb38de18cdaf80f4b51 SHA256 fd4f3a3798cc99cd0bd93eb238d6c7f381b65c8329852b5a9fa07005c85a6639
+AUX ganglia-3.1.1-process_path-overflow.patch 1170 RMD160 af3b784bfefdd5a1132a199b81eed2fa18de29c9 SHA1 e3564545afa99ec2c09ac7531a10d7769946e2fc SHA256 ab73b4f47bb347ccfbfc6b8c2ab12c73da5d3683a08650bbe4c616452cb5f639
AUX gmetad.rc 328 RMD160 bfe287d90db7f26cd13978c99eabc6f7783b7073 SHA1 73d49ca4f669d914c87e2cdd9a4ad74bf1a75eb5 SHA256 c25c3dac00012f83e45819d6d0fb79bcf4e1ec773ad705b38127aade7c2a08c7
AUX gmond.rc 322 RMD160 98ac6011a603e3286ffe5c2368620ae0630a013f SHA1 d304b1849ea1abf14360915b3978e781b8e0cbed SHA256 ea3bd50fe4bfc18254fdfb69c81ec0bfad0c552a2f9a3d3aee4732f644695d7d
DIST ganglia-3.0.6.tar.gz 2854746 RMD160 ef3b29af23bc3e30b58736e0e6c08f4047b6eb70 SHA1 5dd3cc3fe2eade8ae012bbafd65e40a7d29bc995 SHA256 590c0c5e1b7b7a27cc1234093cf8caaac6b000f8035d9985459aaa7dcf2c2cb5
@@ -9,6 +13,14 @@ DIST ganglia-3.1.0.tar.gz 1175129 RMD160 92fee8fc2ffe6d058be2dc73bba6697dc2a226d
DIST ganglia-3.1.1.tar.gz 1152883 RMD160 c4047d61f42f56d5328d10f39d52d5193636f36b SHA1 1209af0f67ca594e071d791ed110833141013693 SHA256 cc6955f0b086f40dc646e3d0d9f152854d1dcd19dea81b9bff16b38f3819f75c
EBUILD ganglia-3.0.6.ebuild 1670 RMD160 484bd6f1791715ed2a53cb3ba5a2573f5e8a914d SHA1 a451b6df6038a415b612beccfce8aec67e82478c SHA256 f1eb7f602202c3ab97c33f5349007aa2bbc3daa4f567221601a487ec5b346645
EBUILD ganglia-3.1.0-r1.ebuild 3519 RMD160 33ec8b38d2dd32219f6e796ed2f2e0023146f19c SHA1 e2d75374b44dffb7410ec9deb06c511aebd46a4c SHA256 4490c3568a708f83277e9b5967f82947ca4dd4ec75771d7b03c6d5dba2e14873
+EBUILD ganglia-3.1.1-r1.ebuild 5344 RMD160 b79847895e848610d53f05cee0caa4140dce716e SHA1 fe7f5099ca6c6c1dbea495844ef24198570c3d79 SHA256 a252bea575b4c0f682751f75f061b4082caa9f45349e60fc789643a4a440e02a
EBUILD ganglia-3.1.1.ebuild 5184 RMD160 255425aa44cc380876b0093f521a6b5f46208aa8 SHA1 61f86df52a3b7aa2288ba9d1d5248bd5cbd4f9dd SHA256 2707ceea40304ac02595348d8a37d97634e047df9c9c3a293c7a2356e64799cf
-MISC ChangeLog 5009 RMD160 4435bca68f92a4ae89b76f9676feeecca098c8f4 SHA1 34bdce2d4dde952f08ff401c2540e8f0c390936d SHA256 2531886ff8bd703fad8ca4e75c186edb3dae732f16b6d8ff745ad1a0d5365bd3
+MISC ChangeLog 5275 RMD160 4f87f819e7aa97402bd630fd1c3014b4df209035 SHA1 56053c2ca2d1c5e103312b388d4b17ea6a8b9a08 SHA256 090760a7b41647b618a092e1439808c3fdcc29a6955617916ac59e403e83b40a
MISC metadata.xml 163 RMD160 ea1530cd45b9e04e8693261b9a94b5988e4b09a1 SHA1 443b7a3d8fb76c8d20647b165032ad358bfa3b6a SHA256 5a03bf3074b07158dffe793af69f7b0cd1e5c785537574713f9a7978032363a3
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.9 (GNU/Linux)
+
+iEYEARECAAYFAklzm2AACgkQ4MrvBE1wQ8k90ACgkMCGOX6eeu5EbzzEubgD3pSb
+b0wAoIu/vk6zmlRBsc5g88NMPltfavEe
+=ApWG
+-----END PGP SIGNATURE-----
diff --git a/sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow.patch b/sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow.patch
new file mode 100644
index 000000000000..8b79511b2e56
--- /dev/null
+++ b/sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow.patch
@@ -0,0 +1,39 @@
+Index: gmetad/server.c
+===================================================================
+--- gmetad/server.c (revision 1949)
++++ gmetad/server.c (working copy)
+@@ -370,14 +370,13 @@
+
+ /* sacerdoti: This function does a tree walk while respecting the filter path.
+ * Will return valid XML even if we have chosen a subtree. Since tree depth is
+- * bounded, this function guarantees O(1) search time. The recursive structure
+- * does not require any memory allocations.
++ * bounded, this function guarantees O(1) search time.
+ */
+ static int
+ process_path (client_t *client, char *path, datum_t *myroot, datum_t *key)
+ {
+ char *p, *q, *pathend;
+- char element[256];
++ char *element;
+ int rc, len;
+ datum_t *found;
+ datum_t findkey;
+@@ -419,6 +418,9 @@
+ if (!q) q=pathend;
+
+ len = q-p;
++ element = malloc(len + 1);
++ if ( element == NULL )
++ return 1;
+ strncpy(element, p, len);
+ element[len] = '\0';
+
+@@ -440,6 +442,7 @@
+ {
+ rc = process_path(client, 0, myroot, NULL);
+ }
++ free(element);
+ }
+ if (rc) return 1;
+
diff --git a/sys-cluster/ganglia/ganglia-3.1.1-r1.ebuild b/sys-cluster/ganglia/ganglia-3.1.1-r1.ebuild
new file mode 100644
index 000000000000..4d6159199471
--- /dev/null
+++ b/sys-cluster/ganglia/ganglia-3.1.1-r1.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2009 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-r1.ebuild,v 1.1 2009/01/18 21:12:50 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
+ # Shouldn't be needed for 3.1.2
+ # http://bugzilla.ganglia.info/cgi-bin/bugzilla/show_bug.cgi?id=223
+ epatch "${FILESDIR}"/${P}-process_path-overflow.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}
+}