1 |
commit: 5543f3de8c9803597c224da00ceee3cdc7f407f4 |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 30 05:18:16 2020 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 30 05:18:16 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5543f3de |
7 |
|
8 |
net-analyzer/munin: cleanup |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.2 |
11 |
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org> |
12 |
|
13 |
net-analyzer/munin/Manifest | 8 - |
14 |
net-analyzer/munin/munin-2.0.52.ebuild | 419 --------------------------------- |
15 |
net-analyzer/munin/munin-2.0.56.ebuild | 417 -------------------------------- |
16 |
net-analyzer/munin/munin-2.0.61.ebuild | 417 -------------------------------- |
17 |
net-analyzer/munin/munin-2.0.63.ebuild | 417 -------------------------------- |
18 |
5 files changed, 1678 deletions(-) |
19 |
|
20 |
diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest |
21 |
index a40b1d5fc74..0bbc42e9d4c 100644 |
22 |
--- a/net-analyzer/munin/Manifest |
23 |
+++ b/net-analyzer/munin/Manifest |
24 |
@@ -1,13 +1,5 @@ |
25 |
-DIST munin-2.0.52-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 |
26 |
-DIST munin-2.0.52.tar.gz 2266820 BLAKE2B 41233cd28ce4d682dfd47895061426404540c6b1c65798609a2d509d39ad5359b22087027662e7c03848e5676815843c34d078b782e3d0ab3a6a29b6a22e058b SHA512 7439ea10006a94227b71328d06411378f6855f23f17815a433b3a1c40ea23da5a25a366d48f911b9cfdc43c4b98f3bb9777b67db2b894441eb8941e84ede379c |
27 |
-DIST munin-2.0.56-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 |
28 |
-DIST munin-2.0.56.tar.gz 2271203 BLAKE2B f3df227b905ab794e2253637d367819eff2625f9e0f2355d23916b033b3b23d14bb64a78bf6a334f0c7a1859e60c227d1f754a2689bf291cc5f43a46986d35fe SHA512 111b9b8d88474f480eac1e304a92a52c2295d72a1c6709bb2942ff6ee0ba26a56d25dc5d0cf08ddb98a23d6d9693ad0cddb2185e10df83d553655d017d102b1d |
29 |
DIST munin-2.0.59-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 |
30 |
DIST munin-2.0.59.tar.gz 2276011 BLAKE2B 0681cd838daaa056418258d473825642e2aa6b7a3ac7a435859033a467351145be73df327d3149b46c53f5a04c602bea57bc5af428cafb7b5bf1e9c780915ddf SHA512 5597db797f7a0de3581a17be13b079a3fd1e50903014d67d81a262e921fdfca84eee8ec65e3927438db0e01525d16faaabc7e3f7d4cad1a73e7e14002b10478f |
31 |
-DIST munin-2.0.61-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 |
32 |
-DIST munin-2.0.61.tar.gz 2254571 BLAKE2B e73fb6fc4f71c8d56a7e8a05852f699c94a7cf321b8034ad31ccbd06a37a602e6d312c0079fcb31afc5489a265a35a68c037743e01471ca950223d5cb6757b64 SHA512 ea6ae5a7f812985e0179dc2fe2f21136ecf6152ec2adf48d53e4fa19cfc14e74befe56c77a18f27ba966c12034a4fea442d5d1498a7cfe57ed052d332c199019 |
33 |
-DIST munin-2.0.63-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 |
34 |
-DIST munin-2.0.63.tar.gz 2254548 BLAKE2B 5e0aa63222706a1e23bcb2af98437ee8cc3f09cdf833a6546ea40cf7307728518d5d696bd500105f85139753bc17a26dddfb202a661d35a7046ffc55b5b9ef02 SHA512 c28d2bedda8abb8787e1ba40ec80961d1304c903e9e608e30ed7903210169f258f9c062fc97d89932ddd7aabefa4360495d19535520741911c489c9c3c2e76fe |
35 |
DIST munin-2.0.64-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 |
36 |
DIST munin-2.0.64.tar.gz 2256519 BLAKE2B 6a48327672ab7cf20be7a47d489467d0b888e00c01ca0ce8b0bc47a03b63087cf61de4aaf8ae0f18d8e5ef95c49f85092d719ae7de6fe51bcb5e60d138caa519 SHA512 d5f8fb04a601b053844b04850416f09b9f682b83298e35b973ee495cc60477720dc0483f73809db5ca24ba6b9fa1520f026a3f187db01b0c946cce756e4e401f |
37 |
DIST munin-2.0.65-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 |
38 |
|
39 |
diff --git a/net-analyzer/munin/munin-2.0.52.ebuild b/net-analyzer/munin/munin-2.0.52.ebuild |
40 |
deleted file mode 100644 |
41 |
index 56f3cf00bae..00000000000 |
42 |
--- a/net-analyzer/munin/munin-2.0.52.ebuild |
43 |
+++ /dev/null |
44 |
@@ -1,419 +0,0 @@ |
45 |
-# Copyright 1999-2020 Gentoo Authors |
46 |
-# Distributed under the terms of the GNU General Public License v2 |
47 |
- |
48 |
-EAPI=7 |
49 |
- |
50 |
-PATCHSET=1 |
51 |
- |
52 |
-inherit user java-pkg-opt-2 systemd |
53 |
- |
54 |
-MY_P=${P/_/-} |
55 |
- |
56 |
-DESCRIPTION="Munin Server Monitoring Tool" |
57 |
-HOMEPAGE="http://munin-monitoring.org/" |
58 |
-SRC_URI=" |
59 |
- https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz |
60 |
- https://dev.gentoo.org/~graaff/munin/${P}-gentoo-${PATCHSET}.tar.xz" |
61 |
- |
62 |
-LICENSE="GPL-2" |
63 |
-SLOT="0" |
64 |
-KEYWORDS="amd64 ~arm ppc x86" |
65 |
-IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" |
66 |
-REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" |
67 |
-RESTRICT="!test? ( test )" |
68 |
- |
69 |
-# Upstream's listing of required modules is NOT correct! |
70 |
-# Some of the postgres plugins use DBD::Pg, while others call psql directly. |
71 |
-# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. |
72 |
-# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. |
73 |
-DEPEND_COM=" |
74 |
- dev-lang/perl:=[berkdb] |
75 |
- dev-perl/DBI |
76 |
- dev-perl/Date-Manip |
77 |
- dev-perl/File-Copy-Recursive |
78 |
- dev-perl/List-MoreUtils |
79 |
- dev-perl/Log-Log4perl |
80 |
- dev-perl/Net-CIDR |
81 |
- dev-perl/Net-DNS |
82 |
- dev-perl/Net-Netmask |
83 |
- dev-perl/Net-SNMP |
84 |
- dev-perl/Net-Server[ipv6(-)?] |
85 |
- virtual/perl-Digest-MD5 |
86 |
- virtual/perl-Getopt-Long |
87 |
- virtual/perl-MIME-Base64 |
88 |
- virtual/perl-Storable |
89 |
- virtual/perl-Text-Balanced |
90 |
- virtual/perl-Time-HiRes |
91 |
- apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) |
92 |
- asterisk? ( dev-perl/Net-Telnet ) |
93 |
- cgi? ( |
94 |
- dev-perl/FCGI |
95 |
- dev-perl/CGI-Fast |
96 |
- ) |
97 |
- dhcpd? ( |
98 |
- >=net-misc/dhcp-3[server] |
99 |
- dev-perl/Net-IP |
100 |
- dev-perl/HTTP-Date |
101 |
- ) |
102 |
- doc? ( dev-python/sphinx ) |
103 |
- http? ( dev-perl/libwww-perl ) |
104 |
- irc? ( dev-perl/Net-IRC ) |
105 |
- ldap? ( dev-perl/perl-ldap ) |
106 |
- kernel_linux? ( sys-process/procps ) |
107 |
- memcached? ( dev-perl/Cache-Memcached ) |
108 |
- mysql? ( |
109 |
- virtual/mysql |
110 |
- dev-perl/Cache-Cache |
111 |
- dev-perl/DBD-mysql |
112 |
- ) |
113 |
- postgres? ( dev-perl/DBD-Pg dev-db/postgresql:* ) |
114 |
- ssl? ( dev-perl/Net-SSLeay ) |
115 |
- syslog? ( virtual/perl-Sys-Syslog ) |
116 |
- !minimal? ( |
117 |
- dev-perl/HTML-Template |
118 |
- dev-perl/IO-Socket-INET6 |
119 |
- dev-perl/URI |
120 |
- >=net-analyzer/rrdtool-1.3[graph,perl] |
121 |
- virtual/ssh |
122 |
- ) |
123 |
- " |
124 |
- |
125 |
-# Keep this seperate, as previous versions have had other deps here |
126 |
-DEPEND="${DEPEND_COM} |
127 |
- dev-perl/Module-Build |
128 |
- java? ( >=virtual/jdk-1.5 ) |
129 |
- test? ( |
130 |
- dev-perl/Test-Deep |
131 |
- dev-perl/Test-Exception |
132 |
- dev-perl/Test-LongString |
133 |
- dev-perl/Test-Differences |
134 |
- dev-perl/Test-MockModule |
135 |
- dev-perl/Test-MockObject |
136 |
- dev-perl/File-Slurp |
137 |
- dev-perl/IO-stringy |
138 |
- dev-perl/IO-Socket-INET6 |
139 |
- )" |
140 |
-RDEPEND="${DEPEND_COM} |
141 |
- virtual/awk |
142 |
- ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) |
143 |
- java? ( |
144 |
- >=virtual/jre-1.5 |
145 |
- || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) |
146 |
- ) |
147 |
- !minimal? ( |
148 |
- virtual/cron |
149 |
- media-fonts/dejavu |
150 |
- ) |
151 |
- selinux? ( sec-policy/selinux-munin ) |
152 |
- !<sys-apps/openrc-0.11.8" |
153 |
- |
154 |
-S="${WORKDIR}/${MY_P}" |
155 |
- |
156 |
-pkg_setup() { |
157 |
- enewgroup munin |
158 |
- enewuser munin 177 -1 /var/lib/munin munin |
159 |
- enewuser munin-async -1 /bin/sh /var/spool/munin-async |
160 |
- esethome munin-async /var/spool/munin-async |
161 |
- java-pkg-opt-2_pkg_setup |
162 |
-} |
163 |
- |
164 |
-src_prepare() { |
165 |
- echo ${PV} > RELEASE || die |
166 |
- |
167 |
- eapply "${WORKDIR}"/patches/*.patch |
168 |
- |
169 |
- eapply_user |
170 |
- |
171 |
- java-pkg-opt-2_src_prepare |
172 |
-} |
173 |
- |
174 |
-src_configure() { |
175 |
- local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' |
176 |
- use cgi || cgidir="${T}/useless/cgi-bin" |
177 |
- |
178 |
- local cgiuser=$(usex apache2 apache munin) |
179 |
- |
180 |
- cat >> "${S}"/Makefile.config <<- EOF |
181 |
- PREFIX=\$(DESTDIR)/usr |
182 |
- CONFDIR=\$(DESTDIR)/etc/munin |
183 |
- DOCDIR=${T}/useless/doc |
184 |
- MANDIR=\$(PREFIX)/share/man |
185 |
- LIBDIR=\$(PREFIX)/libexec/munin |
186 |
- HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin |
187 |
- CGIDIR=${cgidir} |
188 |
- CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi |
189 |
- CGIUSER=${cgiuser} |
190 |
- DBDIR=\$(DESTDIR)/var/lib/munin |
191 |
- DBDIRNODE=\$(DESTDIR)/var/lib/munin-node |
192 |
- SPOOLDIR=\$(DESTDIR)/var/spool/munin-async |
193 |
- LOGDIR=\$(DESTDIR)/var/log/munin |
194 |
- PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2) |
195 |
- JCVALID=$(usex java yes no) |
196 |
- STATEDIR=\$(DESTDIR)/run/munin |
197 |
- EOF |
198 |
-} |
199 |
- |
200 |
-# parallel make and install need to be fixed before, and I haven't |
201 |
-# gotten around to do so yet. |
202 |
-src_compile() { |
203 |
- emake -j1 |
204 |
- use doc && emake -C doc html |
205 |
-} |
206 |
- |
207 |
-src_test() { |
208 |
- if [[ ${EUID} == 0 ]]; then |
209 |
- eerror "You cannot run tests as root." |
210 |
- eerror "Please enable FEATURES=userpriv before proceeding." |
211 |
- return 1 |
212 |
- fi |
213 |
- |
214 |
- local testtargets="test-common test-node test-plugins" |
215 |
- use minimal || testtargets+=" test-master" |
216 |
- |
217 |
- LC_ALL=C emake -j1 ${testtargets} |
218 |
-} |
219 |
- |
220 |
-src_install() { |
221 |
- local dirs=" |
222 |
- /var/log/munin |
223 |
- /var/lib/munin/plugin-state |
224 |
- /var/lib/munin-node/plugin-state |
225 |
- /var/www/localhost/htdocs/munin |
226 |
- /etc/munin/plugin-conf.d |
227 |
- /etc/munin/plugins" |
228 |
- use minimal || dirs+=" /etc/munin/munin-conf.d/" |
229 |
- |
230 |
- keepdir ${dirs} |
231 |
- fowners munin:munin ${dirs} |
232 |
- |
233 |
- # parallel install doesn't work and it's also pointless to have this |
234 |
- # run in parallel for now (because it uses internal loops). |
235 |
- emake -j1 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) |
236 |
- |
237 |
- # we remove /run from the install, as it's not the package's to deal |
238 |
- # with. |
239 |
- rm -rf "${D}"/run || die |
240 |
- |
241 |
- # remove the plugins for non-Gentoo package managers; use -f so that |
242 |
- # it doesn't fail when installing on non-Linux platforms. |
243 |
- rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die |
244 |
- |
245 |
- insinto /etc/munin/plugin-conf.d/ |
246 |
- newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node |
247 |
- |
248 |
- newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node |
249 |
- newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node |
250 |
- |
251 |
- newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd |
252 |
- |
253 |
- dodir /usr/lib/tmpfiles.d |
254 |
- cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF |
255 |
- d /run/munin 0700 munin munin - - |
256 |
- EOF |
257 |
- |
258 |
- systemd_dounit "${FILESDIR}"/munin-async.service |
259 |
- systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} |
260 |
- systemd_dounit "${FILESDIR}"/munin-html.{service,socket} |
261 |
- systemd_dounit "${FILESDIR}"/munin-node.service |
262 |
- |
263 |
- cat >> "${T}"/munin.env <<- EOF |
264 |
- CONFIG_PROTECT=/var/spool/munin-async/.ssh |
265 |
- EOF |
266 |
- newenvd "${T}"/munin.env 50munin |
267 |
- |
268 |
- dodoc README ChangeLog INSTALL |
269 |
- if use doc; then |
270 |
- cd "${S}"/doc/_build/html || die |
271 |
- docinto html |
272 |
- dodoc -r * |
273 |
- cd "${S}" || die |
274 |
- fi |
275 |
- |
276 |
- dodir /etc/logrotate.d/ |
277 |
- sed -e "s:@CGIUSER@:$(usex apache2 apache munin):g" \ |
278 |
- "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin |
279 |
- |
280 |
- dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ |
281 |
- |
282 |
- if use syslog; then |
283 |
- sed -i -e '/log_file/s| .*| Sys::Syslog|' \ |
284 |
- "${D}"/etc/munin/munin-node.conf || die |
285 |
- fi |
286 |
- |
287 |
- # Use a simpler pid file to avoid trouble with /run in tmpfs. The |
288 |
- # munin-node service is ran as user root, and only later drops |
289 |
- # privileges. |
290 |
- sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ |
291 |
- "${D}"/etc/munin/munin-node.conf || die |
292 |
- |
293 |
- keepdir /var/spool/munin-async/.ssh |
294 |
- touch "${D}"/var/spool/munin-async/.ssh/authorized_keys |
295 |
- fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} |
296 |
- fperms 0750 /var/spool/munin-async{,/.ssh} |
297 |
- fperms 0600 /var/spool/munin-async/.ssh/authorized_keys |
298 |
- |
299 |
- if use minimal; then |
300 |
- # This requires the presence of munin-update, which is part of |
301 |
- # the non-minimal install... |
302 |
- rm "${D}"/usr/libexec/munin/plugins/munin_stats |
303 |
- else |
304 |
- # remove font files so that we don't have to keep them around |
305 |
- rm "${D}"/usr/libexec/${PN}/*.ttf || die |
306 |
- |
307 |
- if use cgi; then |
308 |
- sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die |
309 |
- |
310 |
- keepdir /var/cache/munin-cgi |
311 |
- touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log |
312 |
- fowners $(usex apache2 apache munin) \ |
313 |
- /var/cache/munin-cgi \ |
314 |
- /var/log/munin/munin-cgi-{graph,html}.log |
315 |
- |
316 |
- if use apache2; then |
317 |
- insinto /etc/apache2/vhosts.d |
318 |
- newins "${FILESDIR}"/munin.apache.include munin.include |
319 |
- newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include |
320 |
- fi |
321 |
- else |
322 |
- sed \ |
323 |
- -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ |
324 |
- -i "${D}"/etc/munin/munin.conf || die |
325 |
- fi |
326 |
- |
327 |
- keepdir /var/lib/munin/.ssh |
328 |
- cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF |
329 |
- IdentityFile /var/lib/munin/.ssh/id_ecdsa |
330 |
- IdentityFile /var/lib/munin/.ssh/id_rsa |
331 |
- EOF |
332 |
- |
333 |
- fowners munin:munin /var/lib/munin/.ssh/{,config} |
334 |
- fperms go-rwx /var/lib/munin/.ssh/{,config} |
335 |
- |
336 |
- dodir /usr/share/${PN} |
337 |
- cat >> "${D}"/usr/share/${PN}/crontab <<- EOF |
338 |
- # Force the shell to bash |
339 |
- SHELL=/bin/bash |
340 |
- # Mail reports to root@, not munin@ |
341 |
- MAILTO=root |
342 |
- |
343 |
- # This runs the munin task every 5 minutes. |
344 |
- */5 * * * * /usr/bin/munin-cron |
345 |
- |
346 |
- # Alternatively, this route works differently |
347 |
- # Update once a minute (for busy sites) |
348 |
- #*/1 * * * * /usr/libexec/munin/munin-update |
349 |
- ## Check for limit excess every 2 minutes |
350 |
- #*/2 * * * * /usr/libexec/munin/munin-limits |
351 |
- ## Update graphs every 5 minutes |
352 |
- #*/5 * * * * nice /usr/libexec/munin/munin-graph |
353 |
- ## Update HTML pages every 15 minutes |
354 |
- #*/15 * * * * nice /usr/libexec/munin/munin-html |
355 |
- EOF |
356 |
- |
357 |
- cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF |
358 |
- # Mail reports to root@, not munin@, only execute one at a time |
359 |
- !mailto(root),serial(true) |
360 |
- |
361 |
- # This runs the munin task every 5 minutes. |
362 |
- @ 5 /usr/bin/munin-cron |
363 |
- |
364 |
- # Alternatively, this route works differently |
365 |
- # Update once a minute (for busy sites) |
366 |
- #@ 1 /usr/libexec/munin/munin-update |
367 |
- ## Check for limit excess every 2 minutes |
368 |
- #@ 2 /usr/libexec/munin/munin-limits |
369 |
- ## Update graphs every 5 minutes |
370 |
- #@ 5 nice /usr/libexec/munin/munin-graph |
371 |
- ## Update HTML pages every 15 minutes |
372 |
- #@ 15 nice /usr/libexec/munin/munin-html |
373 |
- EOF |
374 |
- |
375 |
- # remove .htaccess file |
376 |
- find "${D}" -name .htaccess -delete || die |
377 |
- fi |
378 |
-} |
379 |
- |
380 |
-pkg_config() { |
381 |
- if use minimal; then |
382 |
- einfo "Nothing to do." |
383 |
- return 0 |
384 |
- fi |
385 |
- |
386 |
- einfo "Press enter to install the default crontab for the munin master" |
387 |
- einfo "installation from /usr/share/${PN}/f?crontab" |
388 |
- einfo "If you have a large site, you may wish to customize it." |
389 |
- read |
390 |
- |
391 |
- ebegin "Setting up cron ..." |
392 |
- if has_version sys-process/fcron; then |
393 |
- fcrontab - -u munin < /usr/share/${PN}/fcrontab |
394 |
- else |
395 |
- # dcron is very fussy about syntax |
396 |
- # the following is the only form that works in BOTH dcron and vixie-cron |
397 |
- crontab - -u munin < /usr/share/${PN}/crontab |
398 |
- fi |
399 |
- eend $? |
400 |
- |
401 |
- einfo "Press enter to set up the SSH keys used for SSH transport" |
402 |
- read |
403 |
- |
404 |
- # generate one rsa (for legacy) and one ecdsa (for new systems) |
405 |
- ssh-keygen -t rsa \ |
406 |
- -f /var/lib/munin/.ssh/id_rsa -N '' \ |
407 |
- -C "created by portage for ${CATEGORY}/${PN}" || die |
408 |
- ssh-keygen -t ecdsa \ |
409 |
- -f /var/lib/munin/.ssh/id_ecdsa -N '' \ |
410 |
- -C "created by portage for ${CATEGORY}/${PN}" || die |
411 |
- chown -R munin:munin /var/lib/munin/.ssh || die |
412 |
- chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die |
413 |
- |
414 |
- einfo "Your public keys are available in " |
415 |
- einfo " /var/lib/munin/.ssh/id_rsa.pub" |
416 |
- einfo " /var/lib/munin/.ssh/id_ecdsa.pub" |
417 |
- einfo "and follows for convenience" |
418 |
- echo |
419 |
- cat /var/lib/munin/.ssh/id_*.pub |
420 |
-} |
421 |
- |
422 |
-pkg_postinst() { |
423 |
- elog "Please follow the munin documentation to set up the plugins you" |
424 |
- elog "need, afterwards start munin-node." |
425 |
- elog "" |
426 |
- elog "To make use of munin-async, make sure to set up the corresponding" |
427 |
- elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" |
428 |
- elog "" |
429 |
- if ! use minimal; then |
430 |
- elog "Please run" |
431 |
- elog " emerge --config net-analyzer/munin" |
432 |
- elog "to automatically configure munin's cronjobs as well as generate" |
433 |
- elog "passwordless SSH keys to be used with munin-async." |
434 |
- fi |
435 |
- elog "" |
436 |
- elog "Further information about setting up Munin in Gentoo can be found" |
437 |
- elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" |
438 |
- |
439 |
- if use cgi; then |
440 |
- chown $(usex apache2 apache munin) \ |
441 |
- "${ROOT}"/var/cache/munin-cgi \ |
442 |
- "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log |
443 |
- |
444 |
- if use apache2; then |
445 |
- elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" |
446 |
- elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" |
447 |
- elog "host you want it to be served." |
448 |
- elog "If you want to enable CGI-based HTML as well, you have to add to" |
449 |
- elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." |
450 |
- else |
451 |
- elog "Effective CGI support has just been added in 2.0.7-r6." |
452 |
- elog "Documentation on how to use it is still sparse." |
453 |
- fi |
454 |
- fi |
455 |
- |
456 |
- # we create this here as we don't want Portage to check /run |
457 |
- # symlinks but we still need this to be present before the reboot. |
458 |
- if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then |
459 |
- mkdir "${ROOT}"/run/munin |
460 |
- chown munin:munin "${ROOT}"/run/munin |
461 |
- chmod 0700 "${ROOT}"/run/munin |
462 |
- fi |
463 |
-} |
464 |
|
465 |
diff --git a/net-analyzer/munin/munin-2.0.56.ebuild b/net-analyzer/munin/munin-2.0.56.ebuild |
466 |
deleted file mode 100644 |
467 |
index 500c7e3caf5..00000000000 |
468 |
--- a/net-analyzer/munin/munin-2.0.56.ebuild |
469 |
+++ /dev/null |
470 |
@@ -1,417 +0,0 @@ |
471 |
-# Copyright 1999-2020 Gentoo Authors |
472 |
-# Distributed under the terms of the GNU General Public License v2 |
473 |
- |
474 |
-EAPI=7 |
475 |
- |
476 |
-PATCHSET=1 |
477 |
- |
478 |
-inherit java-pkg-opt-2 systemd |
479 |
- |
480 |
-MY_P=${P/_/-} |
481 |
- |
482 |
-DESCRIPTION="Munin Server Monitoring Tool" |
483 |
-HOMEPAGE="http://munin-monitoring.org/" |
484 |
-SRC_URI=" |
485 |
- https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz |
486 |
- https://dev.gentoo.org/~graaff/munin/${P}-gentoo-${PATCHSET}.tar.xz" |
487 |
- |
488 |
-LICENSE="GPL-2" |
489 |
-SLOT="0" |
490 |
-KEYWORDS="amd64 ~arm ~ppc x86" |
491 |
-IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" |
492 |
-REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" |
493 |
-RESTRICT="!test? ( test )" |
494 |
- |
495 |
-# Upstream's listing of required modules is NOT correct! |
496 |
-# Some of the postgres plugins use DBD::Pg, while others call psql directly. |
497 |
-# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. |
498 |
-# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. |
499 |
-DEPEND_COM=" |
500 |
- acct-user/munin |
501 |
- acct-user/munin-async |
502 |
- acct-group/munin |
503 |
- dev-lang/perl:=[berkdb] |
504 |
- dev-perl/DBI |
505 |
- dev-perl/Date-Manip |
506 |
- dev-perl/File-Copy-Recursive |
507 |
- dev-perl/List-MoreUtils |
508 |
- dev-perl/Log-Log4perl |
509 |
- dev-perl/Net-CIDR |
510 |
- dev-perl/Net-DNS |
511 |
- dev-perl/Net-Netmask |
512 |
- dev-perl/Net-SNMP |
513 |
- dev-perl/Net-Server[ipv6(-)?] |
514 |
- virtual/perl-Digest-MD5 |
515 |
- virtual/perl-Getopt-Long |
516 |
- virtual/perl-MIME-Base64 |
517 |
- virtual/perl-Storable |
518 |
- virtual/perl-Text-Balanced |
519 |
- virtual/perl-Time-HiRes |
520 |
- apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) |
521 |
- asterisk? ( dev-perl/Net-Telnet ) |
522 |
- cgi? ( |
523 |
- dev-perl/FCGI |
524 |
- dev-perl/CGI-Fast |
525 |
- ) |
526 |
- dhcpd? ( |
527 |
- >=net-misc/dhcp-3[server] |
528 |
- dev-perl/Net-IP |
529 |
- dev-perl/HTTP-Date |
530 |
- ) |
531 |
- doc? ( dev-python/sphinx ) |
532 |
- http? ( dev-perl/libwww-perl ) |
533 |
- irc? ( dev-perl/Net-IRC ) |
534 |
- ldap? ( dev-perl/perl-ldap ) |
535 |
- kernel_linux? ( sys-process/procps ) |
536 |
- memcached? ( dev-perl/Cache-Memcached ) |
537 |
- mysql? ( |
538 |
- virtual/mysql |
539 |
- dev-perl/Cache-Cache |
540 |
- dev-perl/DBD-mysql |
541 |
- ) |
542 |
- postgres? ( dev-perl/DBD-Pg dev-db/postgresql:* ) |
543 |
- ssl? ( dev-perl/Net-SSLeay ) |
544 |
- syslog? ( virtual/perl-Sys-Syslog ) |
545 |
- !minimal? ( |
546 |
- dev-perl/HTML-Template |
547 |
- dev-perl/IO-Socket-INET6 |
548 |
- dev-perl/URI |
549 |
- >=net-analyzer/rrdtool-1.3[graph,perl] |
550 |
- virtual/ssh |
551 |
- ) |
552 |
- " |
553 |
- |
554 |
-# Keep this seperate, as previous versions have had other deps here |
555 |
-DEPEND="${DEPEND_COM} |
556 |
- dev-perl/Module-Build |
557 |
- java? ( >=virtual/jdk-1.5 ) |
558 |
- test? ( |
559 |
- dev-perl/Test-Deep |
560 |
- dev-perl/Test-Exception |
561 |
- dev-perl/Test-LongString |
562 |
- dev-perl/Test-Differences |
563 |
- dev-perl/Test-MockModule |
564 |
- dev-perl/Test-MockObject |
565 |
- dev-perl/File-Slurp |
566 |
- dev-perl/IO-stringy |
567 |
- dev-perl/IO-Socket-INET6 |
568 |
- )" |
569 |
-RDEPEND="${DEPEND_COM} |
570 |
- virtual/awk |
571 |
- ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) |
572 |
- java? ( |
573 |
- >=virtual/jre-1.5 |
574 |
- || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) |
575 |
- ) |
576 |
- !minimal? ( |
577 |
- virtual/cron |
578 |
- media-fonts/dejavu |
579 |
- ) |
580 |
- selinux? ( sec-policy/selinux-munin )" |
581 |
- |
582 |
-S="${WORKDIR}/${MY_P}" |
583 |
- |
584 |
-pkg_setup() { |
585 |
- java-pkg-opt-2_pkg_setup |
586 |
-} |
587 |
- |
588 |
-src_prepare() { |
589 |
- echo ${PV} > RELEASE || die |
590 |
- |
591 |
- eapply "${WORKDIR}"/patches/*.patch |
592 |
- |
593 |
- eapply_user |
594 |
- |
595 |
- java-pkg-opt-2_src_prepare |
596 |
-} |
597 |
- |
598 |
-src_configure() { |
599 |
- local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' |
600 |
- use cgi || cgidir="${T}/useless/cgi-bin" |
601 |
- |
602 |
- local cgiuser=$(usex apache2 apache munin) |
603 |
- |
604 |
- cat >> "${S}"/Makefile.config <<- EOF |
605 |
- PREFIX=\$(DESTDIR)/usr |
606 |
- CONFDIR=\$(DESTDIR)/etc/munin |
607 |
- DOCDIR=${T}/useless/doc |
608 |
- MANDIR=\$(PREFIX)/share/man |
609 |
- LIBDIR=\$(PREFIX)/libexec/munin |
610 |
- HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin |
611 |
- CGIDIR=${cgidir} |
612 |
- CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi |
613 |
- CGIUSER=${cgiuser} |
614 |
- DBDIR=\$(DESTDIR)/var/lib/munin |
615 |
- DBDIRNODE=\$(DESTDIR)/var/lib/munin-node |
616 |
- SPOOLDIR=\$(DESTDIR)/var/spool/munin-async |
617 |
- LOGDIR=\$(DESTDIR)/var/log/munin |
618 |
- PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2) |
619 |
- JCVALID=$(usex java yes no) |
620 |
- STATEDIR=\$(DESTDIR)/run/munin |
621 |
- EOF |
622 |
-} |
623 |
- |
624 |
-# parallel make and install need to be fixed before, and I haven't |
625 |
-# gotten around to do so yet. |
626 |
-src_compile() { |
627 |
- emake -j1 |
628 |
- use doc && emake -C doc html |
629 |
-} |
630 |
- |
631 |
-src_test() { |
632 |
- if [[ ${EUID} == 0 ]]; then |
633 |
- eerror "You cannot run tests as root." |
634 |
- eerror "Please enable FEATURES=userpriv before proceeding." |
635 |
- return 1 |
636 |
- fi |
637 |
- |
638 |
- local testtargets="test-common test-node test-plugins" |
639 |
- use minimal || testtargets+=" test-master" |
640 |
- |
641 |
- LC_ALL=C emake -j1 ${testtargets} |
642 |
-} |
643 |
- |
644 |
-src_install() { |
645 |
- local dirs=" |
646 |
- /var/log/munin |
647 |
- /var/lib/munin/plugin-state |
648 |
- /var/lib/munin-node/plugin-state |
649 |
- /var/www/localhost/htdocs/munin |
650 |
- /etc/munin/plugin-conf.d |
651 |
- /etc/munin/plugins" |
652 |
- use minimal || dirs+=" /etc/munin/munin-conf.d/" |
653 |
- |
654 |
- keepdir ${dirs} |
655 |
- fowners munin:munin ${dirs} |
656 |
- |
657 |
- # parallel install doesn't work and it's also pointless to have this |
658 |
- # run in parallel for now (because it uses internal loops). |
659 |
- emake -j1 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) |
660 |
- |
661 |
- # we remove /run from the install, as it's not the package's to deal |
662 |
- # with. |
663 |
- rm -rf "${D}"/run || die |
664 |
- |
665 |
- # remove the plugins for non-Gentoo package managers; use -f so that |
666 |
- # it doesn't fail when installing on non-Linux platforms. |
667 |
- rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die |
668 |
- |
669 |
- insinto /etc/munin/plugin-conf.d/ |
670 |
- newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node |
671 |
- |
672 |
- newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node |
673 |
- newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node |
674 |
- |
675 |
- newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd |
676 |
- |
677 |
- dodir /usr/lib/tmpfiles.d |
678 |
- cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF |
679 |
- d /run/munin 0700 munin munin - - |
680 |
- EOF |
681 |
- |
682 |
- systemd_dounit "${FILESDIR}"/munin-async.service |
683 |
- systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} |
684 |
- systemd_dounit "${FILESDIR}"/munin-html.{service,socket} |
685 |
- systemd_dounit "${FILESDIR}"/munin-node.service |
686 |
- |
687 |
- cat >> "${T}"/munin.env <<- EOF |
688 |
- CONFIG_PROTECT=/var/spool/munin-async/.ssh |
689 |
- EOF |
690 |
- newenvd "${T}"/munin.env 50munin |
691 |
- |
692 |
- dodoc README ChangeLog INSTALL |
693 |
- if use doc; then |
694 |
- cd "${S}"/doc/_build/html || die |
695 |
- docinto html |
696 |
- dodoc -r * |
697 |
- cd "${S}" || die |
698 |
- fi |
699 |
- |
700 |
- dodir /etc/logrotate.d/ |
701 |
- sed -e "s:@CGIUSER@:$(usex apache2 apache munin):g" \ |
702 |
- "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin |
703 |
- |
704 |
- dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ |
705 |
- |
706 |
- if use syslog; then |
707 |
- sed -i -e '/log_file/s| .*| Sys::Syslog|' \ |
708 |
- "${D}"/etc/munin/munin-node.conf || die |
709 |
- fi |
710 |
- |
711 |
- # Use a simpler pid file to avoid trouble with /run in tmpfs. The |
712 |
- # munin-node service is ran as user root, and only later drops |
713 |
- # privileges. |
714 |
- sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ |
715 |
- "${D}"/etc/munin/munin-node.conf || die |
716 |
- |
717 |
- keepdir /var/spool/munin-async/.ssh |
718 |
- touch "${D}"/var/spool/munin-async/.ssh/authorized_keys |
719 |
- fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} |
720 |
- fperms 0750 /var/spool/munin-async{,/.ssh} |
721 |
- fperms 0600 /var/spool/munin-async/.ssh/authorized_keys |
722 |
- |
723 |
- if use minimal; then |
724 |
- # This requires the presence of munin-update, which is part of |
725 |
- # the non-minimal install... |
726 |
- rm "${D}"/usr/libexec/munin/plugins/munin_stats |
727 |
- else |
728 |
- # remove font files so that we don't have to keep them around |
729 |
- rm "${D}"/usr/libexec/${PN}/*.ttf || die |
730 |
- |
731 |
- if use cgi; then |
732 |
- sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die |
733 |
- |
734 |
- keepdir /var/cache/munin-cgi |
735 |
- touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log |
736 |
- fowners $(usex apache2 apache munin) \ |
737 |
- /var/cache/munin-cgi \ |
738 |
- /var/log/munin/munin-cgi-{graph,html}.log |
739 |
- |
740 |
- if use apache2; then |
741 |
- insinto /etc/apache2/vhosts.d |
742 |
- newins "${FILESDIR}"/munin.apache.include munin.include |
743 |
- newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include |
744 |
- fi |
745 |
- else |
746 |
- sed \ |
747 |
- -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ |
748 |
- -i "${D}"/etc/munin/munin.conf || die |
749 |
- fi |
750 |
- |
751 |
- keepdir /var/lib/munin/.ssh |
752 |
- cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF |
753 |
- IdentityFile /var/lib/munin/.ssh/id_ecdsa |
754 |
- IdentityFile /var/lib/munin/.ssh/id_rsa |
755 |
- EOF |
756 |
- |
757 |
- fowners munin:munin /var/lib/munin/.ssh/{,config} |
758 |
- fperms go-rwx /var/lib/munin/.ssh/{,config} |
759 |
- |
760 |
- dodir /usr/share/${PN} |
761 |
- cat >> "${D}"/usr/share/${PN}/crontab <<- EOF |
762 |
- # Force the shell to bash |
763 |
- SHELL=/bin/bash |
764 |
- # Mail reports to root@, not munin@ |
765 |
- MAILTO=root |
766 |
- |
767 |
- # This runs the munin task every 5 minutes. |
768 |
- */5 * * * * /usr/bin/munin-cron |
769 |
- |
770 |
- # Alternatively, this route works differently |
771 |
- # Update once a minute (for busy sites) |
772 |
- #*/1 * * * * /usr/libexec/munin/munin-update |
773 |
- ## Check for limit excess every 2 minutes |
774 |
- #*/2 * * * * /usr/libexec/munin/munin-limits |
775 |
- ## Update graphs every 5 minutes |
776 |
- #*/5 * * * * nice /usr/libexec/munin/munin-graph |
777 |
- ## Update HTML pages every 15 minutes |
778 |
- #*/15 * * * * nice /usr/libexec/munin/munin-html |
779 |
- EOF |
780 |
- |
781 |
- cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF |
782 |
- # Mail reports to root@, not munin@, only execute one at a time |
783 |
- !mailto(root),serial(true) |
784 |
- |
785 |
- # This runs the munin task every 5 minutes. |
786 |
- @ 5 /usr/bin/munin-cron |
787 |
- |
788 |
- # Alternatively, this route works differently |
789 |
- # Update once a minute (for busy sites) |
790 |
- #@ 1 /usr/libexec/munin/munin-update |
791 |
- ## Check for limit excess every 2 minutes |
792 |
- #@ 2 /usr/libexec/munin/munin-limits |
793 |
- ## Update graphs every 5 minutes |
794 |
- #@ 5 nice /usr/libexec/munin/munin-graph |
795 |
- ## Update HTML pages every 15 minutes |
796 |
- #@ 15 nice /usr/libexec/munin/munin-html |
797 |
- EOF |
798 |
- |
799 |
- # remove .htaccess file |
800 |
- find "${D}" -name .htaccess -delete || die |
801 |
- fi |
802 |
-} |
803 |
- |
804 |
-pkg_config() { |
805 |
- if use minimal; then |
806 |
- einfo "Nothing to do." |
807 |
- return 0 |
808 |
- fi |
809 |
- |
810 |
- einfo "Press enter to install the default crontab for the munin master" |
811 |
- einfo "installation from /usr/share/${PN}/f?crontab" |
812 |
- einfo "If you have a large site, you may wish to customize it." |
813 |
- read |
814 |
- |
815 |
- ebegin "Setting up cron ..." |
816 |
- if has_version sys-process/fcron; then |
817 |
- fcrontab - -u munin < /usr/share/${PN}/fcrontab |
818 |
- else |
819 |
- # dcron is very fussy about syntax |
820 |
- # the following is the only form that works in BOTH dcron and vixie-cron |
821 |
- crontab - -u munin < /usr/share/${PN}/crontab |
822 |
- fi |
823 |
- eend $? |
824 |
- |
825 |
- einfo "Press enter to set up the SSH keys used for SSH transport" |
826 |
- read |
827 |
- |
828 |
- # generate one rsa (for legacy) and one ecdsa (for new systems) |
829 |
- ssh-keygen -t rsa \ |
830 |
- -f /var/lib/munin/.ssh/id_rsa -N '' \ |
831 |
- -C "created by portage for ${CATEGORY}/${PN}" || die |
832 |
- ssh-keygen -t ecdsa \ |
833 |
- -f /var/lib/munin/.ssh/id_ecdsa -N '' \ |
834 |
- -C "created by portage for ${CATEGORY}/${PN}" || die |
835 |
- chown -R munin:munin /var/lib/munin/.ssh || die |
836 |
- chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die |
837 |
- |
838 |
- einfo "Your public keys are available in " |
839 |
- einfo " /var/lib/munin/.ssh/id_rsa.pub" |
840 |
- einfo " /var/lib/munin/.ssh/id_ecdsa.pub" |
841 |
- einfo "and follows for convenience" |
842 |
- echo |
843 |
- cat /var/lib/munin/.ssh/id_*.pub |
844 |
-} |
845 |
- |
846 |
-pkg_postinst() { |
847 |
- elog "Please follow the munin documentation to set up the plugins you" |
848 |
- elog "need, afterwards start munin-node." |
849 |
- elog "" |
850 |
- elog "To make use of munin-async, make sure to set up the corresponding" |
851 |
- elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" |
852 |
- elog "" |
853 |
- if ! use minimal; then |
854 |
- elog "Please run" |
855 |
- elog " emerge --config net-analyzer/munin" |
856 |
- elog "to automatically configure munin's cronjobs as well as generate" |
857 |
- elog "passwordless SSH keys to be used with munin-async." |
858 |
- fi |
859 |
- elog "" |
860 |
- elog "Further information about setting up Munin in Gentoo can be found" |
861 |
- elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" |
862 |
- |
863 |
- if use cgi; then |
864 |
- chown $(usex apache2 apache munin) \ |
865 |
- "${ROOT}"/var/cache/munin-cgi \ |
866 |
- "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log |
867 |
- |
868 |
- if use apache2; then |
869 |
- elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" |
870 |
- elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" |
871 |
- elog "host you want it to be served." |
872 |
- elog "If you want to enable CGI-based HTML as well, you have to add to" |
873 |
- elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." |
874 |
- else |
875 |
- elog "Effective CGI support has just been added in 2.0.7-r6." |
876 |
- elog "Documentation on how to use it is still sparse." |
877 |
- fi |
878 |
- fi |
879 |
- |
880 |
- # we create this here as we don't want Portage to check /run |
881 |
- # symlinks but we still need this to be present before the reboot. |
882 |
- if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then |
883 |
- mkdir "${ROOT}"/run/munin |
884 |
- chown munin:munin "${ROOT}"/run/munin |
885 |
- chmod 0700 "${ROOT}"/run/munin |
886 |
- fi |
887 |
-} |
888 |
|
889 |
diff --git a/net-analyzer/munin/munin-2.0.61.ebuild b/net-analyzer/munin/munin-2.0.61.ebuild |
890 |
deleted file mode 100644 |
891 |
index acaf9f6d9f0..00000000000 |
892 |
--- a/net-analyzer/munin/munin-2.0.61.ebuild |
893 |
+++ /dev/null |
894 |
@@ -1,417 +0,0 @@ |
895 |
-# Copyright 1999-2020 Gentoo Authors |
896 |
-# Distributed under the terms of the GNU General Public License v2 |
897 |
- |
898 |
-EAPI=7 |
899 |
- |
900 |
-PATCHSET=1 |
901 |
- |
902 |
-inherit java-pkg-opt-2 systemd |
903 |
- |
904 |
-MY_P=${P/_/-} |
905 |
- |
906 |
-DESCRIPTION="Munin Server Monitoring Tool" |
907 |
-HOMEPAGE="http://munin-monitoring.org/" |
908 |
-SRC_URI=" |
909 |
- https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz |
910 |
- https://dev.gentoo.org/~graaff/munin/${P}-gentoo-${PATCHSET}.tar.xz" |
911 |
- |
912 |
-LICENSE="GPL-2" |
913 |
-SLOT="0" |
914 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
915 |
-IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" |
916 |
-REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" |
917 |
-RESTRICT="!test? ( test )" |
918 |
- |
919 |
-# Upstream's listing of required modules is NOT correct! |
920 |
-# Some of the postgres plugins use DBD::Pg, while others call psql directly. |
921 |
-# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. |
922 |
-# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. |
923 |
-DEPEND_COM=" |
924 |
- acct-user/munin |
925 |
- acct-user/munin-async |
926 |
- acct-group/munin |
927 |
- dev-lang/perl:=[berkdb] |
928 |
- dev-perl/DBI |
929 |
- dev-perl/Date-Manip |
930 |
- dev-perl/File-Copy-Recursive |
931 |
- dev-perl/List-MoreUtils |
932 |
- dev-perl/Log-Log4perl |
933 |
- dev-perl/Net-CIDR |
934 |
- dev-perl/Net-DNS |
935 |
- dev-perl/Net-Netmask |
936 |
- dev-perl/Net-SNMP |
937 |
- dev-perl/Net-Server[ipv6(-)?] |
938 |
- virtual/perl-Digest-MD5 |
939 |
- virtual/perl-Getopt-Long |
940 |
- virtual/perl-MIME-Base64 |
941 |
- virtual/perl-Storable |
942 |
- virtual/perl-Text-Balanced |
943 |
- virtual/perl-Time-HiRes |
944 |
- apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) |
945 |
- asterisk? ( dev-perl/Net-Telnet ) |
946 |
- cgi? ( |
947 |
- dev-perl/FCGI |
948 |
- dev-perl/CGI-Fast |
949 |
- ) |
950 |
- dhcpd? ( |
951 |
- >=net-misc/dhcp-3[server] |
952 |
- dev-perl/Net-IP |
953 |
- dev-perl/HTTP-Date |
954 |
- ) |
955 |
- doc? ( dev-python/sphinx ) |
956 |
- http? ( dev-perl/libwww-perl ) |
957 |
- irc? ( dev-perl/Net-IRC ) |
958 |
- ldap? ( dev-perl/perl-ldap ) |
959 |
- kernel_linux? ( sys-process/procps ) |
960 |
- memcached? ( dev-perl/Cache-Memcached ) |
961 |
- mysql? ( |
962 |
- virtual/mysql |
963 |
- dev-perl/Cache-Cache |
964 |
- dev-perl/DBD-mysql |
965 |
- ) |
966 |
- postgres? ( dev-perl/DBD-Pg dev-db/postgresql:* ) |
967 |
- ssl? ( dev-perl/Net-SSLeay ) |
968 |
- syslog? ( virtual/perl-Sys-Syslog ) |
969 |
- !minimal? ( |
970 |
- dev-perl/HTML-Template |
971 |
- dev-perl/IO-Socket-INET6 |
972 |
- dev-perl/URI |
973 |
- >=net-analyzer/rrdtool-1.3[graph,perl] |
974 |
- virtual/ssh |
975 |
- ) |
976 |
- " |
977 |
- |
978 |
-# Keep this seperate, as previous versions have had other deps here |
979 |
-DEPEND="${DEPEND_COM} |
980 |
- dev-perl/Module-Build |
981 |
- java? ( >=virtual/jdk-1.5 ) |
982 |
- test? ( |
983 |
- dev-perl/Test-Deep |
984 |
- dev-perl/Test-Exception |
985 |
- dev-perl/Test-LongString |
986 |
- dev-perl/Test-Differences |
987 |
- dev-perl/Test-MockModule |
988 |
- dev-perl/Test-MockObject |
989 |
- dev-perl/File-Slurp |
990 |
- dev-perl/IO-stringy |
991 |
- dev-perl/IO-Socket-INET6 |
992 |
- )" |
993 |
-RDEPEND="${DEPEND_COM} |
994 |
- virtual/awk |
995 |
- ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) |
996 |
- java? ( |
997 |
- >=virtual/jre-1.5 |
998 |
- || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) |
999 |
- ) |
1000 |
- !minimal? ( |
1001 |
- virtual/cron |
1002 |
- media-fonts/dejavu |
1003 |
- ) |
1004 |
- selinux? ( sec-policy/selinux-munin )" |
1005 |
- |
1006 |
-S="${WORKDIR}/${MY_P}" |
1007 |
- |
1008 |
-pkg_setup() { |
1009 |
- java-pkg-opt-2_pkg_setup |
1010 |
-} |
1011 |
- |
1012 |
-src_prepare() { |
1013 |
- echo ${PV} > RELEASE || die |
1014 |
- |
1015 |
- eapply "${WORKDIR}"/patches/*.patch |
1016 |
- |
1017 |
- eapply_user |
1018 |
- |
1019 |
- java-pkg-opt-2_src_prepare |
1020 |
-} |
1021 |
- |
1022 |
-src_configure() { |
1023 |
- local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' |
1024 |
- use cgi || cgidir="${T}/useless/cgi-bin" |
1025 |
- |
1026 |
- local cgiuser=$(usex apache2 apache munin) |
1027 |
- |
1028 |
- cat >> "${S}"/Makefile.config <<- EOF |
1029 |
- PREFIX=\$(DESTDIR)/usr |
1030 |
- CONFDIR=\$(DESTDIR)/etc/munin |
1031 |
- DOCDIR=${T}/useless/doc |
1032 |
- MANDIR=\$(PREFIX)/share/man |
1033 |
- LIBDIR=\$(PREFIX)/libexec/munin |
1034 |
- HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin |
1035 |
- CGIDIR=${cgidir} |
1036 |
- CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi |
1037 |
- CGIUSER=${cgiuser} |
1038 |
- DBDIR=\$(DESTDIR)/var/lib/munin |
1039 |
- DBDIRNODE=\$(DESTDIR)/var/lib/munin-node |
1040 |
- SPOOLDIR=\$(DESTDIR)/var/spool/munin-async |
1041 |
- LOGDIR=\$(DESTDIR)/var/log/munin |
1042 |
- PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2) |
1043 |
- JCVALID=$(usex java yes no) |
1044 |
- STATEDIR=\$(DESTDIR)/run/munin |
1045 |
- EOF |
1046 |
-} |
1047 |
- |
1048 |
-# parallel make and install need to be fixed before, and I haven't |
1049 |
-# gotten around to do so yet. |
1050 |
-src_compile() { |
1051 |
- emake -j1 |
1052 |
- use doc && emake -C doc html |
1053 |
-} |
1054 |
- |
1055 |
-src_test() { |
1056 |
- if [[ ${EUID} == 0 ]]; then |
1057 |
- eerror "You cannot run tests as root." |
1058 |
- eerror "Please enable FEATURES=userpriv before proceeding." |
1059 |
- return 1 |
1060 |
- fi |
1061 |
- |
1062 |
- local testtargets="test-common test-node test-plugins" |
1063 |
- use minimal || testtargets+=" test-master" |
1064 |
- |
1065 |
- LC_ALL=C emake -j1 ${testtargets} |
1066 |
-} |
1067 |
- |
1068 |
-src_install() { |
1069 |
- local dirs=" |
1070 |
- /var/log/munin |
1071 |
- /var/lib/munin/plugin-state |
1072 |
- /var/lib/munin-node/plugin-state |
1073 |
- /var/www/localhost/htdocs/munin |
1074 |
- /etc/munin/plugin-conf.d |
1075 |
- /etc/munin/plugins" |
1076 |
- use minimal || dirs+=" /etc/munin/munin-conf.d/" |
1077 |
- |
1078 |
- keepdir ${dirs} |
1079 |
- fowners munin:munin ${dirs} |
1080 |
- |
1081 |
- # parallel install doesn't work and it's also pointless to have this |
1082 |
- # run in parallel for now (because it uses internal loops). |
1083 |
- emake -j1 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) |
1084 |
- |
1085 |
- # we remove /run from the install, as it's not the package's to deal |
1086 |
- # with. |
1087 |
- rm -rf "${D}"/run || die |
1088 |
- |
1089 |
- # remove the plugins for non-Gentoo package managers; use -f so that |
1090 |
- # it doesn't fail when installing on non-Linux platforms. |
1091 |
- rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die |
1092 |
- |
1093 |
- insinto /etc/munin/plugin-conf.d/ |
1094 |
- newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node |
1095 |
- |
1096 |
- newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node |
1097 |
- newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node |
1098 |
- |
1099 |
- newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd |
1100 |
- |
1101 |
- dodir /usr/lib/tmpfiles.d |
1102 |
- cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF |
1103 |
- d /run/munin 0700 munin munin - - |
1104 |
- EOF |
1105 |
- |
1106 |
- systemd_dounit "${FILESDIR}"/munin-async.service |
1107 |
- systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} |
1108 |
- systemd_dounit "${FILESDIR}"/munin-html.{service,socket} |
1109 |
- systemd_dounit "${FILESDIR}"/munin-node.service |
1110 |
- |
1111 |
- cat >> "${T}"/munin.env <<- EOF |
1112 |
- CONFIG_PROTECT=/var/spool/munin-async/.ssh |
1113 |
- EOF |
1114 |
- newenvd "${T}"/munin.env 50munin |
1115 |
- |
1116 |
- dodoc README ChangeLog INSTALL |
1117 |
- if use doc; then |
1118 |
- cd "${S}"/doc/_build/html || die |
1119 |
- docinto html |
1120 |
- dodoc -r * |
1121 |
- cd "${S}" || die |
1122 |
- fi |
1123 |
- |
1124 |
- dodir /etc/logrotate.d/ |
1125 |
- sed -e "s:@CGIUSER@:$(usex apache2 apache munin):g" \ |
1126 |
- "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin |
1127 |
- |
1128 |
- dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ |
1129 |
- |
1130 |
- if use syslog; then |
1131 |
- sed -i -e '/log_file/s| .*| Sys::Syslog|' \ |
1132 |
- "${D}"/etc/munin/munin-node.conf || die |
1133 |
- fi |
1134 |
- |
1135 |
- # Use a simpler pid file to avoid trouble with /run in tmpfs. The |
1136 |
- # munin-node service is ran as user root, and only later drops |
1137 |
- # privileges. |
1138 |
- sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ |
1139 |
- "${D}"/etc/munin/munin-node.conf || die |
1140 |
- |
1141 |
- keepdir /var/spool/munin-async/.ssh |
1142 |
- touch "${D}"/var/spool/munin-async/.ssh/authorized_keys |
1143 |
- fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} |
1144 |
- fperms 0750 /var/spool/munin-async{,/.ssh} |
1145 |
- fperms 0600 /var/spool/munin-async/.ssh/authorized_keys |
1146 |
- |
1147 |
- if use minimal; then |
1148 |
- # This requires the presence of munin-update, which is part of |
1149 |
- # the non-minimal install... |
1150 |
- rm "${D}"/usr/libexec/munin/plugins/munin_stats |
1151 |
- else |
1152 |
- # remove font files so that we don't have to keep them around |
1153 |
- rm "${D}"/usr/libexec/${PN}/*.ttf || die |
1154 |
- |
1155 |
- if use cgi; then |
1156 |
- sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die |
1157 |
- |
1158 |
- keepdir /var/cache/munin-cgi |
1159 |
- touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log |
1160 |
- fowners $(usex apache2 apache munin) \ |
1161 |
- /var/cache/munin-cgi \ |
1162 |
- /var/log/munin/munin-cgi-{graph,html}.log |
1163 |
- |
1164 |
- if use apache2; then |
1165 |
- insinto /etc/apache2/vhosts.d |
1166 |
- newins "${FILESDIR}"/munin.apache.include munin.include |
1167 |
- newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include |
1168 |
- fi |
1169 |
- else |
1170 |
- sed \ |
1171 |
- -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ |
1172 |
- -i "${D}"/etc/munin/munin.conf || die |
1173 |
- fi |
1174 |
- |
1175 |
- keepdir /var/lib/munin/.ssh |
1176 |
- cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF |
1177 |
- IdentityFile /var/lib/munin/.ssh/id_ecdsa |
1178 |
- IdentityFile /var/lib/munin/.ssh/id_rsa |
1179 |
- EOF |
1180 |
- |
1181 |
- fowners munin:munin /var/lib/munin/.ssh/{,config} |
1182 |
- fperms go-rwx /var/lib/munin/.ssh/{,config} |
1183 |
- |
1184 |
- dodir /usr/share/${PN} |
1185 |
- cat >> "${D}"/usr/share/${PN}/crontab <<- EOF |
1186 |
- # Force the shell to bash |
1187 |
- SHELL=/bin/bash |
1188 |
- # Mail reports to root@, not munin@ |
1189 |
- MAILTO=root |
1190 |
- |
1191 |
- # This runs the munin task every 5 minutes. |
1192 |
- */5 * * * * /usr/bin/munin-cron |
1193 |
- |
1194 |
- # Alternatively, this route works differently |
1195 |
- # Update once a minute (for busy sites) |
1196 |
- #*/1 * * * * /usr/libexec/munin/munin-update |
1197 |
- ## Check for limit excess every 2 minutes |
1198 |
- #*/2 * * * * /usr/libexec/munin/munin-limits |
1199 |
- ## Update graphs every 5 minutes |
1200 |
- #*/5 * * * * nice /usr/libexec/munin/munin-graph |
1201 |
- ## Update HTML pages every 15 minutes |
1202 |
- #*/15 * * * * nice /usr/libexec/munin/munin-html |
1203 |
- EOF |
1204 |
- |
1205 |
- cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF |
1206 |
- # Mail reports to root@, not munin@, only execute one at a time |
1207 |
- !mailto(root),serial(true) |
1208 |
- |
1209 |
- # This runs the munin task every 5 minutes. |
1210 |
- @ 5 /usr/bin/munin-cron |
1211 |
- |
1212 |
- # Alternatively, this route works differently |
1213 |
- # Update once a minute (for busy sites) |
1214 |
- #@ 1 /usr/libexec/munin/munin-update |
1215 |
- ## Check for limit excess every 2 minutes |
1216 |
- #@ 2 /usr/libexec/munin/munin-limits |
1217 |
- ## Update graphs every 5 minutes |
1218 |
- #@ 5 nice /usr/libexec/munin/munin-graph |
1219 |
- ## Update HTML pages every 15 minutes |
1220 |
- #@ 15 nice /usr/libexec/munin/munin-html |
1221 |
- EOF |
1222 |
- |
1223 |
- # remove .htaccess file |
1224 |
- find "${D}" -name .htaccess -delete || die |
1225 |
- fi |
1226 |
-} |
1227 |
- |
1228 |
-pkg_config() { |
1229 |
- if use minimal; then |
1230 |
- einfo "Nothing to do." |
1231 |
- return 0 |
1232 |
- fi |
1233 |
- |
1234 |
- einfo "Press enter to install the default crontab for the munin master" |
1235 |
- einfo "installation from /usr/share/${PN}/f?crontab" |
1236 |
- einfo "If you have a large site, you may wish to customize it." |
1237 |
- read |
1238 |
- |
1239 |
- ebegin "Setting up cron ..." |
1240 |
- if has_version sys-process/fcron; then |
1241 |
- fcrontab - -u munin < /usr/share/${PN}/fcrontab |
1242 |
- else |
1243 |
- # dcron is very fussy about syntax |
1244 |
- # the following is the only form that works in BOTH dcron and vixie-cron |
1245 |
- crontab - -u munin < /usr/share/${PN}/crontab |
1246 |
- fi |
1247 |
- eend $? |
1248 |
- |
1249 |
- einfo "Press enter to set up the SSH keys used for SSH transport" |
1250 |
- read |
1251 |
- |
1252 |
- # generate one rsa (for legacy) and one ecdsa (for new systems) |
1253 |
- ssh-keygen -t rsa \ |
1254 |
- -f /var/lib/munin/.ssh/id_rsa -N '' \ |
1255 |
- -C "created by portage for ${CATEGORY}/${PN}" || die |
1256 |
- ssh-keygen -t ecdsa \ |
1257 |
- -f /var/lib/munin/.ssh/id_ecdsa -N '' \ |
1258 |
- -C "created by portage for ${CATEGORY}/${PN}" || die |
1259 |
- chown -R munin:munin /var/lib/munin/.ssh || die |
1260 |
- chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die |
1261 |
- |
1262 |
- einfo "Your public keys are available in " |
1263 |
- einfo " /var/lib/munin/.ssh/id_rsa.pub" |
1264 |
- einfo " /var/lib/munin/.ssh/id_ecdsa.pub" |
1265 |
- einfo "and follows for convenience" |
1266 |
- echo |
1267 |
- cat /var/lib/munin/.ssh/id_*.pub |
1268 |
-} |
1269 |
- |
1270 |
-pkg_postinst() { |
1271 |
- elog "Please follow the munin documentation to set up the plugins you" |
1272 |
- elog "need, afterwards start munin-node." |
1273 |
- elog "" |
1274 |
- elog "To make use of munin-async, make sure to set up the corresponding" |
1275 |
- elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" |
1276 |
- elog "" |
1277 |
- if ! use minimal; then |
1278 |
- elog "Please run" |
1279 |
- elog " emerge --config net-analyzer/munin" |
1280 |
- elog "to automatically configure munin's cronjobs as well as generate" |
1281 |
- elog "passwordless SSH keys to be used with munin-async." |
1282 |
- fi |
1283 |
- elog "" |
1284 |
- elog "Further information about setting up Munin in Gentoo can be found" |
1285 |
- elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" |
1286 |
- |
1287 |
- if use cgi; then |
1288 |
- chown $(usex apache2 apache munin) \ |
1289 |
- "${ROOT}"/var/cache/munin-cgi \ |
1290 |
- "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log |
1291 |
- |
1292 |
- if use apache2; then |
1293 |
- elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" |
1294 |
- elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" |
1295 |
- elog "host you want it to be served." |
1296 |
- elog "If you want to enable CGI-based HTML as well, you have to add to" |
1297 |
- elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." |
1298 |
- else |
1299 |
- elog "Effective CGI support has just been added in 2.0.7-r6." |
1300 |
- elog "Documentation on how to use it is still sparse." |
1301 |
- fi |
1302 |
- fi |
1303 |
- |
1304 |
- # we create this here as we don't want Portage to check /run |
1305 |
- # symlinks but we still need this to be present before the reboot. |
1306 |
- if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then |
1307 |
- mkdir "${ROOT}"/run/munin |
1308 |
- chown munin:munin "${ROOT}"/run/munin |
1309 |
- chmod 0700 "${ROOT}"/run/munin |
1310 |
- fi |
1311 |
-} |
1312 |
|
1313 |
diff --git a/net-analyzer/munin/munin-2.0.63.ebuild b/net-analyzer/munin/munin-2.0.63.ebuild |
1314 |
deleted file mode 100644 |
1315 |
index acaf9f6d9f0..00000000000 |
1316 |
--- a/net-analyzer/munin/munin-2.0.63.ebuild |
1317 |
+++ /dev/null |
1318 |
@@ -1,417 +0,0 @@ |
1319 |
-# Copyright 1999-2020 Gentoo Authors |
1320 |
-# Distributed under the terms of the GNU General Public License v2 |
1321 |
- |
1322 |
-EAPI=7 |
1323 |
- |
1324 |
-PATCHSET=1 |
1325 |
- |
1326 |
-inherit java-pkg-opt-2 systemd |
1327 |
- |
1328 |
-MY_P=${P/_/-} |
1329 |
- |
1330 |
-DESCRIPTION="Munin Server Monitoring Tool" |
1331 |
-HOMEPAGE="http://munin-monitoring.org/" |
1332 |
-SRC_URI=" |
1333 |
- https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz |
1334 |
- https://dev.gentoo.org/~graaff/munin/${P}-gentoo-${PATCHSET}.tar.xz" |
1335 |
- |
1336 |
-LICENSE="GPL-2" |
1337 |
-SLOT="0" |
1338 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
1339 |
-IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" |
1340 |
-REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" |
1341 |
-RESTRICT="!test? ( test )" |
1342 |
- |
1343 |
-# Upstream's listing of required modules is NOT correct! |
1344 |
-# Some of the postgres plugins use DBD::Pg, while others call psql directly. |
1345 |
-# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. |
1346 |
-# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. |
1347 |
-DEPEND_COM=" |
1348 |
- acct-user/munin |
1349 |
- acct-user/munin-async |
1350 |
- acct-group/munin |
1351 |
- dev-lang/perl:=[berkdb] |
1352 |
- dev-perl/DBI |
1353 |
- dev-perl/Date-Manip |
1354 |
- dev-perl/File-Copy-Recursive |
1355 |
- dev-perl/List-MoreUtils |
1356 |
- dev-perl/Log-Log4perl |
1357 |
- dev-perl/Net-CIDR |
1358 |
- dev-perl/Net-DNS |
1359 |
- dev-perl/Net-Netmask |
1360 |
- dev-perl/Net-SNMP |
1361 |
- dev-perl/Net-Server[ipv6(-)?] |
1362 |
- virtual/perl-Digest-MD5 |
1363 |
- virtual/perl-Getopt-Long |
1364 |
- virtual/perl-MIME-Base64 |
1365 |
- virtual/perl-Storable |
1366 |
- virtual/perl-Text-Balanced |
1367 |
- virtual/perl-Time-HiRes |
1368 |
- apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) |
1369 |
- asterisk? ( dev-perl/Net-Telnet ) |
1370 |
- cgi? ( |
1371 |
- dev-perl/FCGI |
1372 |
- dev-perl/CGI-Fast |
1373 |
- ) |
1374 |
- dhcpd? ( |
1375 |
- >=net-misc/dhcp-3[server] |
1376 |
- dev-perl/Net-IP |
1377 |
- dev-perl/HTTP-Date |
1378 |
- ) |
1379 |
- doc? ( dev-python/sphinx ) |
1380 |
- http? ( dev-perl/libwww-perl ) |
1381 |
- irc? ( dev-perl/Net-IRC ) |
1382 |
- ldap? ( dev-perl/perl-ldap ) |
1383 |
- kernel_linux? ( sys-process/procps ) |
1384 |
- memcached? ( dev-perl/Cache-Memcached ) |
1385 |
- mysql? ( |
1386 |
- virtual/mysql |
1387 |
- dev-perl/Cache-Cache |
1388 |
- dev-perl/DBD-mysql |
1389 |
- ) |
1390 |
- postgres? ( dev-perl/DBD-Pg dev-db/postgresql:* ) |
1391 |
- ssl? ( dev-perl/Net-SSLeay ) |
1392 |
- syslog? ( virtual/perl-Sys-Syslog ) |
1393 |
- !minimal? ( |
1394 |
- dev-perl/HTML-Template |
1395 |
- dev-perl/IO-Socket-INET6 |
1396 |
- dev-perl/URI |
1397 |
- >=net-analyzer/rrdtool-1.3[graph,perl] |
1398 |
- virtual/ssh |
1399 |
- ) |
1400 |
- " |
1401 |
- |
1402 |
-# Keep this seperate, as previous versions have had other deps here |
1403 |
-DEPEND="${DEPEND_COM} |
1404 |
- dev-perl/Module-Build |
1405 |
- java? ( >=virtual/jdk-1.5 ) |
1406 |
- test? ( |
1407 |
- dev-perl/Test-Deep |
1408 |
- dev-perl/Test-Exception |
1409 |
- dev-perl/Test-LongString |
1410 |
- dev-perl/Test-Differences |
1411 |
- dev-perl/Test-MockModule |
1412 |
- dev-perl/Test-MockObject |
1413 |
- dev-perl/File-Slurp |
1414 |
- dev-perl/IO-stringy |
1415 |
- dev-perl/IO-Socket-INET6 |
1416 |
- )" |
1417 |
-RDEPEND="${DEPEND_COM} |
1418 |
- virtual/awk |
1419 |
- ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) |
1420 |
- java? ( |
1421 |
- >=virtual/jre-1.5 |
1422 |
- || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) |
1423 |
- ) |
1424 |
- !minimal? ( |
1425 |
- virtual/cron |
1426 |
- media-fonts/dejavu |
1427 |
- ) |
1428 |
- selinux? ( sec-policy/selinux-munin )" |
1429 |
- |
1430 |
-S="${WORKDIR}/${MY_P}" |
1431 |
- |
1432 |
-pkg_setup() { |
1433 |
- java-pkg-opt-2_pkg_setup |
1434 |
-} |
1435 |
- |
1436 |
-src_prepare() { |
1437 |
- echo ${PV} > RELEASE || die |
1438 |
- |
1439 |
- eapply "${WORKDIR}"/patches/*.patch |
1440 |
- |
1441 |
- eapply_user |
1442 |
- |
1443 |
- java-pkg-opt-2_src_prepare |
1444 |
-} |
1445 |
- |
1446 |
-src_configure() { |
1447 |
- local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' |
1448 |
- use cgi || cgidir="${T}/useless/cgi-bin" |
1449 |
- |
1450 |
- local cgiuser=$(usex apache2 apache munin) |
1451 |
- |
1452 |
- cat >> "${S}"/Makefile.config <<- EOF |
1453 |
- PREFIX=\$(DESTDIR)/usr |
1454 |
- CONFDIR=\$(DESTDIR)/etc/munin |
1455 |
- DOCDIR=${T}/useless/doc |
1456 |
- MANDIR=\$(PREFIX)/share/man |
1457 |
- LIBDIR=\$(PREFIX)/libexec/munin |
1458 |
- HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin |
1459 |
- CGIDIR=${cgidir} |
1460 |
- CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi |
1461 |
- CGIUSER=${cgiuser} |
1462 |
- DBDIR=\$(DESTDIR)/var/lib/munin |
1463 |
- DBDIRNODE=\$(DESTDIR)/var/lib/munin-node |
1464 |
- SPOOLDIR=\$(DESTDIR)/var/spool/munin-async |
1465 |
- LOGDIR=\$(DESTDIR)/var/log/munin |
1466 |
- PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2) |
1467 |
- JCVALID=$(usex java yes no) |
1468 |
- STATEDIR=\$(DESTDIR)/run/munin |
1469 |
- EOF |
1470 |
-} |
1471 |
- |
1472 |
-# parallel make and install need to be fixed before, and I haven't |
1473 |
-# gotten around to do so yet. |
1474 |
-src_compile() { |
1475 |
- emake -j1 |
1476 |
- use doc && emake -C doc html |
1477 |
-} |
1478 |
- |
1479 |
-src_test() { |
1480 |
- if [[ ${EUID} == 0 ]]; then |
1481 |
- eerror "You cannot run tests as root." |
1482 |
- eerror "Please enable FEATURES=userpriv before proceeding." |
1483 |
- return 1 |
1484 |
- fi |
1485 |
- |
1486 |
- local testtargets="test-common test-node test-plugins" |
1487 |
- use minimal || testtargets+=" test-master" |
1488 |
- |
1489 |
- LC_ALL=C emake -j1 ${testtargets} |
1490 |
-} |
1491 |
- |
1492 |
-src_install() { |
1493 |
- local dirs=" |
1494 |
- /var/log/munin |
1495 |
- /var/lib/munin/plugin-state |
1496 |
- /var/lib/munin-node/plugin-state |
1497 |
- /var/www/localhost/htdocs/munin |
1498 |
- /etc/munin/plugin-conf.d |
1499 |
- /etc/munin/plugins" |
1500 |
- use minimal || dirs+=" /etc/munin/munin-conf.d/" |
1501 |
- |
1502 |
- keepdir ${dirs} |
1503 |
- fowners munin:munin ${dirs} |
1504 |
- |
1505 |
- # parallel install doesn't work and it's also pointless to have this |
1506 |
- # run in parallel for now (because it uses internal loops). |
1507 |
- emake -j1 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) |
1508 |
- |
1509 |
- # we remove /run from the install, as it's not the package's to deal |
1510 |
- # with. |
1511 |
- rm -rf "${D}"/run || die |
1512 |
- |
1513 |
- # remove the plugins for non-Gentoo package managers; use -f so that |
1514 |
- # it doesn't fail when installing on non-Linux platforms. |
1515 |
- rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die |
1516 |
- |
1517 |
- insinto /etc/munin/plugin-conf.d/ |
1518 |
- newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node |
1519 |
- |
1520 |
- newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node |
1521 |
- newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node |
1522 |
- |
1523 |
- newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd |
1524 |
- |
1525 |
- dodir /usr/lib/tmpfiles.d |
1526 |
- cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF |
1527 |
- d /run/munin 0700 munin munin - - |
1528 |
- EOF |
1529 |
- |
1530 |
- systemd_dounit "${FILESDIR}"/munin-async.service |
1531 |
- systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} |
1532 |
- systemd_dounit "${FILESDIR}"/munin-html.{service,socket} |
1533 |
- systemd_dounit "${FILESDIR}"/munin-node.service |
1534 |
- |
1535 |
- cat >> "${T}"/munin.env <<- EOF |
1536 |
- CONFIG_PROTECT=/var/spool/munin-async/.ssh |
1537 |
- EOF |
1538 |
- newenvd "${T}"/munin.env 50munin |
1539 |
- |
1540 |
- dodoc README ChangeLog INSTALL |
1541 |
- if use doc; then |
1542 |
- cd "${S}"/doc/_build/html || die |
1543 |
- docinto html |
1544 |
- dodoc -r * |
1545 |
- cd "${S}" || die |
1546 |
- fi |
1547 |
- |
1548 |
- dodir /etc/logrotate.d/ |
1549 |
- sed -e "s:@CGIUSER@:$(usex apache2 apache munin):g" \ |
1550 |
- "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin |
1551 |
- |
1552 |
- dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ |
1553 |
- |
1554 |
- if use syslog; then |
1555 |
- sed -i -e '/log_file/s| .*| Sys::Syslog|' \ |
1556 |
- "${D}"/etc/munin/munin-node.conf || die |
1557 |
- fi |
1558 |
- |
1559 |
- # Use a simpler pid file to avoid trouble with /run in tmpfs. The |
1560 |
- # munin-node service is ran as user root, and only later drops |
1561 |
- # privileges. |
1562 |
- sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ |
1563 |
- "${D}"/etc/munin/munin-node.conf || die |
1564 |
- |
1565 |
- keepdir /var/spool/munin-async/.ssh |
1566 |
- touch "${D}"/var/spool/munin-async/.ssh/authorized_keys |
1567 |
- fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} |
1568 |
- fperms 0750 /var/spool/munin-async{,/.ssh} |
1569 |
- fperms 0600 /var/spool/munin-async/.ssh/authorized_keys |
1570 |
- |
1571 |
- if use minimal; then |
1572 |
- # This requires the presence of munin-update, which is part of |
1573 |
- # the non-minimal install... |
1574 |
- rm "${D}"/usr/libexec/munin/plugins/munin_stats |
1575 |
- else |
1576 |
- # remove font files so that we don't have to keep them around |
1577 |
- rm "${D}"/usr/libexec/${PN}/*.ttf || die |
1578 |
- |
1579 |
- if use cgi; then |
1580 |
- sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die |
1581 |
- |
1582 |
- keepdir /var/cache/munin-cgi |
1583 |
- touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log |
1584 |
- fowners $(usex apache2 apache munin) \ |
1585 |
- /var/cache/munin-cgi \ |
1586 |
- /var/log/munin/munin-cgi-{graph,html}.log |
1587 |
- |
1588 |
- if use apache2; then |
1589 |
- insinto /etc/apache2/vhosts.d |
1590 |
- newins "${FILESDIR}"/munin.apache.include munin.include |
1591 |
- newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include |
1592 |
- fi |
1593 |
- else |
1594 |
- sed \ |
1595 |
- -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ |
1596 |
- -i "${D}"/etc/munin/munin.conf || die |
1597 |
- fi |
1598 |
- |
1599 |
- keepdir /var/lib/munin/.ssh |
1600 |
- cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF |
1601 |
- IdentityFile /var/lib/munin/.ssh/id_ecdsa |
1602 |
- IdentityFile /var/lib/munin/.ssh/id_rsa |
1603 |
- EOF |
1604 |
- |
1605 |
- fowners munin:munin /var/lib/munin/.ssh/{,config} |
1606 |
- fperms go-rwx /var/lib/munin/.ssh/{,config} |
1607 |
- |
1608 |
- dodir /usr/share/${PN} |
1609 |
- cat >> "${D}"/usr/share/${PN}/crontab <<- EOF |
1610 |
- # Force the shell to bash |
1611 |
- SHELL=/bin/bash |
1612 |
- # Mail reports to root@, not munin@ |
1613 |
- MAILTO=root |
1614 |
- |
1615 |
- # This runs the munin task every 5 minutes. |
1616 |
- */5 * * * * /usr/bin/munin-cron |
1617 |
- |
1618 |
- # Alternatively, this route works differently |
1619 |
- # Update once a minute (for busy sites) |
1620 |
- #*/1 * * * * /usr/libexec/munin/munin-update |
1621 |
- ## Check for limit excess every 2 minutes |
1622 |
- #*/2 * * * * /usr/libexec/munin/munin-limits |
1623 |
- ## Update graphs every 5 minutes |
1624 |
- #*/5 * * * * nice /usr/libexec/munin/munin-graph |
1625 |
- ## Update HTML pages every 15 minutes |
1626 |
- #*/15 * * * * nice /usr/libexec/munin/munin-html |
1627 |
- EOF |
1628 |
- |
1629 |
- cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF |
1630 |
- # Mail reports to root@, not munin@, only execute one at a time |
1631 |
- !mailto(root),serial(true) |
1632 |
- |
1633 |
- # This runs the munin task every 5 minutes. |
1634 |
- @ 5 /usr/bin/munin-cron |
1635 |
- |
1636 |
- # Alternatively, this route works differently |
1637 |
- # Update once a minute (for busy sites) |
1638 |
- #@ 1 /usr/libexec/munin/munin-update |
1639 |
- ## Check for limit excess every 2 minutes |
1640 |
- #@ 2 /usr/libexec/munin/munin-limits |
1641 |
- ## Update graphs every 5 minutes |
1642 |
- #@ 5 nice /usr/libexec/munin/munin-graph |
1643 |
- ## Update HTML pages every 15 minutes |
1644 |
- #@ 15 nice /usr/libexec/munin/munin-html |
1645 |
- EOF |
1646 |
- |
1647 |
- # remove .htaccess file |
1648 |
- find "${D}" -name .htaccess -delete || die |
1649 |
- fi |
1650 |
-} |
1651 |
- |
1652 |
-pkg_config() { |
1653 |
- if use minimal; then |
1654 |
- einfo "Nothing to do." |
1655 |
- return 0 |
1656 |
- fi |
1657 |
- |
1658 |
- einfo "Press enter to install the default crontab for the munin master" |
1659 |
- einfo "installation from /usr/share/${PN}/f?crontab" |
1660 |
- einfo "If you have a large site, you may wish to customize it." |
1661 |
- read |
1662 |
- |
1663 |
- ebegin "Setting up cron ..." |
1664 |
- if has_version sys-process/fcron; then |
1665 |
- fcrontab - -u munin < /usr/share/${PN}/fcrontab |
1666 |
- else |
1667 |
- # dcron is very fussy about syntax |
1668 |
- # the following is the only form that works in BOTH dcron and vixie-cron |
1669 |
- crontab - -u munin < /usr/share/${PN}/crontab |
1670 |
- fi |
1671 |
- eend $? |
1672 |
- |
1673 |
- einfo "Press enter to set up the SSH keys used for SSH transport" |
1674 |
- read |
1675 |
- |
1676 |
- # generate one rsa (for legacy) and one ecdsa (for new systems) |
1677 |
- ssh-keygen -t rsa \ |
1678 |
- -f /var/lib/munin/.ssh/id_rsa -N '' \ |
1679 |
- -C "created by portage for ${CATEGORY}/${PN}" || die |
1680 |
- ssh-keygen -t ecdsa \ |
1681 |
- -f /var/lib/munin/.ssh/id_ecdsa -N '' \ |
1682 |
- -C "created by portage for ${CATEGORY}/${PN}" || die |
1683 |
- chown -R munin:munin /var/lib/munin/.ssh || die |
1684 |
- chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die |
1685 |
- |
1686 |
- einfo "Your public keys are available in " |
1687 |
- einfo " /var/lib/munin/.ssh/id_rsa.pub" |
1688 |
- einfo " /var/lib/munin/.ssh/id_ecdsa.pub" |
1689 |
- einfo "and follows for convenience" |
1690 |
- echo |
1691 |
- cat /var/lib/munin/.ssh/id_*.pub |
1692 |
-} |
1693 |
- |
1694 |
-pkg_postinst() { |
1695 |
- elog "Please follow the munin documentation to set up the plugins you" |
1696 |
- elog "need, afterwards start munin-node." |
1697 |
- elog "" |
1698 |
- elog "To make use of munin-async, make sure to set up the corresponding" |
1699 |
- elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" |
1700 |
- elog "" |
1701 |
- if ! use minimal; then |
1702 |
- elog "Please run" |
1703 |
- elog " emerge --config net-analyzer/munin" |
1704 |
- elog "to automatically configure munin's cronjobs as well as generate" |
1705 |
- elog "passwordless SSH keys to be used with munin-async." |
1706 |
- fi |
1707 |
- elog "" |
1708 |
- elog "Further information about setting up Munin in Gentoo can be found" |
1709 |
- elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" |
1710 |
- |
1711 |
- if use cgi; then |
1712 |
- chown $(usex apache2 apache munin) \ |
1713 |
- "${ROOT}"/var/cache/munin-cgi \ |
1714 |
- "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log |
1715 |
- |
1716 |
- if use apache2; then |
1717 |
- elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" |
1718 |
- elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" |
1719 |
- elog "host you want it to be served." |
1720 |
- elog "If you want to enable CGI-based HTML as well, you have to add to" |
1721 |
- elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." |
1722 |
- else |
1723 |
- elog "Effective CGI support has just been added in 2.0.7-r6." |
1724 |
- elog "Documentation on how to use it is still sparse." |
1725 |
- fi |
1726 |
- fi |
1727 |
- |
1728 |
- # we create this here as we don't want Portage to check /run |
1729 |
- # symlinks but we still need this to be present before the reboot. |
1730 |
- if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then |
1731 |
- mkdir "${ROOT}"/run/munin |
1732 |
- chown munin:munin "${ROOT}"/run/munin |
1733 |
- chmod 0700 "${ROOT}"/run/munin |
1734 |
- fi |
1735 |
-} |