Bug 172586 - [PATCH] dns/bind9[6789]: Add configure options and convert to OptionsNG
Summary: [PATCH] dns/bind9[6789]: Add configure options and convert to OptionsNG
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Erwin Lansing
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-10 23:58 UTC by Craig Leres
Modified: 2012-11-27 10:06 UTC (History)
1 user (show)

See Also:


Attachments
patch-bind96.txt (5.34 KB, patch)
2012-10-10 23:58 UTC, Craig Leres
no flags Details | Diff
patch-bind98.txt (5.56 KB, patch)
2012-10-10 23:58 UTC, Craig Leres
no flags Details | Diff
file.diff (5.36 KB, patch)
2012-10-10 23:58 UTC, Craig Leres
no flags Details | Diff
patch-bind97.txt (5.45 KB, patch)
2012-10-11 00:51 UTC, Craig Leres
no flags Details | Diff
patch-bind96.txt (975 bytes, patch)
2012-10-26 03:14 UTC, Craig Leres
no flags Details | Diff
patch-bind97.txt (1.20 KB, patch)
2012-10-26 03:14 UTC, Craig Leres
no flags Details | Diff
patch-bind98.txt (1.46 KB, patch)
2012-10-26 03:14 UTC, Craig Leres
no flags Details | Diff
patch-bind99.txt (1.19 KB, patch)
2012-10-26 03:14 UTC, Craig Leres
no flags Details | Diff
patch-bind96.txt (2.48 KB, patch)
2012-10-26 05:40 UTC, Craig Leres
no flags Details | Diff
patch-bind97.txt (2.99 KB, patch)
2012-10-26 05:40 UTC, Craig Leres
no flags Details | Diff
patch-bind98.txt (3.12 KB, patch)
2012-10-26 05:40 UTC, Craig Leres
no flags Details | Diff
patch-bind99.txt (2.67 KB, patch)
2012-10-26 05:40 UTC, Craig Leres
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer freebsd_triage 2012-10-10 23:58:33 UTC
	The bind ports are missing some configure options including
	--enable-fixed-rrset and --enable-rpz-nsdname. Upgrade to
	OptionsNG and update CONFLICTS while we're at it.

Fix: Please see attached patches


--- Makefile.orig	2012-10-10 12:11:45.000000000 -0700
+++ Makefile	2012-10-10 14:26:09.000000000 -0700
@@ -1,4 +1,4 @@
-# $FreeBSD: ports/dns/bind97/Makefile,v 1.30 2012/10/10 11:54:44 erwin Exp $
+# $FreeBSD$
 
 PORTNAME?=	bind97
 PORTVERSION=	9.7.6.4
@@ -23,112 +23,127 @@
 		--disable-symtable \
 		--with-randomdev=/dev/random
 
-CONFLICTS=	bind9*-9.[45689].* bind9-sdb-* host-*
+CONFLICTS=	bind9*-9.[45789].* bind9*-sdb-9.[45789].*
 
-OPTIONS+=	SSL "Building without OpenSSL removes DNSSEC" on \
-		IDN "Add IDN support to dig, host, etc." off \
-		REPLACE_BASE "Replace base BIND with this version" off \
-		LARGE_FILE "64-bit file support" off \
-		SIGCHASE "dig/host/nslookup will do DNSSEC validation" off \
-		IPV6 "IPv6 Support (autodetected by default)" off \
-		THREADS	"Compile with thread support" on
+.include <bsd.port.options.mk>
+
+OPTIONS_DEFINE= SSL IDN REPLACE_BASE LARGE_FILE SIGCHASE IPV6 THREADS
 .if !defined(BIND_TOOLS_SLAVE)
-OPTIONS+=	LINKS "Create conf file symlinks in ${PREFIX}" on \
-		XML "Support for xml statistics output" on \
-		DLZ_POSTGRESQL "DLZ Postgres driver" off \
-		DLZ_MYSQL "DLZ MySQL driver (single-threaded BIND)" off \
-		DLZ_BDB "DLZ BDB driver" off \
-		DLZ_LDAP "DLZ LDAP driver" off \
-		DLZ_FILESYSTEM "DLZ filesystem driver" off \
-		DLZ_STUB "DLZ stub driver" off
+OPTIONS_DEFINE+=LINKS XML FIXED_RRSET DLZ_POSTGRESQL DLZ_MYSQL \
+		DLZ_BDB DLZ_LDAP DLZ_FILESYSTEM DLZ_STUB
+
 CONFLICTS+=	bind-tools-9.*
 .endif
 
