ports/183888: [MAINTAINER] dns/nsd: update to 4.0.0
Jaap Akkerhuis
jaap at NLnetLabs.nl
Tue Nov 12 11:10:01 UTC 2013
>Number: 183888
>Category: ports
>Synopsis: [MAINTAINER] dns/nsd: update to 4.0.0
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 12 11:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Jaap Akkerhuis
>Release: FreeBSD 9.2-STABLE amd64
>Organization:
NLnet Labs
>Environment:
System: FreeBSD bela.nlnetlabs.nl 9.2-STABLE FreeBSD 9.2-STABLE #8 r256930: Wed Oct 23 02:47:41 CEST
>Description:
- Update to 4.0.0
This is a major update from nsd to version 4.0.0. Given that the
previous version (nsd-3.2.16) is not EOL yet, we want to create a
port called nsd3 to give people a slow upgrade path in case they
don't want to take the plunge immediately.
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.
For the nsd3 port one should first do something like
(1) svn -r 333555 cp nsd nsd3
(2) Add a port suffice to the Makefile as in:
diff -r nsdxxx/Makefile nsd3/Makefile
8a9
> PKGNAMESUFFIX= 3
svn ci etc. to create the nsd3 port.
There should be some mentioning in /usr/ports/UPDATING about nsd3
and the nsdc change.
There should be some mentioning in /usr/ports/UPDATING about nsd3
and the nsdc change and probably an advice to read the NSD-4-features
document. The patch below will update nsd to the newest version.
Enjoy!
Generated with FreeBSD Port Tools 0.99_8 (mode: update, diff: suffix)
>How-To-Repeat:
>Fix:
--- nsd-4.0.0.patch begins here ---
diff -ruN ../nsd.orig/Makefile ./Makefile
--- ../nsd.orig/Makefile 2013-11-12 10:56:49.943184985 +0100
+++ ./Makefile 2013-11-12 12:02:18.625184117 +0100
@@ -1,16 +1,16 @@
# Created by: alexis
-# $FreeBSD: head/dns/nsd/Makefile 327719 2013-09-20 16:31:57Z bapt $
+# $FreeBSD: ports/dns/nsd/Makefile,v 1.53 2011/03/30 13:48:13 ohauer Exp $
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 at NLnetLabs.nl
-COMMENT= Authoritative only non-recursive name server
+COMMENT= An authoritative only non-recursive name server
-CONFLICTS= nsd-[0-2]*
+CONFLICTS= nsd-[0-3]*
USE_RC_SUBR= nsd
@@ -22,7 +22,8 @@
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 @@
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 @@
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+= --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 -ruN ../nsd.orig/distinfo ./distinfo
--- ../nsd.orig/distinfo 2013-11-12 10:56:49.944185054 +0100
+++ ./distinfo 2013-11-11 10:48:03.681184082 +0100
@@ -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 -ruN ../nsd.orig/files/nsd.in ./files/nsd.in
--- ../nsd.orig/files/nsd.in 2013-11-12 10:56:49.922185163 +0100
+++ ./files/nsd.in 2013-11-11 10:54:12.645185612 +0100
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: head/dns/nsd/files/nsd.in 312942 2013-02-25 21:59:11Z beech $
+# $FreeBSD: ports/dns/nsd/files/nsd.in,v 1.8 2010/11/25 16:04:00 bapt Exp $
#
# PROVIDE: nsd
# REQUIRE: DAEMON
@@ -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=nsd
+rcvar=`set_rcvar`
-name=${name##*/}
+required_files=%%PREFIX%%/etc/nsd/nsd.conf
-rcvar=${name}_enable
+command=%%PREFIX%%/sbin/nsd-control
+command_args="start"
+pidfile=`%%PREFIX%%/sbin/nsd-checkconf -o pidfile %%PREFIX%%/etc/nsd/nsd.conf`
+procname=%%PREFIX%%/sbin/${name}
load_rc_config ${name}
-eval ": \${${name}_conf:=\"%%PREFIX%%/etc/nsd/${name}.conf\"}"
-eval "_conf=\${${name}_conf}"
+nsd_enable=${nsd_enable-"NO"}
-command=%%PREFIX%%/sbin/nsdc
-procname=%%PREFIX%%/sbin/nsd
+extra_commands="reload"
+reload_cmd="${name}_reload"
+stop_cmd="${name}_stop"
-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_reload()
{
- nsd_nsdc_cmd rebuild && nsd_nsdc_cmd reload
+ echo "Reloading ${name}."
+ kill -HUP `cat $pidfile`
}
-nsd_start_cmd()
+nsd_stop()
{
- 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 -ruN ../nsd.orig/files/pkg-install.in ./files/pkg-install.in
--- ../nsd.orig/files/pkg-install.in 2013-11-12 10:56:49.924185352 +0100
+++ ./files/pkg-install.in 2013-11-11 14:41:51.245374378 +0100
@@ -1,5 +1,5 @@
#!/bin/sh
-# $FreeBSD: head/dns/nsd/files/pkg-install.in 300896 2012-07-14 13:54:48Z beat $
+# $FreeBSD$
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
diff -ruN ../nsd.orig/pkg-message ./pkg-message
--- ../nsd.orig/pkg-message 2013-11-12 10:56:49.940185180 +0100
+++ ./pkg-message 2013-11-11 11:00:38.673660454 +0100
@@ -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 -ruN ../nsd.orig/pkg-plist ./pkg-plist
--- ../nsd.orig/pkg-plist 2013-11-12 10:56:49.941184941 +0100
+++ ./pkg-plist 2013-11-11 13:54:27.828756968 +0100
@@ -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%%
--- nsd-4.0.0.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list