diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-07-25 03:01:06 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-07-25 03:01:06 +0000 |
commit | 6f073390a58ac93263ac553973cf83b355d438e0 (patch) | |
tree | 8a3e4479573eb238c70e2e7ffde7cd1f1472fc91 /net-analyzer/munin | |
parent | Stable for HPPA (bug #426420). (diff) | |
download | gentoo-2-6f073390a58ac93263ac553973cf83b355d438e0.tar.gz gentoo-2-6f073390a58ac93263ac553973cf83b355d438e0.tar.bz2 gentoo-2-6f073390a58ac93263ac553973cf83b355d438e0.zip |
Version bump; this fixes Justin's bugs as well with a new set of patches.
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/munin')
-rw-r--r-- | net-analyzer/munin/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/munin/metadata.xml | 42 | ||||
-rw-r--r-- | net-analyzer/munin/munin-2.0.3.ebuild | 230 |
3 files changed, 258 insertions, 22 deletions
diff --git a/net-analyzer/munin/ChangeLog b/net-analyzer/munin/ChangeLog index 04bcfe57c80f..51b4c4040267 100644 --- a/net-analyzer/munin/ChangeLog +++ b/net-analyzer/munin/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-analyzer/munin # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.80 2012/07/24 16:52:24 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.81 2012/07/25 03:01:06 flameeyes Exp $ + +*munin-2.0.3 (25 Jul 2012) + + 25 Jul 2012; Diego E. Pettenò <flameeyes@gentoo.org> +munin-2.0.3.ebuild, + metadata.xml: + Version bump; this fixes Justin's bugs as well with a new set of patches. 24 Jul 2012; Justin Lecher <jlec@gentoo.org> metadata.xml: Add typo in Diegos email adress diff --git a/net-analyzer/munin/metadata.xml b/net-analyzer/munin/metadata.xml index 018d23379aa2..2532c9195d9d 100644 --- a/net-analyzer/munin/metadata.xml +++ b/net-analyzer/munin/metadata.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <herd>netmon</herd> - <maintainer> - <email>robbat2@gentoo.org</email> - <name>Robin H. Johnson</name> - </maintainer> - <maintainer restrict=">=net-analyzer/munin-2.0.2"> - <email>flameeyes@gentoo.org</email> - </maintainer> - <longdescription lang="en"> + <herd>netmon</herd> + <maintainer> + <email>robbat2@gentoo.org</email> + <name>Robin H. Johnson</name> + </maintainer> + <maintainer restrict=">=net-analyzer/munin-2.0.2"> + <email>flameeyes@gentoo.org</email> + </maintainer> + <longdescription lang="en"> Munin the tool surveys all your computers and remembers what it saw. It presents all the information in in graphs through a web interface. Its emphasis is on plug and play capabilities. After completing a installation a @@ -19,52 +19,52 @@ "what's different today" when a performance problem crops up. It makes it easy to see how you're doing capacity wise on all limited resources. </longdescription> - <use> - <flag name="mysql"> + <use> + <flag name="mysql"> Install the packages required for monitoring MySQL. Disabling the flag does not remove any plugin files. </flag> - <flag name="postgres"> + <flag name="postgres"> Install the packages required for monitoring PostgreSQL. Disabling the flag does not remove any plugin files. </flag> - <flag name="asterisk"> + <flag name="asterisk"> Install the packages required for monitoring Asterisk. Disabling the flag does not remove any plugin files. </flag> - <flag name="irc"> + <flag name="irc"> Install the packages required for monitoring IRC. Disabling the flag does not remove any plugin files. </flag> - <flag name="memcached"> + <flag name="memcached"> Install the packages required for memcached monitoring. Disabling the flag does not remove any plugin files. </flag> - <flag name="java"> + <flag name="java"> Build the Java-based plugins to monitor JMX-compatible applications. Disabling the flag removes the jmx monitoring plugins. </flag> - <flag name="minimal"> + <flag name="minimal"> Only install munin-node and its plugins. This excludes the scripts to generate the web pages and the graphs. </flag> - <flag name="cgi"> + <flag name="cgi"> Install the CGI-compatible scripts for on-the-fly generation of web pages and graphs. This is only meaningful if the minimal USE flag is disabled. </flag> - <flag name="ipv6"> + <flag name="ipv6"> Add support for IPv6 in munin-node. IPv6 support for the master is always enabled, but the node requires a newer version of <pkg>dev-perl/net-server</pkg>, capable of listening to IPv6 sockets. </flag> - <flag name="syslog"> + <flag name="syslog"> Configure the node by default to log on syslog. This requires the presence of <pkg>virtual/perl-Sys-Syslog</pkg>. As of version 2.0.2, the master scripts only log to file, and not to syslog. </flag> - </use> + </use> </pkgmetadata> diff --git a/net-analyzer/munin/munin-2.0.3.ebuild b/net-analyzer/munin/munin-2.0.3.ebuild new file mode 100644 index 000000000000..246197cb930b --- /dev/null +++ b/net-analyzer/munin/munin-2.0.3.ebuild @@ -0,0 +1,230 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.0.3.ebuild,v 1.1 2012/07/25 03:01:06 flameeyes Exp $ + +EAPI=4 + +PATCHSET=1 + +inherit eutils user versionator java-pkg-opt-2 + +MY_P=${P/_/-} + +DESCRIPTION="Munin Server Monitoring Tool" +HOMEPAGE="http://munin-monitoring.org/" +SRC_URI="mirror://sourceforge/munin/${MY_P}.tar.gz + http://dev.gentoo.org/~flameeyes/${PN}/${P}-patches-${PATCHSET}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~mips ~x86" +IUSE="asterisk irc java memcached minimal mysql postgres ssl test +cgi ipv6 syslog" +REQUIRED_USE="cgi? ( !minimal )" + +# Upstream's listing of required modules is NOT correct! +# Some of the postgres plugins use DBD::Pg, while others call psql directly. +# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. +DEPEND_COM="dev-lang/perl + sys-process/procps + asterisk? ( dev-perl/Net-Telnet ) + irc? ( dev-perl/Net-IRC ) + mysql? ( virtual/mysql + dev-perl/Cache-Cache + dev-perl/DBD-mysql ) + ssl? ( dev-perl/Net-SSLeay ) + postgres? ( dev-perl/DBD-Pg dev-db/postgresql-base ) + memcached? ( dev-perl/Cache-Memcached ) + cgi? ( dev-perl/FCGI ) + syslog? ( virtual/perl-Sys-Syslog ) + dev-perl/DBI + dev-perl/DateManip + dev-perl/File-Copy-Recursive + dev-perl/IO-Socket-INET6 + dev-perl/Log-Log4perl + dev-perl/Net-CIDR + dev-perl/Net-Netmask + dev-perl/Net-SNMP + dev-perl/libwww-perl + dev-perl/net-server[ipv6(-)?] + virtual/perl-Digest-MD5 + virtual/perl-Getopt-Long + virtual/perl-MIME-Base64 + virtual/perl-Storable + virtual/perl-Text-Balanced + virtual/perl-Time-HiRes + !minimal? ( dev-perl/HTML-Template + >=net-analyzer/rrdtool-1.3[perl] )" + +# Keep this seperate, as previous versions have had other deps here +DEPEND="${DEPEND_COM} + virtual/perl-Module-Build + java? ( >=virtual/jdk-1.5 ) + test? ( + dev-perl/Test-LongString + dev-perl/Test-Differences + dev-perl/Test-MockModule + dev-perl/File-Slurp + dev-perl/IO-stringy + )" +RDEPEND="${DEPEND_COM} + java? ( >=virtual/jre-1.5 ) + !minimal? ( + virtual/cron + media-fonts/dejavu + )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup munin + enewuser munin 177 -1 /var/lib/munin munin + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + epatch "${WORKDIR}"/patches/*.patch + java-pkg-opt-2_src_prepare +} + +src_configure() { + local cgidir='$(DESTDIR)/var/www/localhost/cgi-bin' + use cgi || cgidir="${T}/useless/cgi-bin" + + cat - >> "${S}"/Makefile.config <<EOF +PREFIX=\$(DESTDIR)/usr +CONFDIR=\$(DESTDIR)/etc/munin +DOCDIR=${T}/useless/doc +MANDIR=\$(PREFIX)/share/man +LIBDIR=\$(PREFIX)/libexec/munin +HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin +CGIDIR=${cgidir} +DBDIR=\$(DESTDIR)/var/lib/munin +LOGDIR=\$(DESTDIR)/var/log/munin +PERLSITELIB=$(perl -V:vendorlib | cut -d"'" -f2) +JCVALID=$(usex java yes no) +EOF +} + +# parallel make and install need to be fixed before, and I haven't +# gotten around to do so yet. +src_compile() { + emake -j1 +} + +src_install() { + local dirs=" + /var/log/munin/ + /var/lib/munin/plugin-state/ + /etc/munin/plugin-conf.d/ + /etc/munin/plugins/" + keepdir ${dirs} + use minimal || dirs+=" /etc/munin/munin-conf.d/" + + local install_targets="install-common-prime install-node-prime install-plugins-prime" + use java && install_targets+=" install-plugins-java" + use minimal || install_targets=install + + # parallel install doesn't work and it's also pointless to have this + # run in parallel for now (because it uses internal loops). + emake -j1 DESTDIR="${D}" ${install_targets} + fowners munin:munin ${dirs} + + insinto /etc/munin/plugin-conf.d/ + newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node + + # make sure we've got everything in the correct directory + newinitd "${FILESDIR}"/munin-node_init.d_2.0.2 munin-node + newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node + dodoc README ChangeLog INSTALL build/resources/apache* + + # bug 254968 + insinto /etc/logrotate.d/ + newins "${FILESDIR}"/logrotate.d-munin munin + + if use syslog; then + sed -i -e '/log_file/s| .*| Sys::Syslog|' \ + "${D}"/etc/munin/munin-node.conf || die + fi + + if ! use minimal; then + exeinto /etc/local.d/ + newexe "${FILESDIR}"/localstart-munin 50munin.start + + # remove font files so that we don't have to keep them around + rm "${D}"/usr/libexec/${PN}/*.ttf || die + + if use cgi; then + sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die + else + sed -i -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' "${D}"/etc/munin/munin.conf || die + fi + + dodir /usr/share/${PN} + cat - >> "${D}"/usr/share/${PN}/crontab <<EOF +# Force the shell to bash +SHELL=/bin/bash +# Mail reports to root@, not munin@ +MAILTO=root + +# This runs the munin task every 5 minutes. +*/5 * * * * /usr/bin/munin-cron + +# Alternatively, this route works differently +# Update once a minute (for busy sites) +#*/1 * * * * /usr/libexec/munin/munin-update +## Check for limit excess every 2 minutes +#*/2 * * * * /usr/libexec/munin/munin-limits +## Update graphs every 5 minutes +#*/5 * * * * nice /usr/libexec/munin/munin-graph +## Update HTML pages every 15 minutes +#*/15 * * * * nice /usr/libexec/munin/munin-html +EOF + + cat - >> "${D}"/usr/share/${PN}/fcrontab <<EOF +# Mail reports to root@, not munin@, only execute one at a time +!mailto(root),serial(true) + +# This runs the munin task every 5 minutes. +@ 5 /usr/bin/munin-cron + +# Alternatively, this route works differently +# Update once a minute (for busy sites) +#@ 1 /usr/libexec/munin/munin-update +## Check for limit excess every 2 minutes +#@ 2 /usr/libexec/munin/munin-limits +## Update graphs every 5 minutes +#@ 5 nice /usr/libexec/munin/munin-graph +## Update HTML pages every 15 minutes +#@ 15 nice /usr/libexec/munin/munin-html +EOF + fi +} + +pkg_config() { + if use minimal; then + einfo "Nothing to do." + return 0 + fi + + einfo "Press enter to install the default crontab for the munin master" + einfo "installation from /var/lib/munin/crontab" + einfo "If you have a large site, you may wish to customize it." + read + + if has_version sys-process/fcron; then + fcrontab - -u munin < /usr/share/${PN}/fcrontab + else + # dcron is very fussy about syntax + # the following is the only form that works in BOTH dcron and vixie-cron + crontab - -u munin < /usr/share/${PN}/crontab + fi +} + +pkg_postinst() { + elog + if ! use minimal; then + elog "To have munin's cronjob automatically configured for you if this is" + elog "your munin master installation, please:" + elog "emerge --config net-analyzer/munin" + fi +} |