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

Revision 10947, 18.0 KB checked in by iwaim, 7 years ago (diff)

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