summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/nagios-base/DESCR12
-rw-r--r--net/nagios-base/MESSAGE13
-rw-r--r--net/nagios-base/Makefile69
-rw-r--r--net/nagios-base/Makefile.common25
-rw-r--r--net/nagios-base/PLIST298
-rw-r--r--net/nagios-base/distinfo12
-rw-r--r--net/nagios-base/files/nagios.conf.dist22
-rw-r--r--net/nagios-base/files/nagios.sh29
-rw-r--r--net/nagios-base/options.mk19
-rw-r--r--net/nagios-base/patches/patch-aa121
-rw-r--r--net/nagios-base/patches/patch-ab29
-rw-r--r--net/nagios-base/patches/patch-ac27
-rw-r--r--net/nagios-base/patches/patch-ad78
-rw-r--r--net/nagios-base/patches/patch-ae17
-rw-r--r--net/nagios-base/patches/patch-af76
-rw-r--r--net/nagios-base/patches/patch-ag13
16 files changed, 860 insertions, 0 deletions
diff --git a/net/nagios-base/DESCR b/net/nagios-base/DESCR
new file mode 100644
index 00000000000..dd6dae573b5
--- /dev/null
+++ b/net/nagios-base/DESCR
@@ -0,0 +1,12 @@
+Nagios is a program that will monitor hosts and services on your
+network. It has the ability to email or page you when a problem arises
+and when it gets resolved. Nagios is written in C and is designed to
+run under Linux, although it should work under most other *NIX variants.
+It can run either as a normal process or as a daemon, intermittently
+running checks on various services that you specify. The actual service
+checks are performed by external "plugins" which return service
+information to Nagios. Several CGI programs are included with Nagios
+in order to allow you to view the current service status, history, etc.
+via a web browser.
+
+This package provides the core nagios infrastructure and web pages.
diff --git a/net/nagios-base/MESSAGE b/net/nagios-base/MESSAGE
new file mode 100644
index 00000000000..248d4dcdbf5
--- /dev/null
+++ b/net/nagios-base/MESSAGE
@@ -0,0 +1,13 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+
+Apache Configuration:
+You must add this in your httpd.conf file:
+ Include ${PKG_SYSCONFDIR}/nagios.conf
+
+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.
+
+===========================================================================
diff --git a/net/nagios-base/Makefile b/net/nagios-base/Makefile
new file mode 100644
index 00000000000..eff51dc9dcf
--- /dev/null
+++ b/net/nagios-base/Makefile
@@ -0,0 +1,69 @@
+# $NetBSD: Makefile,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+#
+
+DISTNAME= nagios-2.0
+PKGNAME= ${DISTNAME:S/-/-base-/}
+CATEGORIES= net sysutils
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/}
+
+MAINTAINER= tech-pkg@NetBSD.org
+HOMEPAGE= http://www.nagios.org/
+COMMENT= Network monitor
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../net/nagios-base/Makefile.common"
+.include "options.mk"
+
+CONFIGURE_ARGS+= --with-gd-lib=${LOCALBASE}/lib \
+ --with-gd-inc=${LOCALBASE}/include \
+ --enable-embedded-perl \
+ --with-perlcache
+
+CONFIGURE_ARGS+= --with-nagios-user=${NAGIOS_USER:Q}
+CONFIGURE_ARGS+= --with-nagios-grp=${NAGIOS_GROUP:Q}
+CONFIGURE_ARGS+= --with-command-user=${ROOT_USER:Q}
+CONFIGURE_ARGS+= --with-command-grp=${ROOT_GROUP:Q}
+CONFIGURE_ARGS+= --with-init-dir=${PREFIX}/share/examples/rc.d
+CONFIGURE_ARGS+= --with-lockfile=/var/run/nagios/nagios.lock
+
+RCD_SCRIPTS+= nagios
+
+INSTALL_TARGET= install install-config
+
+PKG_GROUPS+= ${NAGIOS_GROUP}
+PKG_GROUPS+= ${NAGIOSADM_GROUP}
+
+PKG_USERS+= ${NAGIOS_USER}:${NAGIOS_GROUP}::Nagios\ Runtime\ User
+PKG_USERS+= ${NAGIOSADM_USER}:${NAGIOSADM_GROUP}::Nagios\ Administrator:${PREFIX}/etc/nagios:${SH}
+
+EGDIR= ${PREFIX}/share/examples/nagios
+EGFILES= cgi.cfg checkcommands.cfg contactgroups.cfg contacts.cfg \
+ dependencies.cfg escalations.cfg hostgroups.cfg hosts.cfg \
+ misccommands.cfg nagios.cfg resource.cfg services.cfg \
+ timeperiods.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
+
+SUBST_CLASSES+= files
+SUBST_STAGE.files= post-build
+SUBST_FILES.files= nagios.conf.dist
+SUBST_SED.files= -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_MESSAGE.files= Fixing configuration files.
+
+pre-build:
+ @${CP} ${FILESDIR}/nagios.conf.dist ${WRKSRC}/nagios.conf.dist
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/nagios.conf.dist ${EGDIR}/nagios.conf
+
+.include "../../graphics/gd/buildlink3.mk"
+.include "../../lang/perl5/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/nagios-base/Makefile.common b/net/nagios-base/Makefile.common
new file mode 100644
index 00000000000..53b1cf43ffa
--- /dev/null
+++ b/net/nagios-base/Makefile.common
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile.common,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+#
+
+NAGIOS_USER?= nagios
+NAGIOS_GROUP?= ${NAGIOS_USER}
+
+NAGIOSADM_USER?= nagadmin
+NAGIOSADM_GROUP?= ${NAGIOSADM_USER}
+
+USE_X11= YES
+GNU_CONFIGURE= YES
+USE_TOOLS+= gmake
+USE_PKGINSTALL= YES
+
+PKG_SYSCONFSUBDIR= nagios
+
+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+= --with-cgiurl=/nagios/cgi-bin
+CONFIGURE_ARGS+= --with-htmurl=/nagios
diff --git a/net/nagios-base/PLIST b/net/nagios-base/PLIST
new file mode 100644
index 00000000000..a5e733a2b9d
--- /dev/null
+++ b/net/nagios-base/PLIST
@@ -0,0 +1,298 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+bin/nagios
+bin/nagiostats
+bin/p1.pl
+libexec/nagios/cgi-bin/avail.cgi
+libexec/nagios/cgi-bin/cmd.cgi
+libexec/nagios/cgi-bin/config.cgi
+libexec/nagios/cgi-bin/extinfo.cgi
+libexec/nagios/cgi-bin/histogram.cgi
+libexec/nagios/cgi-bin/history.cgi
+libexec/nagios/cgi-bin/notifications.cgi
+libexec/nagios/cgi-bin/outages.cgi
+libexec/nagios/cgi-bin/showlog.cgi
+libexec/nagios/cgi-bin/status.cgi
+libexec/nagios/cgi-bin/statusmap.cgi
+libexec/nagios/cgi-bin/statuswml.cgi
+libexec/nagios/cgi-bin/statuswrl.cgi
+libexec/nagios/cgi-bin/summary.cgi
+libexec/nagios/cgi-bin/tac.cgi
+libexec/nagios/cgi-bin/trends.cgi
+share/examples/nagios/bigger.cfg-sample
+share/examples/nagios/cgi.cfg-sample
+share/examples/nagios/checkcommands.cfg-sample
+share/examples/nagios/minimal.cfg-sample
+share/examples/nagios/misccommands.cfg-sample
+share/examples/nagios/nagios.cfg-sample
+share/examples/nagios/nagios.conf
+share/examples/nagios/resource.cfg-sample
+share/examples/rc.d/nagios
+share/nagios/contexthelp/A1.html
+share/nagios/contexthelp/A2.html
+share/nagios/contexthelp/A3.html
+share/nagios/contexthelp/A4.html
+share/nagios/contexthelp/A5.html
+share/nagios/contexthelp/A6.html
+share/nagios/contexthelp/A7.html
+share/nagios/contexthelp/B1.html
+share/nagios/contexthelp/C1.html
+share/nagios/contexthelp/D1.html
+share/nagios/contexthelp/E1.html
+share/nagios/contexthelp/F1.html
+share/nagios/contexthelp/G1.html
+share/nagios/contexthelp/G2.html
+share/nagios/contexthelp/G3.html
+share/nagios/contexthelp/G4.html
+share/nagios/contexthelp/G5.html
+share/nagios/contexthelp/G6.html
+share/nagios/contexthelp/H1.html
+share/nagios/contexthelp/H2.html
+share/nagios/contexthelp/H3.html
+share/nagios/contexthelp/H4.html
+share/nagios/contexthelp/H5.html
+share/nagios/contexthelp/H6.html
+share/nagios/contexthelp/H7.html
+share/nagios/contexthelp/H8.html
+share/nagios/contexthelp/I1.html
+share/nagios/contexthelp/I2.html
+share/nagios/contexthelp/I3.html
+share/nagios/contexthelp/I4.html
+share/nagios/contexthelp/I5.html
+share/nagios/contexthelp/I6.html
+share/nagios/contexthelp/I7.html
+share/nagios/contexthelp/I8.html
+share/nagios/contexthelp/I9.html
+share/nagios/contexthelp/J1.html
+share/nagios/contexthelp/K1.html
+share/nagios/contexthelp/L1.html
+share/nagios/contexthelp/L10.html
+share/nagios/contexthelp/L11.html
+share/nagios/contexthelp/L12.html
+share/nagios/contexthelp/L13.html
+share/nagios/contexthelp/L2.html
+share/nagios/contexthelp/L3.html
+share/nagios/contexthelp/L4.html
+share/nagios/contexthelp/L5.html
+share/nagios/contexthelp/L6.html
+share/nagios/contexthelp/L7.html
+share/nagios/contexthelp/L8.html
+share/nagios/contexthelp/L9.html
+share/nagios/contexthelp/M1.html
+share/nagios/contexthelp/M2.html
+share/nagios/contexthelp/M3.html
+share/nagios/contexthelp/M4.html
+share/nagios/contexthelp/M5.html
+share/nagios/contexthelp/M6.html
+share/nagios/contexthelp/N1.html
+share/nagios/contexthelp/N2.html
+share/nagios/contexthelp/N3.html
+share/nagios/contexthelp/N4.html
+share/nagios/contexthelp/N5.html
+share/nagios/contexthelp/N6.html
+share/nagios/contexthelp/N7.html
+share/nagios/docs/about.html
+share/nagios/docs/adaptive.html
+share/nagios/docs/addons.html
+share/nagios/docs/beginners.html
+share/nagios/docs/cgiauth.html
+share/nagios/docs/cgiincludes.html
+share/nagios/docs/cgis.html
+share/nagios/docs/checkscheduling.html
+share/nagios/docs/clusters.html
+share/nagios/docs/commandfile.html
+share/nagios/docs/config.html
+share/nagios/docs/configcgi.html
+share/nagios/docs/configextinfo.html
+share/nagios/docs/configmain.html
+share/nagios/docs/configobject.html
+share/nagios/docs/dependencies.html
+share/nagios/docs/distributed.html
+share/nagios/docs/downtime.html
+share/nagios/docs/embeddedperl.html
+share/nagios/docs/escalations.html
+share/nagios/docs/eventhandlers.html
+share/nagios/docs/extcommands.html
+share/nagios/docs/flapping.html
+share/nagios/docs/freshness.html
+share/nagios/docs/funstuff.html
+share/nagios/docs/images/activepassive.png
+share/nagios/docs/images/cgi-avail-a.png
+share/nagios/docs/images/cgi-avail-b.png
+share/nagios/docs/images/cgi-cmd.png
+share/nagios/docs/images/cgi-config.png
+share/nagios/docs/images/cgi-extinfo-a.png
+share/nagios/docs/images/cgi-extinfo-b.png
+share/nagios/docs/images/cgi-extinfo-c.png
+share/nagios/docs/images/cgi-extinfo-d.png
+share/nagios/docs/images/cgi-histogram.png
+share/nagios/docs/images/cgi-history.png
+share/nagios/docs/images/cgi-notifications.png
+share/nagios/docs/images/cgi-outages.png
+share/nagios/docs/images/cgi-showlog.png
+share/nagios/docs/images/cgi-status-a.png
+share/nagios/docs/images/cgi-status-b.png
+share/nagios/docs/images/cgi-status-c.png
+share/nagios/docs/images/cgi-status-d.png
+share/nagios/docs/images/cgi-statusmap.png
+share/nagios/docs/images/cgi-statuswml.png
+share/nagios/docs/images/cgi-statuswrl.png
+share/nagios/docs/images/cgi-summary.png
+share/nagios/docs/images/cgi-tac.png
+share/nagios/docs/images/cgi-trends.png
+share/nagios/docs/images/checktiming.png
+share/nagios/docs/images/distributed.png
+share/nagios/docs/images/host-dependencies.png
+share/nagios/docs/images/indirecthostcheck.png
+share/nagios/docs/images/indirectsvccheck.png
+share/nagios/docs/images/indirectsvccheck2.png
+share/nagios/docs/images/interleaved1.png
+share/nagios/docs/images/interleaved2.png
+share/nagios/docs/images/interleaved3.png
+share/nagios/docs/images/logofullsize.png
+share/nagios/docs/images/mrtgstats.png
+share/nagios/docs/images/network-heirarchy.png
+share/nagios/docs/images/network-outage1.png
+share/nagios/docs/images/network-outage2.png
+share/nagios/docs/images/noninterleaved1.png
+share/nagios/docs/images/noninterleaved2.png
+share/nagios/docs/images/physical-network.png
+share/nagios/docs/images/plugintheory.png
+share/nagios/docs/images/redudancy.png
+share/nagios/docs/images/redundancy.png
+share/nagios/docs/images/service-dependencies.png
+share/nagios/docs/images/statetransitions.png
+share/nagios/docs/images/statetransitions2.png
+share/nagios/docs/index.html
+share/nagios/docs/indirectchecks.html
+share/nagios/docs/installing.html
+share/nagios/docs/installweb.html
+share/nagios/docs/int-snmptrap.html
+share/nagios/docs/int-tcpwrappers.html
+share/nagios/docs/macros.html
+share/nagios/docs/nagiostats.html
+share/nagios/docs/networkoutages.html
+share/nagios/docs/networkreachability.html
+share/nagios/docs/notifications.html
+share/nagios/docs/parallelization.html
+share/nagios/docs/passivechecks.html
+share/nagios/docs/perfdata.html
+share/nagios/docs/plugins.html
+share/nagios/docs/plugintheory.html
+share/nagios/docs/redundancy.html
+share/nagios/docs/robots.txt
+share/nagios/docs/security.html
+share/nagios/docs/stalking.html
+share/nagios/docs/starting.html
+share/nagios/docs/statetypes.html
+share/nagios/docs/stoprestart.html
+share/nagios/docs/templaterecursion.html
+share/nagios/docs/templatetricks.html
+share/nagios/docs/timeperiods.html
+share/nagios/docs/toc.html
+share/nagios/docs/tuning.html
+share/nagios/docs/verifyconfig.html
+share/nagios/docs/volatileservices.html
+share/nagios/docs/whatsnew.html
+share/nagios/docs/xodtemplate.html
+share/nagios/images/ack.gif
+share/nagios/images/action.gif
+share/nagios/images/command.png
+share/nagios/images/comment.gif
+share/nagios/images/contexthelp1.gif
+share/nagios/images/contexthelp2.gif
+share/nagios/images/critical.png
+share/nagios/images/delay.gif
+share/nagios/images/delete.gif
+share/nagios/images/detail.gif
+share/nagios/images/disabled.gif
+share/nagios/images/down.gif
+share/nagios/images/downtime.gif
+share/nagios/images/empty.gif
+share/nagios/images/enabled.gif
+share/nagios/images/extinfo.gif
+share/nagios/images/flapping.gif
+share/nagios/images/greendot.gif
+share/nagios/images/histogram.png
+share/nagios/images/history.gif
+share/nagios/images/hostevent.gif
+share/nagios/images/info.png
+share/nagios/images/left.gif
+share/nagios/images/logofullsize.jpg
+share/nagios/images/logos/nagios.gd2
+share/nagios/images/logos/nagios.gif
+share/nagios/images/logos/nagiosvrml.png
+share/nagios/images/logos/unknown.gd2
+share/nagios/images/logos/unknown.gif
+share/nagios/images/logrotate.png
+share/nagios/images/ndisabled.gif
+share/nagios/images/noack.gif
+share/nagios/images/notes.gif
+share/nagios/images/notify.gif
+share/nagios/images/orangedot.gif
+share/nagios/images/passiveonly.gif
+share/nagios/images/recovery.png
+share/nagios/images/redudancy.png
+share/nagios/images/redundancy.png
+share/nagios/images/restart.gif
+share/nagios/images/right.gif
+share/nagios/images/sblogo.jpg
+share/nagios/images/serviceevent.gif
+share/nagios/images/start.gif
+share/nagios/images/status.gif
+share/nagios/images/status2.gif
+share/nagios/images/status3.gif
+share/nagios/images/status4.gif
+share/nagios/images/stop.gif
+share/nagios/images/tacdisabled.jpg
+share/nagios/images/tacdisabled.png
+share/nagios/images/tacenabled.jpg
+share/nagios/images/tacenabled.png
+share/nagios/images/thermcrit.png
+share/nagios/images/thermok.png
+share/nagios/images/thermwarn.png
+share/nagios/images/trends.gif
+share/nagios/images/trendshost.png
+share/nagios/images/trendssvc.png
+share/nagios/images/unknown.png
+share/nagios/images/up.gif
+share/nagios/images/warning.png
+share/nagios/images/weblogo1.png
+share/nagios/images/zoom1.gif
+share/nagios/images/zoom2.gif
+share/nagios/index.html
+share/nagios/main.html
+share/nagios/media/critical.wav
+share/nagios/media/hostdown.wav
+share/nagios/media/warning.wav
+share/nagios/robots.txt
+share/nagios/side.html
+share/nagios/stylesheets/avail.css
+share/nagios/stylesheets/checksanity.css
+share/nagios/stylesheets/cmd.css
+share/nagios/stylesheets/common.css
+share/nagios/stylesheets/config.css
+share/nagios/stylesheets/extinfo.css
+share/nagios/stylesheets/histogram.css
+share/nagios/stylesheets/history.css
+share/nagios/stylesheets/ministatus.css
+share/nagios/stylesheets/notifications.css
+share/nagios/stylesheets/outages.css
+share/nagios/stylesheets/showlog.css
+share/nagios/stylesheets/status.css
+share/nagios/stylesheets/statusmap.css
+share/nagios/stylesheets/summary.css
+share/nagios/stylesheets/tac.css
+share/nagios/stylesheets/trends.css
+@dirrm share/nagios/stylesheets
+@dirrm share/nagios/media
+@dirrm share/nagios/images/logos
+@dirrm share/nagios/images
+@dirrm share/nagios/docs/images
+@dirrm share/nagios/docs
+@dirrm share/nagios/contexthelp
+@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
diff --git a/net/nagios-base/distinfo b/net/nagios-base/distinfo
new file mode 100644
index 00000000000..33cb1959b5c
--- /dev/null
+++ b/net/nagios-base/distinfo
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+
+SHA1 (nagios-2.0.tar.gz) = afa3220b10369d5991df2e2c1d6be173e4c18c2d
+RMD160 (nagios-2.0.tar.gz) = d168b7daa3ef0eb57440bcd7ead16ea33e5f907e
+Size (nagios-2.0.tar.gz) = 1735569 bytes
+SHA1 (patch-aa) = d08de9385d2be34d8c708c78f41d6a0c69815069
+SHA1 (patch-ab) = e313d47fbd9125613caa40fd17da20eaf81d1445
+SHA1 (patch-ac) = 094e4fa025a1982c9db96d70be563cbd4c33e192
+SHA1 (patch-ad) = a68b5b6baba07aee595be2be5e96f279b50b334c
+SHA1 (patch-ae) = 21f34726d239b4dacd17a94b80cbe030f76a2bbc
+SHA1 (patch-af) = 5690e6e4a6259fe8527faa1e8a77eeb5bf4b955f
+SHA1 (patch-ag) = 041dbc9a589ea3c3ced0532a2c1a99e7d0bca584
diff --git a/net/nagios-base/files/nagios.conf.dist b/net/nagios-base/files/nagios.conf.dist
new file mode 100644
index 00000000000..8f69775d110
--- /dev/null
+++ b/net/nagios-base/files/nagios.conf.dist
@@ -0,0 +1,22 @@
+# $NetBSD: nagios.conf.dist,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+#
+# nagios configuration file fragment for Apache
+
+<IfModule mod_alias.c>
+ Alias /nagios/ "@PREFIX@/share/nagios/"
+ ScriptAlias /nagios/cgi-bin/ "@PREFIX@/libexec/nagios/cgi-bin/"
+</IfModule>
+
+<Directory "@PREFIX@/libexec/nagios/cgi-bin/">
+ AllowOverride AuthConfig
+ order allow,deny
+ allow from all
+ Options ExecCGI
+</Directory>
+
+
+<Directory "@PREFIX@/share/nagios/">
+ AllowOverride AuthConfig
+ order allow,deny
+ allow from all
+</Directory>
diff --git a/net/nagios-base/files/nagios.sh b/net/nagios-base/files/nagios.sh
new file mode 100644
index 00000000000..b0cedf41f41
--- /dev/null
+++ b/net/nagios-base/files/nagios.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $NetBSD: nagios.sh,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+#
+# PROVIDE: nagios
+# REQUIRE: DAEMON
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="nagios"
+rcvar=$name
+command="@PREFIX@/bin/${name}"
+pidfile="/var/run/${name}/${name}.lock"
+config="@PKG_SYSCONFDIR@/${name}.cfg"
+
+command_args="-d $config"
+
+test_cmd="nagios_test"
+extra_commands="test"
+
+nagios_test()
+{
+ $command -v $config
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/nagios-base/options.mk b/net/nagios-base/options.mk
new file mode 100644
index 00000000000..64e44f11f04
--- /dev/null
+++ b/net/nagios-base/options.mk
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.nagios-base
+PKG_SUPPORTED_OPTIONS= mysql pgsql
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mmysql)
+CONFIGURE_ARGS+= --with-mysql-lib=${LOCALBASE}/lib/mysql \
+ --with-mysql-inc=${LOCALBASE}/include/mysql \
+ --with-mysql-xdata
+.include "../../mk/mysql.buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpgsql)
+CONFIGURE_ARGS+= --with-pgsql-lib=${LOCALBASE}/pgsql \
+ --with-pgsql-inc=${LOCALBASE}/pgsql \
+ --with-pgsql-xdata
+.include "../../mk/pgsql.buildlink3.mk"
+.endif
diff --git a/net/nagios-base/patches/patch-aa b/net/nagios-base/patches/patch-aa
new file mode 100644
index 00000000000..1e6306e0419
--- /dev/null
+++ b/net/nagios-base/patches/patch-aa
@@ -0,0 +1,121 @@
+$NetBSD: patch-aa,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+
+--- Makefile.in.orig 2004-12-16 02:15:24.000000000 +0100
++++ Makefile.in 2005-10-14 20:00:49.000000000 +0200
+@@ -21,16 +21,17 @@
+
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-LOGDIR=@localstatedir@
++LOGDIR=@localstatedir@/log/nagios
+ CFGDIR=@sysconfdir@
+ BINDIR=@bindir@
+-CGIDIR=@sbindir@
++CGIDIR=@libexecdir@
+ HTMLDIR=@datadir@
++SAMPDIR=@prefix@/share/examples/nagios
+ INSTALL=@INSTALL@
+ INSTALL_OPTS=@INSTALL_OPTS@
+ COMMAND_OPTS=@COMMAND_OPTS@
+ INIT_DIR=@init_dir@
+-INIT_OPTS=-o root -g root
++INIT_OPTS=-o root -g wheel
+ CGICFGDIR=$(CGIDIR)
+ PERLDIR=@PERLDIR@
+
+@@ -59,60 +60,6 @@
+ cd $(SRC_HTM) && $(MAKE)
+ cd $(SRC_MODULE) && $(MAKE)
+
+- @echo ""
+- @echo "*** Compile finished ***"
+- @echo ""
+- @echo "If the main program and CGIs compiled without any errors, you"
+- @echo "can continue with installing Nagios as follows (type 'make'"
+- @echo "without any arguments for a list of all possible options):"
+- @echo ""
+- @echo " make install"
+- @echo " - This installs the main program, CGIs, and HTML files"
+- @echo ""
+- @echo " make install-init"
+- @echo " - This installs the init script in $(DESTDIR)$(INIT_DIR)"
+- @echo ""
+- @echo " make install-commandmode"
+- @echo " - This installs and configures permissions on the"
+- @echo " directory for holding the external command file"
+- @echo ""
+- @echo " make install-config"
+- @echo " - This installs *SAMPLE* config files in $(DESTDIR)$(CFGDIR)"
+- @echo " You'll have to modify these sample files before you can"
+- @echo " use Nagios. Read the HTML documentation for more info"
+- @echo " on doing this. Pay particular attention to the docs on"
+- @echo " object configuration files, as they determine what/how"
+- @echo " things get monitored!"
+- @echo ""
+- @echo ""
+- @echo "*** Support Notes *******************************************"
+- @echo ""
+- @echo "If you have questions about configuring or running Nagios,"
+- @echo "please make sure that you:"
+- @echo ""
+- @echo " - Look at the sample config files"
+- @echo " - Read the HTML documentation"
+- @echo " - Read the FAQs online at http://www.nagios.org/faqs"
+- @echo ""
+- @echo "before you post a question to one of the mailing lists."
+- @echo "Also make sure to include pertinent information that could"
+- @echo "help others help you. This might include:"
+- @echo ""
+- @echo " - What version of Nagios you are using"
+- @echo " - What version of the plugins you are using"
+- @echo " - Relevant snippets from your config files"
+- @echo " - Relevant error messages from the Nagios log file"
+- @echo ""
+- @echo "For those of you who are interested in contract support or"
+- @echo "consulting services for Nagios, please visit:"
+- @echo ""
+- @echo " http://www.nagios.org/contractsupport"
+- @echo ""
+- @echo "*************************************************************"
+- @echo ""
+- @echo "Enjoy."
+- @echo ""
+-
+ nagios:
+ cd $(SRC_BASE) && $(MAKE)
+
+@@ -174,10 +121,8 @@
+ cd $(SRC_BASE) && $(MAKE) $@
+ cd $(SRC_CGI) && $(MAKE) $@
+ cd $(SRC_HTM) && $(MAKE) $@
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives
+ if [ $(INSTALLPERLSTUFF) = yes ]; then \
+- $(INSTALL) -m 664 $(INSTALL_OPTS) p1.pl $(DESTDIR)$(BINDIR); \
++ ${BSD_INSTALL_SCRIPT} p1.pl $(DESTDIR)$(BINDIR); \
+ fi;
+
+ @echo ""
+@@ -204,14 +149,14 @@
+
+
+ install-config:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
+- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(CFGDIR)/nagios.cfg-sample
+- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg-sample
+- $(INSTALL) -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg-sample
+- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/bigger.cfg $(DESTDIR)$(CFGDIR)/bigger.cfg-sample
+- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/minimal.cfg $(DESTDIR)$(CFGDIR)/minimal.cfg-sample
+- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/checkcommands.cfg $(DESTDIR)$(CFGDIR)/checkcommands.cfg-sample
+- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/misccommands.cfg $(DESTDIR)$(CFGDIR)/misccommands.cfg-sample
++ [ -d $(DESTDIR)$(SAMPDIR) ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(SAMPDIR)
++ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(SAMPDIR)/nagios.cfg-sample
++ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(SAMPDIR)/cgi.cfg-sample
++ $(INSTALL) -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(SAMPDIR)/resource.cfg-sample
++ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/bigger.cfg $(DESTDIR)$(SAMPDIR)/bigger.cfg-sample
++ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/minimal.cfg $(DESTDIR)$(SAMPDIR)/minimal.cfg-sample
++ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/checkcommands.cfg $(DESTDIR)$(SAMPDIR)/checkcommands.cfg-sample
++ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/misccommands.cfg $(DESTDIR)$(SAMPDIR)/misccommands.cfg-sample
+
+ @echo ""
+ @echo "*** Sample config file installed ***"
diff --git a/net/nagios-base/patches/patch-ab b/net/nagios-base/patches/patch-ab
new file mode 100644
index 00000000000..b4c1dc40fbe
--- /dev/null
+++ b/net/nagios-base/patches/patch-ab
@@ -0,0 +1,29 @@
+$NetBSD: patch-ab,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+
+--- cgi/Makefile.in.orig 2004-10-25 07:05:54.000000000 +0200
++++ cgi/Makefile.in 2005-10-14 20:01:42.000000000 +0200
+@@ -12,10 +12,10 @@
+
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-LOGDIR=@localstatedir@
++LOGDIR=@localstatedir@/log/nagios
+ CFGDIR=@sysconfdir@
+ BINDIR=@bindir@
+-CGIDIR=@sbindir@
++CGIDIR=@libexecdir@/cgi-bin
+ HTMLDIR=@datadir@
+ INSTALL=@INSTALL@
+ INSTALL_OPTS=@INSTALL_OPTS@
+@@ -191,9 +191,9 @@
+ devclean: distclean
+
+ install:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR)
++ [ -d $(DESTDIR)$(CGIDIR) ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(CGIDIR)
+ for file in *.cgi; do \
+- $(INSTALL) -m 775 $(INSTALL_OPTS) $$file $(DESTDIR)$(CGIDIR); \
++ ${BSD_INSTALL_SCRIPT} $$file $(DESTDIR)$(CGIDIR); \
+ $(STRIP) $(DESTDIR)$(CGIDIR)/$$file; \
+ done
+
diff --git a/net/nagios-base/patches/patch-ac b/net/nagios-base/patches/patch-ac
new file mode 100644
index 00000000000..2a4044cb01b
--- /dev/null
+++ b/net/nagios-base/patches/patch-ac
@@ -0,0 +1,27 @@
+$NetBSD: patch-ac,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+
+--- base/Makefile.in.orig 2004-12-09 07:48:33.000000000 +0100
++++ base/Makefile.in 2005-10-14 20:02:10.000000000 +0200
+@@ -26,10 +26,10 @@
+
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-LOGDIR=@localstatedir@
++LOGDIR=@localstatedir@/log/nagios
+ CFGDIR=@sysconfdir@
+ BINDIR=@bindir@
+-CGIDIR=@sbindir@
++CGIDIR=@libexecdir@
+ HTMLDIR=@datadir@
+ INSTALL=@INSTALL@
+ INSTALL_OPTS=@INSTALL_OPTS@
+@@ -181,8 +181,7 @@
+ devclean: distclean
+
+ install:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
+- $(INSTALL) -m 774 $(INSTALL_OPTS) @nagios_name@ $(DESTDIR)$(BINDIR)
++ ${BSD_INSTALL_PROGRAM} @nagios_name@ $(DESTDIR)$(BINDIR)
+ $(STRIP) $(DESTDIR)$(BINDIR)/@nagios_name@
+ $(INSTALL) -m 774 $(INSTALL_OPTS) @nagiostats_name@ $(DESTDIR)$(BINDIR)
+ $(STRIP) $(DESTDIR)$(BINDIR)/@nagiostats_name@
diff --git a/net/nagios-base/patches/patch-ad b/net/nagios-base/patches/patch-ad
new file mode 100644
index 00000000000..f72f3d7ea18
--- /dev/null
+++ b/net/nagios-base/patches/patch-ad
@@ -0,0 +1,78 @@
+$NetBSD: patch-ad,v 1.1.1.1 2006/02/18 17:12:20 bouyer Exp $
+
+--- html/Makefile.in.orig 2003-04-10 05:46:02.000000000 +0200
++++ html/Makefile.in 2005-10-14 20:02:37.000000000 +0200
+@@ -4,10 +4,10 @@
+
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-LOGDIR=@localstatedir@
++LOGDIR=@localstatedir@/log/nagios
+ CFGDIR=@sysconfdir@
+ BINDIR=@bindir@
+-CGIDIR=@sbindir@
++CGIDIR=@libexecdir@
+ HTMLDIR=@datadir@
+ INSTALL=@INSTALL@
+ INSTALL_OPTS=@INSTALL_OPTS@
+@@ -33,39 +33,34 @@
+ devclean: distclean
+
+ install:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/media
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/stylesheets
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/contexthelp
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/images
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/ssi
+- $(INSTALL) -m 664 $(INSTALL_OPTS) robots.txt $(DESTDIR)$(HTMLDIR)
+- $(INSTALL) -m 664 $(INSTALL_OPTS) docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs
++ [ -d $(DESTDIR)$(HTMLDIR) ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(HTMLDIR)
++ [ -d $(DESTDIR)$(HTMLDIR)/media ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(HTMLDIR)/media
++ [ -d $(DESTDIR)$(HTMLDIR)/stylesheets ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(HTMLDIR)/stylesheets
++ [ -d $(DESTDIR)$(HTMLDIR)/contexthelp ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(HTMLDIR)/contexthelp
++ [ -d $(DESTDIR)$(HTMLDIR)/docs ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(HTMLDIR)/docs
++ [ -d $(DESTDIR)$(HTMLDIR)/docs/images ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(HTMLDIR)/docs/images
++ [ -d $(DESTDIR)$(HTMLDIR)/images ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(HTMLDIR)/images
++ [ -d $(DESTDIR)$(HTMLDIR)/images/logos ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(HTMLDIR)/images/logos
++ [ -d $(DESTDIR)$(HTMLDIR)/ssi ] || ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(HTMLDIR)/ssi
++ ${BSD_INSTALL_DATA} robots.txt $(DESTDIR)$(HTMLDIR)
++ ${BSD_INSTALL_DATA} docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs
+ for file in *.html; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done
++ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(HTMLDIR); done
+ for file in media/*.wav; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/media; done
++ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(HTMLDIR)/media; done
+ for file in stylesheets/*.css; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/stylesheets; done
++ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(HTMLDIR)/stylesheets; done
+ for file in contexthelp/*.html; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/contexthelp; done
++ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(HTMLDIR)/contexthelp; done
+ for file in docs/*.html; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs; done
++ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(HTMLDIR)/docs; done
+ for file in docs/images/*.*; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs/images; done
++ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(HTMLDIR)/docs/images; done
+ for file in images/*.gif; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done
++ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(HTMLDIR)/images; done
+ for file in images/*.jpg; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done
++ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(HTMLDIR)/images; done
+ for file in images/*.png; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done
++ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(HTMLDIR)/images; done
+ for file in images/logos/*.*; \
+- do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos; done
+-
+-
+-
+-
+-
++ do ${BSD_INSTALL_DATA} $$file $(DESTDIR)$(HTMLDIR)/images/logos; done
diff --git a/net/nagios-base/patches/patch-ae b/net/nagios-base/patches/patch-ae
new file mode 100644
index 00000000000..5c5307ad1b3
--- /dev/null
+++ b/net/nagios-base/patches/patch-ae
@@ -0,0 +1,17 @@
+$NetBSD: patch-ae,v 1.1.1.1 2006/02/18 17:12:20 bouyer 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
+ CFGDIR=@sysconfdir@
+ BINDIR=@bindir@
+-CGIDIR=@sbindir@
++CGIDIR=@libexecdir@
+ HTMLDIR=@datadir@
+ INSTALL=@INSTALL@
+ INSTALL_OPTS=@INSTALL_OPTS@
diff --git a/net/nagios-base/patches/patch-af b/net/nagios-base/patches/patch-af
new file mode 100644
index 00000000000..43c964c5dc0
--- /dev/null
+++ b/net/nagios-base/patches/patch-af
@@ -0,0 +1,76 @@
+$NetBSD: patch-af,v 1.1.1.1 2006/02/18 17:12:20 bouyer 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 @@
+ # is created, used, and deleted throughout the time that Nagios is
+ # running.
+
+-temp_file=@localstatedir@/nagios.tmp
++temp_file=/tmp/nagios.tmp
+
+
+
+@@ -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
new file mode 100644
index 00000000000..a2a021e13fa
--- /dev/null
+++ b/net/nagios-base/patches/patch-ag
@@ -0,0 +1,13 @@
+$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'
+
+
+