fea33a3
Summary: NSD is a complete implementation of an authoritative DNS name server
fea33a3
Name: nsd
6d65e23
Version: 3.0.6
50ae015
Release: 5%{?dist}
fea33a3
License: BSD-like
fea33a3
Url: http://open.nlnetlabs.nl/nsd/
fea33a3
Source: http://open.nlnetlabs.nl/downloads/nsd/%{name}-%{version}.tar.gz
fea33a3
Source1: nsd.init
fea33a3
Group: System Environment/Daemons
fea33a3
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0fb8b47
BuildRequires: flex, openssl-devel
fea33a3
fea33a3
%description
fea33a3
NSD is a complete implementation of an authoritative DNS name server.
fea33a3
For further information about what NSD is and what NSD is not please
fea33a3
consult the REQUIREMENTS document which is a part of this distribution
fea33a3
(thanks to Olaf).
fea33a3
fea33a3
%prep
fea33a3
%setup -q 
fea33a3
c025ce8
%configure --enable-bind8-stats --enable-plugins --enable-checking \
59bea48
           --enable-mmap --with-ssl --enable-nsec3 --enable-nsid \
4dfd50d
           --with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid --with-ssl \
59bea48
           --with-user=nsd --with-difffile=%{_localstatedir}/lib/%{name}/ixfr.db \
59bea48
           --with-xfrdfile=%{_localstatedir}/lib/%{name}/ixfr.state
fea33a3
fea33a3
%build
fea33a3
%{__make} %{?_smp_mflags}
fea33a3
fea33a3
%install
e39af5e
rm -rf %{buildroot}
c025ce8
%{__make} DESTDIR=%{buildroot} install
63634cb
install -d -m 0755 %{buildroot}%{_initrddir}
6d65e23
install -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/nsd
63634cb
install -d -m 0700 %{buildroot}%{_localstatedir}/run/%{name}
59bea48
install -d -m 0700 %{buildroot}%{_localstatedir}/lib/%{name}
fea33a3
c025ce8
# change .sample to normal config files
4dfd50d
head -76 %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample > %{buildroot}%{_sysconfdir}/nsd/nsd.conf
4dfd50d
rm %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample 
4dfd50d
echo "# include: \"/some/path/file\"" >> %{buildroot}%{_sysconfdir}/nsd/nsd.conf
fea33a3
fea33a3
%clean
fea33a3
rm -rf ${RPM_BUILD_ROOT}
fea33a3
fea33a3
%files 
e39af5e
%defattr(-,root,root,-)
16359b2
%doc doc/*
7b80a30
%doc contrib/nsd.zones2nsd.conf
fea33a3
%dir %{_sysconfdir}/nsd/
16359b2
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.conf
16359b2
#%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.zones
fea33a3
%attr(0755,root,root) %{_initrddir}/%{name}
a49fa68
%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
59bea48
%attr(0755,%{name},%{name}) %dir %{_localstatedir}/lib/%{name}
fea33a3
%{_sbindir}/*
fea33a3
%{_mandir}/*/*
fea33a3
fea33a3
%pre
fea33a3
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
fea33a3
# "Everyone is doing it, so why can't we?" 
fea33a3
exit 0
fea33a3
fea33a3
%post
e39af5e
/sbin/chkconfig --add %{name}
fea33a3
fea33a3
%preun
e39af5e
if [ $1 -eq 0 ]; then
2979b81
        /sbin/service %{name} stop 
e39af5e
        /sbin/chkconfig --del %{name} 
fea33a3
fi
fea33a3
fea33a3
%postun
fea33a3
if [ "$1" -ge "1" ]; then
2979b81
  /sbin/service %{name} condrestart 
fea33a3
fi
fea33a3
fea33a3
%changelog
50ae015
* Tue Oct  2 2007 Paul Wouters <paul@xelerance.com> - 3.0.6-5
50ae015
- nsdc update and nsdc notify are no longer needed in initscript.
50ae015
b7aa26c
* Mon Sep 24 2007 Jesse Keating <jkeating@redhat.com> - 3.0.6-4
b7aa26c
- Bump release for upgrade path.
b7aa26c
4dfd50d
* Fri Sep 14 2007 Paul Wouters <paul@xelerance.com> 3.0.6-3
4dfd50d
- Do not include examples from nsd.conf.sample that causes
4dfd50d
  bogus network traffic.
