diff options
author | seb <seb@pkgsrc.org> | 2007-11-26 22:14:13 +0000 |
---|---|---|
committer | seb <seb@pkgsrc.org> | 2007-11-26 22:14:13 +0000 |
commit | 40ba22b2806ec921e35abfbbf36b561106648abb (patch) | |
tree | 71298f4214449b931fb058feefeb073a34d6d671 /net | |
parent | 54849f656e62f0b41c13c79ae7b9f7346b77aa50 (diff) | |
download | pkgsrc-40ba22b2806ec921e35abfbbf36b561106648abb.tar.gz |
Bump PKGREVISION to 4.
As proposed on pkgsrc-users@...
- Introduce NAGIOSDIR, defaults to VARBASE/spool/nagios, for log
and status files.
- Drop unused(?) 'nagadmin' user and group.
- Sync user and group handling with Nagios install
documentation/recommendations. Introduce the Nagios "external
command" group, NAGIOSCMD_GROUP, defaults to APACHE_GROUP. The
Nagios user should be manually added after package installation to
the NAGIOSCMD_GROUP group. Add this recommandation to the MESSAGE
file. Make the "external command directory", NAGIOSDIR/rw, owned
by NAGIOS_USER:NAGIOSCMD_GROUP.
- Use /var/run/nagios.lock as pidfile.
- Only install existing example configuration files.
- Put default values of NAGIOSDIR, NAGIOS_USER, NAGIOS_GROUP and
NAGIOSCMD_GROUP in mk/defaults/mk.conf and allow MAKECONF to
override them.
- Miscellaneous clean up and sync with the changes mentionned above.
- When deleting the package allow removal of directories shared
with other Nagios packages to fail.
Diffstat (limited to 'net')
-rw-r--r-- | net/nagios-base/MESSAGE | 6 | ||||
-rw-r--r-- | net/nagios-base/Makefile | 32 | ||||
-rw-r--r-- | net/nagios-base/Makefile.common | 14 | ||||
-rw-r--r-- | net/nagios-base/PLIST | 6 | ||||
-rw-r--r-- | net/nagios-base/distinfo | 15 | ||||
-rw-r--r-- | net/nagios-base/files/nagios.sh | 4 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-aa | 10 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ab | 12 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ac | 12 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ad | 12 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ae | 14 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-af | 71 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-ag | 13 |
13 files changed, 59 insertions, 162 deletions
diff --git a/net/nagios-base/MESSAGE b/net/nagios-base/MESSAGE index 248d4dcdbf5..e642395631b 100644 --- a/net/nagios-base/MESSAGE +++ b/net/nagios-base/MESSAGE @@ -1,13 +1,15 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $ +$NetBSD: MESSAGE,v 1.2 2007/11/26 22:14:13 seb Exp $ Apache Configuration: You must add this in your httpd.conf file: Include ${PKG_SYSCONFDIR}/nagios.conf +You should add the ${NAGIOS_USER} user to the group ${NAGIOSCMD_GROUP}. + See the manual for more instructions. /etc/rc.d startup script: -Please look in /usr/pkg/share/examples/rc.d/ for a nagios startup script. +Please look in ${PREFIX}/share/examples/rc.d/ for a nagios startup script. =========================================================================== diff --git a/net/nagios-base/Makefile b/net/nagios-base/Makefile index 33cdbedbbbd..67d986c79de 100644 --- a/net/nagios-base/Makefile +++ b/net/nagios-base/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.15 2007/11/22 09:27:44 abs Exp $ +# $NetBSD: Makefile,v 1.16 2007/11/26 22:14:13 seb Exp $ # DISTNAME= nagios-2.5 PKGNAME= ${DISTNAME:S/-/-base-/} -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= net sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/} @@ -22,10 +22,10 @@ CONFIGURE_ARGS+= --with-perlcache CONFIGURE_ARGS+= --with-nagios-user=${NAGIOS_USER:Q} CONFIGURE_ARGS+= --with-nagios-group=${NAGIOS_GROUP:Q} -CONFIGURE_ARGS+= --with-command-user=${ROOT_USER:Q} -CONFIGURE_ARGS+= --with-command-grp=${ROOT_GROUP:Q} +CONFIGURE_ARGS+= --with-command-user=${NAGIOS_USER:Q} +CONFIGURE_ARGS+= --with-command-group=${NAGIOSCMD_GROUP:Q} CONFIGURE_ARGS+= --with-init-dir=${PREFIX}/share/examples/rc.d -CONFIGURE_ARGS+= --with-lockfile=/var/run/nagios/nagios.lock +CONFIGURE_ARGS+= --with-lockfile=/var/run/nagios.lock USE_TOOLS+= mail:run perl CONFIGURE_ARGS+= --with-mail=${TOOLS_PLATFORM.mail} @@ -37,31 +37,27 @@ INSTALL_TARGET= install install-config BUILD_DEFS+= VARBASE PKG_GROUPS+= ${NAGIOS_GROUP} -PKG_GROUPS+= ${NAGIOSADM_GROUP} +PKG_GROUPS+= ${NAGIOSCMD_GROUP} PKG_USERS+= ${NAGIOS_USER}:${NAGIOS_GROUP} -PKG_USERS+= ${NAGIOSADM_USER}:${NAGIOSADM_GROUP} PKG_GECOS.${NAGIOS_USER}= Nagios Runtime User -PKG_GECOS.${NAGIOSADM_USER}= Nagios Administrator -PKG_HOME.${NAGIOSADM_USER}= ${PKG_SYSCONFDIR} -PKG_SHELL.${NAGIOSADM_USER}= ${SH} + +MESSAGE_SUBST+= NAGIOS_USER=${NAGIOS_USER} +MESSAGE_SUBST+= NAGIOSCMD_GROUP=${NAGIOSCMD_GROUP} EGDIR= ${PREFIX}/share/examples/nagios -EGFILES= cgi.cfg checkcommands.cfg contactgroups.cfg contacts.cfg -EGFILES+= dependencies.cfg escalations.cfg hostgroups.cfg hosts.cfg -EGFILES+= misccommands.cfg nagios.cfg resource.cfg services.cfg -EGFILES+= timeperiods.cfg +EGFILES= cgi.cfg checkcommands.cfg minimal.cfg +EGFILES+= misccommands.cfg nagios.cfg resource.cfg .for files in ${EGFILES} CONF_FILES+= ${EGDIR}/${files}-sample ${PKG_SYSCONFDIR}/${files} .endfor CONF_FILES+= ${EGDIR}/nagios.conf ${PKG_SYSCONFDIR}/nagios.conf -NAGIOS_DIRS= log/nagios log/nagios/archives run/nagios run/nagios/rw -.for dir in ${NAGIOS_DIRS} -OWN_DIRS_PERMS+= ${VARBASE}/${dir} ${NAGIOS_USER} ${NAGIOS_GROUP} 0775 -.endfor +OWN_DIRS_PERMS+=${NAGIOSDIR} ${NAGIOS_USER} ${NAGIOS_GROUP} 0775 +OWN_DIRS_PERMS+=${NAGIOSDIR}/archives ${NAGIOS_USER} ${NAGIOS_GROUP} 0775 +OWN_DIRS_PERMS+=${NAGIOSDIR}/rw ${NAGIOS_USER} ${NAGIOSCMD_GROUP} 0775 SUBST_CLASSES+= files SUBST_STAGE.files= post-build diff --git a/net/nagios-base/Makefile.common b/net/nagios-base/Makefile.common index 833dcf4e721..fbc0dca196e 100644 --- a/net/nagios-base/Makefile.common +++ b/net/nagios-base/Makefile.common @@ -1,14 +1,8 @@ -# $NetBSD: Makefile.common,v 1.6 2007/10/12 16:13:52 ghen Exp $ +# $NetBSD: Makefile.common,v 1.7 2007/11/26 22:14:13 seb Exp $ # -NAGIOS_USER?= nagios -NAGIOS_GROUP?= ${NAGIOS_USER} - -NAGIOSADM_USER?= nagadmin -NAGIOSADM_GROUP?= ${NAGIOSADM_USER} - -PKG_GROUPS_VARS+= NAGIOS_GROUP NAGIOSADM_GROUP -PKG_USERS_VARS+= NAGIOS_USER NAGIOSADM_USER +PKG_GROUPS_VARS+= NAGIOS_GROUP NAGIOSCMD_GROUP +PKG_USERS_VARS+= NAGIOS_USER GNU_CONFIGURE= YES USE_TOOLS+= gmake @@ -20,7 +14,7 @@ PERL5_REQD= 5.6 CONFIGURE_ARGS+= --libexecdir=${PREFIX}/libexec/nagios CONFIGURE_ARGS+= --datadir=${PREFIX}/share/nagios CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} -CONFIGURE_ARGS+= --localstatedir=/var +CONFIGURE_ARGS+= --localstatedir=${NAGIOSDIR:Q} CONFIGURE_ARGS+= --with-cgiurl=/nagios/cgi-bin CONFIGURE_ARGS+= --with-htmurl=/nagios diff --git a/net/nagios-base/PLIST b/net/nagios-base/PLIST index a5e733a2b9d..94e37f0415c 100644 --- a/net/nagios-base/PLIST +++ b/net/nagios-base/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $ +@comment $NetBSD: PLIST,v 1.2 2007/11/26 22:14:13 seb Exp $ bin/nagios bin/nagiostats bin/p1.pl @@ -293,6 +293,6 @@ share/nagios/stylesheets/trends.css @exec ${MKDIR} %D/share/nagios/ssi 2>/dev/null || ${TRUE} @dirrm share/nagios/ssi @dirrm share/nagios -@dirrm share/examples/nagios @dirrm libexec/nagios/cgi-bin -@dirrm libexec/nagios +@unexec ${RMDIR} %D/share/examples/nagios 2>/dev/null || ${TRUE} +@unexec ${RMDIR} %D/libexec/nagios 2>/dev/null || ${TRUE} diff --git a/net/nagios-base/distinfo b/net/nagios-base/distinfo index 25b7c12e979..026b21df46f 100644 --- a/net/nagios-base/distinfo +++ b/net/nagios-base/distinfo @@ -1,13 +1,12 @@ -$NetBSD: distinfo,v 1.5 2007/05/04 04:53:03 grant Exp $ +$NetBSD: distinfo,v 1.6 2007/11/26 22:14:14 seb Exp $ SHA1 (nagios-2.5.tar.gz) = 00e6bc45c5634649b6a1be2758ec181197d38f76 RMD160 (nagios-2.5.tar.gz) = a0f1890ed546ce026cf784ae3ca83119275bd529 Size (nagios-2.5.tar.gz) = 1736167 bytes -SHA1 (patch-aa) = b6095ba8e0555d78dd1f857c6a12bc03d97ee602 -SHA1 (patch-ab) = 5d9b0eecd2fdfa00e8412d61f9b54afaa71a97f3 -SHA1 (patch-ac) = ae45c87966641bd3374ee77af7109f19f906d1c0 -SHA1 (patch-ad) = f1b3979d977f78f5b02487809558693a963f2d40 -SHA1 (patch-ae) = 21f34726d239b4dacd17a94b80cbe030f76a2bbc -SHA1 (patch-af) = 5690e6e4a6259fe8527faa1e8a77eeb5bf4b955f -SHA1 (patch-ag) = 041dbc9a589ea3c3ced0532a2c1a99e7d0bca584 +SHA1 (patch-aa) = 7d13c606bf9c17850bdc49b07bf31b00a9d10f05 +SHA1 (patch-ab) = 5b33da97bc1339d9c7507cf7ed706ee27ae7c68a +SHA1 (patch-ac) = b72c80203f7c1c88f851a13c9031bc5a4febf512 +SHA1 (patch-ad) = 2d7c6620ed08a64c8df2d26083fa327899305004 +SHA1 (patch-ae) = 088bddbbd8d6a9f6b7aff89f238d510959a7220b +SHA1 (patch-af) = a1b2c3a51b0ed72ff0f507bacc44a0d0c5924d60 SHA1 (patch-ah) = 88122296f9d74648c3dadbd7f6e12e7ef1f32081 diff --git a/net/nagios-base/files/nagios.sh b/net/nagios-base/files/nagios.sh index 3a84b02cc45..ff79f9aae5b 100644 --- a/net/nagios-base/files/nagios.sh +++ b/net/nagios-base/files/nagios.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: nagios.sh,v 1.3 2007/10/11 19:24:36 ghen Exp $ +# $NetBSD: nagios.sh,v 1.4 2007/11/26 22:14:14 seb Exp $ # # PROVIDE: nagios # REQUIRE: DAEMON @@ -10,7 +10,7 @@ name="nagios" rcvar=$name command="@PREFIX@/bin/${name}" -pidfile="/var/run/${name}/${name}.lock" +pidfile="/var/run/${name}.lock" config="@PKG_SYSCONFDIR@/${name}.cfg" command_args="-d $config" diff --git a/net/nagios-base/patches/patch-aa b/net/nagios-base/patches/patch-aa index 66401a3adab..9f61be848c9 100644 --- a/net/nagios-base/patches/patch-aa +++ b/net/nagios-base/patches/patch-aa @@ -1,14 +1,12 @@ -$NetBSD: patch-aa,v 1.3 2007/05/04 04:53:03 grant Exp $ +$NetBSD: patch-aa,v 1.4 2007/11/26 22:14:14 seb Exp $ ---- Makefile.in.orig 2006-05-31 02:31:44.000000000 +1000 +--- Makefile.in.orig 2006-05-30 16:31:44.000000000 +0000 +++ Makefile.in -@@ -21,16 +21,17 @@ LDFLAGS=@LDFLAGS@ @LIBS@ - +@@ -22,15 +22,16 @@ LDFLAGS=@LDFLAGS@ @LIBS@ prefix=@prefix@ exec_prefix=@exec_prefix@ --LOGDIR=@localstatedir@ + LOGDIR=@localstatedir@ -CFGDIR=@sysconfdir@ -+LOGDIR=@localstatedir@/log/nagios +CGIDIR=@libexecdir@ BINDIR=@bindir@ CGIDIR=@sbindir@ diff --git a/net/nagios-base/patches/patch-ab b/net/nagios-base/patches/patch-ab index c013e65fdbe..7106d74fa4b 100644 --- a/net/nagios-base/patches/patch-ab +++ b/net/nagios-base/patches/patch-ab @@ -1,13 +1,9 @@ -$NetBSD: patch-ab,v 1.2 2006/08/17 14:19:00 taca Exp $ +$NetBSD: patch-ab,v 1.3 2007/11/26 22:14:14 seb Exp $ ---- cgi/Makefile.in.orig 2006-05-31 01:31:44.000000000 +0900 +--- cgi/Makefile.in.orig 2006-05-30 16:31:44.000000000 +0000 +++ cgi/Makefile.in -@@ -12,10 +12,10 @@ SRC_XDATA=../xdata - - prefix=@prefix@ - exec_prefix=@exec_prefix@ --LOGDIR=@localstatedir@ -+LOGDIR=@localstatedir@/log/nagios +@@ -15,7 +15,7 @@ exec_prefix=@exec_prefix@ + LOGDIR=@localstatedir@ CFGDIR=@sysconfdir@ BINDIR=@bindir@ -CGIDIR=@sbindir@ diff --git a/net/nagios-base/patches/patch-ac b/net/nagios-base/patches/patch-ac index 2bf4df2742c..06cae3f6e6b 100644 --- a/net/nagios-base/patches/patch-ac +++ b/net/nagios-base/patches/patch-ac @@ -1,13 +1,9 @@ -$NetBSD: patch-ac,v 1.2 2006/08/17 14:19:00 taca Exp $ +$NetBSD: patch-ac,v 1.3 2007/11/26 22:14:14 seb Exp $ ---- base/Makefile.in.orig 2006-05-31 01:31:44.000000000 +0900 +--- base/Makefile.in.orig 2006-05-30 16:31:44.000000000 +0000 +++ base/Makefile.in -@@ -26,10 +26,10 @@ LIBS=@LIBS@ - - prefix=@prefix@ - exec_prefix=@exec_prefix@ --LOGDIR=@localstatedir@ -+LOGDIR=@localstatedir@/log/nagios +@@ -29,7 +29,7 @@ exec_prefix=@exec_prefix@ + LOGDIR=@localstatedir@ CFGDIR=@sysconfdir@ BINDIR=@bindir@ -CGIDIR=@sbindir@ diff --git a/net/nagios-base/patches/patch-ad b/net/nagios-base/patches/patch-ad index 3580ff233c3..969a691f72d 100644 --- a/net/nagios-base/patches/patch-ad +++ b/net/nagios-base/patches/patch-ad @@ -1,13 +1,9 @@ -$NetBSD: patch-ad,v 1.2 2006/08/17 14:19:00 taca Exp $ +$NetBSD: patch-ad,v 1.3 2007/11/26 22:14:14 seb Exp $ ---- html/Makefile.in.orig 2006-05-31 01:31:44.000000000 +0900 +--- html/Makefile.in.orig 2006-05-30 16:31:44.000000000 +0000 +++ html/Makefile.in -@@ -4,10 +4,10 @@ LDFLAGS=@LDFLAGS@ @LIBS@ - - prefix=@prefix@ - exec_prefix=@exec_prefix@ --LOGDIR=@localstatedir@ -+LOGDIR=@localstatedir@/log/nagios +@@ -7,7 +7,7 @@ exec_prefix=@exec_prefix@ + LOGDIR=@localstatedir@ CFGDIR=@sysconfdir@ BINDIR=@bindir@ -CGIDIR=@sbindir@ diff --git a/net/nagios-base/patches/patch-ae b/net/nagios-base/patches/patch-ae index 5c5307ad1b3..3e4012a2517 100644 --- a/net/nagios-base/patches/patch-ae +++ b/net/nagios-base/patches/patch-ae @@ -1,13 +1,9 @@ -$NetBSD: patch-ae,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $ +$NetBSD: patch-ae,v 1.2 2007/11/26 22:14:14 seb Exp $ ---- common/Makefile.in.orig 2003-04-10 05:46:01.000000000 +0200 -+++ common/Makefile.in 2005-10-14 20:04:02.000000000 +0200 -@@ -14,10 +14,10 @@ - - prefix=@prefix@ - exec_prefix=@exec_prefix@ --LOGDIR=@localstatedir@ -+LOGDIR=@localstatedir@/log/nagios +--- common/Makefile.in.orig 2003-04-10 03:46:01.000000000 +0000 ++++ common/Makefile.in +@@ -17,7 +17,7 @@ exec_prefix=@exec_prefix@ + LOGDIR=@localstatedir@ CFGDIR=@sysconfdir@ BINDIR=@bindir@ -CGIDIR=@sbindir@ diff --git a/net/nagios-base/patches/patch-af b/net/nagios-base/patches/patch-af index 43c964c5dc0..d23616d7b93 100644 --- a/net/nagios-base/patches/patch-af +++ b/net/nagios-base/patches/patch-af @@ -1,53 +1,8 @@ -$NetBSD: patch-af,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $ +$NetBSD: patch-af,v 1.2 2007/11/26 22:14:14 seb Exp $ ---- sample-config/nagios.cfg.in.orig 2005-11-23 23:28:03.000000000 +0100 -+++ sample-config/nagios.cfg.in 2006-01-26 22:10:40.000000000 +0100 -@@ -16,7 +16,7 @@ - # for historical purposes. This should be the first option specified - # in the config file!!! - --log_file=@localstatedir@/nagios.log -+log_file=@localstatedir@/log/nagios/nagios.log - - - -@@ -100,7 +100,7 @@ - # The contents of the status file are deleted every time Nagios - # restarts. - --status_file=@localstatedir@/status.dat -+status_file=@localstatedir@/log/nagios/status.dat - - - -@@ -159,7 +159,7 @@ - # directory level instead of on the file, as the file is deleted every - # time its contents are processed. - --command_file=@localstatedir@/rw/nagios.cmd -+command_file=@localstatedir@/run/nagios/rw/nagios.cmd - - - -@@ -167,7 +167,7 @@ - # This is the file that Nagios will use for storing host and service - # comments. - --comment_file=@localstatedir@/comments.dat -+comment_file=@localstatedir@/log/nagios/comments.dat - - - -@@ -175,7 +175,7 @@ - # This is the file that Nagios will use for storing host and service - # downtime data. - --downtime_file=@localstatedir@/downtime.dat -+downtime_file=@localstatedir@/log/nagios/downtime.dat - - - -@@ -193,7 +193,7 @@ +--- sample-config/nagios.cfg.in.orig 2005-11-23 22:28:03.000000000 +0000 ++++ sample-config/nagios.cfg.in +@@ -193,7 +193,7 @@ lock_file=@lockfile@ # is created, used, and deleted throughout the time that Nagios is # running. @@ -56,21 +11,3 @@ $NetBSD: patch-af,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $ -@@ -240,7 +240,7 @@ - # This is the directory where archived (rotated) log files should be - # placed (assuming you've chosen to do log rotation). - --log_archive_path=@localstatedir@/archives -+log_archive_path=@localstatedir@/log/nagios/archives - - - -@@ -506,7 +506,7 @@ - # This file is used only if the preserve_state_information - # variable is set to 1. - --state_retention_file=@localstatedir@/retention.dat -+state_retention_file=@localstatedir@/run/nagios/retention.dat - - - diff --git a/net/nagios-base/patches/patch-ag b/net/nagios-base/patches/patch-ag deleted file mode 100644 index a2a021e13fa..00000000000 --- a/net/nagios-base/patches/patch-ag +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ag,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $ - ---- sample-config/cgi.cfg.in.orig 2005-05-05 23:37:25.000000000 +0200 -+++ sample-config/cgi.cfg.in 2005-10-14 20:07:52.000000000 +0200 -@@ -62,7 +62,7 @@ - # have to be tweaked a bit, as different versions of the plugin - # use different command line arguments/syntaxes. - --#nagios_check_command=@libexecdir@/check_nagios @localstatedir@/status.dat 5 '@bindir@/nagios' -+#nagios_check_command=@libexecdir@/check_nagios @localstatedir@/log/nagios/status.dat 5 '@bindir@/nagios' - - - |