From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pnp4nagios/
Date: Sat, 4 Nov 2017 23:40:20 +0000 (UTC) [thread overview]
Message-ID: <1509838642.667c4d4c33593e983947d5a4ce2f59288bd9dc76.mjo@gentoo> (raw)
commit: 667c4d4c33593e983947d5a4ce2f59288bd9dc76
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 2 20:42:36 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=667c4d4c
net-analyzer/pnp4nagios: use consistent perfdata directories.
Past revisions have stored the RRDtool data and the process_perdata.pl
logs in (for example) /var/nagios or /var/icinga, depending on whether
or you had Nagios or Icinga installed. That's silly: the data format
doesn't change, so it makes more sense to choose one location (now:
/var/lib/pnp) and stick with it.
Package-Manager: Portage-2.3.8, Repoman-2.3.3
....6.26-r4.ebuild => pnp4nagios-0.6.26-r5.ebuild} | 32 ++++++++++------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r4.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r5.ebuild
similarity index 78%
rename from net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r4.ebuild
rename to net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r5.ebuild
index c173abd999e..3e886eb89dc 100644
--- a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r4.ebuild
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r5.ebuild
@@ -38,27 +38,16 @@ RDEPEND="${DEPEND}
PATCHES=( "${FILESDIR}/${PN}-0.6.14-makefile.patch" )
src_configure() {
- local var_dir user_group
-
- if use icinga; then
- var_dir=/var/lib/icinga
- user_group=icinga
- elif use icinga2; then
- var_dir=/var/lib/icinga2
- user_group=icinga
- else
- # Thanks to REQUIRED_USE, "use nagios" is the only other case.
- var_dir=/var/nagios
- user_group=nagios
- fi
+ local user_group=nagios
+ ( use icinga || use icinga2 ) && user_group=icinga
econf \
--sysconfdir="${EPREFIX}"/etc/pnp \
--datarootdir="${EPREFIX}"/usr/share/pnp \
- --with-perfdata-dir="${EPREFIX}"${var_dir}/perfdata \
- --with-nagios-user=${user_group} \
- --with-nagios-group=${user_group} \
- --with-perfdata-logfile="${EPREFIX}"${var_dir}/perfdata.log \
+ --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
}
@@ -88,6 +77,15 @@ src_install() {
# server read it.
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.
+ 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/log/pnp
}
pkg_postinst() {
next reply other threads:[~2017-11-04 23:40 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-04 23:40 Michael Orlitzky [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-05-21 21:19 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pnp4nagios/ Sam James
2023-11-04 13:35 Sam James
2023-11-04 12:25 Sam James
2023-11-04 10:49 Sam James
2023-09-23 15:07 Michael Orlitzky
2023-09-23 15:07 Michael Orlitzky
2022-12-23 13:48 Arthur Zamarin
2022-12-23 13:48 Arthur Zamarin
2022-12-23 12:17 Sam James
2022-08-30 10:06 Michael Orlitzky
2022-08-29 12:38 Jakov Smolić
2022-08-12 14:27 Sam James
2022-08-03 16:12 Arthur Zamarin
2020-03-17 7:32 Matthew Thode
2020-02-17 23:37 Matthew Thode
2018-06-19 22:24 Michael Orlitzky
2018-03-19 23:24 Sergei Trofimovich
2018-03-19 22:39 Sergei Trofimovich
2017-11-29 18:52 Thomas Deutschmann
2017-11-29 13:38 Agostino Sarubbo
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2016-11-30 23:44 Patrice Clement
2016-03-15 11:08 Agostino Sarubbo
2016-02-06 23:31 Matt Thode
2016-02-01 14:45 Matt Thode
2015-12-16 22:11 Matt Thode
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1509838642.667c4d4c33593e983947d5a4ce2f59288bd9dc76.mjo@gentoo \
--to=mjo@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox