###############################################################################
name = bind
-version = 9.8.1
-release = 3
+version = 9.9.9-P6
+release = 1
groups = Networking/Tools
url = http://www.isc.org/products/BIND/
source_dl = ftp://ftp.isc.org/isc/bind/%{version}/
-sources = \
- bind-9.8.1.tar.gz \
- bind-config-8.tar.bz2
-
-# Apply patches in a special order.
-patches = \
- bind-nonexec.patch \
- bind-9.5-PIE.patch \
- bind-9.3.2-redhat_doc.patch \
- bind-96-dyndb.patch \
- bind98-rh725741.patch \
- bind-9.5-overflow.patch \
- bind-9.5-dlz-64bit.patch \
- bind-9.5-libidn.patch \
- bind-9.5-libidn2.patch \
- bind-9.5-libidn3.patch \
- bind-9.5-parallel-build.patch \
- bind95-rh461409.patch\
- bind-96-libtool2.patch \
- bind-95-rh452060.patch \
- bind97-dist-pkcs11.patch \
- bind97-rh478718.patch \
- bind97-rh570851.patch \
- bind97-exportlib.patch \
- bind97-rh645544.patch \
- bind97-rh699951.patch \
- bind97-rh693982.patch \
- bind97-rh700097.patch \
- bind97-rh714049.patch \
- bind98-dlz_buildfix.patch \
- bind98-rh735103.patch
-
build
requires
autoconf
automake
- chrpath
- db4-devel
- libtool
libcap-devel
libidn-devel
+ libtool
pkg-config
- openssl-devel
+ openssl-devel >= 1.0.1h-2
shadow-utils
end
configure_options += \
--with-libtool \
- --sysconfdir=/etc \
- --localstatedir=/var \
--enable-threads \
--enable-ipv6 \
--with-pic \
--disable-static \
--disable-openssl-version-check \
--enable-exportlib \
- --with-export-libdir=/lib/ \
- --with-export-includedir=/usr/include/ \
- --includedir=/usr/include/bind9/ \
- --with-pkcs11=/usr/lib/pkcs11/PKCS11_API.so \
- --with-gssapi=yes \
+ --with-export-libdir=%{libdir}/ \
+ --with-export-includedir=%{includedir} \
+ --includedir=%{includedir}/bind9/ \
+ --with-gssapi \
+ --enable-rrl \
--disable-isc-spnego
- prepare
- cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}.tar.gz
-
+ prepare_cmds
# Create m4 directory.
cd %{DIR_APP} && mkdir -pv m4
- # Apply all patches.
- %{MACRO_PATCHES}
-
# Branding.
sed -i -e 's/RELEASEVER=\(.*\)/RELEASEVER=\1-%{DISTRO_NAME}-%{version}-%{release}/' version
# Regenerate build environment
- libtoolize -c -f
- aclocal -I m4 --force
- autoconf -f
+ autoreconf -vfi
- # Create user and group for /run directory.
- %{create_user}
end
- install
- # Compress doc files.
- gzip -9 doc/rfc/*
+ build_cmds
+ # Build some typical system tools (dig, host, nslookup)
+ make -C bin/dig -j %{PARALLELISMFLAGS}
+
+ # Build nsupdate
+ make -C bin/nsupdate -j %{PARALLELISMFLAGS}
+ end
- # Create directory layout.
- mkdir -pv %{BUILDROOT}/usr/lib/bind
- mkdir -pv %{BUILDROOT}/var/named/{slaves,data,dynamic}
- mkdir -pv %{BUILDROOT}/usr/share/man/{man1,man5,man8}
- mkdir -pv %{BUILDROOT}/run/named
- mkdir -pv %{BUILDROOT}/var/log
+ install_cmds
+ # Install typical system tools
+ make -C bin/dig install DESTDIR=%{BUILDROOT}
- # Create named chroot environment.
- mkdir -pv %{BUILDROOT}/var/named/chroot/{dev,etc,var}
- mkdir -pv %{BUILDROOT}/var/named/chroot/var/{log,named,run/named,tmp}
- mkdir -pv %{BUILDROOT}/var/named/chroot/etc/{pki/dnssec-keys,named}
- mkdir -pv %{BUILDROOT}/var/named/chroot/usr/lib/bind
- mkdir -pv %{BUILDROOT}/var/named/chroot/dev/null
- mkdir -pv %{BUILDROOT}/var/named/chroot/dev/random
- mkdir -pv %{BUILDROOT}/var/named/chroot/dev/zero
- mkdir -pv %{BUILDROOT}/var/named/chroot/etc/localtime
+ # Install nsupdate
+ make -C bin/nsupdate install DESTDIR=%{BUILDROOT}
- touch %{BUILDROOT}/var/named/chroot/etc/named.conf
+ # Install isc/errno2result.h header
+ install -m 644 lib/isc/unix/errno2result.h %{BUILDROOT}%{includedir}/isc
- # Run make install
- make DESTDIR=%{BUILDROOT} install
+ # Install trusted root key.
+ install -m 644 %{DIR_SOURCE}/trusted-key.key %{BUILDROOT}%{sysconfdir}/trusted-key.key
- # Remove RPATH from libraries.
- chrpath --delete %{BUILDROOT}/lib*/*export*.so.*
+ # Remove development libraries and headers except *-export ones
+ rm -rvf %{BUILDROOT}%{libdir}/libbind9.so
+ rm -rvf %{BUILDROOT}%{libdir}/libdns.so
+ rm -rvf %{BUILDROOT}%{libdir}/libisccc.so
+ rm -rvf %{BUILDROOT}%{libdir}/libisccfg.so
+ rm -rvf %{BUILDROOT}%{libdir}/libisc.so
+ rm -rvf %{BUILDROOT}%{libdir}/liblwres.so
+ rm -rvf %{BUILDROOT}%{includedir}/bind9
# Remove unwanted files
- rm -rvf %{BUILDROOT}/etc/bind.keys
-
- # Create ghost config files
- touch %{BUILDROOT}/var/log/named.log
-
- # Configuration files
- tar -C %{BUILDROOT} -xaf %{DIR_DL}/bind-config-8.tar.bz2
- touch %{BUILDROOT}/etc/rndc.key
- touch %{BUILDROOT}/etc/rndc.conf
-
- mkdir %{BUILDROOT}/etc/named
- install -m 644 bind.keys %{BUILDROOT}/etc/named.iscdlv.key
- install -m 644 %{DIR_SOURCE}/trusted-key.key %{BUILDROOT}/etc/trusted-key.key
-
- # Recreate symlinks for export libraries
- rm -rf %{BUILDROOT}/lib/lib*-export.so
-
- ln -svf ../../lib/libdns-export.so.81 %{BUILDROOT}/usr/lib/libdns-export.so
- ln -svf ../../lib/libirs-export.so.80 %{BUILDROOT}/usr/lib/libirs-export.so
- ln -svf ../../lib/libisccfg-export.so.82 %{BUILDROOT}/usr/lib/libisccfg-export.so
- ln -svf ../../lib/libisc-export.so.83 %{BUILDROOT}/usr/lib/libisc-export.so
-
- # Create /run/named.
- mkdir -pv %{BUILDROOT}/run/named
- chown -Rv named.named %{BUILDROOT}/run/named/
- end
-end
+ rm -rvf %{BUILDROOT}/etc
+ rm -rvf %{BUILDROOT}/var
+
+ # Remove unneeded tools
+ rm -rvf %{BUILDROOT}%{bindir}/isc-config.sh
+ rm -rvf %{BUILDROOT}%{bindir}/bind9-config
-create_user
- getent group named >/dev/null || /usr/sbin/groupadd -r named
- getent passwd named >/dev/null || /usr/sbin/useradd -r -g named \
- -d /var/named -c "User for bind DNS server" -s /sbin/nologin named
+ # Remove manpages for the unneeded tools
+ rm -rvf %{BUILDROOT}%{mandir}/man1/isc-config.sh.1
+ rm -rvf %{BUILDROOT}%{mandir}/man1/bind9-config.1
+
+ # Remove documentation for liblwres and tools
+ rm -rvf %{BUILDROOT}%{mandir}/man3
+ end
end
packages
package %{name}
+ # The bind package is just an umbrella package for the utils
+ # and libs package.
requires
- bind-utils
- bind-chroot
- end
-
- prerequires += shadow-utils
-
- script prein
- %{create_user}
+ %{name}-libs = %{thisver}
+ %{name}-utils = %{thisver}
+ %{name}-utils-libs = %{thisver}
end
-
- # XXX Add systemd scriptlet if a service file becomes available
end
package %{name}-utils
summary = Utilities for querying bind DNS name server.
description = %{summary}
+ requires
+ %{name}-utils-libs = %{thisver}
+ end
+
files
+ /etc/trusted-key.key
/usr/bin/dig
/usr/bin/host
/usr/bin/nslookup
end
end
- package %{name}-chroot
- summary = Chroot environment for bind DNS servers.
- description = %{summary}
+ package %{name}-utils-libs
+ template LIBS
- files
- /var/named/chroot
- end
+ summary = Required libraries for the tools in the bind-utils package.
+ description = %{summary}
end
package %{name}-libs
template LIBS
+
+ files
+ %{libdir}/*export.so.*
+ end
end
package %{name}-devel
template DEVEL
end
+
+ package %{name}-debuginfo
+ template DEBUGINFO
+ end
end