Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/base/, profiles/, net-analyzer/check_mk/, net-analyzer/check_mk/files/
Date: Sat, 29 Sep 2018 10:09:06
Message-Id: 1538215725.a69dd861c8eceb208df573afaa97e9312bdf41b7.mgorny@gentoo
1 commit: a69dd861c8eceb208df573afaa97e9312bdf41b7
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 29 10:06:27 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 29 10:08:45 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a69dd861
7
8 net-analyzer/check_mk: Remove last-rited pkg
9
10 Bug: https://bugs.gentoo.org/632648
11 Closes: https://bugs.gentoo.org/652634
12 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
13
14 net-analyzer/check_mk/Manifest | 2 -
15 net-analyzer/check_mk/check_mk-1.2.4_p5-r1.ebuild | 323 -------------------
16 net-analyzer/check_mk/check_mk-1.2.8_p16.ebuild | 351 ---------------------
17 .../check_mk/files/check_mk-1.2.4p5-setup.sh.patch | 39 ---
18 .../files/check_mk-1.2.8p16-setup.sh.patch | 35 --
19 net-analyzer/check_mk/metadata.xml | 29 --
20 profiles/base/package.use.force | 5 -
21 profiles/base/package.use.mask | 6 -
22 profiles/package.mask | 7 -
23 9 files changed, 797 deletions(-)
24
25 diff --git a/net-analyzer/check_mk/Manifest b/net-analyzer/check_mk/Manifest
26 deleted file mode 100644
27 index a31e9ad7838..00000000000
28 --- a/net-analyzer/check_mk/Manifest
29 +++ /dev/null
30 @@ -1,2 +0,0 @@
31 -DIST check_mk-1.2.4p5.tar.gz 6626768 BLAKE2B d8f40405d443cf4d25cf53ac4adff4361c79c4574993c708a8699ccc8e06623f2fdc2539ccb591e74fe984f3f7824a0a961c8f994439a02edb3440089bdfa453 SHA512 ca2c06288b91f44f017ebbc45bd6712ddcbebdc4e293598b793ae1ad19ad96814983a30bd66ee2f19940dc1d1439fba2ae2b171dcbe0e670ce1b7d0a8c18d890
32 -DIST check_mk-1.2.8p16.tar.gz 16298683 BLAKE2B 5023719c3e2e56807900ccb204862eccb73706bb23dfa3dfb4f30cb6fa592828e2d81aef12dd5129b280c37ca8d700c982f3b29469fd5ec0328e91e414b8c624 SHA512 601c76b2b62de9176122c69b011b5f7ac6b71650d1b3e411c103f5e9c3e91256ce8d3db6fcd1edc2a11f86dcba4e8ea18ec5a1f9f3eae5b25a4bb3ba712341eb
33
34 diff --git a/net-analyzer/check_mk/check_mk-1.2.4_p5-r1.ebuild b/net-analyzer/check_mk/check_mk-1.2.4_p5-r1.ebuild
35 deleted file mode 100644
36 index ef7a70f9a76..00000000000
37 --- a/net-analyzer/check_mk/check_mk-1.2.4_p5-r1.ebuild
38 +++ /dev/null
39 @@ -1,323 +0,0 @@
40 -# Copyright 1999-2017 Gentoo Foundation
41 -# Distributed under the terms of the GNU General Public License v2
42 -
43 -EAPI="5"
44 -
45 -PYTHON_COMPAT=( python2_7 )
46 -
47 -inherit eutils toolchain-funcs python-r1
48 -
49 -DESCRIPTION="General purpose Nagios/Icinga plugin for retrieving data"
50 -HOMEPAGE="http://mathias-kettner.de/check_mk.html"
51 -
52 -MY_P="${P/_p/p}"
53 -MY_PV="${MY_P/check_mk-/}"
54 -
55 -LICENSE="GPL-2"
56 -SLOT="0"
57 -KEYWORDS="~amd64 ~x86"
58 -IUSE="agent-only apache_status dmi_sysinfo livestatus logwatch mysql
59 - nfsexports oracle postgres smart wato xinetd zypper"
60 -
61 -DEPEND="${PYTHON_DEPS}
62 - wato? ( app-admin/sudo )
63 - xinetd? ( sys-apps/xinetd )
64 - !agent-only? ( || ( net-analyzer/nagios-core net-analyzer/icinga ) )
65 - !agent-only? ( www-servers/apache www-apache/mod_python )
66 - media-libs/libpng:0
67 - !!net-analyzer/check_mk_agent"
68 -RDEPEND="${DEPEND}"
69 -
70 -REQUIRED_USE="
71 - ${PYTHON_REQUIRED_USE}
72 - livestatus? ( !agent-only )
73 - wato? ( !agent-only )"
74 -
75 -SRC_URI="http://mathias-kettner.de/download/${MY_P}.tar.gz"
76 -
77 -S="${WORKDIR}/${MY_P}"
78 -
79 -src_prepare() {
80 - # modify setup.sh for gentoo
81 - epatch "${FILESDIR}"/${PN}-1.2.4p5-setup.sh.patch
82 -}
83 -
84 -src_configure() {
85 - if has_version net-analyzer/nagios-core; then
86 - export mydaemon=nagios
87 - export nagpipe=/var/nagios/rw/nagios.cmd
88 - export check_result_path=/var/nagios/spool/checkresults
89 - export nagios_status_file=/var/nagios/status.dat
90 - export rrd_path=/var/nagios/perfdata
91 - else
92 - export mydaemon=icinga
93 - export nagpipe=/var/lib/icinga/rw/icinga.cmd
94 - export check_result_path=/var/lib/icinga/spool/checkresults
95 - export nagios_status_file=/var/lib/icinga/status.dat
96 - export rrd_path=/var/lib/icinga/perfdata
97 - fi
98 -
99 - export nagiosuser=${mydaemon}
100 - export nagios_binary=/usr/sbin/${mydaemon}
101 - export nagios_config_file=/etc/${mydaemon}/${mydaemon}.cfg
102 - export nagconfdir=/etc/${mydaemon}/check_mk.d
103 - export nagios_startscript=/etc/init.d/${mydaemon}
104 - export htpasswd_file=/etc/${mydaemon}/htpasswd.users
105 - export nagios_auth_name="${mydaemon} Access"
106 - export docdir=/usr/share/doc/${PF}
107 - export checkmandir=/usr/share/doc/${PF}/checks
108 - export check_icmp_path=/usr/lib/nagios/plugins/check_icmp
109 - export wwwuser=apache
110 - export wwwgroup=apache
111 - export apache_config_dir=/etc/apache2/modules.d/
112 -
113 - if use livestatus; then
114 - export enable_livestatus=yes
115 - else
116 - export enable_livestatus=no
117 - fi
118 -
119 - export STRIPPROG=/bin/true
120 -}
121 -
122 -src_compile() {
123 - DESTDIR=${S} ./setup.sh --yes || die "Error while running setup.sh"
124 -
125 - # compile waitmax
126 - cd "${S}"/usr/share/check_mk/agents || die "Couldn't cd to ${S}/usr/share/check_mk/agents"
127 - if [[ -f waitmax ]]; then
128 - rm waitmax || die "Couldn't delete precompiled waitmax file"
129 - fi
130 - sed -i -e 's#gcc -s -o waitmax waitmax\.c#gcc -o waitmax waitmax.c#' "${S}"/usr/share/check_mk/agents/Makefile || die "Couldn't modify remove strip from waitmax Makefile"
131 - emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" || die "Couldn't compile waitmax"
132 -
133 - # Fix broken png files
134 - pngfix -q --out=out.png "${S}/usr/share/check_mk/web/htdocs/images/icons/bookcase.png"
135 - mv -f out.png "${S}/usr/share/check_mk/web/htdocs/images/icons/bookcase.png" || die
136 - pngfix -q --out=out.png "${S}/usr/share/check_mk/web/htdocs/images/icon_auditlog.png"
137 - mv -f out.png "${S}/usr/share/check_mk/web/htdocs/images/icon_auditlog.png" || die
138 - pngfix -q --out=out.png "${S}/usr/share/check_mk/web/htdocs/images/button_auditlog_lo.png"
139 - mv -f out.png "${S}/usr/share/check_mk/web/htdocs/images/button_auditlog_lo.png" || die
140 -}
141 -
142 -src_install() {
143 - if ! use agent-only; then
144 - # Apache configuration
145 - insinto /etc/apache2/modules.d
146 - doins etc/apache2/modules.d/zzz_check_mk.conf
147 -
148 - if use wato; then
149 - # sudoers configuration
150 - cat << EOF > "${T}"/check_mk || die
151 -# Needed for WATO - the Check_MK Web Administration Tool
152 -Defaults:apache !requiretty
153 -apache ALL = (root) NOPASSWD: /usr/bin/check_mk --automation *
154 -EOF
155 - insinto /etc/sudoers.d
156 - doins "${T}"/check_mk
157 - fi
158 -
159 - # check_mk configuration
160 - keepdir /etc/check_mk
161 - insinto /etc/check_mk
162 - doins etc/check_mk/main.mk
163 - doins etc/check_mk/main.mk-${MY_PV}
164 - doins etc/check_mk/multisite.mk
165 - doins etc/check_mk/multisite.mk-${MY_PV}
166 - keepdir /etc/check_mk/conf.d
167 - insinto /etc/check_mk/conf.d
168 - doins etc/check_mk/conf.d/README
169 - keepdir /etc/check_mk/conf.d/wato
170 - touch "${D}"/etc/check_mk/conf.d/distributed_wato.mk
171 - keepdir /etc/check_mk/multisite.d
172 - keepdir /etc/check_mk/multisite.d/wato
173 - touch "${D}"/etc/check_mk/multisite.d/sites.mk
174 -
175 - insinto /etc/${mydaemon}
176 - doins etc/${mydaemon}/auth.serials
177 -
178 - # Nagios / Icinga check_mk templates
179 - insinto /etc/${mydaemon}/check_mk.d
180 - doins etc/${mydaemon}/check_mk.d/check_mk_templates.cfg
181 -
182 - dobin usr/bin/check_mk
183 - dobin usr/bin/mkp
184 - insinto /usr/bin
185 - doins usr/bin/cmk
186 -
187 - # remove compiled agent_modbus
188 - if [[ -f ${S}/usr/share/doc/${PF}/treasures/modbus/agent_modbus ]]; then
189 - rm "${S}"/usr/share/doc/${PF}/treasures/modbus/agent_modbus || die "Couldn't remove precompiled agent_modbus"
190 - fi
191 -
192 - insinto /usr/share/check_mk
193 - doins -r usr/share/check_mk/*
194 -
195 - keepdir /var/lib/check_mk/autochecks
196 - keepdir /var/lib/check_mk/cache
197 - keepdir /var/lib/check_mk/counters
198 - keepdir /var/lib/check_mk/logwatch
199 - keepdir /var/lib/check_mk/notify
200 - keepdir /var/lib/check_mk/packages
201 - insinto /var/lib/check_mk/packages
202 - doins var/lib/check_mk/packages/check_mk
203 - keepdir /var/lib/check_mk/precompiled
204 - keepdir /var/lib/check_mk/snmpwalks
205 - keepdir /var/lib/check_mk/tmp
206 - keepdir /var/lib/check_mk/wato
207 - keepdir /var/lib/check_mk/web
208 -
209 - # Update check_mk defaults
210 - sed -i -e "s#^\(check_mk_automation\s*= 'sudo -u\) portage \(.*\)\$#\1 ${mydaemon} \2#" "${D}"/usr/share/check_mk/modules/defaults || die "Couldn't update check_mk defaults"
211 - cp "${D}"/usr/share/check_mk/modules/defaults "${D}"/usr/share/check_mk/web/htdocs/defaults.py || die "Couldn't copy check_mk defaults"
212 -
213 - # Change permissions
214 - fowners -R ${mydaemon}:apache /etc/${mydaemon}/auth.serials
215 - fperms -R 0660 /etc/${mydaemon}/auth.serials
216 - fowners -R ${mydaemon}:${mydaemon} /etc/${mydaemon}/check_mk.d
217 - fperms -R 0775 /etc/${mydaemon}/check_mk.d
218 - fowners -R root:apache /etc/check_mk/conf.d/wato
219 - fperms -R 0775 /etc/check_mk/conf.d/wato
220 - fowners root:apache /etc/check_mk/conf.d/distributed_wato.mk
221 - fperms 0664 /etc/check_mk/conf.d/distributed_wato.mk
222 - fowners -R root:apache /etc/check_mk/multisite.d/wato
223 - fperms -R 0775 /etc/check_mk/multisite.d/wato
224 - fowners root:apache /etc/check_mk/multisite.d/sites.mk
225 - fperms 0664 /etc/check_mk/multisite.d/sites.mk
226 - fowners root:${mydaemon} /var/lib/check_mk/cache
227 - fperms 0775 /var/lib/check_mk/counters
228 - fowners -R root:${mydaemon} /var/lib/check_mk/counters
229 - fperms 0775 /var/lib/check_mk/notify
230 - fowners -R root:${mydaemon} /var/lib/check_mk/notify
231 - fperms 0775 /var/lib/check_mk/logwatch
232 - fowners -R root:${mydaemon} /var/lib/check_mk/logwatch
233 - fperms 0775 /var/lib/check_mk/cache
234 - fowners -R root:${mydaemon} /var/lib/check_mk/cache
235 - fperms -R 0775 /var/lib/check_mk/tmp
236 - fowners -R root:apache /var/lib/check_mk/tmp
237 - fperms -R 0775 /var/lib/check_mk/web
238 - fowners -R root:apache /var/lib/check_mk/web
239 - fperms -R 0775 /var/lib/check_mk/wato
240 - fowners -R root:apache /var/lib/check_mk/wato
241 - fi
242 -
243 - # Install agent related files
244 - newbin usr/share/check_mk/agents/check_mk_agent.linux check_mk_agent
245 - dobin usr/share/check_mk/agents/waitmax
246 -
247 - if use xinetd; then
248 - insinto /etc/xinetd.d
249 - newins usr/share/check_mk/agents/xinetd.conf check_mk
250 - fi
251 -
252 - keepdir /usr/lib/check_mk_agent/local
253 - keepdir /usr/lib/check_mk_agent/plugins
254 -
255 - # Install Livestatus
256 - if use livestatus; then
257 - cat << EOF > "${T}"/livestatus.cfg || die
258 -define module{
259 - module_name mk-livestatus
260 - module_type neb
261 - path /usr/lib/check_mk/livestatus.o
262 - args /var/lib/${mydaemon}/rw/live
263 - }
264 -EOF
265 -
266 - insinto /etc/${mydaemon}/modules
267 - doins "${T}"/livestatus.cfg
268 - fowners ${mydaemon}:${mydaemon} /etc/${mydaemon}/modules/livestatus.cfg
269 -
270 - insinto /usr/lib/check_mk
271 - doins usr/lib/check_mk/livestatus.o
272 -
273 - dobin usr/bin/unixcat
274 -
275 - keepdir /usr/share/check_mk/livestatus
276 - fi
277 -
278 - # Documentation
279 - if ! use agent-only; then
280 - dodoc -r usr/share/doc/${PF}/*
281 - docompress -x /usr/share/doc/${PF}/checks/
282 - else
283 - dodoc usr/share/doc/${PF}/AUTHORS usr/share/doc/${PF}/COPYING usr/share/doc/${PF}/ChangeLog
284 - docompress
285 - fi
286 -
287 - # Install the check_mk_agent logwatch plugin
288 - if use logwatch; then
289 - insinto /etc/check_mk
290 - doins usr/share/check_mk/agents/logwatch.cfg
291 - exeinto /usr/lib/check_mk_agent/plugins
292 - doexe usr/share/check_mk/agents/plugins/mk_logwatch
293 - fi
294 -
295 - # Install the check_mk_agent smart plugin
296 - if use smart; then
297 - exeinto /usr/lib/check_mk_agent/plugins
298 - doexe usr/share/check_mk/agents/plugins/smart
299 - fi
300 -
301 - # Install the check_mk_agent mysql plugin
302 - if use mysql; then
303 - exeinto /usr/lib/check_mk_agent/plugins
304 - doexe usr/share/check_mk/agents/plugins/mk_mysql
305 - fi
306 -
307 - # Install the check_mk_agent postgres plugin
308 - if use postgres; then
309 - exeinto /usr/lib/check_mk_agent/plugins
310 - doexe usr/share/check_mk/agents/plugins/mk_postgres
311 - fi
312 -
313 - # Install the check_mk_agent apache_status plugin
314 - if use apache_status; then
315 - exeinto /usr/lib/check_mk_agent/plugins
316 - doexe usr/share/check_mk/agents/plugins/apache_status
317 - fi
318 -
319 - # Install the check_mk_agent zypper plugin
320 - if use zypper; then
321 - exeinto /usr/lib/check_mk_agent/plugins
322 - doexe usr/share/check_mk/agents/plugins/mk_zypper
323 - fi
324 -
325 - # Install the check_mk_agent oracle plugin
326 - if use oracle; then
327 - exeinto /usr/lib/check_mk_agent/plugins
328 - doexe usr/share/check_mk/agents/plugins/mk_oracle
329 - fi
330 -
331 - # Install the check_mk_agent nfsexports plugin
332 - if use nfsexports; then
333 - exeinto /usr/lib/check_mk_agent/plugins
334 - doexe usr/share/check_mk/agents/plugins/nfsexports
335 - fi
336 -
337 - # Install the check_mk_agent dmi_sysinfo plugin
338 - if use dmi_sysinfo; then
339 - exeinto /usr/lib/check_mk_agent/plugins
340 - doexe usr/share/check_mk/agents/plugins/dmi_sysinfo
341 - fi
342 -}
343 -
344 -pkg_postinst() {
345 - if ! use agent-only; then
346 - elog "IMPORTANT: Please add the following line to your"
347 - elog "/etc/${mydaemon}/${mydaemon}.cfg, so that"
348 - elog "${mydaemon} can load your check_mk configuration."
349 - elog
350 - elog " cfg_dir=/etc/${mydaemon}/check_mk.d"
351 - elog
352 - fi
353 - if use wato; then
354 - elog "INFO: Your webserver needs write access to"
355 - elog "/etc/${mydaemon}/htpasswd.users!"
356 - elog "otherwise wato will not function correctly!"
357 - elog
358 - elog "chown ${mydaemon}: /etc/${mydaemon}/htpasswd.users"
359 - elog "chmod 660 /etc/${mydaemon}/htpasswd.users"
360 - elog
361 - fi
362 -}
363
364 diff --git a/net-analyzer/check_mk/check_mk-1.2.8_p16.ebuild b/net-analyzer/check_mk/check_mk-1.2.8_p16.ebuild
365 deleted file mode 100644
366 index cd3279356bc..00000000000
367 --- a/net-analyzer/check_mk/check_mk-1.2.8_p16.ebuild
368 +++ /dev/null
369 @@ -1,351 +0,0 @@
370 -# Copyright 1999-2017 Gentoo Foundation
371 -# Distributed under the terms of the GNU General Public License v2
372 -
373 -EAPI=6
374 -
375 -PYTHON_COMPAT=( python2_7 )
376 -
377 -inherit toolchain-funcs user systemd python-single-r1
378 -
379 -DESCRIPTION="General purpose Nagios/Icinga plugin for retrieving data"
380 -HOMEPAGE="http://mathias-kettner.de/check_mk.html"
381 -
382 -MY_P="${P/_p/p}"
383 -MY_PV="${MY_P/check_mk-/}"
384 -
385 -LICENSE="GPL-2"
386 -SLOT="0"
387 -KEYWORDS="~amd64 ~x86"
388 -IUSE="agent-only apache_status livestatus logwatch mysql +nagios4
389 - nfsexports oracle postgres smart wato xinetd zypper"
390 -
391 -RDEPEND="${PYTHON_DEPS}
392 - wato? ( app-admin/sudo )
393 - xinetd? ( || ( sys-apps/xinetd sys-apps/systemd ) )
394 - !agent-only? (
395 - www-servers/apache[apache2_modules_access_compat(+)]
396 - www-apache/mod_python[${PYTHON_USEDEP}]
397 - livestatus? ( net-analyzer/mk-livestatus[nagios4=] )
398 - nagios4? ( >=net-analyzer/nagios-core-4 )
399 - !nagios4? ( || ( <net-analyzer/nagios-core-4 net-analyzer/icinga ) )
400 - )
401 - media-libs/libpng:0
402 - !!net-analyzer/check_mk_agent"
403 -DEPEND="${DEPEND}"
404 -
405 -REQUIRED_USE="
406 - ${PYTHON_REQUIRED_USE}
407 - livestatus? ( !agent-only )
408 - wato? ( !agent-only )"
409 -
410 -SRC_URI="http://mathias-kettner.de/download/${MY_P}.tar.gz"
411 -
412 -S="${WORKDIR}/${MY_P}"
413 -
414 -src_prepare() {
415 - # modify setup.sh for gentoo
416 - eapply "${FILESDIR}"/${PN}-1.2.8p16-setup.sh.patch
417 - eapply_user
418 -}
419 -
420 -src_configure() {
421 - if has_version net-analyzer/nagios-core; then
422 - einfo "Using nagios as net-analyzer/nagios-core found"
423 - export mydaemon=nagios
424 - export nagpipe=/var/nagios/rw/nagios.cmd
425 - export check_result_path=/var/nagios/spool/checkresults
426 - export nagios_status_file=/var/nagios/status.dat
427 - export rrd_path=/var/nagios/perfdata
428 - if use livestatus; then
429 - export livesock=/var/nagios/rw/live
430 - fi
431 - else
432 - einfo "Using icinga as net-analyzer/nagios-core not found"
433 - export mydaemon=icinga
434 - export nagpipe=/var/lib/icinga/rw/icinga.cmd
435 - export check_result_path=/var/lib/icinga/spool/checkresults
436 - export nagios_status_file=/var/lib/icinga/status.dat
437 - export rrd_path=/var/lib/icinga/perfdata
438 - if use livestatus; then
439 - export livesock=/var/lib/icigna/rw/live
440 - fi
441 - fi
442 -
443 - export nagiosuser=${mydaemon}
444 - export nagios_binary=/usr/sbin/${mydaemon}
445 - export nagios_config_file=/etc/${mydaemon}/${mydaemon}.cfg
446 - export nagconfdir=/etc/${mydaemon}/check_mk.d
447 - export nagios_startscript=/etc/init.d/${mydaemon}
448 - export htpasswd_file=/etc/${mydaemon}/htpasswd.users
449 - export nagios_auth_name="${mydaemon} Access"
450 - export docdir=/usr/share/doc/${PF}
451 - export checkmandir=/usr/share/doc/${PF}/checks
452 - export check_icmp_path=/usr/lib/nagios/plugins/check_icmp
453 - export wwwuser=apache
454 - export wwwgroup=apache
455 - export apache_config_dir=/etc/apache2/modules.d/
456 - export enable_livestatus=no
457 - export STRIPPROG=/bin/true
458 -
459 - mkdir -p "${S}"/usr/share/check_mk/agents || die
460 - cat <<EOF >"${S}"/usr/share/check_mk/agents/Makefile
461 -all: waitmax
462 -
463 -waitmax: waitmax.c
464 - \$(CC) \$(CFLAGS) \$< -o \$@ \$(LDFLAGS)
465 -
466 -EOF
467 -}
468 -
469 -src_compile() {
470 - DESTDIR=${S} ./setup.sh --yes || die "Error while running setup.sh"
471 -
472 - # compile waitmax
473 - pushd "${S}"/usr/share/check_mk/agents &>/dev/null || die
474 - if [[ -f waitmax ]]; then
475 - rm waitmax || die "Couldn't delete precompiled waitmax file"
476 - fi
477 - emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)"
478 - popd &>/dev/null || die
479 -
480 - # Fix broken png files
481 - einfo "Fixing broken png files."
482 - local x=0;
483 - for png in "${S}"/usr/share/check_mk/web/htdocs/images/icons/*.png ; do
484 - echo ${png#${S}}
485 - pngfix -q --out="${T}"/out.png "${png}" && \
486 - mv -f "${T}"/out.png "${png}" || die
487 - x=$((x+1))
488 - done
489 - einfo "$x png files processed."
490 -
491 - # enforce the correct python in these wrapper scripts
492 - sed -i -e "/exec/s/python /${EPYTHON} /" usr/bin/{check_mk,mkp} || die
493 - sed -i -e "/command_line/s#python /var#${EPYTHON} /var#" \
494 - usr/share/check_mk/check_mk_templates.cfg || die
495 -
496 - # fix all shebangs
497 - find usr -type f -name \*.py |while read py ; do
498 - grep '^#!' ${py} &>/dev/null && \
499 - python_fix_shebang ${py}
500 - done
501 -}
502 -
503 -src_install() {
504 - if ! use agent-only; then
505 - # Apache configuration
506 - insinto /etc/apache2/modules.d
507 - doins etc/apache2/modules.d/zzz_check_mk.conf
508 -
509 - if use wato; then
510 - # sudoers configuration
511 - cat << EOF > "${T}"/check_mk || die
512 -# Needed for WATO - the Check_MK Web Administration Tool
513 -Defaults:apache !requiretty
514 -apache ALL = (root) NOPASSWD: /usr/bin/check_mk --automation *
515 -EOF
516 - insinto /etc/sudoers.d
517 - doins "${T}"/check_mk
518 - fi
519 -
520 - # check_mk configuration
521 - #keepdir /etc/check_mk
522 - insinto /etc/check_mk
523 - doins etc/check_mk/main.mk
524 - doins etc/check_mk/main.mk-${MY_PV}
525 - doins etc/check_mk/multisite.mk
526 - doins etc/check_mk/multisite.mk-${MY_PV}
527 - #keepdir /etc/check_mk/conf.d
528 - insinto /etc/check_mk/conf.d
529 - doins etc/check_mk/conf.d/README
530 - dodir /etc/check_mk/conf.d/wato
531 - touch "${D}"/etc/check_mk/conf.d/distributed_wato.mk
532 - #keepdir /etc/check_mk/multisite.d
533 - dodir /etc/check_mk/multisite.d/wato
534 - touch "${D}"/etc/check_mk/multisite.d/sites.mk
535 -
536 - insinto /etc/${mydaemon}
537 - doins etc/${mydaemon}/auth.serials
538 -
539 - # Nagios / Icinga check_mk templates
540 - insinto /etc/${mydaemon}/check_mk.d
541 - doins etc/${mydaemon}/check_mk.d/check_mk_templates.cfg
542 -
543 - dobin usr/bin/check_mk
544 - dobin usr/bin/mkp
545 - dosym /usr/bin/check_mk /usr/bin/cmk
546 -
547 - # remove compiled agent_modbus
548 - if [[ -f ${S}/usr/share/doc/${PF}/treasures/modbus/agent_modbus ]]; then
549 - rm "${S}"/usr/share/doc/${PF}/treasures/modbus/agent_modbus || die "Couldn't remove precompiled agent_modbus"
550 - fi
551 -
552 - insinto /usr/share/check_mk
553 - doins -r usr/share/check_mk/*
554 -
555 - keepdir /var/lib/check_mk/autochecks
556 - keepdir /var/lib/check_mk/cache
557 - keepdir /var/lib/check_mk/counters
558 - keepdir /var/lib/check_mk/inventory
559 - keepdir /var/lib/check_mk/log
560 - keepdir /var/lib/check_mk/logwatch
561 - keepdir /var/lib/check_mk/notify
562 - keepdir /var/lib/check_mk/precompiled
563 - keepdir /var/lib/check_mk/snmpwalks
564 - keepdir /var/lib/check_mk/tmp
565 - keepdir /var/lib/check_mk/wato
566 - keepdir /var/lib/check_mk/web
567 -
568 - insinto /var/lib/check_mk/packages
569 - doins var/lib/check_mk/packages/check_mk
570 -
571 - # Update check_mk defaults
572 - sed -i -e "s#^\(check_mk_automation\s*= 'sudo -u\) portage \(.*\)\$#\1 ${mydaemon} \2#" "${D}"/usr/share/check_mk/modules/defaults || die "Couldn't update check_mk defaults"
573 - cp "${D}"/usr/share/check_mk/modules/defaults "${D}"/usr/share/check_mk/web/htdocs/defaults.py || die "Couldn't copy check_mk defaults"
574 -
575 - # Change permissions
576 - fowners -R ${mydaemon}:apache /etc/${mydaemon}/auth.serials
577 - fperms -R 0660 /etc/${mydaemon}/auth.serials
578 - fowners -R ${mydaemon}:${mydaemon} /etc/${mydaemon}/check_mk.d
579 - fperms -R 0775 /etc/${mydaemon}/check_mk.d
580 - fowners -R root:apache /etc/check_mk/conf.d/wato
581 - fperms -R 0775 /etc/check_mk/conf.d/wato
582 - fowners root:apache /etc/check_mk/conf.d/distributed_wato.mk
583 - fperms 0664 /etc/check_mk/conf.d/distributed_wato.mk
584 - fowners -R root:apache /etc/check_mk/multisite.d/wato
585 - fperms -R 0775 /etc/check_mk/multisite.d/wato
586 - fowners root:apache /etc/check_mk/multisite.d/sites.mk
587 - fperms 0664 /etc/check_mk/multisite.d/sites.mk
588 - fowners root:${mydaemon} /var/lib/check_mk/cache
589 - fperms 0775 /var/lib/check_mk/counters
590 - fowners -R root:${mydaemon} /var/lib/check_mk/counters
591 - fperms 0775 /var/lib/check_mk/notify
592 - fowners -R root:${mydaemon} /var/lib/check_mk/notify
593 - fperms 0775 /var/lib/check_mk/inventory
594 - fowners -R root:${mydaemon} /var/lib/check_mk/inventory
595 - fperms 0775 /var/lib/check_mk/log
596 - fowners -R root:${mydaemon} /var/lib/check_mk/log
597 - fperms 0775 /var/lib/check_mk/logwatch
598 - fowners -R root:${mydaemon} /var/lib/check_mk/logwatch
599 - fperms 0775 /var/lib/check_mk/cache
600 - fowners -R root:${mydaemon} /var/lib/check_mk/cache
601 - fperms -R 0775 /var/lib/check_mk/tmp
602 - fowners -R root:apache /var/lib/check_mk/tmp
603 - fperms -R 0775 /var/lib/check_mk/web
604 - fowners -R root:apache /var/lib/check_mk/web
605 - fperms -R 0775 /var/lib/check_mk/wato
606 - fowners -R root:apache /var/lib/check_mk/wato
607 - fperms -R 0775 /var/lib/check_mk/
608 - fowners -R ${mydaeon}:apache /var/lib/check_mk/
609 - fi
610 -
611 - # Install agent related files
612 - newbin usr/share/check_mk/agents/check_mk_agent.linux check_mk_agent
613 - dobin usr/share/check_mk/agents/waitmax
614 -
615 - if use xinetd; then
616 - pushd "${S}"/usr/share/check_mk/agents/cfg_examples &>/dev/null || die
617 - insinto /etc/xinetd.d
618 - newins xinetd.conf check_mk
619 - systemd_dounit systemd/check_mk@.service systemd/check_mk.socket
620 - popd &>/dev/null || die
621 - fi
622 -
623 - keepdir /usr/lib/check_mk_agent/local
624 - keepdir /usr/lib/check_mk_agent/plugins
625 -
626 - # Documentation
627 - if ! use agent-only; then
628 - dodoc -r usr/share/doc/${PF}/*
629 - docompress -x /usr/share/doc/${PF}/checks/
630 - else
631 - dodoc usr/share/doc/${PF}/AUTHORS usr/share/doc/${PF}/COPYING usr/share/doc/${PF}/ChangeLog
632 - docompress
633 - fi
634 -
635 - # Install the check_mk_agent logwatch plugin
636 - if use logwatch; then
637 - insinto /etc/check_mk
638 - doins usr/share/check_mk/agents/cfg_examples/logwatch.cfg
639 - exeinto /usr/lib/check_mk_agent/plugins
640 - doexe usr/share/check_mk/agents/plugins/mk_logwatch
641 - fi
642 -
643 - # Install the check_mk_agent smart plugin
644 - if use smart; then
645 - exeinto /usr/lib/check_mk_agent/plugins
646 - doexe usr/share/check_mk/agents/plugins/smart
647 - fi
648 -
649 - # Install the check_mk_agent mysql plugin
650 - if use mysql; then
651 - exeinto /usr/lib/check_mk_agent/plugins
652 - doexe usr/share/check_mk/agents/plugins/mk_mysql
653 - fi
654 -
655 - # Install the check_mk_agent postgres plugin
656 - if use postgres; then
657 - exeinto /usr/lib/check_mk_agent/plugins
658 - doexe usr/share/check_mk/agents/plugins/mk_postgres
659 - fi
660 -
661 - # Install the check_mk_agent apache_status plugin
662 - if use apache_status; then
663 - exeinto /usr/lib/check_mk_agent/plugins
664 - doexe usr/share/check_mk/agents/plugins/apache_status
665 - fi
666 -
667 - # Install the check_mk_agent zypper plugin
668 - if use zypper; then
669 - exeinto /usr/lib/check_mk_agent/plugins
670 - doexe usr/share/check_mk/agents/plugins/mk_zypper
671 - fi
672 -
673 - # Install the check_mk_agent oracle plugin
674 - if use oracle; then
675 - exeinto /usr/lib/check_mk_agent/plugins
676 - doexe usr/share/check_mk/agents/plugins/mk_oracle
677 - fi
678 -
679 - # Install the check_mk_agent nfsexports plugin
680 - if use nfsexports; then
681 - exeinto /usr/lib/check_mk_agent/plugins
682 - doexe usr/share/check_mk/agents/plugins/nfsexports
683 - fi
684 -}
685 -
686 -pkg_postinst() {
687 - if ! use agent-only; then
688 - elog "IMPORTANT: Please add the following line to your"
689 - elog "/etc/${mydaemon}/${mydaemon}.cfg, so that"
690 - elog "${mydaemon} can load your check_mk configuration."
691 - elog
692 - elog " cfg_dir=/etc/${mydaemon}/check_mk.d"
693 - elog
694 - fi
695 - if use wato; then
696 - elog "INFO: Your webserver needs write access to"
697 - elog "/etc/${mydaemon}/htpasswd.users!"
698 - elog "otherwise wato will not function correctly!"
699 - elog
700 - elog "chown ${mydaemon}: /etc/${mydaemon}/htpasswd.users"
701 - elog "chmod 660 /etc/${mydaemon}/htpasswd.users"
702 - elog
703 - elog "Alternatively with ACLs:"
704 - elog "setfacl -m u:apache:rw /etc/${mydaemon}/htpasswd.users"
705 - elog "setfacl -m g:apache:rw /etc/${mydaemon}/htpasswd.users"
706 - elog
707 - fi
708 - if use livestatus; then
709 - elog "In order for livestatus to work, you need to make sure that"
710 - if has_version net-analyzer/nagios-core; then
711 - elog "nagios is loading the livestatus broker module. Please"
712 - elog "ensure to add to your nagios.cfg the lines in"
713 - elog "/usr/share/mk-livestatus/nagios.cfg"
714 - else
715 - elog "icigna is loading the livestatus broker module. Please"
716 - elog "include /usr/share/mk-livestatus/icigna.cfg in your"
717 - elog "icigna configuration."
718 - fi
719 - fi
720 -}
721
722 diff --git a/net-analyzer/check_mk/files/check_mk-1.2.4p5-setup.sh.patch b/net-analyzer/check_mk/files/check_mk-1.2.4p5-setup.sh.patch
723 deleted file mode 100644
724 index 07dffa35b2d..00000000000
725 --- a/net-analyzer/check_mk/files/check_mk-1.2.4p5-setup.sh.patch
726 +++ /dev/null
727 @@ -1,39 +0,0 @@
728 ---- check_mk-1.2.4p5.orig/setup.sh 2014-07-04 09:24:45.000000000 +0200
729 -+++ check_mk-1.2.4p5/setup.sh 2015-08-28 13:22:19.986733809 +0200
730 -@@ -572,6 +572,11 @@
731 - CONFIGURE_OPTS="--with-nagios4"
732 - fi
733 - fi
734 -+ # disable stripping to get meaningful backtraces
735 -+ sed -i -e 's/^INSTALL_STRIP_PROGRAM="\\\$(install_sh) -c -s"$/INSTALL_STRIP_PROGRAM="\\\$(install_sh) -c"/' configure
736 -+ sed -i -e 's/install_sh_PROGRAM="\$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \\$/install_sh_PROGRAM="\$(INSTALL_STRIP_PROGRAM)" \\/' Makefile.in
737 -+ sed -i -e 's/install_sh_PROGRAM="\$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \\$/install_sh_PROGRAM="\$(INSTALL_STRIP_PROGRAM)" \\/' src/Makefile.in
738 -+ sed -i -e 's/\$(CXX) \$(LDFLAGS) -s -fPIC -shared \$(livestatus_so_OBJECTS) -o \$@ -lpthread -lstdc++/\$(CXX) \$(LDFLAGS) -fPIC -shared \$(livestatus_so_OBJECTS) -o \$@ -lpthread -lstdc++/' src/Makefile.in
739 - ./configure --libdir=$libdir --bindir=$bindir $CONFIGURE_OPTS &&
740 - make clean &&
741 - cat <<EOF > src/livestatus.h &&
742 -@@ -581,7 +586,8 @@
743 - #endif // livestatus_h
744 - EOF
745 - make -j 8 2>&1 &&
746 -- strip src/livestatus.o &&
747 -+ # disable stripping to get meaningful backtraces
748 -+ #strip src/livestatus.o &&
749 - mkdir -p $DESTDIR$libdir &&
750 - install -m 755 src/livestatus.o $DESTDIR$libdir &&
751 - mkdir -p $DESTDIR$bindir &&
752 -@@ -1018,9 +1024,11 @@
753 - # WATO. Also create an empty and Apache-writable auth.serials
754 - serials_file=$DESTDIR${htpasswd_file%/*}/auth.serials &&
755 - touch "$serials_file" &&
756 -- (chown $wwwuser "$serials_file" || true) &&
757 -- (chown $wwwuser "$htpasswd_file" || true) &&
758 -- create_sudo_configuration &&
759 -+ # Permissions will be set within src_install
760 -+ #(chown $wwwuser "$serials_file" || true) &&
761 -+ #(chown $wwwuser "$htpasswd_file" || true) &&
762 -+ # disable sudo configuration as this will be done within src_install
763 -+ #create_sudo_configuration &&
764 - if [ "$enable_mkeventd" = yes ]
765 - then
766 - if [ -z "$YES" ] ; then echo -n "(Compiling Event Console binaries..." ; fi
767
768 diff --git a/net-analyzer/check_mk/files/check_mk-1.2.8p16-setup.sh.patch b/net-analyzer/check_mk/files/check_mk-1.2.8p16-setup.sh.patch
769 deleted file mode 100644
770 index b30d1ad1dad..00000000000
771 --- a/net-analyzer/check_mk/files/check_mk-1.2.8p16-setup.sh.patch
772 +++ /dev/null
773 @@ -1,35 +0,0 @@
774 ---- a/setup.sh 2014-07-04 09:24:45.000000000 +0200
775 -+++ b/setup.sh 2015-08-28 13:22:19.986733809 +0200
776 -@@ -564,6 +564,17 @@
777 -
778 - compile_livestatus ()
779 - {
780 -+ echo "Skipping internal compile of livestatus, do it in ebuild instead"
781 -+ cat <<EOF > $SRCDIR/livestatus.src/src/livestatus.h
782 -+#ifndef livestatus_h
783 -+#define livestatus_h
784 -+#define DEFAULT_SOCKET_PATH "$livesock"
785 -+#endif // livestatus_h
786 -+EOF
787 -+}
788 -+
789 -+avoid_compile_livestatus ()
790 -+{
791 - local D=$SRCDIR/livestatus.src
792 - rm -rf $D
793 - mkdir -p $D
794 -@@ -1018,9 +1029,11 @@
795 - # WATO. Also create an empty and Apache-writable auth.serials
796 - serials_file=$DESTDIR${htpasswd_file%/*}/auth.serials &&
797 - touch "$serials_file" &&
798 -- (chown $wwwuser "$serials_file" || true) &&
799 -- (chown $wwwuser "$htpasswd_file" || true) &&
800 -- create_sudo_configuration &&
801 -+ # Permissions will be set within src_install
802 -+ #(chown $wwwuser "$serials_file" || true) &&
803 -+ #(chown $wwwuser "$htpasswd_file" || true) &&
804 -+ # disable sudo configuration as this will be done within src_install
805 -+ #create_sudo_configuration &&
806 - if [ "$enable_mkeventd" = yes ]
807 - then
808 - if [ -z "$YES" ] ; then echo -n "(Compiling Event Console binaries..." ; fi
809
810 diff --git a/net-analyzer/check_mk/metadata.xml b/net-analyzer/check_mk/metadata.xml
811 deleted file mode 100644
812 index e7ef436d115..00000000000
813 --- a/net-analyzer/check_mk/metadata.xml
814 +++ /dev/null
815 @@ -1,29 +0,0 @@
816 -<?xml version="1.0" encoding="UTF-8"?>
817 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
818 -<pkgmetadata>
819 -<!-- maintainer-needed -->
820 - <longdescription lang="en">
821 - General purpose Nagios/Icinga plugin for retrieving data.
822 - Check_MK is a collection of extensions for the IT-Monitoring-Kernel
823 - of Nagios/Icinga and together with this, and ideally also with
824 - PNP4Nagios and NagVis constitutes a complete IT-Monitoring-System.
825 - </longdescription>
826 - <use>
827 - <flag name="agent-only">Install only the check_mk agent.</flag>
828 - <flag name="logwatch">Install check_mk-agent logwatch plugin.</flag>
829 - <flag name="smart">Install check_mk-agent S.M.A.R.T plugin.</flag>
830 - <flag name="mysql">Install check_mk-agent mysql plugin.</flag>
831 - <flag name="nagios4">Depend on <pkg>net-analyzer/nagios-core</pkg>-4</flag>
832 - <flag name="postgres">Install check_mk-agent postgres plugin.</flag>
833 - <flag name="apache_status">Install check_mk-agent apache-status plugin.</flag>
834 - <flag name="nfsexports">Install check_mk-agent nfsexports plugin.</flag>
835 - <flag name="dmi_sysinfo">Install check_mk-agent dmi_sysinfo plugin.</flag>
836 - <flag name="zypper">Install check_mk-agent zypper plugin.</flag>
837 - <flag name="livestatus">Enable livestatus.</flag>
838 - <flag name="wato">Enable check_mk WATO - check_mk's Web Administration Tool.</flag>
839 - </use>
840 - <upstream>
841 - <changelog>http://mathias-kettner.com/check_mk_download.html</changelog>
842 - <doc>http://mathias-kettner.com/checkmk.html</doc>
843 - </upstream>
844 -</pkgmetadata>
845
846 diff --git a/profiles/base/package.use.force b/profiles/base/package.use.force
847 index e437d8d4a1d..a43023cc367 100644
848 --- a/profiles/base/package.use.force
849 +++ b/profiles/base/package.use.force
850 @@ -19,11 +19,6 @@ sys-cluster/glusterfs libtirpc
851 # to avoid automagic deps.
852 >=x11-apps/intel-gpu-tools-9999 alsa chamelium doc glib gsl sound valgrind video_cards_amdgpu video_cards_intel video_cards_nouveau X xrandr xv
853
854 -# Michał Górny <mgorny@g.o> (05 Jun 2017)
855 -# (on behalf of Treecleaner project)
856 -# www-apache/mod_python is masked for removal, force agent-only builds.
857 -net-analyzer/check_mk agent-only
858 -
859 # NP-Hardass <NP-Hardass@g.o> (10 Apr 2017)
860 # Always force patch on appropriate variant to ensure
861 # similar experience when using app-emulation/wine-any
862
863 diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask
864 index a11b641539c..911da73221c 100644
865 --- a/profiles/base/package.use.mask
866 +++ b/profiles/base/package.use.mask
867 @@ -176,12 +176,6 @@ sys-boot/refind custom-cflags
868 # Needs patch to even build, subs are broken and not supported anymore.
869 media-video/mpv libav
870
871 -# Michał Górny <mgorny@g.o> (05 Jun 2017)
872 -# (on behalf of Treecleaner project)
873 -# www-apache/mod_python is masked for removal, mask flags that
874 -# require it.
875 -net-analyzer/check_mk livestatus wato
876 -
877 # Andreas K. Hüttel <dilfridge@g.o> (29 May 2017)
878 # Does not build
879 sci-libs/linux-gpib php
880
881 diff --git a/profiles/package.mask b/profiles/package.mask
882 index 1f376a9e2ac..dcc497c656c 100644
883 --- a/profiles/package.mask
884 +++ b/profiles/package.mask
885 @@ -210,13 +210,6 @@ media-plugins/vdr-videosystem
886 # packages. Bug #664658. Removal in 30 days.
887 net-im/hangups
888
889 -# Michał Górny <mgorny@g.o> (26 Aug 2018)
890 -# mod_python removal caused it to be reduced to agent-only, which is
891 -# apparently redundant to net-analyzer/check_mk_agent. The package
892 -# is unmaintained and potentially vulnerable. Bug #632648.
893 -# Removal in 30 days.
894 -net-analyzer/check_mk
895 -
896 # Virgil Dupras <vdupras@g.o> (23 Aug 2018)
897 # Vulnerable and can't be removed yet because of alpha. Bug #664346
898 <dev-python/paramiko-2.4.1