From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A69381396D9 for ; Sat, 4 Nov 2017 23:40:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16560E0EC6; Sat, 4 Nov 2017 23:40:25 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DC107E0EC6 for ; Sat, 4 Nov 2017 23:40:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ED62F341784 for ; Sat, 4 Nov 2017 23:40:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C03A6952F for ; Sat, 4 Nov 2017 23:40:20 +0000 (UTC) From: "Michael Orlitzky" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" Message-ID: <1509838642.8f978407a29d863ab28404912b53cdcd37310e06.mjo@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pnp4nagios/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r5.ebuild net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r6.ebuild X-VCS-Directories: net-analyzer/pnp4nagios/ X-VCS-Committer: mjo X-VCS-Committer-Name: Michael Orlitzky X-VCS-Revision: 8f978407a29d863ab28404912b53cdcd37310e06 X-VCS-Branch: master Date: Sat, 4 Nov 2017 23:40:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9df51c9d-bdb4-4b7b-a8fe-e0da1cc5f7c8 X-Archives-Hash: 1038ff4e530bd77b01a772c37207aa1f commit: 8f978407a29d863ab28404912b53cdcd37310e06 Author: Michael Orlitzky gentoo org> AuthorDate: Fri Nov 3 00:21:48 2017 +0000 Commit: Michael Orlitzky gentoo 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() {