Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jul 2008 04:44:57 GMT
From:      "Philip M. Gollucci" <pgollucci@p6m7g8.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        osvaldsson@icelandic.net
Subject:   ports/125625: [PATCH] dns/nsd: USE_RC_SUBR != yes
Message-ID:  <200807150444.m6F4iv7T005950@riderwayinc.com>
Resent-Message-ID: <200807150450.m6F4o1sW009641@freefall.freebsd.org>

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

>Number:         125625
>Category:       ports
>Synopsis:       [PATCH] dns/nsd: USE_RC_SUBR != yes
>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 Jul 15 04:50:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Philip M. Gollucci
>Release:        FreeBSD 7.0-RELEASE amd64
>Organization:
Riderway Inc.
>Environment:
System: FreeBSD riderwayinc.com 7.0-RELEASE FreeBSD 7.0-RELEASE #2: Thu Feb 28 21:20:48 UTC 2008
>Description:
- Respect NO_INSTALL_MANPAGES
- Respect NOPORTDOCS
- repocopy [files/nsd.sh.tmp -> files/nsd.in]
  itectu@: no more .sh
  dougb@: move load_config above variables checks
- Bump PORTREVISION

Added file(s):
- files/nsd.in

Removed file(s):
- files/nsd.sh.tmpl

Port maintainer (osvaldsson@icelandic.net) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- nsd-3.0.7_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/dns/nsd/Makefile,v
retrieving revision 1.37
diff -u -u -r1.37 Makefile
--- Makefile	14 Dec 2007 19:08:50 -0000	1.37
+++ Makefile	15 Jul 2008 04:41:33 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	nsd
 PORTVERSION=	3.0.7
+PORTREVISION=	1
 CATEGORIES=	dns ipv6
 MASTER_SITES=	http://www.nlnetlabs.nl/downloads/nsd/	\
 		ftp://ftp.rhnet.is/pub/nsd/
@@ -16,7 +17,7 @@
 
 CONFLICTS=	nsd-[0-2]*
 
-USE_RC_SUBR=	yes
+USE_RC_SUBR=	nsd
 
 NSDUSER?=	bind
 NSDDIR?=	${PREFIX}/etc/nsd
@@ -30,19 +31,20 @@
 		--with-libwrap
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 
-SED_SCRIPT=	-e 's,%%NSDUSER%%,${NSDUSER},g' \
-		-e 's,%%NSDDIR%%,${NSDDIR},g' \
-		-e 's,%%PREFIX%%,${PREFIX},g' \
-		-e 's,%%RC_SUBR%%,${RC_SUBR},g'
+PLIST_SUB+=	PREFIX=${PREFIX}
 
+.if !defined(NO_INSTALL_MANPAGES)
 MAN5=	nsd.conf.5
 MAN8=	nsd.8 nsdc.8 zonec.8 nsd-checkconf.8 nsd-notify.8 nsd-patch.8 \
 	nsd-xfer.8
+.endif
 
+.if !defined (NOPORTDOCS)
 PORTDOCS=	CREDITS ChangeLog LICENSE NSD-DATABASE NSD-DIFFFILE \
 		NSD-FOR-BIND-USERS README README.icc RELNOTES \
 		REQUIREMENTS TESTPLAN TODO UPGRADING coding-style \
 		differences.tex
+.endif
 
 OPTIONS=	ROOT_SERVER	"Configure NSD as a root server" Off \
 		LARGEFILE	"Enable support for large files" On \
@@ -52,8 +54,7 @@
 		CHECKING	"Enable internal runtime checks" Off \
 		TSIG		"Enable TSIG support" On \
 		NSEC3		"Enable NSEC3 support" Off \
-		NSID		"Enable NSID support" Off \
-		DOCFILES	"Enable PORTDOCS" On
+		NSID		"Enable NSID support" Off
 
 .include <bsd.port.pre.mk>
 
@@ -109,11 +110,9 @@
 .endif
 
 post-install:
-	${SED} ${SED_SCRIPT} < ${FILESDIR}/nsd.sh.tmpl >${WRKDIR}/nsd.sh
 	${INSTALL_DATA} ${WRKSRC}/nsd.conf.sample \
 		${NSDDIR}/nsd.conf.sample
-	${INSTALL_SCRIPT} ${WRKDIR}/nsd.sh ${PREFIX}/etc/rc.d/
-.if !defined(WITHOUT_DOCFILES)
+.if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 .for f in ${PORTDOCS}
 	${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR}/${f}
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/dns/nsd/pkg-plist,v
retrieving revision 1.5
diff -u -u -r1.5 pkg-plist
--- pkg-plist	12 Sep 2006 20:17:15 -0000	1.5
+++ pkg-plist	15 Jul 2008 04:41:33 -0000
@@ -1,5 +1,4 @@
 @comment $FreeBSD: ports/dns/nsd/pkg-plist,v 1.5 2006/09/12 20:17:15 miwi Exp $
-etc/rc.d/nsd.sh
 etc/nsd/nsd.conf.sample
 sbin/nsd
 sbin/zonec
Index: files/nsd.in
===================================================================
RCS file: files/nsd.in
diff -N files/nsd.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/nsd.in	15 Jul 2008 04:41:33 -0000
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/dns/nsd/files/nsd.sh.tmpl,v 1.3 2006/09/23 08:07:48 rafan Exp $
+#
+# PROVIDE: nsd
+# REQUIRE: DAEMON
+#
+# Add the following line to /etc/rc.conf to enable nsd:
+#
+# nsd_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=nsd
+rcvar=`set_rcvar`
+
+prefix=%%PREFIX%%
+
+required_files=%%NSDDIR%%/nsd.conf
+
+command=/usr/local/sbin/${name}
+pidfile=/var/run/${name}.pid
+
+load_rc_config ${name}
+
+nsd_enable=${nsd_enable:-"NO"}
+nsd_flags=${nsd_flags:-""}
+
+run_rc_command "$1"
+
Index: files/nsd.sh.tmpl
===================================================================
RCS file: files/nsd.sh.tmpl
diff -N files/nsd.sh.tmpl
--- files/nsd.sh.tmpl	23 Sep 2006 08:07:48 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/dns/nsd/files/nsd.sh.tmpl,v 1.3 2006/09/23 08:07:48 rafan Exp $
-#
-# PROVIDE: nsd
-# REQUIRE: DAEMON
-#
-# Add the following line to /etc/rc.conf to enable nsd:
-#
-# nsd_enable="YES"
-#
-
-. %%RC_SUBR%%
-
-name=nsd
-rcvar=`set_rcvar`
-
-prefix=%%PREFIX%%
-
-required_files=%%NSDDIR%%/nsd.conf
-
-command=/usr/local/sbin/${name}
-pidfile=/var/run/${name}.pid
-
-# set defaults
-
-nsd_enable=${nsd_enable:-"NO"}
-nsd_flags=${nsd_flags:-""}
-
-load_rc_config ${name}
-run_rc_command "$1"
-
--- nsd-3.0.7_1.patch ends here ---

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



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