]>
Commit | Line | Data |
---|---|---|
f33b27d4 | 1 | # TODO: dnstap? (BR: protobuf-c-devel, libfstrm -devel) |
ca75cd40 | 2 | # |
89d05c6c JB |
3 | # Conditional build: |
4 | %bcond_without python # Python binding | |
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 |
5ec53429 | 27 | BuildRequires: libevent-devel |
f33b27d4 JB |
28 | BuildRequires: libtool |
29 | BuildRequires: openssl-devel >= 1.0 | |
ca75cd40 | 30 | BuildRequires: rpmbuild(macros) >= 1.228 |
89d05c6c JB |
31 | %if %{with python} |
32 | BuildRequires: python-devel >= 1:2.4.0 | |
33 | BuildRequires: swig-python | |
34 | %endif | |
ca75cd40 | 35 | Requires(post,preun): /sbin/chkconfig |
0ddfe461 | 36 | BuildRequires: rpmbuild(macros) >= 1.671 |
5946fd51 AM |
37 | Provides: user(unbound) |
38 | Requires(postun): /usr/sbin/userdel | |
39 | Requires(pre): /bin/id | |
40 | Requires(pre): /usr/sbin/useradd | |
0ddfe461 | 41 | Requires: systemd-units >= 38 |
89d05c6c | 42 | Requires: %{name}-libs = %{version}-%{release} |
ca75cd40 | 43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
44 | ||
45 | %description | |
46 | Unbound is a validating, recursive, and caching DNS resolver. | |
47 | ||
48 | The C implementation of Unbound is developed and maintained by NLnet | |
89d05c6c | 49 | Labs. It is based on ideas and algorithms taken from a Java prototype |
ca75cd40 | 50 | developed by Verisign labs, Nominet, Kirei and ep.net. |
51 | ||
52 | Unbound is designed as a set of modular components, so that also | |
53 | DNSSEC (secure DNS) validation and stub-resolvers (that do not run as | |
54 | a server, but are linked into an application) are easily possible. | |
55 | ||
89d05c6c JB |
56 | %description -l pl.UTF-8 |
57 | Unbound to weryfikujący, rekurencyjny i cache'ujący resolver (kod | |
58 | rozwiązujący nazwy) DNS. | |
59 | ||
60 | Implementacja Unbound w C jest tworzona i utrzymywana przez NLnet | |
61 | Labs. Jest oparta na pomysłach i algorytmach zaczerpniętych z | |
62 | prototypu w Javie stworzonego przez Verisign Labs, Nominet, Kirei oraz | |
63 | ep.net. | |
64 | ||
65 | Unbound został zaprojektowany jako zbiór modularnych komponentów, więc | |
66 | możliwe są także weryfikacja DNSSEC (bezpieczny DNS) oraz | |
67 | resolvery-zaślepki (nie działające jako serwer, ale wbudowane w | |
68 | aplikację). | |
69 | ||
70 | %package libs | |
71 | Summary: Unbound shared library | |
72 | Summary(pl.UTF-8): Biblioteka współdzielona Unbound | |
73 | Group: Libraries | |
74 | Conflicts: unbound < 1.4.18-1 | |
75 | ||
76 | %description libs | |
77 | Unbound shared library. | |
78 | ||
79 | %description libs -l pl.UTF-8 | |
80 | Biblioteka współdzielona Unbound. | |
81 | ||
ca75cd40 | 82 | %package devel |
83 | Summary: Header files for unbound library | |
84 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki unbound | |
85 | Group: Development/Libraries | |
89d05c6c | 86 | Requires: %{name}-libs = %{version}-%{release} |
89d05c6c | 87 | Requires: openssl-devel |
ca75cd40 | 88 | |
89 | %description devel | |
90 | Header files for unbound library. | |
91 | ||
92 | %description devel -l pl.UTF-8 | |
93 | Pliki nagłówkowe biblioteki unbound. | |
94 | ||
95 | %package static | |
96 | Summary: Static unbound library | |
97 | Summary(pl.UTF-8): Statyczna biblioteka unbound | |
98 | Group: Development/Libraries | |
99 | Requires: %{name}-devel = %{version}-%{release} | |
100 | ||
101 | %description static | |
102 | Static unbound library. | |
103 | ||
104 | %description static -l pl.UTF-8 | |
105 | Statyczna biblioteka unbound. | |
106 | ||
89d05c6c JB |
107 | %package -n python-unbound |
108 | Summary: Python interface to unbound library | |
109 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki unbound | |
110 | Group: Python/Libraries | |
111 | Requires: %{name}-libs = %{version}-%{release} | |
112 | ||
113 | %description -n python-unbound | |
114 | Python interface to unbound library. | |
115 | ||
116 | %description -n python-unbound -l pl.UTF-8 | |
117 | Pythonowy interfejs do biblioteki unbound. | |
118 | ||
ca75cd40 | 119 | %prep |
120 | %setup -q | |
b53232e5 | 121 | %patch0 -p1 |
f33b27d4 | 122 | %patch1 -p1 |
ca75cd40 | 123 | |
124 | %build | |
f33b27d4 JB |
125 | %{__libtoolize} |
126 | %{__aclocal} | |
127 | %{__autoconf} | |
128 | %{__autoheader} | |
89d05c6c | 129 | %configure \ |
e5f6e160 JK |
130 | %{__with_without python pyunbound} \ |
131 | %{__with_without python pythonmodule} \ | |
0ddfe461 | 132 | --with-pidfile=/run/%{name}.pid \ |
267353b4 | 133 | --with-chroot-dir="" \ |
0ddfe461 JK |
134 | --with-conf-file=%{_sysconfdir}/%{name}/%{name}.conf \ |
135 | --with-rootkey-file=/var/lib/%{name}/root.key \ | |
136 | --with-rootcert-file=%{_sysconfdir}/%{name}/icannbundle.pem | |
137 | ||
ca75cd40 | 138 | %{__make} |
139 | ||
140 | %install | |
141 | rm -rf $RPM_BUILD_ROOT | |
0ddfe461 | 142 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},/var/lib/%{name}} |
ca75cd40 | 143 | |
144 | %{__make} install \ | |
145 | DESTDIR=$RPM_BUILD_ROOT | |
146 | ||
0ddfe461 JK |
147 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
148 | install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service | |
149 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/icannbundle.pem | |
150 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/named.cache | |
151 | ||
152 | touch $RPM_BUILD_ROOT/var/lib/%{name}/root.key | |
153 | ||
89d05c6c | 154 | %if %{with python} |
42c66384 | 155 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_unbound.la |
89d05c6c JB |
156 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
157 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
158 | %py_postclean | |
159 | %endif | |
160 | ||
ca75cd40 | 161 | %clean |
162 | rm -rf $RPM_BUILD_ROOT | |
163 | ||
ca75cd40 | 164 | %post |
165 | /sbin/chkconfig --add %{name} | |
0ddfe461 | 166 | %systemd_post %{name}.service |
ca75cd40 | 167 | %service %{name} restart |
168 | ||
5c77fe31 AM |
169 | %pre |
170 | %useradd -u 196 -g 99 -d /tmp -s /bin/false -c "unbound user" unbound | |
171 | ||
ca75cd40 | 172 | %preun |
173 | if [ "$1" = "0" ]; then | |
174 | %service -q %{name} stop | |
175 | /sbin/chkconfig --del %{name} | |
176 | fi | |
0ddfe461 | 177 | %systemd_preun %{name}.service |
ca75cd40 | 178 | |
5c77fe31 AM |
179 | %postun |
180 | if [ "$1" = "0" ]; then | |
181 | %userremove unbound | |
182 | fi | |
0ddfe461 JK |
183 | %systemd_reload |
184 | ||
185 | %triggerpostun -- %{name} < 1.4.22-1 | |
186 | %systemd_trigger %{name}.service | |
5c77fe31 | 187 | |
89d05c6c JB |
188 | %post libs -p /sbin/ldconfig |
189 | %postun libs -p /sbin/ldconfig | |
190 | ||
ca75cd40 | 191 | %files |
192 | %defattr(644,root,root,755) | |
89d05c6c | 193 | %doc doc/{CREDITS,Changelog,FEATURES,LICENSE,README,TODO,control_proto_spec.txt,example.conf,ietf67-design-02.pdf,requirements.txt} |
cda91157 | 194 | %attr(754,root,root) /etc/rc.d/init.d/unbound |
0ddfe461 | 195 | %{systemdunitdir}/%{name}.service |
783ab43a | 196 | %dir %{_sysconfdir}/%{name} |
197 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unbound.conf | |
0ddfe461 JK |
198 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/named.cache |
199 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/icannbundle.pem | |
ca75cd40 | 200 | %attr(755,root,root) %{_sbindir}/unbound |
511c7cae | 201 | %attr(755,root,root) %{_sbindir}/unbound-anchor |
ca75cd40 | 202 | %attr(755,root,root) %{_sbindir}/unbound-checkconf |
5ec53429 | 203 | %attr(755,root,root) %{_sbindir}/unbound-control* |
ca75cd40 | 204 | %attr(755,root,root) %{_sbindir}/unbound-host |
205 | %{_mandir}/man1/unbound-host.1* | |
206 | %{_mandir}/man5/unbound.conf.5* | |
207 | %{_mandir}/man8/unbound-checkconf.8* | |
208 | %{_mandir}/man8/unbound.8* | |
511c7cae | 209 | %{_mandir}/man8/unbound-anchor.8* |
379d3e5e | 210 | %{_mandir}/man8/unbound-control*.8* |
0ddfe461 JK |
211 | %dir %attr(755,unbound,nobody) /var/lib/%{name} |
212 | %ghost /var/lib/%{name}/root.key | |
ca75cd40 | 213 | |
89d05c6c JB |
214 | %files libs |
215 | %defattr(644,root,root,755) | |
216 | %attr(755,root,root) %{_libdir}/libunbound.so.*.*.* | |
217 | %attr(755,root,root) %ghost %{_libdir}/libunbound.so.2 | |
218 | ||
ca75cd40 | 219 | %files devel |
cda91157 | 220 | %defattr(644,root,root,755) |
89d05c6c | 221 | %attr(755,root,root) %{_libdir}/libunbound.so |
ca75cd40 | 222 | %{_libdir}/libunbound.la |
89d05c6c | 223 | %{_includedir}/unbound.h |
ca75cd40 | 224 | %{_mandir}/man3/libunbound.3* |
44b158d7 | 225 | %{_mandir}/man3/ub_*.3* |
ca75cd40 | 226 | |
227 | %files static | |
cda91157 | 228 | %defattr(644,root,root,755) |
ca75cd40 | 229 | %{_libdir}/libunbound.a |
89d05c6c JB |
230 | |
231 | %if %{with python} | |
232 | %files -n python-unbound | |
233 | %defattr(644,root,root,755) | |
234 | %attr(755,root,root) %{py_sitedir}/_unbound.so* | |
235 | %{py_sitedir}/unbound.py[co] | |
d1474b1b | 236 | %{py_sitedir}/unboundmodule.py[co] |
89d05c6c | 237 | %endif |