Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Sep 2012 12:36:47 GMT
From:      Olli Hauer <ohauer@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/171539: [patch] net-mgmt/nrpe2 small fixes
Message-ID:  <201209111236.q8BCalS4021128@freefall.freebsd.org>
Resent-Message-ID: <201209111240.q8BCe4uU067939@freefall.freebsd.org>

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

>Number:         171539
>Category:       ports
>Synopsis:       [patch] net-mgmt/nrpe2 small fixes
>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:   Tue Sep 11 12:40:03 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Olli Hauer
>Release:        
>Organization:
>Environment:

>Description:
 - use bsd.port.options.mk and remove ugly hack to include bsd.openssl.mk

 - if SSL is enabled use additional the parameters 
   --with-ssl=, --with-ssl-inc= and --with-ssl-lib=

   this allows to build WITH_OPENSSL_BASE even openssl from ports is installed

 - remove unused NAGIOSUID, NAGIOSGID

 - replace the commands mkdir, chmod and chown in pkg-install
   with a single `install' command

>How-To-Repeat:
>Fix:


--- nrpe2.diff begins here ---
Index: files/pkg-install.in
===================================================================
--- files/pkg-install.in	(revision 304088)
+++ files/pkg-install.in	(working copy)
@@ -6,13 +6,9 @@
 NAGIOSDIR=%%NAGIOSDIR%%
 NAGIOSUSER=%%NAGIOSUSER%%
 NAGIOSGROUP=%%NAGIOSGROUP%%
-NAGIOSUID=%%NAGIOSUID%%
-NAGIOSGID=%%NAGIOSGID%%
 
 if [ "$2" = "POST-INSTALL" ]; then
   if [ ! -e "${NAGIOSDIR}" ]; then
-    /bin/mkdir -p "${NAGIOSDIR}"
-    /bin/chmod 775 "${NAGIOSDIR}"
-    /usr/sbin/chown "${NAGIOSUSER}":"${NAGIOSGROUP}" "${NAGIOSDIR}"
+    install -m 775 -o ${NAGIOSUSER} -g ${NAGIOSGROUP} -d ${NAGIOSDIR}
   fi
 fi
Index: Makefile
===================================================================
--- Makefile	(revision 304088)
+++ Makefile	(working copy)
@@ -27,6 +27,12 @@
 SSL_DESC=	Enable SSL support (disables plain-text server)
 ARGS_DESC=	Enable command argument processing **Security Risk**
 
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MSSL}
+USE_OPENSSL=	yes
+.endif
+
 GNU_CONFIGURE=	yes
 
 NAGIOSUSER?=	nagios
@@ -35,9 +41,6 @@
 USERS=		${NAGIOSUSER}
 GROUPS=		${NAGIOSGROUP}
 
-NAGIOSUID=	181
-NAGIOSGID=	${NAGIOSUID}
-
 CONFIGURE_ARGS=	--bindir=${PREFIX}/sbin \
 		--libexecdir=${PREFIX}/libexec/nagios \
 		--sysconfdir=${PREFIX}/etc \
@@ -47,9 +50,7 @@
 
 PLIST_SUB=	NAGIOSDIR=${NAGIOSDIR} \
 		NAGIOSUSER=${NAGIOSUSER} \
-		NAGIOSGROUP=${NAGIOSGROUP} \
-		NAGIOSUID=${NAGIOSUID} \
-		NAGIOSGID=${NAGIOSGID}
+		NAGIOSGROUP=${NAGIOSGROUP}
 
 SUB_FILES=	pkg-install \
 		pkg-deinstall \
@@ -61,8 +62,8 @@
 .include <bsd.port.pre.mk>
 
 .if ${PORT_OPTIONS:MSSL}
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
-CONFIGURE_ARGS+=	--enable-ssl
+CONFIGURE_ARGS+=	--enable-ssl --with-ssl=${OPENSSLDIR} \
+	--with-ssl-inc=${OPENSSLINC} --with-ssl-lib=${OPENSSLLIB}
 .else
 CONFIGURE_ARGS+=	--disable-ssl
 .endif
--- nrpe2.diff ends here ---


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



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