]> git.pld-linux.org Git - packages/bind.git/blob - bind.spec
Rel 2; add map format fix patch
[packages/bind.git] / bind.spec
1 # TODO
2 # - apply http://www.caraytech.com/geodns/
3 #
4 # Conditional build:
5 %bcond_with     dnstap          # dnstap replication support
6 %bcond_without  geoip           # GeoIP support
7 %bcond_without  kerberos5       # GSS-API support
8 %bcond_without  ssl             # OpenSSL support
9 %bcond_with     ldap            # LDAP DLZ support
10 %bcond_with     odbc            # ODBC DLZ support
11 %bcond_without  sql             # SQL (MySQL+PostgreSQL) DLZ support
12 %bcond_without  lmdb            # LMDB storage support for addzone zones
13 %bcond_without  static_libs     # static libraries
14 %bcond_with     system_tests    # system tests (require root to configure localhost IPs)
15 %bcond_with     tests           # unit tests
16 %bcond_with     edns_cli        # ability to use edns-client-subnet in dig
17 %bcond_with     hip             # HIP RR support
18
19 %if "%{pld_release}" == "ac"
20 %bcond_with     epoll           # enable epoll support
21 # there didn't exist x86_64 2.4 kernel in PLD, so can safely enable epoll
22 %ifarch %{x8664}
23 %define         with_epoll      1
24 %endif
25 %else
26 %bcond_without  epoll           # disable epoll support
27 %endif
28
29 %define         ver     9.16.20
30 %if 0
31 %define         pverdot .P0
32 %define         pverdir -P0
33 %else
34 %define         pverdot %{nil}
35 %define         pverdir %{nil}
36 %endif
37 Summary:        BIND - DNS name server
38 Summary(de.UTF-8):      BIND - DNS-Namenserver
39 Summary(es.UTF-8):      BIND - Servidor de nombres DNS
40 Summary(fr.UTF-8):      BIND - serveur de noms DNS
41 Summary(pl.UTF-8):      BIND - serwer nazw DNS
42 Summary(pt_BR.UTF-8):   BIND - Servidor de nomes DNS
43 Summary(ru.UTF-8):      BIND - cервер системы доменных имен (DNS)
44 Summary(tr.UTF-8):      DNS alan adı sunucusu
45 Summary(uk.UTF-8):      BIND - cервер системи доменних імен (DNS)
46 Summary(zh_CN.UTF-8):   Internet 域名服务器
47 Name:           bind
48 Version:        %{ver}%{pverdot}
49 Release:        2
50 Epoch:          7
51 License:        MPL 2.0
52 Group:          Networking/Daemons
53 Source0:        ftp://ftp.isc.org/isc/bind9/%{ver}%{pverdir}/%{name}-%{ver}%{pverdir}.tar.xz
54 # Source0-md5:  8025b8f8463b3b9d9c902bab27f185a2
55 Source1:        named.init
56 Source2:        named.sysconfig
57 Source3:        named.logrotate
58 Source4:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
59 # Source4-md5:  35b1dfaa12615c9802126ee833e0e7f7
60 # formerly http://www.venaas.no/ldap/bind-sdb/dnszone-schema.txt (dead URL now)
61 Source5:        dnszone-schema.txt
62 # Source5-md5:  49fe799c6eca54ae227b22d57ebc1145
63 Source6:        %{name}-hip.tar.gz
64 # Source6-md5:  62a8a67f51ff8db9fe815205416a1f62
65 Source7:        https://www.internic.net/domain/named.root
66 # Source7-md5:  076cfeb40394314adf28b7be79e6ecb1
67 Source8:        %{name}-127.0.0.zone
68 Source9:        %{name}-localhost.zone
69 Source10:       %{name}-named.conf
70 Source11:       %{name}.tmpfiles
71 Source12:       named.service
72
73 Patch1:         %{name}-link.patch
74 Patch2:         %{name}-pmake.patch
75 Patch3:         %{name}-sdb-ldap.patch
76 Patch4:         %{name}-ac-libs.patch
77 Patch5:         %{name}-edns-client-subnet.patch
78 Patch6:         https://downloads.isc.org/isc/bind9/9.16.20/patches/bind-9.16.20-map-format-fix.patch
79 # Patch6-md5:   12b7b120dd7335325825ccc4ab86bc54
80 URL:            https://www.isc.org/software/bind
81 BuildRequires:  autoconf >= 2.60
82 BuildRequires:  automake
83 BuildRequires:  bison
84 %{?with_tests:BuildRequires:    cmocka-devel >= 1.0.0}
85 BuildRequires:  flex
86 %{?with_kerberos5:BuildRequires:        heimdal-devel}
87 BuildRequires:  json-c-devel >= 0.11
88 BuildRequires:  libcap-devel
89 BuildRequires:  libidn2-devel
90 # note, there is no kyua in PLD yet (work in progress)
91 %{?with_tests:%{!?with_system_tests:BuildRequires:      kyua}}
92 BuildRequires:  libtool
93 BuildRequires:  libuv-devel >= 1.37.0
94 # any version for hi2dns (if with_hip), 2.6.0 for XML stats
95 BuildRequires:  libxml2-devel >= 1:2.6.0
96 %{?with_lmdb:BuildRequires:     lmdb-devel}
97 %{?with_geoip:BuildRequires:    libmaxminddb-devel}
98 %{?with_sql:BuildRequires:      mysql-devel}
99 %{?with_ldap:BuildRequires:     openldap-devel}
100 %{?with_ssl:BuildRequires:      openssl-devel >= 1.0.0}
101 BuildRequires:  pkgconfig
102 %{?with_sql:BuildRequires:      postgresql-devel}
103 BuildRequires:  python3-devel >= 1:3.2
104 BuildRequires:  python3-ply
105 BuildRequires:  python3-sphinx_rtd_theme
106 BuildRequires:  readline-devel
107 BuildRequires:  rpm >= 4.4.9-56
108 BuildRequires:  rpmbuild(macros) >= 1.647
109 BuildRequires:  sphinx-pdg
110 %{?with_odbc:BuildRequires:     unixODBC-devel}
111 BuildRequires:  zlib-devel
112 %if %{with dnstap}
113 BuildRequires:  fstrm-devel
114 BuildRequires:  protobuf-c-devel
115 %endif
116 Requires(post,preun):   /sbin/chkconfig
117 Requires(postun):       /usr/sbin/groupdel
118 Requires(postun):       /usr/sbin/userdel
119 Requires(pre):  /bin/id
120 Requires(pre):  /usr/bin/getgid
121 Requires(pre):  /usr/sbin/groupadd
122 Requires(pre):  /usr/sbin/useradd
123 Requires(pre):  fileutils
124 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
125 # for dnssec-{checkds,coverage,keymgr}
126 Requires:       python3-isc = %{epoch}:%{version}-%{release}
127 Requires:       psmisc >= 20.1
128 Requires:       rc-scripts >= 0.2.0
129 Requires:       systemd-units >= 38
130 Requires:       uname(release) >= 2.2.18
131 Provides:       group(named)
132 Provides:       nameserver
133 Provides:       user(named)
134 Obsoletes:      caching-nameserver
135 Conflicts:      %{name}-chroot
136 Conflicts:      logrotate < 3.8.0
137 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
138
139 %define         schemadir       /usr/share/openldap/schema
140
141 %description
142 BIND (Berkeley Internet Name Domain) is an implementation of the DNS
143 (Domain Name System) protocols. BIND includes a DNS server (named),
144 which resolves host names to IP addresses, and a resolver library
145 (routines for applications to use when interfacing with DNS). A DNS
146 server allows clients to name resources or objects and share the
147 information with other network machines. The named DNS server can be
148 used on workstations as a caching name server, but is generally only
149 needed on one machine for an entire network. Note that the
150 configuration files for making BIND act as a simple caching nameserver
151 are included in the caching-nameserver package.
152
153 Install the bind package if you need a DNS server for your network. If
154 you want bind to act a caching name server, you will also need to
155 install the caching-nameserver package.
156
157 %description -l de.UTF-8
158 Enthält den Namen-Server, der zum Umwandeln von Host-Namen in
159 IP-Adressen und umgekehrt verwendet wird. Er kann auf Workstations als
160 caching Namen-Server verwendet werden, ist aber i.d.R. nur auf einem
161 Recher des Netzwerks erforderlich.
162
163 %description -l es.UTF-8
164 Incluye el servidor de nombres (DNS), que se usa para traducir nombres
165 para IP (y viceversa). Puede ser usado en estaciones de trabajo como
166 un servidor de nombres caché, pero generalmente sólo hace falta en una
167 máquina para toda la red.
168
169 %description -l fr.UTF-8
170 Contient le serveur de noms named, utilisé pour définir les
171 traductions nom d'hôte vers adresse IP (et vice versa). Il peut être
172 utilisé sur les stations de travail comme serveur de nom en cache mais
173 n'est souvent nécessaire que sur une machine pour un réseau entier.
174
175 %description -l pl.UTF-8
176 Pakiet ten zawiera demona named, który służy do zmieniania nazw
177 komputerów na numery IP i odwrotnie. Może być on używany na stacjach
178 roboczych jako bufor odwołań do serwisu nazw (caching name server),
179 ale generalnie wystarczy tylko jedna jednostka wyposażona w ten
180 program na fragment sieci.
181
182 %description -l pt_BR.UTF-8
183 Inclui o servidor de nomes (DNS), que é usado para traduzir nomes para
184 IP (e vice-versa). Pode ser usado em estações de trabalho como um
185 servidor de nomes cache, mas geralmente só é necessário em uma máquina
186 para toda a rede.
187
188 %description -l ru.UTF-8
189 BIND (Berkeley Internet Name Domain) является реализацией протоколов
190 DNS (Domain Name System). BIND включает DNS сервер (named) и
191 библиотеку "резолвера" (подпрограммы для приложений, через которые
192 происходят обращения к DNS). DNS сервер named может быть использован
193 на рабочих станциях как кеширующий сервер, но обычно запускается на
194 одной машине в локальной сети и используется остальными машинами (этим
195 достигается намного более эффективное кеширование).
196
197 Конфигурационные файлы, настраивающие BIND на работу в режиме простого
198 кеширующего сервера, включены в пакет caching-nameserver.
199
200 %description -l tr.UTF-8
201 Bu paket, makina adını IP numarasına (ya da tersi) çevirmek için
202 kullanılan alan adı sunucusunu içerir. İş istasyonlarında bir önbellek
203 isim sunucusu olarak da kullanılabilir ama genellikle bütün bir ağ
204 için sadece bir makina üzerinde kurulur.
205
206 %description -l uk.UTF-8
207 BIND (Berkeley Internet Name Domain) є реалізацією протоколів DNS
208 (Domain Name System). BIND включає DNS сервер (named) та бібліотеку
209 "резолвера" (підпрограми, що забезпечують інтерфейс до DNS). DNS
210 сервер named може бути використаний на робочих станціях як кешируючий
211 сервер, але звичайно запускається на одній машині в локальній мережі і
212 використовується іншими (цим досягається більша ефективність
213 використання кешу).
214
215 Конфігураційні файли, ща настроюють BIND на роботу в режимі простого
216 кешируючого серверу, включені в пакет caching-nameserver.
217
218 %package utils
219 Summary:        DNS utils - host, dig, dnsquery, nslookup
220 Summary(de.UTF-8):      DNS-Utils - Host, Dig, Dnsquery, Nslookup
221 Summary(es.UTF-8):      Utilitarios DNS - host, dig, dnsquery y nslookup
222 Summary(fr.UTF-8):      Utilitaires DNS - host, dig, dnsquery, nslookup
223 Summary(pl.UTF-8):      Narzędzia DNS - host, dig, dnsquery, nslookup
224 Summary(pt_BR.UTF-8):   Utilitários DNS - host, dig, dnsquery e nslookup
225 Summary(ru.UTF-8):      Утилиты для посылки запросов к серверам DNS
226 Summary(tr.UTF-8):      DNS araçları - host, dig, dnsquery, nslookup
227 Summary(uk.UTF-8):      Утиліти для надсилання запитів до серверів DNS
228 Summary(zh_CN.UTF-8):   Internet 域名服务器实用工具
229 Group:          Networking/Utilities
230 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
231 Requires:       iconv
232
233 %description utils
234 Bind-utils contains a collection of utilities for querying DNS (Domain
235 Name Service) name servers to find out information about Internet
236 hosts. These tools will provide you with the IP addresses for given
237 host names, as well as other information about registered domains and
238 network addresses.
239
240 You should install bind-utils if you need to get information from DNS
241 name servers.
242
243 %description utils -l de.UTF-8
244 Dienstprogrammsammlung zum Abfragen von Namen-Servern und Hosts. Diese
245 Tools bestimmen die IP-Adresse eines angegebenen Host-Namen und finden
246 Informationen über registrierte Domains und Netzwerk-Adressen.
247
248 %description utils -l es.UTF-8
249 Conjunto de utilitarios para consulta a servidores de nombres. Estas
250 herramientas permiten la determinación de direcciones IP para nombres
251 de máquinas informados y busca información sobre dominios registrados
252 y direcciones de red.
253
254 %description utils -l fr.UTF-8
255 Ensemble d'utilitaires pour interroger les serveurs de noms et
256 rechercher des hôtes. Ces outils vous permettent de déterminer les
257 adresses IP pour des noms d'hôtes donnés, et trouver des informations
258 sur les noms de domaine déclarés et les adresses réseau.
259
260 %description utils -l pl.UTF-8
261 Pakiet ten zawiera zbiór aplikacji umożliwiających odpytywanie
262 serwerów nazw z innych domen w celu uzyskania informacji o komputerach
263 i ich adresach IP.
264
265 %description utils -l pt_BR.UTF-8
266 Conjunto de utilitários para consulta a servidores DNS. Estas
267 ferramentas permitem a determinação de endereços IP para nomes de
268 máquinas informados e busca informações sobre domínios registrados e
269 endereços de rede. Você deveria instalar este pacote se necessitar
270 obter informações de servidores DNS.
271
272 %description utils -l ru.UTF-8
273 Набор утилит для генерации запросов к серверам имен (DNS) и поиска
274 адресов машин. Эти утилиты позволяют определить IP-адрес по известному
275 доменному имени (и наоборот) и другую информацию о зарегистрированных
276 доменах и сетевых адресах.
277
278 %description utils -l tr.UTF-8
279 Bu pakette isim sunucularını sorgulamak ve makina adreslerini çözmek
280 için kullanılan araçlar bulunmaktadır.
281
282 %description utils -l uk.UTF-8
283 Набір утиліт для генерації запитів до серверів імен (DNS) та пошуку
284 адрес машин. Ці утиліти дозволяють отримати IP-адресу за відомим
285 доменним іменем та навпаки, а також іншу інформацію про зареєстровані
286 домени та адреси.
287
288 %package libs
289 Summary:        DNS libraries
290 Summary(pl.UTF-8):      Biblioteki DNS
291 Summary(ru.UTF-8):      Библиотеки, необходимые для bind
292 Summary(uk.UTF-8):      Бібліотеки, необхідні для bind
293 Summary(zh_CN.UTF-8):   Internet 域名服务器开发库
294 Group:          Libraries
295 Requires:       json-c >= 0.11
296 Requires:       libuv >= 1.37.0
297 Requires:       libxml2 >= 1:2.6.0
298
299 %description libs
300 The bind-libs package contains all libraries required for running BIND
301 and bind utils.
302
303 %description libs -l pl.UTF-8
304 Pakiet zawiera wszystkie biblioteki potrzebne do uruchomienia binda
305 lub programów z pakietu bind-utils.
306
307 %description libs -l ru.UTF-8
308 Библиотеки, необходимые для работы bind.
309
310 %description libs -l uk.UTF-8
311 Бібліотеки, необхідні для роботи bind.
312
313 %package devel
314 Summary:        DNS development includes
315 Summary(es.UTF-8):      Archivos de inclusión y bibliotecas para desarrollo DNS
316 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek DNS
317 Summary(pt_BR.UTF-8):   Todos os arquivos de cabeçalho e bibliotecas para desenvolvimento DNS
318 Summary(ru.UTF-8):      Хедеры и библиотеки разработчика для bind
319 Summary(uk.UTF-8):      Хедери та бібліотеки програміста для bind
320 Group:          Development/Libraries
321 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
322
323 %description devel
324 The bind-devel package contains all the include files and symlinks
325 required for DNS (Domain Name Service) development for BIND.
326
327 You should install bind-devel if you want to develop bind DNS
328 applications. If you install bind-devel, you'll also need to install
329 bind-libs.
330
331 %description devel -l es.UTF-8
332 Los archivos de inclusión y bibliotecas necesarios al desarrollo DNS
333 para el bind.
334
335 %description devel -l pl.UTF-8
336 Pakiet zawiera pliki nagłówkowe. Jeżeli będziesz pisał programy pod
337 binda, lub kompilował kod źródłowy oprogramowania korzystającego z
338 tych plików nagłówkowych czy biblioteki powinieneś zainstalować ten
339 pakiet.
340
341 %description devel -l pt_BR.UTF-8
342 Todos os arquivos de cabeçalho e bibliotecas necessários para o
343 desenvolvimento com o bind.
344
345 %description devel -l ru.UTF-8
346 Все хедеры и библиотеки, необходимые для написания программ с
347 использованием BIND 9.x.x.
348
349 %description devel -l uk.UTF-8
350 Всі хедери та бібліотеки, необхідні для розробки програм з
351 використанням BIND 9.x.x.
352
353 %package static
354 Summary:        DNS static libs
355 Summary(pl.UTF-8):      Biblioteki statyczne DNS
356 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento DNS
357 Summary(ru.UTF-8):      Статические библиотеки разработчика для bind
358 Summary(uk.UTF-8):      Статичні бібліотеки програміста для bind
359 Group:          Development/Libraries
360 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
361
362 %description static
363 Static bind libraries.
364
365 %description static -l pl.UTF-8
366 Statyczne biblioteki binda.
367
368 %description static -l pt_BR.UTF-8
369 Bibliotecas estáticas para desenvolvimento DNS.
370
371 %description static -l ru.UTF-8
372 Статические библиотеки, необходимые для написания программ с
373 использованием BIND.
374
375 %description static -l uk.UTF-8
376 Статичні бібліотеки, необхідні для розробки програм з використанням
377 BIND.
378
379 %package -n openldap-schema-bind
380 Summary:        BIND schema for openldap
381 Summary(pl.UTF-8):      Schemat BIND dla openldap
382 Group:          Development/Libraries
383 Requires(post,postun):  sed >= 4.0
384 Requires:       openldap-servers
385 Requires:       sed >= 4.0
386 BuildArch:      noarch
387
388 %description -n openldap-schema-bind
389 BIND schema for openldap.
390
391 %description -n openldap-schema-bind -l pl.UTF-8
392 Schemat BIND dla openldap.
393
394 %package -n python3-isc
395 Summary:        Python 3 ISC module - functions to support BIND utilities
396 Summary(pl.UTF-8):      Moduł Pythona 3 ISC - funkcje wspomagające narzędzia BIND-a
397 Group:          Libraries/Python
398 Requires:       python3-modules
399
400 %description -n python3-isc
401 Python 3 ISC module containing functions to support BIND utilities.
402
403 %description -n python3-isc -l pl.UTF-8
404 Moduł Pythona 3 ISC, zawierający funkcje wspomagające narzędzia
405 BIND-a.
406
407 %prep
408 %setup -q %{?with_hip:-a6} -n %{name}-%{ver}%{pverdir}
409
410 %patch1 -p1
411 %patch2 -p1
412 %{?with_ldap:%patch3 -p1}
413 %patch4 -p1
414 %{?with_hip:%{__mv} bind-hip/hip_55.[ch] lib/dns/rdata/generic}
415 %{?with_edns_cli:%patch5 -p0}
416 %patch6 -p1
417
418 %build
419 %{__libtoolize}
420 %{__aclocal}
421 %{__autoconf}
422 cp -f /usr/share/automake/config.* .
423 %configure \
424         CFLAGS="-D_GNU_SOURCE=1 %{rpmcflags} %{rpmcppflags}" \
425         LDFLAGS="%{rpmldflags}" \
426         %{?with_dnstap:--enable-dnstap} \
427         %{!?with_epoll:--disable-epoll --disable-devpoll} \
428         --enable-full-report \
429         --enable-largefile \
430         %{!?with_static_libs:--disable-static} \
431         %{?with_kerberos5:--with-gssapi} \
432         --with-libidn2 \
433         --with-libtool \
434         %{?with_ssl:--with-openssl} \
435         %{?with_sql:--with-dlz-postgres} \
436         %{?with_sql:--with-dlz-mysql} \
437         --without-dlz-bdb \
438         --with-dlz-filesystem \
439         %{?with_ldap:--with-dlz-ldap} \
440         --with-dlz-odbc%{!?with_odbc:=no} \
441         --with-dlz-stub \
442         %{?with_geoip:--with-maxminddb} \
443         --with-lmdb%{!?with_lmdb:=no} \
444         --with-python=%{__python3}
445
446 %{__make}
447 %{__make} -C doc/arm html
448
449 %{?with_hip:%{__make} -C bind-hip}
450
451 %if %{with tests}
452 %if %{with system_tests}
453 %{__make} test-force
454 %else
455 sh unit/unittest.sh
456 %endif
457 %endif
458
459 %install
460 rm -rf $RPM_BUILD_ROOT
461 install -d $RPM_BUILD_ROOT{%{_includedir},%{_bindir},%{_sbindir},%{_includedir}} \
462         $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \
463         $RPM_BUILD_ROOT{%{_mandir}/man{1,3,5,8},%{_var}/{lib/named/{M,D,S,dev,etc},run/named,log}} \
464         $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}}
465
466 %{__make} install \
467         DESTDIR=$RPM_BUILD_ROOT
468
469 bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
470 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.named-non-english-man-pages
471 %{__mv} $RPM_BUILD_ROOT%{_mandir}/ja/man8/nslookup.8 $RPM_BUILD_ROOT%{_mandir}/ja/man1/nslookup.1
472 %{__sed} -i -e 's/NSLOOKUP 8/NSLOOKUP 1/' $RPM_BUILD_ROOT%{_mandir}/ja/man1/nslookup.1
473
474 cp -p bin/tests/named.conf              EXAMPLE-CONFIG-named
475 install -p %{SOURCE1}                   $RPM_BUILD_ROOT/etc/rc.d/init.d/named
476 cp -p %{SOURCE2}                        $RPM_BUILD_ROOT/etc/sysconfig/named
477 cp -p %{SOURCE3}                        $RPM_BUILD_ROOT/etc/logrotate.d/named
478 cp -p %{SOURCE7}                        $RPM_BUILD_ROOT%{_var}/lib/named/root.hint
479 cp -p %{SOURCE8}                        $RPM_BUILD_ROOT%{_var}/lib/named/M/127.0.0.zone
480 cp -p %{SOURCE9}                        $RPM_BUILD_ROOT%{_var}/lib/named/M/localhost.zone
481 cp -p %{SOURCE10}                       $RPM_BUILD_ROOT%{_var}/lib/named%{_sysconfdir}/named.conf
482 %{__mv} $RPM_BUILD_ROOT/etc/bind.keys   $RPM_BUILD_ROOT%{_var}/lib/named%{_sysconfdir}/
483
484 ln -sf --relative $RPM_BUILD_ROOT%{_var}/lib/named%{_sysconfdir}/named.conf $RPM_BUILD_ROOT/etc/named.conf
485 ln -sf --relative $RPM_BUILD_ROOT%{_var}/lib/named%{_sysconfdir}/bind.keys $RPM_BUILD_ROOT/etc/bind.keys
486 ln -sf --relative $RPM_BUILD_ROOT%{_var}/lib/named/named.log    $RPM_BUILD_ROOT%{_var}/log/named
487 ln -sf --relative $RPM_BUILD_ROOT%{_var}/lib/named/named.stats  $RPM_BUILD_ROOT%{_var}/log/named.stats
488
489 touch $RPM_BUILD_ROOT%{_var}/lib/named/named.{log,stats}
490
491 install %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/named.service
492 install %{SOURCE11} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
493
494 %if %{with ldap}
495 install -d $RPM_BUILD_ROOT%{schemadir}
496 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{schemadir}/dnszone.schema
497 %endif
498
499 %{?with_hip:install -p bind-hip/hi2dns $RPM_BUILD_ROOT%{_bindir}}
500
501 # we don't want Makefiles in documentation...
502 rm -rf _doc
503 cp -a doc _doc
504 %{__rm} _doc/misc/Makefile*
505
506 %clean
507 rm -rf $RPM_BUILD_ROOT
508
509 %pre
510 if [ -f %{_sysconfdir}/named.boot ]; then
511         cp -f %{_sysconfdir}/named.boot /etc/named.boot.2conf
512         mv -f %{_sysconfdir}/named.boot /etc/named.rpmsave
513         echo >&2 "Warning: %{_sysconfdir}/named.boot saved as /etc/named.rpmsave."
514 fi
515 %groupadd -g 58 named
516 %useradd -u 58 -g 58 -d /tmp -s /bin/false -c "BIND user" named
517
518 %post
519 /sbin/chkconfig --add named
520 %service named restart
521 %systemd_post named.service
522
523 %preun
524 if [ "$1" = "0" ]; then
525         %service named stop
526         /sbin/chkconfig --del named
527 fi
528 %systemd_preun named.service
529
530 %postun
531 if [ "$1" = "0" ]; then
532         %userremove named
533         %groupremove named
534 fi
535 %systemd_reload
536
537 %post   libs -p /sbin/ldconfig
538 %postun libs -p /sbin/ldconfig
539
540 %post -n openldap-schema-bind
541 %openldap_schema_register %{schemadir}/dnszone.schema
542 %service -q ldap restart
543
544 %postun -n openldap-schema-bind
545 if [ "$1" = "0" ]; then
546         %openldap_schema_unregister %{schemadir}/dnszone.schema
547         %service -q ldap restart
548 fi
549
550 %triggerpostun -- %{name} < 7:9.9.2.P2-2
551 %systemd_trigger named.service
552
553 %files
554 %defattr(644,root,root,755)
555 %doc README EXAMPLE-CONFIG-* %{?with_hip:bind-hip/COPYRIGHT-HIP-RR}
556 %doc _doc/misc/* _doc/arm/_build/html/*.html %{?with_ldap:_doc/*.sdb-ldap}
557
558 %{systemdunitdir}/named.service
559 %attr(754,root,root) /etc/rc.d/init.d/named
560 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/named
561 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/named
562 %{_sysconfdir}/named.conf
563 %{_sysconfdir}/bind.keys
564
565 %attr(755,root,root) %{_sbindir}/ddns-confgen
566 %attr(755,root,root) %{_sbindir}/dnssec-*
567 %attr(755,root,root) %{_sbindir}/named
568 %attr(755,root,root) %{_sbindir}/named-*
569 %attr(755,root,root) %{_sbindir}/nsec3hash
570 %attr(755,root,root) %{_sbindir}/rndc
571 %attr(755,root,root) %{_sbindir}/rndc-confgen
572 %attr(755,root,root) %{_sbindir}/tsig-keygen
573
574 %{_mandir}/man5/named.conf.5*
575 %{_mandir}/man5/rndc.conf.5*
576 %{_mandir}/man8/ddns-confgen.8*
577 %{_mandir}/man8/dnssec-*.8*
578 %{_mandir}/man8/named.8*
579 %{_mandir}/man8/named-*.8*
580 %{_mandir}/man8/nsec3hash.8*
581 %{_mandir}/man8/rndc.8*
582 %{_mandir}/man8/rndc-confgen.8*
583 %{_mandir}/man8/tsig-keygen.8*
584 %lang(ja) %{_mandir}/ja/man8/named*
585
586 %{systemdtmpfilesdir}/%{name}.conf
587
588 %attr(770,root,named) %dir %{_var}/lib/named
589 %attr(770,root,named) %dir %{_var}/lib/named/D
590 %attr(770,root,named) %dir %{_var}/lib/named/M
591 %attr(770,root,named) %dir %{_var}/lib/named/S
592 %attr(770,root,named) %dir %{_var}/lib/named/dev
593 %dev(c,1,9) %attr(644,root,root) %{_var}/lib/named/dev/urandom
594 %attr(750,root,named) %dir %{_var}/lib/named/etc
595 %attr(640,root,named) %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/named/etc/bind.keys
596 %attr(640,root,named) %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/named/etc/named.conf
597 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/named/M/*.zone
598 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/named/root.hint
599 %attr(660,named,named) %ghost %{_var}/lib/named/named.log
600 %attr(660,named,named) %ghost %{_var}/lib/named/named.stats
601
602 %config(noreplace,missingok) %{_var}/log/named
603 %config(noreplace,missingok) %{_var}/log/named.stats
604
605 %attr(770,root,named) %dir %{_var}/run/named
606
607 %dir %{_libdir}/named
608 %attr(755,root,root) %{_libdir}/named/filter-aaaa.so
609 %{_mandir}/man8/filter-aaaa.8*
610
611 %files utils
612 %defattr(644,root,root,755)
613 %attr(755,root,root) %{_bindir}/arpaname
614 %attr(755,root,root) %{_bindir}/delv
615 %attr(755,root,root) %{_bindir}/dig
616 %attr(755,root,root) %{_bindir}/host
617 %attr(755,root,root) %{_bindir}/named-rrchecker
618 %attr(755,root,root) %{_bindir}/mdig
619 %attr(755,root,root) %{_bindir}/nslookup
620 %attr(755,root,root) %{_bindir}/nsupdate
621 %{?with_hip:%attr(755,root,root) %{_bindir}/hi2dns}
622 %{_mandir}/man1/arpaname.1*
623 %{_mandir}/man1/delv.1*
624 %{_mandir}/man1/dig.1*
625 %{_mandir}/man1/host.1*
626 %{_mandir}/man1/mdig.1*
627 %{_mandir}/man1/named-rrchecker.1*
628 %{_mandir}/man1/nslookup.1*
629 %{_mandir}/man1/nsupdate.1*
630
631 %lang(fi) %{_mandir}/fi/man1/host.1*
632
633 %lang(fr) %{_mandir}/fr/man1/host.1*
634
635 %lang(hu) %{_mandir}/hu/man1/host.1*
636
637 %lang(ja) %{_mandir}/ja/man1/dig.1*
638 %lang(ja) %{_mandir}/ja/man1/host.1*
639 %lang(ja) %{_mandir}/ja/man1/nslookup.1*
640 %lang(ja) %{_mandir}/ja/man8/nsupdate.8*
641
642 %lang(pl) %{_mandir}/pl/man1/host.1*
643
644 %files libs
645 %defattr(644,root,root,755)
646 %attr(755,root,root) %{_libdir}/libbind9-%{version}.so
647 %attr(755,root,root) %{_libdir}/libdns-%{version}.so
648 %attr(755,root,root) %{_libdir}/libirs-%{version}.so
649 %attr(755,root,root) %{_libdir}/libisc-%{version}.so
650 %attr(755,root,root) %{_libdir}/libisccc-%{version}.so
651 %attr(755,root,root) %{_libdir}/libisccfg-%{version}.so
652 %attr(755,root,root) %{_libdir}/libns-%{version}.so
653
654 %files devel
655 %defattr(644,root,root,755)
656 %attr(755,root,root) %{_libdir}/libbind9.so
657 %attr(755,root,root) %{_libdir}/libdns.so
658 %attr(755,root,root) %{_libdir}/libirs.so
659 %attr(755,root,root) %{_libdir}/libisc.so
660 %attr(755,root,root) %{_libdir}/libisccc.so
661 %attr(755,root,root) %{_libdir}/libisccfg.so
662 %attr(755,root,root) %{_libdir}/libns.so
663 %{_libdir}/libbind9.la
664 %{_libdir}/libdns.la
665 %{_libdir}/libirs.la
666 %{_libdir}/libisc.la
667 %{_libdir}/libisccc.la
668 %{_libdir}/libisccfg.la
669 %{_libdir}/libns.la
670 %{_includedir}/bind9
671 %{_includedir}/dns
672 %{_includedir}/dst
673 %{_includedir}/irs
674 %{_includedir}/isc
675 %{_includedir}/isccc
676 %{_includedir}/isccfg
677 %{_includedir}/ns
678 %{_includedir}/pk11
679 %{_includedir}/pkcs11
680
681 %if %{with static_libs}
682 %files static
683 %defattr(644,root,root,755)
684 %{_libdir}/libbind9.a
685 %{_libdir}/libdns.a
686 %{_libdir}/libirs.a
687 %{_libdir}/libisc.a
688 %{_libdir}/libisccc.a
689 %{_libdir}/libisccfg.a
690 %{_libdir}/libns.a
691 %endif
692
693 %if %{with ldap}
694 %files -n openldap-schema-bind
695 %defattr(644,root,root,755)
696 %{_datadir}/openldap/schema/dnszone.schema
697 %endif
698
699 %files -n python3-isc
700 %defattr(644,root,root,755)
701 %{py3_sitedir}/isc
702 %{py3_sitedir}/isc-*-py*.egg-info
This page took 0.076379 seconds and 4 git commands to generate.