a25e271
Summary: Fast and lean authoritative DNS Name Server
fea33a3
Name: nsd
Paul Wouters fe59c8e
Version: 3.2.15
1ed1c80
Release: 1%{?dist}
d7c2c32
License: BSD
32e1238
Url: http://www.nlnetlabs.nl/%{name}/
c9ed87c
Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
fea33a3
Source1: nsd.init
709b0f5
Source2: nsd.cron
a25e271
Source3: nsd.sysconfig
cc5fe49
Source4: nsd.conf
f4a96a5
Patch0: nsd-install.patch
Paul Wouters 9194632
Patch1: nsd-fixlogfile.patch
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
f4a96a5
%patch0 -p1
Paul Wouters 9194632
%patch1 -p1
fea33a3
d7c2c32
%build
cc5fe49
%configure --enable-bind8-stats \
cc5fe49
    --enable-checking \
cc5fe49
    --enable-nsec3 \
cc5fe49
    --with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid \
cc5fe49
    --with-ssl \
cc5fe49
    --with-user=nsd \
cc5fe49
    --with-difffile=%{_localstatedir}/lib/%{name}/ixfr.db \
cc5fe49
    --with-xfrdfile=%{_localstatedir}/lib/%{name}/ixfr.state \
Paul Wouters fe59c8e
    --with-dbfile=%{_localstatedir}/lib/%{name}/nsd.db \
