/[packages]/cauldron/bind/current/SPECS/bind.spec
ViewVC logotype

Annotation of /cauldron/bind/current/SPECS/bind.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 461077 - (hide annotations) (download)
Tue Jul 30 10:48:35 2013 UTC (7 years, 2 months ago) by oden
File size: 20481 byte(s)
- P209: make the test suite work

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

  ViewVC Help
Powered by ViewVC 1.1.28