a5ff2da
Summary: Fast and lean authoritative DNS Name Server
fea33a3
Name: nsd
3fded86
Version: 3.2.2
a5ff2da
Release: 2%{?dist}
baae0f3
License: BSD
baae0f3
Url: http://www.nlnetlabs.nl/%{name}/
baae0f3
Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
fea33a3
Source1: nsd.init
baae0f3
Source2: nsd.cron
baae0f3
Source3: nsd.sysconfig
3fded86
Patch0: nsd-install.patch
fea33a3
Group: System Environment/Daemons
fea33a3
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0fb8b47
BuildRequires: flex, openssl-devel
baae0f3
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
fea33a3
%setup -q 
bef7b43
%patch0 -p1
fea33a3
baae0f3
%build
183a9e3
%configure --enable-bind8-stats --enable-checking --enable-nsec3 --enable-nsid \
baae0f3
           --with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid --with-ssl \
baae0f3
           --with-user=nsd --with-difffile=%{_localstatedir}/lib/%{name}/ixfr.db \
a389a6c
           --with-xfrdfile=%{_localstatedir}/lib/%{name}/ixfr.state \
a389a6c
           --with-dbfile=%{_localstatedir}/lib/%{name}/nsd.db
fea33a3
fea33a3
%{__make} %{?_smp_mflags}
baae0f3
#convert to utf8
baae0f3
iconv -f iso8859-1 -t utf-8 doc/RELNOTES > doc/RELNOTES.utf8
baae0f3
iconv -f iso8859-1 -t utf-8 doc/CREDITS > doc/CREDITS.utf8
baae0f3
mv -f doc/RELNOTES.utf8 doc/RELNOTES
baae0f3
mv -f doc/CREDITS.utf8 doc/CREDITS
baae0f3
fea33a3
fea33a3
%install
e39af5e
rm -rf %{buildroot}
c025ce8
%{__make} DESTDIR=%{buildroot} install
baae0f3
install -d -m 0755 %{buildroot}%{_initrddir}
baae0f3
install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly
baae0f3
install -c -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/nsd
fea33a3
install -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/nsd
baae0f3
install -d -m 0700 %{buildroot}%{_localstatedir}/run/%{name}
baae0f3
install -d -m 0700 %{buildroot}%{_localstatedir}/lib/%{name}
baae0f3
install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
baae0f3
install -m 0755 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
fea33a3
c025ce8
# change .sample to normal config files
baae0f3
head -76 %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample > %{buildroot}%{_sysconfdir}/nsd/nsd.conf
baae0f3
rm %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample 
baae0f3
echo "database: /var/lib/nsd/nsd.db" >> %{buildroot}%{_sysconfdir}/nsd/nsd.conf
baae0f3
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,-)
baae0f3
%doc doc/*
baae0f3
%doc contrib/nsd.zones2nsd.conf
fea33a3
%dir %{_sysconfdir}/nsd/
baae0f3
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.conf
baae0f3
#%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.zones
baae0f3
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/nsd
fea33a3
%attr(0755,root,root) %{_initrddir}/%{name}
baae0f3
%{_sysconfdir}/cron.hourly/nsd
baae0f3
%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
baae0f3
%attr(0755,%{name},%{name}) %dir %{_localstatedir}/lib/%{name}
fea33a3
%{_sbindir}/*
fea33a3
%{_mandir}/*/*
fea33a3
fea33a3
%pre
baae0f3
getent group nsd >/dev/null || groupadd -r nsd
baae0f3
getent passwd nsd >/dev/null || \
baae0f3
useradd -r -g nsd -d /etc/nsd -s /sbin/nologin \
baae0f3
-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
baae0f3
  /sbin/service %{name} condrestart 
fea33a3
fi
fea33a3
fea33a3
%changelog
a5ff2da
* Sat Jun 06 2009 Paul Wouters <paul@xelerance.com> - 3.2.2-2
a5ff2da
- Fix %1 error on cronjob. Updated Description:
a5ff2da
3fded86
* Mon May 18 2009 Paul Wouters <paul@xelerance.com> - 3.2.2-1
3fded86
- Upgraded to 3.2.2 security release
3fded86
  http://www.nlnetlabs.nl/publications/NSD_vulnerability_announcement.html
