unbound-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. %global with_munin 1
  2. # not ready yet
  3. %{?!with_python: %global with_python 0}
  4. %{?!enable_gost: %global enable_gost 0}
  5. %if %{with_python}
  6. %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  7. %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
  8. %endif
  9. Summary: Validating, recursive, and caching DNS(SEC) resolver
  10. Name: unbound
  11. Version: 1.4.21
  12. Release: 1%{?_dist_release}
  13. License: BSD
  14. Url: http://www.unbound.net/
  15. Source: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
  16. Source1: unbound.init
  17. Source2: unbound.conf
  18. Source3: unbound.munin
  19. Source4: dlv.isc.org.key
  20. Source5: root.key
  21. Group: System Environment/Daemons
  22. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  23. BuildRequires: flex, ldns-devel >= 1.6.13,
  24. BuildRequires: libevent-devel
  25. BuildRequires: expat-devel
  26. %if %{with_python}
  27. BuildRequires: python-devel swig
  28. %endif
  29. %if %{enable_gost}
  30. BuildRequires: openssl-devel >= 1.0.0
  31. %else
  32. BuildRequires: openssl-devel
  33. %endif
  34. # Required for SVN versions
  35. #BuildRequires: bison
  36. Requires(post): chkconfig
  37. Requires(preun): chkconfig
  38. Requires(preun): initscripts
  39. Requires(postun): initscripts
  40. Requires: ldns >= 1.5.0
  41. Requires(pre): shadow-utils
  42. Distribution: Vine Linux
  43. Vendor: Project Vine
  44. Packager: iwaim, daisuke
  45. %description
  46. Unbound is a validating, recursive, and caching DNS(SEC) resolver.
  47. The C implementation of Unbound is developed and maintained by NLnet
  48. Labs. It is based on ideas and algorithms taken from a java prototype
  49. developed by Verisign labs, Nominet, Kirei and ep.net.
  50. Unbound is designed as a set of modular components, so that also
  51. DNSSEC (secure DNS) validation and stub-resolvers (that do not run
  52. as a server, but are linked into an application) are easily possible.
  53. %if %{with_munin}
  54. %package munin
  55. Summary: Plugin for the munin / munin-node monitoring package
  56. Summary(ja): munin/munin-node モニタリングパッケージ用のプラグイン
  57. Group: System Environment/Daemons
  58. Requires: munin-node
  59. Requires: %{name} = %{version}-%{release}, bc
  60. %description munin
  61. Plugin for the munin / munin-node monitoring package
  62. %endif
  63. %package devel
  64. Summary: Development package that includes the unbound header files
  65. Group: Development/Libraries
  66. Requires: %{name}-libs = %{version}-%{release}, openssl-devel, ldns-devel
  67. %description devel
  68. The devel package contains the unbound library and the include files
  69. %package libs
  70. Summary: Libraries used by the unbound server and client applications
  71. Group: Applications/System
  72. Requires(post): /sbin/ldconfig
  73. Requires(postun): /sbin/ldconfig
  74. Requires: openssl >= 0.9.8g-12
  75. %description libs
  76. Contains libraries used by the unbound server and client applications
  77. %if %{with_python}
  78. %package python
  79. Summary: Python modules and extensions for unbound
  80. Group: Applications/System
  81. Requires: %{name}-libs = %{version}-%{release}
  82. %description python
  83. Python modules and extensions for unbound
  84. %endif
  85. %prep
  86. %setup -q
  87. %build
  88. %configure --with-ldns= --with-libevent --with-pthreads --with-ssl \
  89. --disable-rpath --enable-debug --disable-static \
  90. --with-conf-file=%{_sysconfdir}/%{name}/unbound.conf \
  91. --with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid \
  92. %if %{with_python}
  93. --with-pythonmodule --with-pyunbound \
  94. %endif
  95. %if !%{enable_gost}
  96. --disable-gost \
  97. %endif
  98. --enable-sha2
  99. %{__make} %{?_smp_mflags}
  100. %install
  101. rm -rf %{buildroot}
  102. %{__make} DESTDIR=%{buildroot} install
  103. install -d 0755 %{buildroot}%{_initrddir}
  104. install -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/unbound
  105. install -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/unbound
  106. %if %{with_munin}
  107. # Install munin plugin and its softlinks
  108. install -d 0755 %{buildroot}%{_sysconfdir}/munin/plugin-conf.d
  109. install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/munin/plugin-conf.d/unbound
  110. install -d 0755 %{buildroot}%{_datadir}/munin/plugins/
  111. install -m 0755 contrib/unbound_munin_ %{buildroot}%{_datadir}/munin/plugins/unbound
  112. for plugin in unbound_munin_hits unbound_munin_queue unbound_munin_memory unbound_munin_by_type unbound_munin_by_class unbound_munin_by_opcode unbound_munin_by_rcode unbound_munin_by_flags unbound_munin_histogram; do
  113. ln -s unbound %{buildroot}%{_datadir}/munin/plugins/$plugin
  114. done
  115. %endif
  116. # install root and DLV key
  117. install -m 0644 %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysconfdir}/unbound/
  118. # remove static library from install (fedora packaging guidelines)
  119. rm -rf %{buildroot}%{_libdir}/*.la
  120. %if %{with_python}
  121. rm -rf %{buildroot}%{python_sitelib}/*/*.la
  122. %endif
  123. mkdir -p %{buildroot}%{_localstatedir}/run/unbound
  124. %clean
  125. rm -rf ${RPM_BUILD_ROOT}
  126. %files
  127. %defattr(-,root,root,-)
  128. %doc doc/README doc/CREDITS doc/LICENSE doc/FEATURES
  129. %attr(0755,root,root) %{_initrddir}/%{name}
  130. %attr(0755,root,root) %dir %{_sysconfdir}/%{name}
  131. %attr(0755,unbound,unbound) %dir %{_localstatedir}/run/%{name}
  132. %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/unbound.conf
  133. %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/dlv.isc.org.key
  134. %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/root.key
  135. %{_sbindir}/*
  136. %{_mandir}/*/*
  137. %if %{with_python}
  138. %files python
  139. %{python_sitelib}/*
  140. %endif
  141. %if %{with_munin}
  142. %files munin
  143. %defattr(-,root,root,-)
  144. %config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/unbound
  145. %{_datadir}/munin/plugins/unbound*
  146. %endif
  147. %files devel
  148. %defattr(-,root,root,-)
  149. %{_libdir}/libunbound.so
  150. %{_includedir}/unbound.h
  151. %doc README
  152. %files libs
  153. %defattr(-,root,root,-)
  154. %{_libdir}/libunbound.so.*
  155. %doc doc/README doc/LICENSE
  156. %pre
  157. getent group unbound >/dev/null || groupadd -r unbound
  158. getent passwd unbound >/dev/null || \
  159. useradd -r -g unbound -d %{_sysconfdir}/unbound -s /sbin/nologin \
  160. -c "Unbound DNS resolver" unbound
  161. exit 0
  162. %post
  163. /sbin/chkconfig --add %{name}
  164. # dnssec-conf used to contain our DLV key, but now we include it via unbound
  165. # If unbound had previously been configured with dnssec-configure, we need
  166. # to migrate the location of the DLV key file (to keep DLV enabled, and because
  167. # unbound won't start with a bad location for a DLV key file.
  168. sed -i "s:/etc/pki/dnssec-keys[/]*dlv:/etc/unbound:" %{_sysconfdir}/unbound/unbound.conf
  169. %post libs -p /sbin/ldconfig
  170. %preun
  171. if [ "$1" -eq 0 ]; then
  172. /sbin/service %{name} stop >/dev/null 2>&1
  173. /sbin/chkconfig --del %{name}
  174. fi
  175. %postun
  176. if [ "$1" -ge "1" ]; then
  177. /sbin/service %{name} condrestart >/dev/null 2>&1 || :
  178. fi
  179. %postun libs -p /sbin/ldconfig
  180. %changelog
  181. * Mon Oct 07 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.21-1
  182. - new upstream release
  183. * Tue Mar 26 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.20-1
  184. - new upstream release
  185. * Thu Dec 13 2012 IWAI, Masaharu <iwai@alib.jp> 1.4.19-1
  186. - new upstream release
  187. - drop glob patch (Patch1): upstream merged
  188. * Wed Dec 5 2012 IWAI, Masaharu <iwai@alib.jp> 1.4.18-1
  189. - new upstream release
  190. * Sun May 27 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.17-1
  191. - update to 1.4.17
  192. - add root.key for DNSSEC
  193. - enable munin subpackage by default
  194. - buildrequire ldns-devel >= 1.6.13
  195. * Wed Feb 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.14-2
  196. - rebuild with python-2.7.2
  197. * Wed Dec 21 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.14-1
  198. - new upstream release
  199. * Sat Sep 3 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.12-1
  200. - new upstream release
  201. * Tue May 31 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.10-1
  202. - new upstream releas
  203. * Wed Mar 30 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.9-1
  204. - new upstream release
  205. * Wed Feb 23 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.8-1
  206. - new upstream release
  207. * Thu Feb 10 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.4.7-2
  208. - rebuilt with libevent-2.0.10
  209. * Sun Nov 14 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.7-1
  210. - new upstream release
  211. - add enable_gost flag: default disable
  212. - add BuildRequires: expat-devel
  213. * Thu Sep 2 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.6-1
  214. - new upstream release
  215. * Fri Jul 23 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.5-1
  216. - new upstream release
  217. * Wed May 5 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.4-1
  218. - initial build for Vine Linux: based Fedora 1.4.3-1.fc14
  219. - update to 1.4.4
  220. - build without munin
  221. * Thu Mar 11 2010 Paul Wouters <paul@xelerance.com> - 1.4.3-1
  222. - Update to 1.4.3 that fixes 64bit crasher
  223. * Tue Mar 09 2010 Paul Wouters <paul@xelerance.com> - 1.4.2-1
  224. - Updated to 1.4.2
  225. - Updated unbound.conf with new options
  226. - Enabled pre-fetching DNSKEY records (DNSSEC speedup)
  227. - Enabled re-fetching popular records before they expire
  228. - Enabled logging of DNSSEC validation errors
  229. * Mon Mar 01 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-5
  230. - Overriding -D_GNU_SOURCE is no longer needed. This fixes DSO issues
  231. with pthreads
  232. * Wed Feb 24 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-3
  233. - Change make/configure lines to attempt to fix -lphtread linking issue
  234. * Thu Feb 18 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-2
  235. - Removed dependancy for dnssec-conf
  236. - Added ISC DLV key (formerly in dnssec-conf)
  237. - Fixup old DLV locations in unbound.conf file via %%post
  238. - Fix parent child disagreement handling and no-ipv6 present [svn r1953]
  239. * Tue Jan 05 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-1
  240. - Updated to 1.4.1
  241. - Changed %%define to %%global
  242. * Thu Oct 08 2009 Paul Wouters <paul@xelerance.com> - 1.3.4-2
  243. - Bump version
  244. * Thu Oct 08 2009 Paul Wouters <paul@xelerance.com> - 1.3.4-1
  245. - Upgraded to 1.3.4. Security fix with validating NSEC3 records
  246. * Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.3.3-2
  247. - rebuilt with new openssl
  248. * Mon Aug 17 2009 Paul Wouters <paul@xelerance.com> - 1.3.3-1
  249. - Updated to 1.3.3
  250. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
  251. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  252. * Sat Jun 20 2009 Paul Wouters <paul@xelerance.com> - 1.3.0-2
  253. - Added missing glob patch to cvs
  254. - Place python macros within the %%with_python check
  255. * Sat Jun 20 2009 Paul Wouters <paul@xelerance.com> - 1.3.0-1
  256. - Updated to 1.3.0
  257. - Added unbound-python sub package. disabled for now
  258. - Patch from svn to fix DLV lookups
  259. - Patches from svn to detect wrong truncated response from BIND 9.6.1 with
  260. minimal-responses)
  261. - Added Default-Start and Default-Stop to unbound.init
  262. - Re-enabled --enable-sha2
  263. - Re-enabled glob.patch
  264. * Wed May 20 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-7
  265. - unbound-iterator.patch was not commited
  266. * Wed May 20 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-6
  267. - Fix for https://bugzilla.redhat.com/show_bug.cgi?id=499793
  268. * Tue Mar 17 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-5
  269. - Use --nocheck to avoid giving an error on missing unbound-remote certs/keys
  270. * Tue Mar 10 2009 Adam Tkac <atkac redhat com> - 1.2.1-4
  271. - enable DNSSEC only if it is enabled in sysconfig/dnssec
  272. * Mon Mar 09 2009 Adam Tkac <atkac redhat com> - 1.2.1-3
  273. - add DNSSEC support to initscript and enabled it per default
  274. - add requires dnssec-conf
  275. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
  276. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  277. * Tue Feb 10 2009 Paul Wouters <paul@xelerance.com - 1.2.1-1
  278. - updated to 1.2.1
  279. * Sun Jan 18 2009 Tomas Mraz <tmraz@redhat.com> - 1.2.0-2
  280. - rebuild with new openssl
  281. * Wed Jan 14 2009 Paul Wouters <paul@xelerance.com - 1.2.0-1
  282. - Updated to 1.2.0
  283. - Added dependancy on minimum SSL for CVE-2008-5077
  284. - Added dependancy on bc for unbound-munin
  285. - Added minimum requirement of libevent 1.4.5. Crashes with older versions
  286. (note: libevent is stale in EL-4 and not in EL-5, needs fixing there)
  287. - Removed dependancy on selinux-policy (will get used when available)
  288. - Enable options as per draft-wijngaards-dnsext-resolver-side-mitigation-00.txt
  289. - Enable unwanted-reply-threshold to mitigate against a Kaminsky attack
  290. - Enable val-clean-additional to drop addition unsigned data from signed
  291. response.
  292. - Removed patches (got merged into upstream)
  293. * Mon Jan 5 2009 Paul Wouters <paul@xelerance.com> - 1.1.1-7
  294. - Modified scandir patch to silently fail when wildcard matches nothing
  295. - Patch to allow unbound-checkconf to find empty wildcard matches
  296. * Mon Jan 5 2009 Paul Wouters <paul@xelerance.com> - 1.1.1-6
  297. - Added scandir patch for trusted-keys-file: option, which
  298. is used to load multiple dnssec keys in bind file format
  299. * Mon Dec 8 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-4
  300. - Added Requires: for selinux-policy >= 3.5.13-33 for proper SElinux rules.
  301. * Mon Dec 1 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-3
  302. - We did not own the /etc/unbound directory (#474020)
  303. - Fixed cvs anomalies
  304. * Fri Nov 28 2008 Adam Tkac <atkac redhat com> - 1.1.1-2
  305. - removed all obsolete chroot related stuff
  306. - label control certs after generation correctly
  307. * Thu Nov 20 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-1
  308. - Updated to unbound 1.1.1 which fixes a crasher and
  309. addresses nlnetlabs bug #219
  310. * Wed Nov 19 2008 Paul Wouters <paul@xelerance.com> - 1.1.0-3
  311. - Remove the chroot, obsoleted by SElinux
  312. - Add additional munin plugin links supported by unbound plugin
  313. - Move configuration directory from /var/lib/unbound to /etc/unbound
  314. - Modified unbound.init and unbound.conf to account for chroot changes
  315. - Updated unbound.conf with new available options
  316. - Enabled dns-0x20 protection per default
  317. * Wed Nov 19 2008 Adam Tkac <atkac redhat com> - 1.1.0-2
  318. - unbound-1.1.0-log_open.patch
  319. - make sure log is opened before chroot call
  320. - tracked as http://www.nlnetlabs.nl/bugs/show_bug.cgi?id=219
  321. - removed /dev/log and /var/run/unbound and /etc/resolv.conf from
  322. chroot, not needed
  323. - don't mount files in chroot, it causes problems during updates
  324. - fixed typo in default config file
  325. * Fri Nov 14 2008 Paul Wouters <paul@xelerance.com> - 1.1.0-1
  326. - Updated to version 1.1.0
  327. - Updated unbound.conf's statistics options and remote-control
  328. to work properly for munin
  329. - Added unbound-munin package
  330. - Generate unbound remote-control key/certs on first startup
  331. - Required ldns is now 1.4.0
  332. * Wed Oct 22 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-5
  333. - Only call ldconfig in -libs package
  334. - Move configure into build section
  335. - devel subpackage should only depend on libs subpackage
  336. * Tue Oct 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-4
  337. - Fix CFLAGS getting lost in build
  338. - Don't enable interface-automatic:yes because that
  339. causes unbound to listen on 0.0.0.0 instead of 127.0.0.1
  340. * Sun Oct 19 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-3
  341. - Split off unbound-libs, make build verbose
  342. * Thu Oct 9 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-2
  343. - FSB compliance, chroot fixes, initscript fixes
  344. * Thu Sep 11 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-1
  345. - Upgraded to 1.0.2
  346. * Wed Jul 16 2008 Paul Wouters <paul@xelerance.com> - 1.0.1-1
  347. - upgraded to new release
  348. * Wed May 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.0-2
  349. - Build against ldns-1.3.0
  350. * Wed May 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.0-1
  351. - Split of -devel package, fixed dependancies, make rpmlint happy
  352. * Fri Apr 25 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.12
  353. - Using parts from ports collection entry by Jaap Akkerhuis.
  354. - Using Fedoraproject wiki guidelines.
  355. * Wed Apr 23 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.11
  356. - Initial version.