doc/examples/dhclient-dhcpv6.conf doc/examples/dhcpd-dhcpv6.conf \
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 \
+ doc/devel/omapi.dox doc/devel/qa.dox \
bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
common/tests/Atffile server/tests/Atffile
doc/examples/dhclient-dhcpv6.conf doc/examples/dhcpd-dhcpv6.conf \
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 \
+ doc/devel/omapi.dox doc/devel/qa.dox \
bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
common/tests/Atffile server/tests/Atffile
- Removed an extraneous expression in omapi socket callback function. Prior
to this change, the logic was techinically incorrect but other factors
ensured the outcome itself was correct. This change was made primarily
- for code clarity.
+ for code clarity. Thanks to Ganesh Pinjala for bringing the issue to our
+ attention.
[ISC-Bugs #42834]
+- Corrected a bug which could cause the server to sporadically crash while
+ loading lease files with the lease-id-format is set to "hex". Our thanks
+ to Jay Ford, University of Iowa for reporting the issue.
+ [ISC-Bugs #43185]
+
+- Pass configure arguments which begin with an upper case letter, e.g.
+ CFLAGS, to the embedded bind configure, so it is no longer required
+ to use environment variables to get the same effect.
+ [ISC-Bugs #35143]
+
+- Added --enable-kqueue, --enable-epoll, --enable-devpoll and a more
+ general --with-bind-extra-config to pass extra options to the
+ embedded bind configure. Note we had mixed experiences with this
+ so it is at the user risk, i.e., they are NOT SUPPORTED yet.
+ [ISC-Bugs #20890]
+
+- Changed the way the embedded bind Makefile is updated by configure.
+ The only user visible side effect is that --with-libbind now requires
+ either "no" or an (absolute) path, i.e. "yes" is no longer valid.
+ [ISC-Bugs #43227]
+
Changes since 4.3.0 (bug fixes)
- Tidy up several small tickets.
enum dhcp_token token;
const char *val;
-#if defined (DEBUG_TOKEN)
+#if defined (DEBUG_TOKENS)
log_error("skip_to_rbrace: %d\n", brace_count);
#endif
do {
unsigned limit;
char *buf;
{
- unsigned i;
+ char *bufptr = buf;
+ int byte = 0;
- if ((buf == NULL) || (limit < 3))
+ if (data == NULL || bufptr == NULL || limit == 0) {
return;
+ }
- for (i = 0; (i < limit / 3) && (i < len); i++) {
- sprintf(&buf[i*3], "%02x:", data[i]);
+ if (((len == 0) || ((len * 3) > limit))) {
+ *bufptr = 0x0;
+ return;
}
- buf[(i * 3) - 1] = 0;
+
+ for ( ; byte < len; ++byte) {
+ if (byte > 0) {
+ *bufptr++ = ':';
+ }
+
+ sprintf(bufptr, "%02x", data[byte]);
+ bufptr += 2;
+ }
+
return;
}
return;
}
+ATF_TC(print_hex_only);
+
+ATF_TC_HEAD(print_hex_only, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Verify hex data formatting.");
+}
+
+/* This test exercises the print_hex_only function
+ */
+ATF_TC_BODY(print_hex_only, tc)
+{
+ unsigned char data[] = {0xaa,0xbb,0xcc,0xdd};
+ char* ref = "aa:bb:cc:dd";
+ char buf[14];
+ memset(buf, 'x', sizeof(buf));
+ int data_len = sizeof(data);
+ int expected_len = 12;
+
+ /* Proper input values should produce proper result */
+ print_hex_only (data_len, data, expected_len, buf);
+ if (strlen(buf) != strlen(ref)) {
+ atf_tc_fail("len of result is wrong");
+ }
+
+ if (strcmp(buf, ref)) {
+ atf_tc_fail("result doesn't match ref");
+ }
+
+ /* Make sure we didn't overrun the buffer */
+ if (buf[expected_len] != 'x') {
+ atf_tc_fail("data over run detected");
+ }
+
+ /* Buffer == null doesn't crash */
+ print_hex_only (data_len, data, expected_len, NULL);
+
+ /* Limit == 0 doesn't write (or crash) */
+ *buf = '-';
+ print_hex_only (data_len, data, 0, buf);
+ if (*buf != '-') {
+ atf_tc_fail("limit of zero, altered buffer");
+ }
+
+ /* data == NULL doesn't write (or crash) */
+ print_hex_only (data_len, NULL, expected_len, buf);
+ if (*buf != '-') {
+ atf_tc_fail("limit of zero, altered buffer");
+ }
+
+ /* Limit too small should produce zero length string */
+ *buf = '-';
+ print_hex_only (data_len, data, expected_len - 1, buf);
+ if (*buf != 0x0) {
+ atf_tc_fail("limit too small should have failed");
+ }
+
+ /* Data length of 0 should produce zero length string */
+ *buf = '-';
+ print_hex_only (0, data, expected_len, buf);
+ if (*buf != 0x0) {
+ atf_tc_fail("limit too small should have failed");
+ }
+}
/* This macro defines main() method that will call specified
test cases. tp and simple_test_case names can be whatever you want
{
ATF_TP_ADD_TC(tp, find_percent_basic);
ATF_TP_ADD_TC(tp, find_percent_adv);
+ ATF_TP_ADD_TC(tp, print_hex_only);
return (atf_no_error());
}
LIBOBJS
LDAP_CFLAGS
LDAP_LIBS
+BINDBUILD
+BINDBIND
BINDSRCDIR
BINDDIR
+BINDIOMUX
ac_prefix_program
DISTCHECK_ATF_CONFIGURE_FLAG
HAVE_ATF_FALSE
with_relay_pid_file
with_relay6_pid_file
with_randomdev
+enable_kqueue
+enable_epoll
+enable_devpoll
+with_bind_extra_config
with_libbind
with_ldap
with_ldapcrypto
--enable-log-pid Include PIDs in syslog messages (default is no).
--enable-binary-leases enable support for binary insertion of leases
(default is no)
+ --enable-kqueue use BSD kqueue (default is no)
+ --enable-epoll use Linux epoll (default is no)
+ --enable-devpoll use /dev/poll (default is no)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
File for dhcrelay6 process information (default is
LOCALSTATEDIR/run/dhcrelay6.pid)
--with-randomdev=PATH Path for random device (default is /dev/random)
- --with-libbind=PATH bind includes and libraries are in PATH (default is
- ./bind)
+ --with-bind-extra-config
+ configure bind librairies with some extra options
+ (default is none)
+ --with-libbind=PATH bind includes and libraries are in PATH
--with-ldap enable OpenLDAP support in dhcpd (default is no)
--with-ldapcrypto enable OpenLDAP crypto support in dhcpd (default is
no)
if test "$cross_compiling" = "yes"; then
BINDCONFIG="--host=$host"
fi
+# Pass CFLAGS and co. $ac_configure_args looks like "'arg1' 'arg2' ..."
+# and as there can be a space inside an argument some magic is required.
+# This sets $1 ... $N to my_configure_args, arg1 ... argN
+eval "set my_configure_args $ac_configure_args"
+# remove my_configure_args, i.e., the guard against empty $ac_configure_args
+shift
+# iterate on arguments and copying 'arg' when it begins by an upper case
+for a
+do
+ case $a in
+ [A-Z]*) BINDCONFIG="$BINDCONFIG '$a'" ;;
+ esac
+done
if test "$cross_compiling" = "yes"; then
CROSS_COMPILING_TRUE=
fi
if test ! -x $ATF_BIN/atf-run -o ! -x $ATF_BIN/atf-report ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: atf-run,atf-report not found, assuming they are in your path" >&5
-$as_echo "$as_me: WARNING: atf-run,atf-report not found, assuming they are in your path" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: atf-run/atf-report not found, assuming they are in your path" >&5
+$as_echo "$as_me: WARNING: atf-run/atf-report not found, assuming they are in your path" >&2;}
fi
BINDCONFIG="$BINDCONFIG --with-randomdev=$use_randomdev"
fi
+BINDIOMUX="--disable-kqueue --disable-epoll --disable-devpoll"
+# check kqueue/epoll/devpoll alternative to select
+# Check whether --enable-kqueue was given.
+if test "${enable_kqueue+set}" = set; then :
+ enableval=$enable_kqueue; want_kqueue="$enableval"
+else
+ want_kqueue="no"
+fi
+
+if test "$want_kqueue" = "yes"; then
+ BINDIOMUX="--enable-kqueue"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-kqueue is not supported: it may lead to issues such as server looping" >&5
+$as_echo "$as_me: WARNING: --enable-kqueue is not supported: it may lead to issues such as server looping" >&2;}
+fi
+# Check whether --enable-epoll was given.
+if test "${enable_epoll+set}" = set; then :
+ enableval=$enable_epoll; want_epoll="$enableval"
+else
+ want_epoll="no"
+fi
+
+if test "$want_epoll" = "yes"; then
+ BINDIOMUX="--enable-epoll"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-epoll is not supported: it may lead to issues such as server looping" >&5
+$as_echo "$as_me: WARNING: --enable-epoll is not supported: it may lead to issues such as server looping" >&2;}
+fi
+# Check whether --enable-devpoll was given.
+if test "${enable_devpoll+set}" = set; then :
+ enableval=$enable_devpoll; want_devpoll="$enableval"
+else
+ want_devpoll="no"
+fi
+
+if test "$want_devpoll" = "yes"; then
+ BINDIOMUX="--enable-devpoll"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-devpoll is not supported: it may lead to issues such as server looping" >&5
+$as_echo "$as_me: WARNING: --enable-devpoll is not supported: it may lead to issues such as server looping" >&2;}
+fi
+
+
+# general extra bind configure arguments
+
+# Check whether --with-bind-extra-config was given.
+if test "${with_bind_extra_config+set}" = set; then :
+ withval=$with_bind_extra_config; use_xbindconfig="$withval"
+else
+ use_xbindconfig=""
+fi
+
+case "$use_xbindconfig" in
+yes|no|'')
+ ;;
+*)
+ BINDCONFIG="$BINDCONFIG $use_xbindconfig"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Most options to bind configure are not supported when used by ISC DHCP" >&5
+$as_echo "$as_me: WARNING: Most options to bind configure are not supported when used by ISC DHCP" >&2;}
+ ;;
+esac
+
# see if there is a "sa_len" field in our interface information structure
ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
"
fi
+# bind/Makefile.in is not from automake so we need 2 sets of variables
BINDDIR=
BINDSRCDIR=
+BINDBIND=
+BINDBUILD=
# Check whether --with-libbind was given.
if test "${with_libbind+set}" = set; then :
case "$use_libbind" in
yes)
- BINDDIR="\${top_srcdir}/bind"
- BINDSRCDIR="\${top_srcdir}/bind"
+ as_fn_error $? "PATH is required in --with-libbind=PATH" "$LINENO" 5
;;
no)
BINDDIR="\${top_srcdir}/bind"
BINDSRCDIR="\${top_srcdir}/bind"
+ my_abs_srcdir=`cd $srcdir && pwd`
+ BINDBIND="${my_abs_srcdir}/bind"
+ if test ! -d "$srcdir/bind"; then
+ as_fn_error $? "Where to find or build bind includes and libraries must be specified" "$LINENO" 5
+ fi
+ if test -d "$srcdir/bind/bind9"; then
+ BINDBUILD="${my_abs_srcdir}/bind/bind9"
+ else
+ if test ! -f "$srcdir/bind/version.tmp"; then
+ as_fn_error $? "Cannot find $srcdir/bind/version.tmp" "$LINENO" 5
+ fi
+ . "$srcdir/bind/version.tmp"
+ bindversion=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
+ BINDBUILD="${my_abs_srcdir}/bind/bind-$bindversion"
+ fi
+ ac_config_files="$ac_config_files $srcdir/bind/Makefile"
+
;;
*)
- BINDDIR="$use_libbind"
- if test ! -d "$srcdir/bind"; then
- # no bind directory, create it with a fake Makefile.in
- # (AC_CONFIG_FILES and top Makefile refer to it so
- # it must exits)
- mkdir $srcdir/bind
- cat > $srcdir/bind/Makefile.in << EOF
-# placeholder
-all check clean distclean distdir install uninstall:
-
-EOF
+ if test ! -d "$use_libbind"; then
+ as_fn_error $? "Cannot find bind directory at $use_libbind" "$LINENO" 5
+ fi
+ if test ! -d "$use_libbind/include"; then
+ as_fn_error $? "Cannot find bind includes at $use_libbind/include" "$LINENO" 5
+ fi
+ if test ! -d "$use_libbind/lib"; then
+ as_fn_error $? "Cannot find bind libraries at $use_libbind/lib" "$LINENO" 5
fi
+ BINDDIR="$use_libbind"
;;
esac
+
+
# OpenLDAP support.
# Check whether --with-ldap was given.
fi
-ac_config_files="$ac_config_files Makefile $srcdir/bind/Makefile client/Makefile client/tests/Makefile common/Makefile common/tests/Makefile dhcpctl/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 client/Makefile client/tests/Makefile common/Makefile common/tests/Makefile dhcpctl/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
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"includes/config.h") CONFIG_HEADERS="$CONFIG_HEADERS includes/config.h" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"$srcdir/bind/Makefile") CONFIG_FILES="$CONFIG_FILES $srcdir/bind/Makefile" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES 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" ;;
DHCP_VERSIONS="DHCPv4"
fi
-(cd $srcdir
- sh util/bindvar.sh
- if test $? -ne 0; then
- as_fn_error $? "*** util/bindvar.sh failed" "$LINENO" 5
- fi
-)
-if test $? -ne 0; then
- exit $?
-fi
-
cat > config.report << END
ISC DHCP source configure results:
if test "$cross_compiling" = "yes"; then
BINDCONFIG="--host=$host"
fi
+# Pass CFLAGS and co. $ac_configure_args looks like "'arg1' 'arg2' ..."
+# and as there can be a space inside an argument some magic is required.
+# This sets $1 ... $N to my_configure_args, arg1 ... argN
+eval "set my_configure_args $ac_configure_args"
+# remove my_configure_args, i.e., the guard against empty $ac_configure_args
+shift
+# iterate on arguments and copying 'arg' when it begins by an upper case
+for a
+do
+ case $a in
+ [[A-Z]]*) BINDCONFIG="$BINDCONFIG '$a'" ;;
+ esac
+done
AC_SUBST(BINDCONFIG)
AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes")
fi
if test ! -x $ATF_BIN/atf-run -o ! -x $ATF_BIN/atf-report ; then
- AC_MSG_WARN([atf-run,atf-report not found, assuming they are in your path])
+ AC_MSG_WARN([atf-run/atf-report not found, assuming they are in your path])
fi
AC_SUBST(ATF_CFLAGS)
BINDCONFIG="$BINDCONFIG --with-randomdev=$use_randomdev"
fi
+BINDIOMUX="--disable-kqueue --disable-epoll --disable-devpoll"
+# check kqueue/epoll/devpoll alternative to select
+AC_ARG_ENABLE(kqueue,
+ AS_HELP_STRING([--enable-kqueue],[use BSD kqueue (default is no)]),
+ want_kqueue="$enableval", want_kqueue="no")
+if test "$want_kqueue" = "yes"; then
+ BINDIOMUX="--enable-kqueue"
+ AC_MSG_WARN([--enable-kqueue is not supported: it may lead to issues such as server looping])
+fi
+AC_ARG_ENABLE(epoll,
+ AS_HELP_STRING([--enable-epoll],[use Linux epoll (default is no)]),
+ want_epoll="$enableval", want_epoll="no")
+if test "$want_epoll" = "yes"; then
+ BINDIOMUX="--enable-epoll"
+ AC_MSG_WARN([--enable-epoll is not supported: it may lead to issues such as server looping])
+fi
+AC_ARG_ENABLE(devpoll,
+ AS_HELP_STRING([--enable-devpoll],[use /dev/poll (default is no)]),
+ want_devpoll="$enableval", want_devpoll="no")
+if test "$want_devpoll" = "yes"; then
+ BINDIOMUX="--enable-devpoll"
+ AC_MSG_WARN([--enable-devpoll is not supported: it may lead to issues such as server looping])
+fi
+AC_SUBST(BINDIOMUX)
+
+# general extra bind configure arguments
+AC_ARG_WITH(bind-extra-config,
+ AS_HELP_STRING([--with-bind-extra-config],[configure bind librairies
+ with some extra options (default is none)]),
+ use_xbindconfig="$withval", use_xbindconfig="")
+case "$use_xbindconfig" in
+yes|no|'')
+ ;;
+*)
+ BINDCONFIG="$BINDCONFIG $use_xbindconfig"
+ AC_MSG_WARN([Most options to bind configure are not supported when used by ISC DHCP])
+ ;;
+esac
+
# see if there is a "sa_len" field in our interface information structure
AC_CHECK_MEMBER(struct sockaddr.sa_len,
AC_DEFINE([HAVE_SA_LEN], [],
[AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])]
,, [#include <linux/if_packet.h>])
+# bind/Makefile.in is not from automake so we need 2 sets of variables
BINDDIR=
BINDSRCDIR=
+BINDBIND=
+BINDBUILD=
AC_ARG_WITH(libbind,
- AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
- (default is ./bind)]),
+ AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH]),
use_libbind="$withval", use_libbind="no")
case "$use_libbind" in
yes)
- BINDDIR="\${top_srcdir}/bind"
- BINDSRCDIR="\${top_srcdir}/bind"
+ AC_MSG_ERROR([PATH is required in --with-libbind=PATH])
;;
no)
BINDDIR="\${top_srcdir}/bind"
BINDSRCDIR="\${top_srcdir}/bind"
+ my_abs_srcdir=`cd $srcdir && pwd`
+ BINDBIND="${my_abs_srcdir}/bind"
+ if test ! -d "$srcdir/bind"; then
+ AC_MSG_ERROR([Where to find or build bind includes and libraries must be specified])
+ fi
+ if test -d "$srcdir/bind/bind9"; then
+ BINDBUILD="${my_abs_srcdir}/bind/bind9"
+ else
+ if test ! -f "$srcdir/bind/version.tmp"; then
+ AC_MSG_ERROR([Cannot find $srcdir/bind/version.tmp])
+ fi
+ . "$srcdir/bind/version.tmp"
+ bindversion=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
+ BINDBUILD="${my_abs_srcdir}/bind/bind-$bindversion"
+ fi
+ AC_CONFIG_FILES([$srcdir/bind/Makefile])
;;
*)
- BINDDIR="$use_libbind"
- if test ! -d "$srcdir/bind"; then
- # no bind directory, create it with a fake Makefile.in
- # (AC_CONFIG_FILES and top Makefile refer to it so
- # it must exits)
- mkdir $srcdir/bind
- cat > $srcdir/bind/Makefile.in << EOF
-# placeholder
-all check clean distclean distdir install uninstall:
-
-EOF
+ if test ! -d "$use_libbind"; then
+ AC_MSG_ERROR([Cannot find bind directory at $use_libbind])
+ fi
+ if test ! -d "$use_libbind/include"; then
+ AC_MSG_ERROR([Cannot find bind includes at $use_libbind/include])
fi
+ if test ! -d "$use_libbind/lib"; then
+ AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/lib])
+ fi
+ BINDDIR="$use_libbind"
;;
esac
AC_SUBST(BINDDIR)
AC_SUBST(BINDSRCDIR)
+AC_SUBST(BINDBIND)
+AC_SUBST(BINDBUILD)
# OpenLDAP support.
AC_ARG_WITH(ldap,
AC_CONFIG_FILES([
Makefile
- $srcdir/bind/Makefile
client/Makefile
client/tests/Makefile
common/Makefile
DHCP_VERSIONS="DHCPv4"
fi
-(cd $srcdir
- sh util/bindvar.sh
- if test $? -ne 0; then
- AC_MSG_ERROR([*** util/bindvar.sh failed])
- fi
-)
-if test $? -ne 0; then
- exit $?
-fi
-
cat > config.report << END
ISC DHCP source configure results:
# Configure and build the bind libraries for use by DHCP
-include ./version.tmp
-version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
+binddir=@BINDBIND@
+bindsrcdir=@BINDBUILD@
-# 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=
-include ./bindvar.tmp
-
-bindsrcdir=bind-${version}
-
-bindconfig = --disable-kqueue --disable-epoll --disable-devpoll \
- --without-openssl --without-libxml2 --enable-exportlib \
- --with-gssapi=no --enable-threads=no @BINDCONFIG@ \
+bindconfig = --without-openssl --without-libxml2 \
+ --without-gssapi --disable-threads \
+ --enable-exportlib \
--with-export-includedir=${binddir}/include \
- --with-export-libdir=${binddir}/lib
+ --with-export-libdir=${binddir}/lib \
+ @BINDIOMUX@ @BINDCONFIG@ --enable-full-report
@BIND_ATF_FALSE@cleandirs = ./lib ./include
@BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf
gunzip -c bind.tar.gz | tar xf - ; \
fi
- @if test -z "${GMAKE}"; then \
- echo "unable to find gmake" 1>&2 ; \
- exit 1; \
- fi
-
# Configure the export libraries
# Currently disable the epoll, devpoll and kqueue options as they
# don't interact well with the DHCP code.
else \
echo Building ATF support ; \
(cd ${bindsrcdir}/unit; \
- MAKE=${GMAKE} ${GMAKE} atf > ${binddir}/build.log ; \
+ $(MAKE) atf > ${binddir}/build.log ; \
cp -rp atf ${binddir}) ; \
fi
echo Building BIND Export libraries - this takes some time. ;\
(cd ${bindsrcdir}/lib/export ; \
echo building in `pwd` ; \
- MAKE=${GMAKE} ${GMAKE} >> ${binddir}/build.log) ; \
+ $(MAKE) >> ${binddir}/build.log) ; \
\
echo Installing BIND Export libraries to ${binddir}. ; \
(cd ${bindsrcdir}/lib/export ; \
- MAKE=${GMAKE} ${GMAKE} install > ${binddir}/install.log) ; \
+ $(MAKE) install > ${binddir}/install.log) ; \
fi
bind2-hostgen:
echo Bind export libraries already installed ; \
else \
echo Building BIND Export libraries - this takes some time. ;\
- (cd ${bindsrcdir}/lib/export/dns ; \
- echo building gen using ${BUILD_CC} in `pwd` ; \
- MAKE=${GMAKE} ${GMAKE} CC=${BUILD_CC} CFLAGS=${BUILD_CFLAGS} CPPFLAGS=${BUILD_CPPFLAGS} LDFLAGS=${BUILD_LDFLAGS} LIBS=${BUILD_LIBS} gen >> ${binddir}/build.log) ; \
+ (cd ${bindsrcdir}/lib/export/dns ; \
+ echo building gen using ${BUILD_CC} in `pwd` ; \
+ $(MAKE) CC=${BUILD_CC} CFLAGS=${BUILD_CFLAGS} CPPFLAGS=${BUILD_CPPFLAGS} LDFLAGS=${BUILD_LDFLAGS} LIBS=${BUILD_LIBS} gen >> ${binddir}/build.log) ; \
(cd ${bindsrcdir}/lib/export ; \
echo building in `pwd` ; \
- MAKE=${GMAKE} ${GMAKE} >> ${binddir}/build.log) ; \
+ $(MAKE) >> ${binddir}/build.log) ; \
\
echo Installing BIND Export libraries to ${binddir}. ; \
(cd ${bindsrcdir}/lib/export ; \
- MAKE=${GMAKE} ${GMAKE} install > ${binddir}/install.log) ; \
+ $(MAKE) install > ${binddir}/install.log) ; \
fi
clean:
+++ /dev/null
-#
-# Copyright (C) 2009-2012 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: Makefile.bind,v 1.8 2012/04/05 22:16:47 sar Exp $
-
-# bindvar.tmp is constructed by configure, it has the paths for
-# if GMAKE is blank the shell script couldn't find a gmake to use.
-# binddir=
-# GMAKE=
-include ./bindvar.tmp
-
-bindsrcdir=bind9
-
-all:
-# Extract the source from the tarball, if it hasn't been already.
- @if test -d ${bindsrcdir} ; then \
- echo ${bindsrcdir} already unpacked... ; \
- else \
- gunzip -c bind.tar.gz | tar xf - ; \
- fi
-
- @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.
-# 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); \
- 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 Bind export libraries already installed ; \
- else \
- echo Building BIND Export libraries - this takes some time. ;\
- (cd ${bindsrcdir}/lib/export ; \
- echo building in `pwd` ; \
- MAKE=${GMAKE} ${GMAKE} > ${binddir}/build.log) ; \
- \
- echo Installing BIND Export libraries to ${binddir}. ; \
- (cd ${bindsrcdir}/lib/export ; \
- MAKE=${GMAKE} ${GMAKE} install > ${binddir}/install.log) ; \
- fi
-
-clean:
- @echo Cleaning BIND export library.
- (cd ${bindsrcdir}; make -k clean )
- rm -rf ./lib ./include ./configure.log ./build.log \
- ./install.log
-
-# Include the following so that this Makefile is happy when the parent
-# tries to use them.
-
-distdir:
-
-distclean:
-
-install:
-
-check:
-
-uninstall:
if test -d bind/bind9/.git
then
- cp util/Makefile.git bind/Makefile.in
+ cp util/Makefile.bind.in bind/Makefile.in
rm -rf bind/include bind/lib
cd bind/bind9
test -f Makefile && make distclean
+++ /dev/null
-#!/bin/sh
-#
-# Copyright (C) 2009,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
-# 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: bindvar.sh,v 1.2 2009/12/02 20:43:52 sar Exp $
-
-# Create a file with the base directory and gmake path for
-# use by the bind/Makefile, we do this to minimize portability
-# concerns.
-
-# Bind requires a GNU style make to compile, if we can't find one
-# exit with a non-zero status, otherwise exit with success (i.e. 0)
-
-binddir=`pwd`
-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 [ -z $gmake ]
-then
- echo "$0: Building Bind requires a GNU style make tool and none were found in your path. We tried gmake, gnumake, and make."
- exit 1
-fi
-
-cat <<EOF > bind/bindvar.tmp
-binddir=$binddir/bind
-GMAKE=$gmake
-EOF
-
-exit 0