From rebum@mail.vx.sk  Sun Apr 30 15:58:40 2006
Return-Path: <rebum@mail.vx.sk>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 589ED16A400
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 30 Apr 2006 15:58:40 +0000 (UTC)
	(envelope-from rebum@mail.vx.sk)
Received: from mail.vx.sk (de.vx.sk [217.20.112.111])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E104143D48
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 30 Apr 2006 15:58:39 +0000 (GMT)
	(envelope-from rebum@mail.vx.sk)
Received: from localhost (localhost [127.0.0.1])
	by mail.vx.sk (Postfix) with ESMTP id 9D40722A8E
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 30 Apr 2006 17:58:37 +0200 (CEST)
Received: from mail.vx.sk ([127.0.0.1])
	by localhost (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id sx4QXjbJPrYw for <FreeBSD-gnats-submit@freebsd.org>;
	Sun, 30 Apr 2006 17:58:36 +0200 (CEST)
Received: by mail.vx.sk (Postfix, from userid 1001)
	id A212322A88; Sun, 30 Apr 2006 17:58:36 +0200 (CEST)
Message-Id: <20060430155836.A212322A88@mail.vx.sk>
Date: Sun, 30 Apr 2006 17:58:36 +0200 (CEST)
From: Martin Matuska <martin@matuska.org>
Reply-To: Martin Matuska <martin@matuska.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [UPDATE] net-mgmt/nsca from 2.4 to 2.6
X-Send-Pr-Version: 3.113
X-GNATS-Notify: paul@nerdlabs.com

>Number:         96555
>Category:       ports
>Synopsis:       [UPDATE] net-mgmt/nsca from 2.4 to 2.6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lawrance
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 30 16:00:33 GMT 2006
>Closed-Date:    Thu Sep 14 12:41:58 GMT 2006
>Last-Modified:  Thu Sep 14 12:50:23 GMT 2006
>Originator:     Martin Matuska
>Release:        FreeBSD 6.0-RELEASE
>Organization:
>Environment:
FreeBSD 6.0-RELEASE i386 amd64
>Description:
Supersedes ports/95822
Update of net-mgmt/nsca from 2.4 to 2.6
Change into a master port
CLIENT PORT: net-mgmt/nsca-client
Install into ${PREFIX}/sbin instead of nagios plugin dir
RCNG startup script
Corrected pkg-descr
>How-To-Repeat:
>Fix:
--- diff starts here ---

diff -Nbur nsca.orig/Makefile nsca/Makefile
--- nsca.orig/Makefile	Sat Apr 15 18:55:12 2006
+++ nsca/Makefile	Sun Apr 30 17:49:17 2006
@@ -6,35 +6,44 @@
 #
 
 PORTNAME=	nsca
-PORTVERSION=	2.4
+PORTVERSION=	2.6
 CATEGORIES=	net-mgmt
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	nagios
 
 MAINTAINER=	paul@nerdlabs.com
-COMMENT=	Nagios Service Check Acceptor
+.if !defined(CLIENT_ONLY)
+COMMENT=	Nagios Service Check Acceptor (server)
+.else
+COMMENT=	 Nagios Service Check Acceptor (client)
+.endif
 
+.if !defined(CLIENT_ONLY)
 RUN_DEPENDS=	nagios:${PORTSDIR}/net-mgmt/nagios
+.endif
 LIB_DEPENDS=	mcrypt.8:${PORTSDIR}/security/libmcrypt
 
 GNU_CONFIGURE=	yes
 USE_PERL5=	yes
 CONFIGURE_ARGS=	--prefix=${PREFIX} --localstatedir=/var/spool/nagios
 
-NAGIOS_DIR=	${LOCALBASE}/libexec/nagios
-CONF_DIR=	${LOCALBASE}/etc/nagios
+.if !defined(CLIENT_ONLY)
+USE_RC_SUBR=	nsca.sh
+.endif
 
 DOCS=		Changelog LEGAL README SECURITY
 
-# NOTE: this port installs into ${LOCALBASE} instead of ${PREFIX}
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/src/nsca ${NAGIOS_DIR}
-	${INSTALL_PROGRAM} ${WRKSRC}/src/send_nsca ${NAGIOS_DIR}
-	${INSTALL_DATA} ${WRKSRC}/nsca.cfg ${CONF_DIR}/nsca.cfg.sample
-	${INSTALL_DATA} ${WRKSRC}/send_nsca.cfg ${CONF_DIR}/send_nsca.cfg.sample
+.if defined(CLIENT_ONLY)
+	${INSTALL_PROGRAM} ${WRKSRC}/src/send_nsca ${PREFIX}/sbin/send_nsca
+	${INSTALL_DATA} ${WRKSRC}/sample-config/send_nsca.cfg ${PREFIX}/etc/send_nsca.cfg-sample
+.else
+	${INSTALL_PROGRAM} ${WRKSRC}/src/nsca ${PREFIX}/sbin/nsca
+	${INSTALL_DATA} ${WRKSRC}/sample-config/nsca.cfg ${PREFIX}/etc/nsca.cfg-sample
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
+.endif
 .endif
 
 .include <bsd.port.mk>
diff -Nbur nsca.orig/distinfo nsca/distinfo
--- nsca.orig/distinfo	Sat Apr 15 18:55:12 2006
+++ nsca/distinfo	Sat Apr 15 19:27:02 2006
@@ -1,3 +1,3 @@
-MD5 (nsca-2.4.tar.gz) = ab58553a87940f574ec54189a43a70bc
-SHA256 (nsca-2.4.tar.gz) = bba0d2c3582086c8d77ef2c7921b571d1a657eedee3bed8af4f59b3fdb3f8866
-SIZE (nsca-2.4.tar.gz) = 54788
+MD5 (nsca-2.6.tar.gz) = d526a3ac3c29648c729c5fb4fb332488
+SHA256 (nsca-2.6.tar.gz) = 6b12781537e5301bf2c902e9fa9961cb95f624856f3d89d72416d3cca734e05a
+SIZE (nsca-2.6.tar.gz) = 101341
diff -Nbur nsca.orig/files/nsca.sh.in nsca/files/nsca.sh.in
--- nsca.orig/files/nsca.sh.in	Thu Jan  1 01:00:00 1970
+++ nsca/files/nsca.sh.in	Sat Apr 15 19:18:08 2006
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: nsca
+# REQUIRE: NETWORKING
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable nrpe2:
+#
+#nsca_enable="YES"
+#
+#
+
+. %%RC_SUBR%%
+
+name=nsca
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/sbin/nsca"
+required_files=%%PREFIX%%/etc/nsca.cfg
+command_args="-c ${required_files}"
+pidfile=/var/run/${name}.pid
+
+# set defaults
+
+nsca_enable=${nsca_enable:-"NO"}
+nsca_flags=${nsca_flags:-""}
+
+load_rc_config ${name}
+run_rc_command "$1"
diff -Nbur nsca.orig/pkg-descr nsca/pkg-descr
--- nsca.orig/pkg-descr	Sat Apr 15 18:55:12 2006
+++ nsca/pkg-descr	Sun Apr 30 17:39:03 2006
@@ -1,7 +1,7 @@
 The Nagios Service Check Acceptor (NSCA) is used to send service check
 results to a central Nagios server. This consists of the "nsca" daemon
 which runs on the main Nagios server and accepts results and the 
-"check_nsca" plugin which is used to send results to the server.
+"send_nsca" client which is used to send results to the server.
 
 Author:	Ethan Galstad
 WWW:	http://www.nagios.org/
diff -Nbur nsca.orig/pkg-plist nsca/pkg-plist
--- nsca.orig/pkg-plist	Sat Apr 15 18:55:12 2006
+++ nsca/pkg-plist	Sun Apr 30 17:42:53 2006
@@ -4,9 +4,5 @@
 %%PORTDOCS%%%%DOCSDIR%%/README
 %%PORTDOCS%%%%DOCSDIR%%/SECURITY
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
-@comment This port installs into LOCALBASE as opposed to PREFIX
-@cwd %%LOCALBASE%%
-etc/nagios/nsca.cfg.sample
-etc/nagios/send_nsca.cfg.sample
-libexec/nagios/nsca
-libexec/nagios/send_nsca
+etc/nsca.cfg-sample
+sbin/nsca
diff -Nbur nsca.orig/pkg-plist.client nsca/pkg-plist.client
--- nsca.orig/pkg-plist.client	Thu Jan  1 01:00:00 1970
+++ nsca/pkg-plist.client	Sun Apr 30 17:42:59 2006
@@ -0,0 +1,3 @@
+@comment $FreeBSD$
+etc/send_nsca.cfg-sample
+sbin/send_nsca

--- diff ends here ---
--- shar starts here ---

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	nsca-client
#	nsca-client/Makefile
#
echo c - nsca-client
mkdir -p nsca-client > /dev/null 2>&1
echo x - nsca-client/Makefile
sed 's/^X//' >nsca-client/Makefile << 'END-of-nsca-client/Makefile'
X# New ports collection makefile for:    nsca-client
X# Date created:         Sun Apr 30 17:23:00 CET 2006
X# Whom:                 Martin Matuska <martin@matuska.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	nsca
XPKGNAMESUFFIX=	-client
X
XMASTERDIR=	${.CURDIR}/../nsca
X
XPLIST=		${PKGDIR}/pkg-plist.client
X
XCLIENT_ONLY=	yes
X
X.include "${MASTERDIR}/Makefile"
END-of-nsca-client/Makefile
exit

--- shar ends here ---
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun Apr 30 16:04:10 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96555 

From: Paul Dlug <paul@nerdlabs.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/96555: [UPDATE] net-mgmt/nsca from 2.4 to 2.6
Date: Sun, 30 Apr 2006 12:37:29 -0400

 On Apr 30, 2006, at 12:04 PM, Edwin Groothuis wrote:
 
 > Maintainer of net-mgmt/nsca,
 >
 > Please note that PR ports/96555 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 
 Yes I approve this patch, it may be committed,thanks.

From: Martin Matuska <martin@matuska.org>
To: bug-followup@FreeBSD.org,  martin@matuska.org
Cc:  
Subject: Re: ports/96555: [UPDATE] net-mgmt/nsca from 2.4 to 2.6
Date: Mon, 01 May 2006 00:15:50 +0200

 Correctures for nsca.sh.in
 
 command_args="--daemon"
 nsca_flags=${nsca_flags:-"-c ${required_files}"}
 
 This makes config file changeable from rc.conf +
 daemon does not listen properly without "--daemon"
State-Changed-From-To: feedback->open 
State-Changed-By: lawrance 
State-Changed-When: Mon May 15 08:51:34 UTC 2006 
State-Changed-Why:  
Maintainer approved. 


Responsible-Changed-From-To: freebsd-ports-bugs->lawrance 
Responsible-Changed-By: lawrance 
Responsible-Changed-When: Mon May 15 08:51:34 UTC 2006 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96555 
State-Changed-From-To: open->feedback 
State-Changed-By: lawrance 
State-Changed-When: Mon May 15 11:03:05 UTC 2006 
State-Changed-Why:  
Any chance you are interested in reworking this a little 
to provide a knob each for server and client? 

eg. WITHOUT_SERVER and WITHOUT_CLIENT? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96555 
State-Changed-From-To: feedback->open 
State-Changed-By: lawrance 
State-Changed-When: Sun Jul 9 06:43:10 UTC 2006 
State-Changed-Why:  
Feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96555 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/96555: commit references a PR
Date: Thu, 14 Sep 2006 12:27:54 +0000 (UTC)

 lawrance    2006-09-14 12:27:47 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net-mgmt/nsca        Makefile distinfo pkg-descr pkg-plist 
   Added files:
     net-mgmt/nsca/files  nsca.sh.in 
   Log:
   Update to 2.6 [1] and add an rc script [2].
   
   PR:             ports/96555 [1], ports/94259 [2].
   Submitted by:   Martin Matuska <martin@matuska.org> [1],
                   Jo Rhett <jrhett@svcolo.com> [2]
   
   Revision  Changes    Path
   1.7       +23 -8     ports/net-mgmt/nsca/Makefile
   1.4       +3 -3      ports/net-mgmt/nsca/distinfo
   1.1       +29 -0     ports/net-mgmt/nsca/files/nsca.sh.in (new)
   1.2       +1 -1      ports/net-mgmt/nsca/pkg-descr
   1.2       +5 -7      ports/net-mgmt/nsca/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: lawrance 
State-Changed-When: Thu Sep 14 12:41:18 UTC 2006 
State-Changed-Why:  
Port updated with minor changes, and slave port added.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96555 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/96555: commit references a PR
Date: Thu, 14 Sep 2006 12:40:47 +0000 (UTC)

 lawrance    2006-09-14 12:40:39 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net-mgmt             Makefile 
   Added files:
     net-mgmt/nsca-client Makefile 
   Log:
   Add nsca-client, a slave port for nsca without the server bits.
   
   PR:             ports/96555
   Submitted by:   Martin Matuska <martin at matuska.org>
   
   Revision  Changes    Path
   1.85      +1 -0      ports/net-mgmt/Makefile
   1.1       +15 -0     ports/net-mgmt/nsca-client/Makefile (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
