nsd-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. %bcond_with systemd
  2. Summary: Fast and lean authoritative DNS Name Server
  3. Summary(ja): 高速で最小限のAuthoritative専用DNSネームサーバ
  4. Name: nsd
  5. Version: 4.3.0
  6. Release: 3%{?_dist_release}%{?with_systemd:.systemd}
  7. Group: System Environment/Daemons
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  11. License: BSD
  12. Url: http://www.nlnetlabs.nl/%{name}/
  13. Source: https://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
  14. Source1: nsd.init
  15. Source3: nsd.sysconfig
  16. Source10: nsd.service
  17. Source11: nsd-keygen.service
  18. Source12: tmpfiles-nsd.conf
  19. BuildRequires: flex, libevent-devel, openssl-devel
  20. Requires(pre): shadow-utils
  21. %if %{with systemd}
  22. %global piddir /run/%{name}
  23. BuildRequires: systemd-devel
  24. %{?systemd_requires}
  25. %else
  26. %global piddir %{_localstatedir}/run/%{name}
  27. Requires(post): /sbin/chkconfig
  28. Requires(preun): /sbin/chkconfig
  29. Requires(preun): /sbin/service
  30. Requires(postun): /sbin/service
  31. %endif
  32. %description
  33. NSD is a complete implementation of an authoritative DNS name server.
  34. For further information about what NSD is and what NSD is not please
  35. consult the REQUIREMENTS document which is a part of this distribution
  36. %description -l ja
  37. NSD は Authoritative DNSネームサーバの完全な実装です。
  38. NSD に関する詳しい情報は REQUIREMENTS ドキュメントを参照してください。
  39. %prep
  40. %setup -q
  41. autoreconf
  42. %build
  43. %configure \
  44. --with-configdir=%{_sysconfdir}/nsd \
  45. --with-nsd_conf_file=%{_sysconfdir}/nsd/nsd.conf \
  46. --with-zonesdir=%{_sysconfdir}/nsd \
  47. --with-pidfile=%{piddir}/%{name}/%{name}.pid \
  48. --with-zonelistfile=%{_sharedstatedir}/nsd/zone.list \
  49. --with-ssl \
  50. --with-user=nsd \
  51. --with-xfrdfile=%{_localstatedir}/lib/%{name}/ixfr.state \
  52. --with-max-ips=1024 \
  53. --with-dbfile="" \
  54. --enable-bind8-stats \
  55. --enable-zone-stats \
  56. --enable-checking \
  57. --enable-mmap \
  58. --enable-nsec3 \
  59. --enable-ratelimit \
  60. --enable-pie \
  61. --enable-relro-now \
  62. --enable-recvmmsg \
  63. --enable-packed \
  64. --enable-memclean \
  65. %if %{with systemd}
  66. --enable-systemd \
  67. %endif
  68. %{nil}
  69. %{__make} %{?_smp_mflags}
  70. #convert to utf8
  71. iconv -f iso8859-1 -t utf-8 doc/RELNOTES > doc/RELNOTES.utf8
  72. iconv -f iso8859-1 -t utf-8 doc/CREDITS > doc/CREDITS.utf8
  73. mv -f doc/RELNOTES.utf8 doc/RELNOTES
  74. mv -f doc/CREDITS.utf8 doc/CREDITS
  75. %install
  76. rm -rf %{buildroot}
  77. %{__make} DESTDIR=%{buildroot} install
  78. install -d -m 0700 %{buildroot}%{_localstatedir}/run/%{name}
  79. install -d -m 0700 %{buildroot}%{_localstatedir}/lib/%{name}
  80. %if %{with systemd}
  81. mkdir -p %{buildroot}%{_unitdir}
  82. install -m 0644 %{SOURCE10} %{SOURCE11} %{buildroot}%{_unitdir}
  83. mkdir -p %{buildroot}%{_tmpfilesdir}
  84. install -m 0644 %{SOURCE12} %{buildroot}%{_tmpfilesdir}/nsd.conf
  85. %else
  86. install -d -m 0755 %{buildroot}%{_initrddir}
  87. install -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/nsd
  88. install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
  89. install -m 0755 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
  90. %endif
  91. # change .sample to normal config files
  92. mv %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample %{buildroot}%{_sysconfdir}/nsd/nsd.conf
  93. sed -i \
  94. -e 's/# database:.*$/database: ""/' \
  95. -e 's/# round-robin:.*$/round-robin: yes/' \
  96. -e 's/# minimal-responses:.*$/minimal-responses: yes/' \
  97. -e 's/# refuse-any:.*$/refuse-any: yes/' \
  98. -e 's/# control-enable:.*$/control-enable: yes/' \
  99. -e 's|# control-interface: ::1|control-interface: %{piddir}/nsd.ctl|' \
  100. %{buildroot}%{_sysconfdir}/nsd/nsd.conf
  101. %clean
  102. rm -rf ${RPM_BUILD_ROOT}
  103. %files
  104. %defattr(-,root,root,-)
  105. %doc doc/*
  106. %doc contrib/nsd.zones2nsd.conf
  107. %dir %{_sysconfdir}/nsd/
  108. %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.conf
  109. #%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.zones
  110. %if %{with systemd}
  111. %attr(0644,root,root) %{_unitdir}/nsd.service
  112. %attr(0644,root,root) %{_unitdir}/nsd-keygen.service
  113. %attr(0644,root,root) %{_tmpfilesdir}/nsd.conf
  114. %else
  115. %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/nsd
  116. %attr(0755,root,root) %{_initrddir}/%{name}
  117. %endif
  118. %ghost %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
  119. %attr(0755,%{name},%{name}) %dir %{_localstatedir}/lib/%{name}
  120. %{_sbindir}/*
  121. %{_mandir}/*/*
  122. %pre
  123. getent group nsd >/dev/null || groupadd -r nsd
  124. getent passwd nsd >/dev/null || \
  125. useradd -r -g nsd -d /etc/nsd -s /sbin/nologin \
  126. -c "nsd daemon account" nsd
  127. exit 0
  128. %post
  129. chown -R nsd.nsd %{_localstatedir}/lib/nsd 2>/dev/null ||:
  130. chown -R nsd.nsd %{_localstatedir}/run/nsd 2>/dev/null ||:
  131. %if %{with systemd}
  132. %systemd_post nsd.service
  133. %systemd_post nsd-keygen.service
  134. %else
  135. /sbin/chkconfig --add %{name}
  136. if [ ! -f %{_sysconfdir}/nsd/nsd_control.pem ]; then
  137. /usr/sbin/nsd-control-setup
  138. fi
  139. %endif
  140. %preun
  141. %if %{with systemd}
  142. %systemd_preun nsd.service
  143. %systemd_preun nsd-keygen.service
  144. %else
  145. if [ $1 -eq 0 -o -x /bin/systemctl ]; then
  146. /sbin/service %{name} stop
  147. /sbin/chkconfig --del %{name}
  148. fi
  149. %endif
  150. %postun
  151. %if %{with systemd}
  152. %systemd_postun_with_restart nsd.service
  153. %systemd_postun nsd-keygen.service
  154. %else
  155. if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then
  156. /sbin/service %{name} condrestart
  157. fi
  158. %endif
  159. %changelog
  160. * Tue Apr 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.3.0-3
  161. - rebuilt with libevent-2.1.11.
  162. * Tue Apr 07 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.3.0-2
  163. - fixed nsd-keygen.service.
  164. - updated nsd.conf.
  165. * Mon Apr 06 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.3.0-1
  166. - new upstream release.
  167. - dropped Patch0.
  168. - added systemd support (disabled as default).
  169. * Mon Dec 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.2.4-1
  170. - new upstream release.
  171. * Sat Aug 24 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.2.2-1
  172. - new upstream release.
  173. * Sun Nov 04 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.25-1
  174. - new upstream release.
  175. - rebuilt with openssl-1.1.1 and libevent-2.1.8.
  176. * Thu Jan 04 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.19-1
  177. - new upstream release.
  178. * Wed Mar 8 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.15-1
  179. - new upstream release.
  180. * Thu Jun 16 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.10-1
  181. - new upstream release.
  182. * Wed Mar 16 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.9-1
  183. - new upstream release.
  184. * Mon Mar 14 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.8-2
  185. - rebuilt with openssl-1.0.2g.
  186. * Sat Mar 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.8-1
  187. - new upstream release.
  188. * Thu Dec 10 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.7-1
  189. - new upstream release.
  190. * Tue Nov 3 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.6-1
  191. - new upstream release.
  192. * Fri Jun 26 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.3-1
  193. - new upstream release.
  194. - dropped Source2 (no longer needed).
  195. * Sat Feb 23 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.15-1
  196. - new upstream release
  197. * Thu Jul 19 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.12-1
  198. - new upstream release
  199. * Wed Feb 29 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.10-1
  200. - new upstream release
  201. * Fri Mar 25 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.8-1
  202. - new upstream release
  203. * Sat May 29 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.4-1
  204. - initial build for Vine Linux
  205. * Wed Jan 06 2010 Paul Wouters <paul@xelerance.com> - 3.2.4-1
  206. - Updated to nsd 3.2.4
  207. * Tue Jan 05 2010 Paul Wouters <paul@xelerance.com> - 3.2.3-4
  208. - Incorporated Ville Mattila's fixes to nsd.cron
  209. - Support for NSD_AUTOREBUILD in /etc/sysconfig/nsd [Ville]
  210. * Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 3.2.3-3
  211. - rebuilt with new openssl
  212. * Thu Aug 20 2009 Ville Mattila <vmattila@csc.fi> - 3.2.3-2
  213. - The 'nsdc patch' and 'nsdc rebuild' commands wrote a %%1 file by mistake
  214. * Mon Aug 17 2009 Paul Wouters <paul@xelerance.com> - 3.2.3-1
  215. -Updated to version 3.2.3
  216. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.2-4
  217. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  218. * Sat Jun 06 2009 Paul Wouters <paul@xelerance.com> - 3.2.2-3
  219. - Fixed /dev/nul which cause a file \%%1 to be written by cron
  220. - Bump for EVR.
  221. * Mon May 18 2009 Paul Wouters <paul@xelerance.com> - 3.2.2-1
  222. - Upgraded to 3.2.2 security release
  223. http://www.nlnetlabs.nl/publications/NSD_vulnerability_announcement.html
  224. * Thu Apr 09 2009 Ville Mattila <vmattila@csc.fi> - 3.2.1-6
  225. - Make various file paths used by the nsd.init script configurable
  226. from /etc/sysconfig/nsd.
  227. - Add template /etc/sysconfig/nsd.
  228. * Sun Mar 08 2009 Paul Wouters <paul@xelerance.com> - 3.2.1-5
  229. - nsd used the 'named' subsystem in one call in the init script
  230. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-4
  231. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  232. * Mon Jan 26 2009 Paul Wouters <paul@xelerance.com> - 3.2.1-3
  233. - Fix init script 'unary operator' error.
  234. * Mon Jan 26 2009 Paul Wouters <paul@xelerance.com> - 3.2.1-1
  235. - Updated to new version 3.2.1
  236. * Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 3.2.0-4
  237. - rebuild with new openssl
  238. * Mon Nov 24 2008 Paul Wouters <paul@xelerance.com> - 3.2.0-3
  239. - Updates summary as per Richard Hughes guidelines
  240. * Mon Nov 10 2008 Paul Wouters <paul@xelerance.com> - 3.2.0-2
  241. - Bump version after pre-release version correction.
  242. * Mon Nov 10 2008 Paul Wouters <paul@xelerance.com> - 3.2.0-1
  243. - 3.2.0-1
  244. * Thu Oct 9 2008 Paul Wouters <paul@xelerance.com> - 3.1.1-1
  245. - updated to 3.1.1
  246. * Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.1.0-2
  247. - fix license tag
  248. - fix static user creation
  249. * Mon Jun 30 2008 Paul Wouters <paul@xelerance.com> - 3.1.0-1
  250. - Updated to 3.1.0
  251. * Tue May 6 2008 Paul Wouters <paul@xelerance.com> - 3.0.8-2
  252. - Fix /dev/null redirection [Venkatesh Krishnamurthi]
  253. * Tue May 6 2008 Paul Wouters <paul@xelerance.com> - 3.0.8-1
  254. - Updated to 3.0.8
  255. * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.0.7-3
  256. - Autorebuild for GCC 4.3
  257. * Wed Dec 5 2007 Paul Wouters <paul@xelerance.com> - 3.0.7-2
  258. - Rebuild for new libcrypto
  259. * Tue Nov 13 2007 Paul Wouters <paul@xelerance.com> - 3.0.7-1
  260. - Updated to new version
  261. - fix RELNOTES/README to be utf8
  262. - Fix path to nsd.db in cron job.
  263. * Thu Nov 8 2007 Paul Wouters <paul@xelerance.com> - 3.0.6-7
  264. - Modified cron to only rebuild/reload when zone updates
  265. have been received
  266. * Wed Nov 7 2007 Paul Wouters <paul@xelerance.com> - 3.0.6-6
  267. - Added hourly cron job to do various maintenance tasks
  268. - Added nsd rebuild to create the proper nsd.db file on startup
  269. - Added nsd patch on shutdown to ensure zonefiles are up to date
  270. * Tue Oct 2 2007 Paul Wouters <paul@xelerance.com> - 3.0.6-5
  271. - nsdc update and nsdc notify are no longer needed in initscript.
  272. * Mon Sep 24 2007 Jesse Keating <jkeating@redhat.com> - 3.0.6-4
  273. - Bump release for upgrade path.
  274. * Fri Sep 14 2007 Paul Wouters <paul@xelerance.com> 3.0.6-3
  275. - Do not include examples from nsd.conf.sample that causes
  276. bogus network traffic.
  277. * Fri Sep 14 2007 Paul Wouters <paul@xelerance.com> 3.0.6-2
  278. - Change locations of ixfr.db and xfrd.state to /var/lib/nsd
  279. - Enable NSEC3
  280. - Delay running nsdc update until after nsd has started
  281. - Delete xfrd.state on nsd stop
  282. - Run nsdc notify in the background, since it can take
  283. a very long time when remote servers are unavailable.
  284. * Tue Sep 11 2007 Paul Wouters <paul@xelerance.com> 3.0.6-1
  285. - Upgraded to 3.0.6
  286. - Do not include bind2nsd, since it didn't compile for me
  287. * Fri Jul 13 2007 Paul Wouters <paul@xelerance.com> 3.0.5-2
  288. - Fix init script, bug #245546
  289. * Fri Mar 23 2007 Paul Wouters <paul@xelerance.com> 3.0.5-1
  290. - Upgraded to 3.0.5
  291. * Thu Dec 7 2006 Paul Wouters <paul@xelerance.com> 3.0.3-1
  292. - Upgraded to 3.0.3
  293. * Mon Nov 27 2006 Paul Wouters <paul@xelerance.com> 3.0.2-1
  294. - Upgraded to 3.0.2.
  295. - Use new configuration file nsd.conf. Still needs migration script.
  296. patch from Farkas Levente <lfarkas@bppiac.hu>
  297. * Mon Oct 16 2006 Paul Wouters <paul@xelerance.com> 2.3.6-2
  298. - Bump version for upgrade path
  299. * Thu Oct 12 2006 Paul Wouters <paul@xelerance.com> 2.3.6-1
  300. - Upgraded to 2.3.6
  301. - Removed obsolete workaround in nsd.init
  302. - Fixed spec file so daemon gets properly restarted on upgrade
  303. * Mon Sep 11 2006 Paul Wouters <paul@xelerance.com> 2.3.5-4
  304. - Rebuild requested for PT_GNU_HASH support from gcc
  305. - Removed dbaccess.c from doc section
  306. * Mon Jun 26 2006 Paul Wouters <paul@xelerance.com> - 2.3.5-3
  307. - Bump version for FC-x upgrade path
  308. * Mon Jun 26 2006 Paul Wouters <paul@xelerance.com> - 2.3.5-1
  309. - Upgraded to nsd-2.3.5
  310. * Sun May 7 2006 Paul Wouters <paul@xelerance.com> - 2.3.4-3
  311. - Upgraded to nsd-2.3.4.
  312. - Removed manual install targets because DESTDIR is now supported
  313. - Re-enabled --checking, checking patch no longer needed and removed.
  314. - Work around in nsd.init for nsd failing to start when there is no ipv6
  315. * Thu Dec 15 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-7
  316. - chkconfig and attribute changes as proposed by Dmitry Butskoy
  317. * Thu Dec 15 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-6
  318. - Moved pid file to /var/run/nsd/nsd.pid.
  319. - Use _localstatedir instead of "/var"
  320. * Tue Dec 13 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-5
  321. - Added BuildRequires for openssl-devel, removed Requires for openssl.
  322. * Mon Dec 12 2005 Paul Wouters <paul@xelerance.com> - 2.3.3-4
  323. - upgraded to nsd-2.3.3
  324. * Wed Dec 7 2005 Tom "spot" Callaway <tcallawa@redhat.com> - 2.3.2-2
  325. - minor cleanups
  326. * Mon Dec 5 2005 Paul Wouters <paul@xelerance.com> - 2.3.2-1
  327. - Upgraded to 2.3.2. Changed post scripts to comply to Fedora
  328. Extras policies (eg do not start daemon on fresh install)
  329. * Tue Oct 4 2005 Paul Wouters <paul@xelerance.com> - 2.3.1-1
  330. - Initial version