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