]> git.pld-linux.org Git - packages/bind.git/blobdiff - bind.spec
- root.zone update
[packages/bind.git] / bind.spec
index cf6d7b5a89d03ede1516ae8fc839c68b57d073cc..ae2878780f4eb792b373239811b5ce7ff10b233d 100644 (file)
--- a/bind.spec
+++ b/bind.spec
@@ -9,9 +9,12 @@
 %bcond_without sql             # build without SQL support
 %bcond_without static_libs     # build without static libraries
 %bcond_without tests           # perform tests
+%bcond_with    edns_cli        # build with the ability to use edns-client-subnet in dig
 %bcond_with    hip             # build with HIP RR support
+%bcond_without geoip           # build with GeoIP patch, https://code.google.com/p/bind-geoip/
+
 %if "%{pld_release}" == "ac"
-%bcond_with            epoll           # enable epoll support
+%bcond_with    epoll           # enable epoll support
 # there didn't exist x86_64 2.4 kernel in PLD, so can safely enable epoll
 %ifarch %{x8664}
 %define                with_epoll      1
 %bcond_without epoll           # disable epoll support
 %endif
 
-%define                ver     9.8.0
+%define                ver     9.9.4
 %if 1
-%define                pverdot .P4
-%define                pverdir -P4
+%define                pverdot .P1
+%define                pverdir -P1
 %else
 %define                pverdot %{nil}
 %define                pverdir %{nil}
@@ -40,12 +43,12 @@ Summary(uk.UTF-8):  BIND - cервер системи доменних імен (
 Summary(zh_CN.UTF-8):  Internet 域名服务器
 Name:          bind
 Version:       %{ver}%{pverdot}
-Release:       3.1
+Release:       3
 Epoch:         7
 License:       BSD-like
 Group:         Networking/Daemons
 Source0:       ftp://ftp.isc.org/isc/bind9/%{ver}%{pverdir}/%{name}-%{ver}%{pverdir}.tar.gz
-# Source0-md5: 13e36e3f28dc1ce7675b45a4192e8389
+# Source0-md5: c1b4fb31c7f8390237b3f46965a49fbd
 Source1:       named.init
 Source2:       named.sysconfig
 Source3:       named.logrotate
@@ -55,18 +58,24 @@ 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: 013336e29e65923682f7bce094bb3e5c
+Source7:       ftp://rs.internic.net/domain/root.zone
+# Source7-md5: 96020deee4f5d2df39599331669d1b30
 Source8:       %{name}-127.0.0.zone
 Source9:       %{name}-localhost.zone
 Source10:      %{name}-named.conf
+Source11:      %{name}.tmpfiles
+Source12:      named.service
 Patch0:                %{name}-time.patch
 Patch1:                %{name}-link.patch
 Patch2:                %{name}-pmake.patch
 Patch3:                %{name}-sdb-ldap.patch
 Patch4:                %{name}-ac-libs.patch
+Patch5:                %{name}-edns-client-subnet.patch
+Patch6:                nsupdate_segfault.patch
+# https://code.google.com/p/bind-geoip/
+Patch7:                %{name}-geoip.patch
 URL:           https://www.isc.org/software/bind
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.59
 BuildRequires: automake
 BuildRequires: bison
 BuildRequires: flex
@@ -76,10 +85,11 @@ BuildRequires:      libtool
 %{?with_hip:BuildRequires:     libxml2-devel}
 %{?with_sql:BuildRequires:     mysql-devel}
 %{?with_ldap:BuildRequires:    openldap-devel}
-%{?with_ssl:BuildRequires:     openssl-devel >= 0.9.7d}
+%{?with_ssl:BuildRequires:     openssl-devel >= 0.9.8d}
 %{?with_sql:BuildRequires:     postgresql-devel}
+BuildRequires: readline-devel
 BuildRequires: rpm >= 4.4.9-56
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.647
 %{?with_sql:BuildRequires:     unixODBC-devel}
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
@@ -92,12 +102,14 @@ Requires(pre):     fileutils
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
 Requires:      psmisc >= 20.1
 Requires:      rc-scripts >= 0.2.0
+Requires:      systemd-units >= 38
+Requires:      uname(release) >= 2.2.18
 Provides:      group(named)
 Provides:      nameserver
 Provides:      user(named)
 Obsoletes:     caching-nameserver
 Conflicts:     %{name}-chroot
-Conflicts:     kernel < 2.2.18
+Conflicts:     logrotate < 3.8.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                schemadir       /usr/share/openldap/schema
@@ -344,6 +356,9 @@ Group:              Development/Libraries
 Requires(post,postun): sed >= 4.0
 Requires:      openldap-servers
 Requires:      sed >= 4.0
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description -n openldap-schema-bind
 BIND schema for openldap.
@@ -359,7 +374,9 @@ Schemat BIND dla openldap.
 %{?with_ldap:%patch3 -p1}
 %patch4 -p1
 %{?with_hip:mv bind-hip/hip_55.[ch] lib/dns/rdata/generic}
-
+%{?with_edns_cli:%patch5 -p0}
+%patch6 -p0
+%{?with_geoip:%patch7 -p0}
 
 %build
 %{__libtoolize}
@@ -378,31 +395,36 @@ cp -f /usr/share/automake/config.* .
        --with-dlz-bdb=no \
        --with-dlz-filesystem=yes \
        %{?with_ldap:--with-dlz-ldap=yes} \
+       %{?with_geoip:--with-geoip=yes} \
        --with-dlz-odbc=no \
        --with-dlz-stub=yes \
        --enable-largefile \
        %{!?with_epoll:--disable-epoll --disable-devpoll} \
        %{!?with_static_libs:--enable-static=no} \
        --enable-threads \
-       --enable-getifaddrs
+       --enable-getifaddrs \
+       --enable-newstats \
+       --enable-full-report
 
 %{__make}
 %{?with_hip:cd bind-hip/; %{__make}}
 
-%{?with_tests:%{__make} test}
+%{?with_tests:%{__make} test-force}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_includedir},%{_bindir},%{_sbindir},%{_includedir}} \
        $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \
