diff --git a/bind.spec b/bind.spec index d261de7..4c57887 100644 --- a/bind.spec +++ b/bind.spec @@ -20,7 +20,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv Name: bind License: ISC Version: 9.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 32 Url: http://www.isc.org/products/BIND/ Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -52,6 +52,7 @@ Patch99: bind-96-libtool2.patch Patch101:bind-96-old-api.patch Patch102:bind-95-rh452060.patch Patch106:bind93-rh490837.patch +Patch107:bind96-rh507469.patch # SDB patches Patch11: bind-9.3.2b2-sdbsrc.patch @@ -217,6 +218,7 @@ mkdir m4 %patch102 -p1 -b .rh452060 %patch106 -p0 -b .rh490837 +%patch107 -p1 -b .rh507469 # Sparc and s390 arches need to use -fPIE %ifarch sparcv9 sparc64 s390 s390x @@ -304,7 +306,7 @@ mkdir -p ${RPM_BUILD_ROOT}/var/log mkdir -p ${RPM_BUILD_ROOT}/%{chroot_prefix}/{dev,etc,var} mkdir -p ${RPM_BUILD_ROOT}/%{chroot_prefix}/var/{log,named,run/named,tmp} mkdir -p ${RPM_BUILD_ROOT}/%{chroot_prefix}/etc/{pki/dnssec-keys,named} -mkdir -p ${RPM_BUILD_ROOT}/%{chroot_prefix}/var/named/{data,slaves,dynamic} +mkdir -p ${RPM_BUILD_ROOT}/%{chroot_prefix}/%{_libdir}/bind # these are required to prevent them being erased during upgrade of previous # versions that included them (bug #130121): touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/dev/null @@ -553,7 +555,6 @@ rm -rf ${RPM_BUILD_ROOT} %{_bindir}/isc-config.sh %files chroot - %defattr(0640,root,named,0750) %dir %{chroot_prefix} %dir %{chroot_prefix}/dev @@ -563,11 +564,9 @@ rm -rf ${RPM_BUILD_ROOT} %dir %{chroot_prefix}/var %dir %{chroot_prefix}/var/run %dir %{chroot_prefix}/var/named +%dir %{chroot_prefix}/%{_libdir}/bind %ghost %config(noreplace) %{chroot_prefix}/etc/named.conf %defattr(0660,named,named,0770) -%ghost %dir %{chroot_prefix}/var/named/slaves -%ghost %dir %{chroot_prefix}/var/named/data -%ghost %dir %{chroot_prefix}/var/named/dynamic %dir %{chroot_prefix}/var/run/named %dir %{chroot_prefix}/var/tmp %dir %{chroot_prefix}/var/log @@ -578,6 +577,10 @@ rm -rf ${RPM_BUILD_ROOT} %ghost %{chroot_prefix}/etc/localtime %changelog +* Wed Jun 24 2009 Adam Tkac 32:9.6.1-2 +- improved "chroot automount" patches (#504596) +- host should fail if specified server doesn't respond (#507469) + * Thu Jun 18 2009 Adam Tkac 32:9.6.1-1 - 9.6.1 release - simplify chroot maintenance. Important files and directories are mounted into diff --git a/bind96-rh507469.patch b/bind96-rh507469.patch new file mode 100644 index 0000000..84719fa --- /dev/null +++ b/bind96-rh507469.patch @@ -0,0 +1,14 @@ +diff -up bind-9.6.1/bin/dig/dighost.c.rh507469 bind-9.6.1/bin/dig/dighost.c +--- bind-9.6.1/bin/dig/dighost.c.rh507469 2009-06-23 15:52:08.974779538 +0200 ++++ bind-9.6.1/bin/dig/dighost.c 2009-06-23 15:54:19.934977907 +0200 +@@ -1064,7 +1064,9 @@ setup_system(void) { + debug("ndots is %d.", ndots); + } + +- copy_server_list(lwconf, &server_list); ++ /* If user doesn't specify server use nameservers from resolv.conf */ ++ if (ISC_LIST_EMPTY(server_list)) ++ copy_server_list(lwconf, &server_list); + + /* If we don't find a nameserver fall back to localhost */ + if (ISC_LIST_EMPTY(server_list)) { diff --git a/named.init b/named.init index 517e292..af4f9f1 100755 --- a/named.init +++ b/named.init @@ -48,7 +48,8 @@ fi /usr/sbin/dnssec-configure -b --norestart --dnssec="$DNSSEC" --dlv="$DLV" ROOTDIR_MOUNT='/etc/named /etc/pki/dnssec-keys /var/named /etc/named.conf -/etc/named.dnssec.keys /etc/named.rfc1912.zones /etc/rndc.conf /etc/rndc.key' +/etc/named.dnssec.keys /etc/named.rfc1912.zones /etc/rndc.conf /etc/rndc.key +/usr/lib64/bind /usr/lib/bind' mount_chroot_conf() { @@ -68,8 +69,9 @@ mount_chroot_conf() else # Mount source is a directory. Mount it only if directory in chroot is # empty. - [ `ls -1A $ROOTDIR$all | wc -l` -eq 0 ] && \ + if [ -e "$all" ] && [ `ls -1A $ROOTDIR$all | wc -l` -eq 0 ]; then mount --bind "$all" "$ROOTDIR$all" + fi fi done fi diff --git a/named.sysconfig b/named.sysconfig index 6ae9539..0bf0462 100644 --- a/named.sysconfig +++ b/named.sysconfig @@ -2,7 +2,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Currently, you can use the following options: # -# ROOTDIR="/some/where" -- will run named in a chroot environment. +# ROOTDIR="/var/named/chroot" -- will run named in a chroot environment. # you must set up the chroot environment # (install the bind-chroot package) before # doing this. @@ -13,6 +13,7 @@ # - /var/named # - /etc/pki/dnssec-keys # - /etc/named +# - /usr/lib64/bind of /usr/lib/bind (architecture dependant) # # Those files are mounted as well if target file doesn't exist in # chroot.