mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-28 17:46:40 -04:00
The rewrite of BIND 9 build system is a large work and cannot be reasonable split into separate merge requests. Addition of the automake has a positive effect on the readability and maintainability of the build system as it is more declarative, it allows conditional and we are able to drop all of the custom make code that BIND 9 developed over the years to overcome the deficiencies of autoconf + custom Makefile.in files. This squashed commit contains following changes: - conversion (or rather fresh rewrite) of all Makefile.in files to Makefile.am by using automake - the libtool is now properly integrated with automake (the way we used it was rather hackish as the only official way how to use libtool is via automake - the dynamic module loading was rewritten from a custom patchwork to libtool's libltdl (which includes the patchwork to support module loading on different systems internally) - conversion of the unit test executor from kyua to automake parallel driver - conversion of the system test executor from custom make/shell to automake parallel driver - The GSSAPI has been refactored, the custom SPNEGO on the basis that all major KRB5/GSSAPI (mit-krb5, heimdal and Windows) implementations support SPNEGO mechanism. - The various defunct tests from bin/tests have been removed: bin/tests/optional and bin/tests/pkcs11 - The text files generated from the MD files have been removed, the MarkDown has been designed to be readable by both humans and computers - The xsl header is now generated by a simple sed command instead of perl helper - The <irs/platform.h> header has been removed - cleanups of configure.ac script to make it more simpler, addition of multiple macros (there's still work to be done though) - the tarball can now be prepared with `make dist` - the system tests are partially able to run in oot build Here's a list of unfinished work that needs to be completed in subsequent merge requests: - `make distcheck` doesn't yet work (because of system tests oot run is not yet finished) - documentation is not yet built, there's a different merge request with docbook to sphinx-build rst conversion that needs to be rebased and adapted on top of the automake - msvc build is non functional yet and we need to decide whether we will just cross-compile bind9 using mingw-w64 or fix the msvc build - contributed dlz modules are not included neither in the autoconf nor automake
140 lines
5.4 KiB
Bash
140 lines
5.4 KiB
Bash
#!/bin/sh
|
|
#
|
|
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
# See the COPYRIGHT file distributed with this work for additional
|
|
# information regarding copyright ownership.
|
|
|
|
. $SYSTEMTESTTOP/conf.sh
|
|
|
|
DIGOPTS="+tcp -p ${PORT}"
|
|
|
|
status=0
|
|
n=0
|
|
|
|
n=`expr $n + 1`
|
|
echo_i "wait for zones to finish transferring to ns2 ($n)"
|
|
for i in 1 2 3 4 5 6 7 8 9 10
|
|
do
|
|
ret=0
|
|
for zone in example.com example.net
|
|
do
|
|
$DIG $DIGOPTS @10.53.0.2 soa $zone > dig.out.test$n || ret=1
|
|
grep "ANSWER: 1," dig.out.test$n > /dev/null || ret=1
|
|
done
|
|
[ $ret -eq 0 ] && break
|
|
sleep 1
|
|
done
|
|
[ $ret -eq 0 ] || echo_i "failed"
|
|
status=`expr $status + $ret`
|
|
|
|
#
|
|
# If recursion is unrequested or unavailable, then cross-zone CNAME records
|
|
# should not be followed. If both requested and available, they should be.
|
|
#
|
|
n=`expr $n + 1`
|
|
echo_i "check that cross-zone CNAME record does not return target data (rd=0/ra=0) ($n)"
|
|
ret=0
|
|
$DIG $DIGOPTS +norec @10.53.0.1 www.example.com > dig.out.test$n || ret=1
|
|
grep "ANSWER: 1," dig.out.test$n > /dev/null || ret=1
|
|
grep "flags: qr aa;" dig.out.test$n > /dev/null || ret=1
|
|
grep "www.example.com.*CNAME.*server.example.net" dig.out.test$n > /dev/null || ret=1
|
|
grep "server.example.net.*A.*10.53.0.100" dig.out.test$n > /dev/null && ret=1
|
|
[ $ret -eq 0 ] || echo_i "failed"
|
|
status=`expr $status + $ret`
|
|
|
|
n=`expr $n + 1`
|
|
echo_i "check that cross-zone CNAME record does not return target data (rd=1/ra=0) ($n)"
|
|
ret=0
|
|
$DIG $DIGOPTS +rec @10.53.0.1 www.example.com > dig.out.test$n || ret=1
|
|
grep "ANSWER: 1," dig.out.test$n > /dev/null || ret=1
|
|
grep "flags: qr aa rd;" dig.out.test$n > /dev/null || ret=1
|
|
grep "www.example.com.*CNAME.*server.example.net" dig.out.test$n > /dev/null || ret=1
|
|
grep "server.example.net.*A.*10.53.0.100" dig.out.test$n > /dev/null && ret=1
|
|
[ $ret -eq 0 ] || echo_i "failed"
|
|
status=`expr $status + $ret`
|
|
|
|
n=`expr $n + 1`
|
|
echo_i "check that cross-zone CNAME record does not return target data (rd=0/ra=1) ($n)"
|
|
ret=0
|
|
$DIG $DIGOPTS +norec @10.53.0.2 www.example.com > dig.out.test$n || ret=1
|
|
grep "ANSWER: 1," dig.out.test$n > /dev/null || ret=1
|
|
grep "flags: qr aa ra;" dig.out.test$n > /dev/null || ret=1
|
|
grep "www.example.com.*CNAME.*server.example.net" dig.out.test$n > /dev/null || ret=1
|
|
grep "server.example.net.*A.*10.53.0.100" dig.out.test$n > /dev/null && ret=1
|
|
[ $ret -eq 0 ] || echo_i "failed"
|
|
status=`expr $status + $ret`
|
|
|
|
n=`expr $n + 1`
|
|
echo_i "check that cross-zone CNAME records returns target data (rd=1/ra=1) ($n)"
|
|
ret=0
|
|
$DIG $DIGOPTS @10.53.0.2 www.example.com > dig.out.test$n || ret=1
|
|
grep "ANSWER: 2," dig.out.test$n > /dev/null || ret=1
|
|
grep "flags: qr aa rd ra;" dig.out.test$n > /dev/null || ret=1
|
|
grep "www.example.com.*CNAME.*server.example.net" dig.out.test$n > /dev/null || ret=1
|
|
grep "server.example.net.*A.*10.53.0.100" dig.out.test$n > /dev/null || ret=1
|
|
[ $ret -eq 0 ] || echo_i "failed"
|
|
status=`expr $status + $ret`
|
|
|
|
#
|
|
# In-zone CNAME records should always be followed regardless of RD and RA.
|
|
#
|
|
n=`expr $n + 1`
|
|
echo_i "check that in-zone CNAME records returns target data (rd=0/ra=0) ($n)"
|
|
ret=0
|
|
$DIG $DIGOPTS +norec @10.53.0.1 inzone.example.com > dig.out.test$n || ret=1
|
|
grep "ANSWER: 2," dig.out.test$n > /dev/null || ret=1
|
|
grep "flags: qr aa;" dig.out.test$n > /dev/null || ret=1
|
|
grep "inzone.example.com.*CNAME.*a.example.com" dig.out.test$n > /dev/null || ret=1
|
|
grep "a.example.com.*A.*10.53.0.1" dig.out.test$n > /dev/null || ret=1
|
|
[ $ret -eq 0 ] || echo_i "failed"
|
|
status=`expr $status + $ret`
|
|
|
|
n=`expr $n + 1`
|
|
echo_i "check that in-zone CNAME records returns target data (rd=1/ra=0) ($n)"
|
|
ret=0
|
|
$DIG $DIGOPTS +rec @10.53.0.1 inzone.example.com > dig.out.test$n || ret=1
|
|
grep "ANSWER: 2," dig.out.test$n > /dev/null || ret=1
|
|
grep "flags: qr aa rd;" dig.out.test$n > /dev/null || ret=1
|
|
grep "inzone.example.com.*CNAME.*a.example.com" dig.out.test$n > /dev/null || ret=1
|
|
grep "a.example.com.*A.*10.53.0.1" dig.out.test$n > /dev/null || ret=1
|
|
[ $ret -eq 0 ] || echo_i "failed"
|
|
status=`expr $status + $ret`
|
|
|
|
n=`expr $n + 1`
|
|
echo_i "check that in-zone CNAME records returns target data (rd=0/ra=1) ($n)"
|
|
ret=0
|
|
$DIG $DIGOPTS +norec @10.53.0.2 inzone.example.com > dig.out.test$n || ret=1
|
|
grep "ANSWER: 2," dig.out.test$n > /dev/null || ret=1
|
|
grep "flags: qr aa ra;" dig.out.test$n > /dev/null || ret=1
|
|
grep "inzone.example.com.*CNAME.*a.example.com" dig.out.test$n > /dev/null || ret=1
|
|
grep "a.example.com.*A.*10.53.0.1" dig.out.test$n > /dev/null || ret=1
|
|
[ $ret -eq 0 ] || echo_i "failed"
|
|
status=`expr $status + $ret`
|
|
|
|
n=`expr $n + 1`
|
|
echo_i "check that in-zone CNAME records returns target data (rd=1/ra=1) ($n)"
|
|
ret=0
|
|
$DIG $DIGOPTS @10.53.0.2 inzone.example.com > dig.out.test$n || ret=1
|
|
grep "ANSWER: 2," dig.out.test$n > /dev/null || ret=1
|
|
grep "flags: qr aa rd ra;" dig.out.test$n > /dev/null || ret=1
|
|
grep "inzone.example.com.*CNAME.*a.example.com" dig.out.test$n > /dev/null || ret=1
|
|
grep "a.example.com.*A.*10.53.0.1" dig.out.test$n > /dev/null || ret=1
|
|
[ $ret -eq 0 ] || echo_i "failed"
|
|
status=`expr $status + $ret`
|
|
|
|
n=`expr $n + 1`
|
|
echo_i "check that CHAOS addresses are compared correctly ($n)"
|
|
ret=0
|
|
$DIG $DIGOPTS @10.53.0.1 +noall +answer ch test.example.chaos > dig.out.test$n
|
|
lines=`wc -l < dig.out.test$n`
|
|
[ ${lines:-0} -eq 2 ] || ret=1
|
|
[ $ret -eq 0 ] || echo_i "failed"
|
|
status=`expr $status + $ret`
|
|
|
|
echo_i "exit status: $status"
|
|
[ $status -eq 0 ] || exit 1
|