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