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