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

Revision 10374, 17.8 KB checked in by tomop, 8 years ago (diff)

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