2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-09-02 07:15:44 +00:00

new config option: build ATF stuff from bind [#38754]

This commit is contained in:
Francis Dupont
2015-04-14 12:44:29 +02:00
parent cba7bc1cf3
commit 6913a589b9
23 changed files with 211 additions and 178 deletions

View File

@@ -22,7 +22,7 @@ EXTRA_DIST = RELNOTES LICENSE \
doc/devel/arch.dox doc/devel/atf.dox doc/devel/contrib.dox \ 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/debug.dox doc/devel/isc-logo.jpg doc/devel/mainpage.dox \
doc/devel/omapi.dox doc/devel/qa.dox util/bindvar.sh \ 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 common/tests/Atffile server/tests/Atffile
SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server

View File

@@ -81,6 +81,7 @@ host_triplet = @host@
subdir = . subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \ $(top_srcdir)/configure $(am__configure_deps) \
$(top_srcdir)/bind/Makefile.in \
$(top_srcdir)/doc/devel/doxyfile.in $(nobase_include_HEADERS) \ $(top_srcdir)/doc/devel/doxyfile.in $(nobase_include_HEADERS) \
README compile config.guess config.sub depcomp install-sh \ README compile config.guess config.sub depcomp install-sh \
missing missing
@@ -92,7 +93,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/includes/config.h 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 = CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@) AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -231,6 +232,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@@ -344,7 +346,7 @@ EXTRA_DIST = RELNOTES LICENSE \
doc/devel/arch.dox doc/devel/atf.dox doc/devel/contrib.dox \ 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/debug.dox doc/devel/isc-logo.jpg doc/devel/mainpage.dox \
doc/devel/omapi.dox doc/devel/qa.dox util/bindvar.sh \ 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 common/tests/Atffile server/tests/Atffile
SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
@@ -377,6 +379,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps): $(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 doc/devel/doxyfile: $(top_builddir)/config.status $(top_srcdir)/doc/devel/doxyfile.in
cd $(top_builddir) && $(SHELL) ./config.status $@ cd $(top_builddir) && $(SHELL) ./config.status $@
install-nobase_includeHEADERS: $(nobase_include_HEADERS) install-nobase_includeHEADERS: $(nobase_include_HEADERS)

13
README
View File

@@ -38,6 +38,7 @@ the ISC DHCP Distribution.
5.8.3 Other Solaris Items 5.8.3 Other Solaris Items
5.9 AIX 5.9 AIX
5.10 MacOS X 5.10 MacOS X
5.11 ATF
6 SUPPORT 6 SUPPORT
6.1 HOW TO REPORT BUGS 6.1 HOW TO REPORT BUGS
7 HISTORY 7 HISTORY
@@ -585,6 +586,18 @@ recomputed from scratch when the current location/set is changed.
Running the dhclient-script reinstalls the resolv.conf.dhclient6 Running the dhclient-script reinstalls the resolv.conf.dhclient6
configuration. 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 SUPPORT
The Internet Systems Consortium DHCP server is developed and distributed The Internet Systems Consortium DHCP server is developed and distributed

View File

@@ -54,6 +54,11 @@ by Eric Young (eay@cryptsoft.com).
Changes since 4.3.2 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 - 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 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 message. Note well: the server pre-allocates v4 addresses, if you use

View File

@@ -239,6 +239,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -212,6 +212,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -246,6 +246,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -250,6 +250,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

64
configure vendored
View File

@@ -632,11 +632,14 @@ HAVE_ATF_TRUE
ATF_BIN ATF_BIN
ATF_LDFLAGS ATF_LDFLAGS
ATF_CFLAGS ATF_CFLAGS
BIND_ATF_FALSE
BIND_ATF_TRUE
byte_order byte_order
RANLIB RANLIB
EGREP EGREP
GREP GREP
CPP CPP
BINDCONFIG
am__fastdepCC_FALSE am__fastdepCC_FALSE
am__fastdepCC_TRUE am__fastdepCC_TRUE
CCDEPMODE CCDEPMODE
@@ -1421,7 +1424,7 @@ Optional Features:
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --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 --with-srv-lease-file=PATH
File for dhcpd leases (default is File for dhcpd leases (default is
LOCALSTATEDIR/db/dhcpd.leases) LOCALSTATEDIR/db/dhcpd.leases)
@@ -4444,6 +4447,10 @@ if test "$GCC" = "yes"; then
fi fi
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 # 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 # 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 # as it breaks how the two halves (Basic and Advanced) of the IPv6
@@ -5428,7 +5435,25 @@ if test "${with_atf+set}" = set; then :
withval=$with_atf; atf_path="$withval" withval=$with_atf; atf_path="$withval"
fi 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 # Config path for pkg-config
atf_pcp="" atf_pcp=""
if test "$atf_path" != "yes" ; then if test "$atf_path" != "yes" ; then
@@ -5611,7 +5636,8 @@ _ACEOF
fi 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 [ "x$with_srv_lease_file" = "x" ] ; then
if [ -d "${localstatedir}/db" ] ; then if [ -d "${localstatedir}/db" ] ; then
with_srv_lease_file="${localstatedir}/db/dhcpd.leases" with_srv_lease_file="${localstatedir}/db/dhcpd.leases"
@@ -5633,7 +5659,8 @@ if [ "x$with_srv_lease_file" = "x" ] ; then
with_srv_lease_file="/etc/dhcpd.leases" with_srv_lease_file="/etc/dhcpd.leases"
fi fi
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. # Check whether --with-srv6-lease-file was given.
@@ -5646,7 +5673,8 @@ _ACEOF
fi 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 [ "x$with_srv6_lease_file" = "x" ] ; then
if [ -d "${localstatedir}/db" ] ; then if [ -d "${localstatedir}/db" ] ; then
with_srv6_lease_file="${localstatedir}/db/dhcpd6.leases" with_srv6_lease_file="${localstatedir}/db/dhcpd6.leases"
@@ -5668,7 +5696,8 @@ if [ "x$with_srv6_lease_file" = "x" ] ; then
with_srv6_lease_file="/etc/dhcpd6.leases" with_srv6_lease_file="/etc/dhcpd6.leases"
fi fi
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. # Check whether --with-cli-lease-file was given.
@@ -5681,7 +5710,8 @@ _ACEOF
fi 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 [ "x$with_cli_lease_file" = "x" ] ; then
if [ -d "${localstatedir}/db" ] ; then if [ -d "${localstatedir}/db" ] ; then
with_cli_lease_file="${localstatedir}/db/dhclient.leases" with_cli_lease_file="${localstatedir}/db/dhclient.leases"
@@ -5703,7 +5733,8 @@ if [ "x$with_cli_lease_file" = "x" ] ; then
with_cli_lease_file="/etc/dhclient.leases" with_cli_lease_file="/etc/dhclient.leases"
fi fi
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. # Check whether --with-cli6-lease-file was given.
@@ -5716,7 +5747,8 @@ _ACEOF
fi 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 [ "x$with_cli6_lease_file" = "x" ] ; then
if [ -d "${localstatedir}/db" ] ; then if [ -d "${localstatedir}/db" ] ; then
with_cli6_lease_file="${localstatedir}/db/dhclient6.leases" with_cli6_lease_file="${localstatedir}/db/dhclient6.leases"
@@ -5738,7 +5770,8 @@ if [ "x$with_cli6_lease_file" = "x" ] ; then
with_cli6_lease_file="/etc/dhclient6.leases" with_cli6_lease_file="/etc/dhclient6.leases"
fi fi
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. # Check whether --with-srv-pid-file was given.
@@ -6598,6 +6631,10 @@ no)
;; ;;
*) *)
libbind="$use_libbind" 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 esac
@@ -6812,7 +6849,7 @@ $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
fi 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 cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
@@ -6952,6 +6989,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
Usually this means the macro was only invoked conditionally." "$LINENO" 5 Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi 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 if test -z "${HAVE_ATF_TRUE}" && test -z "${HAVE_ATF_FALSE}"; then
as_fn_error $? "conditional \"HAVE_ATF\" was never defined. as_fn_error $? "conditional \"HAVE_ATF\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -7551,6 +7592,7 @@ do
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"includes/config.h") CONFIG_HEADERS="$CONFIG_HEADERS includes/config.h" ;; "includes/config.h") CONFIG_HEADERS="$CONFIG_HEADERS includes/config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"bind/Makefile") CONFIG_FILES="$CONFIG_FILES bind/Makefile" ;;
"client/Makefile") CONFIG_FILES="$CONFIG_FILES client/Makefile" ;; "client/Makefile") CONFIG_FILES="$CONFIG_FILES client/Makefile" ;;
"client/tests/Makefile") CONFIG_FILES="$CONFIG_FILES client/tests/Makefile" ;; "client/tests/Makefile") CONFIG_FILES="$CONFIG_FILES client/tests/Makefile" ;;
"common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;; "common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;;

