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