-# Just in case
-USE_OPENSSL=	yes
+OPTIONS_DEFAULT=THREADS
+.if !defined(BIND_TOOLS_SLAVE)
+OPTIONS_DEFAULT+=LINKS XML
+.endif
 
-.include <bsd.port.pre.mk>
+SSL_DESC=		Building without OpenSSL removes DNSSEC
+LINKS_DESC=		Create conf file symlinks in ${PREFIX}
+XML_DESC=		Support for xml statistics output
+IDN_DESC=		Add IDN support to dig, host, etc.
+REPLACE_BASE_DESC=	Replace base BIND with this version
+LARGE_FILE_DESC=	64-bit file support
+SIGCHASE_DESC=		dig/host/nslookup will do DNSSEC validation
+IPV6_DESC=		IPv6 Support (autodetected by default)
+THREADS_DESC=		Compile with thread support
+FIXED_RRSET_DESC=	Enable fixed rrset ordering
+DLZ_POSTGRESQL_DESC=	DLZ Postgres driver
+DLZ_MYSQL_DESC=		DLZ MySQL driver (single-threaded BIND)
+DLZ_BDB_DESC=		DLZ BDB driver
+DLZ_LDAP_DESC=		DLZ LDAP driver
+DLZ_FILESYSTEM_DESC=	DLZ filesystem driver
+DLZ_STUB_DESC=		DLZ stub driver
 
 .if (${ARCH} == "amd64")
 ARCH=		x86_64
 .endif
 
-.if !defined(WITHOUT_SSL)
+.if ${PORT_OPTIONS:MSSL}
 CONFIGURE_ARGS+=	--with-openssl=${OPENSSLBASE}
+USE_OPENSSL=	yes
 .else
 CONFIGURE_ARGS+=	--disable-openssl-version-check
 CONFIGURE_ARGS+=	--without-openssl
 .endif
 
-.if !defined(WITHOUT_XML) && !defined(BIND_TOOLS_SLAVE)
+.if ${PORT_OPTIONS:MXML} && !defined(BIND_TOOLS_SLAVE)
 CONFIGURE_ARGS+=	--with-libxml2=${LOCALBASE}
 LIB_DEPENDS+=		xml2.5:${PORTSDIR}/textproc/libxml2
 .else
 CONFIGURE_ARGS+=	--without-libxml2
 .endif
 
-.if defined(WITH_IDN)
+.if ${PORT_OPTIONS:MIDN}
 CONFIGURE_ARGS+=	--with-idn=${LOCALBASE} --with-libiconv=${LOCALBASE}
 LIB_DEPENDS+=		idnkit.1:${PORTSDIR}/dns/idnkit
 .else
 CONFIGURE_ARGS+=	--without-idn
 .endif
 
-.if !defined(WITHOUT_LINKS) && !defined(WITH_REPLACE_BASE)
+.if ${PORT_OPTIONS:MLINKS} && empty(PORT_OPTIONS:MREPLACE_BASE)
 PLIST_SUB+=	LINKS=""
 .else
 PLIST_SUB+=	LINKS="@comment "
 .endif
 
-.if defined(WITH_LARGE_FILE)
+.if ${PORT_OPTIONS:MLARGE_FILE}
 CONFIGURE_ARGS+=	--enable-largefile
 .endif
 
-.if defined(WITH_SIGCHASE)
+.if ${PORT_OPTIONS:MSIGCHASE}
 CONFIGURE_ARGS+=	STD_CDEFINES="-DDIG_SIGCHASE=1"
 .endif
 
-.if defined(WITH_IPV6)
+.if ${PORT_OPTIONS:MIPV6}
 CONFIGURE_ARGS+=	--enable-ipv6
 .endif
 
-.if defined(WITH_DLZ_POSTGRESQL)
+.if ${PORT_OPTIONS:MTHREADS}
+CONFIGURE_ARGS+=	--enable-threads
+.else
+CONFIGURE_ARGS+=	--disable-threads
+.endif
+
+.if ${PORT_OPTIONS:MFIXED_RRSET}
+CONFIGURE_ARGS+=	--enable-fixed-rrset
+.endif
+
+.if ${PORT_OPTIONS:MDLZ_POSTGRESQL}
 CONFIGURE_ARGS+=	--with-dlz-postgres=yes
 USE_PGSQL=		yes
 .endif
 
