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