summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-12-12 09:45:14 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-12-12 09:45:14 +0000
commit223b8c54908947d442a9d35e7b887f53babb33c5 (patch)
tree0e56b332280955885e9dc07a3b7b641970bb61ed /net-analyzer
parentNon-maintainer commit. Switch to tarball provided by Debian; the original one... (diff)
downloadhistorical-223b8c54908947d442a9d35e7b887f53babb33c5.tar.gz
historical-223b8c54908947d442a9d35e7b887f53babb33c5.tar.bz2
historical-223b8c54908947d442a9d35e7b887f53babb33c5.zip
Remove old version; bump to 2.0.9, adding missing test dependencies and avoiding install of /var/run; restrict tests on the current stable as some dependencies are missing.
Package-Manager: portage-2.2.0_alpha148/cvs/Linux x86_64 Manifest-Sign-Key: 0x1CD13C8AD4301342
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/munin/ChangeLog10
-rw-r--r--net-analyzer/munin/Manifest20
-rw-r--r--net-analyzer/munin/munin-2.0.8-r2.ebuild5
-rw-r--r--net-analyzer/munin/munin-2.0.9.ebuild (renamed from net-analyzer/munin/munin-2.0.5-r1.ebuild)181
4 files changed, 172 insertions, 44 deletions
diff --git a/net-analyzer/munin/ChangeLog b/net-analyzer/munin/ChangeLog
index 869fbb78d7c7..7a51eedf781e 100644
--- a/net-analyzer/munin/ChangeLog
+++ b/net-analyzer/munin/ChangeLog
@@ -1,6 +1,14 @@
# 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.124 2012/12/06 04:17:50 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.125 2012/12/12 09:45:08 flameeyes Exp $
+
+*munin-2.0.9 (12 Dec 2012)
+
+ 12 Dec 2012; Diego E. Pettenò <flameeyes@gentoo.org> +munin-2.0.9.ebuild,
+ -munin-2.0.5-r1.ebuild, munin-2.0.8-r2.ebuild:
+ Remove old version; bump to 2.0.9, adding missing test dependencies and
+ avoiding install of /var/run; restrict tests on the current stable as some
+ dependencies are missing.
06 Dec 2012; Pawel Hajdan jr <phajdan.jr@gentoo.org> munin-2.0.8-r2.ebuild:
x86 stable wrt bug #445250
diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest
index 8b986d80cd37..0281f98a1d27 100644
--- a/net-analyzer/munin/Manifest
+++ b/net-analyzer/munin/Manifest
@@ -23,19 +23,23 @@ AUX munin-node_init.d_2.0.7 859 SHA256 26b490cc4c5023c3797714ead05fc4a3bef06caad
AUX munin.apache.include 604 SHA256 5051ff79220e5ef578e6e5fa66ef8b0a71b72cca6fde93264cf371585f56cb52 SHA512 de4797ccac5c9299dd55140300276f746febf3ac5bfebfc48901ca71fa0e035017917eba054b251cc2383c65f1e209e244906b34eebad237f43a7bd7171f6087 WHIRLPOOL 5adfbcc61a3e5f7b6bec7396ca72bf24fd59406ee2a49ac47dc81dfff2eef98e688b6fa6699a9095f34943dd7df2ee1f392e1f7a9c1572dc0505d2439a836c5c
AUX munin.apache.include-2.4 577 SHA256 21245e9eb7b759d2d2e65c2d1424da6d8c6fd8f49ec2f30cf72696cfc4227694 SHA512 b07791a4d5b822b5d0ad84ddbea3444cc1475cee8ee20f62dbb5f3a1792b71dba995e412433d30b3c295e40ad5346528d25e04438ec2dfa535983aae9198cea4 WHIRLPOOL 90a166f400e8336792fabcbcb786169dc5ed6b5fe9151ac5aef40f85c8d3f2724a6fffe17e41d90f31948a9462fc619fe45747caf8f62d55f6d494d48a7a2bb1
DIST munin-1.4.6.tar.gz 1238782 SHA256 1795812d9ad60e60f81c7f08c8be455ce44e1d4f966f7dd6be620e4c356de9c6 SHA512 f1ec1b79b4c90d899fc661656426b4cf7fdcc7f896d6de0938310b49b66e009cd1a85570005fd1a85a8168ce3568ea55c255c3511174cdf1d72bd88f162be5e0 WHIRLPOOL 43d2296bbbd476ffc0cf356fc5a191d723993735769e6f88f3581c0804b82781be38f78bfe34337e2b4e9680ade8c569a6006c0ea107e4a5c60a82b879e08404
-DIST munin-2.0.5-patches-2.tar.xz 9448 SHA256 9a58ff84e33cf5c912eb504f176d689fa8531da01b3541396a03f05fde19d079 SHA512 7f75c6f4a7034327a99820bd0c1fd2272f2cd2a5bc037096e6a142a317a068ffb4217b162578da089cb0f83667d35aee413ecaeb58fdb548dfbff78b97d36e07 WHIRLPOOL 0d128cbc9955e174902670c2a66e5e0c66d4262bd20832065ed220a227a9efba25a93e192a4cd08c85819df91d1552870e6dfc2cd1bd0f3870b0154d6c0f294a
-DIST munin-2.0.5.tar.gz 1319398 SHA256 927b9b557343ad031b55b401eb1542db03d78a48a64797f5fed6ad58fc2c8785 SHA512 e52ce2f44a4322000dc38d0b8ae6e5f406211b7a081e1f4300938dfe10bff1559d9e84f454885c70bae9aabfa4b7fde8c3b3d8b239d35596f678baaba6d7d7bc WHIRLPOOL 7751eee653a0b80a9a3283a8940a270db0c5ece7de67f1b253004901db2fd06f6d8c104497ced6d3659ac6a45f4d8e37bbb362f6dec6f7181cb2d30ca115f495
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
+DIST munin-2.0.9-patches-1.tar.xz 10888 SHA256 da45fb8988a0e2640d16bda012a33a42fcf06f719cbfe01c00cad9d786efd1a2 SHA512 d6940f4f02584470382c8dc5b089be42cb438414f02335e677da58a2728c64ee883f60f68a4bc543b31245a9f18666bb3bbb31f96d7f8ab61384a494432f633e WHIRLPOOL 34c7ef8091fbda05367167f53983d2c8a472e2ef9221da3e190e36651389f5cc6012c3c359b25f6efb11745d5d7a06e87610cc7c80cdee2eda99d0fa56577337
+DIST munin-2.0.9.tar.gz 1328972 SHA256 6bb2b42de29a438ad80f1d6c53f4a35e9a74cb5a2103ea7a9530cba2d75c7309 SHA512 3db797283fc8ee8042869ace9c24871a8317fe0f826a4f8a3cebe1152ab621b62e2ddfd44a32a7516dabdaf44e4dde6aeaae014674cb544328665b63990c16d0 WHIRLPOOL 4110992995ac52f7903573b809a776281fe48e0406944b127ee8b2fede3ab12deef98f578070466721c72efc7a6418e9dc872d2fdfe1d4d5690f1648e33e49c1
EBUILD munin-1.4.6-r4.ebuild 5033 SHA256 032e77091eb5e3776b79fd6857965ae8de3050b8fae6622bd311cc073b9882a9 SHA512 aa041a841d3e86686e4cb2137ce1237ac9d656f67ff4d97a75651345392ca5566b5ca46dd2d76d54a8228c5c4634d1a1205da3f7458598b337cdeb0af62d09f3 WHIRLPOOL 4118ebdff6f61ce32d1d273d71125cb71e994eceb78c8fd89987aa0bba8906d1c825fd03721d84ac61930758a401353f788b069f739a54c44888c1876aba6e2d
-EBUILD munin-2.0.5-r1.ebuild 7562 SHA256 2eed40d2d81907b4d6347ecaa9d20ae4c858c4e7c6f353051e1576afaf6b4b2f SHA512 e7d5339acf39f39e50df7f92541767643e1f76be4564bdfcb5b3bc1ed4170f80a3f153cd5994e6b559761b22cd4015e64c2671aa9b76244df07d3f76aaf0fa08 WHIRLPOOL a40a3688837c018a486af91ca20e6841a3b17afa4991f6e40d784c45c99ed6fbcced7d0bdfac187882f3d147a0be00b1c60a282e05a6b1becd82288a13f6ee63
-EBUILD munin-2.0.8-r2.ebuild 11209 SHA256 baeecee34324abf6682fbdf7cb9f1a7ad608c61aee2c8642a41f4ef3ec9f39d4 SHA512 ff22105dcc1bc38f4f925799cc90ffd91e8fd4899f67feabade5137141375c96891f8c69f777b8ae95c5a961498c3e2727157a8226693fee5a9b3f5827790a9d WHIRLPOOL b32bbc8ac073bf308ac6902f1beded9d3229141b1f2cf55f955b28695b35af3db10e00d41c295c6f0fa4411520e2e26b883ba4a32b0542cb7a571502f84512ee
-MISC ChangeLog 27050 SHA256 1b396c3e5e1b803d5b085534e8343740a7e6762ba7d81e3e3065dd44e9fbcf6f SHA512 97270cbf1101d8107f4de39c42169f12ba09001851621208e6bd17ec1916d743ee7e59f33dda06c4f5efd847a7e20a30b5bc13632d029dbe15a728e66ba14e29 WHIRLPOOL 6426aae36a932264a30a404598c33e730408c20d610807d8b6062f36e7f0c5ed7e61f03a48ec421106453c3fcf8a2277097bf38e57100ca9a159b6cfd6e82f8a
+EBUILD munin-2.0.8-r2.ebuild 11292 SHA256 01a5fd547c8420a7e62685df83ffcc5ccaf7eb045f762b9ba64d90c3f4e4d959 SHA512 3cb5a1788c628db75cab48bbca6d438f1c86d896f9cb6a73d5010f156e8ed38371f2275d5380a5548bf6439291984c3740bede881b1def664dcc9b84843a289f WHIRLPOOL 709a308d25a02bc31ca7bf78b1fba793cc5890c8dad6977511df58dd98029b06e33a820c285e6b9a5037a4606f75ad8a5f3de5199f407c0a9eb8fe5bcbd9ed13
+EBUILD munin-2.0.9.ebuild 11397 SHA256 f34df1075d5332cf1959d9efd18ba19cfea130ce9a5075e43568afe8b482559f SHA512 3f56616ad5b3f535e368ccb308990644e20310e1484cdc5bf4cfe4671ad42d7eb05a8a964c98ce0992a1a27870135154a547cfb51fe3055f3a15a0987fe32562 WHIRLPOOL cf144a16e6b13e15382a59a7a06343bbc66aaf7d2f7c509cbbde1c49ef386834cdb22b986334c7691695c2c8f1576259cbc62787a8afac6dd1bc04cdc0be03fa
+MISC ChangeLog 27383 SHA256 2838f58d8c429d9be905ede249971483d6d8256b6536b99c8c12717e08cc615a SHA512 c288e73d27c9931b104e1342cee773ba6c089f4e25968062228d1123d061a8c1b0c853648445aa851f97baf0c87b8ab12997cee03bd7bf13871f0dafd4668d99 WHIRLPOOL 4581d6efd882f5e27258d1160d35cde8bdee19c5998ef63ea9e63da9894f0c728c9899a1aea0b1d87be6a11005ca31f551d2743b12e0221e0f7a3f4232f8b06d
MISC metadata.xml 3824 SHA256 5b838f6ccb778750cbcc41052480daaa9ebcbee5ee38ab66b054472b6313d177 SHA512 277f3ab9589982617b60ce8ea63802288dc4ff5368416a942f3670804a8e0a4cd481b2d0ff91302be040d2aba4f66a2e11b0c181164e6285dc33b150b263da60 WHIRLPOOL 7486ffd90f12e32a9feb557b4937397317cfd4325e5ffdf1dbaa749a90f3c47f797baea306585ac4a200e4a23901da1de10a9f0b951a15bd27f8a7c876c504a5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEAREIAAYFAlDAHHQACgkQuUQtlDBCeQJKhgCcDBRLFxmcpZjZIqsmTdmUOpzB
-lgsAn0pPZsqrJVnXdKSPNZDcuzTOQM8u
-=Qfv9
+iQEcBAEBCAAGBQJQyFIpAAoJEBzRPIrUMBNCFMQH/jXHDWKzBFCfc3ZqtML6/P4V
+ahb0DlgppQVktyn5HR5gXXbkIP0q0QxCj0RUxdg1/+WmYvHCZH6f/NnWk4CXNqjX
+beDjUSPCFYD2nQ8Ym7HomjSQuUrE6Xnak9gvEFycDx6yNZEM+5uOaMtfjx265v51
+I49ge6izQlCww4IzI8ohFQt6QCJ6CLQBtyHt8YS70TJEJGnBZ41knDtcoJpLNczK
+GBjsiAGvLyOdHT3RgFGxyWw2TFqHUm4sPsepyEe0nWtu0b559lVicVKQ/BL8hvn8
+TCAwYwJdHW25bJnrd5n4lk14u/fKyEXfPLbxvtKN/vrP9LJeLOZ9QQL1If1ieZc=
+=loZj
-----END PGP SIGNATURE-----
diff --git a/net-analyzer/munin/munin-2.0.8-r2.ebuild b/net-analyzer/munin/munin-2.0.8-r2.ebuild
index 046c733245ca..1274347a2ef9 100644
--- a/net-analyzer/munin/munin-2.0.8-r2.ebuild
+++ b/net-analyzer/munin/munin-2.0.8-r2.ebuild
@@ -1,6 +1,6 @@
# 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.8-r2.ebuild,v 1.4 2012/12/06 04:17:50 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.0.8-r2.ebuild,v 1.5 2012/12/12 09:45:08 flameeyes Exp $
EAPI=4
@@ -21,6 +21,9 @@ 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 )"
+# Missing deps, now stabled, ignore tests for now, not a regression.
+RESTRICT=test
+
# 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.
diff --git a/net-analyzer/munin/munin-2.0.5-r1.ebuild b/net-analyzer/munin/munin-2.0.9.ebuild
index 611554e7239c..823c9ee1205c 100644
--- a/net-analyzer/munin/munin-2.0.5-r1.ebuild
+++ b/net-analyzer/munin/munin-2.0.9.ebuild
@@ -1,10 +1,10 @@
# 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.5-r1.ebuild,v 1.5 2012/10/02 21:04:14 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.0.9.ebuild,v 1.1 2012/12/12 09:45:08 flameeyes Exp $
-EAPI=4
+EAPI=5
-PATCHSET=2
+PATCHSET=1
inherit eutils user java-pkg-opt-2
@@ -17,16 +17,17 @@ SRC_URI="mirror://sourceforge/munin/${MY_P}.tar.gz
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"
-REQUIRED_USE="cgi? ( !minimal )"
+KEYWORDS="~amd64 ~mips ~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
+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
@@ -36,12 +37,14 @@ DEPEND_COM="dev-lang/perl
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 )
- ipmi? (
- >=sys-libs/freeipmi-1.1.6-r1
- virtual/awk
- )
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
@@ -61,6 +64,7 @@ DEPEND_COM="dev-lang/perl
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
@@ -68,14 +72,18 @@ 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 )
@@ -90,6 +98,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
}
@@ -100,9 +110,11 @@ src_prepare() {
}
src_configure() {
- local cgidir='$(DESTDIR)/var/www/localhost/cgi-bin'
+ 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
@@ -111,8 +123,11 @@ 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
-SPOOLDIR=\$(DESTDIR)/var/spool/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)
@@ -123,27 +138,42 @@ EOF
# 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/
- /var/spool/munin/
- /etc/munin/plugin-conf.d/
- /etc/munin/plugins/"
+ /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}
- local install_targets="install-common-prime install-node-prime install-plugins-prime"
- use java && install_targets+=" install-plugins-java"
-
- use minimal || install_targets=install
- use minimal || dirs+=" /etc/munin/munin-conf.d/"
-
# 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}
+ emake -j1 DESTDIR="${D}" $(usex minimal install-minimal install)
+
+ # we remove /var/run from the install as that stops Portage from
+ # having to check it for symlinks when the new /run is used.
+ rm -rf "${D}"/var/run
# remove the plugins for non-Gentoo package managers
rm "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die
@@ -151,16 +181,26 @@ src_install() {
insinto /etc/munin/plugin-conf.d/
newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node
- newinitd "${FILESDIR}"/munin-node_init.d_2.0.2 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 munin-asyncd
+ newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd
- dodoc README ChangeLog INSTALL build/resources/apache*
+ cat - >> "${T}"/munin.env <<EOF
+CONFIG_PROTECT=/var/spool/munin-async/.ssh
+EOF
+ newenvd "${T}"/munin.env 50munin
- # bug 254968
- insinto /etc/logrotate.d/
- newins "${FILESDIR}"/logrotate.d-munin munin
+ 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_
@@ -169,6 +209,18 @@ src_install() {
"${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:/var/run/munin/munin-node.pid:/var/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...
@@ -182,10 +234,31 @@ src_install() {
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
@@ -241,6 +314,7 @@ pkg_config() {
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
@@ -248,17 +322,56 @@ pkg_config() {
# 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 "To have munin's cronjob automatically configured for you if this is"
- elog "your munin master installation, please:"
- elog "emerge --config net-analyzer/munin"
+ 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
}