diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2013-02-01 16:17:46 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2013-02-01 16:17:46 +0000 |
commit | cf8e422379a18ef01b833fe1624731c615df5447 (patch) | |
tree | 77a087c4987bf5d52b569642aa351eba0c41dfa2 /net-analyzer | |
parent | Drop sgml from metadata. (diff) | |
download | historical-cf8e422379a18ef01b833fe1624731c615df5447.tar.gz historical-cf8e422379a18ef01b833fe1624731c615df5447.tar.bz2 historical-cf8e422379a18ef01b833fe1624731c615df5447.zip |
Version bump.
Package-Manager: portage-2.2.0_alpha161/cvs/Linux x86_64
Manifest-Sign-Key: 0x1CD13C8AD4301342
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/munin/ChangeLog | 7 | ||||
-rw-r--r-- | net-analyzer/munin/Manifest | 19 | ||||
-rw-r--r-- | net-analyzer/munin/munin-2.0.11.ebuild | 390 |
3 files changed, 407 insertions, 9 deletions
diff --git a/net-analyzer/munin/ChangeLog b/net-analyzer/munin/ChangeLog index a1d1238a57e2..c2f5a33a507f 100644 --- a/net-analyzer/munin/ChangeLog +++ b/net-analyzer/munin/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-analyzer/munin # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.133 2013/01/23 19:22:41 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.134 2013/02/01 16:16:30 flameeyes Exp $ + +*munin-2.0.11 (01 Feb 2013) + + 01 Feb 2013; Diego E. Pettenò <flameeyes@gentoo.org> +munin-2.0.11.ebuild: + Version bump. *munin-2.0.10-r2 (23 Jan 2013) diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest index 2ec52d7d8483..ba8fcc4ca4a4 100644 --- a/net-analyzer/munin/Manifest +++ b/net-analyzer/munin/Manifest @@ -11,21 +11,24 @@ AUX munin.apache.include 604 SHA256 5051ff79220e5ef578e6e5fa66ef8b0a71b72cca6fde AUX munin.apache.include-2.4 577 SHA256 21245e9eb7b759d2d2e65c2d1424da6d8c6fd8f49ec2f30cf72696cfc4227694 SHA512 b07791a4d5b822b5d0ad84ddbea3444cc1475cee8ee20f62dbb5f3a1792b71dba995e412433d30b3c295e40ad5346528d25e04438ec2dfa535983aae9198cea4 WHIRLPOOL 90a166f400e8336792fabcbcb786169dc5ed6b5fe9151ac5aef40f85c8d3f2724a6fffe17e41d90f31948a9462fc619fe45747caf8f62d55f6d494d48a7a2bb1 DIST munin-2.0.10-gentoo-1.tar.xz 11688 SHA256 8e7e77d056b687bc0fd588274b7da9bad8682446374d92d82cb622580eb7e590 SHA512 7b4fbabe9303ea18659c408d34c310036761fc4c79f0beca06eb3715938347f8b6684dcbf53ed2051d60eb9e625872f05f5c574892e79abdb3c331b78a1dcf8b WHIRLPOOL a9dd95b9c3b69e43af4b083abe80bd6c2858c78bc1c64827bac18d4b24628ca6aa4948aece74a407a454eaa252a81d482ac4c0c1fd91768e1c2fef7698d67df2 DIST munin-2.0.10.tar.gz 1330859 SHA256 ba5339607a584ae5fa5c2a35de452f024574ea2558ebde4a4feee95f1ff219af SHA512 7976c9bf00c213270baec7c0832fdec50b7560006ed1a738ac4dcb33068c1bdf9dbd7f70a4e970d06121bb637e2c54f2e90a7a52d343c1ed75f5129888ba575d WHIRLPOOL 27e1196ffc288de5064c48175b7b739aa8a12164c1a300912953f666dde825a16deed120a3b8b19151496df4ed4b42b10581455963eb6218b8960e053f5a5eb3 +DIST munin-2.0.11-gentoo-1.tar.xz 10888 SHA256 d7d909fdff948fd1b22b1e1e5cd395192feca8baf91d6af6c4b4710ca2c880ea SHA512 5b83dfe33902b38d4abf28700c777748ee3a47b8f3e1886f34abe5bd5822e688a4812ec03955d045a4ac82ae3fd680fb501495cef33e803d39b5e859a18e8fbf WHIRLPOOL fed07a1bf307bf6c44424a1771a66b8ab5435611c41778d65eb01395655eed4190ee7896cd406a63c67be691fa0cf46b1dd1daf7a876071942659047b2175653 +DIST munin-2.0.11.tar.gz 1331664 SHA256 c6365c981ab7f57f842aebd912b601cd6130eb0076391d217e2f5b26466a3935 SHA512 e5ba2fc4161615979938a936f4eb34616ad9eeb9e3c3fcd72dd43c96e51a4a3f66098d201c87a09c77d2f33d69a8a0324ff2402034d12a2ddf6b892d01e10935 WHIRLPOOL 309d7310d225c0da89df5b6264f8a804e70cb0fdaf89676c491b924cbbb1095913ffebc901b314f2a99b6f72af1ec6083d9a573cac5510974ad0cea688ef5d60 DIST munin-2.0.8-patches-4.tar.xz 16600 SHA256 badd20ae9d7d74667b6a96764c8caaf156e34aa22be5bb08c10535270a99f3d3 SHA512 81084c9b46127f425c89ff76a0c807bbc36859b2fd7ac37734bd202cae92610333f4793aa4630595147d96ad9099da99283c7bcf107351d6ec4931e64451a415 WHIRLPOOL 7e7aed4f0e23f88b0fa2eba548af5573d3e1fab20a910a8568c641ae539c58acc9e020eec01a3323243d6f6ae6f69dd7200818df3a14b5ca3b7100557fc4c8dd DIST munin-2.0.8.tar.gz 1328805 SHA256 ae645daee35214c1ba3d771d990fa781df741751b7b79e9d9fe48c583890dca6 SHA512 f767e586aee68c389ce0ae250376bc43d6bfe73df8e193bb7ba8b373d887301e0c1d3574c3fe456be3b93dc86cc8ec8ce27e3c36836a0048b80afb55a3a3cc1e WHIRLPOOL 312f006c21af98f5d9e548a77d43fe7396dcc69072e06faedb3d8262e70599da91bfecdfd06e859d6ff8706506e73308cbcac38e658a28e428fd50399f3f3c3e EBUILD munin-2.0.10-r2.ebuild 11784 SHA256 6b987a4b28978bf49127260cd0f8676bfd3f6d71018063dd01b406e0a36b32de SHA512 938c38ab8b6cc8b14a0cdf8c701cb381cf148df6791ed2760dd27ee8abfdff092cb1364559d04ae2332f8c6ace4c8f2bb4f085e1492b75c81cacf57454309d7f WHIRLPOOL 54190d873d4c67e0d1923bbc1ced3e4acf2ca8f727f4a3365e708117f9a56bc98f67ecff44ba328d911585715cd1df389d8cad603a669edb1c582b3aa8a9c621 +EBUILD munin-2.0.11.ebuild 11781 SHA256 9eb1440962bf8f789a43fd49f468f2b48162636667894914d81f8549409a107e SHA512 34f8a506aff3e10c235f0eba8bb624c877f66035b25a0d2c8b1589d7c231aac4e598aa7e387ec852fbf2fe78b9727973076394dab6d5f38d4b4c5fa56880f528 WHIRLPOOL bce63ca622089732a86f27921c3daa664ab6194a3297e3ebc717eba51c9498b36f415f89e685007d0a1d16da84dffd4a787e794af11a5893baa0f4901eb9db40 EBUILD munin-2.0.8-r2.ebuild 11318 SHA256 d37a81dbb917c080a95715b94a59323788122134950687007359f01a670e2910 SHA512 e63dc6a07ccb81c03ede5b0a3707c59818e1f5fa1e6a4c81195d48747093666384ad2f2a059d14afeaf2179bc126e01aecfce9d24852be4aa1c24d3fc7421e5f WHIRLPOOL 1d59a9da10590b8cd659d1df4bb81d1e926191450034f867b61e27c47f11fde4c30abfcb7632aa26c205a126b26f75420528ea13c9253f8bbcd7b039aa5c2452 EBUILD munin-2.1.9999.ebuild 11572 SHA256 c7b0b7164268e6dced4a6c57a7725925ab639bfbf4a010bb0f345bac2533f296 SHA512 bbb13b562cc49965d6d2f821127987cbca7f92cbede7eaaf104dc69a28d211950add95d65fad67c721628578cec3e82a808aef6c6fbaf32a2a9b114551e390ca WHIRLPOOL ce77ad52beabf8189d707fd3d0d3273e5c5bac380f1095868805e01f18dcc2c40125e795cadf8c873950dc23048cae7b46f663cdb83c1228c65cfe47c25137da -MISC ChangeLog 29672 SHA256 d161de8bb4c3a6547178c791278b2b2deaaf6c16714ad2f0af2a71e83287d59a SHA512 f7b8c88b03e35e85b5474da9f6784231c00196062c27c81bb2e66ba373c630f837676fa2a639f8ebe8f1ee040f68684149fda9b713dc274870bf218e58953eee WHIRLPOOL 910423e4d6fd423de4c1686aa77a1fdc04abc9e0e6e56d515b13c092fb278d95135e383e0d4832fcfab1c3edcdeee53d5d6bea52ee4f9a2e0c1576ae33e0e15c +MISC ChangeLog 29796 SHA256 e3cd3b504d8e7ec0590baf7caff1f85e694f1abf07f7078e22908c850cc5fde0 SHA512 36f64157fec44d1b85c715dfb68c6937bfe35719e75a9befb3770d6d94a852a6d4ebbb85fe8ef73f714e6e0dfb0c4a2111f057420f3a2bc82d5d0bfc16e47150 WHIRLPOOL a98b32e41953c488427ac8a1d24d6c427644ed075fba6609a9697d81da33a2214bab7318010ea761b062a6a8d43924ce73d1b374b16e89d3497fea39f60d508a MISC metadata.xml 3824 SHA256 5b838f6ccb778750cbcc41052480daaa9ebcbee5ee38ab66b054472b6313d177 SHA512 277f3ab9589982617b60ce8ea63802288dc4ff5368416a942f3670804a8e0a4cd481b2d0ff91302be040d2aba4f66a2e11b0c181164e6285dc33b150b263da60 WHIRLPOOL 7486ffd90f12e32a9feb557b4937397317cfd4325e5ffdf1dbaa749a90f3c47f797baea306585ac4a200e4a23901da1de10a9f0b951a15bd27f8a7c876c504a5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQEcBAEBCAAGBQJRADiQAAoJEBzRPIrUMBNCsaUH/3UNTSO3pxjVk+qC9F7MzVsI -Q48XPiuXjDsCjRDrZpInVSi49QaYU1/yJv9GGZfCeysWGoPZljvwH943T/UTMH1I -uSDVdQn9oztnFeC74uRUC3P40mpL+62jkQyR4U1s6TWrV5AbUiRqSWcRqJb3WfmZ -0tHvbLphBCFvJwm0UUJfwwCwKAPSPII2xYereoCa5X3jTvRObROI/QK4wGv5iC+R -nmfLa2sIXdKtcUBsGKuNe4IMZTPU2YafCZNjblnIP1vD9qt/ahq8zg5s4H1AM1z6 -SbNYKjRxLGalBsRh+mstFYdjoaf2LdVeTsQxG3k0xRYvVrdGSxT3TUfFXFc7ezA= -=5uNf +iQEcBAEBCAAGBQJRC+qoAAoJEBzRPIrUMBNCQ8EIAJEjgmLbcfcr+EKljeEHqSCO +HDwOFYsccNeF+J8WgOi1HGaWIm6FW8RG+O59xq7NdctK0ZmnVbXnAe58ssVfubgE +u/65wMIc9j20FplEYFd716M4Hh+dhMSARj7pz2NYQoZsB/tKRPrNctHz90+AQ0Hb +HZ3nZZGjV8TzmtTVzJADzat+ZOUGpRTj7vsHyML1iA2CGxV/RuNkG/LezfIr3ip0 +ATF/QrP0bH/8ZAmT/hClH8f2I4BBLTn/bKqmuJ0KyFjsIGs5oRUduAfS8J8DIS1y +uX2WCr31jv3CnU9v9N750v2Ni0SVX7uoC6zlgnG00WLDqMIVhqBXoUuXQkkiKNQ= +=PwcC -----END PGP SIGNATURE----- diff --git a/net-analyzer/munin/munin-2.0.11.ebuild b/net-analyzer/munin/munin-2.0.11.ebuild new file mode 100644 index 000000000000..8f25e28c4d92 --- /dev/null +++ b/net-analyzer/munin/munin-2.0.11.ebuild @@ -0,0 +1,390 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.0.11.ebuild,v 1.1 2013/02/01 16:16:30 flameeyes Exp $ + +EAPI=5 + +PATCHSET=1 + +inherit eutils user 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}-gentoo-${PATCHSET}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~mips ~ppc ~x86" +IUSE="asterisk irc java memcached minimal mysql postgres ssl test cgi ipv6 syslog ipmi http dhcpd doc apache" +REQUIRED_USE="cgi? ( !minimal ) apache? ( cgi )" + +# 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. +# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. +DEPEND_COM="dev-lang/perl[berkdb] + sys-process/procps + doc? ( dev-python/sphinx ) + 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 ) + apache? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) + syslog? ( virtual/perl-Sys-Syslog ) + http? ( dev-perl/libwww-perl ) + dhcpd? ( + >=net-misc/dhcp-3[server] + dev-perl/Net-IP + dev-perl/HTTP-Date + ) + dev-perl/DBI + dev-perl/DateManip + dev-perl/File-Copy-Recursive + dev-perl/List-MoreUtils + dev-perl/Log-Log4perl + dev-perl/Net-CIDR + dev-perl/Net-Netmask + dev-perl/Net-SNMP + 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 + dev-perl/IO-Socket-INET6 + dev-perl/URI + >=net-analyzer/rrdtool-1.3[perl] + virtual/ssh + )" + +# 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-Deep + dev-perl/Test-LongString + dev-perl/Test-Differences + dev-perl/Test-MockModule + dev-perl/Test-MockObject + dev-perl/File-Slurp + dev-perl/IO-stringy + dev-perl/IO-Socket-INET6 + )" +RDEPEND="${DEPEND_COM} + virtual/awk + ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) + java? ( + >=virtual/jre-1.5 + || ( net-analyzer/netcat6 net-analyzer/netcat ) + ) + !minimal? ( + virtual/cron + media-fonts/dejavu + ) + !<sys-apps/openrc-0.11.8" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup munin + enewuser munin 177 -1 /var/lib/munin munin + enewuser munin-async -1 /bin/sh /var/spool/munin-async + esethome munin-async /var/spool/munin-async + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + epatch "${WORKDIR}"/patches/*.patch + + java-pkg-opt-2_src_prepare +} + +src_configure() { + local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' + use cgi || cgidir="${T}/useless/cgi-bin" + + local cgiuser=$(usex apache apache munin) + + 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} +CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi +CGIUSER=${cgiuser} +DBDIR=\$(DESTDIR)/var/lib/munin +DBDIRNODE=\$(DESTDIR)/var/lib/munin-node +SPOOLDIR=\$(DESTDIR)/var/spool/munin-async +LOGDIR=\$(DESTDIR)/var/log/munin +PERLSITELIB=$(perl -V:vendorlib | cut -d"'" -f2) +JCVALID=$(usex java yes no) +STATEDIR=\$(DESTDIR)/run/munin +EOF +} + +# parallel make and install need to be fixed before, and I haven't +# gotten around to do so yet. +src_compile() { + emake -j1 + if use doc; then + emake -C doc html + fi +} + +src_test() { + if [[ ${EUID} == 0 ]]; then + eerror "You cannot run tests as root." + eerror "Please enable FEATURES=userpriv before proceeding." + return 1 + fi + + local testtargets="test-common test-node test-plugins" + use minimal || testtargets+=" test-master" + + LC_ALL=C emake -j1 ${testtargets} +} + +src_install() { + local dirs=" + /var/log/munin + /var/lib/munin/plugin-state + /etc/munin/plugin-conf.d + /etc/munin/plugins" + use minimal || dirs+=" /etc/munin/munin-conf.d/" + + keepdir ${dirs} + fowners munin:munin ${dirs} + + # 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}" $(usex minimal install-minimal install) + + # we remove /run from the install, as it's not the package's to deal + # with. + rm -rf "${D}"/run + + # remove the plugins for non-Gentoo package managers + rm "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die + + insinto /etc/munin/plugin-conf.d/ + newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node + + newinitd "${FILESDIR}"/munin-node_init.d_2.0.7 munin-node + newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node + + newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd + + cat - >> "${T}"/munin.env <<EOF +CONFIG_PROTECT=/var/spool/munin-async/.ssh +EOF + newenvd "${T}"/munin.env 50munin + + dodoc README ChangeLog INSTALL + if use doc; then + cd "${S}"/doc/_build/html + dohtml -r * + cd "${S}" + fi + + dodir /etc/logrotate.d/ + sed -e "s:@CGIUSER@:$(usex apache apache munin):g" \ + "${FILESDIR}"/logrotate.d-munin.2 > "${D}"/etc/logrotate.d/munin + + dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ + + if use syslog; then + sed -i -e '/log_file/s| .*| Sys::Syslog|' \ + "${D}"/etc/munin/munin-node.conf || die + fi + + # Use a simpler pid file to avoid trouble with /run in tmpfs. The + # munin-node service is ran as user root, and only later drops + # privileges. + sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ + "${D}"/etc/munin/munin-node.conf || die + + keepdir /var/spool/munin-async/.ssh + touch "${D}"/var/spool/munin-async/.ssh/authorized_keys + fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} + fperms 0750 /var/spool/munin-async{,/.ssh} + fperms 0600 /var/spool/munin-async/.ssh/authorized_keys + + if use minimal; then + # This requires the presence of munin-update, which is part of + # the non-minimal install... + rm "${D}"/usr/libexec/munin/plugins/munin_stats + else + dodir /usr/lib/tmpfiles.d + cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF +d /run/munin 0700 munin munin - - +EOF + + # 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 + + keepdir /var/cache/munin-cgi + touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log + fowners $(usex apache apache munin) \ + /var/cache/munin-cgi \ + /var/log/munin/munin-cgi-{graph,html}.log + + if use apache; then + insinto /etc/apache2/vhosts.d + newins "${FILESDIR}"/munin.apache.include munin.include + newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include + fi + else + sed -i -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' "${D}"/etc/munin/munin.conf || die + fi + + keepdir /var/lib/munin/.ssh + cat - >> "${D}"/var/lib/munin/.ssh/config <<EOF +IdentityFile /var/lib/munin/.ssh/id_ecdsa +IdentityFile /var/lib/munin/.ssh/id_rsa +EOF + + fowners munin:munin /var/lib/munin/.ssh/{,config} + fperms go-rwx /var/lib/munin/.ssh/{,config} + + 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 + + # remove .htaccess file + find "${D}" -name .htaccess -delete || die + 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 /usr/share/${PN}/f?crontab" + einfo "If you have a large site, you may wish to customize it." + read + + ebegin "Setting up cron ..." + 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 + eend $? + + einfo "Press enter to set up the SSH keys used for SSH transport" + read + + # generate one rsa (for legacy) and one ecdsa (for new systems) + ssh-keygen -t rsa -f /var/lib/munin/.ssh/id_rsa -N '' -C "created by portage for ${CATEGORY}/${PN}" || die + ssh-keygen -t ecdsa -f /var/lib/munin/.ssh/id_ecdsa -N '' -C "created by portage for ${CATEGORY}/${PN}" || die + chown -R munin:munin /var/lib/munin/.ssh || die + chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die + + einfo "Your public keys are available in " + einfo " /var/lib/munin/.ssh/id_rsa.pub" + einfo " /var/lib/munin/.ssh/id_ecdsa.pub" + einfo "and follows for convenience" + echo + cat /var/lib/munin/.ssh/id_*.pub +} + +pkg_postinst() { + elog "Please follow the munin documentation to set up the plugins you" + elog "need, afterwards start munin-node via /etc/init.d/munin-node." + elog "" + elog "To make use of munin-async, make sure to set up the corresponding" + elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" + elog "" + if ! use minimal; then + elog "Please run" + elog " emerge --config net-analyzer/munin" + elog "to automatically configure munin's cronjobs as well as generate" + elog "passwordless SSH keys to be used with munin-async." + fi + elog "" + elog "Further information about setting up Munin in Gentoo can be found" + elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" + + if use cgi; then + chown $(usex apache apache munin) \ + "${ROOT}"/var/cache/munin-cgi \ + "${ROOT}"/var/log/munin-cgi-{graph,html}.log + + if use apache; then + elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" + elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" + elog "host you want it to be served." + elog "If you want to enable CGI-based HTML as well, you have to add to" + elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." + else + elog "Effective CGI support has just been added in 2.0.7-r6." + elog "Documentation on how to use it is still sparse." + fi + fi + + # we create this here as we don't want Portage to check /run + # symlinks but we still need this to be present before the reboot. + if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then + mkdir "${ROOT}"/run/munin + chown munin:munin "${ROOT}"/run/munin + chmod 0700 "${ROOT}"/run/munin + fi +} |