Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Mar 2014 01:26:21 GMT
From:      Ryan Steinmetz <zi@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/187239: [patch] dns/unbound to add STAGE support + misc improvements
Message-ID:  <201403040126.s241QL0d045015@cgiserv.freebsd.org>
Resent-Message-ID: <201403040130.s241U0tm092792@freefall.freebsd.org>

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

>Number:         187239
>Category:       ports
>Synopsis:       [patch] dns/unbound to add STAGE support + misc improvements
>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 Mar 04 01:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Ryan Steinmetz
>Release:        
>Organization:
>Environment:
>Description:
- Add STAGE support
- Fix build with custom LOCALBASE/PREFIX
- Add ability to specify flags to unbound-anchor via unbound_anchorflags in rc.conf (useful for when /etc/resolv.conf only contains 127.0.0.1)
- Bump PORTREVISION
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 346975)
+++ Makefile	(working copy)
@@ -3,7 +3,7 @@
 
 PORTNAME=	unbound
 PORTVERSION=	1.4.21
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	dns
 MASTER_SITES=	http://unbound.net/downloads/
 
@@ -16,7 +16,7 @@
 USE_GMAKE=	yes
 USE_OPENSSL=	yes
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS+=--with-ssl=${OPENSSLBASE}
+CONFIGURE_ARGS+=--with-ssl=${OPENSSLBASE} --with-libexpat=${LOCALBASE}
 USE_LDCONFIG=	yes
 
 USERS=		${PORTNAME}
@@ -24,20 +24,6 @@
 
 USE_RC_SUBR=	unbound
 
-MAN1=		unbound-host.1
-MAN3=		libunbound.3 ub_cancel.3 ub_ctx.3 ub_ctx_add_ta.3 \
-		ub_ctx_add_ta_file.3 ub_ctx_async.3 ub_ctx_config.3 \
-		ub_ctx_create.3 ub_ctx_data_add.3 ub_ctx_data_remove.3 \
-		ub_ctx_debuglevel.3 ub_ctx_debugout.3 ub_ctx_delete.3 \
-		ub_ctx_get_option.3 ub_ctx_hosts.3 ub_ctx_print_local_zones.3 \
-		ub_ctx_resolvconf.3 ub_ctx_set_fwd.3 ub_ctx_set_option.3 \
-		ub_ctx_trustedkeys.3 ub_ctx_zone_add.3 ub_ctx_zone_remove.3 \
-		ub_fd.3 ub_poll.3 ub_process.3 ub_resolve.3 ub_resolve_async.3 \
-		ub_resolve_free.3 ub_result.3 ub_strerror.3 ub_wait.3
-MAN5=		unbound.conf.5
-MAN8=		unbound.8 unbound-anchor.8 unbound-control.8 \
-		unbound-checkconf.8 unbound-control-setup.8
-
 PORTDOCS=	CREDITS Changelog FEATURES LICENSE README README.svn \
 		README.tests TODO control_proto_spec.txt ietf67-design-02.odp \
 		ietf67-design-02.pdf requirements.txt
@@ -56,7 +42,6 @@
 ECDSA_DESC=	Enable ECDSA (elliptic curve) support (OpenSSL >= 1.0)
 MUNIN_DESC=	Install Munin plugin
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 LIB_DEPENDS+=	expat:${PORTSDIR}/textproc/expat2 \
@@ -119,13 +104,13 @@
 
 post-install:
 .if ${PORT_OPTIONS:MMUNIN}
-	@${MKDIR} ${PREFIX}/share/munin/plugins
-	@${MKDIR} ${PREFIX}/etc/munin/plugins
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/munin/plugins
+	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/munin/plugins
 	@${INSTALL_SCRIPT} ${WRKDIR}/unbound-${PORTVERSION}/contrib/unbound_munin_\
-		${PREFIX}/share/munin/plugins/
+		${STAGEDIR}${PREFIX}/share/munin/plugins/
 	@for i in ${MUNIN_ALL}; do\
 		${LN} -fs ${PREFIX}/share/munin/plugins/unbound_munin_\
