commit: 8f978407a29d863ab28404912b53cdcd37310e06
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 3 00:21:48 2017 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Nov 4 23:37:22 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f978407
net-analyzer/pnp4nagios: fix the default stats directory.
The process_perfdata.cfg file refers to a STATS_DIR that is set to
"@localstatedir@/stats" at build-time. However, the build system
doesn't create that directory nor ensure that it is writable. This
latest revision passes --localstatedir to econf, and then creates the
associated directory with the desired permissions. The "bulk mode"
without NPCD now works out-of-the-box!
Package-Manager: Portage-2.3.8, Repoman-2.3.3
...0.6.26-r5.ebuild => pnp4nagios-0.6.26-r6.ebuild} | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r5.ebuild
b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r6.ebuild
similarity index 85%
rename from net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r5.ebuild
rename to net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r6.ebuild
index 3e886eb89dc..9642d1e6479 100644
--- a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r5.ebuild
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r6.ebuild
@@ -44,11 +44,10 @@ src_configure() {
econf \
--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-dir="${EPREFIX}"/var/lib/pnp/perfdata \
-
--with-perfdata-logfile="${EPREFIX}"/var/log/pnp/process_perfdata.log \
- --with-perfdata-spool-dir="${EPREFIX}"/var/spool/pnp
+
--with-perfdata-logfile="${EPREFIX}"/var/log/pnp/process_perfdata.log
}
src_compile() {
@@ -78,14 +77,20 @@ src_install() {
fowners :apache /etc/pnp/process_perfdata.cfg
fi
- # The nagios or icinga user will also need to be able to write
- # performance data to the perfdata-dir and perfdata-spool-dir
- # directories.
+ # The nagios or icinga user needs to write performance data to the
+ # perfdata-dir...
local user_group=nagios
( use icinga || use icinga2 ) && user_group=icinga
- dodir /var/lib/pnp/{,perfdata} /var/log/pnp
- fowners "${user_group}:${user_group}" /var/lib/pnp/{,perfdata}
+ fowners "${user_group}:${user_group}" /var/lib/pnp/{,perfdata,spool}
+
+ # and likewise for its logs...
+ dodir /var/log/pnp
fowners "${user_group}:${user_group}" /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}:${user_group}" /var/lib/pnp/stats
}
pkg_postinst() {