3fded86
- Removed obsoleted options --enable-plugins --enable-mmap 
3fded86
757178e
* Fri Apr 10 2009 Paul Wouters <paul@xelerance.com> - 3.2.1-2
757178e
- Fixes to initscripts 
757178e
- Added --with-dbfile to point to the right place
757178e
baae0f3
* Fri Apr 10 2009 Paul Wouters <paul@xelerance.com> - 3.2.1-1
baae0f3
- updated to 3.2.1
baae0f3
- fixed /dev/nul which cause a file /%1 to be written by cron
baae0f3
- Applied Ville Mattila's changes to support non-default locations
baae0f3
baae0f3
* Thu Oct  9 2008 Paul Wouters <paul@xelerance.com> - 3.1.1-1
baae0f3
- updated to 3.1.1
baae0f3
baae0f3
* Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.1.0-2
baae0f3
- fix license tag
baae0f3
- fix static user creation
baae0f3
baae0f3
* Mon Jun 30 2008 Paul Wouters <paul@xelerance.com> - 3.1.0-1
baae0f3
- Updated to 3.1.0
baae0f3
baae0f3
* Tue May  6 2008 Paul Wouters <paul@xelerance.com> - 3.0.8-2
baae0f3
- Fix /dev/null redirection [Venkatesh Krishnamurthi]
baae0f3
baae0f3
* Tue May  6 2008 Paul Wouters <paul@xelerance.com> - 3.0.8-1
baae0f3
- Updated to 3.0.8
baae0f3
baae0f3
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.0.7-3
baae0f3
- Autorebuild for GCC 4.3
baae0f3
baae0f3
* Wed Dec  5 2007 Paul Wouters <paul@xelerance.com> - 3.0.7-2
baae0f3
- Rebuild for new libcrypto
baae0f3
baae0f3
* Tue Nov 13 2007 Paul Wouters <paul@xelerance.com> - 3.0.7-1
baae0f3
- Updated to new version
baae0f3
- fix RELNOTES/README to be utf8
baae0f3
- Fix path to nsd.db in cron job.
baae0f3
baae0f3
* Thu Nov  8 2007 Paul Wouters <paul@xelerance.com> - 3.0.6-7
baae0f3
- Modified cron to only rebuild/reload when zone updates
baae0f3
  have been received
baae0f3
baae0f3
* Wed Nov  7 2007 Paul Wouters <paul@xelerance.com> - 3.0.6-6
baae0f3
- Added hourly cron job to do various maintenance tasks
baae0f3
- Added nsd rebuild to create the proper nsd.db file on startup
baae0f3
- Added nsd patch on shutdown to ensure zonefiles are up to date
baae0f3
baae0f3
* Tue Oct  2 2007 Paul Wouters <paul@xelerance.com> - 3.0.6-5
baae0f3
- nsdc update and nsdc notify are no longer needed in initscript.
baae0f3
baae0f3
* Mon Sep 24 2007 Jesse Keating <jkeating@redhat.com> - 3.0.6-4
baae0f3
- Bump release for upgrade path.
baae0f3
baae0f3
* Fri Sep 14 2007 Paul Wouters <paul@xelerance.com> 3.0.6-3
baae0f3
- Do not include examples from nsd.conf.sample that causes
baae0f3
  bogus network traffic.
baae0f3
baae0f3
* Fri Sep 14 2007 Paul Wouters <paul@xelerance.com> 3.0.6-2
baae0f3
- Change locations of ixfr.db and xfrd.state to /var/lib/nsd
baae0f3
- Enable NSEC3
baae0f3
- Delay running nsdc update until after nsd has started
baae0f3
- Delete xfrd.state on nsd stop
baae0f3
- Run nsdc notify in the background, since it can take
baae0f3
  a very long time when remote servers are unavailable.
baae0f3
baae0f3
* Tue Sep 11 2007 Paul Wouters <paul@xelerance.com> 3.0.6-1
baae0f3
- Upgraded to 3.0.6
baae0f3
- Do not include bind2nsd, since it didn't compile for me
baae0f3
baae0f3
* Fri Jul 13 2007 Paul Wouters <paul@xelerance.com> 3.0.5-2
bd8db02
- Fix init script, bug #245546
bd8db02
baae0f3
* Fri Mar 23 2007 Paul Wouters <paul@xelerance.com> 3.0.5-1
baae0f3
- Upgraded to 3.0.5
baae0f3
baae0f3
* Thu Dec  7 2006 Paul Wouters <paul@xelerance.com> 3.0.3-1
baae0f3
- Upgraded to 3.0.3
baae0f3
baae0f3
* Mon Nov 27 2006 Paul Wouters <paul@xelerance.com> 3.0.2-1
baae0f3
- Upgraded to 3.0.2.
baae0f3
- Use new configuration file nsd.conf. Still needs migration script.
baae0f3
  patch from Farkas Levente <lfarkas@bppiac.hu>
ba5cf6b
baae0f3
* Mon Oct 16 2006  Paul Wouters <paul@xelerance.com> 2.3.6-2
e9f5ce6
- Bump version for upgrade path
e9f5ce6
baae0f3
* 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.
baae0f3
- 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