unbound-vl.spec 13 KB

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