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

Revision 9268, 17.3 KB checked in by daisuke, 9 years ago (diff)

unbound: update to 1.5.1

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.5.1
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 libs
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* Tue Dec 09 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 1.5.1-1
261- update to 1.5.1
262
263* Tue Jun 17 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 1.4.22-3
264- move create user script to libs subpackage
265
266* Wed Jun 11 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 1.4.22-2
267- add {B,C}.ROOT-SERVERS.NET. IPv6 address
268
269* Wed Apr 16 2014 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.22-1
270- update to 1.4.22
271- move root.key to /var/lib/unbound
272- add icannbundle.pem from http://data.iana.org/root-anchors/icannbundle.pem
273- add unbound.cron
274- move keys and unbound-anchor to libs subpackage
275
276* Mon Oct 07 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.21-1
277- new upstream release
278
279* Tue Mar 26 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.20-1
280- new upstream release
281
282* Thu Dec 13 2012 IWAI, Masaharu <iwai@alib.jp> 1.4.19-1
283- new upstream release
284- drop glob patch (Patch1): upstream merged
285
286* Wed Dec  5 2012 IWAI, Masaharu <iwai@alib.jp> 1.4.18-1
287- new upstream release
288
289* Sun May 27 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.17-1
290- update to 1.4.17
291- add root.key for DNSSEC
292- enable munin subpackage by default
293- buildrequire ldns-devel >= 1.6.13
294
295* Wed Feb 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.14-2
296- rebuild with python-2.7.2
297
298* Wed Dec 21 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.14-1
299- new upstream release
300
301* Sat Sep  3 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.12-1
302- new upstream release
303
304* Tue May 31 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.10-1
305- new upstream releas
306
307* Wed Mar 30 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.9-1
308- new upstream release
309
310* Wed Feb 23 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.8-1
311- new upstream release
312
313* Thu Feb 10 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.4.7-2
314- rebuilt with libevent-2.0.10
315
316* Sun Nov 14 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.7-1
317- new upstream release
318- add enable_gost flag: default disable
319- add BuildRequires: expat-devel
320
321* Thu Sep  2 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.6-1
322- new upstream release
323
324* Fri Jul 23 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.5-1
325- new upstream release
326
327* Wed May  5 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.4-1
328- initial build for Vine Linux: based Fedora 1.4.3-1.fc14
329 - update to 1.4.4
330 - build without munin
331
332* Thu Mar 11 2010 Paul Wouters <paul@xelerance.com> - 1.4.3-1
333- Update to 1.4.3 that fixes 64bit crasher
334
335* Tue Mar 09 2010 Paul Wouters <paul@xelerance.com> - 1.4.2-1
336- Updated to 1.4.2
337- Updated unbound.conf with new options
338- Enabled pre-fetching DNSKEY records (DNSSEC speedup)
339- Enabled re-fetching popular records before they expire
340- Enabled logging of DNSSEC validation errors
341
342* Mon Mar 01 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-5
343- Overriding -D_GNU_SOURCE is no longer needed. This fixes DSO issues
344  with pthreads
345
346* Wed Feb 24 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-3
347- Change make/configure lines to attempt to fix -lphtread linking issue
348
349* Thu Feb 18 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-2
350- Removed dependancy for dnssec-conf
351- Added ISC DLV key (formerly in dnssec-conf)
352- Fixup old DLV locations in unbound.conf file via %%post
353- Fix parent child disagreement handling and no-ipv6 present [svn r1953]
354
355* Tue Jan 05 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-1
356- Updated to 1.4.1
357- Changed %%define to %%global
358
359* Thu Oct 08 2009 Paul Wouters <paul@xelerance.com> - 1.3.4-2
360- Bump version
361
362* Thu Oct 08 2009 Paul Wouters <paul@xelerance.com> - 1.3.4-1
363- Upgraded to 1.3.4. Security fix with validating NSEC3 records
364
365* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.3.3-2
366- rebuilt with new openssl
367
368* Mon Aug 17 2009 Paul Wouters <paul@xelerance.com> - 1.3.3-1
369- Updated to 1.3.3
370
371* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
372- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
373
374* Sat Jun 20 2009 Paul Wouters <paul@xelerance.com> - 1.3.0-2
375- Added missing glob patch to cvs
376- Place python macros within the %%with_python check
377
378* Sat Jun 20 2009 Paul Wouters <paul@xelerance.com> - 1.3.0-1
379- Updated to 1.3.0
380- Added unbound-python sub package. disabled for now
381- Patch from svn to fix DLV lookups
382- Patches from svn to detect wrong truncated response from BIND 9.6.1 with
383  minimal-responses)
384- Added Default-Start and Default-Stop to unbound.init
385- Re-enabled --enable-sha2
386- Re-enabled glob.patch
387
388* Wed May 20 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-7
389- unbound-iterator.patch was not commited
390
391* Wed May 20 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-6
392- Fix for https://bugzilla.redhat.com/show_bug.cgi?id=499793
393
394* Tue Mar 17 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-5
395- Use --nocheck to avoid giving an error on missing unbound-remote certs/keys
396
397* Tue Mar 10 2009 Adam Tkac <atkac redhat com> - 1.2.1-4
398- enable DNSSEC only if it is enabled in sysconfig/dnssec
399
400* Mon Mar 09 2009 Adam Tkac <atkac redhat com> - 1.2.1-3
401- add DNSSEC support to initscript and enabled it per default
402- add requires dnssec-conf
403
404* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
405- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
406
407* Tue Feb 10 2009 Paul Wouters <paul@xelerance.com - 1.2.1-1
408- updated to 1.2.1
409
410* Sun Jan 18 2009 Tomas Mraz <tmraz@redhat.com> - 1.2.0-2
411- rebuild with new openssl
412
413* Wed Jan 14 2009 Paul Wouters <paul@xelerance.com - 1.2.0-1
414- Updated to 1.2.0
415- Added dependancy on minimum SSL for CVE-2008-5077
416- Added dependancy on bc for unbound-munin
417- Added minimum requirement of libevent 1.4.5. Crashes with older versions
418  (note: libevent is stale in EL-4 and not in EL-5, needs fixing there)
419- Removed dependancy on selinux-policy (will get used when available)
420- Enable options as per draft-wijngaards-dnsext-resolver-side-mitigation-00.txt
421- Enable unwanted-reply-threshold to mitigate against a Kaminsky attack
422- Enable val-clean-additional to drop addition unsigned data from signed
423  response.
424- Removed patches (got merged into upstream)
425
426* Mon Jan  5 2009 Paul Wouters <paul@xelerance.com> - 1.1.1-7
427- Modified scandir patch to silently fail when wildcard matches nothing
428- Patch to allow unbound-checkconf to find empty wildcard matches
429
430* Mon Jan  5 2009 Paul Wouters <paul@xelerance.com> - 1.1.1-6
431- Added scandir patch for trusted-keys-file: option, which
432  is used to load multiple dnssec keys in bind file format
433
434* Mon Dec  8 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-4
435- Added Requires: for selinux-policy >= 3.5.13-33 for proper SElinux rules.
436
437* Mon Dec  1 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-3
438- We did not own the /etc/unbound directory (#474020)
439- Fixed cvs anomalies
440
441* Fri Nov 28 2008 Adam Tkac <atkac redhat com> - 1.1.1-2
442- removed all obsolete chroot related stuff
443- label control certs after generation correctly
444
445* Thu Nov 20 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-1
446- Updated to unbound 1.1.1 which fixes a crasher and
447  addresses nlnetlabs bug #219
448
449* Wed Nov 19 2008 Paul Wouters <paul@xelerance.com> - 1.1.0-3
450- Remove the chroot, obsoleted by SElinux
451- Add additional munin plugin links supported by unbound plugin
452- Move configuration directory from /var/lib/unbound to /etc/unbound
453- Modified unbound.init and unbound.conf to account for chroot changes
454- Updated unbound.conf with new available options
455- Enabled dns-0x20 protection per default
456
457* Wed Nov 19 2008 Adam Tkac <atkac redhat com> - 1.1.0-2
458- unbound-1.1.0-log_open.patch
459  - make sure log is opened before chroot call
460  - tracked as http://www.nlnetlabs.nl/bugs/show_bug.cgi?id=219
461- removed /dev/log and /var/run/unbound and /etc/resolv.conf from
462  chroot, not needed
463- don't mount files in chroot, it causes problems during updates
464- fixed typo in default config file
465
466* Fri Nov 14 2008 Paul Wouters <paul@xelerance.com> - 1.1.0-1
467- Updated to version 1.1.0
468- Updated unbound.conf's statistics options and remote-control
469  to work properly for munin
470- Added unbound-munin package
471- Generate unbound remote-control  key/certs on first startup
472- Required ldns is now 1.4.0
473
474* Wed Oct 22 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-5
475- Only call ldconfig in -libs package
476- Move configure into build section
477- devel subpackage should only depend on libs subpackage
478
479* Tue Oct 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-4
480- Fix CFLAGS getting lost in build
481- Don't enable interface-automatic:yes because that
482  causes unbound to listen on 0.0.0.0 instead of 127.0.0.1
483
484* Sun Oct 19 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-3
485- Split off unbound-libs, make build verbose
486
487* Thu Oct  9 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-2
488- FSB compliance, chroot fixes, initscript fixes
489
490* Thu Sep 11 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-1
491- Upgraded to 1.0.2
492
493* Wed Jul 16 2008 Paul Wouters <paul@xelerance.com> - 1.0.1-1
494- upgraded to new release
495
496* Wed May 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.0-2
497- Build against ldns-1.3.0
498
499* Wed May 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.0-1
500- Split of -devel package, fixed dependancies, make rpmlint happy
501
502* Fri Apr 25 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.12
503- Using parts from ports collection entry by Jaap Akkerhuis.
504- Using Fedoraproject wiki guidelines.
505
506* Wed Apr 23 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.11
507- Initial version.
Note: See TracBrowser for help on using the repository browser.