From f5a9aaa6422f567a252b3c5af9a3ec6b61bf6ddb Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Thu, 12 Jul 2018 23:58:23 +0200 Subject: [PATCH] Add ebuild for ganglia-3.7.2, the latest release. --- sys-cluster/ganglia/Manifest | 8 ++ sys-cluster/ganglia/files/gmetad-python.rc | 30 +++++ sys-cluster/ganglia/files/gmetad.rc | 18 +++ sys-cluster/ganglia/files/gmetad.rc-2 | 28 +++++ sys-cluster/ganglia/files/gmond.rc | 18 +++ sys-cluster/ganglia/files/gmond.rc-2 | 28 +++++ sys-cluster/ganglia/ganglia-3.7.2.ebuild | 127 +++++++++++++++++++++ sys-cluster/ganglia/metadata.xml | 11 ++ 8 files changed, 268 insertions(+) create mode 100644 sys-cluster/ganglia/Manifest create mode 100644 sys-cluster/ganglia/files/gmetad-python.rc create mode 100644 sys-cluster/ganglia/files/gmetad.rc create mode 100644 sys-cluster/ganglia/files/gmetad.rc-2 create mode 100644 sys-cluster/ganglia/files/gmond.rc create mode 100644 sys-cluster/ganglia/files/gmond.rc-2 create mode 100644 sys-cluster/ganglia/ganglia-3.7.2.ebuild create mode 100644 sys-cluster/ganglia/metadata.xml diff --git a/sys-cluster/ganglia/Manifest b/sys-cluster/ganglia/Manifest new file mode 100644 index 0000000..92e54bb --- /dev/null +++ b/sys-cluster/ganglia/Manifest @@ -0,0 +1,8 @@ +AUX gmetad-python.rc 618 BLAKE2B 476915bff06395d3451d256f4fef3d4a2aa96c866b9cae5227d19f60ecbffce0dc2e7f4513726564bff808ea3b2bd109ee8daff10975e9b1043f97733accc608 SHA512 1b23e84c453b0cd0aca8b340c9764adb79bccbc0b4a9574a1e5c7299bc8d497d30a2a56e9b855d3cda2664a856b404f4f6941b3feddbec889e45a59c92c05389 +AUX gmetad.rc 352 BLAKE2B 68629711870d52a198ae474b77ab7828987c2ac19551243063272ec50c61c3e0b2d32a08633ff878e3319a80f9bbc111ac5e7507c88164ea4ddb8244a0b9e41f SHA512 865e1f8622ebcf1103f0cb72ebc2d675af01e9ea0861fd43107ac2bca10d9e86f875741ae4cc1dabf0eb231fd3f907066974d82b245f2746acbad0f7eafb46af +AUX gmetad.rc-2 480 BLAKE2B 9ebf71eca6c80aa5f5c776e292cc0ceee58103a30a7aad29e7430f766a58e6c58222113bc12bc7ddc74c4c3f6f5aaccc95ff7470321bbd3ccb87af1e704be7ae SHA512 37678fe9b52ce7c6ef38bcc764189ed26e10410567ac9a8608460ac3eab380c70ac91453ed425ffef8d6e86ff6ef609e0167f5bb04a2aa9318725527d31391fa +AUX gmond.rc 346 BLAKE2B 8930fe96692c100de0feed00fbe1d5f39c3d6f9679f88ef0326b1c6b7cf6408ddba2d909027577299f5d063f765f9c9ddb26c96b0582b79b50f528ac2bffaba2 SHA512 0d1d4da1bfc2c20ae741fb9a7ee2e649780254029c50fee866f1fffdb55fddbd61ea3ead6670d7a65489d780990e24c6743c14bc1a4a7040b84972f4884629ca +AUX gmond.rc-2 473 BLAKE2B 461d0b481f2138dcab8f7202a880354740b71f91e41ad2152a3465daf8072e6243fcc5f27ee215aa079dad30546e06146c01be71e85f518974cd9c479549ff34 SHA512 bbb5e3c525137aa2072bd46d28473523498895eba70c8dad1209230ea5e7f44ddc09875b5b6065fd5351d89ed0ad574a94fe0debcbe1d3a51e2541715adb4240 +DIST ganglia-3.7.2.tar.gz 1302320 BLAKE2B aee647d6ec4b2852536769773dd54d7a7e9ca33c05de4316172d530aee549207bdfa59f25e8fe456ae4c01a1af9eca3846f30242c64e7d9fe393687a7203eb12 SHA512 a88955e59421a447e5752a9bfe5f599d989a7a5a0141141ab3601d1ab250be4eebbede8bcef8baa151b2f9deaf3f56e30aef8ea709f3cc820a79fa3d3961e0df +EBUILD ganglia-3.7.2.ebuild 2933 BLAKE2B ce04bee04d324b3633017cc4d05973ed66118fd82f9f2c9b874acbc35ce3c02d0a8eee80f1e09fdfdc2be03876b2433c7885f4550b88e229fe940a49d28835c7 SHA512 d632e9527a8d356f7515a9dc5fd68f616f21dd611c4629bc6463179c754a4e25b24abfdd591441138a70f45d18c17ecd3c7e3a562879374185b52bbf86546ab1 +MISC metadata.xml 325 BLAKE2B 71ac60956aa877d76ec897fa1c07082c2b0d8d18db7e9d17248e3c730def736b5a70ffdf371d0d4d38aba338efc0689d5cb24dd08c084934e4d23914da48fc4f SHA512 c3cc85ba47cd58ccba2a511b1bcdac2de4cd40b69bc005935291c9394bde3ed55ce14d57d0c3ab0bc188b5116192f0851cb1be3e4eaeb190555e50920fcdb4fb diff --git a/sys-cluster/ganglia/files/gmetad-python.rc b/sys-cluster/ganglia/files/gmetad-python.rc new file mode 100644 index 0000000..a01e42e --- /dev/null +++ b/sys-cluster/ganglia/files/gmetad-python.rc @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE=/var/run/gmetad-python.pid + +depend() { + need net + after ntp-client ntpd +} + +start() { + ebegin "Starting GANGLIA gmetad-python: " + start-stop-daemon \ + --start --quiet \ + --exec /usr/bin/gmetad.py \ + --pidfile ${PIDFILE} \ + -- \ + -p ${PIDFILE} + eend $? "Failed to start gmetad-python" +} + +stop() { + ebegin "Shutting down GANGLIA gmetad-python: " + start-stop-daemon \ + --stop --quiet \ + --pidfile ${PIDFILE} \ + --exec /usr/bin/gmetad.py + eend $? "Failed to stop gmetad-python" +} diff --git a/sys-cluster/ganglia/files/gmetad.rc b/sys-cluster/ganglia/files/gmetad.rc new file mode 100644 index 0000000..bb57487 --- /dev/null +++ b/sys-cluster/ganglia/files/gmetad.rc @@ -0,0 +1,18 @@ +#!/sbin/openrc-run + +depend() { + need net + after ntp-client ntpd +} + +start() { + ebegin "Starting GANGLIA gmetad: " + start-stop-daemon --start --quiet --exec /usr/sbin/gmetad + eend $? "Failed to start gmetad" +} + +stop() { + ebegin "Shutting down GANGLIA gmetad: " + start-stop-daemon --stop --quiet --exec /usr/sbin/gmetad + eend $? "Failed to stop gmetad" +} diff --git a/sys-cluster/ganglia/files/gmetad.rc-2 b/sys-cluster/ganglia/files/gmetad.rc-2 new file mode 100644 index 0000000..6b1306b --- /dev/null +++ b/sys-cluster/ganglia/files/gmetad.rc-2 @@ -0,0 +1,28 @@ +#!/sbin/openrc-run + +PIDFILE=/var/run/gmetad.pid + +depend() { + need net + after ntp-client ntpd +} + +start() { + ebegin "Starting GANGLIA gmetad: " + start-stop-daemon \ + --start --quiet \ + --exec /usr/sbin/gmetad \ + --pidfile ${PIDFILE} \ + -- \ + --pid-file=${PIDFILE} + eend $? "Failed to start gmetad" +} + +stop() { + ebegin "Shutting down GANGLIA gmetad: " + start-stop-daemon \ + --stop --quiet \ + --pidfile ${PIDFILE} \ + --exec /usr/sbin/gmetad + eend $? "Failed to stop gmetad" +} diff --git a/sys-cluster/ganglia/files/gmond.rc b/sys-cluster/ganglia/files/gmond.rc new file mode 100644 index 0000000..621be8d --- /dev/null +++ b/sys-cluster/ganglia/files/gmond.rc @@ -0,0 +1,18 @@ +#!/sbin/openrc-run + +depend() { + need net + after ntp-client ntpd +} + +start() { + ebegin "Starting GANGLIA gmond: " + start-stop-daemon --start --quiet --exec /usr/sbin/gmond + eend $? "Failed to start gmond" +} + +stop() { + ebegin "Shutting down GANGLIA gmond: " + start-stop-daemon --stop --quiet --exec /usr/sbin/gmond + eend $? "Failed to stop gmond" +} diff --git a/sys-cluster/ganglia/files/gmond.rc-2 b/sys-cluster/ganglia/files/gmond.rc-2 new file mode 100644 index 0000000..fb07e19 --- /dev/null +++ b/sys-cluster/ganglia/files/gmond.rc-2 @@ -0,0 +1,28 @@ +#!/sbin/openrc-run + +PIDFILE=/var/run/gmond.pid + +depend() { + need net + after ntp-client ntpd +} + +start() { + ebegin "Starting GANGLIA gmond: " + start-stop-daemon \ + --start --quiet \ + --exec /usr/sbin/gmond \ + --pidfile ${PIDFILE} \ + -- \ + --pid-file=${PIDFILE} + eend $? "Failed to start gmond" +} + +stop() { + ebegin "Shutting down GANGLIA gmond: " + start-stop-daemon \ + --stop --quiet \ + --pidfile ${PIDFILE} \ + --exec /usr/sbin/gmond + eend $? "Failed to stop gmond" +} diff --git a/sys-cluster/ganglia/ganglia-3.7.2.ebuild b/sys-cluster/ganglia/ganglia-3.7.2.ebuild new file mode 100644 index 0000000..35687f4 --- /dev/null +++ b/sys-cluster/ganglia/ganglia-3.7.2.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_OPTIONAL=1 + +inherit distutils-r1 eutils multilib systemd + +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" + +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="minimal pcre python examples" + +DEPEND="dev-libs/confuse + dev-libs/expat + >=dev-libs/apr-1.0 + net-libs/libnsl:0= + !dev-db/firebird + pcre? ( dev-libs/libpcre ) + python? ( ${PYTHON_DEPS} )" + +RDEPEND=" + ${DEPEND} + !minimal? ( net-analyzer/rrdtool )" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +src_prepare() { + if use python && ! use minimal; then + pushd gmetad-python >/dev/null || die + distutils-r1_src_prepare + popd >/dev/null || die + fi +} + +src_configure() { + if use python; then + python_setup + fi + + econf \ + --with-systemdsystemunitdir=$(systemd_get_unitdir) \ + --enable-gexec \ + --sysconfdir="${EPREFIX}"/etc/${PN} \ + --enable-static=no \ + $(use_enable python) \ + $(use_with pcre libpcre) \ + $(use_with !minimal gmetad) +} + +src_compile() { + default_src_compile + + if use python && ! use minimal; then + pushd gmetad-python >/dev/null || die + distutils-r1_src_compile + popd >/dev/null || die + fi +} + +src_install() { + local exdir=/usr/share/doc/${P} + + emake DESTDIR="${D}" install || die + + newinitd "${FILESDIR}"/gmond.rc-2 gmond + doman {mans/*.1,gmond/*.5} || die "Failed to install manpages" + dodoc AUTHORS INSTALL NEWS README || die + + dodir /etc/ganglia/conf.d + use python && dodir /usr/$(get_libdir)/ganglia/python_modules + gmond/gmond -t > "${ED}"/etc/ganglia/gmond.conf + + if use examples; then + insinto ${exdir}/cmod-examples + doins gmond/modules/example/*.c + if use python; then + # Installing as an examples per upstream. + insinto ${exdir}/pymod-examples + doins gmond/python_modules/*/*.py + insinto ${exdir}/pymod-examples/conf.d + doins gmond/python_modules/conf.d/*.pyconf + fi + fi + + if ! use minimal; then + insinto /etc/ganglia + doins gmetad/gmetad.conf + doman mans/gmetad.1 + + newinitd "${FILESDIR}"/gmetad.rc-2 gmetad + keepdir /var/lib/ganglia/rrds + fowners nobody:nobody /var/lib/ganglia/rrds + + if use python; then + pushd gmetad-python >/dev/null || die + distutils-r1_src_install + popd >/dev/null || die + newinitd "${FILESDIR}"/gmetad-python.rc gmetad-python + fi + fi +} + +src_test() { + default_src_test + + if use python && ! use minimal; then + pushd gmetad-python >/dev/null || die + distutils-r1_src_test + popd >/dev/null || die + 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 "The web frontend for Ganglia has been split off. Emerge" + elog "sys-cluster/ganglia-web if you need it." +} diff --git a/sys-cluster/ganglia/metadata.xml b/sys-cluster/ganglia/metadata.xml new file mode 100644 index 0000000..7698f3c --- /dev/null +++ b/sys-cluster/ganglia/metadata.xml @@ -0,0 +1,11 @@ + + + + + manuel@fritteli.ch + Manuel Friedli + + + ganglia + +