Skip site navigation (1)Skip section navigation (2)
Date:      Fri,  7 Mar 2003 00:11:08 +0100 (CET)
From:      Blaz Zupan <blaz@si.FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/48988: MAINTAINER UPDATE: net/nagios 
Message-ID:  <20030306231108.22B6755412@titanic.medinet.si>

next in thread | raw e-mail | index | archive | help

>Number:         48988
>Category:       ports
>Synopsis:       MAINTAINER UPDATE: net/nagios
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 06 15:20:13 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Blaz Zupan
>Release:        FreeBSD 4.7-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD titanic.medinet.si 4.7-RELEASE-p3 FreeBSD 4.7-RELEASE-p3 #0: Sun Feb 2 17:58:31 CET 2003 root@bigbrother.amis.net:/db/obj/usr/src/sys/TITANIC i386


	
>Description:

- move nagios workfile directory from /usr/local/var/nagios to
  /var/spool/nagios. /usr/local is read-only on some NFS booted systems.
- remove scripts/checkps, everybody should have a working /bin/ps by now.
- add new switches WITH_MYSQL and WITH_PGSQL which enable support
  for putting configuration files into a MySQL or PostgreSQL database,
  based on a patch submitted in PR 48102 by Krzysztof Stryjek <wtp@mud.pl>

After patching, the following files should be cvs added:

nagios/files/patch-xcddb.c
nagios/files/patch-xdddb.c
nagios/files/patch-xeddb.c
nagios/files/patch-xrddb.c
nagios/files/patch-xsddb.c

The following files should be cvs removed:

nagios/scripts/checkps

The nagios-plugins port should be updated with the patch in PR 48987 as
well.

>How-To-Repeat:
	
>Fix:

diff -urN nagios.old/Makefile nagios/Makefile
--- nagios.old/Makefile	Fri Feb 21 18:53:58 2003
+++ nagios/Makefile	Thu Mar  6 23:19:22 2003
@@ -7,10 +7,10 @@
 
 PORTNAME=	nagios
 PORTVERSION=	1.0
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=nagios
-DISTNAME=	nagios-1.0
 
 MAINTAINER=	blaz@si.FreeBSD.org
 COMMENT=	Extremely powerful network monitoring system
@@ -34,13 +34,24 @@
 		--libexecdir=${PREFIX}/libexec/nagios \
 		--datadir=${PREFIX}/share/nagios \
 		--sysconfdir=${PREFIX}/etc/nagios \
-		--localstatedir=${PREFIX}/var/nagios \
+		--localstatedir=/var/spool/nagios \
 		--prefix=${PREFIX}
 
-INSTALL_TARGET=	all install config install-config install-daemoninit install-commandmode
+.if defined(WITH_MYSQL)
+LIB_DEPENDS+=	mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+CONFIGURE_ARGS+=--with-mysql-lib=${LOCALBASE}/lib/mysql \
+		--with-mysql-inc=${LOCALBASE}/include/mysql \
+		--with-mysql-xdata
+.endif
+
+.if defined(WITH_PGSQL)
+LIB_DEPENDS+=	pq.3:${PORTSDIR}/databases/postgresql7
+CONFIGURE_ARGS+=--with-pgsql-lib=${LOCALBASE}/lib/pgsql \
+		--with-pgsql-inc=${LOCALBASE}/include \
+		--with-pgsql-xdata
+.endif
 
-pre-fetch:
-	@${SH} ${SCRIPTDIR}/checkps
+INSTALL_TARGET=	all install config install-config install-daemoninit install-commandmode
 
 pre-install:
 	@PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
