doc/devel/arch.dox doc/devel/atf.dox doc/devel/contrib.dox \
doc/devel/debug.dox doc/devel/isc-logo.jpg doc/devel/mainpage.dox \
doc/devel/omapi.dox doc/devel/qa.dox util/bindvar.sh \
- bind/Makefile bind/bind.tar.gz bind/version.tmp \
+ bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
common/tests/Atffile server/tests/Atffile
SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
+ $(top_srcdir)/bind/Makefile.in \
$(top_srcdir)/doc/devel/doxyfile.in $(nobase_include_HEADERS) \
README compile config.guess config.sub depcomp install-sh \
missing
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/includes/config.h
-CONFIG_CLEAN_FILES = doc/devel/doxyfile
+CONFIG_CLEAN_FILES = bind/Makefile doc/devel/doxyfile
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
doc/devel/arch.dox doc/devel/atf.dox doc/devel/contrib.dox \
doc/devel/debug.dox doc/devel/isc-logo.jpg doc/devel/mainpage.dox \
doc/devel/omapi.dox doc/devel/qa.dox util/bindvar.sh \
- bind/Makefile bind/bind.tar.gz bind/version.tmp \
+ bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
common/tests/Atffile server/tests/Atffile
SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
+bind/Makefile: $(top_builddir)/config.status $(top_srcdir)/bind/Makefile.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
doc/devel/doxyfile: $(top_builddir)/config.status $(top_srcdir)/doc/devel/doxyfile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-nobase_includeHEADERS: $(nobase_include_HEADERS)
5.8.3 Other Solaris Items
5.9 AIX
5.10 MacOS X
+ 5.11 ATF
6 SUPPORT
6.1 HOW TO REPORT BUGS
7 HISTORY
Running the dhclient-script reinstalls the resolv.conf.dhclient6
configuration.
+
+ ATF
+
+Please see the file DHCP/doc/devel/atf.dox for a description of building
+and using these tools.
+
+The optional unit tests use ATF (Automated Testing Framework) including
+the atf-run and atf-report tools. ATF deprecated these tools in
+version 0.19 and removed these tools from its sources in version 0.20,
+requiring you to get an older version, use Kyua with an ATF compatibility
+package or use the version included in the Bind sources.
+
SUPPORT
The Internet Systems Consortium DHCP server is developed and distributed
Changes since 4.3.2
+- The ATF (Automated Testing Framework) tools used for optional unit tests
+ can now be built from its embedded sources in bind, solving the
+ atf-run / atf-report issue with recent (>= 0.20) versions of ATF.
+ The new configuration option is "./configure --with-atf=bind".
+
- The server now does a better check to see if it can allocate the memory
for large blocks of v4 leases and should provide a slightly better error
message. Note well: the server pre-allocates v4 addresses, if you use
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
ATF_BIN
ATF_LDFLAGS
ATF_CFLAGS
+BIND_ATF_FALSE
+BIND_ATF_TRUE
byte_order
RANLIB
EGREP
GREP
CPP
+BINDCONFIG
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-atf=PATH specify location where atf was installed
+ --with-atf=PATH specify location where atf was installed (or "bind")
--with-srv-lease-file=PATH
File for dhcpd leases (default is
LOCALSTATEDIR/db/dhcpd.leases)
fi
fi
+# We can have some flags to pass to bind configure
+BINDCONFIG=
+
+
# POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
# parts of the IPv6 Advanced Socket API as a result. This is stupid
# as it breaks how the two halves (Basic and Advanced) of the IPv6
withval=$with_atf; atf_path="$withval"
fi
-if test "$atf_path" != "no" ; then
+ if test "$atf_path" = "bind"; then
+ BIND_ATF_TRUE=
+ BIND_ATF_FALSE='#'
+else
+ BIND_ATF_TRUE='#'
+ BIND_ATF_FALSE=
+fi
+
+if test "$atf_path" = "bind" ; then
+ atf_pcp="bind"
+ atf_path="\${top_srcdir}/bind/atf"
+ ATF_CFLAGS="-I$atf_path/include -DUNIT_TEST"
+ ATF_LDFLAGS="-L$atf_path/lib -latf-c"
+ ATF_BIN=`pwd`/bind/atf/bin
+
+
+
+ BINDCONFIG="$BINDCONFIG --with-atf"
+elif test "$atf_path" != "no" ; then
# Config path for pkg-config
atf_pcp=""
if test "$atf_path" != "yes" ; then
fi
-echo -n "checking for dhcpd.leases location..."
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dhcpd.leases location" >&5
+$as_echo_n "checking for dhcpd.leases location... " >&6; }
if [ "x$with_srv_lease_file" = "x" ] ; then
if [ -d "${localstatedir}/db" ] ; then
with_srv_lease_file="${localstatedir}/db/dhcpd.leases"
with_srv_lease_file="/etc/dhcpd.leases"
fi
fi
-echo "$with_srv_lease_file"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_srv_lease_file" >&5
+$as_echo "$with_srv_lease_file" >&6; }
# Check whether --with-srv6-lease-file was given.
fi
-echo -n "checking for dhcpd6.leases location..."
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dhcpd6.leases location" >&5
+$as_echo_n "checking for dhcpd6.leases location... " >&6; }
if [ "x$with_srv6_lease_file" = "x" ] ; then
if [ -d "${localstatedir}/db" ] ; then
with_srv6_lease_file="${localstatedir}/db/dhcpd6.leases"
with_srv6_lease_file="/etc/dhcpd6.leases"
fi
fi
-echo "$with_srv6_lease_file"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_srv6_lease_file" >&5
+$as_echo "$with_srv6_lease_file" >&6; }
# Check whether --with-cli-lease-file was given.
fi
-echo -n "checking for dhclient.leases location..."
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dhclient.leases location" >&5
+$as_echo_n "checking for dhclient.leases location... " >&6; }
if [ "x$with_cli_lease_file" = "x" ] ; then
if [ -d "${localstatedir}/db" ] ; then
with_cli_lease_file="${localstatedir}/db/dhclient.leases"
with_cli_lease_file="/etc/dhclient.leases"
fi
fi
-echo "$with_cli_lease_file"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cli_lease_file" >&5
+$as_echo "$with_cli_lease_file" >&6; }
# Check whether --with-cli6-lease-file was given.
fi
-echo -n "checking for dhclient6.leases location..."
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dhclient6.leases location" >&5
+$as_echo_n "checking for dhclient6.leases location... " >&6; }
if [ "x$with_cli6_lease_file" = "x" ] ; then
if [ -d "${localstatedir}/db" ] ; then
with_cli6_lease_file="${localstatedir}/db/dhclient6.leases"
with_cli6_lease_file="/etc/dhclient6.leases"
fi
fi
-echo "$with_cli6_lease_file"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cli6_lease_file" >&5
+$as_echo "$with_cli6_lease_file" >&6; }
# Check whether --with-srv-pid-file was given.
;;
*)
libbind="$use_libbind"
+ if test ! -d "bind"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: empty bind directory" >&5
+$as_echo "$as_me: WARNING: empty bind directory" >&2;}
+ fi
;;
esac
fi
-ac_config_files="$ac_config_files Makefile client/Makefile client/tests/Makefile common/Makefile common/tests/Makefile dhcpctl/Makefile dst/Makefile includes/Makefile omapip/Makefile relay/Makefile server/Makefile tests/Makefile tests/unittest.sh server/tests/Makefile doc/devel/doxyfile"
+ac_config_files="$ac_config_files Makefile bind/Makefile client/Makefile client/tests/Makefile common/Makefile common/tests/Makefile dhcpctl/Makefile dst/Makefile includes/Makefile omapip/Makefile relay/Makefile server/Makefile tests/Makefile tests/unittest.sh server/tests/Makefile doc/devel/doxyfile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${BIND_ATF_TRUE}" && test -z "${BIND_ATF_FALSE}"; then
+ as_fn_error $? "conditional \"BIND_ATF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_ATF_TRUE}" && test -z "${HAVE_ATF_FALSE}"; then
as_fn_error $? "conditional \"HAVE_ATF\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"includes/config.h") CONFIG_HEADERS="$CONFIG_HEADERS includes/config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "bind/Makefile") CONFIG_FILES="$CONFIG_FILES bind/Makefile" ;;
"client/Makefile") CONFIG_FILES="$CONFIG_FILES client/Makefile" ;;
"client/tests/Makefile") CONFIG_FILES="$CONFIG_FILES client/tests/Makefile" ;;
"common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;;
fi
fi
+# We can have some flags to pass to bind configure
+BINDCONFIG=
+AC_SUBST(BINDCONFIG)
+
# POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
# parts of the IPv6 Advanced Socket API as a result. This is stupid
# as it breaks how the two halves (Basic and Advanced) of the IPv6
atf_path="no"
AC_ARG_WITH([atf],
- AS_HELP_STRING([--with-atf=PATH],[specify location where atf was installed]),
+ AS_HELP_STRING([--with-atf=PATH],[specify location where atf was installed (or "bind")]),
[atf_path="$withval"])
-if test "$atf_path" != "no" ; then
+AM_CONDITIONAL(BIND_ATF, test "$atf_path" = "bind")
+if test "$atf_path" = "bind" ; then
+ atf_pcp="bind"
+ atf_path="\${top_srcdir}/bind/atf"
+ ATF_CFLAGS="-I$atf_path/include -DUNIT_TEST"
+ ATF_LDFLAGS="-L$atf_path/lib -latf-c"
+ ATF_BIN=`pwd`/bind/atf/bin
+ AC_SUBST(ATF_CFLAGS)
+ AC_SUBST(ATF_LDFLAGS)
+ AC_SUBST(ATF_BIN)
+ BINDCONFIG="$BINDCONFIG --with-atf"
+elif test "$atf_path" != "no" ; then
# Config path for pkg-config
atf_pcp=""
if test "$atf_path" != "yes" ; then
AC_DEFINE_UNQUOTED([_PATH_DHCPD_DB], ["$withval"],
[File for dhcpd leases.]))
-echo -n "checking for dhcpd.leases location..."
+AC_MSG_CHECKING([for dhcpd.leases location])
if [[ "x$with_srv_lease_file" = "x" ]] ; then
if [[ -d "${localstatedir}/db" ]] ; then
with_srv_lease_file="${localstatedir}/db/dhcpd.leases"
with_srv_lease_file="/etc/dhcpd.leases"
fi
fi
-echo "$with_srv_lease_file"
+AC_MSG_RESULT($with_srv_lease_file)
AC_ARG_WITH(srv6-lease-file,
AS_HELP_STRING([--with-srv6-lease-file=PATH],[File for dhcpd6 leases
AC_DEFINE_UNQUOTED([_PATH_DHCPD6_DB], ["$withval"],
[File for dhcpd6 leases.]))
-echo -n "checking for dhcpd6.leases location..."
+AC_MSG_CHECKING([for dhcpd6.leases location])
if [[ "x$with_srv6_lease_file" = "x" ]] ; then
if [[ -d "${localstatedir}/db" ]] ; then
with_srv6_lease_file="${localstatedir}/db/dhcpd6.leases"
with_srv6_lease_file="/etc/dhcpd6.leases"
fi
fi
-echo "$with_srv6_lease_file"
+AC_MSG_RESULT($with_srv6_lease_file)
AC_ARG_WITH(cli-lease-file,
AS_HELP_STRING([--with-cli-lease-file=PATH],[File for dhclient leases
AC_DEFINE_UNQUOTED([_PATH_DHCLIENT_DB], ["$withval"],
[File for dhclient leases.]))
-echo -n "checking for dhclient.leases location..."
+AC_MSG_CHECKING([for dhclient.leases location])
if [[ "x$with_cli_lease_file" = "x" ]] ; then
if [[ -d "${localstatedir}/db" ]] ; then
with_cli_lease_file="${localstatedir}/db/dhclient.leases"
with_cli_lease_file="/etc/dhclient.leases"
fi
fi
-echo "$with_cli_lease_file"
+AC_MSG_RESULT($with_cli_lease_file)
AC_ARG_WITH(cli6-lease-file,
AS_HELP_STRING([--with-cli6-lease-file=PATH],[File for dhclient6 leases
AC_DEFINE_UNQUOTED([_PATH_DHCLIENT6_DB], ["$withval"],
[File for dhclient6 leases.]))
-echo -n "checking for dhclient6.leases location..."
+AC_MSG_CHECKING([for dhclient6.leases location])
if [[ "x$with_cli6_lease_file" = "x" ]] ; then
if [[ -d "${localstatedir}/db" ]] ; then
with_cli6_lease_file="${localstatedir}/db/dhclient6.leases"
with_cli6_lease_file="/etc/dhclient6.leases"
fi
fi
-echo "$with_cli6_lease_file"
+AC_MSG_RESULT($with_cli6_lease_file)
AC_ARG_WITH(srv-pid-file,
AS_HELP_STRING([--with-srv-pid-file=PATH],[File for dhcpd process information
;;
*)
libbind="$use_libbind"
+ if test ! -d "bind"; then
+ AC_MSG_WARN(empty bind directory)
+ fi
;;
esac
AC_CONFIG_FILES([
Makefile
+ bind/Makefile
client/Makefile
client/tests/Makefile
common/Makefile
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
ATF stands for Automated Test Framework, and is the framework used for unit
tests in ISC DHCP and BIND9. ATF sources can be downloaded from
https://github.com/jmmv/kyua . ATF itself must be configured, compiled
-and then installed to be available during the DHCP configure procedure. Please
+and then installed to be available during the DHCP configure procedure.
+
+There are three options for installing ATF. 1) Get the ATF sources and
follow INSTALL file supplied with ATF sources (it's essentially the typical
-./configure && make && make install procedure).
+./configure && make && make install procedure). 2) install Kyua with the ATF
+compatibility package, or 3) use the ATF version included in bind sources.
+
+To configure and build the ATF from BIND you should set the "--with-atf" option
+to "bind".
+@verbatim
+./configure --with-atf=bind
+@endverbatim
+
Beginning with ATF version 0.16, it is necessary to include the following
options --enable-tools and --disable-shared when configuring ATF:
ATF 0.20, the tools, atf-run and atf-report required by ISC DHCP, were
deprecated and are no longer included with ATF.
-The ATF successor, called Kyua, is being developed. As of August 2012, the
-latest available release of Kyua is 0.5. It claims to offer feature parity with
-ATF. Migration to Kyua may be planned some time in the future, but DHCP uses ATF
-for now. Such an upgrade should be done in coordination with BIND.
+The ATF successor, called Kyua, is being developed. As of August 2012,
+the latest available release of Kyua is 0.5. It claims to offer
+feature parity with ATF. Migration to Kyua may be planned some time in
+the future, but DHCP uses ATF for now. Such an upgrade should be done
+in coordination with BIND.
To build and run the unit-tests, use the following:
$ sh ../../tests/unittests.sh
@endverbatim
-atf-run will read the Atffile in the current directory and execute all the tests
-specified in it. Using atf-run - rather than calling the test binary directly -
-has several major benefits. The main one is that atf-run is able to recover from
-test segfault and continue execution from the next case onwards. Another is that
-it is possible to specify a timeout for a test. atf-run will kill the test in
-case of any infinite loops and will continue running next tests.
+atf-run will read the Atffile in the current directory and execute all
+the tests specified in it. Using atf-run - rather than calling the
+test binary directly - has several major benefits. The main one is
+that atf-run is able to recover from test segfault and continue
+execution from the next case onwards. Another is that it is possible
+to specify a timeout for a test. atf-run will kill the test in case of
+any infinite loops and will continue running next tests.
It is possible to run atf-run without passing its output to atf-report, but its
output is somewhat convoluted. That is useful in some situations, e.g. when one
wants to see test output.
-It is possible to run test binary directly. The only required parameter is the
-test case name. The binary will print out a warning that direct binary execution
-is not recommended as it won't be able to recover from crash. However, such an
-approach is convenient for running the test under the debugger.
+It is possible to run test binary directly. The only required
+parameter is the test case name. The binary will print out a warning
+that direct binary execution is not recommended as it won't be able to
+recover from crash. However, such an approach is convenient for
+running the test under the debugger.
@section testsAtfAdding Adding new unit-tests
http://www.gnu.org/software/automake/manual/html_node/Tests.html
-<b>2. Implement the test.</b> That typically means that you create a new file that will
-hold test code. It is recommended you name it (tested_feature_name)_unittest.c
-and put the file in specified tests directory. For example tests related to
-hash tables used on the server side should be named
-server/tests/hash_unittest.c. If in doubt, it is convenient to name the test
-code after the file that holds tested code, e.g. server/mdb6.c is tested in
+<b>2. Implement the test.</b> That typically means that you create a
+new file that will hold test code. It is recommended you name it
+(tested_feature_name)_unittest.c and put the file in specified tests
+directory. For example tests related to hash tables used on the
+server side should be named server/tests/hash_unittest.c. If in doubt,
+it is convenient to name the test code after the file that holds
+tested code, e.g. server/mdb6.c is tested in
server/tests/mdb6_unittest.c.
-The file server/tests/simple_unittest.c holds a template explaining the basic
-layout of the ATF tests. There may be many test cases in a single *_unittest.c
-file. Make sure that you register all your test cases using ATF_TP_ADD_TC()
-macro, and try to minimize modifications to the tested code if possible. Keep in
-mind that we are using modernized \ref codingGuidelines for test
-development. You are advised to also look at atf-c-api(3) man page.
-
-To add a new test, such as when a new module is added or when you want to start
-testing existing code, you can copy the server/tests/simple_unittest.c as a new
-new file, add the new file as a target in Makefile.am, and begin adding
-tests. Reviewing that file is a good idea, even if you decide to write your test
-from scratch, as it give you quick overview of the essential capabilities of the
-ATF framework (how to write test, how to make checks, pass or fail test
+The file server/tests/simple_unittest.c holds a template explaining
+the basic layout of the ATF tests. There may be many test cases in a
+single *_unittest.c file. Make sure that you register all your test
+cases using ATF_TP_ADD_TC() macro, and try to minimize modifications
+to the tested code if possible. Keep in mind that we are using
+modernized \ref codingGuidelines for test development. You are advised
+to also look at atf-c-api(3) man page.
+
+To add a new test, such as when a new module is added or when you want
+to start testing existing code, you can copy the
+server/tests/simple_unittest.c as a new new file, add the new file as
+a target in Makefile.am, and begin adding tests. Reviewing that file
+is a good idea, even if you decide to write your test from scratch, as
+it give you quick overview of the essential capabilities of the ATF
+framework (how to write test, how to make checks, pass or fail test
etc.). Do not forget to add your new file to git via "git add
yourtest_unittest.c".
name to ATF_TESTS. The tests directory will be built only in case where
ATF is enabled, using --with-atf during configure phase.
-<b>4. Modify Atffile to include your new test</b>, if needed. Tests in the
-specified directory must be registered in Atffile. See server/tests/Atffile for
-an example. Currently every executable with name of the form *_unittest will be
-executed automatically. If you followed naming convention proposed in a previous
-step, your test will be included and will be included automatically.
+<b>4. Modify Atffile to include your new test</b>, if needed. Tests in
+the specified directory must be registered in Atffile. See
+server/tests/Atffile for an example. Currently every executable with
+name of the form *_unittest will be executed automatically. If you
+followed naming convention proposed in a previous step, your test will
+be included and will be included automatically.
-<b>5. Enjoy your improved confidence in the code</b>, as you can run the tests after
-any change you may want to do:
+<b>5. Enjoy your improved confidence in the code</b>, as you can run
+the tests after any change you may want to do:
@verbatim
$ make check
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BINDCONFIG = @BINDCONFIG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
#
-# Copyright (C) 2009-2012 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009-2012, 2015 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.bind,v 1.8 2012/04/05 22:16:47 sar Exp $
-
# Configure and build the bind libraries for use by DHCP
include ./version.tmp
version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
-# bindvar.tmp is constructed by configure, it has the paths for
+# bindvar.tmp is constructed by configure, it has the paths for bind
# if GMAKE is blank the shell script couldn't find a gmake to use.
# binddir=
# GMAKE=
bindsrcdir=bind-${version}
+bindconfig = --disable-kqueue --disable-epoll --disable-devpoll
+bindconfig += --without-openssl --without-libxml2 --enable-exportlib
+bindconfig += --enable-threads=no --with-export-includedir=${binddir}/include
+bindconfig += --with-export-libdir=${binddir}/lib --with-gssapi=no
+bindconfig += @BINDCONFIG@
+
+cleandirs = ./lib ./include
+@BIND_ATF_TRUE@cleandirs += ./atf
+cleanfiles = ./configure.log ./build.log ./install.log
+
all:
# Extract the source from the tarball, if it hasn't been already.
@if test -d ${bindsrcdir} ; then \
fi
# Configure the export libraries
-# Currently disable the epoll and devpoll options as they don't interact
-# well with the DHCP code.
+# Currently disable the epoll, devpoll and kqueue options as they
+# don't interact well with the DHCP code.
# If the top-level Bind Makefile exists we skip the configuration step
# as we assume it's done and won't change. Doing a make clean will
# reset things if necessary.
- @if test -f ${bindsrcdir}/Makefile ; then \
- echo Bind export libraries already configured ; \
- else \
- echo Configuring BIND Export libraries for DHCP. ; \
- rm -rf ./lib ./include ./configure.log ./build.log ./install.log ; \
- (cd ${bindsrcdir} && ./configure --disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=${binddir}/include --with-export-libdir=${binddir}/lib --with-gssapi=no > ${binddir}/configure.log); \
+ @if test -f ${bindsrcdir}/Makefile ; then \
+ echo Bind export libraries already configured ; \
+ else \
+ echo Configuring BIND Export libraries for DHCP. ; \
+ rm -rf ${cleandirs} ${cleanfiles} ; \
+ (cd ${bindsrcdir} && \
+ ./configure ${bindconfig} > ${binddir}/configure.log); \
fi
+# Build and copy the ATF support if not yet installed.
+@BIND_ATF_TRUE@ @if test -d ./atf ; then \
+@BIND_ATF_TRUE@ echo ATF support already installed ; \
+@BIND_ATF_TRUE@ else \
+@BIND_ATF_TRUE@ echo Building ATF support ; \
+@BIND_ATF_TRUE@ (cd ${bindsrcdir}/unit; \
+@BIND_ATF_TRUE@ MAKE=${GMAKE} ${GMAKE} atf > ${binddir}/build.log ; \
+@BIND_ATF_TRUE@ cp -rp atf ${binddir}) ; \
+@BIND_ATF_TRUE@ fi
+
# Build and install the export libraries
# No need to do anything if we already have something installed.
@if test -d ${binddir}/lib ; then \
echo Building BIND Export libraries - this takes some time. ;\
(cd ${bindsrcdir}/lib/export ; \
echo building in `pwd` ; \
- MAKE=${GMAKE} ${GMAKE} > ${binddir}/build.log) ; \
+ MAKE=${GMAKE} ${GMAKE} >> ${binddir}/build.log) ; \
\
echo Installing BIND Export libraries to ${binddir}. ; \
(cd ${bindsrcdir}/lib/export ; \
clean:
@echo Cleaning BIND export library.
- rm -rf ${bindsrcdir} ./lib ./include ./configure.log ./build.log \
- ./install.log
+ rm -rf ${bindsrcdir} ${cleandirs} ${cleanfiles}
# Include the following so that this Makefile is happy when the parent
# tries to use them.
# Make and move to our directory for all things bind
mkdir $binddir
-cp util/Makefile.bind bind/Makefile
+cp util/Makefile.bind.in bind/Makefile.in
cd $binddir
# Get the bind version file and move it to version.tmp
+++ /dev/null
-#!/bin/sh
-#
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-# $Id: bindcus.sh,v 1.2 2009/10/28 04:12:30 sar Exp $
-
-# Configure and build the bind libraries for use by DHCP
-#
-# Usage: sh bindcus.sh
-#
-# Currently no arguments
-#
-
-
-topdir=`pwd`
-binddir=$topdir/bind
-cd bind
-
-. ./version.tmp
-version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
-bindsrcdir=bind-$version
-
-# Extract the source from the tarball
-gunzip -c bind.tar.gz | tar xf -
-
-# Run the script to build and install the export libraries
-sh $topdir/util/bindlib.sh $binddir $bindsrcdir
+++ /dev/null
-#!/bin/sh
-#
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-# $Id: bindlib.sh,v 1.5 2009/11/19 23:49:57 sar Exp $
-
-# Configure, build and install the bind export libraries for use by DHCP
-#
-# Usage: sh bindlib.sh <bind directory> <bind source directory>
-# The intention is for this script to be called by other scrips
-# (bind.sh or bindcus.sh) rather than be called directly.
-#
-# <bind directory> = directory for bind stuff within DHCP, typically
-# <dhcp>/bind
-#
-# <bind source directory> = directory for the unpacked bind source code
-# typically <dhcp>/bind/bind-<version>
-#
-
-binddir="$1"
-bindsrcdir="$2"
-
-gmake=
-for x in gmake gnumake make; do
- if $x --version 2>/dev/null | grep GNU > /dev/null; then
- gmake=$x
- break;
- fi
-done
-if test -z "$gmake"; then
- echo "unable to find gmake" 1>&2
- exit 1;
-fi
-
-# Configure the export libraries
-# Currently disable the epoll and devpoll options as they don't interact
-# well with the DHCP code.
-cd $bindsrcdir
-./configure --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=$binddir/include --with-export-libdir=$binddir/lib > $binddir/configure.log
-
-# Build the export libraries
-cd lib/export
-MAKE=$gmake $gmake > $binddir/build.log
-
-# Install the libraries and includes
-MAKE=$gmake $gmake install > $binddir/install.log