3 %bcond_without python # Python binding
4 %bcond_with dnstap # dnstap replication support
6 Summary: Recursive, validating DNS resolver
7 Summary(pl.UTF-8): Rekurencyjny, weryfikujący resolver DNS
12 Group: Applications/Network
13 Source0: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
14 # Source0-md5: 0a3a236811f1ab5c1dc31974fa74e047
16 Source2: %{name}.service
17 Source3: https://data.iana.org/root-anchors/icannbundle.pem
18 # Source3-md5: 1ad315c80d044eca2da29785eee6f7c3
19 Source4: ftp://ftp.internic.net/domain/named.cache
20 # Source4-md5: bd84dce11de35801683aaedc339c43ed
21 Patch0: %{name}-default_trust_anchor.patch
22 Patch1: %{name}-sh.patch
23 Patch2: %{name}-pythondir.patch
24 URL: http://unbound.net/
25 BuildRequires: autoconf >= 2.56
26 BuildRequires: automake
27 BuildRequires: expat-devel
28 %{?with_dnstap:BuildRequires: fstrm-devel}
29 BuildRequires: libevent-devel
30 BuildRequires: libtool
31 BuildRequires: openssl-devel >= 1.0
32 %{?with_dnstap:BuildRequires: protobuf-c-devel}
33 BuildRequires: rpmbuild(macros) >= 1.228
35 BuildRequires: python-devel >= 1:2.4.0
36 BuildRequires: swig-python
38 Requires(post,preun): /sbin/chkconfig
39 BuildRequires: rpmbuild(macros) >= 1.671
40 Provides: user(unbound)
41 Requires(postun): /usr/sbin/userdel
42 Requires(pre): /bin/id
43 Requires(pre): /usr/sbin/useradd
44 Requires: systemd-units >= 38
45 Requires: %{name}-libs = %{version}-%{release}
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Unbound is a validating, recursive, and caching DNS resolver.
51 The C implementation of Unbound is developed and maintained by NLnet
52 Labs. It is based on ideas and algorithms taken from a Java prototype
53 developed by Verisign labs, Nominet, Kirei and ep.net.
55 Unbound is designed as a set of modular components, so that also
56 DNSSEC (secure DNS) validation and stub-resolvers (that do not run as
57 a server, but are linked into an application) are easily possible.
59 %description -l pl.UTF-8
60 Unbound to weryfikujący, rekurencyjny i cache'ujący resolver (kod
61 rozwiązujący nazwy) DNS.
63 Implementacja Unbound w C jest tworzona i utrzymywana przez NLnet
64 Labs. Jest oparta na pomysłach i algorytmach zaczerpniętych z
65 prototypu w Javie stworzonego przez Verisign Labs, Nominet, Kirei oraz
68 Unbound został zaprojektowany jako zbiór modularnych komponentów, więc
69 możliwe są także weryfikacja DNSSEC (bezpieczny DNS) oraz
70 resolvery-zaślepki (nie działające jako serwer, ale wbudowane w
74 Summary: Unbound shared library
75 Summary(pl.UTF-8): Biblioteka współdzielona Unbound
77 Conflicts: unbound < 1.4.18-1
80 Unbound shared library.
82 %description libs -l pl.UTF-8
83 Biblioteka współdzielona Unbound.
86 Summary: Header files for unbound library
87 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki unbound
88 Group: Development/Libraries
89 Requires: %{name}-libs = %{version}-%{release}
90 Requires: openssl-devel
93 Header files for unbound library.
95 %description devel -l pl.UTF-8
96 Pliki nagłówkowe biblioteki unbound.
99 Summary: Static unbound library
100 Summary(pl.UTF-8): Statyczna biblioteka unbound
101 Group: Development/Libraries
102 Requires: %{name}-devel = %{version}-%{release}
105 Static unbound library.
107 %description static -l pl.UTF-8
108 Statyczna biblioteka unbound.
110 %package -n python-unbound
111 Summary: Python interface to unbound library
112 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki unbound
113 Group: Python/Libraries
114 Requires: %{name}-libs = %{version}-%{release}
116 %description -n python-unbound
117 Python interface to unbound library.
119 %description -n python-unbound -l pl.UTF-8
120 Pythonowy interfejs do biblioteki unbound.
134 %{?with_dnstap:--enable-dnstap} \
135 %{__with_without python pyunbound} \
136 %{__with_without python pythonmodule} \
137 --with-pidfile=/run/%{name}.pid \
138 --with-chroot-dir="" \
139 --with-conf-file=%{_sysconfdir}/%{name}/%{name}.conf \
140 --with-rootkey-file=/var/lib/%{name}/root.key \
141 --with-rootcert-file=%{_sysconfdir}/%{name}/icannbundle.pem
146 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},/var/lib/%{name}}
150 DESTDIR=$RPM_BUILD_ROOT
152 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
153 install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
154 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/icannbundle.pem
155 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/named.cache
157 touch $RPM_BUILD_ROOT/var/lib/%{name}/root.key
160 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_unbound.la
161 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
162 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
167 rm -rf $RPM_BUILD_ROOT
170 /sbin/chkconfig --add %{name}
171 %systemd_post %{name}.service
172 %service %{name} restart
175 %useradd -u 196 -g 99 -d /tmp -s /bin/false -c "unbound user" unbound
178 if [ "$1" = "0" ]; then
179 %service -q %{name} stop
180 /sbin/chkconfig --del %{name}
182 %systemd_preun %{name}.service
185 if [ "$1" = "0" ]; then
190 %triggerpostun -- %{name} < 1.4.22-1
191 %systemd_trigger %{name}.service
193 %post libs -p /sbin/ldconfig
194 %postun libs -p /sbin/ldconfig
197 %defattr(644,root,root,755)
198 %doc doc/{CREDITS,Changelog,FEATURES,LICENSE,README,TODO,control_proto_spec.txt,example.conf,ietf67-design-02.pdf,requirements.txt}
199 %attr(754,root,root) /etc/rc.d/init.d/unbound
200 %{systemdunitdir}/%{name}.service
201 %dir %{_sysconfdir}/%{name}
202 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unbound.conf
203 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/named.cache
204 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/icannbundle.pem
205 %attr(755,root,root) %{_sbindir}/unbound
206 %attr(755,root,root) %{_sbindir}/unbound-anchor
207 %attr(755,root,root) %{_sbindir}/unbound-checkconf
208 %attr(755,root,root) %{_sbindir}/unbound-control*
209 %attr(755,root,root) %{_sbindir}/unbound-host
210 %{_mandir}/man1/unbound-host.1*
211 %{_mandir}/man5/unbound.conf.5*
212 %{_mandir}/man8/unbound-checkconf.8*
213 %{_mandir}/man8/unbound.8*
214 %{_mandir}/man8/unbound-anchor.8*
215 %{_mandir}/man8/unbound-control*.8*
216 %dir %attr(755,unbound,nobody) /var/lib/%{name}
217 %ghost /var/lib/%{name}/root.key
220 %defattr(644,root,root,755)
221 %attr(755,root,root) %{_libdir}/libunbound.so.*.*.*
222 %attr(755,root,root) %ghost %{_libdir}/libunbound.so.2
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_libdir}/libunbound.so
227 %{_libdir}/libunbound.la
228 %{_includedir}/unbound.h
229 %{_mandir}/man3/libunbound.3*
230 %{_mandir}/man3/ub_*.3*
233 %defattr(644,root,root,755)
234 %{_libdir}/libunbound.a
237 %files -n python-unbound
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{py_sitedir}/_unbound.so*
240 %{py_sitedir}/unbound.py[co]
241 %{py_sitedir}/unboundmodule.py[co]