ports/107175: [UPDATE] net-mgmt/nrpe2 upgrade to 2.6

Dan Langille dan at langille.org
Sun Dec 24 22:00:27 UTC 2006


>Number:         107175
>Category:       ports
>Synopsis:       [UPDATE] net-mgmt/nrpe2 upgrade to 2.6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 24 22:00:19 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Dan Langille
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
The FreeBSD Diary
>Environment:
System: FreeBSD xeon.unixathome.org 4.9-STABLE FreeBSD 4.9-STABLE #2: Wed Mar 3 08:16:24 EST 2004 dan at polo.unixathome.org:/usr/obj/usr/src/sys/XEON i386


	
>Description:
	
Take maintainership
Make sure the nagios user/group is added with the port, not just the package.
When removing the port, mention how to remove the nagios user/group
Upgrade to 2.6

>How-To-Repeat:
	
>Fix:

	



--- nrpe2.diff begins here ---
diff -ruN /usr/ports/net-mgmt/nrpe2/Makefile nrpe2/Makefile
--- /usr/ports/net-mgmt/nrpe2/Makefile	Wed Sep  6 05:17:21 2006
+++ nrpe2/Makefile	Sun Dec 24 16:10:12 2006
@@ -6,13 +6,13 @@
 #
 
 PORTNAME=	nrpe2
-PORTVERSION=	2.5.1
+PORTVERSION=	2.6
 CATEGORIES=	net-mgmt
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	nagios
 DISTNAME=	nrpe-${PORTVERSION}
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	dan at langille.org
 COMMENT=	Nagios Remote Plugin Executor
 
 RUN_DEPENDS=	${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
@@ -21,6 +21,7 @@
 USE_PERL5_BUILD=	yes
 
 USE_RC_SUBR=	nrpe2.sh
+SUB_FILES=	pkg-message
 
 PLIST_FILES=	sbin/nrpe2 etc/nrpe.cfg-sample libexec/nagios/check_nrpe2
 
@@ -47,11 +48,20 @@
 	@${REINPLACE_CMD} -e 's|nrpe.pid|nrpe2.pid|g' \
 		${WRKSRC}/sample-config/nrpe.cfg
 
+pre-install:
+	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe2
 	${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe \
 		${PREFIX}/libexec/nagios/check_nrpe2
 	${INSTALL_DATA} ${WRKSRC}/sample-config/nrpe.cfg \
 		${PREFIX}/etc/nrpe.cfg-sample
+
+post-install:
+	${CAT} ${PKGMESSAGE}
+
+post-deinstall:
+	PKG_PREFIX=${PREFIX} ${SH} ${PKGDEINSTALL} ${PKGNAME} DEINSTALL
 
 .include <bsd.port.post.mk>
diff -ruN /usr/ports/net-mgmt/nrpe2/distinfo nrpe2/distinfo
--- /usr/ports/net-mgmt/nrpe2/distinfo	Sun Apr 30 05:18:48 2006
+++ nrpe2/distinfo	Sun Dec 24 16:19:08 2006
@@ -1,3 +1,3 @@
-MD5 (nrpe-2.5.1.tar.gz) = e083553deaf47a79fd23906d823afc59
-SHA256 (nrpe-2.5.1.tar.gz) = a23a0a37d81900d03884898bd0ae9b9da95348cc4a08695a4c229337c83fbe5e
-SIZE (nrpe-2.5.1.tar.gz) = 100382
+MD5 (nrpe-2.6.tar.gz) = 5df3fae4682fa6b8b393568fd9f3c88d
+SHA256 (nrpe-2.6.tar.gz) = 7bded6c501434f4d42b73e309c7be298359988ff72b593ed7d35a5aca47ad637
+SIZE (nrpe-2.6.tar.gz) = 101714
diff -ruN /usr/ports/net-mgmt/nrpe2/files/pkg-message.in nrpe2/files/pkg-message.in
--- /usr/ports/net-mgmt/nrpe2/files/pkg-message.in	Wed Dec 31 19:00:00 1969
+++ nrpe2/files/pkg-message.in	Sun Dec 24 16:08:17 2006
@@ -0,0 +1,5 @@
+*************************************************************************
+Available variables you add/set to /etc/rc.conf:
+- nrpe_enable (bool):	Set to "NO" by default
+- nrpe_config (string):	Set to %%PREFIX%%/etc/nrpe.cfg by default
+*************************************************************************
diff -ruN /usr/ports/net-mgmt/nrpe2/pkg-deinstall nrpe2/pkg-deinstall
--- /usr/ports/net-mgmt/nrpe2/pkg-deinstall	Wed Dec 31 19:00:00 1969
+++ nrpe2/pkg-deinstall	Sun Dec 24 16:08:08 2006
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/usr/sbin
+TMPFILE=/tmp/services-$RANDOM-$$
+
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+case "$2" in
+"DEINSTALL")
+	# Note how to delete UID/GID
+	USER=nagios
+	GROUP=nagios
+	if pw usershow "${USER}" 2>/dev/null 1>&2; then
+	    echo "To delete nagios user  permanently, use 'pw userdel  ${USER}'"
+	    echo "To delete nagios group permanently, use 'pw groupdel ${GROUP}'"
+	fi
+	;;
+esac
--- nrpe2.diff ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list