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