-.if defined(WITH_DLZ_MYSQL)
+.if ${PORT_OPTIONS:MDLZ_MYSQL}
 CONFIGURE_ARGS+=	--with-dlz-mysql=yes
 USE_MYSQL=		yes
-WITHOUT_THREADS=	yes
+.if ${PORT_OPTIONS:MTHREADS}
+	@${ECHO_CMD} "Incompatible options: DLZ_MYSQL and THREADS"
+	@${FALSE}
+.endif
 .endif
 
-.if defined(WITH_DLZ_BDB)
+.if ${PORT_OPTIONS:MDLZ_BDB}
 CONFIGURE_ARGS+=	--with-dlz-bdb=yes
 USE_BDB=		yes
 .endif
 
-.if defined(WITH_DLZ_LDAP)
+.if ${PORT_OPTIONS:MDLZ_LDAP}
 CONFIGURE_ARGS+=	--with-dlz-ldap=yes
 USE_OPENLDAP=		yes
 .endif
 
-.if defined(WITH_DLZ_FILESYSTEM)
+.if ${PORT_OPTIONS:MDLZ_FILESYSTEM}
 CONFIGURE_ARGS+=	--with-dlz-filesystem=yes
 .endif
 
-.if defined(WITH_DLZ_STUB)
+.if ${PORT_OPTIONS:MDLZ_STUB}
 CONFIGURE_ARGS+=	--with-dlz-stub=yes
 .endif
 
-# Has to be after the DLZ_MYSQL option
-.if !defined(WITHOUT_THREADS)
-CONFIGURE_ARGS+=	--enable-threads
-.else
-CONFIGURE_ARGS+=	--disable-threads
-.endif
-
-.if defined(WITH_REPLACE_BASE)
+.if ${PORT_OPTIONS:MREPLACE_BASE}
 PKGNAMESUFFIX=	-base
 PREFIX=		/usr
 BIND_DESTETC=	/etc/namedb
@@ -187,6 +202,8 @@
 verify:	checksum
 	gpg --verify ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}.asc
 
+.include <bsd.port.pre.mk>
+
 .if !defined(BIND_TOOLS_SLAVE)
 post-patch:
 .for FILE in check/named-checkconf.8 named/named.8 nsupdate/nsupdate.1 \
@@ -219,7 +236,7 @@
 	${CP} ${WRKSRC}/CHANGES ${WRKSRC}/COPYRIGHT ${WRKSRC}/FAQ* \
 	    ${WRKSRC}/README ${DOCSDIR}/
 .endif
-.if !defined(WITHOUT_LINKS) && !defined(WITH_REPLACE_BASE)
+.if ${PORT_OPTIONS:MLINKS} && empty(PORT_OPTIONS:MREPLACE_BASE)
 	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 .endif
 
--- patch-bind97.txt ends here ---
Comment 1 Craig Leres freebsd_committer freebsd_triage 2012-10-11 00:51:34 UTC
Why are PR attachments so problematic? I started with:

    send-pr -a /tmp/patch-bind96.txt -a /tmp/patch-bind97.txt -a \
        /tmp/patch-bind98.txt -a /tmp/patch-bind99.txt

but the second one came out inline and the last one is named "patch.txt"
instead of "patch-bind99.txt". This workflow rarely works correctly for me.

Here's an attempt to send patch-bind97.txt as a firefox attachment.

		Craig
Comment 2 Craig Leres freebsd_committer freebsd_triage 2012-10-26 03:14:40 UTC
Here's updated set of patches vs the current ports tree.

		Craig
Comment 3 Craig Leres freebsd_committer freebsd_triage 2012-10-26 05:40:22 UTC
D'oh; let's try this one more time with unified diffs.

		Craig
Comment 4 Erwin Lansing freebsd_committer freebsd_triage 2012-10-26 09:42:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->erwin

I'll take it.
Comment 5 Erwin Lansing freebsd_committer freebsd_triage 2012-11-27 10:05:36 UTC
State Changed
From-To: open->closed

Committed, thanks!  Sorry for the delay. 
Note that I had to adjust the conflicts regex as it only 
applied to 9.6, but had to have versions adjusted for the 
other ports.