[nsd/f14] * Fri Jun 3 2011 Tuomo Soini <tis at foobar.fi> - 3.2.8-1 - updated to 3.2.8 - fix init status to work

Paul Wouters pwouters at fedoraproject.org
Tue Jun 7 15:26:04 UTC 2011


commit 1ed793ba1492212b19accf5d3107a37c2a97c060
Author: Paul Wouters <paul at xelerance.com>
Date:   Tue Jun 7 11:25:39 2011 -0400

    * Fri Jun  3 2011 Tuomo Soini <tis at foobar.fi> - 3.2.8-1
    - updated to 3.2.8
    - fix init status to work as expected (bz#525107)
    - fix nsd.conf and nsd.conf.5 to have correct logfile
    - fix nsd.init syntax error by piddir change
    - fix initscript to create /var/run/nsd if missing (bz#710376)
    - /var/run/nsd should be owned by root, not nsd

 nsd-fixlogfile.patch |   24 ++++++++++++++++++++++++
 nsd.init             |    7 +++++--
 nsd.spec             |   20 +++++++++++++++-----
 3 files changed, 44 insertions(+), 7 deletions(-)
---
diff --git a/nsd-fixlogfile.patch b/nsd-fixlogfile.patch
new file mode 100644
index 0000000..6149547
--- /dev/null
+++ b/nsd-fixlogfile.patch
@@ -0,0 +1,24 @@
+diff -up nsd-3.2.8/nsd.conf.5.in.fixlogfile nsd-3.2.8/nsd.conf.5.in
+--- nsd-3.2.8/nsd.conf.5.in.fixlogfile	2011-03-22 16:01:32.000000000 +0200
++++ nsd-3.2.8/nsd.conf.5.in	2011-06-03 16:37:50.000000000 +0300
+@@ -37,7 +37,7 @@ database: "@dbfile@"
+ username: @user@
+ .RE
+ .RS 5
+-logfile: "@logfile@"
++logfile: "/var/log/nsd.log"
+ .RE
+ .RS 5
+ pidfile: "@pidfile@"
+diff -up nsd-3.2.8/nsd.conf.sample.in.fixlogfile nsd-3.2.8/nsd.conf.sample.in
+--- nsd-3.2.8/nsd.conf.sample.in.fixlogfile	2011-03-22 15:13:32.000000000 +0200
++++ nsd-3.2.8/nsd.conf.sample.in	2011-06-03 16:30:49.000000000 +0300
+@@ -38,7 +38,7 @@ server:
+ 	# nsid: "aabbccdd"
+ 
+ 	# log messages to file. Default to stderr and syslog (with facility LOG_DAEMON).
+-	# logfile: "@logfile@"
++	# logfile: "/var/log/nsd.log"
+ 
+ 	# Number of NSD servers to fork.
+ 	# server-count: 1
diff --git a/nsd.init b/nsd.init
index 51eb143..9b42669 100755
--- a/nsd.init
+++ b/nsd.init
@@ -24,6 +24,7 @@ NSD_PROG="/usr/sbin/nsd"
 NSD_PIDFILE="/var/run/nsd/nsd.pid"
 NSD_XFRDFILE="/var/lib/nsd/xfrd.state"
 NSDC_PROG="/usr/sbin/nsdc"
+NSD_PIDDIR=`dirname $NSD_PIDFILE`
 
 # Source function library.
 . /etc/rc.d/init.d/functions
@@ -43,6 +44,8 @@ start() {
   # Sanity checks.
   [ -f $NSD_CONF ] || exit 5
   [ -x $NSD_PROG ] || exit 5
+  # /var/run could (and should) be tmpfs
+  [ -d $NSD_PIDDIR ] || mkdir -p $NSD_PIDDIR
 
   echo -n $"Starting nsd:"
   $NSDC_PROG -c $NSD_CONF rebuild >/dev/null 2>&1
@@ -103,10 +106,10 @@ case "$1" in
         [ -f /var/lock/subsys/nsd ] && restart || :
 	;;
   status)
-	$NSDC_PROG -c $NSD_CONF running
+	status -p $NSD_PIDFILE $NSD_PROG
 	;;
   reload)
-	echo -n $"Rebuilding zonfiles:"
+	echo -n $"Rebuilding zonefiles:"
 	$NSDC_PROG -c $NSD_CONF rebuild >/dev/null 2>&1
         RETVAL=$?
         if [ $RETVAL -eq 0 ] ; then
diff --git a/nsd.spec b/nsd.spec
index 381b326..7f8e703 100644
--- a/nsd.spec
+++ b/nsd.spec
@@ -1,7 +1,7 @@
 Summary: Fast and lean authoritative DNS Name Server
 Name: nsd
-Version: 3.2.7
-Release: 5%{?dist}
+Version: 3.2.8
+Release: 1%{?dist}
 License: BSD
 Url: http://www.nlnetlabs.nl/%{name}/
 Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
@@ -9,6 +9,7 @@ Source1: nsd.init
 Source2: nsd.cron
 Source3: nsd.sysconfig
 Patch0: nsd-install.patch
+Patch1: nsd-fixlogfile.patch
 Group: System Environment/Daemons
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: flex, openssl-devel
@@ -23,9 +24,10 @@ consult the REQUIREMENTS document which is a part of this distribution
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
-%configure --enable-bind8-stats --enable-checking --enable-nsec3 \
+%configure --enable-bind8-stats --enable-checking --enable-nsec3  \
            --with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid --with-ssl \
            --with-user=nsd --with-difffile=%{_localstatedir}/lib/%{name}/ixfr.db \
            --with-xfrdfile=%{_localstatedir}/lib/%{name}/ixfr.state \
@@ -46,7 +48,7 @@ install -d -m 0755 %{buildroot}%{_initrddir}
 install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly
 install -c -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/nsd
 install -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/nsd
-install -d -m 0700 %{buildroot}%{_localstatedir}/run/%{name}
+install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name}
 install -d -m 0700 %{buildroot}%{_localstatedir}/lib/%{name}
 install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
 install -m 0755 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
@@ -69,7 +71,7 @@ rm -rf ${RPM_BUILD_ROOT}
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/nsd
 %attr(0755,root,root) %{_initrddir}/%{name}
 %{_sysconfdir}/cron.hourly/nsd
-%ghost %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
+%ghost %attr(0755,root,root) %dir %{_localstatedir}/run/%{name}
 %attr(0755,%{name},%{name}) %dir %{_localstatedir}/lib/%{name}
 %{_sbindir}/*
 %{_mandir}/*/*
@@ -96,6 +98,14 @@ if [ "$1" -ge "1" ]; then
 fi
 
 %changelog
+* Fri Jun  3 2011 Tuomo Soini <tis at foobar.fi> - 3.2.8-1
+- updated to 3.2.8
+- fix init status to work as expected (bz#525107)
+- fix nsd.conf and nsd.conf.5 to have correct logfile
+- fix nsd.init syntax error by piddir change
+- fix initscript to create /var/run/nsd if missing (bz#710376)
+- /var/run/nsd should be owned by root, not nsd
+
 * Wed Mar 09 2011 Paul Wouters <paul at xelerance.com> - 3.2.7-5
 - Fix misnamed variable NSD_AUTORELOAD which should be NSD_AUTOREBUILD
 - Fix for init script properly returning OK/Failed (bz#535107) by Noa Resare


More information about the scm-commits mailing list