summaryrefslogtreecommitdiff
path: root/net-analyzer/pnp4nagios
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-23 17:20:27 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-23 17:20:27 +0100
commitb42afc2e976bde12586d398e7cb53b7910866059 (patch)
treef386626e5aca8450407cab0ab30bda6098b87134 /net-analyzer/pnp4nagios
parent2b180aa1d688b249ea9ce233bc8789031b2020aa (diff)
gentoo auto-resync : 23:09:2023 - 17:20:26
Diffstat (limited to 'net-analyzer/pnp4nagios')
-rw-r--r--net-analyzer/pnp4nagios/Manifest4
-rw-r--r--net-analyzer/pnp4nagios/metadata.xml2
-rw-r--r--net-analyzer/pnp4nagios/pnp4nagios-0.6.26_p20230918.ebuild112
3 files changed, 116 insertions, 2 deletions
diff --git a/net-analyzer/pnp4nagios/Manifest b/net-analyzer/pnp4nagios/Manifest
index 1f098abcaba0..ca4fef9378b5 100644
--- a/net-analyzer/pnp4nagios/Manifest
+++ b/net-analyzer/pnp4nagios/Manifest
@@ -4,5 +4,7 @@ AUX pnp4nagios-0.6.14-makefile.patch 1057 BLAKE2B 623115771d66839df357cf19ceb0ea
AUX pnp4nagios-0.6.26_p20221106_compat.patch 2331 BLAKE2B 87cb67ef587cb7b0a67a6112977a90cfab6847ed670f7343eb35badada53dcf928400ff99fb16778337afea4ed936502cbcec7d42eb4f76937691ca30b18471a SHA512 105128eb5d127f4f7b6127771054602f55547fc7fa04bdf1135239499b58c9cbaa9222e822ff5eb4e2a319e2f0d06c3d9c3f6de04bc577f5ba1ed66eb3362b45
AUX pnp4nagios-0.6.26_p20221106_php80.patch 1576 BLAKE2B c11698d80086c3abd2b0cc96ed9af68267ce63c38b35ec87cb2f8f52cbe2d02af8a24dcbbf3d12779af0ae1fed2521b4f784fc0a8fbb0f2a15c51e6efaff4ea8 SHA512 f92a9b384767b7bddea0da504a01486f5145f726cf6eb6dd5f8ac6bff5450e785c78a900d6fd97173043f08dca30336f2ea28069f7a67ee0c982b3d4a2564c45
DIST pnp4nagios-0.6.26_p20221106.tar.gz 3029704 BLAKE2B 5866f4dbfef9b1028255eb3e47ac57fa260c1e2caca50fcb1c5ff93a3dc9bee9f14152e3a269ecf12daab59e50e1f4dfcd6513f9ce3dc5da35de50b944c38260 SHA512 cd0c3ad3d4983c43f7e1a100e8a2e6a530b573ca6bed60125c87b22ab33c2486c5ce99c6f52d641cdc7468984925a22a6ee7e1ac330ea2278ec2439acb910d04
+DIST pnp4nagios-0.6.26_p20230918.tar.gz 3036216 BLAKE2B 101b84623bec93cb3c3c2c5f5785a308afeeff6c7a89504ec5e39812be5e0807eaf7dabf720a69e58a3dd7bfd654f124dd26030deab60f5c6e0a31bd665e83e6 SHA512 4b03c5bf3d00339627e22cf14669b21433f926d6e698933833911a40d8b324d5a70dc5187ee5291f48bfcc12e9b51aaba24c8d263d5f25081544f97dce372890
EBUILD pnp4nagios-0.6.26_p20221106.ebuild 3356 BLAKE2B 1c5b5d1f4378e1aa042fc1141e5fb1293ada5329786c63cbd6b2dad968b17d305d1df33bd33b3968d00c383d6b5a29228a94b6d41c5e61fdb9ec34a41a9e2fd9 SHA512 dec85299801c2cdc73a3382921eed6d25e39ce837aeb3bc9e7473d2871178437edf30bbb22b16ba779d87b176c4da8df44c876f6e82fa6dadb7bb2e175460b65
-MISC metadata.xml 677 BLAKE2B f58a0350bbf34f21834181d537d1e4906c91b9eea8187b10965578fa6fa82abd3de727754b2f62987f078aad6db146ec00a0437c48edd4411b23b1ef780abb0f SHA512 9843fd05d441d4324ceab6f99f67c7eba266b9f6cad7a28616c7ef094bd8345ef573ac4b5f83ee8f049f3dbf3067df1c1005fff803db9560f10f8b05f11fceda
+EBUILD pnp4nagios-0.6.26_p20230918.ebuild 3274 BLAKE2B 5cd41105bf934523a39dd065c3e96a4a4e3821874484142876ed4f81ed1c517d6ba41e3f903ae9e1e479302a2bea29b6e8263590291152e0e5a17794e4e8dcf6 SHA512 ea801658d948c35bb10bc7f9414ab9a52c0a912955adb470441d15420e1bb5b7baf0018e3a070cc8f605d2052f8282d2658d026703fa44f31da141e0517b98b2
+MISC metadata.xml 688 BLAKE2B 5c0d71bc8b9678f242ef0310314f1762e6c65412fd0c5451ea3b0dc18ccd124b3975be3812722ce46777c53a279d6fd36c16b7c778244c4be625486053e74aa2 SHA512 a498d056799e1dcd0cf10f86623560ec26b82d2923aaff0fa856f3fd70bd900da8515c53b6b73ccb5f37a3cae8934033454c9e344816c5044cf9cd49aee85a10
diff --git a/net-analyzer/pnp4nagios/metadata.xml b/net-analyzer/pnp4nagios/metadata.xml
index 938f480add62..9e00dcae8fec 100644
--- a/net-analyzer/pnp4nagios/metadata.xml
+++ b/net-analyzer/pnp4nagios/metadata.xml
@@ -18,6 +18,6 @@
<upstream>
<remote-id type="sourceforge">pnp4nagios</remote-id>
- <remote-id type="github">lingej/pnp4nagios</remote-id>
+ <remote-id type="github">ConSol-Monitoring/pnp4nagios</remote-id>
</upstream>
</pkgmetadata>
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26_p20230918.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26_p20230918.ebuild
new file mode 100644
index 000000000000..ac57aaf8d4fc
--- /dev/null
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26_p20230918.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="A performance data analyzer for nagios"
+HOMEPAGE="https://github.com/ConSol-Monitoring/pnp"
+GH_COMMIT="e52677d3994d35197db68120d7089906a174a3f9"
+SRC_URI="https://github.com/ConSol-Monitoring/pnp/archive/${GH_COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/pnp-${GH_COMMIT}"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="apache2 icinga +nagios"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+REQUIRED_USE="^^ ( icinga nagios )"
+
+# Some things (sync mode, for one) are broken with nagios-4.x, but since
+# nagios-3.x has been end-of-life'd, we don't have much choice here but
+# to accept it.
+DEPEND="net-analyzer/rrdtool[graph,perl]
+ icinga? (
+ acct-group/icinga
+ acct-user/icinga
+ )
+ nagios? (
+ acct-group/nagios
+ acct-user/nagios
+ )"
+
+# A list of modules used in our Apache config file.
+APACHE_MODS="apache2_modules_alias," # "Alias" directive
+APACHE_MODS+="apache2_modules_authz_core," # "Require" directive
+APACHE_MODS+="apache2_modules_rewrite" # "RewriteEngine" and friends
+
+RDEPEND="${DEPEND}
+ dev-lang/php:*[filter,gd,json(+),simplexml,xml,zlib]
+ media-fonts/dejavu
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-HiRes
+ apache2? ( >=www-servers/apache-2.4[${APACHE_MODS}] )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.6.14-makefile.patch"
+)
+
+src_configure() {
+ local user_group=nagios
+ use icinga && user_group=icinga
+
+ local myeconfargs=(
+ --sysconfdir="${EPREFIX}"/etc/pnp
+ --datarootdir="${EPREFIX}"/usr/share/pnp
+ --localstatedir="${EPREFIX}"/var/lib/pnp
+ --with-nagios-user="${user_group}"
+ --with-nagios-group="${user_group}"
+ --with-perfdata-logfile="${EPREFIX}"/var/log/pnp/process_perfdata.log
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ # The default target just shows a help
+ emake all
+}
+
+src_install() {
+ # Don't use INSTALL_OPTS because they set insecure permissions on
+ # all of /etc/pnp (https://github.com/lingej/pnp4nagios/issues/140).
+ emake INSTALL_OPTS="" DESTDIR="${D}" install install-config
+ einstalldocs
+ newinitd "${FILESDIR}"/npcd.initd npcd
+ rm "${ED}/usr/share/pnp/install.php" || \
+ die "unable to remove ${ED}/usr/share/pnp/install.php"
+
+ # Fix CVE-2012-3457 (Gentoo bug 430358)
+ fperms o-rwx /etc/pnp/process_perfdata.cfg
+
+ if use apache2 ; then
+ insinto /etc/apache2/modules.d
+ newins "${FILESDIR}"/98_pnp4nagios-2.4.conf 98_pnp4nagios.conf
+ fi
+
+ # The nagios or icinga user needs to write performance data to the
+ # perfdata-dir...
+ local user_group=nagios
+ use icinga && user_group=icinga
+ fowners ":${user_group}" /var/lib/pnp/{,perfdata,spool}
+ fperms g+rwx /var/lib/pnp/{,perfdata,spool}
+
+ # and likewise for its logs...
+ dodir /var/log/pnp
+ fowners ":${user_group}" /var/log/pnp
+ fperms g+rwx /var/log/pnp
+
+ # and its statistics. This one is arguably the responsibility of the
+ # build system, since process_perfdata.cfg refers to this location.
+ dodir /var/lib/pnp/stats
+ fowners ":${user_group}" /var/lib/pnp/stats
+ fperms g+rwx /var/lib/pnp/stats
+}
+
+pkg_postinst() {
+ elog "To enable the pnp4nagios web front-end, please visit"
+ elog "${EROOT}/etc/conf.d/apache2 and add \"-D PNP -D PHP\""
+ elog "to APACHE2_OPTS. Then pnp4nagios will be available at,"
+ elog
+ elog " http://localhost/pnp4nagios"
+ elog
+}