]>
Commit | Line | Data |
---|---|---|
ca75cd40 | 1 | # |
89d05c6c JB |
2 | # Conditional build: |
3 | %bcond_without python # Python binding | |
60c650ce | 4 | %bcond_with dnstap # dnstap replication support |
89d05c6c JB |
5 | # |
6 | Summary: Recursive, validating DNS resolver | |
7 | Summary(pl.UTF-8): Rekurencyjny, weryfikujący resolver DNS | |
ca75cd40 | 8 | Name: unbound |
e6a0f95f | 9 | Version: 1.5.10 |
05a660e9 | 10 | Release: 1 |
ca75cd40 | 11 | License: BSD |
89d05c6c | 12 | Group: Applications/Network |
ca75cd40 | 13 | Source0: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz |
e6a0f95f | 14 | # Source0-md5: 0a3a236811f1ab5c1dc31974fa74e047 |
cda91157 | 15 | Source1: %{name}.init |
0ddfe461 JK |
16 | Source2: %{name}.service |
17 | Source3: https://data.iana.org/root-anchors/icannbundle.pem | |
d1474b1b | 18 | # Source3-md5: 1ad315c80d044eca2da29785eee6f7c3 |
0ddfe461 | 19 | Source4: ftp://ftp.internic.net/domain/named.cache |
e6a0f95f | 20 | # Source4-md5: bd84dce11de35801683aaedc339c43ed |
b53232e5 | 21 | Patch0: %{name}-default_trust_anchor.patch |
f33b27d4 | 22 | Patch1: %{name}-sh.patch |
05a660e9 | 23 | Patch2: %{name}-pythondir.patch |
ca75cd40 | 24 | URL: http://unbound.net/ |
f33b27d4 JB |
25 | BuildRequires: autoconf >= 2.56 |
26 | BuildRequires: automake | |
89d05c6c | 27 | BuildRequires: expat-devel |
60c650ce | 28 | %{?with_dnstap:BuildRequires: fstrm-devel} |
5ec53429 | 29 | BuildRequires: libevent-devel |
f33b27d4 JB |
30 | BuildRequires: libtool |
31 | BuildRequires: openssl-devel >= 1.0 | |
60c650ce | 32 | %{?with_dnstap:BuildRequires: protobuf-c-devel} |
ca75cd40 | 33 | BuildRequires: rpmbuild(macros) >= 1.228 |
89d05c6c JB |
34 | %if %{with python} |
35 | BuildRequires: python-devel >= 1:2.4.0 | |
36 | BuildRequires: swig-python | |
37 | %endif | |
ca75cd40 | 38 | Requires(post,preun): /sbin/chkconfig |
0ddfe461 | 39 | BuildRequires: rpmbuild(macros) >= 1.671 |
5946fd51 AM |
40 | Provides: user(unbound) |
41 | Requires(postun): /usr/sbin/userdel | |
42 | Requires(pre): /bin/id | |
43 | Requires(pre): /usr/sbin/useradd | |
0ddfe461 | 44 | Requires: systemd-units >= 38 |
89d05c6c | 45 | Requires: %{name}-libs = %{version}-%{release} |
ca75cd40 | 46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
48 | %description | |
49 | Unbound is a validating, recursive, and caching DNS resolver. | |
50 | ||
51 | The C implementation of Unbound is developed and maintained by NLnet | |
89d05c6c | 52 | Labs. It is based on ideas and algorithms taken from a Java prototype |
ca75cd40 | 53 | developed by Verisign labs, Nominet, Kirei and ep.net. |
54 | ||
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. | |
58 | ||
89d05c6c JB |
59 | %description -l pl.UTF-8 |
60 | Unbound to weryfikujący, rekurencyjny i cache'ujący resolver (kod | |
61 | rozwiązujący nazwy) DNS. | |
62 | ||
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 | |
66 | ep.net. | |
67 | ||
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 | |
71 | aplikację). | |
72 | ||
73 | %package libs | |
74 | Summary: Unbound shared library | |
75 | Summary(pl.UTF-8): Biblioteka współdzielona Unbound | |
76 | Group: Libraries | |
77 | Conflicts: unbound < 1.4.18-1 | |
78 | ||
79 | %description libs | |
80 | Unbound shared library. | |
81 | ||
82 | %description libs -l pl.UTF-8 | |
83 | Biblioteka współdzielona Unbound. | |
84 | ||
ca75cd40 | 85 | %package devel |
86 | Summary: Header files for unbound library | |
87 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki unbound | |
88 | Group: Development/Libraries | |
89d05c6c | 89 | Requires: %{name}-libs = %{version}-%{release} |
89d05c6c | 90 | Requires: openssl-devel |
ca75cd40 | 91 | |
92 | %description devel | |
93 | Header files for unbound library. | |
94 | ||
95 | %description devel -l pl.UTF-8 | |
96 | Pliki nagłówkowe biblioteki unbound. | |
97 | ||
98 | %package static | |
99 | Summary: Static unbound library | |
100 | Summary(pl.UTF-8): Statyczna biblioteka unbound | |
101 | Group: Development/Libraries | |
102 | Requires: %{name}-devel = %{version}-%{release} | |
103 | ||
104 | %description static | |
105 | Static unbound library. | |
106 | ||
107 | %description static -l pl.UTF-8 | |
108 | Statyczna biblioteka unbound. | |
109 | ||
89d05c6c JB |
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} | |
115 | ||
116 | %description -n python-unbound | |
117 | Python interface to unbound library. | |
118 | ||
119 | %description -n python-unbound -l pl.UTF-8 | |
120 | Pythonowy interfejs do biblioteki unbound. | |
121 | ||
ca75cd40 | 122 | %prep |
123 | %setup -q | |
b53232e5 | 124 | %patch0 -p1 |
f33b27d4 | 125 | %patch1 -p1 |
05a660e9 | 126 | %patch2 -p1 |
ca75cd40 | 127 | |
128 | %build | |
f33b27d4 JB |
129 | %{__libtoolize} |
130 | %{__aclocal} | |
131 | %{__autoconf} | |
132 | %{__autoheader} | |
89d05c6c | 133 | %configure \ |
60c650ce | 134 | %{?with_dnstap:--enable-dnstap} \ |
e5f6e160 JK |
135 | %{__with_without python pyunbound} \ |
136 | %{__with_without python pythonmodule} \ | |
0ddfe461 | 137 | --with-pidfile=/run/%{name}.pid \ |
267353b4 | 138 | --with-chroot-dir="" \ |
0ddfe461 JK |
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 | |
142 | ||
ca75cd40 | 143 | %{__make} |
144 | ||
145 | %install | |
146 | rm -rf $RPM_BUILD_ROOT | |
0ddfe461 | 147 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},/var/lib/%{name}} |
ca75cd40 | 148 | |
149 | %{__make} install \ | |
150 | DESTDIR=$RPM_BUILD_ROOT | |
151 | ||
0ddfe461 JK |
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 | |
156 | ||
157 | touch $RPM_BUILD_ROOT/var/lib/%{name}/root.key | |
158 | ||
89d05c6c | 159 | %if %{with python} |
42c66384 | 160 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_unbound.la |
89d05c6c JB |
161 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
162 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
163 | %py_postclean | |
164 | %endif | |
165 | ||
ca75cd40 | 166 | %clean |
167 | rm -rf $RPM_BUILD_ROOT | |
168 | ||
ca75cd40 | 169 | %post |
170 | /sbin/chkconfig --add %{name} | |
0ddfe461 | 171 | %systemd_post %{name}.service |
ca75cd40 | 172 | %service %{name} restart |
173 | ||
5c77fe31 AM |
174 | %pre |
175 | %useradd -u 196 -g 99 -d /tmp -s /bin/false -c "unbound user" unbound | |
176 | ||
ca75cd40 | 177 | %preun |
178 | if [ "$1" = "0" ]; then | |
179 | %service -q %{name} stop | |
180 | /sbin/chkconfig --del %{name} | |
181 | fi | |
0ddfe461 | 182 | %systemd_preun %{name}.service |
ca75cd40 | 183 | |
5c77fe31 AM |
184 | %postun |
185 | if [ "$1" = "0" ]; then | |
186 | %userremove unbound | |
187 | fi | |
0ddfe461 JK |
188 | %systemd_reload |
189 | ||
190 | %triggerpostun -- %{name} < 1.4.22-1 | |
191 | %systemd_trigger %{name}.service | |
5c77fe31 | 192 | |
89d05c6c JB |
193 | %post libs -p /sbin/ldconfig |
194 | %postun libs -p /sbin/ldconfig | |
195 | ||
ca75cd40 | 196 | %files |
197 | %defattr(644,root,root,755) | |
89d05c6c | 198 | %doc doc/{CREDITS,Changelog,FEATURES,LICENSE,README,TODO,control_proto_spec.txt,example.conf,ietf67-design-02.pdf,requirements.txt} |
cda91157 | 199 | %attr(754,root,root) /etc/rc.d/init.d/unbound |
0ddfe461 | 200 | %{systemdunitdir}/%{name}.service |
783ab43a | 201 | %dir %{_sysconfdir}/%{name} |
202 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unbound.conf | |
0ddfe461 JK |
203 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/named.cache |
204 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/icannbundle.pem | |
ca75cd40 | 205 | %attr(755,root,root) %{_sbindir}/unbound |
511c7cae | 206 | %attr(755,root,root) %{_sbindir}/unbound-anchor |
ca75cd40 | 207 | %attr(755,root,root) %{_sbindir}/unbound-checkconf |
5ec53429 | 208 | %attr(755,root,root) %{_sbindir}/unbound-control* |
ca75cd40 | 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* | |
511c7cae | 214 | %{_mandir}/man8/unbound-anchor.8* |
379d3e5e | 215 | %{_mandir}/man8/unbound-control*.8* |
0ddfe461 JK |
216 | %dir %attr(755,unbound,nobody) /var/lib/%{name} |
217 | %ghost /var/lib/%{name}/root.key | |
ca75cd40 | 218 | |
89d05c6c JB |
219 | %files libs |
220 | %defattr(644,root,root,755) | |
221 | %attr(755,root,root) %{_libdir}/libunbound.so.*.*.* | |
222 | %attr(755,root,root) %ghost %{_libdir}/libunbound.so.2 | |
223 | ||
ca75cd40 | 224 | %files devel |
cda91157 | 225 | %defattr(644,root,root,755) |
89d05c6c | 226 | %attr(755,root,root) %{_libdir}/libunbound.so |
ca75cd40 | 227 | %{_libdir}/libunbound.la |
89d05c6c | 228 | %{_includedir}/unbound.h |
ca75cd40 | 229 | %{_mandir}/man3/libunbound.3* |
44b158d7 | 230 | %{_mandir}/man3/ub_*.3* |
ca75cd40 | 231 | |
232 | %files static | |
cda91157 | 233 | %defattr(644,root,root,755) |
ca75cd40 | 234 | %{_libdir}/libunbound.a |
89d05c6c JB |
235 | |
236 | %if %{with python} | |
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] | |
d1474b1b | 241 | %{py_sitedir}/unboundmodule.py[co] |
89d05c6c | 242 | %endif |