diff --git a/nsd.spec b/nsd.spec index fc670e1..54aae27 100644 --- a/nsd.spec +++ b/nsd.spec @@ -1,7 +1,7 @@ Summary: NSD is a complete implementation of an authoritative DNS name server Name: nsd Version: 2.3.3 -Release: 5%{?dist} +Release: 6%{?dist} License: BSD-like Url: http://open.nlnetlabs.nl/nsd/ Source: http://open.nlnetlabs.nl/downloads/nsd/%{name}-%{version}.tar.gz @@ -22,7 +22,7 @@ consult the REQUIREMENTS document which is a part of this distribution %patch0 -p1 -b .checking.patch %configure --enable-bind8-stats --enable-plugins \ - --enable-mmap --with-pidfile=/var/run/nsd.pid --with-ssl \ + --enable-mmap --with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid --with-ssl \ --with-user=nsd %build @@ -37,6 +37,7 @@ install -d 0755 %{buildroot}/%{_sysconfdir}/nsd install -d 0755 %{buildroot}/%{_sbindir} install -d 0755 %{buildroot}/%{_mandir}/man8 install -d 0755 %{buildroot}/%{_initrddir} +install -d 0700 %{buildroot}/%{_localstatedir}/run/%{name} install -m 0644 nsdc.conf.sample %{buildroot}/%{_sysconfdir}/nsd/nsdc.conf install -m 0644 nsd.zones.sample %{buildroot}/%{_sysconfdir}/nsd/nsd.zones @@ -56,12 +57,13 @@ rm -rf ${RPM_BUILD_ROOT} %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} +%attr(0700,%{name},%{name}) %dir %{_localstatedir}/run/%{name} %{_sbindir}/* %{_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 +if [ $1 = 2 -a -f /%{_localstatedir}/run/%{name}/%{name}.pid ]; then /sbin/service %{name} stop fi # "Everyone is doing it, so why can't we?" @@ -71,7 +73,7 @@ exit 0 # do not activate daemon upon request. Fedora Extra policy %preun -if [ -f /var/run/%{name}.pid ] +if [ -f /%{_localstatedir}/run/%{name}/%{name}.pid ] then /sbin/service %{name} stop > /dev/null 2>&1 fi @@ -88,6 +90,10 @@ if [ "$1" -ge "1" ]; then fi %changelog +* Thu Dec 15 2005 Paul Wouters - 2.3.3-6 +- Moved pid file to /var/run/nsd/nsd.pid. +- Use %{_localstatedir} instead of "/var" + * Tue Dec 13 2005 Paul Wouters - 2.3.3-5 - Added BuildRequires for openssl-devel, removed Requires for openssl.