]> git.pld-linux.org Git - packages/bind.git/blobdiff - bind.spec
- updated url
[packages/bind.git] / bind.spec
index a1ebc47e662ad37f111d69dd06809505f2c93edb..3325a31eecc39dff8ba03a4c67037c471dc98544 100644 (file)
--- a/bind.spec
+++ b/bind.spec
@@ -1,9 +1,16 @@
+# TODO
+# - schema regstering in openldap-schema-bind
+# - apply http://www.caraytech.com/geodns/
 #
 # Conditional build:
 %bcond_without ssl             # build without OpenSSL support
 %bcond_without ipv6            # build without IPv6 support
 %bcond_without ldap            # build without LDAP support
+%bcond_without kerberos5       # build without kerneros5 support
+%bcond_without sql             # build without SQL support
 %bcond_without static_libs     # build without static libraries
+%bcond_without tests           # perform tests
+%bcond_with    hip             # build with HIP RR support
 #
 Summary:       BIND - DNS name server
 Summary(de.UTF-8):     BIND - DNS-Namenserver
@@ -15,23 +22,30 @@ Summary(ru.UTF-8):  BIND - cервер системы доменных имен (
 Summary(tr.UTF-8):     DNS alan adı sunucusu
 Summary(uk.UTF-8):     BIND - cервер системи доменних імен (DNS)
 Summary(zh_CN.UTF-8):  Internet 域名服务器
+%define        ver     9.5.0
+%define        plevel  P2
 Name:          bind
-Version:       9.4.0
-Release:       1
-Epoch:         6
+Version:       %{ver}.%{plevel}
+Release:       3
+Epoch:         7
 License:       BSD-like
 Group:         Networking/Daemons
-Source0:       ftp://ftp.isc.org/isc/bind9/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: e85347f03f0d841b596422d5252a0869
-Source1:       %{name}-conf.tar.gz
-# Source1-md5: 8ee77729f806fcd548fe0cceb34b4a06
-Source2:       named.init
-Source3:       named.sysconfig
-Source4:       named.logrotate
-Source5:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
-# Source5-md5: 35b1dfaa12615c9802126ee833e0e7f7
-Source6:       http://www.venaas.no/ldap/bind-sdb/dnszone-schema.txt
-# Source6-md5: 49fe799c6eca54ae227b22d57ebc1145
+Source0:       ftp://ftp.isc.org/isc/bind9/%{ver}-%{plevel}/%{name}-%{ver}-%{plevel}.tar.gz
+# Source0-md5: 16c893f73a394c8cc36d7900cb9bb801
+Source1:       named.init
+Source2:       named.sysconfig
+Source3:       named.logrotate
+Source4:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
+# Source4-md5: 35b1dfaa12615c9802126ee833e0e7f7
+Source5:       http://www.venaas.no/ldap/bind-sdb/dnszone-schema.txt
+# Source5-md5: 49fe799c6eca54ae227b22d57ebc1145
+Source6:       %{name}-hip.tar.gz
+# Source6-md5: 62a8a67f51ff8db9fe815205416a1f62
+Source7:       ftp://rs.internic.net/domain/named.root
+# Source7-md5: a94e29ac677846f3d4d618c50b7d34f1
+Source8:       %{name}-127.0.0.zone
+Source9:       %{name}-localhost.zone
+Source10:      %{name}-named.conf
 Patch0:                %{name}-time.patch
 Patch1:                %{name}-autoconf.patch
 Patch2:                %{name}-includedir-libbind.patch
@@ -39,19 +53,21 @@ Patch3:             %{name}-link.patch
 Patch4:                %{name}-pmake.patch
 Patch5:                %{name}-sdb-ldap.patch
 Patch6:                %{name}-noinet6.patch
-Patch7:                %{name}-idn.patch
-URL:           http://www.isc.org/products/BIND/bind9.html
+Patch7:                %{name}-chroot-numcpus.patch
+URL:           https://www.isc.org/software/bind
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: bison
 BuildRequires: flex
 BuildRequires: idnkit-devel
+%{?with_kerberos5:BuildRequires:       krb5-devel}
+%{?with_hip:BuildRequires:     libxml2-devel}
 BuildRequires: libtool
 %{?with_ldap:BuildRequires:    openldap-devel}
 %{?with_ssl:BuildRequires:     openssl-devel >= 0.9.7d}
-BuildRequires: mysql-devel
-BuildRequires: postgresql-devel
-BuildRequires: unixODBC-devel
+%{?with_sql:BuildRequires:     mysql-devel}
+%{?with_sql:BuildRequires:     postgresql-devel}
+%{?with_sql:BuildRequires:     unixODBC-devel}
 BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
@@ -68,7 +84,6 @@ Provides:     group(named)
 Provides:      nameserver
 Provides:      user(named)
 Obsoletes:     caching-nameserver
-Obsoletes:     nameserver
 Conflicts:     %{name}-chroot
 Conflicts:     kernel < 2.2.18
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -322,7 +337,7 @@ BIND schema for openldap.
 Schemat BIND dla openldap.
 
 %prep
-%setup -q -a1
+%setup -q %{?with_hip:-a6} -n %{name}-%{ver}-%{plevel}
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -330,24 +345,31 @@ Schemat BIND dla openldap.
 %patch4 -p1
 %{?with_ldap:%patch5 -p1}
 %patch6 -p1
+%patch7 -p1
+%{?with_hip:mv bind-hip/hip_55.[ch] lib/dns/rdata/generic}
+
 
 %build
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
+cp -f /usr/share/automake/config.* .
 cd lib/bind
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
+cp -f /usr/share/automake/config.* .
 cd ../..
 %configure \
+       CFLAGS="-D_GNU_SOURCE=1" \
        --with-idn \
        --with-libtool \
        %{?with_ssl:--with-openssl=%{_prefix}} \
        %{?with_ipv6:--enable-ipv6} \
+       %{?with_kerberos5:--with-gssapi} \
        --enable-libbind \
-       --with-dlz-postgres=yes \
-       --with-dlz-mysql=yes \
+       %{?with_sql:--with-dlz-postgres=yes} \
+       %{?with_sql:--with-dlz-mysql=yes} \
        --with-dlz-bdb=no \
        --with-dlz-filesystem=yes \
        %{?with_ldap:--with-dlz-ldap=yes} \
@@ -359,6 +381,9 @@ cd ../..
        --enable-getifaddrs=glibc
 
 %{__make}
+%{?with_hip:cd bind-hip/; %{__make}}
+
+%{?with_tests:%{__make} test}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -369,33 +394,41 @@ install -d $RPM_BUILD_ROOT{%{_includedir},%{_bindir},%{_sbindir},%{_includedir}}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-rm -f doc/rfc/rfc*
-
-bzip2 -dc %{SOURCE5} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
+bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 mv $RPM_BUILD_ROOT%{_mandir}/ja/man8/nslookup.8 $RPM_BUILD_ROOT%{_mandir}/ja/man1/nslookup.1
 %{__perl} -pi -e 's/NSLOOKUP 8/NSLOOKUP 1/' $RPM_BUILD_ROOT%{_mandir}/ja/man1/nslookup.1
 
-install conf-pld/*.zone                        $RPM_BUILD_ROOT%{_var}/lib/named/M
-install conf-pld/*.hint                        $RPM_BUILD_ROOT%{_var}/lib/named
-install conf-pld/*.conf                        $RPM_BUILD_ROOT%{_var}/lib/named%{_sysconfdir}
 install bin/tests/named.conf           EXAMPLE-CONFIG-named
 install bin/tests/ndc.conf             EXAMPLE-CONFIG-ndc
-install %{SOURCE2}                     $RPM_BUILD_ROOT/etc/rc.d/init.d/named
-install %{SOURCE3}                     $RPM_BUILD_ROOT/etc/sysconfig/named
-install %{SOURCE4}                     $RPM_BUILD_ROOT/etc/logrotate.d/named
+install %{SOURCE1}                     $RPM_BUILD_ROOT/etc/rc.d/init.d/named
+install %{SOURCE2}                     $RPM_BUILD_ROOT/etc/sysconfig/named
+install %{SOURCE3}                     $RPM_BUILD_ROOT/etc/logrotate.d/named
+install %{SOURCE7}                     $RPM_BUILD_ROOT%{_var}/lib/named/root.hint
+install %{SOURCE8}                     $RPM_BUILD_ROOT%{_var}/lib/named/M/127.0.0.zone
+install %{SOURCE9}                     $RPM_BUILD_ROOT%{_var}/lib/named/M/localhost.zone
+install %{SOURCE10}                    $RPM_BUILD_ROOT%{_var}/lib/named%{_sysconfdir}/named.conf
 
 ln -sf %{_var}/lib/named%{_sysconfdir}/named.conf $RPM_BUILD_ROOT/etc/named.conf
 ln -sf %{_var}/lib/named/named.log     $RPM_BUILD_ROOT%{_var}/log/named
 ln -sf %{_var}/lib/named/named.stats   $RPM_BUILD_ROOT%{_var}/log/named.stats
 
-touch $RPM_BUILD_ROOT%{_var}/lib/named/{named.{log,stats},dev/{random,null}}
+touch $RPM_BUILD_ROOT%{_var}/lib/named/named.{log,stats}
 
 %{?with_ldap:install -d $RPM_BUILD_ROOT%{_datadir}/openldap/schema}
-%{?with_ldap:install %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/openldap/schema/dnszone.schema}
+%{?with_ldap:install %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/openldap/schema/dnszone.schema}
+%{?with_hip:install bind-hip/hi2dns $RPM_BUILD_ROOT%{_bindir}}
+
+rm -f $RPM_BUILD_ROOT%{_mandir}/man8/named-compilezone.8
+echo ".so man8/named-checkzone.8" > $RPM_BUILD_ROOT%{_mandir}/man8/named-compilezone.8
+
+# let rpm generate deps (workaround -m644 used for libs installation)
+chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*.*
 
 # we don't want Makefiles in documentation...
-# FIXME: breaks re-entrant install
-rm -f doc/misc/Makefile*
+rm -rf _doc
+cp -a doc _doc
+rm -f _doc/rfc/rfc*
+rm -f _doc/misc/Makefile*
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -410,20 +443,6 @@ fi
 %useradd -u 58 -g 58 -d /tmp -s /bin/false -c "BIND user" named
 
 %post
-if [ "$1" = 1 ]; then
-       mknod -m 660 %{_var}/lib/named/dev/null c 1 3 2>/dev/null
-       chown root:named %{_var}/lib/named/dev/null 2>/dev/null
-       mknod -m 640 %{_var}/lib/named/dev/null c 1 8 2>/dev/null
-       chown root:named %{_var}/lib/named/dev/random 2>/dev/null
-       if [ ! -c %{_var}/lib/named/dev/null ] || [ ! -c %{_var}/lib/named/dev/random ]; then
-%banner -e %{name}-devs <<-EOF
-Device nodes were not created!!!
-
-Please read PLD Linux Vserver FAQ if you're installing %{name} inside
-vserver: <http://www.pld-linux.org/Vserver>.
-EOF
-       fi #'
-fi
 /sbin/chkconfig --add named
 %service named restart
 
@@ -442,9 +461,17 @@ fi
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
+%triggerpostun -- %{name} < 7:9.4.2-2
+/sbin/chkconfig named reset
+#triggerpostun -- %{name} < 6:9.4.1
+sed -i -e 's#^\([ \t]*category[ \t]\+cname[ \t]\+.*\)$#// \1#g' /var/lib/named/etc/named.conf
+sed -i -e 's#^\([ \t]*category[ \t]\+response-checks[ \t]\+.*\)$#// \1#g' /var/lib/named/etc/named.conf
+sed -i -e 's#^\([ \t]*category[ \t]\+load[ \t]\+.*\)$#// \1#g' /var/lib/named/etc/named.conf
+
 %files
 %defattr(644,root,root,755)
-%doc README EXAMPLE-CONFIG-* FAQ doc/misc/* doc/arm/*.html doc/rfc/index %{?with_ldap:doc/*.sdb-ldap}
+%doc README EXAMPLE-CONFIG-* FAQ %{?with_hip:bind-hip/COPYRIGHT-HIP-RR}
+%doc _doc/misc/* _doc/arm/*.html _doc/rfc/index %{?with_ldap:_doc/*.sdb-ldap}
 
 %attr(754,root,root) /etc/rc.d/init.d/named
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/named
@@ -474,17 +501,13 @@ fi
 %attr(660,named,named) %ghost  %{_var}/lib/named/named.log
 %attr(660,named,named) %ghost  %{_var}/lib/named/named.stats
 
-# devices for chrooted bind
-%attr(750,root,named) %dir %{_var}/lib/named/dev
-%ghost %attr(660,root,named) %{_var}/lib/named/dev/null
-%ghost %attr(640,root,named) %{_var}/lib/named/dev/random
-
 %files utils
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/dig
 %attr(755,root,root) %{_bindir}/host
 %attr(755,root,root) %{_bindir}/nslookup
 %attr(755,root,root) %{_bindir}/nsupdate
+%{?with_hip:%attr(755,root,root) %{_bindir}/hi2dns}
 %{_mandir}/man1/dig.1*
 %{_mandir}/man1/host.1*
 %{_mandir}/man1/nslookup.1*
@@ -505,24 +528,62 @@ fi
 
 %files libs
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/*.so.*.*
+%attr(755,root,root) %{_libdir}/libbind.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libbind.so.[0-9]
+%attr(755,root,root) %{_libdir}/libbind9.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libbind9.so.[0-9][0-9]
+%attr(755,root,root) %{_libdir}/libdns.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libdns.so.[0-9][0-9]
+%attr(755,root,root) %{_libdir}/libisc.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libisc.so.[0-9][0-9]
+%attr(755,root,root) %{_libdir}/libisccc.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libisccc.so.[0-9][0-9]
+%attr(755,root,root) %{_libdir}/libisccfg.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libisccfg.so.[0-9][0-9]
+%attr(755,root,root) %{_libdir}/liblwres.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblwres.so.[0-9][0-9]
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/*.sh
-%attr(755,root,root) %{_libdir}/*.so
-%{_libdir}/*.la
-%{_includedir}/*
-%{_mandir}/man3/*
+%attr(755,root,root) %{_bindir}/isc-config.sh
+%attr(755,root,root) %{_libdir}/libbind.so
+%attr(755,root,root) %{_libdir}/libbind9.so
+%attr(755,root,root) %{_libdir}/libdns.so
+%attr(755,root,root) %{_libdir}/libisc.so
+%attr(755,root,root) %{_libdir}/libisccc.so
+%attr(755,root,root) %{_libdir}/libisccfg.so
+%attr(755,root,root) %{_libdir}/liblwres.so
+%{_libdir}/libbind.la
+%{_libdir}/libbind9.la
+%{_libdir}/libdns.la
+%{_libdir}/libisc.la
+%{_libdir}/libisccc.la
+%{_libdir}/libisccfg.la
+%{_libdir}/liblwres.la
+%{_includedir}/bind
+%{_includedir}/bind9
+%{_includedir}/dns
+%{_includedir}/dst
+%{_includedir}/isc
+%{_includedir}/isccc
+%{_includedir}/isccfg
+%{_includedir}/lwres
+%{_mandir}/man3/lwres*.3*
 
 %if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/*.a
+%{_libdir}/libbind.a
+%{_libdir}/libbind9.a
+%{_libdir}/libdns.a
+%{_libdir}/libisc.a
+%{_libdir}/libisccc.a
+%{_libdir}/libisccfg.a
+%{_libdir}/liblwres.a
 %endif
 
 %if %{with ldap}
 %files -n openldap-schema-bind
 %defattr(644,root,root,755)
-%{_datadir}/openldap/schema/*.schema
+%{_datadir}/openldap/schema/dnszone.schema
 %endif
This page took 0.039895 seconds and 4 git commands to generate.