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

Revision 972, 12.8 KB checked in by iwaim, 14 years ago (diff)

ldns, unbound: add Fedora spec files

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