nsd-vl.spec 15 KB

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