Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/munin/
Date: Sun, 01 Oct 2017 06:07:31
Message-Id: 1506838043.c1fb197046b5f80d4e0be85feabb6e3d013a78ef.graaff@gentoo
1 commit: c1fb197046b5f80d4e0be85feabb6e3d013a78ef
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 1 06:05:50 2017 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 1 06:07:23 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1fb1970
7
8 net-analyzer/munin: remove vulnerable version, bug 610602
9
10 Package-Manager: Portage-2.3.8, Repoman-2.3.2
11
12 net-analyzer/munin/Manifest | 2 -
13 net-analyzer/munin/munin-2.0.19-r2.ebuild | 396 ------------------------------
14 2 files changed, 398 deletions(-)
15
16 diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest
17 index 698ce2e0ea5..4e0cb52a426 100644
18 --- a/net-analyzer/munin/Manifest
19 +++ b/net-analyzer/munin/Manifest
20 @@ -1,5 +1,3 @@
21 -DIST munin-2.0.19-gentoo-1.tar.xz 10884 SHA256 e9fcec3cd671a0008348ab3f33e435073bbfca328e3f026552d18d88b131ae30 SHA512 f4d4b20c9250f1f7a2772da7541a1cb60c6f0e64804a5f40452c4e54534a6d47ece583ef1a755e71bd98e474b6b1842dcad5d8165e558ccf2b88669e4a090599 WHIRLPOOL 5f796db3b2f29b069b77f2d06f530221272675af0d65423a945010ebef742a623a9bff0e9c705e8db94c5ab2ec81a0a10a46884afc23d92fc640b3ae0d45e91b
22 -DIST munin-2.0.19.tar.gz 1335496 SHA256 13db9b00d432b92907d61f9f2bd18c2aafca03b2a6e257222fff17aa4ed02896 SHA512 c08ab54634587bb2abc4e55e52114d417ce9f3d2b421c4f44c5df3506238ecd80d1f27359346404a4eab7d779a42bc3438ebb75210e979662f261de1521a464b WHIRLPOOL 288ac49ae86aff13591cbe7357afe963d6da95b3915d94ea3887a63347dbd45969d3a86d8378d2c6ddcb3b8ad24f27ff95ce2567cdfbb216e6584219db7800e1
23 DIST munin-2.0.33-gentoo-1.tar.xz 11024 SHA256 f956d9051e0da05231bb8777c0ca3342ca5bb86e48c44a68289c41c42c440e46 SHA512 c1f49f01fd641e157145d9710a091696c09380887a374ee845e516d40384ee6bc576019f3510ac322436b1f10ee1b675ae512b9f677a6a0fa2ef022cbb7269b8 WHIRLPOOL 3c0fbccc4c8ee9a2dacf8ce1845d149198c8d53ed17cd62fd17bae60986ca6616e12213d4f520fd06e8329accec559a7f9529559f21dc62de3aa0b66680d7ab7
24 DIST munin-2.0.33-gentoo-2.tar.xz 11288 SHA256 a7cc6b060cc1344c9b40278a960ab8fa6848e5db53f8665a952fb602ab0c0c55 SHA512 4d185529199377e85fb3e7d0a8c38de2ae500d2f992292e6ae016d11e81642833725987ac006b5f535963593c7698c676d28091805691e8b46c016fc2580917d WHIRLPOOL 98d2916c10adf554ab1672c602271673cb6dea7ae72fb7849b1bdf16d6f63c6f330def1f4a3cb62fd1fab4e888b2dede2807cde9a7907058f37a0f87a8b67a6b
25 DIST munin-2.0.33.tar.gz 1349546 SHA256 99dbc1e5f4f0fed4e28f295245333544193f9a26c597f2a78571ae20b4d450b6 SHA512 33c56fcb347396f29662f304aa50f0e3dfc909b067ea49809762bbbb4dd2cd7e95789c318adcef64923e6d0248dcf9ea6fe933c49d920b6b7856d85511d40d67 WHIRLPOOL 2429b605d19bbf4caa460e9f2b46de8e2462bf606bd1143bcdcbb4f2e079b2acf5f87def86affa6152ed8b26cf14bc83d62274bb58424818deb2b5f2024de7f0
26
27 diff --git a/net-analyzer/munin/munin-2.0.19-r2.ebuild b/net-analyzer/munin/munin-2.0.19-r2.ebuild
28 deleted file mode 100644
29 index 8dfbf081d5b..00000000000
30 --- a/net-analyzer/munin/munin-2.0.19-r2.ebuild
31 +++ /dev/null
32 @@ -1,396 +0,0 @@
33 -# Copyright 1999-2016 Gentoo Foundation
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=5
37 -
38 -PATCHSET=1
39 -
40 -inherit eutils user java-pkg-opt-2 systemd
41 -
42 -MY_P=${P/_/-}
43 -
44 -DESCRIPTION="Munin Server Monitoring Tool"
45 -HOMEPAGE="http://munin-monitoring.org/"
46 -SRC_URI="mirror://sourceforge/munin/${MY_P}.tar.gz
47 - https://dev.gentoo.org/~flameeyes/${PN}/${P}-gentoo-${PATCHSET}.tar.xz"
48 -
49 -LICENSE="GPL-2"
50 -SLOT="0"
51 -KEYWORDS="amd64 ~arm ~mips ppc x86"
52 -IUSE="asterisk irc java memcached minimal mysql postgres ssl test cgi ipv6 syslog ipmi http dhcpd doc apache"
53 -REQUIRED_USE="cgi? ( !minimal ) apache? ( cgi )"
54 -
55 -# Upstream's listing of required modules is NOT correct!
56 -# Some of the postgres plugins use DBD::Pg, while others call psql directly.
57 -# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly.
58 -# We replace the original ipmi plugins with the freeipmi_ plugin which at least works.
59 -DEPEND_COM="dev-lang/perl:=[berkdb]
60 - kernel_linux? ( sys-process/procps )
61 - doc? ( dev-python/sphinx )
62 - asterisk? ( dev-perl/Net-Telnet )
63 - irc? ( dev-perl/Net-IRC )
64 - mysql? ( virtual/mysql
65 - dev-perl/Cache-Cache
66 - dev-perl/DBD-mysql )
67 - ssl? ( dev-perl/Net-SSLeay )
68 - postgres? ( dev-perl/DBD-Pg dev-db/postgresql )
69 - memcached? ( dev-perl/Cache-Memcached )
70 - cgi? ( dev-perl/FCGI )
71 - apache? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] )
72 - syslog? ( virtual/perl-Sys-Syslog )
73 - http? ( dev-perl/libwww-perl )
74 - dhcpd? (
75 - >=net-misc/dhcp-3[server]
76 - dev-perl/Net-IP
77 - dev-perl/HTTP-Date
78 - )
79 - dev-perl/DBI
80 - dev-perl/Date-Manip
81 - dev-perl/File-Copy-Recursive
82 - dev-perl/List-MoreUtils
83 - dev-perl/Log-Log4perl
84 - dev-perl/Net-CIDR
85 - dev-perl/Net-DNS
86 - dev-perl/Net-Netmask
87 - dev-perl/Net-SNMP
88 - dev-perl/Net-Server[ipv6(-)?]
89 - virtual/perl-Digest-MD5
90 - virtual/perl-Getopt-Long
91 - virtual/perl-MIME-Base64
92 - virtual/perl-Storable
93 - virtual/perl-Text-Balanced
94 - virtual/perl-Time-HiRes
95 - !minimal? (
96 - dev-perl/HTML-Template
97 - dev-perl/IO-Socket-INET6
98 - dev-perl/URI
99 - >=net-analyzer/rrdtool-1.3[graph,perl]
100 - virtual/ssh
101 - )"
102 -
103 -# Keep this seperate, as previous versions have had other deps here
104 -DEPEND="${DEPEND_COM}
105 - dev-perl/Module-Build
106 - java? ( >=virtual/jdk-1.5 )
107 - test? (
108 - dev-perl/Test-Deep
109 - dev-perl/Test-LongString
110 - dev-perl/Test-Differences
111 - dev-perl/Test-MockModule
112 - dev-perl/Test-MockObject
113 - dev-perl/File-Slurp
114 - dev-perl/IO-stringy
115 - dev-perl/IO-Socket-INET6
116 - )"
117 -RDEPEND="${DEPEND_COM}
118 - virtual/awk
119 - ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 )
120 - java? (
121 - >=virtual/jre-1.5
122 - || ( net-analyzer/netcat6 net-analyzer/netcat )
123 - )
124 - !minimal? (
125 - virtual/cron
126 - media-fonts/dejavu
127 - )
128 - !<sys-apps/openrc-0.11.8"
129 -
130 -S="${WORKDIR}/${MY_P}"
131 -
132 -pkg_setup() {
133 - enewgroup munin
134 - enewuser munin 177 -1 /var/lib/munin munin
135 - enewuser munin-async -1 /bin/sh /var/spool/munin-async
136 - esethome munin-async /var/spool/munin-async
137 - java-pkg-opt-2_pkg_setup
138 -}
139 -
140 -src_prepare() {
141 - epatch "${WORKDIR}"/patches/*.patch
142 -
143 - java-pkg-opt-2_src_prepare
144 -}
145 -
146 -src_configure() {
147 - local cgidir='$(DESTDIR)/usr/libexec/munin/cgi'
148 - use cgi || cgidir="${T}/useless/cgi-bin"
149 -
150 - local cgiuser=$(usex apache apache munin)
151 -
152 - cat - >> "${S}"/Makefile.config <<EOF
153 -PREFIX=\$(DESTDIR)/usr
154 -CONFDIR=\$(DESTDIR)/etc/munin
155 -DOCDIR=${T}/useless/doc
156 -MANDIR=\$(PREFIX)/share/man
157 -LIBDIR=\$(PREFIX)/libexec/munin
158 -HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin
159 -CGIDIR=${cgidir}
160 -CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi
161 -CGIUSER=${cgiuser}
162 -DBDIR=\$(DESTDIR)/var/lib/munin
163 -DBDIRNODE=\$(DESTDIR)/var/lib/munin-node
164 -SPOOLDIR=\$(DESTDIR)/var/spool/munin-async
165 -LOGDIR=\$(DESTDIR)/var/log/munin
166 -PERLSITELIB=$(perl -V:vendorlib | cut -d"'" -f2)
167 -JCVALID=$(usex java yes no)
168 -STATEDIR=\$(DESTDIR)/run/munin
169 -EOF
170 -}
171 -
172 -# parallel make and install need to be fixed before, and I haven't
173 -# gotten around to do so yet.
174 -src_compile() {
175 - emake -j1
176 - if use doc; then
177 - emake -C doc html
178 - fi
179 -}
180 -
181 -src_test() {
182 - if [[ ${EUID} == 0 ]]; then
183 - eerror "You cannot run tests as root."
184 - eerror "Please enable FEATURES=userpriv before proceeding."
185 - return 1
186 - fi
187 -
188 - local testtargets="test-common test-node test-plugins"
189 - use minimal || testtargets+=" test-master"
190 -
191 - LC_ALL=C emake -j1 ${testtargets}
192 -}
193 -
194 -src_install() {
195 - local dirs="
196 - /var/log/munin
197 - /var/lib/munin/plugin-state
198 - /etc/munin/plugin-conf.d
199 - /etc/munin/plugins"
200 - use minimal || dirs+=" /etc/munin/munin-conf.d/"
201 -
202 - keepdir ${dirs}
203 - fowners munin:munin ${dirs}
204 -
205 - # parallel install doesn't work and it's also pointless to have this
206 - # run in parallel for now (because it uses internal loops).
207 - emake -j1 DESTDIR="${D}" $(usex minimal install-minimal install)
208 -
209 - # we remove /run from the install, as it's not the package's to deal
210 - # with.
211 - rm -rf "${D}"/run
212 -
213 - # remove the plugins for non-Gentoo package managers; use -f so that
214 - # it doesn't fail when installing on non-Linux platforms.
215 - rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die
216 -
217 - insinto /etc/munin/plugin-conf.d/
218 - newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node
219 -
220 - newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node
221 - newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node
222 -
223 - newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd
224 -
225 - dodir /usr/lib/tmpfiles.d
226 - cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF
227 -d /run/munin 0700 munin munin - -
228 -EOF
229 -
230 - systemd_dounit "${FILESDIR}"/munin-async.service
231 - systemd_dounit "${FILESDIR}"/munin-graph.{service,socket}
232 - systemd_dounit "${FILESDIR}"/munin-html.{service,socket}
233 - systemd_dounit "${FILESDIR}"/munin-node.service
234 -
235 - cat - >> "${T}"/munin.env <<EOF
236 -CONFIG_PROTECT=/var/spool/munin-async/.ssh
237 -EOF
238 - newenvd "${T}"/munin.env 50munin
239 -
240 - dodoc README ChangeLog INSTALL
241 - if use doc; then
242 - cd "${S}"/doc/_build/html
243 - dohtml -r *
244 - cd "${S}"
245 - fi
246 -
247 - dodir /etc/logrotate.d/
248 - sed -e "s:@CGIUSER@:$(usex apache apache munin):g" \
249 - "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin
250 -
251 - dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_
252 -
253 - if use syslog; then
254 - sed -i -e '/log_file/s| .*| Sys::Syslog|' \
255 - "${D}"/etc/munin/munin-node.conf || die
256 - fi
257 -
258 - # Use a simpler pid file to avoid trouble with /run in tmpfs. The
259 - # munin-node service is ran as user root, and only later drops
260 - # privileges.
261 - sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \
262 - "${D}"/etc/munin/munin-node.conf || die
263 -
264 - keepdir /var/spool/munin-async/.ssh
265 - touch "${D}"/var/spool/munin-async/.ssh/authorized_keys
266 - fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}}
267 - fperms 0750 /var/spool/munin-async{,/.ssh}
268 - fperms 0600 /var/spool/munin-async/.ssh/authorized_keys
269 -
270 - if use minimal; then
271 - # This requires the presence of munin-update, which is part of
272 - # the non-minimal install...
273 - rm "${D}"/usr/libexec/munin/plugins/munin_stats
274 - else
275 - # remove font files so that we don't have to keep them around
276 - rm "${D}"/usr/libexec/${PN}/*.ttf || die
277 -
278 - if use cgi; then
279 - sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die
280 -
281 - keepdir /var/cache/munin-cgi
282 - touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log
283 - fowners $(usex apache apache munin) \
284 - /var/cache/munin-cgi \
285 - /var/log/munin/munin-cgi-{graph,html}.log
286 -
287 - if use apache; then
288 - insinto /etc/apache2/vhosts.d
289 - newins "${FILESDIR}"/munin.apache.include munin.include
290 - newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include
291 - fi
292 - else
293 - sed -i -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' "${D}"/etc/munin/munin.conf || die
294 - fi
295 -
296 - keepdir /var/lib/munin/.ssh
297 - cat - >> "${D}"/var/lib/munin/.ssh/config <<EOF
298 -IdentityFile /var/lib/munin/.ssh/id_ecdsa
299 -IdentityFile /var/lib/munin/.ssh/id_rsa
300 -EOF
301 -
302 - fowners munin:munin /var/lib/munin/.ssh/{,config}
303 - fperms go-rwx /var/lib/munin/.ssh/{,config}
304 -
305 - dodir /usr/share/${PN}
306 - cat - >> "${D}"/usr/share/${PN}/crontab <<EOF
307 -# Force the shell to bash
308 -SHELL=/bin/bash
309 -# Mail reports to root@, not munin@
310 -MAILTO=root
311 -
312 -# This runs the munin task every 5 minutes.
313 -*/5 * * * * /usr/bin/munin-cron
314 -
315 -# Alternatively, this route works differently
316 -# Update once a minute (for busy sites)
317 -#*/1 * * * * /usr/libexec/munin/munin-update
318 -## Check for limit excess every 2 minutes
319 -#*/2 * * * * /usr/libexec/munin/munin-limits
320 -## Update graphs every 5 minutes
321 -#*/5 * * * * nice /usr/libexec/munin/munin-graph
322 -## Update HTML pages every 15 minutes
323 -#*/15 * * * * nice /usr/libexec/munin/munin-html
324 -EOF
325 -
326 - cat - >> "${D}"/usr/share/${PN}/fcrontab <<EOF
327 -# Mail reports to root@, not munin@, only execute one at a time
328 -!mailto(root),serial(true)
329 -
330 -# This runs the munin task every 5 minutes.
331 -@ 5 /usr/bin/munin-cron
332 -
333 -# Alternatively, this route works differently
334 -# Update once a minute (for busy sites)
335 -#@ 1 /usr/libexec/munin/munin-update
336 -## Check for limit excess every 2 minutes
337 -#@ 2 /usr/libexec/munin/munin-limits
338 -## Update graphs every 5 minutes
339 -#@ 5 nice /usr/libexec/munin/munin-graph
340 -## Update HTML pages every 15 minutes
341 -#@ 15 nice /usr/libexec/munin/munin-html
342 -EOF
343 -
344 - # remove .htaccess file
345 - find "${D}" -name .htaccess -delete || die
346 - fi
347 -}
348 -
349 -pkg_config() {
350 - if use minimal; then
351 - einfo "Nothing to do."
352 - return 0
353 - fi
354 -
355 - einfo "Press enter to install the default crontab for the munin master"
356 - einfo "installation from /usr/share/${PN}/f?crontab"
357 - einfo "If you have a large site, you may wish to customize it."
358 - read
359 -
360 - ebegin "Setting up cron ..."
361 - if has_version sys-process/fcron; then
362 - fcrontab - -u munin < /usr/share/${PN}/fcrontab
363 - else
364 - # dcron is very fussy about syntax
365 - # the following is the only form that works in BOTH dcron and vixie-cron
366 - crontab - -u munin < /usr/share/${PN}/crontab
367 - fi
368 - eend $?
369 -
370 - einfo "Press enter to set up the SSH keys used for SSH transport"
371 - read
372 -
373 - # generate one rsa (for legacy) and one ecdsa (for new systems)
374 - ssh-keygen -t rsa -f /var/lib/munin/.ssh/id_rsa -N '' -C "created by portage for ${CATEGORY}/${PN}" || die
375 - ssh-keygen -t ecdsa -f /var/lib/munin/.ssh/id_ecdsa -N '' -C "created by portage for ${CATEGORY}/${PN}" || die
376 - chown -R munin:munin /var/lib/munin/.ssh || die
377 - chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die
378 -
379 - einfo "Your public keys are available in "
380 - einfo " /var/lib/munin/.ssh/id_rsa.pub"
381 - einfo " /var/lib/munin/.ssh/id_ecdsa.pub"
382 - einfo "and follows for convenience"
383 - echo
384 - cat /var/lib/munin/.ssh/id_*.pub
385 -}
386 -
387 -pkg_postinst() {
388 - elog "Please follow the munin documentation to set up the plugins you"
389 - elog "need, afterwards start munin-node."
390 - elog ""
391 - elog "To make use of munin-async, make sure to set up the corresponding"
392 - elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys"
393 - elog ""
394 - if ! use minimal; then
395 - elog "Please run"
396 - elog " emerge --config net-analyzer/munin"
397 - elog "to automatically configure munin's cronjobs as well as generate"
398 - elog "passwordless SSH keys to be used with munin-async."
399 - fi
400 - elog ""
401 - elog "Further information about setting up Munin in Gentoo can be found"
402 - elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin"
403 -
404 - if use cgi; then
405 - chown $(usex apache apache munin) \
406 - "${ROOT}"/var/cache/munin-cgi \
407 - "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log
408 -
409 - if use apache; then
410 - elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include"
411 - elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual"
412 - elog "host you want it to be served."
413 - elog "If you want to enable CGI-based HTML as well, you have to add to"
414 - elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI."
415 - else
416 - elog "Effective CGI support has just been added in 2.0.7-r6."
417 - elog "Documentation on how to use it is still sparse."
418 - fi
419 - fi
420 -
421 - # we create this here as we don't want Portage to check /run
422 - # symlinks but we still need this to be present before the reboot.
423 - if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then
424 - mkdir "${ROOT}"/run/munin
425 - chown munin:munin "${ROOT}"/run/munin
426 - chmod 0700 "${ROOT}"/run/munin
427 - fi
428 -}