diff options
author | erwin <erwin@FreeBSD.org> | 2013-11-12 21:24:45 +0800 |
---|---|---|
committer | erwin <erwin@FreeBSD.org> | 2013-11-12 21:24:45 +0800 |
commit | 616086afd3df7bf081a38b13b7b343b77b46deca (patch) | |
tree | 36044afc0129b56dee79730becdc8faf8fc61a16 /dns | |
parent | 2f008ebd7ec2e48cbe2b9edd7421ae19f71eadc8 (diff) | |
download | freebsd-ports-gnome-616086afd3df7bf081a38b13b7b343b77b46deca.tar.gz freebsd-ports-gnome-616086afd3df7bf081a38b13b7b343b77b46deca.tar.zst freebsd-ports-gnome-616086afd3df7bf081a38b13b7b343b77b46deca.zip |
Please welcome NSD 4.0.0
For all new features, see
http://www.nlnetlabs.nl/svn/nsd/tags/NSD_4_0_0_REL/doc/NSD-4-features
This version replaces the nsdc control program with nsd-control.
This requires some manual setup with nsd-control-setup and editing
of the config files. nsd-control is incompatible with nsdc so when
that is used in scripts, these should be adapted.
NSD 3 is still supported as dns/nsd3.
PR: 183888
Submitted by: Jaap Akkerhuis <jaap@NLnetLabs.nl>
Diffstat (limited to 'dns')
-rw-r--r-- | dns/Makefile | 1 | ||||
-rw-r--r-- | dns/nsd/Makefile | 35 | ||||
-rw-r--r-- | dns/nsd/distinfo | 4 | ||||
-rw-r--r-- | dns/nsd/files/nsd.in | 69 | ||||
-rw-r--r-- | dns/nsd/pkg-message | 17 | ||||
-rw-r--r-- | dns/nsd/pkg-plist | 7 | ||||
-rw-r--r-- | dns/nsd3/Makefile | 151 | ||||
-rw-r--r-- | dns/nsd3/distinfo | 2 | ||||
-rw-r--r-- | dns/nsd3/files/nsd.in | 85 | ||||
-rw-r--r-- | dns/nsd3/files/pkg-deinstall.in | 16 | ||||
-rw-r--r-- | dns/nsd3/files/pkg-install.in | 19 | ||||
-rw-r--r-- | dns/nsd3/pkg-descr | 4 | ||||
-rw-r--r-- | dns/nsd3/pkg-message | 9 | ||||
-rw-r--r-- | dns/nsd3/pkg-plist | 9 |
14 files changed, 341 insertions, 87 deletions
diff --git a/dns/Makefile b/dns/Makefile index 3acf818c8cfe..92388d2304c6 100644 --- a/dns/Makefile +++ b/dns/Makefile @@ -75,6 +75,7 @@ SUBDIR += mydns-ng SUBDIR += noip SUBDIR += nsd + SUBDIR += nsd3 SUBDIR += nslint SUBDIR += nsping SUBDIR += nss_mdns diff --git a/dns/nsd/Makefile b/dns/nsd/Makefile index 632b340bed5d..4b01a5dde577 100644 --- a/dns/nsd/Makefile +++ b/dns/nsd/Makefile @@ -2,15 +2,15 @@ # $FreeBSD$ PORTNAME= nsd -PORTVERSION= 3.2.16 +PORTVERSION= 4.0.0 CATEGORIES= dns ipv6 MASTER_SITES= http://www.nlnetlabs.nl/downloads/nsd/ \ ftp://ftp.rhnet.is/pub/nsd/ MAINTAINER= jaap@NLnetLabs.nl -COMMENT= Authoritative only non-recursive name server +COMMENT= An authoritative only non-recursive name server -CONFLICTS= nsd-[0-2]* +CONFLICTS= nsd-[0-]* nsd3-* USE_RC_SUBR= nsd @@ -22,7 +22,8 @@ NSDRUNDIR= /var/run/nsd NSDMAX_IPS?= 512 GNU_CONFIGURE= yes -CONFIGURE_ARGS= --with-user=${NSDUSER} \ +CONFIGURE_ARGS= --with-libevent=${LOCALBASE} \ + --with-user=${NSDUSER} \ --with-configdir=${PREFIX}/etc/nsd \ --localstatedir=${NSDLSDIR} \ --with-dbfile=${NSDDBDIR}/nsd.db \ @@ -36,23 +37,22 @@ SUB_LIST+= NSDUSER=${NSDUSER} \ USE_OPENSSL= yes -MAN5= nsd.conf.5 -MAN8= nsd.8 nsdc.8 zonec.8 nsd-checkconf.8 nsd-notify.8 nsd-patch.8 \ - nsd-xfer.8 +MAN5= nsd.conf.5 +MAN8= nsd.8 nsd-checkconf.8 nsd-control.8 PORTDOCS= CREDITS ChangeLog LICENSE NSD-DATABASE NSD-DIFFFILE \ - NSD-FOR-BIND-USERS README README.icc RELNOTES \ + NSD-4-features NSD-FOR-BIND-USERS README README.icc RELNOTES \ REQUIREMENTS TESTPLAN TODO UPGRADING coding-style \ differences.tex -OPTIONS_DEFINE= ROOT_SERVER LARGEFILE IPV6 BIND8_STATS ZONE_STATS CHECKING \ - MINRESPSIZE NSEC3 NSEC3PREHASH MMAP MAXIPS DOCS RRL EUI_RRTYPES -OPTIONS_DEFAULT= LARGEFILE IPV6 NSEC3 NSEC3PREHASH MINRESPSIZE +OPTIONS_DEFINE= ROOT_SERVER LARGEFILE IPV6 BIND8_STATS CHECKING \ + MINRESPSIZE NSEC3 NSEC3PREHASH MMAP MAXIPS DOCS EUI_RRTYPES +OPTIONS_DEFAULT= LARGEFILE IPV6 NSEC3 NSEC3PREHASH MINRESPSIZE RRL \ + EUI_RRTYPES ROOT_SERVER_DESC= Configure as a root server LARGEFILE_DESC= Largefile support BIND8_STATS_DESC= BIND8-like NSTATS & XSTATS -ZONE_STATS_DESC= Per-zone BIND8 stats CHECKING_DESC= Internal run-time checks NSEC3_DESC= NSEC3 support NSEC3PREHASH_DESC= Full NSEC3 pre-hashing @@ -62,9 +62,11 @@ MAXIPS_DESC= Raise max-ips from 8 to ${NSDMAX_IPS} RRL_DESC= Response Rate Limiting EUI_RRTYPES_DESC= EUI48 and EUI64 RRtypes support -NO_STAGE= yes +NO_STAGE= yes .include <bsd.port.options.mk> +LIB_DEPENDS+= event-1:${PORTSDIR}/devel/libevent + .if ${PORT_OPTIONS:MROOT_SERVER} CONFIGURE_ARGS+= --enable-root-server .endif @@ -81,13 +83,6 @@ CONFIGURE_ARGS+= --disable-ipv6 CONFIGURE_ARGS+= --enable-bind8-stats .endif -.if ${PORT_OPTIONS:MZONE_STATS} -. if empty(PORT_OPTIONS:MBIND8_STATS) -CONFIGURE_ARGS+= --enable-bind8-stats -. endif -CONFIGURE_ARGS+= --enable-zone-stats -.endif - .if ${PORT_OPTIONS:MCHECKING} CONFIGURE_ARGS+= --enable-checking .endif diff --git a/dns/nsd/distinfo b/dns/nsd/distinfo index 753ae385c993..1f00e58dd429 100644 --- a/dns/nsd/distinfo +++ b/dns/nsd/distinfo @@ -1,2 +1,2 @@ -SHA256 (nsd-3.2.16.tar.gz) = 15a5fd69ea80345eefced83a58b40e8f262a06ac4f7f83606d33033b167d6604 -SIZE (nsd-3.2.16.tar.gz) = 917815 +SHA256 (nsd-4.0.0.tar.gz) = 62608a409d0f68c9d8d4595031b9de9130ac02efe39733be5dee40d5a90e991c +SIZE (nsd-4.0.0.tar.gz) = 1035710 diff --git a/dns/nsd/files/nsd.in b/dns/nsd/files/nsd.in index 7f00215921a1..206f83ae66f2 100644 --- a/dns/nsd/files/nsd.in +++ b/dns/nsd/files/nsd.in @@ -14,71 +14,34 @@ . /etc/rc.subr -case $0 in -/etc/rc*) - # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown), - # so get the name of the script from $_file - name=$_file - ;; -*) - name=$0 - ;; -esac - -name=${name##*/} - +name=nsd rcvar=${name}_enable -load_rc_config ${name} - -eval ": \${${name}_conf:=\"%%PREFIX%%/etc/nsd/${name}.conf\"}" -eval "_conf=\${${name}_conf}" +required_files=%%PREFIX%%/etc/nsd/nsd.conf -command=%%PREFIX%%/sbin/nsdc -procname=%%PREFIX%%/sbin/nsd +command=%%PREFIX%%/sbin/nsd-control +command_args="start" +pidfile=`%%PREFIX%%/sbin/nsd-checkconf -o pidfile %%PREFIX%%/etc/nsd/nsd.conf` +procname=%%PREFIX%%/sbin/${name} -required_files=${_conf} -pidfile=`%%PREFIX%%/sbin/nsd-checkconf -o pidfile ${_conf}` +load_rc_config ${name} -extra_commands="notify patch rebuild reload update" +nsd_enable=${nsd_enable-"NO"} -notify_cmd="nsd_nsdc_cmd notify" -patch_cmd="nsd_nsdc_cmd patch" -rebuild_cmd="nsd_nsdc_cmd rebuild" -reload_cmd="nsd_reload_cmd" -start_cmd="nsd_start_cmd" -stop_cmd="nsd_stop_cmd" -update_cmd="nsd_nsdc_cmd update" +extra_commands="reload" +reload_cmd="${name}_reload" +stop_cmd="${name}_stop" -nsd_nsdc_cmd() +nsd_reload() { - ${command} -c ${_conf} "$1" + echo "Reloading ${name}." + kill -HUP `cat $pidfile` } -nsd_reload_cmd() +nsd_stop() { - nsd_nsdc_cmd rebuild && nsd_nsdc_cmd reload -} - -nsd_start_cmd() -{ - local _db - _db=`%%PREFIX%%/sbin/nsd-checkconf -o database ${_conf}` - if [ ! -f "${_db}" ]; then - nsd_nsdc_cmd rebuild - fi - - echo "Starting ${name}." - nsd_nsdc_cmd start -} - -nsd_stop_cmd() -{ - echo "Merging nsd zone transfer changes to zone files." - nsd_nsdc_cmd patch - echo "Stopping ${name}." - nsd_nsdc_cmd stop + kill -TERM `cat $pidfile` } run_rc_command "$1" diff --git a/dns/nsd/pkg-message b/dns/nsd/pkg-message index 2d3cda3736eb..3f45189f528e 100644 --- a/dns/nsd/pkg-message +++ b/dns/nsd/pkg-message @@ -1,9 +1,12 @@ ************************************************************************** -* * -* To run nsd from startup, add nsd_enable="YES" to your /etc/rc.conf * -* * -* Take good care when using nsd commands, since they often need to * -* be executed as user dedicated to nsd, in order for the files it * -* touches or creates to have the proper permissions. * -* * +* +* To run nsd from startup, add nsd_enable="YES" to your /etc/rc.conf +* +* Starting with nsd version 4 the old nsdc control program has been +* replaced by nsd-control. This requires some manual setup with +* nsd-control-setup and editing of the config files. +* +* nsd-control is incompatible with nsdc so when that is used in scripts, +* these should be adapted +* ************************************************************************** diff --git a/dns/nsd/pkg-plist b/dns/nsd/pkg-plist index b87f4cb31c49..42c4439f2e48 100644 --- a/dns/nsd/pkg-plist +++ b/dns/nsd/pkg-plist @@ -1,9 +1,6 @@ %%ETCDIR%%/nsd.conf.sample sbin/nsd sbin/nsd-checkconf -sbin/nsd-notify -sbin/nsd-patch -sbin/nsd-xfer -sbin/nsdc -sbin/zonec +sbin/nsd-control +sbin/nsd-control-setup @dirrmtry %%ETCDIR%% diff --git a/dns/nsd3/Makefile b/dns/nsd3/Makefile new file mode 100644 index 000000000000..96076c50996b --- /dev/null +++ b/dns/nsd3/Makefile @@ -0,0 +1,151 @@ +# Created by: alexis +# $FreeBSD$ + +PORTNAME= nsd +PORTVERSION= 3.2.16 +CATEGORIES= dns ipv6 +MASTER_SITES= http://www.nlnetlabs.nl/downloads/nsd/ \ + ftp://ftp.rhnet.is/pub/nsd/ +PKGNAMESUFFIX= 3 + +MAINTAINER= jaap@NLnetLabs.nl +COMMENT= Authoritative only non-recursive name server + +CONFLICTS= nsd-[0-2]* nsd-4* + +USE_RC_SUBR= nsd + +NSDUSER?= bind +NSDGROUP?= bind +NSDLSDIR= /var +NSDDBDIR= /var/db/nsd +NSDRUNDIR= /var/run/nsd +NSDMAX_IPS?= 512 + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-user=${NSDUSER} \ + --with-configdir=${PREFIX}/etc/nsd \ + --localstatedir=${NSDLSDIR} \ + --with-dbfile=${NSDDBDIR}/nsd.db \ + --with-pidfile=${NSDRUNDIR}/nsd.pid + +SUB_FILES= pkg-install pkg-deinstall +SUB_LIST+= NSDUSER=${NSDUSER} \ + NSDGROUP=${NSDGROUP} \ + NSDDBDIR=${NSDDBDIR} \ + NSDRUNDIR=${NSDRUNDIR} + +USE_OPENSSL= yes + +MAN5= nsd.conf.5 +MAN8= nsd.8 nsdc.8 zonec.8 nsd-checkconf.8 nsd-notify.8 nsd-patch.8 \ + nsd-xfer.8 + +PORTDOCS= CREDITS ChangeLog LICENSE NSD-DATABASE NSD-DIFFFILE \ + NSD-FOR-BIND-USERS README README.icc RELNOTES \ + REQUIREMENTS TESTPLAN TODO UPGRADING coding-style \ + differences.tex + +OPTIONS_DEFINE= ROOT_SERVER LARGEFILE IPV6 BIND8_STATS ZONE_STATS CHECKING \ + MINRESPSIZE NSEC3 NSEC3PREHASH MMAP MAXIPS DOCS RRL EUI_RRTYPES +OPTIONS_DEFAULT= LARGEFILE IPV6 NSEC3 NSEC3PREHASH MINRESPSIZE + +ROOT_SERVER_DESC= Configure as a root server +LARGEFILE_DESC= Largefile support +BIND8_STATS_DESC= BIND8-like NSTATS & XSTATS +ZONE_STATS_DESC= Per-zone BIND8 stats +CHECKING_DESC= Internal run-time checks +NSEC3_DESC= NSEC3 support +NSEC3PREHASH_DESC= Full NSEC3 pre-hashing +MINRESPSIZE_DESC= Minimial response sizing +MMAP_DESC= Use mmap instead of malloc (experimental) +MAXIPS_DESC= Raise max-ips from 8 to ${NSDMAX_IPS} +RRL_DESC= Response Rate Limiting +EUI_RRTYPES_DESC= EUI48 and EUI64 RRtypes support + +NO_STAGE= yes +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MROOT_SERVER} +CONFIGURE_ARGS+= --enable-root-server +.endif + +.if empty(PORT_OPTIONS:MLARGEFILE) +CONFIGURE_ARGS+= --disable-largefile +.endif + +.if empty(PORT_OPTIONS:MIPV6) +CONFIGURE_ARGS+= --disable-ipv6 +.endif + +.if ${PORT_OPTIONS:MBIND8_STATS} +CONFIGURE_ARGS+= --enable-bind8-stats +.endif + +.if ${PORT_OPTIONS:MZONE_STATS} +. if empty(PORT_OPTIONS:MBIND8_STATS) +CONFIGURE_ARGS+= --enable-bind8-stats +. endif +CONFIGURE_ARGS+= --enable-zone-stats +.endif + +.if ${PORT_OPTIONS:MCHECKING} +CONFIGURE_ARGS+= --enable-checking +.endif + +.if empty(PORT_OPTIONS:MNSEC3) +CONFIGURE_ARGS+= --disable-nsec3 +.endif + +.if empty(PORT_OPTIONS:MMINRESPSIZE) +CONFIGURE_ARGS+= --disable-minimal-responses +.endif + +.if empty(PORT_OPTIONS:MNSEC3PREHASH) +CONFIGURE_ARGS+= --disable-full-prehash +.endif + +.if ${PORT_OPTIONS:MMMAP} +CONFIGURE_ARGS+= --enable-mmap +.endif + +.if ${PORT_OPTIONS:MMAXIPS} +CONFIGURE_ARGS+= --with-max-ips=${NSDMAX_IPS} +.endif + +.if ${PORT_OPTIONS:MRRL} +CONFIGURE_ARGS+= --enable-ratelimit +.endif + +.if ${PORT_OPTIONS:MEUI_RRTYPES} +CONFIGURE_ARGS+= --enable-draft-rrtypes +.endif + +pre-patch: +.if defined(NSD_OPTIONS) + @${ECHO_MSG} + @${ECHO_MSG} + @${ECHO_MSG} + @${ECHO_MSG} "***** ALERT *****" + @${ECHO_MSG} "NSD_OPTIONS is no longer supported," + @${ECHO_MSG} "${PORTNAME} uses OPTIONS, consider running" + @${ECHO_MSG} "# make config" + @${ECHO_MSG} + @${ECHO_MSG} + @${ECHO_MSG} + @sleep 10 +.endif + +post-install: + ${INSTALL_DATA} ${WRKSRC}/nsd.conf.sample \ + ${PREFIX}/etc/nsd/nsd.conf.sample +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DOCSDIR} +.for f in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR}/${f} +.endfor +.endif + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/dns/nsd3/distinfo b/dns/nsd3/distinfo new file mode 100644 index 000000000000..753ae385c993 --- /dev/null +++ b/dns/nsd3/distinfo @@ -0,0 +1,2 @@ +SHA256 (nsd-3.2.16.tar.gz) = 15a5fd69ea80345eefced83a58b40e8f262a06ac4f7f83606d33033b167d6604 +SIZE (nsd-3.2.16.tar.gz) = 917815 diff --git a/dns/nsd3/files/nsd.in b/dns/nsd3/files/nsd.in new file mode 100644 index 000000000000..7f00215921a1 --- /dev/null +++ b/dns/nsd3/files/nsd.in @@ -0,0 +1,85 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: nsd +# REQUIRE: DAEMON +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable nsd: +# +# nsd_enable="YES" +# + +. /etc/rc.subr + +case $0 in +/etc/rc*) + # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown), + # so get the name of the script from $_file + name=$_file + ;; +*) + name=$0 + ;; +esac + +name=${name##*/} + +rcvar=${name}_enable + +load_rc_config ${name} + +eval ": \${${name}_conf:=\"%%PREFIX%%/etc/nsd/${name}.conf\"}" +eval "_conf=\${${name}_conf}" + +command=%%PREFIX%%/sbin/nsdc +procname=%%PREFIX%%/sbin/nsd + +required_files=${_conf} +pidfile=`%%PREFIX%%/sbin/nsd-checkconf -o pidfile ${_conf}` + +extra_commands="notify patch rebuild reload update" + +notify_cmd="nsd_nsdc_cmd notify" +patch_cmd="nsd_nsdc_cmd patch" +rebuild_cmd="nsd_nsdc_cmd rebuild" +reload_cmd="nsd_reload_cmd" +start_cmd="nsd_start_cmd" +stop_cmd="nsd_stop_cmd" +update_cmd="nsd_nsdc_cmd update" + +nsd_nsdc_cmd() +{ + ${command} -c ${_conf} "$1" +} + +nsd_reload_cmd() +{ + nsd_nsdc_cmd rebuild && nsd_nsdc_cmd reload +} + +nsd_start_cmd() +{ + local _db + _db=`%%PREFIX%%/sbin/nsd-checkconf -o database ${_conf}` + if [ ! -f "${_db}" ]; then + nsd_nsdc_cmd rebuild + fi + + echo "Starting ${name}." + nsd_nsdc_cmd start +} + +nsd_stop_cmd() +{ + echo "Merging nsd zone transfer changes to zone files." + nsd_nsdc_cmd patch + + echo "Stopping ${name}." + nsd_nsdc_cmd stop +} + +run_rc_command "$1" + diff --git a/dns/nsd3/files/pkg-deinstall.in b/dns/nsd3/files/pkg-deinstall.in new file mode 100644 index 000000000000..fde1e1c22526 --- /dev/null +++ b/dns/nsd3/files/pkg-deinstall.in @@ -0,0 +1,16 @@ +#!/bin/sh +# $FreeBSD$ + +PATH="/bin:/sbin:/usr/bin:/usr/sbin" + +NSDDBDIR=%%NSDDBDIR%% +NSDRUNDIR=%%NSDRUNDIR%% + +if [ "$2" = "POST-DEINSTALL" ]; then + echo "=> Deleting ${NSDDBDIR} if empty..." + rm -d ${NSDDBDIR} 2>/dev/null || true + echo "=> Deleting ${NSDRUNDIR} if empty..." + rm -d ${NSDRUNDIR} 2>/dev/null || true +fi + +exit 0 diff --git a/dns/nsd3/files/pkg-install.in b/dns/nsd3/files/pkg-install.in new file mode 100644 index 000000000000..624f4bb59b7c --- /dev/null +++ b/dns/nsd3/files/pkg-install.in @@ -0,0 +1,19 @@ +#!/bin/sh +# $FreeBSD$ + +PATH="/bin:/sbin:/usr/bin:/usr/sbin" + +NSDUSER=%%NSDUSER%% +NSDGROUP=%%NSDGROUP%% +NSDDBDIR=%%NSDDBDIR%% +NSDRUNDIR=%%NSDRUNDIR%% + +CHOWN="chown" +INSTALL_DIR="install -d -o ${NSDUSER} -g ${NSDGROUP} -m 0755" + +if [ "$2" = "POST-INSTALL" ]; then + ${INSTALL_DIR} ${NSDDBDIR} ${NSDRUNDIR} + ${CHOWN} -R ${NSDUSER}:${NSDGROUP} ${NSDDBDIR} ${NSDRUNDIR} +fi + +exit 0 diff --git a/dns/nsd3/pkg-descr b/dns/nsd3/pkg-descr new file mode 100644 index 000000000000..d946a437d921 --- /dev/null +++ b/dns/nsd3/pkg-descr @@ -0,0 +1,4 @@ +NSD (Name Server Daemon) is a complete implementation of an +authoritative DNS nameserver. + +WWW: http://www.nlnetlabs.nl/nsd diff --git a/dns/nsd3/pkg-message b/dns/nsd3/pkg-message new file mode 100644 index 000000000000..2d3cda3736eb --- /dev/null +++ b/dns/nsd3/pkg-message @@ -0,0 +1,9 @@ +************************************************************************** +* * +* To run nsd from startup, add nsd_enable="YES" to your /etc/rc.conf * +* * +* Take good care when using nsd commands, since they often need to * +* be executed as user dedicated to nsd, in order for the files it * +* touches or creates to have the proper permissions. * +* * +************************************************************************** diff --git a/dns/nsd3/pkg-plist b/dns/nsd3/pkg-plist new file mode 100644 index 000000000000..b87f4cb31c49 --- /dev/null +++ b/dns/nsd3/pkg-plist @@ -0,0 +1,9 @@ +%%ETCDIR%%/nsd.conf.sample +sbin/nsd +sbin/nsd-checkconf +sbin/nsd-notify +sbin/nsd-patch +sbin/nsd-xfer +sbin/nsdc +sbin/zonec +@dirrmtry %%ETCDIR%% |