83a8cce
    --enable-ratelimit
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
43f3812
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
43f3812
install -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/nsd
Paul Wouters 9194632
install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name}
59bea48
install -d -m 0700 %{buildroot}%{_localstatedir}/lib/%{name}
a25e271
install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
a25e271
install -m 0755 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
fea33a3
4dfd50d
rm %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample 
cc5fe49
cp %{SOURCE4}  %{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
cc5fe49
%attr(0750,root,nsd) %dir %{_sysconfdir}/nsd
cc5fe49
%attr(0644,root,nsd) %config(noreplace) %{_sysconfdir}/nsd/nsd.conf
a25e271
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/nsd
43f3812
%attr(0755,root,root) %{_initrddir}/%{name}
709b0f5
%{_sysconfdir}/cron.hourly/nsd
cc5fe49
%ghost %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 \
cc5fe49
        -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
cc5fe49
        /sbin/service %{name} stop >/dev/null 2>&1
e39af5e
        /sbin/chkconfig --del %{name} 
fea33a3
fi
fea33a3
fea33a3
%postun
fea33a3
if [ "$1" -ge "1" ]; then
cc5fe49
  /sbin/service %{name} condrestart >/dev/null 2>&1 || :
fea33a3
fi
fea33a3
fea33a3
%changelog
83a8cce
* Tue Feb 05 2013 Paul Wouters <pwouters@redhat.com> - 3.2.15-2
Paul Wouters fe59c8e
- Updated to 3.2.15 which has support for rate limiting
cbd5ae7
- Only run nsdc rebuild hourly cronjob when nsd service is running
Paul Wouters fe59c8e
- Fix nsd.init to return proper return code for 'status' cmd
cbd5ae7
124901d
* Fri Nov 23 2012 Paul Wouters <pwouters@redhat.com> - 3.2.14-2
79bd4f5
- Updated to 32.14 with minor bugfixes and TCP writev support
124901d
- Only run nsdc rebuild hourly cronjob when nsd service is running
79bd4f5
1ed1c80
* Fri Jul 27 2012 Paul Wouters <pwouters@redhat.com> - 3.2.13-1
1ed1c80
- Updated to 3.2.13, addresses VU#517036 CVE-2012-2979
1ed1c80
  (note Fedora/EPEL packages are not vulnerable to this)
639d620
- Add /var/run/nsd via tmpfiles (rhbz#842021)
71b9330
102c470
* Thu Jul 19 2012 Paul Wouters <pwouters@redhat.com> - 3.2.12-1
102c470
- Upgraded to 3.2.12 which fixes CVE-2012-2978 (rhbz#841268)
102c470
329e365
* Mon Jul 16 2012 Paul Wouters <pwouters@redhat.com> - 3.2.11-1
329e365
- Updated to 3.2.11 (support for TLSA, GOST, bugfixes)
329e365
dc08a32
* Wed Feb 15 2012 Paul Wouters <pwouters@redhat.com> - 3.2.10-1
cc5fe49
- Updated to 3.2.10
cc5fe49
- Ship our own nsd.conf instead of hacking the nsd.conf.sample
cc5fe49
- Merge in fixed by Tuomo Soini <tis@foobar.fi>
cc5fe49
  - Fix %%preun and %%postun to be quiet
cc5fe49
  - Fix /etc/nsd permissions to be root:nsd mode 0750
cc5fe49
  - Cleanup /etc/sysconfig/nsd
cc5fe49
  - Change startup order of nsd so it works with IPv6 on 6to4
cc5fe49
  - Revert piddir to be owned by user nsd
cc5fe49
  - Initscript cleanup
cc5fe49
Paul Wouters 9194632
* Tue Jun  7 2011 Paul Wouters <paul@xelerance.com> - 3.2.8-1
Paul Wouters 9194632
- updated to 3.2.8
Paul Wouters 9194632
- fix /var/run/nsd to be owned by root, not nsd
Paul Wouters 9194632
- fix init status to work as expected (bz#525107)
Paul Wouters 9194632
- fix nsd.conf and nsd.conf.5 to have correct logfile
Paul Wouters 9194632
- fix nsd.init syntax error by piddir change
Paul Wouters 9194632
- fix initscript to create /var/run/nsd if missing (bz#710376)
Paul Wouters 9194632
Paul Wouters 8c9faef
* Wed Mar 09 2011 Paul Wouters <paul@xelerance.com> - 3.2.7-5
Paul Wouters a075d7b
- Updated to 3.2.7
Paul Wouters cdae642
- Fix for nsd.init to report OK/FAILED properly (bz#525107)
Paul Wouters cdae642
- Use ghost directive for /var/run/nsd (bz#656642)
Paul Wouters 31d3b28
- Removed obsolete --enable-nsid
Paul Wouters 31d3b28
- Remove bogus chowns for /var/*/nsdhm
Paul Wouters 31d3b28
- Fix misnamed variable NSD_AUTORELOAD which should be NSD_AUTOREBUILD
Paul Wouters 31d3b28
cdf66b0
* Wed Jan 06 2010 Paul Wouters <paul@xelerance.com> - 3.2.4-1
cdf66b0
- Upgraded to 3.2.4. Minor fixes to cron/init/sysconfig scripts
cdf66b0
c772ab1
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 3.2.3-3
c772ab1
- rebuilt with new openssl
c772ab1
6d6ff76
* Thu Aug 20 2009 Ville Mattila <vmattila@csc.fi> - 3.2.3-2
6d6ff76
- The 'nsdc patch' and 'nsdc rebuild' commands wrote a %%1 file by mistake
6d6ff76
3fa14f2
* Mon Aug 17 2009 Paul Wouters <paul@xelerance.com> - 3.2.3-1
3fa14f2
-Updated to version 3.2.3
3fa14f2
a11c503
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.2-4
a11c503
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a11c503
bbdc21b
* Sat Jun 06 2009 Paul Wouters <paul@xelerance.com> - 3.2.2-3
bbdc21b
- Fixed /dev/nul which cause a file \%%1 to be written by cron
bbdc21b
- Bump for EVR.
bbdc21b
f4a96a5
* Mon May 18 2009 Paul Wouters <paul@xelerance.com> - 3.2.2-1
f4a96a5
- Upgraded to 3.2.2 security release
f4a96a5
  http://www.nlnetlabs.nl/publications/NSD_vulnerability_announcement.html
f4a96a5
a25e271
* Thu Apr 09 2009 Ville Mattila <vmattila@csc.fi> - 3.2.1-6
a25e271
- Make various file paths used by the nsd.init script configurable
a25e271
  from /etc/sysconfig/nsd.
a25e271
- Add template /etc/sysconfig/nsd.
a25e271
e4e00f6
* Sun Mar 08 2009 Paul Wouters <paul@xelerance.com> - 3.2.1-5
e4e00f6
- nsd used the 'named' subsystem in one call in the init script
e4e00f6
f7b588c
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-4
f7b588c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f7b588c
43f3812
* Mon Jan 26 2009 Paul Wouters <paul@xelerance.com> - 3.2.1-3
43f3812
- Fix init script 'unary operator' error.
32640be
6c7e77b
* Mon Jan 26 2009 Paul Wouters <paul@xelerance.com> - 3.2.1-1
6c7e77b
- Updated to new version 3.2.1
6c7e77b
76f2997
* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 3.2.0-4
76f2997
- rebuild with new openssl
76f2997
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