source: projects/specs/trunk/u/unbound/unbound-vl.spec @ 8363

Revision 8363, 17.0 KB checked in by daisuke, 10 years ago (diff)

unbound:

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