1 |
ennael |
36772 |
# default options |
2 |
guillomovitch |
139898 |
%define sdb 1 |
3 |
ennael |
36772 |
%define geoip 0 |
4 |
|
|
%define gssapi 1 |
5 |
|
|
|
6 |
guillomovitch |
139898 |
%{?_with_sdbp: %{expand: %%global sdb 1}} |
7 |
|
|
%{?_without_sdb: %{expand: %%global sdb 0}} |
8 |
ennael |
36772 |
%{?_with_geoip: %{expand: %%global geoip 1}} |
9 |
|
|
%{?_without_geoip: %{expand: %%global geoip 0}} |
10 |
|
|
%{?_with_gssapi: %{expand: %%global gssapi 1}} |
11 |
|
|
%{?_without_gssapi: %{expand: %%global gssapi 0}} |
12 |
|
|
|
13 |
guillomovitch |
310111 |
%define major_version 9.9.2 |
14 |
|
|
#define patch_version P1 |
15 |
guillomovitch |
136524 |
%define dashpatch %{?patch_version:-%patch_version}%nil |
16 |
|
|
%define dotpatch %{?patch_version:.%patch_version}%nil |
17 |
pterjan |
95469 |
|
18 |
guillomovitch |
220366 |
Name: bind |
19 |
|
|
Version: %{major_version}%{dotpatch} |
20 |
guillomovitch |
256011 |
Release: %mkrel 1 |
21 |
ennael |
36772 |
Summary: A DNS (Domain Name System) server |
22 |
pterjan |
95469 |
License: ISC |
23 |
ennael |
36772 |
Group: System/Servers |
24 |
|
|
URL: http://www.isc.org/products/BIND/ |
25 |
guillomovitch |
136524 |
Source0: ftp://ftp.isc.org/isc/%{name}9/%{major_version}%{dashpatch}/%{name}-%{major_version}%{dashpatch}.tar.gz |
26 |
guillomovitch |
276006 |
Source1: ftp://ftp.isc.org/isc/%{name}9/%{major_version}%{dashpatch}/%{name}-%{major_version}%{dashpatch}.tar.gz.sha512.asc |
27 |
ennael |
36772 |
Source2: bind-manpages.tar.bz2 |
28 |
|
|
Source3: bind-dhcp-dynamic-dns-examples.tar.bz2 |
29 |
|
|
Source6: bind-named.sysconfig |
30 |
|
|
Source7: bind-keygen.c |
31 |
guillomovitch |
220366 |
Source8: named.NetworkManager |
32 |
guillomovitch |
221261 |
Source9: setup-named-chroot.sh |
33 |
guillomovitch |
139898 |
Source12: README.sdb_pgsql |
34 |
ennael |
36772 |
Source11: ftp://ftp.internic.net/domain/named.cache |
35 |
|
|
# caching-nameserver files (S100-S112) |
36 |
|
|
Source100: bogon_acl.conf |
37 |
|
|
Source101: hosts |
38 |
|
|
Source102: localdomain.zone |
39 |
|
|
Source103: localhost.zone |
40 |
|
|
Source104: logging.conf |
41 |
|
|
Source105: named.broadcast |
42 |
|
|
Source106: named.conf |
43 |
|
|
Source107: named.ip6.local |
44 |
|
|
Source108: named.local |
45 |
|
|
Source109: named.zero |
46 |
|
|
Source110: rndc.conf |
47 |
|
|
Source111: rndc.key |
48 |
|
|
Source112: trusted_networks_acl.conf |
49 |
guillomovitch |
136519 |
|
50 |
guillomovitch |
139898 |
Source30: ldap2zone.c |
51 |
|
|
Source31: ldap2zone.1 |
52 |
|
|
Source32: named-sdb.8 |
53 |
|
|
Source33: zonetodb.1 |
54 |
|
|
Source34: zone2sqlite.1 |
55 |
guillomovitch |
303075 |
Source35: bind.tmpfiles |
56 |
guillomovitch |
139898 |
Source36: bind-9.3.1rc1-sdb_tools-Makefile.in |
57 |
guillomovitch |
220366 |
Source37: named.service |
58 |
|
|
Source39: named-sdb.service |
59 |
guillomovitch |
139898 |
|
60 |
guillomovitch |
136519 |
# fedora patches |
61 |
guillomovitch |
310111 |
Patch5: bind-nonexec.patch |
62 |
|
|
Patch10: bind-9.5-PIE.patch |
63 |
|
|
Patch16: bind-9.3.2-redhat_doc.patch |
64 |
guillomovitch |
136519 |
Patch72: bind-9.5-dlz-64bit.patch |
65 |
|
|
Patch87: bind-9.5-parallel-build.patch |
66 |
|
|
Patch99: bind-96-libtool2.patch |
67 |
guillomovitch |
139898 |
Patch101: bind-96-old-api.patch |
68 |
guillomovitch |
136519 |
Patch102: bind-95-rh452060.patch |
69 |
|
|
Patch106: bind93-rh490837.patch |
70 |
guillomovitch |
256011 |
Patch107: bind97-dist-pkcs11.patch |
71 |
|
|
Patch109: bind97-rh478718.patch |
72 |
|
|
Patch110: bind97-rh570851.patch |
73 |
|
|
Patch111: bind97-exportlib.patch |
74 |
|
|
Patch112: bind97-rh645544.patch |
75 |
|
|
Patch119: bind97-rh693982.patch |
76 |
|
|
Patch123: bind98-rh735103.patch |
77 |
|
|
Patch124: nslookup-norec.patch |
78 |
|
|
Patch125: bind99-buildfix.patch |
79 |
|
|
Patch127: bind99-forward.patch |
80 |
guillomovitch |
310111 |
Patch130: bind-9.9.2-dlz-libdb4.patch |
81 |
|
|
Patch131: bind-9.9.1-P2-multlib-conflict.patch |
82 |
|
|
Patch132: bind99-stat.patch |
83 |
guillomovitch |
136519 |
|
84 |
guillomovitch |
139898 |
# SDB patches |
85 |
|
|
Patch11: bind-9.3.2b2-sdbsrc.patch |
86 |
|
|
Patch12: bind-9.5-sdb.patch |
87 |
|
|
Patch62: bind-9.5-sdb-sqlite-bld.patch |
88 |
|
|
|
89 |
guillomovitch |
256011 |
# needs inpection |
90 |
|
|
Patch17: bind-9.3.2b1-fix_sdb_ldap.patch |
91 |
|
|
Patch104: bind-96-dyndb.patch |
92 |
|
|
|
93 |
guillomovitch |
136519 |
# IDN patches |
94 |
|
|
Patch73: bind-9.5-libidn.patch |
95 |
|
|
Patch83: bind-9.5-libidn2.patch |
96 |
|
|
Patch85: bind-9.5-libidn3.patch |
97 |
|
|
Patch94: bind95-rh461409.patch |
98 |
|
|
|
99 |
|
|
# other patches |
100 |
|
|
Patch206: bind-9.2.0rc3-varrun.patch |
101 |
|
|
Patch208: bind-9.3.2-prctl_set_dumpable.patch |
102 |
ennael |
36772 |
# (oe) rediffed patch originates from http://www.caraytech.com/geodns/ |
103 |
|
|
Patch300: bind-9.4.0-geoip.diff |
104 |
|
|
Requires: bind-utils >= %{version}-%{release} |
105 |
tmb |
233607 |
Requires(post): rpm-helper >= 0.24.8-1 |
106 |
|
|
Requires(preun): rpm-helper >= 0.24.8-1 |
107 |
ennael |
36772 |
BuildRequires: openssl-devel |
108 |
|
|
BuildRequires: multiarch-utils >= 1.0.3 |
109 |
|
|
BuildRequires: libidn-devel |
110 |
|
|
BuildRequires: postgresql-devel |
111 |
|
|
BuildRequires: mysql-devel |
112 |
|
|
BuildRequires: libcap-devel >= 2.10 |
113 |
guillomovitch |
136529 |
BuildRequires: libxml2-devel |
114 |
ennael |
36772 |
%if %{gssapi} |
115 |
|
|
BuildRequires: krb5-devel |
116 |
|
|
%endif |
117 |
guillomovitch |
136529 |
%if %{geoip} |
118 |
|
|
BuildRequires: libgeoip-devel |
119 |
|
|
%endif |
120 |
guillomovitch |
139898 |
%if %{sdb} |
121 |
guillomovitch |
136529 |
BuildRequires: mysql-devel |
122 |
|
|
BuildRequires: openldap-devel |
123 |
guillomovitch |
139898 |
BuildRequires: postgresql-devel |
124 |
|
|
BuildRequires: sqlite3-devel |
125 |
guillomovitch |
136529 |
%endif |
126 |
ennael |
36772 |
|
127 |
|
|
%description |
128 |
|
|
BIND (Berkeley Internet Name Domain) is an implementation of the DNS |
129 |
|
|
(domain Name System) protocols. BIND includes a DNS server (named), |
130 |
|
|
which resolves host names to IP addresses, and a resolver library |
131 |
|
|
(routines for applications to use when interfacing with DNS). A DNS |
132 |
|
|
server allows clients to name resources or objects and share the |
133 |
|
|
information with other network machines. The named DNS server can be |
134 |
|
|
used on workstations as a caching name server, but is generally only |
135 |
|
|
needed on one machine for an entire network. Note that the |
136 |
|
|
configuration files for making BIND act as a simple caching nameserver |
137 |
|
|
are included in the caching-nameserver package. |
138 |
|
|
|
139 |
|
|
Install the bind package if you need a DNS server for your network. If |
140 |
|
|
you want bind to act a caching name server, you will also need to install |
141 |
|
|
the caching-nameserver package. |
142 |
|
|
|
143 |
|
|
Many BIND 8 features previously unimplemented in BIND 9, including |
144 |
|
|
domain-specific forwarding, the \$GENERATE master file directive, and |
145 |
|
|
the "blackhole", "dialup", and "sortlist" options Forwarding of dynamic |
146 |
|
|
update requests; this is enabled by the "allow-update-forwarding" option |
147 |
|
|
A new, simplified database interface and a number of sample drivers based |
148 |
|
|
on it; see doc/dev/sdb for details |
149 |
|
|
Support for building single-threaded servers for environments that do not |
150 |
|
|
supply POSIX threads |
151 |
|
|
New configuration options: "min-refresh-time", "max-refresh-time", |
152 |
|
|
"min-retry-time", "max-retry-time", "additional-from-auth", |
153 |
|
|
"additional-from-cache", "notify explicit" |
154 |
|
|
Faster lookups, particularly in large zones. |
155 |
|
|
|
156 |
|
|
Build Options: |
157 |
guillomovitch |
139898 |
--with sdb Build with database backends and DLZ support (enabled by default) |
158 |
|
|
--with geoip Build with GeoIP support (disabled per default) |
159 |
ennael |
36772 |
|
160 |
guillomovitch |
139898 |
%if %{sdb} |
161 |
|
|
%package sdb |
162 |
|
|
Summary: BIND server with database backends and DLZ support |
163 |
guillomovitch |
143347 |
Group: System/Servers |
164 |
guillomovitch |
139898 |
Requires: bind |
165 |
tmb |
233607 |
Requires(post): rpm-helper >= 0.24.8-1 |
166 |
|
|
Requires(preun): rpm-helper >= 0.24.8-1 |
167 |
guillomovitch |
139898 |
|
168 |
|
|
%description sdb |
169 |
|
|
BIND (Berkeley Internet Name Domain) is an implementation of the DNS |
170 |
|
|
(Domain Name System) protocols. BIND includes a DNS server (named-sdb) |
171 |
|
|
which has compiled-in SDB (Simplified Database Backend) which includes |
172 |
|
|
support for using alternative Zone Databases stored in an LDAP server |
173 |
|
|
(ldapdb), a postgreSQL database (pgsqldb), an sqlite database (sqlitedb), |
174 |
|
|
or in the filesystem (dirdb), in addition to the standard in-memory RBT |
175 |
|
|
(Red Black Tree) zone database. It also includes support for DLZ |
176 |
|
|
(Dynamic Loadable Zones) |
177 |
|
|
%endif |
178 |
|
|
|
179 |
ennael |
36772 |
%package utils |
180 |
|
|
Summary: Utilities for querying DNS name servers |
181 |
|
|
Group: Networking/Other |
182 |
|
|
|
183 |
|
|
%description utils |
184 |
|
|
Bind-utils contains a collection of utilities for querying DNS (Domain |
185 |
|
|
Name Service) name servers to find out information about Internet hosts. |
186 |
|
|
These tools will provide you with the IP addresses for given host names, |
187 |
|
|
as well as other information about registered domains and network |
188 |
|
|
addresses. |
189 |
|
|
|
190 |
|
|
You should install bind-utils if you need to get information from DNS name |
191 |
|
|
servers. |
192 |
|
|
|
193 |
|
|
%package devel |
194 |
|
|
Summary: Include files and libraries needed for bind DNS development |
195 |
|
|
Group: Development/C |
196 |
|
|
|
197 |
|
|
%description devel |
198 |
|
|
The bind-devel package contains all the include files and the |
199 |
|
|
library required for DNS (Domain Name Service) development for |
200 |
|
|
BIND versions 9.x.x. |
201 |
|
|
|
202 |
|
|
%package doc |
203 |
|
|
Summary: Documentation for BIND |
204 |
fwang |
316358 |
Group: Documentation |
205 |
fwang |
179999 |
BuildArch: noarch |
206 |
ennael |
36772 |
|
207 |
|
|
%description doc |
208 |
|
|
The bind-devel package contains the documentation for BIND. |
209 |
|
|
|
210 |
|
|
%prep |
211 |
guillomovitch |
139898 |
%setup -q -n %{name}-%{major_version}%{dashpatch} -a2 -a3 |
212 |
ennael |
36772 |
|
213 |
guillomovitch |
310111 |
%patch5 -p1 -b .nonexec |
214 |
|
|
%patch10 -p1 -b .PIE |
215 |
|
|
|
216 |
guillomovitch |
139898 |
%patch104 -p1 -b .dyndb |
217 |
guillomovitch |
256011 |
%patch72 -p1 -b .64bit |
218 |
|
|
%patch73 -p1 -b .libidn |
219 |
|
|
%patch83 -p1 -b .libidn2 |
220 |
|
|
%patch85 -p1 -b .libidn3 |
221 |
|
|
%patch87 -p1 -b .parallel |
222 |
|
|
%patch94 -p1 -b .rh461409 |
223 |
|
|
mkdir m4 |
224 |
|
|
%patch99 -p1 -b .libtool2 |
225 |
ennael |
36772 |
|
226 |
guillomovitch |
256011 |
%patch102 -p1 -b .rh452060 |
227 |
|
|
%patch106 -p0 -b .rh490837 |
228 |
|
|
%patch107 -p1 -b .dist-pkcs11 |
229 |
|
|
%patch109 -p1 -b .rh478718 |
230 |
|
|
%patch110 -p1 -b .rh570851 |
231 |
|
|
%patch111 -p1 -b .exportlib |
232 |
|
|
%patch112 -p1 -b .rh645544 |
233 |
|
|
%patch119 -p1 -b .rh693982 |
234 |
|
|
%patch123 -p1 -b .rh735103 |
235 |
|
|
pushd bin/dig |
236 |
|
|
%patch124 -p0 -b .nslookup-norec |
237 |
|
|
popd |
238 |
|
|
%patch125 -p1 -b .buildfix |
239 |
|
|
%patch127 -p1 -b .forward |
240 |
guillomovitch |
310111 |
%patch130 -p1 -b .libdb4 |
241 |
|
|
%patch131 -p1 -b .multlib-conflict |
242 |
guillomovitch |
256011 |
|
243 |
guillomovitch |
139898 |
%if %{sdb} |
244 |
|
|
%patch101 -p1 -b .old-api |
245 |
|
|
mkdir bin/named-sdb |
246 |
|
|
cp -r bin/named/* bin/named-sdb |
247 |
|
|
%patch11 -p1 -b .sdbsrc |
248 |
|
|
# SDB ldap |
249 |
|
|
cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named-sdb |
250 |
|
|
# SDB postgreSQL |
251 |
|
|
cp -fp contrib/sdb/pgsql/pgsqldb.[ch] bin/named-sdb |
252 |
|
|
# SDB sqlite |
253 |
|
|
cp -fp contrib/sdb/sqlite/sqlitedb.[ch] bin/named-sdb |
254 |
|
|
# SDB Berkeley DB - needs to be ported to DB4! |
255 |
|
|
#cp -fp contrib/sdb/bdb/bdb.[ch] bin/named_sdb |
256 |
|
|
# SDB dir |
257 |
|
|
cp -fp contrib/sdb/dir/dirdb.[ch] bin/named-sdb |
258 |
|
|
# SDB tools |
259 |
|
|
mkdir -p bin/sdb_tools |
260 |
|
|
cp -fp %{SOURCE30} bin/sdb_tools/ldap2zone.c |
261 |
|
|
cp -fp %{SOURCE36} bin/sdb_tools/Makefile.in |
262 |
|
|
#cp -fp contrib/sdb/bdb/zone2bdb.c bin/sdb_tools |
263 |
|
|
cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/sdb_tools |
264 |
|
|
cp -fp contrib/sdb/pgsql/zonetodb.c bin/sdb_tools |
265 |
|
|
cp -fp contrib/sdb/sqlite/zone2sqlite.c bin/sdb_tools |
266 |
|
|
%patch12 -p1 -b .sdb |
267 |
|
|
%patch17 -p1 -b .fix_sdb_ldap |
268 |
|
|
%patch62 -p1 -b .sdb-sqlite-bld |
269 |
ennael |
36772 |
%endif |
270 |
guillomovitch |
310111 |
%patch132 -p1 -b .stat |
271 |
ennael |
36772 |
|
272 |
guillomovitch |
136519 |
%patch206 -p0 -b .varrun.droplet |
273 |
|
|
%patch208 -p0 -b .prctl_set_dumpable.droplet |
274 |
ennael |
36772 |
|
275 |
|
|
%if %{geoip} |
276 |
|
|
%patch300 -p1 -b .geoip |
277 |
|
|
%endif |
278 |
|
|
|
279 |
|
|
cp %{SOURCE7} keygen.c |
280 |
|
|
cp %{SOURCE11} named.cache |
281 |
|
|
|
282 |
|
|
mkdir -p caching-nameserver |
283 |
|
|
cp %{SOURCE100} caching-nameserver/bogon_acl.conf |
284 |
|
|
cp %{SOURCE101} caching-nameserver/hosts |
285 |
|
|
cp %{SOURCE102} caching-nameserver/localdomain.zone |
286 |
|
|
cp %{SOURCE103} caching-nameserver/localhost.zone |
287 |
|
|
cp %{SOURCE104} caching-nameserver/logging.conf |
288 |
|
|
cp %{SOURCE105} caching-nameserver/named.broadcast |
289 |
|
|
cp %{SOURCE106} caching-nameserver/named.conf |
290 |
|
|
cp %{SOURCE107} caching-nameserver/named.ip6.local |
291 |
|
|
cp %{SOURCE108} caching-nameserver/named.local |
292 |
|
|
cp %{SOURCE109} caching-nameserver/named.zero |
293 |
|
|
cp %{SOURCE110} caching-nameserver/rndc.conf |
294 |
|
|
cp %{SOURCE111} caching-nameserver/rndc.key |
295 |
|
|
cp %{SOURCE112} caching-nameserver/trusted_networks_acl.conf |
296 |
|
|
|
297 |
|
|
%build |
298 |
|
|
%serverbuild |
299 |
|
|
|
300 |
|
|
export CPPFLAGS="$CPPFLAGS -DDIG_SIGCHASE" |
301 |
|
|
export STD_CDEFINES="$CPPFLAGS" |
302 |
|
|
|
303 |
guillomovitch |
136264 |
libtoolize --copy --force |
304 |
|
|
aclocal -I m4 --force |
305 |
|
|
autoheader --force |
306 |
|
|
autoconf --force |
307 |
ennael |
36772 |
|
308 |
|
|
# (oe) make queryperf from the contrib _before_ bind..., makes it |
309 |
|
|
# easier to determine if it builds or not, it saves time... |
310 |
|
|
pushd contrib/queryperf |
311 |
|
|
rm -f configure |
312 |
|
|
autoconf |
313 |
|
|
%configure2_5x |
314 |
|
|
%make CFLAGS="$CFLAGS" |
315 |
|
|
popd |
316 |
|
|
|
317 |
|
|
pushd contrib/query-loc-* |
318 |
|
|
perl -pi -e "s|-lnsl|-lnsl -lresolv|g" configure* |
319 |
|
|
rm -f configure |
320 |
|
|
autoconf |
321 |
|
|
%configure2_5x |
322 |
|
|
%make CFLAGS="$CFLAGS" |
323 |
|
|
popd |
324 |
|
|
|
325 |
|
|
%if %{geoip} |
326 |
guillomovitch |
139898 |
export CFLAGS="$CFLAGS -DGEOIP" |
327 |
ennael |
36772 |
export LDFLAGS="$LDFLAGS -lGeoIP" |
328 |
|
|
%endif |
329 |
|
|
|
330 |
guillomovitch |
136293 |
%configure2_5x \ |
331 |
ennael |
36772 |
--localstatedir=/var \ |
332 |
|
|
--disable-openssl-version-check \ |
333 |
guillomovitch |
136263 |
--enable-exportlib \ |
334 |
|
|
--with-export-libdir=%{_libdir} \ |
335 |
|
|
--with-export-includedir=%{_includedir} \ |
336 |
ennael |
36772 |
--enable-threads \ |
337 |
|
|
--enable-largefile \ |
338 |
|
|
--enable-ipv6 \ |
339 |
|
|
--enable-filter-aaaa \ |
340 |
|
|
--enable-epoll \ |
341 |
|
|
--with-openssl=%{_prefix} \ |
342 |
|
|
%if %{gssapi} |
343 |
|
|
--with-gssapi=%{_prefix} --disable-isc-spnego \ |
344 |
|
|
%endif |
345 |
|
|
--with-randomdev=/dev/urandom \ |
346 |
|
|
--with-libxml2=yes \ |
347 |
guillomovitch |
139898 |
%if %{sdb} |
348 |
|
|
--with-dlz-ldap=yes \ |
349 |
ennael |
36772 |
--with-dlz-postgres=yes \ |
350 |
|
|
--with-dlz-mysql=yes \ |
351 |
|
|
--with-dlz-filesystem=yes \ |
352 |
|
|
--with-dlz-stub=yes |
353 |
guillomovitch |
139898 |
%endif |
354 |
ennael |
36772 |
|
355 |
|
|
# pkcs11 support requires a working backend, otherwise bind won't start |
356 |
|
|
# http://blogs.sun.com/janp/ |
357 |
|
|
# http://sourceforge.net/projects/opencryptoki |
358 |
|
|
#--with-pkcs11 \ |
359 |
|
|
|
360 |
guillomovitch |
136692 |
make |
361 |
ennael |
36772 |
|
362 |
|
|
gcc $CFLAGS -o dns-keygen keygen.c |
363 |
|
|
|
364 |
|
|
#%%check |
365 |
|
|
## run the test suite |
366 |
|
|
#make check |
367 |
|
|
|
368 |
|
|
%install |
369 |
|
|
rm -rf %{buildroot} |
370 |
|
|
|
371 |
|
|
%makeinstall_std |
372 |
|
|
|
373 |
|
|
ln -snf named %{buildroot}%{_sbindir}/lwresd |
374 |
|
|
|
375 |
|
|
install -m0755 contrib/named-bootconf/named-bootconf.sh %{buildroot}%{_sbindir}/named-bootconf |
376 |
|
|
install -m0755 contrib/queryperf/queryperf %{buildroot}%{_bindir}/ |
377 |
|
|
cp contrib/queryperf/README README.queryperf |
378 |
|
|
|
379 |
|
|
install -m0755 contrib/query-loc-*/query-loc %{buildroot}%{_bindir}/ |
380 |
|
|
install -m0644 contrib/query-loc-*/query-loc.1 %{buildroot}%{_mandir}/man1/ |
381 |
|
|
cp contrib/query-loc-*/ADDRESSES ADDRESSES.query-loc |
382 |
|
|
cp contrib/query-loc-*/ALGO ALGO.query-loc |
383 |
|
|
cp contrib/query-loc-*/README README.query-loc |
384 |
|
|
cp contrib/query-loc-*/USAGE USAGE.query-loc |
385 |
|
|
|
386 |
guillomovitch |
220366 |
install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig |
387 |
|
|
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/named |
388 |
ennael |
36772 |
|
389 |
guillomovitch |
222546 |
install -d -m 755 %{buildroot}%{_sysconfdir}/rsyslog.d/ |
390 |
|
|
cat > %{buildroot}%{_sysconfdir}/rsyslog.d/named.conf <<'EOF' |
391 |
|
|
$AddUnixListenSocket /var/lib/named/dev/log |
392 |
|
|
EOF |
393 |
|
|
|
394 |
guillomovitch |
220366 |
install -d -m 755 %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d |
395 |
|
|
install -m 755 %{SOURCE8} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/13-named |
396 |
|
|
|
397 |
guillomovitch |
221261 |
install -m 755 %{SOURCE9} %{buildroot}%{_sbindir}/setup-named-chroot.sh |
398 |
|
|
|
399 |
guillomovitch |
220366 |
# systemd files |
400 |
guillomovitch |
303075 |
install -D -m 644 %{SOURCE35} %{buildroot}%{_prefix}/lib/tmpfiles.d/named.conf |
401 |
guillomovitch |
220366 |
|
402 |
|
|
install -d -m 755 %{buildroot}%{_unitdir} |
403 |
|
|
install -m 644 %{SOURCE37} %{buildroot}%{_unitdir} |
404 |
|
|
install -m 644 %{SOURCE39} %{buildroot}%{_unitdir} |
405 |
|
|
|
406 |
guillomovitch |
139898 |
%if %{sdb} |
407 |
|
|
install -m 644 %{SOURCE12} contrib/sdb/pgsql/ |
408 |
ennael |
36772 |
|
409 |
guillomovitch |
220366 |
install -m 644 %{SOURCE31} %{buildroot}%{_mandir}/man1/ldap2zone.1 |
410 |
|
|
install -m 644 %{SOURCE32} %{buildroot}%{_mandir}/man8/named-sdb.8 |
411 |
|
|
install -m 644 %{SOURCE33} %{buildroot}%{_mandir}/man1/zonetodb.1 |
412 |
|
|
install -m 644 %{SOURCE34} %{buildroot}%{_mandir}/man1/zone2sqlite.1 |
413 |
ennael |
36772 |
%endif |
414 |
|
|
|
415 |
guillomovitch |
220366 |
install -m 755 dns-keygen %{buildroot}%{_sbindir}/dns-keygen |
416 |
ennael |
36772 |
|
417 |
|
|
# make the chroot |
418 |
|
|
install -d %{buildroot}/var/lib/named/{dev,etc} |
419 |
|
|
install -d %{buildroot}/var/lib/named/var/{log,run,tmp} |
420 |
anssi |
202727 |
install -d %{buildroot}/var/lib/named/var/named/{master,slaves,reverse,dynamic} |
421 |
ennael |
36772 |
|
422 |
|
|
install -m 644 \ |
423 |
|
|
caching-nameserver/named.conf \ |
424 |
|
|
caching-nameserver/logging.conf \ |
425 |
|
|
caching-nameserver/trusted_networks_acl.conf \ |
426 |
|
|
caching-nameserver/hosts \ |
427 |
|
|
caching-nameserver/bogon_acl.conf \ |
428 |
|
|
%{buildroot}/var/lib/named/etc |
429 |
|
|
install -m 640 \ |
430 |
|
|
caching-nameserver/rndc.conf\ |
431 |
|
|
caching-nameserver/rndc.key \ |
432 |
|
|
%{buildroot}/var/lib/named/etc |
433 |
|
|
install -m 644 \ |
434 |
|
|
caching-nameserver/localdomain.zone \ |
435 |
|
|
caching-nameserver/localhost.zone \ |
436 |
|
|
%{buildroot}/var/lib/named/var/named/master |
437 |
|
|
install -m 644 \ |
438 |
|
|
caching-nameserver/named.broadcast \ |
439 |
|
|
caching-nameserver/named.ip6.local \ |
440 |
|
|
caching-nameserver/named.local \ |
441 |
|
|
caching-nameserver/named.zero \ |
442 |
|
|
%{buildroot}/var/lib/named/var/named/reverse |
443 |
|
|
|
444 |
|
|
# fix some compat symlinks |
445 |
|
|
ln -s /var/lib/named/etc/named.conf %{buildroot}%{_sysconfdir}/named.conf |
446 |
|
|
ln -s /var/lib/named/etc/rndc.conf %{buildroot}%{_sysconfdir}/rndc.conf |
447 |
|
|
ln -s /var/lib/named/etc/rndc.key %{buildroot}%{_sysconfdir}/rndc.key |
448 |
|
|
mv %{buildroot}%{_sysconfdir}/bind.keys %{buildroot}/var/lib/named/etc/ |
449 |
|
|
ln -s /var/lib/named/etc/bind.keys %{buildroot}%{_sysconfdir}/bind.keys |
450 |
|
|
|
451 |
|
|
echo "; Use \"dig @A.ROOT-SERVERS.NET . ns\" to update this file if it's outdated." > named.cache.tmp |
452 |
|
|
cat named.cache >> named.cache.tmp |
453 |
|
|
install -m0644 named.cache.tmp %{buildroot}/var/lib/named/var/named/named.ca |
454 |
|
|
|
455 |
|
|
# fix man pages |
456 |
|
|
install -m0644 man5/resolver.5 %{buildroot}%{_mandir}/man5/ |
457 |
|
|
ln -s resolver.5 %{buildroot}%{_mandir}/man5/resolv.5 |
458 |
|
|
|
459 |
|
|
|
460 |
guillomovitch |
139898 |
install -d -m 755 %{buildroot}%{_docdir}/%{name} |
461 |
|
|
install -d -m 755 %{buildroot}%{_docdir}/%{name}/arm |
462 |
|
|
install -m 644 doc/arm/*.html %{buildroot}%{_docdir}/%{name}/arm |
463 |
|
|
install -m 644 doc/arm/*.pdf %{buildroot}%{_docdir}/%{name}/arm |
464 |
|
|
cp -pr doc/trustix %{buildroot}%{_docdir}/%{name} |
465 |
guillomovitch |
220366 |
#cp -pr doc/rfc %{buildroot}%{_docdir}/%{name} |
466 |
|
|
#cp -pr doc/draft %{buildroot}%{_docdir}/%{name} |
467 |
guillomovitch |
139898 |
cp -pr doc/misc %{buildroot}%{_docdir}/%{name} |
468 |
|
|
rm -f %{buildroot}%{_docdir}/%{name}/misc/Makefile* |
469 |
|
|
cp -pr doc/dhcp-dynamic-dns-examples %{buildroot}%{_docdir}/%{name} |
470 |
ennael |
36772 |
|
471 |
|
|
%multiarch_binaries %{buildroot}%{_bindir}/isc-config.sh |
472 |
|
|
|
473 |
|
|
%pre |
474 |
|
|
%_pre_useradd named /var/lib/named /bin/false |
475 |
|
|
|
476 |
|
|
DATE=`date +%%Y%%m%%d%%j%%S` |
477 |
|
|
for f in named.conf rndc.conf rndc.key; do |
478 |
|
|
# move away files to prepare for softlinks |
479 |
|
|
if [ -f /etc/$f -a ! -h /etc/$f ]; then mv -vf /etc/$f /etc/$f.$DATE; fi |
480 |
|
|
if [ -f /etc/$f -a ! -h /etc/$f ]; then mv -vf /etc/$f /etc/$f.$DATE; fi |
481 |
|
|
if [ -f /etc/$f -a ! -h /etc/$f ]; then mv -vf /etc/$f /etc/$f.$DATE; fi |
482 |
|
|
done |
483 |
|
|
|
484 |
|
|
%post |
485 |
|
|
if grep -q "_MY_KEY_" /var/lib/named/etc/rndc.conf /var/lib/named/etc/rndc.key; then |
486 |
|
|
MYKEY="`%{_sbindir}/dns-keygen`" |
487 |
|
|
perl -pi -e "s|_MY_KEY_|$MYKEY|g" /var/lib/named/etc/rndc.conf /var/lib/named/etc/rndc.key |
488 |
|
|
fi |
489 |
guillomovitch |
222497 |
# remove device file created with wrong minor number (#3028) |
490 |
guillomovitch |
223162 |
urandom=/var/lib/named/dev/urandom |
491 |
|
|
if [ -f $urandom ] && [ $(ls -l $urandom | awk '{print $6}') -eq 8 ]; then |
492 |
|
|
rm -f $urandom |
493 |
guillomovitch |
222497 |
fi |
494 |
ennael |
36772 |
%_post_service named |
495 |
|
|
|
496 |
|
|
%preun |
497 |
|
|
%_preun_service named |
498 |
|
|
|
499 |
|
|
%postun |
500 |
|
|
%_postun_userdel named |
501 |
|
|
|
502 |
|
|
%files |
503 |
guillomovitch |
139899 |
%doc CHANGES README FAQ COPYRIGHT |
504 |
ennael |
36772 |
%if %{geoip} |
505 |
|
|
%doc geodns.INSTALL geodns.named.conf-sample |
506 |
|
|
%endif |
507 |
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/named |
508 |
guillomovitch |
222546 |
%config(noreplace) %{_sysconfdir}/rsyslog.d/named.conf |
509 |
guillomovitch |
303075 |
%{_prefix}/lib/tmpfiles.d/named.conf |
510 |
guillomovitch |
220366 |
%{_sysconfdir}/NetworkManager/dispatcher.d/13-named |
511 |
|
|
%{_unitdir}/named.service |
512 |
guillomovitch |
221261 |
%{_sbindir}/setup-named-chroot.sh |
513 |
ennael |
36772 |
%{_sbindir}/arpaname |
514 |
|
|
%{_sbindir}/ddns-confgen |
515 |
|
|
%{_sbindir}/dns-keygen |
516 |
|
|
%{_sbindir}/dnssec-dsfromkey |
517 |
|
|
%{_sbindir}/dnssec-keyfromlabel |
518 |
|
|
%{_sbindir}/dnssec-keygen |
519 |
|
|
%{_sbindir}/dnssec-revoke |
520 |
|
|
%{_sbindir}/dnssec-settime |
521 |
|
|
%{_sbindir}/dnssec-signzone |
522 |
guillomovitch |
310111 |
%{_sbindir}/dnssec-checkds |
523 |
|
|
%{_sbindir}/dnssec-verify |
524 |
ennael |
36772 |
%{_sbindir}/genrandom |
525 |
|
|
%{_sbindir}/isc-hmac-fixup |
526 |
|
|
%{_sbindir}/lwresd |
527 |
|
|
%{_sbindir}/named |
528 |
|
|
%{_sbindir}/named-bootconf |
529 |
|
|
%{_sbindir}/named-checkconf |
530 |
|
|
%{_sbindir}/named-checkzone |
531 |
|
|
%{_sbindir}/named-compilezone |
532 |
|
|
%{_sbindir}/named-journalprint |
533 |
|
|
%{_sbindir}/nsec3hash |
534 |
|
|
%{_sbindir}/rndc |
535 |
|
|
%{_sbindir}/rndc-confgen |
536 |
|
|
%{_mandir}/man1/arpaname.1.* |
537 |
|
|
%{_mandir}/man5/named.conf.5* |
538 |
|
|
%{_mandir}/man5/rndc.conf.5* |
539 |
|
|
%{_mandir}/man8/ddns-confgen.8.* |
540 |
|
|
%{_mandir}/man8/dnssec-*.8* |
541 |
|
|
%{_mandir}/man8/genrandom.8.* |
542 |
|
|
%{_mandir}/man8/isc-hmac-fixup.8.* |
543 |
|
|
%{_mandir}/man8/lwresd.8* |
544 |
|
|
%{_mandir}/man8/named-*.8* |
545 |
|
|
%{_mandir}/man8/named.8* |
546 |
|
|
%{_mandir}/man8/nsec3hash.8.* |
547 |
|
|
%{_mandir}/man8/rndc.8* |
548 |
|
|
%{_mandir}/man8/rndc-confgen.8* |
549 |
|
|
# the chroot |
550 |
|
|
%dir /var/lib/named |
551 |
|
|
%dir /var/lib/named/dev |
552 |
|
|
%dir /var/lib/named/etc |
553 |
|
|
%dir /var/lib/named/var |
554 |
guillomovitch |
222546 |
%attr(-,named,named) %dir /var/lib/named/var/named |
555 |
ennael |
36772 |
%attr(-,named,named) %dir /var/lib/named/var/log |
556 |
|
|
%attr(-,named,named) %dir /var/lib/named/var/run |
557 |
|
|
%attr(-,named,named) %dir /var/lib/named/var/tmp |
558 |
|
|
%attr(-,named,named) %dir /var/lib/named/var/named/master |
559 |
|
|
%attr(-,named,named) %dir /var/lib/named/var/named/slaves |
560 |
|
|
%attr(-,named,named) %dir /var/lib/named/var/named/reverse |
561 |
anssi |
202727 |
%attr(-,named,named) %dir /var/lib/named/var/named/dynamic |
562 |
ennael |
36772 |
%config(noreplace) /var/lib/named/etc/named.conf |
563 |
|
|
%attr(-,root,named) %config(noreplace) /var/lib/named/etc/bind.keys |
564 |
|
|
%attr(-,root,named) %config(noreplace) /var/lib/named/etc/rndc.conf |
565 |
|
|
%attr(-,root,named) %config(noreplace) /var/lib/named/etc/rndc.key |
566 |
|
|
%{_sysconfdir}/bind.keys |
567 |
|
|
%{_sysconfdir}/named.conf |
568 |
|
|
%{_sysconfdir}/rndc.conf |
569 |
|
|
%{_sysconfdir}/rndc.key |
570 |
|
|
%config(noreplace) /var/lib/named/etc/bogon_acl.conf |
571 |
|
|
%config(noreplace) /var/lib/named/etc/logging.conf |
572 |
|
|
%config(noreplace) /var/lib/named/etc/trusted_networks_acl.conf |
573 |
|
|
%config(noreplace) /var/lib/named/etc/hosts |
574 |
|
|
%config(noreplace) /var/lib/named/var/named/master/localdomain.zone |
575 |
|
|
%config(noreplace) /var/lib/named/var/named/master/localhost.zone |
576 |
|
|
%config(noreplace) /var/lib/named/var/named/reverse/named.broadcast |
577 |
|
|
%config(noreplace) /var/lib/named/var/named/reverse/named.ip6.local |
578 |
|
|
%config(noreplace) /var/lib/named/var/named/reverse/named.local |
579 |
|
|
%config(noreplace) /var/lib/named/var/named/reverse/named.zero |
580 |
|
|
%config(noreplace) /var/lib/named/var/named/named.ca |
581 |
|
|
|
582 |
|
|
%files devel |
583 |
|
|
%doc CHANGES README |
584 |
|
|
%multiarch %{multiarch_bindir}/isc-config.sh |
585 |
|
|
%{_bindir}/isc-config.sh |
586 |
|
|
%{_includedir}/* |
587 |
|
|
%{_libdir}/*.a |
588 |
|
|
%{_mandir}/man1/isc-config.sh.1* |
589 |
|
|
%{_mandir}/man3/lwres*.3* |
590 |
|
|
|
591 |
|
|
%files utils |
592 |
|
|
%doc README COPYRIGHT *.query-loc *.queryperf |
593 |
|
|
%{_bindir}/dig |
594 |
|
|
%{_bindir}/host |
595 |
|
|
%{_bindir}/nslookup |
596 |
|
|
%{_bindir}/nsupdate |
597 |
|
|
%{_bindir}/queryperf |
598 |
|
|
%{_bindir}/query-loc |
599 |
|
|
%{_mandir}/man1/host.1* |
600 |
|
|
%{_mandir}/man1/dig.1* |
601 |
|
|
%{_mandir}/man1/nslookup.1* |
602 |
|
|
%{_mandir}/man1/nsupdate.1* |
603 |
|
|
%{_mandir}/man1/query-loc.1* |
604 |
|
|
%{_mandir}/man5/resolver.5* |
605 |
|
|
%{_mandir}/man5/resolv.5* |
606 |
|
|
|
607 |
|
|
%files doc |
608 |
guillomovitch |
139898 |
%{_docdir}/%{name} |
609 |
ennael |
36772 |
%doc doc/dhcp-dynamic-dns-examples doc/chroot doc/trustix |
610 |
|
|
|
611 |
guillomovitch |
139898 |
%if %{sdb} |
612 |
|
|
%files sdb |
613 |
guillomovitch |
220366 |
%{_unitdir}/named-sdb.service |
614 |
guillomovitch |
139898 |
%{_mandir}/man1/zone2ldap.1* |
615 |
|
|
%{_mandir}/man1/ldap2zone.1* |
616 |
|
|
%{_mandir}/man1/zonetodb.1* |
617 |
|
|
%{_mandir}/man1/zone2sqlite.1* |
618 |
|
|
%{_mandir}/man8/named-sdb.8* |
619 |
|
|
%doc contrib/sdb/ldap/README.ldap contrib/sdb/ldap/INSTALL.ldap contrib/sdb/pgsql/README.sdb_pgsql |
620 |
|
|
%{_sbindir}/named-sdb |
621 |
|
|
%{_sbindir}/zone2ldap |
622 |
|
|
%{_sbindir}/ldap2zone |
623 |
|
|
%{_sbindir}/zonetodb |
624 |
|
|
%{_sbindir}/zone2sqlite |
625 |
|
|
%endif |