4dfd50d
59bea48
* Fri Sep 14 2007 Paul Wouters <paul@xelerance.com> 3.0.6-2
59bea48
- Change locations of ixfr.db and xfrd.state to /var/lib/nsd
59bea48
- Enable NSEC3
59bea48
- Delay running nsdc update until after nsd has started
59bea48
- Delete xfrd.state on nsd stop
59bea48
- Run nsdc notify in the background, since it can take
59bea48
  a very long time when remote servers are unavailable.
59bea48
6d65e23
* Tue Sep 11 2007 Paul Wouters <paul@xelerance.com> 3.0.6-1
6d65e23
- Upgraded to 3.0.6
6d65e23
- Do not include bind2nsd, since it didn't compile for me
6d65e23
63634cb
* Fri Jul 13 2007 Paul Wouters <paul@xelerance.com> 3.0.5-2
63634cb
- Fix init script, bug #245546
63634cb
00bb8e6
* Fri Mar 23 2007 Paul Wouters <paul@xelerance.com> 3.0.5-1
00bb8e6
- Upgraded to 3.0.5
00bb8e6
a49fa68
* Thu Dec  7 2006 Paul Wouters <paul@xelerance.com> 3.0.3-1
a49fa68
- Upgraded to 3.0.3
a49fa68
16359b2
* Mon Nov 27 2006 Paul Wouters <paul@xelerance.com> 3.0.2-1
16359b2
- Upgraded to 3.0.2.
16359b2
- Use new configuration file nsd.conf. Still needs migration script.
16359b2
  patch from Farkas Levente <lfarkas@bppiac.hu>
16359b2
e9f5ce6
* Mon Oct 16 2006  Paul Wouters <paul@xelerance.com> 2.3.6-2
e9f5ce6
- Bump version for upgrade path
e9f5ce6
2979b81
* Thu Oct 12 2006  Paul Wouters <paul@xelerance.com> 2.3.6-1
2979b81
- Upgraded to 2.3.6
2979b81
- Removed obsolete workaround in nsd.init
2979b81
- Fixed spec file so daemon gets properly restarted on upgrade
2979b81
232bfb4
* Mon Sep 11 2006 Paul Wouters <paul@xelerance.com> 2.3.5-4
232bfb4
- Rebuild requested for PT_GNU_HASH support from gcc
232bfb4
- Removed dbaccess.c from doc section
232bfb4
c2f0858
* Mon Jun 26 2006 Paul Wouters <paul@xelerance.com> - 2.3.5-3
c2f0858
- Bump version for FC-x upgrade path
c2f0858
c2f0858
* Mon Jun 26 2006 Paul Wouters <paul@xelerance.com> - 2.3.5-1
788b255
- Upgraded to nsd-2.3.5
788b255
babe51a
* Sun May  7 2006 Paul Wouters <paul@xelerance.com> - 2.3.4-3
c025ce8
- Upgraded to nsd-2.3.4. 
c025ce8
- Removed manual install targets because DESTDIR is now supported
c025ce8
- Re-enabled --checking, checking patch no longer needed and removed.
c025ce8
- Work around in nsd.init for nsd failing to start when there is no ipv6
c025ce8
e39af5e
* Thu Dec 15 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-7
e39af5e
- chkconfig and attribute  changes as proposed by Dmitry Butskoy
e39af5e
1f3f193
* Thu Dec 15 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-6
1f3f193
- Moved pid file to /var/run/nsd/nsd.pid.
a49fa68
- Use _localstatedir instead of "/var"
1f3f193
c98708c
* Tue Dec 13 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-5
c98708c
- Added BuildRequires for openssl-devel, removed Requires for openssl.
c98708c
c98708c
* Mon Dec 12 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-4
fea33a3
- upgraded to nsd-2.3.3
fea33a3
fea33a3
* Wed Dec  7 2005 Tom "spot" Callaway <tcallawa@redhat.com> - 2.3.2-2
fea33a3
- minor cleanups
fea33a3
fea33a3
* Mon Dec  5 2005 Paul Wouters <paul@xelerance.com> - 2.3.2-1
fea33a3
- Upgraded to 2.3.2. Changed post scripts to comply to Fedora
fea33a3
  Extras policies (eg do not start daemon on fresh install)
fea33a3
fea33a3
* Tue Oct  4 2005 Paul Wouters <paul@xelerance.com> - 2.3.1-1
fea33a3
- Initial version