aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorlme <lme@FreeBSD.org>2012-05-30 04:34:19 +0800
committerlme <lme@FreeBSD.org>2012-05-30 04:34:19 +0800
commit4ca80fd831705670eafd2f34ffbd7a3e45a010a6 (patch)
tree82766de6b92b09428c149fbca379d2e06643451f /net-mgmt
parentbcd8b136d63fdd959eae2df2d5145a0803085e27 (diff)
downloadfreebsd-ports-gnome-4ca80fd831705670eafd2f34ffbd7a3e45a010a6.tar.gz
freebsd-ports-gnome-4ca80fd831705670eafd2f34ffbd7a3e45a010a6.tar.zst
freebsd-ports-gnome-4ca80fd831705670eafd2f34ffbd7a3e45a010a6.zip
- Change logging directory from /var/spool/icinga to /var/log/icinga
- Change plugins directory to %%LOCALBASE%%/nagios so the files installed by net-mgmt/nagios-plugins port are found [1] - Add "--enable-pqsql" to add PostgreSQL support - Set proper permissions on the rw directory - Fix substitutions in pkg-message - While here silence warnings about inclusion of deprecated header sys/timeb.h - Bump PORTREVISION Noticed by: angelv <angelvg@gmail.com> [1]
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/icinga/Makefile16
-rw-r--r--net-mgmt/icinga/files/icinga.in2
-rw-r--r--net-mgmt/icinga/files/patch-include_config.h.in15
-rw-r--r--net-mgmt/icinga/files/pkg-message.in6
-rw-r--r--net-mgmt/icinga/pkg-plist8
5 files changed, 35 insertions, 12 deletions
diff --git a/net-mgmt/icinga/Makefile b/net-mgmt/icinga/Makefile
index f4629e85963d..e3948b3f5c79 100644
--- a/net-mgmt/icinga/Makefile
+++ b/net-mgmt/icinga/Makefile
@@ -7,7 +7,7 @@
PORTNAME= icinga
PORTVERSION= 1.7.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-mgmt
MASTER_SITES= SF
@@ -28,8 +28,8 @@ OPTIONS= EMBEDDED_PERL "Enable embedded Perl" on \
NANOSLEEP "Use nanosleep in event timing" off \
UNHANDLED_HACK "Display passive checks in unhandled queries" off \
IDOUTILS "Enable IDOUtils" on \
+ PGSQL "Enable support for PostgreSQL" off \
MYSQL "Depend on MySQL" off \
- PGSQL "Depend on PostgreSQL" off \
APACHE "Depend on Apache and install webconfig" off
GNU_CONFIGURE= yes
@@ -37,6 +37,7 @@ GNU_CONFIGURE= yes
ICINGAUSER?= icinga
ICINGAGROUP?= icinga
ICINGADIR?= /var/spool/icinga
+ICINGALOGDIR?= /var/log/icinga
ICINGAUID= 183
ICINGAGID= ${ICINGAUID}
@@ -57,12 +58,14 @@ CONFIGURE_ARGS= --with-command-user=${ICINGAUSER} \
--with-htmurl=${ICINGAHTMURL} \
--with-cgiurl=${ICINGACGIURL} \
--sbindir=${PREFIX}/${ICINGAWWWDIR}/cgi-bin \
- --libexecdir=${PREFIX}/libexec/icinga \
--datarootdir=${PREFIX}/${ICINGAWWWDIR} \
--datadir=${PREFIX}/${ICINGAWWWDIR} \
--sysconfdir=${PREFIX}/etc/icinga \
--localstatedir=${ICINGADIR} \
--with-checkresult-dir=${ICINGADIR}/checkresults \
+ --libexecdir=${PREFIX}/libexec/icinga \
+ --with-plugin-dir=${LOCALBASE}/libexec/nagios \
+ --with-log-dir=${ICINGALOGDIR} \
--enable-event-broker
CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib" \
@@ -73,6 +76,7 @@ MAKE_JOBS_UNSAFE= yes
INSTALL_TARGET= install install-commandmode install-config install-eventhandlers
PLIST_SUB= ICINGADIR=${ICINGADIR} \
+ ICINGALOGDIR=${ICINGALOGDIR} \
ICINGAWWWDIR=${ICINGAWWWDIR} \
ICINGAUSER=${ICINGAUSER} \
ICINGAGROUP=${ICINGAGROUP} \
@@ -122,6 +126,7 @@ USE_MYSQL= yes
.if defined(WITH_PGSQL)
USE_PGSQL= yes
+CONFIGURE_ARGS+= --enable-pgsql
.endif
.if defined(WITH_APACHE)
@@ -154,8 +159,9 @@ post-install:
cd ${WRKSRC}/module/idoutils/config && ${COPYTREE_SHARE} . ${EXAMPLESDIR}/idoutils/config
cd ${WRKSRC}/module/idoutils/db && ${COPYTREE_SHARE} . ${EXAMPLESDIR}/idoutils/db
.endif
- @${CHMOD} 775 ${ICINGADIR} ${ICINGADIR}/archives ${ICINGADIR}/checkresults ${ICINGADIR}/rw
- @${CHOWN} ${ICINGAUSER}:${ICINGAGROUP} ${ICINGADIR} ${ICINGADIR}/archives ${ICINGADIR}/checkresults
+ @${CHMOD} 775 ${ICINGADIR} ${ICINGALOGDIR}/archives ${ICINGADIR}/checkresults ${ICINGADIR}/rw
+ @${CHMOD} g+s ${ICINGADIR}/rw
+ @${CHOWN} ${ICINGAUSER}:${ICINGAGROUP} ${ICINGADIR} ${ICINGALOGDIR}/archives ${ICINGADIR}/checkresults
@${CHOWN} ${ICINGAUSER}:${WWWGRP} ${ICINGADIR}/rw
@${CAT} ${PKGMESSAGE}
diff --git a/net-mgmt/icinga/files/icinga.in b/net-mgmt/icinga/files/icinga.in
index a085ff3361fa..a1c9cf91b94c 100644
--- a/net-mgmt/icinga/files/icinga.in
+++ b/net-mgmt/icinga/files/icinga.in
@@ -34,7 +34,7 @@ pidfile="%%ICINGADIR%%/icinga.lock"
icinga_user="%%ICINGAUSER%%"
icinga_group="%%ICINGAGROUP%%"
-icinga_logfile="%%ICINGADIR%%/${name}.log"
+icinga_logfile="%%ICINGALOGDIR%%/${name}.log"
icinga_statusfile="%%ICINGADIR%%/status.sav"
icinga_cmdfile="%%ICINGADIR%%/rw/${name}.cmd"
diff --git a/net-mgmt/icinga/files/patch-include_config.h.in b/net-mgmt/icinga/files/patch-include_config.h.in
new file mode 100644
index 000000000000..554dcf8ebd22
--- /dev/null
+++ b/net-mgmt/icinga/files/patch-include_config.h.in
@@ -0,0 +1,15 @@
+--- include/config.h.in.orig 2012-05-25 21:46:46.000000000 +0200
++++ include/config.h.in 2012-05-25 21:47:05.000000000 +0200
+@@ -222,10 +222,12 @@
+ #include <errno.h>
+ #endif
+
++#if 0
+ #undef HAVE_SYS_TIMEB_H
+ #if HAVE_SYS_TIMEB_H
+ #include <sys/timeb.h>
+ #endif
++#endif
+
+ #undef HAVE_SYS_IPC_H
+ #ifdef HAVE_SYS_IPC_H
diff --git a/net-mgmt/icinga/files/pkg-message.in b/net-mgmt/icinga/files/pkg-message.in
index 3685ca4e4ccb..5fe65eb1691b 100644
--- a/net-mgmt/icinga/files/pkg-message.in
+++ b/net-mgmt/icinga/files/pkg-message.in
@@ -7,16 +7,16 @@
Configuration templates are available in %%PREFIX%%/etc/icinga as
*.cfg-sample files. Copy them to *.cfg files where required and
edit to suit your needs. Documentation is available in HTML form
- in %%PREFIX%%/%%ICINGAWWWDIR%%/docs.
+ in %%PREFIX%%/%%ICINGAWWWDIR%%/docs/.
If you don't already have a web server running, you will need to
install and configure one to finish off your Icinga installation.
If you selected APACHE in Icinga's OPTION screen, the configuration
- is already installed as %%LOCLABASE%%/%%APACHEETCDIR%%/extra/icinga.cfg
+ is already installed as %%LOCALBASE%%/etc/apache22/extra/icinga.cfg
and you only need to source the configuration file in Apache's config.
If you like to use database backend with IDOutils the SQL scripts to
setup the database have been installed in
- %%EXAMPLESDIR%%/idoutils/db/.
+ %%PREFIX%%/%%EXAMPLESDIR%%/idoutils/db/.
*************************************************************************
diff --git a/net-mgmt/icinga/pkg-plist b/net-mgmt/icinga/pkg-plist
index e45ba8c0dcb6..0361b9aca49f 100644
--- a/net-mgmt/icinga/pkg-plist
+++ b/net-mgmt/icinga/pkg-plist
@@ -1,5 +1,6 @@
-@exec chmod 775 %%ICINGADIR%% %%ICINGADIR%%/archives %%ICINGADIR%%/checkresults %%ICINGADIR%%/rw
-@exec chown %%ICINGAUSER%%:%%ICINGAGROUP%% %%ICINGADIR%% %%ICINGADIR%%/archives %%ICINGADIR%%/checkresults
+@exec chmod 775 %%ICINGADIR%% %%ICINGALOGDIR%%/archives %%ICINGADIR%%/checkresults %%ICINGADIR%%/rw
+@exec chmod g+s %%ICINGADIR%%/rw
+@exec chown %%ICINGAUSER%%:%%ICINGAGROUP%% %%ICINGADIR%% %%ICINGALOGDIR%%/archives %%ICINGADIR%%/checkresults
@exec chown %%ICINGAUSER%%:%%WWWGRP%% %%ICINGADIR%%/rw
@exec mkdir -p %%ICINGADIR%%/archives
@exec mkdir -p %%ICINGADIR%%/checkresults
@@ -842,7 +843,8 @@ libexec/icinga/eventhandlers/enable_notifications
@dirrmtry %%ICINGAWWWDIR%%/contexthelp
@dirrmtry %%ICINGAWWWDIR%%/cgi-bin
@dirrmtry %%ICINGAWWWDIR%%
-@dirrmtry %%ICINGADIR%%/archives
@dirrmtry %%ICINGADIR%%/checkresults
@dirrmtry %%ICINGADIR%%/rw
@dirrmtry %%ICINGADIR%%
+@dirrmtry %%ICINGALOGDIR%%/archives
+@dirrmtry %%ICINGALOGDIR%%