%bcond_with systemd Summary: Fast and lean authoritative DNS Name Server Summary(ja): 高速で最小限のAuthoritative専用DNSネームサーバ Name: nsd Version: 4.10.1 Release: 1%{?_dist_release}%{?with_systemd:.systemd} Group: servers Vendor: Project Vine Distribution: Vine Linux License: BSD Url: http://www.nlnetlabs.nl/%{name}/ Source: https://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz Source1: nsd.init Source3: nsd.sysconfig Source10: nsd.service Source11: nsd-keygen.service Source12: tmpfiles-nsd.conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: flex, libevent-devel, openssl-devel Requires(pre): shadow-utils %if %{with systemd} %global piddir /run/%{name} BuildRequires: systemd-devel %{?systemd_requires} %else %global piddir %{_localstatedir}/run/%{name} Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service %endif %description NSD is a complete implementation of an authoritative DNS name server. For further information about what NSD is and what NSD is not please consult the REQUIREMENTS document which is a part of this distribution %description -l ja NSD は Authoritative DNSネームサーバの完全な実装です。 NSD に関する詳しい情報は REQUIREMENTS ドキュメントを参照してください。 %debug_package %prep %setup -q autoreconf -vif %build %configure \ --with-configdir=%{_sysconfdir}/nsd \ --with-nsd_conf_file=%{_sysconfdir}/nsd/nsd.conf \ --with-zonesdir=%{_sysconfdir}/nsd \ --with-pidfile=%{piddir}/%{name}.pid \ --with-zonelistfile=%{_sharedstatedir}/nsd/zone.list \ --with-ssl \ --with-user=nsd \ --with-xfrdfile=%{_localstatedir}/lib/%{name}/ixfr.state \ --with-max-ips=1024 \ --with-dbfile="" \ --enable-bind8-stats \ --enable-zone-stats \ --enable-checking \ --enable-mmap \ --enable-nsec3 \ --enable-ratelimit \ --enable-pie \ --enable-relro-now \ --enable-recvmmsg \ --enable-packed \ --enable-memclean \ %if %{with systemd} --enable-systemd \ %endif %{nil} %{__make} %{?_smp_mflags} #convert to utf8 iconv -f iso8859-1 -t utf-8 doc/RELNOTES > doc/RELNOTES.utf8 iconv -f iso8859-1 -t utf-8 doc/CREDITS > doc/CREDITS.utf8 mv -f doc/RELNOTES.utf8 doc/RELNOTES mv -f doc/CREDITS.utf8 doc/CREDITS %install rm -rf %{buildroot} %{__make} DESTDIR=%{buildroot} install install -d -m 0700 %{buildroot}%{_localstatedir}/run/%{name} install -d -m 0700 %{buildroot}%{_localstatedir}/lib/%{name} %if %{with systemd} mkdir -p %{buildroot}%{_unitdir} install -m 0644 %{SOURCE10} %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_tmpfilesdir} install -m 0644 %{SOURCE12} %{buildroot}%{_tmpfilesdir}/nsd.conf %else install -d -m 0755 %{buildroot}%{_initrddir} install -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/nsd install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig install -m 0755 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/%{name} %endif # change .sample to normal config files mv %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample %{buildroot}%{_sysconfdir}/nsd/nsd.conf sed -i \ -e 's/# database:.*$/database: ""/' \ -e 's/# round-robin:.*$/round-robin: yes/' \ -e 's/# minimal-responses:.*$/minimal-responses: yes/' \ -e 's/# refuse-any:.*$/refuse-any: yes/' \ -e 's/# control-enable:.*$/control-enable: yes/' \ -e 's|# control-interface: ::1|control-interface: %{piddir}/nsd.ctl|' \ %{buildroot}%{_sysconfdir}/nsd/nsd.conf # Install ghost files for name in control server; do for extension in key pem; do touch %{buildroot}%{_sysconfdir}/nsd/nsd_${name}.${extension} done done %clean rm -rf ${RPM_BUILD_ROOT} %pre getent group nsd >/dev/null || groupadd -r nsd getent passwd nsd >/dev/null || \ useradd -r -g nsd -d /etc/nsd -s /sbin/nologin \ -c "nsd daemon account" nsd exit 0 %post chown -R nsd.nsd %{_localstatedir}/lib/nsd 2>/dev/null ||: chown -R nsd.nsd %{_localstatedir}/run/nsd 2>/dev/null ||: %if %{with systemd} %systemd_post nsd.service %else /sbin/chkconfig --add %{name} if [ ! -f %{_sysconfdir}/nsd/nsd_control.pem ]; then /usr/sbin/nsd-control-setup fi %endif %preun %if %{with systemd} %systemd_preun nsd.service %else if [ $1 -eq 0 -o -x /bin/systemctl ]; then /sbin/service %{name} stop /sbin/chkconfig --del %{name} fi %endif %postun %if %{with systemd} %systemd_postun_with_restart nsd.service %else if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then /sbin/service %{name} condrestart fi %endif %files %defattr(-,root,root,-) %doc doc/* %doc contrib/nsd.zones2nsd.conf %dir %{_sysconfdir}/nsd/ %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.conf #%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.zones %attr(0640,root,nsd) %ghost %{_sysconfdir}/nsd/nsd_server.key %attr(0640,root,nsd) %ghost %{_sysconfdir}/nsd/nsd_server.pem %attr(0640,root,nsd) %ghost %{_sysconfdir}/nsd/nsd_control.key %attr(0640,root,nsd) %ghost %{_sysconfdir}/nsd/nsd_control.pem %if %{with systemd} %attr(0644,root,root) %{_unitdir}/nsd.service %attr(0644,root,root) %{_tmpfilesdir}/nsd.conf %else %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/nsd %attr(0755,root,root) %{_initrddir}/%{name} %ghost %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name} %endif %attr(0755,%{name},%{name}) %dir %{_localstatedir}/lib/%{name} %{_sbindir}/* %{_mandir}/*/* %changelog * Sat Aug 03 2024 Tomohiro "Tomo-p" KATO 4.10.1-1 - new upstream release. * Thu Jun 13 2024 Tomohiro "Tomo-p" KATO 4.10.0-1 - new upstream release. * Fri Apr 05 2024 Tomohiro "Tomo-p" KATO 4.9.1-1 - new upstream release. * Thu Apr 04 2024 Tomohiro "Tomo-p" KATO 4.9.0-1 - new upstream release. * Wed Dec 06 2023 Tomohiro "Tomo-p" KATO 4.8.0-1 - new upstream release. * Tue Jul 11 2023 Tomohiro "Tomo-p" KATO 4.7.0-1 - new upstream release. * Thu Nov 10 2022 Tomohiro "Tomo-p" KATO 4.6.1-1 - new upstream release. * Thu Jun 30 2022 Tomohiro "Tomo-p" KATO 4.6.0-1 - new upstream release. * Sat May 14 2022 Tomohiro "Tomo-p" KATO 4.5.0-1 - new upstream release. * Thu Feb 17 2022 Tomohiro "Tomo-p" KATO 4.4.0-1 - new upstream release. * Thu Dec 09 2021 Tomohiro "Tomo-p" KATO 4.3.9-1 - new upstream release. * Fri Dec 03 2021 Tomohiro "Tomo-p" KATO 4.3.8-2 - fixed systemd-unit. * Tue Oct 12 2021 Tomohiro "Tomo-p" KATO 4.3.8-1 - new upstream release. * Tue Oct 05 2021 Tomohiro "Tomo-p" KATO 4.3.7-2 - rebuilt with openssl-3.0.0. * Fri Jul 23 2021 Tomohiro "Tomo-p" KATO 4.3.7-1 - new upstream release. * Tue Apr 06 2021 Tomohiro "Tomo-p" KATO 4.3.6-1 - new upstream release. * Tue Jan 26 2021 Tomohiro "Tomo-p" KATO 4.3.5-1 - new upstream release. * Wed Dec 02 2020 Tomohiro "Tomo-p" KATO 4.3.4-1 - new upstream release. * Thu Oct 08 2020 Tomohiro "Tomo-p" KATO 4.3.3-1 - new upstream release. * Wed Jul 15 2020 Tomohiro "Tomo-p" KATO 4.3.2-1 - new upstream release. * Tue May 19 2020 Tomohiro "Tomo-p" KATO 4.3.1-1 - new upstream release. * Tue Apr 14 2020 Tomohiro "Tomo-p" KATO 4.3.0-3 - rebuilt with libevent-2.1.11. * Tue Apr 07 2020 Tomohiro "Tomo-p" KATO 4.3.0-2 - fixed nsd-keygen.service. - updated nsd.conf. * Mon Apr 06 2020 Tomohiro "Tomo-p" KATO 4.3.0-1 - new upstream release. - dropped Patch0. - added systemd support (disabled as default). * Mon Dec 16 2019 Tomohiro "Tomo-p" KATO 4.2.4-1 - new upstream release. * Sat Aug 24 2019 Tomohiro "Tomo-p" KATO 4.2.2-1 - new upstream release. * Sun Nov 04 2018 Tomohiro "Tomo-p" KATO 4.1.25-1 - new upstream release. - rebuilt with openssl-1.1.1 and libevent-2.1.8. * Thu Jan 04 2018 Tomohiro "Tomo-p" KATO 4.1.19-1 - new upstream release. * Wed Mar 8 2017 Tomohiro "Tomo-p" KATO 4.1.15-1 - new upstream release. * Thu Jun 16 2016 Tomohiro "Tomo-p" KATO 4.1.10-1 - new upstream release. * Wed Mar 16 2016 Tomohiro "Tomo-p" KATO 4.1.9-1 - new upstream release. * Mon Mar 14 2016 Tomohiro "Tomo-p" KATO 4.1.8-2 - rebuilt with openssl-1.0.2g. * Sat Mar 12 2016 Tomohiro "Tomo-p" KATO 4.1.8-1 - new upstream release. * Thu Dec 10 2015 Tomohiro "Tomo-p" KATO 4.1.7-1 - new upstream release. * Tue Nov 3 2015 Tomohiro "Tomo-p" KATO 4.1.6-1 - new upstream release. * Fri Jun 26 2015 Tomohiro "Tomo-p" KATO 4.1.3-1 - new upstream release. - dropped Source2 (no longer needed). * Sat Feb 23 2013 Daisuke SUZUKI 3.2.15-1 - new upstream release * Thu Jul 19 2012 Daisuke SUZUKI 3.2.12-1 - new upstream release * Wed Feb 29 2012 Daisuke SUZUKI 3.2.10-1 - new upstream release * Fri Mar 25 2011 Daisuke SUZUKI 3.2.8-1 - new upstream release * Sat May 29 2010 Daisuke SUZUKI 3.2.4-1 - initial build for Vine Linux * Wed Jan 06 2010 Paul Wouters - 3.2.4-1 - Updated to nsd 3.2.4 * Tue Jan 05 2010 Paul Wouters - 3.2.3-4 - Incorporated Ville Mattila's fixes to nsd.cron - Support for NSD_AUTOREBUILD in /etc/sysconfig/nsd [Ville] * Fri Aug 21 2009 Tomas Mraz - 3.2.3-3 - rebuilt with new openssl * Thu Aug 20 2009 Ville Mattila - 3.2.3-2 - The 'nsdc patch' and 'nsdc rebuild' commands wrote a %%1 file by mistake * Mon Aug 17 2009 Paul Wouters - 3.2.3-1 -Updated to version 3.2.3 * Sat Jul 25 2009 Fedora Release Engineering - 3.2.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Sat Jun 06 2009 Paul Wouters - 3.2.2-3 - Fixed /dev/nul which cause a file \%%1 to be written by cron - Bump for EVR. * Mon May 18 2009 Paul Wouters - 3.2.2-1 - Upgraded to 3.2.2 security release http://www.nlnetlabs.nl/publications/NSD_vulnerability_announcement.html * Thu Apr 09 2009 Ville Mattila - 3.2.1-6 - Make various file paths used by the nsd.init script configurable from /etc/sysconfig/nsd. - Add template /etc/sysconfig/nsd. * Sun Mar 08 2009 Paul Wouters - 3.2.1-5 - nsd used the 'named' subsystem in one call in the init script * Wed Feb 25 2009 Fedora Release Engineering - 3.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Mon Jan 26 2009 Paul Wouters - 3.2.1-3 - Fix init script 'unary operator' error. * Mon Jan 26 2009 Paul Wouters - 3.2.1-1 - Updated to new version 3.2.1 * Sat Jan 17 2009 Tomas Mraz - 3.2.0-4 - rebuild with new openssl * Mon Nov 24 2008 Paul Wouters - 3.2.0-3 - Updates summary as per Richard Hughes guidelines * Mon Nov 10 2008 Paul Wouters - 3.2.0-2 - Bump version after pre-release version correction. * Mon Nov 10 2008 Paul Wouters - 3.2.0-1 - 3.2.0-1 * Thu Oct 9 2008 Paul Wouters - 3.1.1-1 - updated to 3.1.1 * Mon Aug 11 2008 Tom "spot" Callaway - 3.1.0-2 - fix license tag - fix static user creation * Mon Jun 30 2008 Paul Wouters - 3.1.0-1 - Updated to 3.1.0 * Tue May 6 2008 Paul Wouters - 3.0.8-2 - Fix /dev/null redirection [Venkatesh Krishnamurthi] * Tue May 6 2008 Paul Wouters - 3.0.8-1 - Updated to 3.0.8 * Tue Feb 19 2008 Fedora Release Engineering - 3.0.7-3 - Autorebuild for GCC 4.3 * Wed Dec 5 2007 Paul Wouters - 3.0.7-2 - Rebuild for new libcrypto * Tue Nov 13 2007 Paul Wouters - 3.0.7-1 - Updated to new version - fix RELNOTES/README to be utf8 - Fix path to nsd.db in cron job. * Thu Nov 8 2007 Paul Wouters - 3.0.6-7 - Modified cron to only rebuild/reload when zone updates have been received * Wed Nov 7 2007 Paul Wouters - 3.0.6-6 - Added hourly cron job to do various maintenance tasks - Added nsd rebuild to create the proper nsd.db file on startup - Added nsd patch on shutdown to ensure zonefiles are up to date * Tue Oct 2 2007 Paul Wouters - 3.0.6-5 - nsdc update and nsdc notify are no longer needed in initscript. * Mon Sep 24 2007 Jesse Keating - 3.0.6-4 - Bump release for upgrade path. * Fri Sep 14 2007 Paul Wouters 3.0.6-3 - Do not include examples from nsd.conf.sample that causes bogus network traffic. * Fri Sep 14 2007 Paul Wouters 3.0.6-2 - Change locations of ixfr.db and xfrd.state to /var/lib/nsd - Enable NSEC3 - Delay running nsdc update until after nsd has started - Delete xfrd.state on nsd stop - Run nsdc notify in the background, since it can take a very long time when remote servers are unavailable. * Tue Sep 11 2007 Paul Wouters 3.0.6-1 - Upgraded to 3.0.6 - Do not include bind2nsd, since it didn't compile for me * Fri Jul 13 2007 Paul Wouters 3.0.5-2 - Fix init script, bug #245546 * Fri Mar 23 2007 Paul Wouters 3.0.5-1 - Upgraded to 3.0.5 * Thu Dec 7 2006 Paul Wouters 3.0.3-1 - Upgraded to 3.0.3 * Mon Nov 27 2006 Paul Wouters 3.0.2-1 - Upgraded to 3.0.2. - Use new configuration file nsd.conf. Still needs migration script. patch from Farkas Levente * Mon Oct 16 2006 Paul Wouters 2.3.6-2 - Bump version for upgrade path * Thu Oct 12 2006 Paul Wouters 2.3.6-1 - Upgraded to 2.3.6 - Removed obsolete workaround in nsd.init - Fixed spec file so daemon gets properly restarted on upgrade * Mon Sep 11 2006 Paul Wouters 2.3.5-4 - Rebuild requested for PT_GNU_HASH support from gcc - Removed dbaccess.c from doc section * Mon Jun 26 2006 Paul Wouters - 2.3.5-3 - Bump version for FC-x upgrade path * Mon Jun 26 2006 Paul Wouters - 2.3.5-1 - Upgraded to nsd-2.3.5 * Sun May 7 2006 Paul Wouters - 2.3.4-3 - Upgraded to nsd-2.3.4. - Removed manual install targets because DESTDIR is now supported - Re-enabled --checking, checking patch no longer needed and removed. - Work around in nsd.init for nsd failing to start when there is no ipv6 * Thu Dec 15 2005 Paul Wouters - 2.3.3-7 - chkconfig and attribute changes as proposed by Dmitry Butskoy * 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. * Mon Dec 12 2005 Paul Wouters - 2.3.3-4 - upgraded to nsd-2.3.3 * Wed Dec 7 2005 Tom "spot" Callaway - 2.3.2-2 - minor cleanups * Mon Dec 5 2005 Paul Wouters - 2.3.2-1 - Upgraded to 2.3.2. Changed post scripts to comply to Fedora Extras policies (eg do not start daemon on fresh install) * Tue Oct 4 2005 Paul Wouters - 2.3.1-1 - Initial version