diff -urN nagios.old/files/patch-xcddb.c nagios/files/patch-xcddb.c
--- nagios.old/files/patch-xcddb.c	Thu Jan  1 01:00:00 1970
+++ nagios/files/patch-xcddb.c	Thu Mar  6 23:16:57 2003
@@ -0,0 +1,11 @@
+--- xdata/xcddb.c.orig	Thu May 16 04:46:11 2002
++++ xdata/xcddb.c	Thu Mar  6 23:14:25 2003
+@@ -51,7 +51,7 @@
+ #endif
+ 
+ #ifdef USE_XCDPGSQL
+-#include <pgsql/libpq-fe.h>
++#include <libpq-fe.h>
+ #endif
+ 
+ 
diff -urN nagios.old/files/patch-xdddb.c nagios/files/patch-xdddb.c
--- nagios.old/files/patch-xdddb.c	Thu Jan  1 01:00:00 1970
+++ nagios/files/patch-xdddb.c	Thu Mar  6 23:17:04 2003
@@ -0,0 +1,11 @@
+--- xdata/xdddb.c.orig	Thu May 16 04:46:11 2002
++++ xdata/xdddb.c	Thu Mar  6 23:15:54 2003
+@@ -51,7 +51,7 @@
+ #endif
+ 
+ #ifdef USE_XDDPGSQL
+-#include <pgsql/libpq-fe.h>
++#include <libpq-fe.h>
+ #endif
+ 
+ 
diff -urN nagios.old/files/patch-xeddb.c nagios/files/patch-xeddb.c
--- nagios.old/files/patch-xeddb.c	Thu Jan  1 01:00:00 1970
+++ nagios/files/patch-xeddb.c	Thu Mar  6 23:17:11 2003
@@ -0,0 +1,11 @@
+--- xdata/xeddb.c.orig	Tue Feb 26 05:04:09 2002
++++ xdata/xeddb.c	Thu Mar  6 23:16:01 2003
+@@ -44,7 +44,7 @@
+ #endif
+ 
+ #ifdef USE_XEDPGSQL
+-#include <pgsql/libpq-fe.h>
++#include <libpq-fe.h>
+ #endif
+ 
+ 
diff -urN nagios.old/files/patch-xrddb.c nagios/files/patch-xrddb.c
--- nagios.old/files/patch-xrddb.c	Thu Jan  1 01:00:00 1970
+++ nagios/files/patch-xrddb.c	Thu Mar  6 23:17:22 2003
@@ -0,0 +1,11 @@
+--- xdata/xrddb.c.orig	Thu May 16 04:46:11 2002
++++ xdata/xrddb.c	Thu Mar  6 23:16:14 2003
+@@ -43,7 +43,7 @@
+ #endif
+ 
+ #ifdef USE_XRDPGSQL
+-#include <pgsql/libpq-fe.h>
++#include <libpq-fe.h>
+ #endif
+ 
+ 
diff -urN nagios.old/files/patch-xsddb.c nagios/files/patch-xsddb.c
--- nagios.old/files/patch-xsddb.c	Thu Jan  1 01:00:00 1970
+++ nagios/files/patch-xsddb.c	Thu Mar  6 23:17:27 2003
@@ -0,0 +1,11 @@
+--- xdata/xsddb.c.orig	Thu Nov 14 03:51:34 2002
++++ xdata/xsddb.c	Thu Mar  6 23:16:27 2003
+@@ -48,7 +48,7 @@
+ #endif
+ 
+ #ifdef USE_XSDPGSQL
+-#include <pgsql/libpq-fe.h>
++#include <libpq-fe.h>
+ #endif
+ 
+ 
diff -urN nagios.old/pkg-plist nagios/pkg-plist
--- nagios.old/pkg-plist	Tue Sep 17 10:07:23 2002
+++ nagios/pkg-plist	Thu Mar  6 22:33:29 2003
@@ -1,9 +1,9 @@
 @exec mkdir -p %D/share/nagios/ssi
-@exec mkdir -p %D/var/nagios/archives
-@exec mkdir -p %D/var/nagios/rw
-@exec chmod 775 %D/var/nagios %D/var/nagios/archives %D/var/nagios/rw
-@exec chown nagios:nagios %D/var/nagios %D/var/nagios/archives
-@exec chown nagios:nogroup %D/var/nagios/rw
+@exec mkdir -p /var/spool/nagios/archives
+@exec mkdir -p /var/spool/nagios/rw
+@exec chmod 775 /var/spool/nagios /var/spool/nagios/archives /var/spool/nagios/rw
+@exec chown nagios:nagios /var/spool/nagios /var/spool/nagios/archives
+@exec chown nagios:nogroup /var/spool/nagios/rw
 bin/nagios
 etc/nagios/cgi.cfg-sample
 etc/nagios/checkcommands.cfg-sample
@@ -309,7 +309,6 @@
 @dirrm share/nagios/ssi
 @dirrm share/nagios/stylesheets
 @dirrm share/nagios
-@unexec rmdir %D/var/nagios/archives 2>/dev/null || true
-@unexec rmdir %D/var/nagios/rw 2>/dev/null || true
-@unexec rmdir %D/var/nagios 2>/dev/null || true
-@unexec rmdir %D/var 2>/dev/null || true
+@unexec rmdir /var/spool/nagios/archives 2>/dev/null || true
+@unexec rmdir /var/spool/nagios/rw 2>/dev/null || true
+@unexec rmdir /var/spool/nagios 2>/dev/null || true
diff -urN nagios.old/scripts/checkps nagios/scripts/checkps
--- nagios.old/scripts/checkps	Wed May 29 08:53:40 2002
+++ nagios/scripts/checkps	Thu Jan  1 01:00:00 1970
@@ -1,10 +0,0 @@
-#!/bin/sh
-/bin/ps 999999 2>&1 >/dev/null
-if [ $? = 0 ]; then
-	echo "You need to upgrade to RELENG_3, RELENG_4, or HEAD sometime"
-	echo "after July 8, 2000 around 5:15AM UTC, so that ps(1) will"
-	echo "return an error code if a PID does not exist.  Nagios needs this!"
-	exit
-else
-	echo "Great, you have a working ps(1)!  Nagios can build."
-fi
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030306231108.22B6755412>