ports/76412: [MAINTAINER] dns/nsd: update to 2.2.0
Olafur Osvaldsson
oli at isnic.is
Wed Jan 19 13:12:25 UTC 2005
Edwin,
On Wed, 19 Jan 2005, Edwin Groothuis wrote:
> 5.8.2.3 Example
>
> OPTIONS= foo "Enable option foo" On \
> bar "Support feature bar" Off
>
> .include <bsd.port.pre.mk>
>
> .if defined(WITH_FOO)
> CONFIGURE_ARGS+= --with-foo
> .else
> CONFIGURE_ARGS+= --without-foo
> .endif
>
> .if defined(WITH_BAR)
> RUN_DEPENDS+= bar:${PORTSDIR}/bar/bar
> .endif
>
> .include <bsd.port.post.mk>
This example does not work, in OPTIONS foo is used but WITH_FOO
is checked below, this seems to be case sensetive and when I tried
it like in the example then it didn't work.
I've made a patch with the options you requested but I decided
to send you a fixed version of my previous patch as it was not
working due to lines being to long.
The reason I would rather like to use my previous method is that
it makes it possible for people to put the options in /etc/make.conf
If this is not acceptable the other method is attached in nsd-options.diff
/Oli
--
Olafur Osvaldsson
Systems Administrator
Internet a Islandi hf.
Tel: +354 525-5291
Email: oli at isnic.is
-------------- next part --------------
diff -ruN nsd.orig/Makefile nsd/Makefile
--- nsd.orig/Makefile Tue Jan 18 14:43:31 2005
+++ nsd/Makefile Wed Jan 19 12:54:09 2005
@@ -5,8 +5,15 @@
# $FreeBSD: ports/dns/nsd/Makefile,v 1.20 2004/11/30 12:58:19 sem Exp $
#
+# To pre-select options in batch mode, run make like this:
+#
+# make -DBATCH NSD_OPTIONS="ROOT_SERVER BIND8_STATS"
+#
+# the options are the same names as in the scripts/configure.nsd file.
+# NSD_OPTIONS can be set in /etc/make.conf also.
+
PORTNAME= nsd
-PORTVERSION= 2.1.5
+PORTVERSION= 2.2.0
CATEGORIES= dns ipv6
MASTER_SITES= http://www.nlnetlabs.nl/downloads/nsd/ \
ftp://ftp.rhnet.is/pub/nsd/
@@ -19,70 +26,41 @@
NSDUSER?= bind
NSDDIR?= ${PREFIX}/etc/nsd
NSDDBFILE?= /var/db/nsd.database
-NSDXFER?= /usr/libexec/named-xfer
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-user=${NSDUSER} \
--with-configdir=${NSDDIR} \
--with-pidfile=/var/run/nsd.pid \
--with-dbfile=${NSDDBFILE} \
- --with-namedxfer=${NSDXFER} \
--with-libwrap
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-.if defined(WITHOUT_IPV6)
-CONFIGURE_ARGS+= --disable-ipv6
-.endif
-
-.if defined(WITHOUT_AXFR)
-CONFIGURE_ARGS+= --disable-axfr
-.endif
-
-.if defined(WITH_PLUGINS)
-CONFIGURE_ARGS+= --enable-plugins
-.endif
-
-.if defined(WITH_BIND8_STATS)
-CONFIGURE_ARGS+= --enable-bind8-stats
-.endif
-
-.if defined(WITH_DNSSEC)
-CONFIGURE_ARGS+= --enable-dnssec
-.endif
-
-.if defined(WITH_ROOT_SERVER)
-CONFIGURE_ARGS+= --enable-root-server
-.endif
-
-.if defined(WITH_MMAP)
-CONFIGURE_ARGS+= --enable-mmap
-.endif
-
SED_SCRIPT= -e 's,%%NSDUSER%%,${NSDUSER},g' \
-e 's,%%NSDDIR%%,${NSDDIR},g' \
-e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%RC_SUBR%%,${RC_SUBR},g'
-MAN8= nsd.8 zonec.8 nsdc.8 nsd-notify.8
+MAN8= nsd.8 zonec.8 nsdc.8 nsd-notify.8 nsd-xfer.8
PORTDOCS= README RELNOTES CREDITS DIFFERENCES REQUIREMENTS
-pre-everything::
- @${ECHO_MSG} ""
- @${ECHO_MSG} "nsd has the following tunables:"
- @${ECHO_MSG} ""
- @${ECHO_MSG} " WITHOUT_IPV6 Disables IPv6 support"
- @${ECHO_MSG} " WITHOUT_AXFR Disables AXFR"
- @${ECHO_MSG} ""
- @${ECHO_MSG} " WITH_PLUGINS Enable plugin support"
- @${ECHO_MSG} " WITH_BIND8_STATS Enables BIND8 like NSTATS & XSTATS"
- @${ECHO_MSG} " WITH_DNSSEC Enable experimental DNSSEC support"
- @${ECHO_MSG} " according to the latest drafts"
- @${ECHO_MSG} " WITH_ROOT_SERVER Configure NSD as a root server"
- @${ECHO_MSG} " WITH_MMAP Configure NSD to load the database using mmap(2)"
- @${ECHO_MSG} ""
-
-pre-build:
+SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
+ TOUCH="${TOUCH}" \
+ MKDIR="${MKDIR}" \
+ NSD_OPTIONS="${NSD_OPTIONS}"
+
+pre-fetch:
+ @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.nsd
+
+.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
+.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
+.endif
+
+.if defined(NOPORTDOCS)
+READMEDIR=no
+.else
+READMEDIR=${PREFIX}/share/doc/nsd
+.endif
post-install:
${SED} ${SED_SCRIPT} < ${FILESDIR}/nsd.sh.tmpl >${WRKDIR}/nsd.sh
@@ -96,5 +74,8 @@
${PREFIX}/etc/nsd/nsd.zones.sample
${INSTALL_SCRIPT} ${WRKDIR}/nsd.sh ${PREFIX}/etc/rc.d/
@${CAT} ${PKGMESSAGE}
+
+post-clean:
+ @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
.include <bsd.port.mk>
diff -ruN nsd.orig/distinfo nsd/distinfo
--- nsd.orig/distinfo Tue Jan 18 14:43:31 2005
+++ nsd/distinfo Wed Jan 19 12:54:09 2005
@@ -1,2 +1,2 @@
-MD5 (nsd-2.1.5.tar.gz) = 24e81b2bb25f0663e153e174bb585f04
-SIZE (nsd-2.1.5.tar.gz) = 225543
+MD5 (nsd-2.2.0.tar.gz) = e84b8e9d03062710ea847ea146ccb5d5
+SIZE (nsd-2.2.0.tar.gz) = 230431
diff -ruN nsd.orig/pkg-plist nsd/pkg-plist
--- nsd.orig/pkg-plist Tue Jan 18 14:43:31 2005
+++ nsd/pkg-plist Wed Jan 19 12:54:09 2005
@@ -3,7 +3,8 @@
etc/nsd/nsd.zones.sample
etc/nsd/nsdc.conf.sample
sbin/nsd
-sbin/nsd-notify
-sbin/nsdc
sbin/zonec
+sbin/nsdc
+sbin/nsd-notify
+sbin/nsd-xfer
@dirrm etc/nsd
diff -ruN nsd.orig/scripts/configure.nsd nsd/scripts/configure.nsd
--- nsd.orig/scripts/configure.nsd Thu Jan 1 00:00:00 1970
+++ nsd/scripts/configure.nsd Wed Jan 19 12:54:25 2005
@@ -0,0 +1,86 @@
+#!/bin/sh
+# $FreeBSD$
+
+if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
+ exit
+fi
+
+tempfile=`mktemp -t checklist`
+
+if [ "${NSD_OPTIONS}" ]; then
+ set ${NSD_OPTIONS}
+fi
+
+for i; do
+ eval status_$i=ON
+done
+
+if [ -z "${BATCH}" ]; then
+ /usr/bin/dialog --title "NSD configuration options" --clear \
+ --checklist "\n\
+Please select desired options:" -1 -1 16 \
+ROOT_SERVER "Configure NSD as a root server" "$status_ROOT_SERVER" \
+NOIPv6 "Disable IPv6 support" "$status_NOIPv6" \
+DNSSEC "Enable experimental DNSSEC support" "$status_DNSSEC" \
+NOAXFR "Disable AXFR" "$status_NOAXFR" \
+BIND8_STATS "Enable BIND8 like NSTATS & XSTATS" "$status_BIND8_STATS" \
+PLUGINS "Enable plugin support" "$status_PLUGINS" \
+NOTSIG "Disable TSIG support" "$status_NOTSIG" \
+MMAP "Configure NSD to load the db using mmap(2)" "$status_MMAP" \
+2> $tempfile
+
+ retval=$?
+
+ if [ -s $tempfile ]; then
+ set `sed 's/"//g' $tempfile`
+ fi
+ rm -f $tempfile
+
+ case $retval in
+ 0) if [ -z "$*" ]; then
+ echo "Nothing selected"
+ fi
+ ;;
+ 1) echo "Cancel pressed."
+ exit 1
+ ;;
+ esac
+fi
+
+${MKDIR} ${WRKDIRPREFIX}${CURDIR}
+exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+
+while [ "$1" ]; do
+ case $1 in
+ ROOT_SERVER)
+ echo "CONFIGURE_ARGS+= --enable-root-server"
+ ;;
+ NOIPv6)
+ echo "CONFIGURE_ARGS+= --disable-ipv6"
+ ;;
+ DNSSEC)
+ echo "CONFIGURE_ARGS+= --enable-dnssec"
+ ;;
+ NOAXFR)
+ echo "CONFIGURE_ARGS+= --disable-axfr"
+ ;;
+ BIND8_STATS)
+ echo "CONFIGURE_ARGS+= --enable-bind8-stats"
+ ;;
+ PLUGINS)
+ echo "CONFIGURE_ARGS+= --enable-plugins"
+ ;;
+ NOTSIG)
+ echo "CONFIGURE_ARGS+= --disable-tsig"
+ ;;
+ MMAP)
+ echo "CONFIGURE_ARGS+= --enable-mmap"
+ ;;
+ *)
+ echo "Unknown option(s): $*" > /dev/stderr
+ rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+ exit 1
+ ;;
+ esac
+ shift
+done
-------------- next part --------------
diff -ruN nsd.orig/Makefile nsd/Makefile
--- nsd.orig/Makefile Tue Jan 18 14:43:31 2005
+++ nsd/Makefile Wed Jan 19 12:47:02 2005
@@ -6,7 +6,7 @@
#
PORTNAME= nsd
-PORTVERSION= 2.1.5
+PORTVERSION= 2.2.0
CATEGORIES= dns ipv6
MASTER_SITES= http://www.nlnetlabs.nl/downloads/nsd/ \
ftp://ftp.rhnet.is/pub/nsd/
@@ -14,44 +14,57 @@
MAINTAINER= oli at isnic.is
COMMENT= An authoritative only non-recursive name server
+OPTIONS= ROOT_SERVER "Configure NSD as a root server" Off \
+ IPV6 "Enable IPv6 support" On \
+ DNSSEC "Enable experimental DNSSEC support" Off \
+ AXFR "Enable AXFR" On \
+ BIND8_STATS "Enable BIND8 like NSTATS & XSTATS" Off \
+ PLUGINS "Enable plugin support" Off \
+ TSIG "Enable TSIG support" On \
+ MMAP "Configure NSD to load the db using mmap(2)" Off
+
+.include <bsd.port.pre.mk>
+
USE_RC_SUBR= yes
NSDUSER?= bind
NSDDIR?= ${PREFIX}/etc/nsd
NSDDBFILE?= /var/db/nsd.database
-NSDXFER?= /usr/libexec/named-xfer
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-user=${NSDUSER} \
--with-configdir=${NSDDIR} \
--with-pidfile=/var/run/nsd.pid \
--with-dbfile=${NSDDBFILE} \
- --with-namedxfer=${NSDXFER} \
--with-libwrap
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+.if defined(WITH_ROOT_SERVER)
+CONFIGURE_ARGS+= --enable-root-server
+.endif
+
.if defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --disable-ipv6
.endif
-.if defined(WITHOUT_AXFR)
-CONFIGURE_ARGS+= --disable-axfr
+.if defined(WITH_DNSSEC)
+CONFIGURE_ARGS+= --enable-dnssec
.endif
-.if defined(WITH_PLUGINS)
-CONFIGURE_ARGS+= --enable-plugins
+.if defined(WITHOUT_AXFR)
+CONFIGURE_ARGS+= --disable-axfr
.endif
.if defined(WITH_BIND8_STATS)
CONFIGURE_ARGS+= --enable-bind8-stats
.endif
-.if defined(WITH_DNSSEC)
-CONFIGURE_ARGS+= --enable-dnssec
+.if defined(WITH_PLUGINS)
+CONFIGURE_ARGS+= --enable-plugins
.endif
-.if defined(WITH_ROOT_SERVER)
-CONFIGURE_ARGS+= --enable-root-server
+.if defined(WITHOUT_TSIG)
+CONFIGURE_ARGS+= --disable-tsig
.endif
.if defined(WITH_MMAP)
@@ -63,23 +76,29 @@
-e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%RC_SUBR%%,${RC_SUBR},g'
-MAN8= nsd.8 zonec.8 nsdc.8 nsd-notify.8
+MAN8= nsd.8 zonec.8 nsdc.8 nsd-notify.8 nsd-xfer.8
PORTDOCS= README RELNOTES CREDITS DIFFERENCES REQUIREMENTS
+.if defined(NOPORTDOCS)
+READMEDIR=no
+.else
+READMEDIR=${PREFIX}/share/doc/nsd
+.endif
+
pre-everything::
@${ECHO_MSG} ""
@${ECHO_MSG} "nsd has the following tunables:"
@${ECHO_MSG} ""
+ @${ECHO_MSG} " WITH_ROOT_SERVER Configure NSD as a root server"
@${ECHO_MSG} " WITHOUT_IPV6 Disables IPv6 support"
+ @${ECHO_MSG} " WITH_DNSSEC Enable experimental DNSSEC support"
@${ECHO_MSG} " WITHOUT_AXFR Disables AXFR"
- @${ECHO_MSG} ""
@${ECHO_MSG} " WITH_PLUGINS Enable plugin support"
@${ECHO_MSG} " WITH_BIND8_STATS Enables BIND8 like NSTATS & XSTATS"
- @${ECHO_MSG} " WITH_DNSSEC Enable experimental DNSSEC support"
@${ECHO_MSG} " according to the latest drafts"
- @${ECHO_MSG} " WITH_ROOT_SERVER Configure NSD as a root server"
- @${ECHO_MSG} " WITH_MMAP Configure NSD to load the database using mmap(2)"
+ @${ECHO_MSG} " WITHOUT_TSIG Disable TSIG support"
+ @${ECHO_MSG} " WITH_MMAP Configure NSD to load the db using mmap(2)"
@${ECHO_MSG} ""
pre-build:
@@ -97,4 +116,4 @@
${INSTALL_SCRIPT} ${WRKDIR}/nsd.sh ${PREFIX}/etc/rc.d/
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN nsd.orig/distinfo nsd/distinfo
--- nsd.orig/distinfo Tue Jan 18 14:43:31 2005
+++ nsd/distinfo Tue Jan 18 14:44:17 2005
@@ -1,2 +1,2 @@
-MD5 (nsd-2.1.5.tar.gz) = 24e81b2bb25f0663e153e174bb585f04
-SIZE (nsd-2.1.5.tar.gz) = 225543
+MD5 (nsd-2.2.0.tar.gz) = e84b8e9d03062710ea847ea146ccb5d5
+SIZE (nsd-2.2.0.tar.gz) = 230431
diff -ruN nsd.orig/pkg-plist nsd/pkg-plist
--- nsd.orig/pkg-plist Tue Jan 18 14:43:31 2005
+++ nsd/pkg-plist Tue Jan 18 15:12:46 2005
@@ -3,7 +3,8 @@
etc/nsd/nsd.zones.sample
etc/nsd/nsdc.conf.sample
sbin/nsd
-sbin/nsd-notify
-sbin/nsdc
sbin/zonec
+sbin/nsdc
+sbin/nsd-notify
+sbin/nsd-xfer
@dirrm etc/nsd
More information about the freebsd-ports-bugs
mailing list