fff8fa1
Summary: fast and lean authoritative DNS name server
fea33a3
Name: nsd
74e93d6
Version: 3.2.0
fff8fa1
Release: 3%{?dist}
d7c2c32
License: BSD
32e1238
Url: http://www.nlnetlabs.nl/%{name}/
74e93d6
#Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
c9ed87c
Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
fea33a3
Source1: nsd.init
709b0f5
Source2: nsd.cron
fea33a3
Group: System Environment/Daemons
fea33a3
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0fb8b47
BuildRequires: flex, openssl-devel
d7c2c32
Requires(pre): shadow-utils
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
c9ed87c
%setup -q
fea33a3
d7c2c32
%build
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
%{__make} %{?_smp_mflags}
75611be
#convert to utf8
7ccd03e
iconv -f iso8859-1 -t utf-8 doc/RELNOTES > doc/RELNOTES.utf8
7ccd03e
iconv -f iso8859-1 -t utf-8 doc/CREDITS > doc/CREDITS.utf8
75611be
mv -f doc/RELNOTES.utf8 doc/RELNOTES
75611be
mv -f doc/CREDITS.utf8 doc/CREDITS
75611be
fea33a3
fea33a3
%install
e39af5e
rm -rf %{buildroot}
c025ce8
%{__make} DESTDIR=%{buildroot} install
63634cb
install -d -m 0755 %{buildroot}%{_initrddir}
709b0f5
install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly
709b0f5
install -c -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/nsd
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 
da6cbb8
echo "database: /var/lib/nsd/nsd.db" >> %{buildroot}%{_sysconfdir}/nsd/nsd.conf
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}
709b0f5
%{_sysconfdir}/cron.hourly/nsd
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
d7c2c32
getent group nsd >/dev/null || groupadd -r nsd
d7c2c32
getent passwd nsd >/dev/null || \
d7c2c32
useradd -r -g nsd -d /etc/nsd -s /sbin/nologin \
d7c2c32
-c "nsd daemon account" nsd
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
fff8fa1
* Mon Nov 24 2008 Paul Wouters <paul@xelerance.com> - 3.2.0-3
fff8fa1
- Updates summary as per Richard Hughes guidelines
fff8fa1
351f14e
* Mon Nov 10 2008 Paul Wouters <paul@xelerance.com> - 3.2.0-2
351f14e
- Bump version after pre-release version correction.
351f14e
74e93d6
* Mon Nov 10 2008 Paul Wouters <paul@xelerance.com> - 3.2.0-1
74e93d6
- 3.2.0-1
74e93d6
c858bae
* Thu Oct  9 2008 Paul Wouters <paul@xelerance.com> - 3.1.1-1
c858bae
- updated to 3.1.1
c858bae
d7c2c32
* Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.1.0-2
d7c2c32
- fix license tag
d7c2c32
- fix static user creation
d7c2c32
24d1de1
* Mon Jun 30 2008 Paul Wouters <paul@xelerance.com> - 3.1.0-1
24d1de1
- Updated to 3.1.0
24d1de1
976466d
* Tue May  6 2008 Paul Wouters <paul@xelerance.com> - 3.0.8-2
976466d
- Fix /dev/null redirection [Venkatesh Krishnamurthi]
976466d
60cac7a
* Tue May  6 2008 Paul Wouters <paul@xelerance.com> - 3.0.8-1
60cac7a
- Updated to 3.0.8
60cac7a
cf1ea9d
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.0.7-3
cf1ea9d
- Autorebuild for GCC 4.3
cf1ea9d
487bcef
* Wed Dec  5 2007 Paul Wouters <paul@xelerance.com> - 3.0.7-2
487bcef
- Rebuild for new libcrypto
487bcef
75611be
* Tue Nov 13 2007 Paul Wouters <paul@xelerance.com> - 3.0.7-1
75611be
- Updated to new version
75611be
- fix RELNOTES/README to be utf8
32ca9f4
- Fix path to nsd.db in cron job.
75611be
da6cbb8
* Thu Nov  8 2007 Paul Wouters <paul@xelerance.com> - 3.0.6-7
da6cbb8
- Modified cron to only rebuild/reload when zone updates
da6cbb8
  have been received
da6cbb8
709b0f5
* Wed Nov  7 2007 Paul Wouters <paul@xelerance.com> - 3.0.6-6
709b0f5
- Added hourly cron job to do various maintenance tasks
709b0f5
- Added nsd rebuild to create the proper nsd.db file on startup
709b0f5
- Added nsd patch on shutdown to ensure zonefiles are up to date
709b0f5
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