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

Revision 8568, 17.2 KB checked in by iwaim, 10 years ago (diff)

unbound 1.4.22-2

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