ANNOUNCEMENT: NSD 2.3.2 released
Paul Wouters
paul at xelerance.com
Mon Dec 5 17:41:16 UTC 2005
Attached is the patch for Fedora Extra support.
It adds the directory packaging/fedora/ and includes the daemon start-stop
script and the Fedora Extra rpm spec file.
Paul
-------------- next part --------------
diff -u -N -r nsd-2.3.2/packaging/fedora/nsd.init nsd-2.3.2-patched/packaging/fedora/nsd.init
--- nsd-2.3.2/packaging/fedora/nsd.init 1969-12-31 19:00:00.000000000 -0500
+++ nsd-2.3.2-patched/packaging/fedora/nsd.init 2005-12-05 12:34:16.000000000 -0500
@@ -0,0 +1,94 @@
+#!/bin/bash
+#
+# nsd: Starts the NSD Name Server Daemon
+#
+# chkconfig: - 80 30
+# description: NSD is a complete implementation of an authoritative \
+# DNS name server.
+# processname: /usr/sbin/nsd
+# config: /etc/nsd/nsdc.config
+#
+### BEGIN INIT INFO
+# Provides: nsd
+# Required-Start: $syslog
+# Default-Stop: - 80 30
+# Short-Description: Starts the NSD Name Server Daemon
+# Description: NSD is a complete implementation of an authoritative \
+# DNS name server.
+### END INIT INFO
+
+# Sanity checks.
+[ -f /etc/nsd/nsdc.conf ] || exit 0
+[ -f /etc/nsd/nsd.zones ] || exit 0
+[ -x /usr/sbin/nsd ] || exit 0
+
+#extra verbosity
+#ZONEC_VERBOSE=-v
+
+OTHER_NSD_OPTS=""
+
+# Source function library.
+. /etc/init.d/functions
+
+. /etc/sysconfig/network
+
+# Check that networking is configured.
+[ ${NETWORKING} = "no" ] && exit 0
+
+start() {
+ /usr/sbin/nsdc rebuild >/dev/null
+ /usr/sbin/nsdc update >/dev/null
+ echo -n $"Starting nsd... "
+ nsd $OTHER_NSD_OPTS
+ RETVAL=$?
+ echo
+ /usr/sbin/nsdc notify
+ touch /var/lock/subsys/nsd
+ return $RETVAL
+}
+
+stop() {
+ echo -n $"Shutting down nsd services: "
+ killproc nsd
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] ; then
+ rm -f /var/lock/subsys/nsd
+ rm -f /var/run/nsd.pid
+ fi
+ echo
+ return $RETVAL
+}
+
+restart() {
+ stop
+ start
+}
+
+RETVAL=0
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/nsd ] && restart || :
+ ;;
+ status)
+ /usr/sbin/nsdc running
+ ;;
+ stats|reload|rebuild|running|update|notify)
+ /usr/sbin/nsdc $1
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|stats|notify|reload|rebuild|running|update}"
+ exit 1
+esac
+
+exit $?
diff -u -N -r nsd-2.3.2/packaging/fedora/nsd.spec nsd-2.3.2-patched/packaging/fedora/nsd.spec
--- nsd-2.3.2/packaging/fedora/nsd.spec 1969-12-31 19:00:00.000000000 -0500
+++ nsd-2.3.2-patched/packaging/fedora/nsd.spec 2005-12-05 12:35:09.000000000 -0500
@@ -0,0 +1,93 @@
+Summary: NSD is a complete implementation of an authoritative DNS name server
+Name: nsd
+Version: 2.3.2
+Release: 1
+License: BSD-like
+Url: http://open.nlnetlabs.nl/nsd/
+Source: http://open.nlnetlabs.nl/downloads/%{name}-%{version}.tar.gz
+Group: System Environment/Daemons
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+#Requires:
+BuildRequires: flex
+
+%description
+NSD is a complete implementation of an authoritative DNS name server.
+For further information about what NSD is and what NSD is not please
+consult the REQUIREMENTS document which is a part of this distribution
+(thanks to Olaf).
+
+%prep
+rm -rf %{buildroot}
+%setup -q
+
+%configure --enable-bind8-stats --enable-plugins --enable-checking \
+ --enable-mmap --with-pidfile=/var/run/nsd.pid --with-ssl \
+ --with-user=nsd
+
+%build
+%{__make} %{?_smp_mflags}
+
+%install
+# Not using their 'make install' since it uses install-sh which does not
+# get the correct install path within the RPM_BUILD_ROOT
+#%{__make} install
+install -d 0755 %{buildroot}/%{_sysconfdir}/nsd
+install -d 0755 %{buildroot}/%{_sbindir}
+install -d 0755 %{buildroot}/%{_mandir}/man8
+install -d 0755 %{buildroot}/%{_initrddir}
+
+install -m 0644 nsdc.conf.sample %{buildroot}/%{_sysconfdir}/nsd/nsdc.conf
+install -m 0644 nsd.zones.sample %{buildroot}/%{_sysconfdir}/nsd/nsd.zones
+install -m 0755 packaging/fedora/nsd.init %{buildroot}/%{_initrddir}/nsd
+
+install -m 0755 nsd zonec nsd-notify nsd-xfer %{buildroot}/%{_sbindir}
+install -m 0755 nsdc.sh %{buildroot}/%{_sbindir}/nsdc
+install -m 0644 *.8 %{buildroot}/%{_mandir}/man8
+
+%clean
+rm -rf ${RPM_BUILD_ROOT}
+
+%files
+%defattr(-,root,root)
+%doc README LICENSE NSD-DATABASE DIFFERENCES dbaccess.c TODO RELNOTES REQUIREMENTS
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsdc.conf
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.zones
+%attr(0755,root,root) %{_initrddir}/%{name}
+%{_sbindir}/*
+%doc %{_mandir}/*/*
+
+%pre
+if getent passwd nsd >/dev/null 2>&1 ; then : ; else /usr/sbin/useradd -d /etc/nsd -r -s /sbin/nologin nsd >/dev/null 2>&1 || exit 1 ; fi
+if [ $1 = 2 -a -f /var/run/%{name}.pid ]; then
+ /sbin/service %{name} stop
+fi
+# "Everyone is doing it, so why can't we?"
+exit 0
+
+%post
+# do not activate daemon upon request. Fedora Extra policy
+
+%preun
+if [ -f /var/run/%{name}.pid ]
+then
+ /sbin/service %{name} stop > /dev/null 2>&1
+fi
+if [ $1 -eq 0 ]
+then
+ /sbin/chkconfig --del %{name} > /dev/null 2>&1
+fi
+# "Everyone is doing it, so why can't we?"
+exit 0
+
+%postun
+if [ "$1" -ge "1" ]; then
+ /sbin/service %{name} condrestart 2>&1 >/dev/null
+fi
+
+%changelog
+* Mon Dec 5 2005 Paul Wouters <paul at xelerance.com> - 2.3.2-1
+- Upgraded to 2.3.2. Changed post scripts to comply to Fedora
+ Extras policies (eg do not start daemon on fresh install)
+
+* Tue Oct 4 2005 Paul Wouters <paul at xelerance.com> - 2.3.1-1
+- Initial version
More information about the nsd-users
mailing list