commit: 7e81910df1947a9b7968fffe52655438b1adbdc4
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 31 20:23:00 2019 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Aug 31 21:34:55 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e81910d
net-analyzer/nagios-core: move localstatedir to /var/lib/nagios.
For whatever reason, the local state directory for nagios was
historically set to /var/nagios. The FHS (v3) states that local
application state should live under /var/lib instead, so this revision
sets it to /var/lib/nagios.
This could potentially be annoying to upgraders but is probably non-
fatal. The state directory holds logs and service status information
that can be regenerated if necessary. Doing so could lead to "extra"
service notifications, though. To mitigate this, a warning is emitted
telling upgraders how to migrate the state information if they choose
to do so.
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
...s-core-4.4.5-r1.ebuild => nagios-core-4.4.5-r2.ebuild} | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/net-analyzer/nagios-core/nagios-core-4.4.5-r1.ebuild
b/net-analyzer/nagios-core/nagios-core-4.4.5-r2.ebuild
similarity index 91%
rename from net-analyzer/nagios-core/nagios-core-4.4.5-r1.ebuild
rename to net-analyzer/nagios-core/nagios-core-4.4.5-r2.ebuild
index fdfccca6aab..2fab4595e65 100644
--- a/net-analyzer/nagios-core/nagios-core-4.4.5-r1.ebuild
+++ b/net-analyzer/nagios-core/nagios-core-4.4.5-r2.ebuild
@@ -96,7 +96,7 @@ src_configure() {
econf ${myconf} \
--prefix=/usr \
--bindir=/usr/sbin \
- --localstatedir=/var/nagios \
+ --localstatedir=/var/lib/nagios \
--sysconfdir=/etc/nagios \
--libexecdir=/usr/$(get_libdir)/nagios/plugins \
--with-cgibindir=/usr/$(get_libdir)/nagios/cgi-bin \
@@ -210,4 +210,17 @@ pkg_postinst() {
elog "filesystem. You can fix this by adding nagios into"
elog "the group wheel, but this is not recomended."
elog
+
+ if [ -n "${REPLACING_VERSIONS}" ]; then
+ ewarn "The local state directory for nagios has changed in
v4.4.5,"
+ ewarn "from ${EROOT}var/nagios to ${EROOT}var/lib/nagios. If
you"
+ ewarn "wish to migrate your state to the new location, first
stop"
+ ewarn "nagios and then run"
+ ewarn ""
+ ewarn " diff --recursive --brief ${EROOT}var/nagios
${EROOT}var/lib/nagios"
+ ewarn ""
+ ewarn "to identify any files that should be moved to the new"
+ ewarn "location. They can simply be moved with \"mv\" before"
+ ewarn "restarting nagios."
+ fi
}