-			${PREFIX}/etc/munin/plugins/unbound_munin_$$i ;\
+			${STAGEDIR}${PREFIX}/etc/munin/plugins/unbound_munin_$$i ;\
 	done
 	@${ECHO_MSG}
 	@${ECHO_MSG} "============================================================="
@@ -133,9 +118,9 @@
 	@${ECHO_MSG} "============================================================="
 .endif
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}; \
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}; \
 	for f in ${PORTDOCS}; do \
-		cd ${WRKSRC}/doc && ${INSTALL_DATA} $${f} ${DOCSDIR}/; \
+		cd ${WRKSRC}/doc && ${INSTALL_DATA} $${f} ${STAGEDIR}${DOCSDIR}/; \
 	done
 .endif
 
Index: files/unbound.in
===================================================================
--- files/unbound.in	(revision 346975)
+++ files/unbound.in	(working copy)
@@ -7,6 +7,9 @@
 # copy this to /etc/rc.d/unbound
 # and put unbound_enable="YES" into rc.conf
 #
+# unbound_anchorflags can be used to allow you to pass a custom flags to
+# unbound-anchor.  Examples include a custom resolv.conf (-f) or a custom
+# root.hints (-r).  Useful for when /etc/resolv.conf only contains 127.0.0.1
 
 # PROVIDE: unbound
 # REQUIRE: SERVERS cleanvar
@@ -26,12 +29,13 @@
 
 pidfile=${unbound_pidfile:-"%%PREFIX%%/etc/unbound/unbound.pid"}
 unbound_enable=${unbound_enable:-"NO"}
+unbound_anchorflags=${unbound_anchorflags:-""}
 
 start_precmd()
 {
 	%%PREFIX%%/sbin/unbound-checkconf > /dev/null && \
 	echo -n "Obtaining a trust anchor:" && \
-	su -m unbound -c %%PREFIX%%/sbin/unbound-anchor && \
+	su -m unbound -c %%PREFIX%%/sbin/unbound-anchor ${unbound_anchorflags} && \
 	echo .
 }
 
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 346975)
+++ pkg-plist	(working copy)
@@ -4,6 +4,44 @@
 lib/libunbound.so
 lib/libunbound.la
 lib/libunbound.a
+man/man1/unbound-host.1.gz
+man/man3/libunbound.3.gz
+man/man3/ub_cancel.3.gz
+man/man3/ub_ctx.3.gz
+man/man3/ub_ctx_add_ta.3.gz
+man/man3/ub_ctx_add_ta_file.3.gz
+man/man3/ub_ctx_async.3.gz
+man/man3/ub_ctx_config.3.gz
+man/man3/ub_ctx_create.3.gz
+man/man3/ub_ctx_data_add.3.gz
+man/man3/ub_ctx_data_remove.3.gz
+man/man3/ub_ctx_debuglevel.3.gz
+man/man3/ub_ctx_debugout.3.gz
+man/man3/ub_ctx_delete.3.gz
+man/man3/ub_ctx_get_option.3.gz
+man/man3/ub_ctx_hosts.3.gz
+man/man3/ub_ctx_print_local_zones.3.gz
+man/man3/ub_ctx_resolvconf.3.gz
+man/man3/ub_ctx_set_fwd.3.gz
+man/man3/ub_ctx_set_option.3.gz
+man/man3/ub_ctx_trustedkeys.3.gz
+man/man3/ub_ctx_zone_add.3.gz
+man/man3/ub_ctx_zone_remove.3.gz
+man/man3/ub_fd.3.gz
+man/man3/ub_poll.3.gz
+man/man3/ub_process.3.gz
+man/man3/ub_resolve.3.gz
+man/man3/ub_resolve_async.3.gz
+man/man3/ub_resolve_free.3.gz
+man/man3/ub_result.3.gz
+man/man3/ub_strerror.3.gz
+man/man3/ub_wait.3.gz
+man/man5/unbound.conf.5.gz
+man/man8/unbound-anchor.8.gz
+man/man8/unbound-checkconf.8.gz
+man/man8/unbound-control-setup.8.gz
+man/man8/unbound-control.8.gz
+man/man8/unbound.8.gz
 sbin/unbound
 sbin/unbound-anchor
 sbin/unbound-checkconf


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



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