From e9955724589791e27c51b4aef6afdd669de40a74 Mon Sep 17 00:00:00 2001 From: Justin Lecher Date: Wed, 24 Dec 2014 12:33:42 +0000 Subject: [PATCH] net-analyzer/munin: Version BUmp, #512070 Package-Manager: portage-2.2.15/cvs/Linux x86_64 Manifest-Sign-Key: 0xB9D4F231BD1558AB! --- net-analyzer/munin/ChangeLog | 7 +- net-analyzer/munin/Manifest | 27 +- net-analyzer/munin/munin-2.0.25.ebuild | 407 +++++++++++++++++++++++++ 3 files changed, 434 insertions(+), 7 deletions(-) create mode 100644 net-analyzer/munin/munin-2.0.25.ebuild diff --git a/net-analyzer/munin/ChangeLog b/net-analyzer/munin/ChangeLog index 9db06643bcbc..a1fc3c6626ea 100644 --- a/net-analyzer/munin/ChangeLog +++ b/net-analyzer/munin/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-analyzer/munin # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.161 2014/11/03 13:25:57 titanofold Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.162 2014/12/24 12:33:37 jlec Exp $ + +*munin-2.0.25 (24 Dec 2014) + + 24 Dec 2014; Justin Lecher +munin-2.0.25.ebuild: + Version BUmp, #512070 03 Nov 2014; Aaron W. Swenson munin-2.0.19.ebuild, munin-2.0.19-r1.ebuild, munin-2.1.9999.ebuild: diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest index 12e7bbb708b0..57c8140e7e6b 100644 --- a/net-analyzer/munin/Manifest +++ b/net-analyzer/munin/Manifest @@ -1,5 +1,5 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 +Hash: SHA512 AUX localstart-munin 94 SHA256 e78cf5a383501a6be56ec4ddbbafa82a715ce76088a3d66e9474b91792ff67dd SHA512 2af51792006acc73aaa39632a76f91938511166db41a28d3fd4353c5c4dee86f2e292d86c04fd6bdbde4c210676e6a2b8d91c7c27b5f1921e362f171d79e6ddf WHIRLPOOL 180594f1860f4a19643ea1136be97b71c1cb0a7d1f19e5c4796f36ddef39fbb3c30053319e49a7f2d272e5c097016eec3de99cf7940f15956ee8a7b663d00a74 AUX logrotate.d-munin.2 532 SHA256 3b2597a52a2dc6b49099be6ab9c685be2ea09ed136666c2c1d56af1883fe4378 SHA512 25cd3017c9edcf07ac8e54b75a7b881255a4043cbe6c5f99320aa87cea00118be03010d9b76e5c214eeac82ebc4e4d3807474c5d112bff23d83238e7650d6563 WHIRLPOOL bc956e4454887cc1f102eb4ac0a563b5317acf9cd83a76b1bf379b2cd06e5518878aded99be04e7c03d79bcda02265864d3b83e65afef76a19da81464154937f @@ -19,15 +19,30 @@ AUX munin.apache.include 604 SHA256 5051ff79220e5ef578e6e5fa66ef8b0a71b72cca6fde AUX munin.apache.include-2.4 577 SHA256 21245e9eb7b759d2d2e65c2d1424da6d8c6fd8f49ec2f30cf72696cfc4227694 SHA512 b07791a4d5b822b5d0ad84ddbea3444cc1475cee8ee20f62dbb5f3a1792b71dba995e412433d30b3c295e40ad5346528d25e04438ec2dfa535983aae9198cea4 WHIRLPOOL 90a166f400e8336792fabcbcb786169dc5ed6b5fe9151ac5aef40f85c8d3f2724a6fffe17e41d90f31948a9462fc619fe45747caf8f62d55f6d494d48a7a2bb1 DIST munin-2.0.19-gentoo-1.tar.xz 10884 SHA256 e9fcec3cd671a0008348ab3f33e435073bbfca328e3f026552d18d88b131ae30 SHA512 f4d4b20c9250f1f7a2772da7541a1cb60c6f0e64804a5f40452c4e54534a6d47ece583ef1a755e71bd98e474b6b1842dcad5d8165e558ccf2b88669e4a090599 WHIRLPOOL 5f796db3b2f29b069b77f2d06f530221272675af0d65423a945010ebef742a623a9bff0e9c705e8db94c5ab2ec81a0a10a46884afc23d92fc640b3ae0d45e91b DIST munin-2.0.19.tar.gz 1335496 SHA256 13db9b00d432b92907d61f9f2bd18c2aafca03b2a6e257222fff17aa4ed02896 SHA512 c08ab54634587bb2abc4e55e52114d417ce9f3d2b421c4f44c5df3506238ecd80d1f27359346404a4eab7d779a42bc3438ebb75210e979662f261de1521a464b WHIRLPOOL 288ac49ae86aff13591cbe7357afe963d6da95b3915d94ea3887a63347dbd45969d3a86d8378d2c6ddcb3b8ad24f27ff95ce2567cdfbb216e6584219db7800e1 +DIST munin-2.0.25-gentoo-1.tar.xz 10964 SHA256 725a91fe3690a045439fd3d2541de9b67b4fe3628a6c6ec838b690c019f04922 SHA512 9065c24fc7942d6e02e7d2a7d3be516852816164c5ada496aa2703f1e5a3a41bd7f00302348496d58fad7d39d8bb2b84cfa2a2481e92834c6d1958bb153c023f WHIRLPOOL 318b0df95352b2c8a0181ef577179d380b8002288e79ac37d903603fce482ad2f0cbe5e0797495e4d1cb50c765b80daadad8d861ef83d6db89f47effeb7d6183 +DIST munin-2.0.25.tar.gz 1337586 SHA256 6832bc5839d03639e4309178d9370697fc8a80a83d9b6653953f40161e949694 SHA512 a29563cfef26b05237b3813b44b5582563f2f75477ae3c076540cfb4f3e83f89193bd05fd7eae208d9d1bae58aff75977cc2c5f4de81225f0cbb2ba2c41effa9 WHIRLPOOL 14e7fac3d91025816fa31823484673726441f186ded0bb2a6dc6f4d8f3976211a6fc49c20c7faac5d7078d6f9963766517ee2c9b22820b1164333cb6def106b8 EBUILD munin-2.0.19-r1.ebuild 12108 SHA256 299b080732c99d8793d7bf6c4ed786f214eebf551416d20791feda70d0207011 SHA512 23f43018bac42eb6c1f63211559dc107b1ae2965b42f285f288a00a354d3ea79f59e33c4eef0c3e1f48491f8471667c4b30382dcba1bc4e6dff86ced6f759caf WHIRLPOOL c5db32d1961450d7358a0d5bd500dc8a1e167a60b0c98ab3631459c29e41733b8cab5cdc478a24902b862fd387b3f37910a551740744e2b821c98c12133b7be4 EBUILD munin-2.0.19.ebuild 12105 SHA256 e29b84609743dfb53a3bd23c808b6faae7306c9caa4d2c29c1a9dd0bbacd104c SHA512 ce33a79751ac4bd89ddda9ed251b0621b4f9e1fab15e250488cb00ade6dc994b036c0508d070f8f4fa9ab6068729442cf952ca8e386c111ab9a1cfae84b51427 WHIRLPOOL 82aa3b55bce2233b8e2cd1e5263f53b21410c697065d2373c754ec7bf10ab4134e1ab2c88a1532f4168b5b68124568780d490f868438c69000790f92499c09f1 +EBUILD munin-2.0.25.ebuild 12163 SHA256 130cb8d608862f4d3f0fdf8b0732d9fc37e494eb021ae61022088a74e79b8e8d SHA512 6c8c7210d27b81c8a2a059b97fbe8e3122f79bef5cd68a1a66322ea0d0ea422d77f7f60449701932bdcb55dad20a9a85490bcbb0af3443a4b770d75a4f96d5be WHIRLPOOL 089e726d6fca301f3df5057b618d8d067a88ea39d5d6db978e5ea06c4d901c72cf69aca74eefadd59f7ca3a9551d8f433c620158e2a83fa83247199435609210 EBUILD munin-2.1.9999.ebuild 11579 SHA256 f7dfa4a7faa91ecd026562c480ef1592d4d921c622ff6f9bb670bfc3ef9be2f1 SHA512 a9b5fd119eb33dbb7165ee76bc37b4d30c96acf03c0ce72044a0140cdf79ce173f9eedbdfa3e8b066fe14f2030f1d87f413467ffa99bf322f0dd092bfb901292 WHIRLPOOL 9f39b0f7bb6a32bdd20bd6eda5f5664aa6b60e7987ebaa70091374a569cc17ab63ffc618068497d804ff11ff20ccb1368114e43e2926f667aaed7e7418b6042f -MISC ChangeLog 34023 SHA256 e16c526e0fc41c0a593c0bcb6f4b608adf207e6f5df345176c9424eba79636e4 SHA512 94c0b6b86a649e906885901b3d3ff6a55f5199d52b6834b07914e4cb81d67f32018c5d90afa8093f050b25b5526fb179aadd1b6a10cb7079c9fe60159f8c2706 WHIRLPOOL a7a584cb1f26dfc480d295e607d7bdcabf6534df97343bc85601fe5949163a6b1a9316fa7a2c7ccaec56904b7846fb5e6cd0b16504c0ef17b34db4cec09434a1 +MISC ChangeLog 34140 SHA256 098d8319bc39e918299e5cd5ac8e96dc43c6357ba32442b042a6dd33db31d25b SHA512 54bc9d34daae97397b23b1bcb2b2c014ac9ed85060328ce278889685d78036c4abc4099fb87e377a0804d8b743b1e4a1e06ef6b7cad853be25af5f8db1ee3345 WHIRLPOOL fcf8e1da54a1a20ba43a78f4f2485021c6c35320cad1f6073082ae394a044135f8093d1b04108f2b8344c03e9f5b511ddf3e997d357a4bd1e0213906f4513ae7 MISC metadata.xml 3824 SHA256 5b838f6ccb778750cbcc41052480daaa9ebcbee5ee38ab66b054472b6313d177 SHA512 277f3ab9589982617b60ce8ea63802288dc4ff5368416a942f3670804a8e0a4cd481b2d0ff91302be040d2aba4f66a2e11b0c181164e6285dc33b150b263da60 WHIRLPOOL 7486ffd90f12e32a9feb557b4937397317cfd4325e5ffdf1dbaa749a90f3c47f797baea306585ac4a200e4a23901da1de10a9f0b951a15bd27f8a7c876c504a5 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2 +Version: GnuPG v2.0 -iF4EAREIAAYFAlRXgmgACgkQVxOqA9G7/aDJIgD/dDOdC8GZ+D5vQfJLkjMXGmSa -7IWT6dNirnzfvExlUGEBAIBI532Z00CzdyC9ytK+XBnMCu3dVWVkD9QjDewboxJo -=hrhJ +iQJ8BAEBCgBmBQJUmrMtXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyQ0JDQjFGMzBDQ0UxMjFGNENDNDgxMDdC +OUQ0RjIzMUJEMTU1OEFCAAoJELnU8jG9FVirs98P/1bXGfVdF9UDKBlE2GdUMpJ+ +ow4xFVgyO/HnScxePUj/hpaHvj2f6n8e3XN9jECKBTSEd43y89ZDPAfQzdNn5Kq5 +5YM7Czjom8wZx55mP0QS7y08jGUo2GGdq2evMvTglbvb1dcXwUKFrQ2mqU/kTQtM +VCLTBUBsuaq446BT/41E0NEbi/CCeRwiciRT8ISVj2g1WqIcxOeE7QoWi+6O0aPx +akCNMGiVH4YHb+0TmATD5K8S9HgcFV5g6vtHwr4G+DHFELHQojbtK40M2x7NqObb +IKEarJz8gdRq8BJ0/JSWIQtAAMs7pQ2QxBV79KilfZhj4pOVZbCdKCZIhelDVHjC +c5UZ5h6XvlbYxC590JGgll8Eqx/yLT/Sp0UPRKeYGs2W9W4xsOcGLBfguC1CqZYr +2j3z+imtW0TIPfsjjTrBaSzsu4UXKysrRMfT8B/4SHc+Lu+5roWJ7iFyrFP9r17T +CHkMCOJVk921KTUkkhLYZTQTvHk0oUPkewXzH8hw66fuHY0/Au7tYVBUphLooj8a +67G/V/zGOHyTYekYRVmsIPENaBfRbMFYMJxukxEA2NDYD7g1XfDKitZYWGPyDwFH +ZMfM7gdbLFlCvTrlVoP2t6WIcYv1yGpDdOnE+RRgr4fdwYK+v0XQUrHgzTPp8Sq7 +5C+Uf0MV+MKDE3hIW0FB +=ewsx -----END PGP SIGNATURE----- diff --git a/net-analyzer/munin/munin-2.0.25.ebuild b/net-analyzer/munin/munin-2.0.25.ebuild new file mode 100644 index 000000000000..355661a955fb --- /dev/null +++ b/net-analyzer/munin/munin-2.0.25.ebuild @@ -0,0 +1,407 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.0.25.ebuild,v 1.1 2014/12/24 12:33:37 jlec Exp $ + +EAPI=5 + +PATCHSET=1 + +inherit eutils user java-pkg-opt-2 systemd + +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/~jlec/distfiles/${P}-gentoo-${PATCHSET}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~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] + 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-DNS + 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 + apache? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) + asterisk? ( dev-perl/Net-Telnet ) + cgi? ( dev-perl/FCGI ) + dhcpd? ( + >=net-misc/dhcp-3[server] + dev-perl/Net-IP + dev-perl/HTTP-Date + ) + doc? ( dev-python/sphinx ) + http? ( dev-perl/libwww-perl ) + irc? ( dev-perl/Net-IRC ) + kernel_linux? ( sys-process/procps ) + memcached? ( dev-perl/Cache-Memcached ) + mysql? ( + virtual/mysql + dev-perl/Cache-Cache + dev-perl/DBD-mysql + ) + postgres? ( dev-perl/DBD-Pg virtual/postgresql ) + ssl? ( dev-perl/Net-SSLeay ) + syslog? ( virtual/perl-Sys-Syslog ) + !minimal? ( + dev-perl/HTML-Template + dev-perl/IO-Socket-INET6 + dev-perl/URI + >=net-analyzer/rrdtool-1.3[graph,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 + ) + !> "${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 + use doc && emake -C doc html +} + +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 || die + + # remove the plugins for non-Gentoo package managers; use -f so that + # it doesn't fail when installing on non-Linux platforms. + rm -f "${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.19 munin-node + newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node + + newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd + + dodir /usr/lib/tmpfiles.d + cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF + d /run/munin 0700 munin munin - - + EOF + + systemd_dounit "${FILESDIR}"/munin-async.service + systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} + systemd_dounit "${FILESDIR}"/munin-html.{service,socket} + systemd_dounit "${FILESDIR}"/munin-node.service + + 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 || die + docinto html + dodoc -r * + cd "${S}" || die + fi + + dodir /etc/logrotate.d/ + sed -e "s:@CGIUSER@:$(usex apache apache munin):g" \ + "${FILESDIR}"/logrotate.d-munin.3 > "${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 + # 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 \ + -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ + -i "${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." + 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/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 +} -- 2.26.2