-       $RPM_BUILD_ROOT{%{_mandir}/man{1,3,5,8},%{_var}/{lib/named/{M,D,S,dev,etc},run/{named,lwresd},log}}
+       $RPM_BUILD_ROOT{%{_mandir}/man{1,3,5,8},%{_var}/{lib/named/{M,D,S,dev,etc},run/{named,lwresd},log}} \
+       $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
 bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
+rm $RPM_BUILD_ROOT%{_mandir}/README.named-non-english-man-pages
 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
+%{__sed} -i -e 's/NSLOOKUP 8/NSLOOKUP 1/' $RPM_BUILD_ROOT%{_mandir}/ja/man1/nslookup.1
 
 cp -p bin/tests/named.conf             EXAMPLE-CONFIG-named
 cp -p bin/tests/ndc.conf               EXAMPLE-CONFIG-ndc
@@ -422,6 +444,9 @@ ln -sf %{_var}/lib/named/named.stats        $RPM_BUILD_ROOT%{_var}/log/named.stats
 
 touch $RPM_BUILD_ROOT%{_var}/lib/named/named.{log,stats}
 
+install %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/named.service
+install %{SOURCE11} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
+
 %if %{with ldap}
 install -d $RPM_BUILD_ROOT%{schemadir}
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{schemadir}/dnszone.schema
@@ -438,7 +463,6 @@ chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*.*
 # we don't want Makefiles in documentation...
 rm -rf _doc
 cp -a doc _doc
-rm -f _doc/rfc/rfc*
 rm -f _doc/misc/Makefile*
 
 %clean
@@ -456,18 +480,21 @@ fi
 %post
 /sbin/chkconfig --add named
 %service named restart
+%systemd_post named.service
 
 %preun
 if [ "$1" = "0" ]; then
        %service named stop
        /sbin/chkconfig --del named
 fi
+%systemd_preun named.service
 
 %postun
 if [ "$1" = "0" ]; then
        %userremove named
        %groupremove named
 fi
+%systemd_reload
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
@@ -488,11 +515,15 @@ fi
 %{__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
 
+%triggerpostun -- %{name} < 7:9.9.2.P2-2
+%systemd_trigger named.service
+
 %files
 %defattr(644,root,root,755)
 %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}
+%doc _doc/misc/* _doc/arm/*.html %{?with_ldap:_doc/*.sdb-ldap}
 
+%{systemdunitdir}/named.service
 %attr(754,root,root) /etc/rc.d/init.d/named
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/named
 %attr(640,root,named) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/named.conf
@@ -526,6 +557,8 @@ fi
 %{_mandir}/man8/rndc-confgen.8*
 %lang(ja) %{_mandir}/ja/man8/named*
 
+%{systemdtmpfilesdir}/%{name}.conf
+
 %attr(770,root,named) %dir %{_var}/lib/named
 %attr(770,root,named) %dir %{_var}/lib/named/D
 %attr(750,root,named) %dir %{_var}/lib/named/M
@@ -574,7 +607,7 @@ fi
 %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) %ghost %{_libdir}/libdns.so.[0-9][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.*.*.*
This page took 0.75835 seconds and 4 git commands to generate.