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: 691a34abd8e9257dd65b70f28326c1f0
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: b2afc34d106e104730b63876c9a07caf
21 Patch0: %{name}-default_trust_anchor.patch
22 Patch1: %{name}-sh.patch
23 URL: http://unbound.net/
24 BuildRequires: autoconf >= 2.56
25 BuildRequires: automake
26 BuildRequires: expat-devel
27 %{?with_dnstap:BuildRequires: fstrm-devel}
28 BuildRequires: libevent-devel
29 BuildRequires: libtool
30 BuildRequires: openssl-devel >= 1.0
31 %{?with_dnstap:BuildRequires: protobuf-c-devel}
32 BuildRequires: rpmbuild(macros) >= 1.228
34 BuildRequires: python-devel >= 1:2.4.0
35 BuildRequires: swig-python
37 Requires(post,preun): /sbin/chkconfig
38 BuildRequires: rpmbuild(macros) >= 1.671
39 Provides: user(unbound)
40 Requires(postun): /usr/sbin/userdel
41 Requires(pre): /bin/id
42 Requires(pre): /usr/sbin/useradd
43 Requires: systemd-units >= 38
44 Requires: %{name}-libs = %{version}-%{release}
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 Unbound is a validating, recursive, and caching DNS resolver.
50 The C implementation of Unbound is developed and maintained by NLnet
51 Labs. It is based on ideas and algorithms taken from a Java prototype
52 developed by Verisign labs, Nominet, Kirei and ep.net.
54 Unbound is designed as a set of modular components, so that also
55 DNSSEC (secure DNS) validation and stub-resolvers (that do not run as
56 a server, but are linked into an application) are easily possible.
58 %description -l pl.UTF-8
59 Unbound to weryfikujący, rekurencyjny i cache'ujący resolver (kod
60 rozwiązujący nazwy) DNS.
62 Implementacja Unbound w C jest tworzona i utrzymywana przez NLnet
63 Labs. Jest oparta na pomysłach i algorytmach zaczerpniętych z
64 prototypu w Javie stworzonego przez Verisign Labs, Nominet, Kirei oraz
67 Unbound został zaprojektowany jako zbiór modularnych komponentów, więc
68 możliwe są także weryfikacja DNSSEC (bezpieczny DNS) oraz
69 resolvery-zaślepki (nie działające jako serwer, ale wbudowane w
73 Summary: Unbound shared library
74 Summary(pl.UTF-8): Biblioteka współdzielona Unbound
76 Conflicts: unbound < 1.4.18-1
79 Unbound shared library.
81 %description libs -l pl.UTF-8
82 Biblioteka współdzielona Unbound.
85 Summary: Header files for unbound library
86 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki unbound
87 Group: Development/Libraries
88 Requires: %{name}-libs = %{version}-%{release}
89 Requires: openssl-devel
92 Header files for unbound library.
94 %description devel -l pl.UTF-8
95 Pliki nagłówkowe biblioteki unbound.
98 Summary: Static unbound library
99 Summary(pl.UTF-8): Statyczna biblioteka unbound
100 Group: Development/Libraries
101 Requires: %{name}-devel = %{version}-%{release}
104 Static unbound library.
106 %description static -l pl.UTF-8
107 Statyczna biblioteka unbound.
109 %package -n python-unbound
110 Summary: Python interface to unbound library
111 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki unbound
112 Group: Python/Libraries
113 Requires: %{name}-libs = %{version}-%{release}
115 %description -n python-unbound
116 Python interface to unbound library.
118 %description -n python-unbound -l pl.UTF-8
119 Pythonowy interfejs do biblioteki unbound.
132 %{?with_dnstap:--enable-dnstap} \
133 %{__with_without python pyunbound} \
134 %{__with_without python pythonmodule} \
135 --with-pidfile=/run/%{name}.pid \
136 --with-chroot-dir="" \
137 --with-conf-file=%{_sysconfdir}/%{name}/%{name}.conf \
138 --with-rootkey-file=/var/lib/%{name}/root.key \
139 --with-rootcert-file=%{_sysconfdir}/%{name}/icannbundle.pem
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},/var/lib/%{name}}
148 DESTDIR=$RPM_BUILD_ROOT
150 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
151 install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
152 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/icannbundle.pem
153 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/named.cache
155 touch $RPM_BUILD_ROOT/var/lib/%{name}/root.key
158 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_unbound.la
159 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
160 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
165 rm -rf $RPM_BUILD_ROOT
168 /sbin/chkconfig --add %{name}
169 %systemd_post %{name}.service
170 %service %{name} restart
173 %useradd -u 196 -g 99 -d /tmp -s /bin/false -c "unbound user" unbound
176 if [ "$1" = "0" ]; then
177 %service -q %{name} stop
178 /sbin/chkconfig --del %{name}
180 %systemd_preun %{name}.service
183 if [ "$1" = "0" ]; then
188 %triggerpostun -- %{name} < 1.4.22-1
189 %systemd_trigger %{name}.service
191 %post libs -p /sbin/ldconfig
192 %postun libs -p /sbin/ldconfig
195 %defattr(644,root,root,755)
196 %doc doc/{CREDITS,Changelog,FEATURES,LICENSE,README,TODO,control_proto_spec.txt,example.conf,ietf67-design-02.pdf,requirements.txt}
197 %attr(754,root,root) /etc/rc.d/init.d/unbound
198 %{systemdunitdir}/%{name}.service
199 %dir %{_sysconfdir}/%{name}
200 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unbound.conf
201 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/named.cache
202 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/icannbundle.pem
203 %attr(755,root,root) %{_sbindir}/unbound
204 %attr(755,root,root) %{_sbindir}/unbound-anchor
205 %attr(755,root,root) %{_sbindir}/unbound-checkconf
206 %attr(755,root,root) %{_sbindir}/unbound-control*
207 %attr(755,root,root) %{_sbindir}/unbound-host
208 %{_mandir}/man1/unbound-host.1*
209 %{_mandir}/man5/unbound.conf.5*
210 %{_mandir}/man8/unbound-checkconf.8*
211 %{_mandir}/man8/unbound.8*
212 %{_mandir}/man8/unbound-anchor.8*
213 %{_mandir}/man8/unbound-control*.8*
214 %dir %attr(755,unbound,nobody) /var/lib/%{name}
215 %ghost /var/lib/%{name}/root.key
218 %defattr(644,root,root,755)
219 %attr(755,root,root) %{_libdir}/libunbound.so.*.*.*
220 %attr(755,root,root) %ghost %{_libdir}/libunbound.so.2
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_libdir}/libunbound.so
225 %{_libdir}/libunbound.la
226 %{_includedir}/unbound.h
227 %{_mandir}/man3/libunbound.3*
228 %{_mandir}/man3/ub_*.3*
231 %defattr(644,root,root,755)
232 %{_libdir}/libunbound.a
235 %files -n python-unbound
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{py_sitedir}/_unbound.so*
238 %{py_sitedir}/unbound.py[co]
239 %{py_sitedir}/unboundmodule.py[co]