3 %bcond_without python # Python binding
5 Summary: Recursive, validating DNS resolver
6 Summary(pl.UTF-8): Rekurencyjny, weryfikujący resolver DNS
11 Group: Applications/Network
12 Source0: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
13 # Source0-md5: ed4c46476dcfb8a507cc08b1ba12a8f1
15 Source2: %{name}.service
16 Source3: https://data.iana.org/root-anchors/icannbundle.pem
17 # Source3-md5: 59774aba58dbde1049bdf4722fb4f02c
18 Source4: ftp://ftp.internic.net/domain/named.cache
19 # Source4-md5: 89241448b08af70dd5715e7ef12d71f6
20 Patch0: %{name}-default_trust_anchor.patch
21 Patch1: %{name}-IP_PMTUDISC_OMIT.patch
22 URL: http://unbound.net/
23 BuildRequires: expat-devel
24 BuildRequires: libevent-devel
25 BuildRequires: openssl-devel
26 BuildRequires: rpmbuild(macros) >= 1.228
28 BuildRequires: python-devel >= 1:2.4.0
29 BuildRequires: swig-python
31 Requires(post,preun): /sbin/chkconfig
32 BuildRequires: rpmbuild(macros) >= 1.671
33 Provides: user(unbound)
34 Requires(postun): /usr/sbin/userdel
35 Requires(pre): /bin/id
36 Requires(pre): /usr/sbin/useradd
37 Requires: systemd-units >= 38
38 Requires: %{name}-libs = %{version}-%{release}
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 Unbound is a validating, recursive, and caching DNS resolver.
44 The C implementation of Unbound is developed and maintained by NLnet
45 Labs. It is based on ideas and algorithms taken from a Java prototype
46 developed by Verisign labs, Nominet, Kirei and ep.net.
48 Unbound is designed as a set of modular components, so that also
49 DNSSEC (secure DNS) validation and stub-resolvers (that do not run as
50 a server, but are linked into an application) are easily possible.
52 %description -l pl.UTF-8
53 Unbound to weryfikujący, rekurencyjny i cache'ujący resolver (kod
54 rozwiązujący nazwy) DNS.
56 Implementacja Unbound w C jest tworzona i utrzymywana przez NLnet
57 Labs. Jest oparta na pomysłach i algorytmach zaczerpniętych z
58 prototypu w Javie stworzonego przez Verisign Labs, Nominet, Kirei oraz
61 Unbound został zaprojektowany jako zbiór modularnych komponentów, więc
62 możliwe są także weryfikacja DNSSEC (bezpieczny DNS) oraz
63 resolvery-zaślepki (nie działające jako serwer, ale wbudowane w
67 Summary: Unbound shared library
68 Summary(pl.UTF-8): Biblioteka współdzielona Unbound
70 Conflicts: unbound < 1.4.18-1
73 Unbound shared library.
75 %description libs -l pl.UTF-8
76 Biblioteka współdzielona Unbound.
79 Summary: Header files for unbound library
80 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki unbound
81 Group: Development/Libraries
82 Requires: %{name}-libs = %{version}-%{release}
83 Requires: openssl-devel
86 Header files for unbound library.
88 %description devel -l pl.UTF-8
89 Pliki nagłówkowe biblioteki unbound.
92 Summary: Static unbound library
93 Summary(pl.UTF-8): Statyczna biblioteka unbound
94 Group: Development/Libraries
95 Requires: %{name}-devel = %{version}-%{release}
98 Static unbound library.
100 %description static -l pl.UTF-8
101 Statyczna biblioteka unbound.
103 %package -n python-unbound
104 Summary: Python interface to unbound library
105 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki unbound
106 Group: Python/Libraries
107 Requires: %{name}-libs = %{version}-%{release}
109 %description -n python-unbound
110 Python interface to unbound library.
112 %description -n python-unbound -l pl.UTF-8
113 Pythonowy interfejs do biblioteki unbound.
122 %{?with_python:--with-pyunbound} \
123 --with-pidfile=/run/%{name}.pid \
124 --with-chroot-dir="" \
125 --with-conf-file=%{_sysconfdir}/%{name}/%{name}.conf \
126 --with-rootkey-file=/var/lib/%{name}/root.key \
127 --with-rootcert-file=%{_sysconfdir}/%{name}/icannbundle.pem
132 rm -rf $RPM_BUILD_ROOT
133 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},/var/lib/%{name}}
136 DESTDIR=$RPM_BUILD_ROOT
138 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
139 install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
140 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/icannbundle.pem
141 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/named.cache
143 touch $RPM_BUILD_ROOT/var/lib/%{name}/root.key
146 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_unbound.la
147 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
148 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
153 rm -rf $RPM_BUILD_ROOT
156 /sbin/chkconfig --add %{name}
157 %systemd_post %{name}.service
158 %service %{name} restart
161 %useradd -u 196 -g 99 -d /tmp -s /bin/false -c "unbound user" unbound
164 if [ "$1" = "0" ]; then
165 %service -q %{name} stop
166 /sbin/chkconfig --del %{name}
168 %systemd_preun %{name}.service
171 if [ "$1" = "0" ]; then
176 %triggerpostun -- %{name} < 1.4.22-1
177 %systemd_trigger %{name}.service
179 %post libs -p /sbin/ldconfig
180 %postun libs -p /sbin/ldconfig
183 %defattr(644,root,root,755)
184 %doc doc/{CREDITS,Changelog,FEATURES,LICENSE,README,TODO,control_proto_spec.txt,example.conf,ietf67-design-02.pdf,requirements.txt}
185 %attr(754,root,root) /etc/rc.d/init.d/unbound
186 %{systemdunitdir}/%{name}.service
187 %dir %{_sysconfdir}/%{name}
188 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unbound.conf
189 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/named.cache
190 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/icannbundle.pem
191 %attr(755,root,root) %{_sbindir}/unbound
192 %attr(755,root,root) %{_sbindir}/unbound-anchor
193 %attr(755,root,root) %{_sbindir}/unbound-checkconf
194 %attr(755,root,root) %{_sbindir}/unbound-control*
195 %attr(755,root,root) %{_sbindir}/unbound-host
196 %{_mandir}/man1/unbound-host.1*
197 %{_mandir}/man5/unbound.conf.5*
198 %{_mandir}/man8/unbound-checkconf.8*
199 %{_mandir}/man8/unbound.8*
200 %{_mandir}/man8/unbound-anchor.8*
201 %{_mandir}/man8/unbound-control*.8*
202 %dir %attr(755,unbound,nobody) /var/lib/%{name}
203 %ghost /var/lib/%{name}/root.key
206 %defattr(644,root,root,755)
207 %attr(755,root,root) %{_libdir}/libunbound.so.*.*.*
208 %attr(755,root,root) %ghost %{_libdir}/libunbound.so.2
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_libdir}/libunbound.so
213 %{_libdir}/libunbound.la
214 %{_includedir}/unbound.h
215 %{_mandir}/man3/libunbound.3*
216 %{_mandir}/man3/ub_*.3*
219 %defattr(644,root,root,755)
220 %{_libdir}/libunbound.a
223 %files -n python-unbound
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{py_sitedir}/_unbound.so*
226 %{py_sitedir}/unbound.py[co]