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