View File

@@ -32,6 +32,10 @@ if test "$GCC" = "yes"; then
fi fi
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 # 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 # 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 # as it breaks how the two halves (Basic and Advanced) of the IPv6
@@ -187,9 +191,20 @@ fi
atf_path="no" atf_path="no"
AC_ARG_WITH([atf], 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"]) [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 # Config path for pkg-config
atf_pcp="" atf_pcp=""
if test "$atf_path" != "yes" ; then if test "$atf_path" != "yes" ; then
@@ -264,7 +279,7 @@ AC_ARG_WITH(srv-lease-file,
AC_DEFINE_UNQUOTED([_PATH_DHCPD_DB], ["$withval"], AC_DEFINE_UNQUOTED([_PATH_DHCPD_DB], ["$withval"],
[File for dhcpd leases.])) [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 [[ "x$with_srv_lease_file" = "x" ]] ; then
if [[ -d "${localstatedir}/db" ]] ; then if [[ -d "${localstatedir}/db" ]] ; then
with_srv_lease_file="${localstatedir}/db/dhcpd.leases" with_srv_lease_file="${localstatedir}/db/dhcpd.leases"
@@ -286,7 +301,7 @@ if [[ "x$with_srv_lease_file" = "x" ]] ; then
with_srv_lease_file="/etc/dhcpd.leases" with_srv_lease_file="/etc/dhcpd.leases"
fi fi
fi fi
echo "$with_srv_lease_file" AC_MSG_RESULT($with_srv_lease_file)
AC_ARG_WITH(srv6-lease-file, AC_ARG_WITH(srv6-lease-file,
AS_HELP_STRING([--with-srv6-lease-file=PATH],[File for dhcpd6 leases AS_HELP_STRING([--with-srv6-lease-file=PATH],[File for dhcpd6 leases
@@ -294,7 +309,7 @@ AC_ARG_WITH(srv6-lease-file,
AC_DEFINE_UNQUOTED([_PATH_DHCPD6_DB], ["$withval"], AC_DEFINE_UNQUOTED([_PATH_DHCPD6_DB], ["$withval"],
[File for dhcpd6 leases.])) [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 [[ "x$with_srv6_lease_file" = "x" ]] ; then
if [[ -d "${localstatedir}/db" ]] ; then if [[ -d "${localstatedir}/db" ]] ; then
with_srv6_lease_file="${localstatedir}/db/dhcpd6.leases" with_srv6_lease_file="${localstatedir}/db/dhcpd6.leases"
@@ -316,7 +331,7 @@ if [[ "x$with_srv6_lease_file" = "x" ]] ; then
with_srv6_lease_file="/etc/dhcpd6.leases" with_srv6_lease_file="/etc/dhcpd6.leases"
fi fi
fi fi
echo "$with_srv6_lease_file" AC_MSG_RESULT($with_srv6_lease_file)
AC_ARG_WITH(cli-lease-file, AC_ARG_WITH(cli-lease-file,
AS_HELP_STRING([--with-cli-lease-file=PATH],[File for dhclient leases AS_HELP_STRING([--with-cli-lease-file=PATH],[File for dhclient leases
@@ -324,7 +339,7 @@ AC_ARG_WITH(cli-lease-file,
AC_DEFINE_UNQUOTED([_PATH_DHCLIENT_DB], ["$withval"], AC_DEFINE_UNQUOTED([_PATH_DHCLIENT_DB], ["$withval"],
[File for dhclient leases.])) [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 [[ "x$with_cli_lease_file" = "x" ]] ; then
if [[ -d "${localstatedir}/db" ]] ; then if [[ -d "${localstatedir}/db" ]] ; then
with_cli_lease_file="${localstatedir}/db/dhclient.leases" with_cli_lease_file="${localstatedir}/db/dhclient.leases"
@@ -346,7 +361,7 @@ if [[ "x$with_cli_lease_file" = "x" ]] ; then
with_cli_lease_file="/etc/dhclient.leases" with_cli_lease_file="/etc/dhclient.leases"
fi fi
fi fi
echo "$with_cli_lease_file" AC_MSG_RESULT($with_cli_lease_file)
AC_ARG_WITH(cli6-lease-file, AC_ARG_WITH(cli6-lease-file,
AS_HELP_STRING([--with-cli6-lease-file=PATH],[File for dhclient6 leases AS_HELP_STRING([--with-cli6-lease-file=PATH],[File for dhclient6 leases
@@ -354,7 +369,7 @@ AC_ARG_WITH(cli6-lease-file,
AC_DEFINE_UNQUOTED([_PATH_DHCLIENT6_DB], ["$withval"], AC_DEFINE_UNQUOTED([_PATH_DHCLIENT6_DB], ["$withval"],
[File for dhclient6 leases.])) [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 [[ "x$with_cli6_lease_file" = "x" ]] ; then
if [[ -d "${localstatedir}/db" ]] ; then if [[ -d "${localstatedir}/db" ]] ; then
with_cli6_lease_file="${localstatedir}/db/dhclient6.leases" with_cli6_lease_file="${localstatedir}/db/dhclient6.leases"
@@ -376,7 +391,7 @@ if [[ "x$with_cli6_lease_file" = "x" ]] ; then
with_cli6_lease_file="/etc/dhclient6.leases" with_cli6_lease_file="/etc/dhclient6.leases"
fi fi
fi fi
echo "$with_cli6_lease_file" AC_MSG_RESULT($with_cli6_lease_file)
AC_ARG_WITH(srv-pid-file, AC_ARG_WITH(srv-pid-file,
AS_HELP_STRING([--with-srv-pid-file=PATH],[File for dhcpd process information AS_HELP_STRING([--with-srv-pid-file=PATH],[File for dhcpd process information
@@ -594,6 +609,9 @@ no)
;; ;;
*) *)
libbind="$use_libbind" libbind="$use_libbind"
if test ! -d "bind"; then
AC_MSG_WARN(empty bind directory)
fi
;; ;;
esac esac
@@ -641,6 +659,7 @@ AC_C_FLEXIBLE_ARRAY_MEMBER
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
bind/Makefile
client/Makefile client/Makefile
client/tests/Makefile client/tests/Makefile
common/Makefile common/Makefile

View File

@@ -214,6 +214,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -31,9 +31,19 @@ Test Framework)</a> as a framework to run our unittests.
ATF stands for Automated Test Framework, and is the framework used for unit 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 tests in ISC DHCP and BIND9. ATF sources can be downloaded from
https://github.com/jmmv/kyua . ATF itself must be configured, compiled 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 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 Beginning with ATF version 0.16, it is necessary to include the following
options --enable-tools and --disable-shared when configuring ATF: options --enable-tools and --disable-shared when configuring ATF:
@@ -46,10 +56,11 @@ ISC DHCP unittests will run with ATF releases upto 0.19. Beginning with
ATF 0.20, the tools, atf-run and atf-report required by ISC DHCP, were ATF 0.20, the tools, atf-run and atf-report required by ISC DHCP, were
deprecated and are no longer included with ATF. deprecated and are no longer included with ATF.
The ATF successor, called Kyua, is being developed. As of August 2012, the The ATF successor, called Kyua, is being developed. As of August 2012,
latest available release of Kyua is 0.5. It claims to offer feature parity with the latest available release of Kyua is 0.5. It claims to offer
ATF. Migration to Kyua may be planned some time in the future, but DHCP uses ATF feature parity with ATF. Migration to Kyua may be planned some time in
for now. Such an upgrade should be done in coordination with BIND. 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: To build and run the unit-tests, use the following:
@@ -86,21 +97,23 @@ or
$ sh ../../tests/unittests.sh $ sh ../../tests/unittests.sh
@endverbatim @endverbatim
atf-run will read the Atffile in the current directory and execute all the tests atf-run will read the Atffile in the current directory and execute all
specified in it. Using atf-run - rather than calling the test binary directly - the tests specified in it. Using atf-run - rather than calling the
has several major benefits. The main one is that atf-run is able to recover from test binary directly - has several major benefits. The main one is
test segfault and continue execution from the next case onwards. Another is that that atf-run is able to recover from test segfault and continue
it is possible to specify a timeout for a test. atf-run will kill the test in execution from the next case onwards. Another is that it is possible
case of any infinite loops and will continue running next tests. 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 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 output is somewhat convoluted. That is useful in some situations, e.g. when one
wants to see test output. wants to see test output.
It is possible to run test binary directly. The only required parameter is the It is possible to run test binary directly. The only required
test case name. The binary will print out a warning that direct binary execution parameter is the test case name. The binary will print out a warning
is not recommended as it won't be able to recover from crash. However, such an that direct binary execution is not recommended as it won't be able to
approach is convenient for running the test under the debugger. recover from crash. However, such an approach is convenient for
running the test under the debugger.
@section testsAtfAdding Adding new unit-tests @section testsAtfAdding Adding new unit-tests
@@ -162,27 +175,30 @@ See existing Makefile.am for examples, and the Automake documentation:
http://www.gnu.org/software/automake/manual/html_node/Tests.html 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 <b>2. Implement the test.</b> That typically means that you create a
hold test code. It is recommended you name it (tested_feature_name)_unittest.c new file that will hold test code. It is recommended you name it
and put the file in specified tests directory. For example tests related to (tested_feature_name)_unittest.c and put the file in specified tests
hash tables used on the server side should be named directory. For example tests related to hash tables used on the
server/tests/hash_unittest.c. If in doubt, it is convenient to name the test server side should be named server/tests/hash_unittest.c. If in doubt,
code after the file that holds tested code, e.g. server/mdb6.c is tested in 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. server/tests/mdb6_unittest.c.
The file server/tests/simple_unittest.c holds a template explaining the basic The file server/tests/simple_unittest.c holds a template explaining
layout of the ATF tests. There may be many test cases in a single *_unittest.c the basic layout of the ATF tests. There may be many test cases in a
file. Make sure that you register all your test cases using ATF_TP_ADD_TC() single *_unittest.c file. Make sure that you register all your test
macro, and try to minimize modifications to the tested code if possible. Keep in cases using ATF_TP_ADD_TC() macro, and try to minimize modifications
mind that we are using modernized \ref codingGuidelines for test to the tested code if possible. Keep in mind that we are using
development. You are advised to also look at atf-c-api(3) man page. 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 To add a new test, such as when a new module is added or when you want
testing existing code, you can copy the server/tests/simple_unittest.c as a new to start testing existing code, you can copy the
new file, add the new file as a target in Makefile.am, and begin adding server/tests/simple_unittest.c as a new new file, add the new file as
tests. Reviewing that file is a good idea, even if you decide to write your test a target in Makefile.am, and begin adding tests. Reviewing that file
from scratch, as it give you quick overview of the essential capabilities of the is a good idea, even if you decide to write your test from scratch, as
ATF framework (how to write test, how to make checks, pass or fail test 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 etc.). Do not forget to add your new file to git via "git add
yourtest_unittest.c". yourtest_unittest.c".
@@ -190,14 +206,15 @@ yourtest_unittest.c".
name to ATF_TESTS. The tests directory will be built only in case where name to ATF_TESTS. The tests directory will be built only in case where
ATF is enabled, using --with-atf during configure phase. ATF is enabled, using --with-atf during configure phase.
<b>4. Modify Atffile to include your new test</b>, if needed. Tests in the <b>4. Modify Atffile to include your new test</b>, if needed. Tests in
specified directory must be registered in Atffile. See server/tests/Atffile for the specified directory must be registered in Atffile. See
an example. Currently every executable with name of the form *_unittest will be server/tests/Atffile for an example. Currently every executable with
executed automatically. If you followed naming convention proposed in a previous name of the form *_unittest will be executed automatically. If you
step, your test will be included and will be included automatically. 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 <b>5. Enjoy your improved confidence in the code</b>, as you can run
any change you may want to do: the tests after any change you may want to do:
@verbatim @verbatim
$ make check $ make check

View File

@@ -195,6 +195,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -168,6 +168,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -211,6 +211,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -192,6 +192,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -253,6 +253,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -259,6 +259,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -163,6 +163,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BINDCONFIG = @BINDCONFIG@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@@ -1,5 +1,5 @@
# #
# 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 # Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -13,14 +13,12 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE. # 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 # Configure and build the bind libraries for use by DHCP
include ./version.tmp include ./version.tmp
version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER} 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. # if GMAKE is blank the shell script couldn't find a gmake to use.
# binddir= # binddir=
# GMAKE= # GMAKE=
@@ -28,6 +26,16 @@ include ./bindvar.tmp
bindsrcdir=bind-${version} 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: all:
# Extract the source from the tarball, if it hasn't been already. # Extract the source from the tarball, if it hasn't been already.
@if test -d ${bindsrcdir} ; then \ @if test -d ${bindsrcdir} ; then \
@@ -42,8 +50,8 @@ all:
fi fi
# Configure the export libraries # Configure the export libraries
# Currently disable the epoll and devpoll options as they don't interact # Currently disable the epoll, devpoll and kqueue options as they
# well with the DHCP code. # don't interact well with the DHCP code.
# If the top-level Bind Makefile exists we skip the configuration step # 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 # as we assume it's done and won't change. Doing a make clean will
# reset things if necessary. # reset things if necessary.
@@ -51,10 +59,21 @@ all:
echo Bind export libraries already configured ; \ echo Bind export libraries already configured ; \
else \ else \
echo Configuring BIND Export libraries for DHCP. ; \ echo Configuring BIND Export libraries for DHCP. ; \
rm -rf ./lib ./include ./configure.log ./build.log ./install.log ; \ rm -rf ${cleandirs} ${cleanfiles} ; \
(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); \ (cd ${bindsrcdir} && \
./configure ${bindconfig} > ${binddir}/configure.log); \
fi 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 # Build and install the export libraries
# No need to do anything if we already have something installed. # No need to do anything if we already have something installed.
@if test -d ${binddir}/lib ; then \ @if test -d ${binddir}/lib ; then \
@@ -63,7 +82,7 @@ all:
echo Building BIND Export libraries - this takes some time. ;\ echo Building BIND Export libraries - this takes some time. ;\
(cd ${bindsrcdir}/lib/export ; \ (cd ${bindsrcdir}/lib/export ; \
echo building in `pwd` ; \ echo building in `pwd` ; \
MAKE=${GMAKE} ${GMAKE} > ${binddir}/build.log) ; \ MAKE=${GMAKE} ${GMAKE} >> ${binddir}/build.log) ; \
\ \
echo Installing BIND Export libraries to ${binddir}. ; \ echo Installing BIND Export libraries to ${binddir}. ; \
(cd ${bindsrcdir}/lib/export ; \ (cd ${bindsrcdir}/lib/export ; \
@@ -72,8 +91,7 @@ all:
clean: clean:
@echo Cleaning BIND export library. @echo Cleaning BIND export library.
rm -rf ${bindsrcdir} ./lib ./include ./configure.log ./build.log \ rm -rf ${bindsrcdir} ${cleandirs} ${cleanfiles}
./install.log
# Include the following so that this Makefile is happy when the parent # Include the following so that this Makefile is happy when the parent
# tries to use them. # tries to use them.

View File

@@ -99,7 +99,7 @@ rm -rf bind
# Make and move to our directory for all things bind # Make and move to our directory for all things bind
mkdir $binddir mkdir $binddir
cp util/Makefile.bind bind/Makefile cp util/Makefile.bind.in bind/Makefile.in
cd $binddir cd $binddir
# Get the bind version file and move it to version.tmp # Get the bind version file and move it to version.tmp

View File

@@ -1,39 +0,0 @@
#!/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

View File

@@ -1,58 +0,0 @@
#!/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