summaryrefslogtreecommitdiff
path: root/net-analyzer/munin
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/munin')
-rw-r--r--net-analyzer/munin/Manifest8
-rw-r--r--net-analyzer/munin/files/logrotate.d-munin.433
-rw-r--r--net-analyzer/munin/files/munin-node_init.d_2.0.1926
-rw-r--r--net-analyzer/munin/files/munin.apache.include31
-rw-r--r--net-analyzer/munin/files/munin.apache.include-2.428
-rw-r--r--net-analyzer/munin/munin-2.0.76-r1.ebuild (renamed from net-analyzer/munin/munin-2.0.73-r4.ebuild)6
-rw-r--r--net-analyzer/munin/munin-2.0.76-r2.ebuild418
7 files changed, 457 insertions, 93 deletions
diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest
index d16e1e254693..fef7334f3bae 100644
--- a/net-analyzer/munin/Manifest
+++ b/net-analyzer/munin/Manifest
@@ -1,4 +1,5 @@
AUX logrotate.d-munin.3 678 BLAKE2B 56c5e73e775c51898290707f324a305aa024ac732994b7e8ac2213a29740f481012d6433a6e72879524fbb3f958420919441265b0b5943b022267d47ca847640 SHA512 77853b9f0465da10e1844e25225350b7351126b19ee4caaad168b7b27003bca65bf34176293c610d5a4cb790a4a5d380fab482844ab23d6063208b2ce0fe1349
+AUX logrotate.d-munin.4 683 BLAKE2B 46e979f509f3d32364609dce22f3dc7f610d01830fe6c8e2f3dd7129f71b3a8f80abcb404334d50fccdd837cfc5ecca9667e96a7bbc4f87ba67529658cd57e27 SHA512 3cc1972d5a9c5ea3bcd3f186e19b06694cba9605a23a5f3cd0a48b40a87f4b2f0b1a03d609a9695bc8c152a9699f5ad415bf57b8a150efb74cbf82a0f67ff609
AUX munin-1.3.2-plugins.conf 1760 BLAKE2B 97d853698470c35dd4bc305a559be6b1160a6877e557f6146eeddaf7d91f72c7ade36e1f5571c5ad742560a2f5f400fc51b481ee7ce305db9546af6b211046ac SHA512 c3498c4364cedd27016562568f918995be92dd6b3c2735ddd008190de0a729f8ea59e61f8517f6f48beaad14edb349af7476a39f55d246ab06d6cbe91679565f
AUX munin-async.service 201 BLAKE2B 2de35c4577d097525b75fb812042627702e846daf908b8deeaf9980c76b31135d5ea906b0932dfe3b4d589e3c635e37e8198cf2b6e9d60cdc305eb499815266f SHA512 55a99866cb9ff50723a223b8a45b418f13ed754b6ca919260af8312a323aad432aca047724a5e32f6aee2f8f541ae829bf6bfdf19d22e7543ef2e5a7b9cd9d6a
AUX munin-asyncd.init.2 429 BLAKE2B 8f4f943091a39e056212b28aa6e66425672bcb1cbc053f0b711fd9c16c8a24754a69f7fc35dd17aad85714650e7bca7580f9b457d5f5b4db0482b680976c7ba1 SHA512 d967467a0bf528d356c48209ec09bb09f3f2609d98ed28e71a4176396c8c135766cab8dcdcc1c653de2082120ef280d1fd9aaf6cc42fadd1a9dadb5ae392693b
@@ -8,20 +9,17 @@ AUX munin-html.service 205 BLAKE2B 9a731ab89402169c4886cff22a8b866bedd3566c851c9
AUX munin-html.socket 129 BLAKE2B 5ff1c673732f6a10abb79d929677a06791aeec99094754588973e717a87a028e2e9280d61e8e0847534dc4aac5c9895a111287f1f3b84dda263bda87a19097fb SHA512 d970f77be6a45b8dfc8c22fd80442d90620663bb36b0368bc5f0b36af3300b15b36f08b824eb7550d047bcc31599346f9ed45950fe98ca70ddd7982c4ecd0e9a
AUX munin-node.service 194 BLAKE2B 38d849ec81750cedaf74f8575bb779a76bf6dbd2e737ddd9b961fcf024832ed0ba5c62708546df81643b9045b0da18783eef9421e49524dd3e61ff03ed3cebcb SHA512 e7586afed85e67de04494353dbc9a3008e6246a158ddb66634c799c64bd8ea991a153b45c050934edde18cd7ac0828d1961acd3a1ddc9dc6b088cb95f0ea7a1b
AUX munin-node_conf.d_1.4.6-r2 188 BLAKE2B 419e475fb422a74d1c094145c25b7ad371e1075b2a60c5241df1492b85c95fe9891db04afaad295096935da03c58d2279e346ba5020cdb11d092ce4b487ccb47 SHA512 f6b4b198a219ab4706aea3820ac36932bdb807abb7f42447cc36afe140e15a04e65d5daa44843aaedf1ecfa2f040a373687ddea4f94a55d104492e640c313152
-AUX munin-node_init.d_2.0.19 598 BLAKE2B a6442b2873a01d3846ae502314bbdee4ac08ce94ee1dd9e2ca9dc15ba322b531fe4564a76e5cd6526b5b1be5bf06e31ca6c108e8e9f05c89d718c7531ef18a5f SHA512 c2429156972e6db9c75160dcb3419ea67a59801a70e4a13a07899ebea84db079d1efcbeb653e2abea3212fa7cfb96a35ff020daf4918d8fe2839b670ea63b31b
AUX munin-node_init.d_2.0.73 617 BLAKE2B 2535604e5603c6d4084bdfb90cb5b15e206ff8e083fc353d783daad33c86916b7c7a32b62e99cb801bc31be2717cfd9a21882cba684bbf6eefd82affb3345283 SHA512 c0b981dfd0280ca5a4bc2d8950cba7de9f6b6f0c0324aaba83be2b1a3e3521dff732d83517fdc8942025ae912a2b2d06eab05fbca3708625f5242efffe65db6a
-AUX munin.apache.include 604 BLAKE2B 796293be594baefca293b6cc5f5d6f31c9ab28ecaa209c776aced2d2a0916ff4b61c195393f19355a6460bf2bde8baf41892e4f41905332996afde32e99397ea SHA512 de4797ccac5c9299dd55140300276f746febf3ac5bfebfc48901ca71fa0e035017917eba054b251cc2383c65f1e209e244906b34eebad237f43a7bd7171f6087
-AUX munin.apache.include-2.4 577 BLAKE2B efd0a424cb058b77aa19d6384fac085345f789264b19d878126ca826eda84e79714741529218d9715ba51e175cb1628839e1ca09733f67b370b2401e019c9351 SHA512 b07791a4d5b822b5d0ad84ddbea3444cc1475cee8ee20f62dbb5f3a1792b71dba995e412433d30b3c295e40ad5346528d25e04438ec2dfa535983aae9198cea4
AUX munin.apache.include-2.4-r1 772 BLAKE2B dfdfb3aa7ab1cff11a67b1e8ac4fa4cf8449bff2179dc80cbc4c9983261119ec3cd4abf3086563ecaae5b848985990a4051709c02895afb0f7f17386d6285dd0 SHA512 f66d02655d8f181d1405eaf35bc9e14b137d3e5657e1c4ba59d187de9a32ff3d7098609fe9f4ce562de604bbd472cd94e97dc642a46ddd3e70e3a0bc14ebae12
AUX patches/0002-build-create-an-install-minimal-target-that-only-ins.patch 1261 BLAKE2B 8f620a472e567eaad0d15b92fc3ce1d34935ddc49fcbe3ca3ad824b31cddd3c48604b1baa8e7b22673e54e48a15ad258e013b858935b9c8f7934115fc01be413 SHA512 9e8d7560ab1e6051b0b1151a2326553bc67461c6f2f57d44b4141543c43a14d91a5f56890e4409c953dd2e36228f141235ada49226ed31346776da1921a2a5e2
AUX patches/0003-master-make-it-possible-to-configure-the-default-cgi.patch 4207 BLAKE2B 39d9ce19de91bf49a06dfbc42b736435ceb221f29679749077cf0c9174ba2170a6525e4fca97f3caf82674298fc140ffc0851aff609cc33033adc31accbdcc29 SHA512 514f40fcffbaa7f0a4ed2c7729658d93c185ab219bf7e2cee1362deecca2ccec12d0a6519f23ecb4211786c3738b37517e4404c4f2c6f42afa19c6889a7ba1a1
AUX patches/0005-node-use-Net-Domain-hostfqdn-instead-of-Sys-Hostname.patch 1230 BLAKE2B f026b4feb3b6e2b9f1699528a3897af82eddf680724911702e66cf6db55d956cff5fdc04235735d4af9e4314665da4105e17065be026f37259227099e6d08dc2 SHA512 ecad6fd338f30a5ea2b74377a71792f492b7cba174b5488f1cfb68f5d09f578ef82930fe20039af0d11bd70b00dbbe408c57f8440bbd47c67f64c8379c0e028a
AUX patches/0007-node-always-use-the-Effective-UID-not-just-the-UID.patch 5052 BLAKE2B 97734c5b3d4119861740f27b358fbef594357fdd303d4b6219ac366e0eb8e160253e802df9140a477be3ac3b2016992570009f389b64d23cf12493f0097b4bd3 SHA512 6547dfddac6de124c3cc10f623f7f97dae3206d413b16647c78c8be27d2ebf0e6908ce09fd75ab938f5599b581573ee3c580eeff77505bd6bc8b661bbfdc121e
AUX patches/0009-perl-526.patch 849 BLAKE2B 4f38dedbe74e601dd67f44339dc1e64754f30284e368e4768db4f593749060a32923030a55811beb6ab2ed1e7b7fb1d817761656c0fff89adee3c518fb5e88ad SHA512 b20e6b7de057ea88cfe5420fe79520d1fbb23cfdf961096c355c6bd48384b6d78a74b7545e8ded47374eeb5b884f54b39556abf950577e025d8221f69ef43789
-DIST munin-2.0.73.tar.gz 2259959 BLAKE2B 2d2e4ce00b2df06f083280b9253f875ded100e42c991152f3f8e4b39e85d605367efc18df369e07e18eac38aabd78faa959c367752b153f97246bb47a9732f20 SHA512 4f1d59ff3f163c8fac883973ebba1221619d716c4cde506d9265544c52e73f43e8b587cda3fd00bcf779ceeaf8fef6e7780d9ea4be5b99894f0bb5047f24b935
DIST munin-2.0.75.tar.gz 2258514 BLAKE2B 689b436913a931c9002757267db236ba4ab1da947552c43ad2b96c2e5b26427499e681d0606d0045cfbbd90b70a69572b8550660a598d672babeba8388feacf5 SHA512 cceb47c27bfb3080980fd6342e805b5b9fecbef7033d6f2a83fe6c78d20f943961c9f1775ef5e464e49c25c9d246606594f2844827b38d34c04016f15dd68613
DIST munin-2.0.76.tar.gz 2258538 BLAKE2B 74d8d055be52f605b2d0f2551328bd425e9550a7dd86740479f7a6efd9a9d8be7a78b4075fe68a9c658981b2089d6277eb51b758fb8ba341c149117457ab4696 SHA512 e43d8f123cb6bf9a1b99dde4fe93440e256b3950ec1f79923998f83b14530bba24dab87ece1d3e7e5bf3afd645eafa6c1055d1119748e76230cfb29136712086
-EBUILD munin-2.0.73-r4.ebuild 12177 BLAKE2B 7023fd655d3626d0a47c4eb5220ace687cb52fc95f50c37eadc77fb8924bf27b8e2b6a4f4e4a0501112f94d6a70029395d586ad3d2a989661e7d1566597d0791 SHA512 b50591351bfed42d45b151d9cae5f2823a4375f5cd8209562536316609c92b2fa4de217040f6b3dd9b80a1f7b5f5906b20f6a6a4bbb428f178870a2fae443c41
EBUILD munin-2.0.75.ebuild 12156 BLAKE2B f94cbb66360ff3a8e5cd93e04cacbf90f81587c5db3f2f4925af624e3d6ce957201d321cccda9eed28ec8ce44f8aff3eccb27d6106ef9a15faee4560a5aaadb8 SHA512 5fac160af6a2fea96a383e6c57b8be2bfc50e39dfdbfc18a3870013859877a082360d167b0e32300151b9723c56e0a5a42c38b770712b539844bf4f768d5ce70
+EBUILD munin-2.0.76-r1.ebuild 12176 BLAKE2B b84ff2d1905516077bd00605f2f5e2da62f369fd071fb1540a814c97dbd1d58538cfabb20f7070db1307c10d118c2a056debaf71f5f0f29b621c472f74625e3c SHA512 9e7943180d69067dbc7d1413328817dcbdb4fa55773ec6d38212cb8b4162f89eba12846cf68b0a31bc1f0d2fca4772e10dbca7f023066abe3dc58b9331d22d29
+EBUILD munin-2.0.76-r2.ebuild 12171 BLAKE2B 538f48affad933b0a229eb98def5f5467383577fcbaafc51192b8ab9dbac69d0934c6941439cfabb9e088340af63f73a3192de824498caac73621fed8b6cca30 SHA512 4721ea3b430ffc40c0445faac4b8a27e472fab5b13a86d3e022efc0415d96fc415aa7fb6fb8649a1cee4f943f2d7a9c3fc293cfbfc8b58b7cc8204b9fe413126
EBUILD munin-2.0.76.ebuild 12161 BLAKE2B d3a50231300c773fa49be22ff5c48e604d8c94bc4948b6cac0a277b34f9783796c0dde52b3961ce21c6ac3a76b7358b8391d33f8f85477d578137178f5df1fa6 SHA512 e80b1ed648b1a92e83e08d64bab2aaa46d34d6e6a8e7b1fdd51af6bcdaf0c11612fabac6d78ca094866b1f0fa0f679021df8f457124ce3c72546c431628bcc33
MISC metadata.xml 3933 BLAKE2B e13958d477a85e5f2327ffb529567dc129e6531a114b304d930399fe9cb81e6581f1df9d884860294984580c5b3e4335dfb623fca85e18e1de818430476eacfb SHA512 f824ef7f1a950ab81c4e3f2e81f44c6b3a49dc56a4aab977fad14e5d757875f8cb4900d8cd528c16449fafc8d08ab3792be8dc5a2a820932add7ce03ca35102c
diff --git a/net-analyzer/munin/files/logrotate.d-munin.4 b/net-analyzer/munin/files/logrotate.d-munin.4
new file mode 100644
index 000000000000..8bbb6422620b
--- /dev/null
+++ b/net-analyzer/munin/files/logrotate.d-munin.4
@@ -0,0 +1,33 @@
+/var/log/munin/munin-node.log {
+ daily
+ missingok
+ rotate 7
+ compress
+ delaycompress
+ notifempty
+ create 640 root root
+ postrotate
+ test -e /run/openrc/softlevel && /etc/init.d/munin-node restart 1>/dev/null || true
+ test -e /run/systemd/system && systemctl restart munin-node 1>/dev/null || true
+ endscript
+}
+
+/var/log/munin/munin-update.log /var/log/munin/munin-graph.log /var/log/munin/munin-html.log /var/log/munin/munin-limits.log {
+ daily
+ missingok
+ rotate 7
+ compress
+ delaycompress
+ notifempty
+ nocreate
+}
+
+/var/log/munin/munin-cgi-graph.log /var/log/munin/munin-cgi-html.log {
+ daily
+ missingok
+ rotate 7
+ compress
+ delaycompress
+ notifempty
+ create 640 @CGIUSER@ root
+}
diff --git a/net-analyzer/munin/files/munin-node_init.d_2.0.19 b/net-analyzer/munin/files/munin-node_init.d_2.0.19
deleted file mode 100644
index fca7880692cf..000000000000
--- a/net-analyzer/munin/files/munin-node_init.d_2.0.19
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-get_munin_config() {
- awk '$1 == "'$1'" { s=$2 } END { print s }' "$CFGFILE"
-}
-
-: ${CFGFILE:=/etc/munin/munin-node.conf}
-
-command=/usr/sbin/munin-node
-command_args="--config ${CFGFILE}"
-pidfile=$(get_munin_config pid_file)
-start_stop_daemon_args="--nicelevel ${NICE_LEVEL:-0} --wait 1500"
-extra_started_commands="reload"
-
-depend() {
- config "$CFGFILE"
-
- before cron
-
- [ "$(get_munin_config log_file)" = "Sys::Syslog" ] && \
- use logger
-}
-
-# vim: filetype=gentoo-init-d:
diff --git a/net-analyzer/munin/files/munin.apache.include b/net-analyzer/munin/files/munin.apache.include
deleted file mode 100644
index f8b2df5daa66..000000000000
--- a/net-analyzer/munin/files/munin.apache.include
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- apache -*-
-
-ScriptAlias /munin-cgi/ /usr/libexec/munin/cgi/
-Alias /munin/static /etc/munin/static
-
-<IfDefine MUNIN_HTML_CGI>
-RewriteEngine on
-
-RewriteCond %{REQUEST_URI} (/|\.html)$
-RewriteCond %{REQUEST_URI} !/static
-RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-html/$1 [PT,L]
-</IfDefine>
-
-<Directory /usr/libexec/munin/cgi/>
- Options +ExecCGI
-
- Order allow,deny
- Allow from all
-
- <IfModule mod_fcgid.c>
- SetHandler fcgid-script
- </IfModule>
- <IfModule !mod_fcgid.c>
- SetHandler cgi-script
- </IfModule>
-</Directory>
-
-<Directory /etc/munin/static>
- Order allow,deny
- Allow from all
-</Directory>
diff --git a/net-analyzer/munin/files/munin.apache.include-2.4 b/net-analyzer/munin/files/munin.apache.include-2.4
deleted file mode 100644
index ec69cbb07b91..000000000000
--- a/net-analyzer/munin/files/munin.apache.include-2.4
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- apache -*-
-
-ScriptAlias /munin-cgi/ /usr/libexec/munin/cgi/
-Alias /munin/static /etc/munin/static
-
-<IfDefine MUNIN_HTML_CGI>
-RewriteEngine on
-
-RewriteCond %{REQUEST_URI} (/|\.html)$
-RewriteCond %{REQUEST_URI} !/static
-RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-html/$1 [PT,L]
-</IfDefine>
-
-<Directory /usr/libexec/munin/cgi/>
- Options +ExecCGI
- Require all granted
-
- <IfModule mod_fcgid.c>
- SetHandler fcgid-script
- </IfModule>
- <IfModule !mod_fcgid.c>
- SetHandler cgi-script
- </IfModule>
-</Directory>
-
-<Directory /etc/munin/static>
- Require all granted
-</Directory>
diff --git a/net-analyzer/munin/munin-2.0.73-r4.ebuild b/net-analyzer/munin/munin-2.0.76-r1.ebuild
index de992a88997d..b2482152f99b 100644
--- a/net-analyzer/munin/munin-2.0.73-r4.ebuild
+++ b/net-analyzer/munin/munin-2.0.76-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -17,7 +17,7 @@ SRC_URI="
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ppc ~ppc64 x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2"
REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )"
RESTRICT="!test? ( test )"
@@ -32,7 +32,6 @@ DEPEND_COM="
acct-group/munin
dev-lang/perl:=[berkdb]
dev-perl/DBI
- dev-perl/Date-Manip
dev-perl/File-Copy-Recursive
dev-perl/List-MoreUtils
dev-perl/Log-Log4perl
@@ -148,6 +147,7 @@ src_configure() {
LOGDIR=\$(DESTDIR)/var/log/munin
PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2)
JCVALID=$(usex java yes no)
+ JFLAGS=-Xlint
STATEDIR=\$(DESTDIR)/run/munin
EOF
}
diff --git a/net-analyzer/munin/munin-2.0.76-r2.ebuild b/net-analyzer/munin/munin-2.0.76-r2.ebuild
new file mode 100644
index 000000000000..3d4f08b69bb1
--- /dev/null
+++ b/net-analyzer/munin/munin-2.0.76-r2.ebuild
@@ -0,0 +1,418 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PATCHSET=1
+
+inherit java-pkg-opt-2 systemd tmpfiles
+
+MY_P=${P/_/-}
+
+DESCRIPTION="Munin Server Monitoring Tool"
+HOMEPAGE="https://munin-monitoring.org/"
+SRC_URI="
+ https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz
+ "
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ppc ~ppc64 x86"
+IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2"
+REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )"
+RESTRICT="!test? ( 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.
+# We replace the original ipmi plugins with the freeipmi_ plugin which at least works.
+DEPEND_COM="
+ acct-user/munin
+ acct-user/munin-async
+ acct-group/munin
+ dev-lang/perl:=[berkdb]
+ dev-perl/DBI
+ 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(-)?]
+ dev-perl/TimeDate
+ virtual/perl-Digest-MD5
+ virtual/perl-Getopt-Long
+ virtual/perl-MIME-Base64
+ virtual/perl-Storable
+ virtual/perl-Text-Balanced
+ virtual/perl-Time-HiRes
+ apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] )
+ asterisk? ( dev-perl/Net-Telnet )
+ cgi? (
+ dev-perl/FCGI
+ dev-perl/CGI-Fast
+ )
+ 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 )
+ ldap? ( dev-perl/perl-ldap )
+ 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 dev-db/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}
+ dev-perl/Module-Build
+ java? ( >=virtual/jdk-1.8 )
+ test? (
+ dev-perl/Test-Deep
+ dev-perl/Test-Exception
+ 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}
+ app-alternatives/awk
+ ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 )
+ java? (
+ >=virtual/jre-1.8:*
+ || ( net-analyzer/netcat net-analyzer/openbsd-netcat )
+ )
+ !minimal? (
+ virtual/cron
+ media-fonts/dejavu
+ )
+ selinux? ( sec-policy/selinux-munin )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ echo ${PV} > RELEASE || die
+
+ eapply "${FILESDIR}"/patches/*.patch
+
+ eapply_user
+
+ 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 apache2 apache munin)
+
+ cat >> "${S}"/Makefile.config <<- EOF || die
+ 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
+ PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2)
+ JCVALID=$(usex java yes no)
+ JFLAGS=-Xlint
+ 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 cgiuser=$(usex apache2 apache munin)
+
+ local dirs="
+ /var/log/munin
+ /var/lib/munin/plugin-state
+ /var/lib/munin-node/plugin-state
+ /var/www/localhost/htdocs/munin
+ /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 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install)
+
+ # we remove /run and /var/cache from the install, as it's not the
+ # package's to deal with.
+ rm -rf "${D}"/run "${D}"/var/cache || 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.73 munin-node
+ newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node
+
+ newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd
+
+ newtmpfiles - ${CATEGORY}:${PN}:${SLOT}.conf <<-EOF || die
+ d /run/munin 0700 munin munin - -
+ d /var/cache/munin-cgi 0755 ${cgiuser} 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 apache2 apache munin):g" \
+ "${FILESDIR}"/logrotate.d-munin.4 > "${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
+
+ touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log
+ fowners $(usex apache2 apache munin) \
+ /var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache2; then
+ insinto /etc/apache2/vhosts.d
+ newins "${FILESDIR}"/munin.apache.include-2.4-r1 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() {
+ tmpfiles_process ${CATEGORY}:${PN}:${SLOT}.conf
+
+ 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 apache2 apache munin) \
+ "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache2; then
+ elog "To use Munin with CGI you should include"
+ elog "/etc/apache2/vhosts.d/munin-2.4.include 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
+}