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

  ViewVC Help
Powered by ViewVC 1.1.30