From patchwork Mon Jan 25 02:33:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Kehn X-Patchwork-Id: 572552 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 49A24140662 for ; Mon, 25 Jan 2016 13:34:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=yahoo.com header.i=@yahoo.com header.b=oRCgF+X9; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8877486AB0; Mon, 25 Jan 2016 02:34:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xkSIGlyj2y-M; Mon, 25 Jan 2016 02:34:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3CFF684218; Mon, 25 Jan 2016 02:34:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id F3E4B1C1E7E for ; Mon, 25 Jan 2016 02:34:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id EF5C68406F for ; Mon, 25 Jan 2016 02:34:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id egvsLYAese5L for ; Mon, 25 Jan 2016 02:34:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm3-vm2.bullet.mail.ne1.yahoo.com (nm3-vm2.bullet.mail.ne1.yahoo.com [98.138.91.19]) by fraxinus.osuosl.org (Postfix) with ESMTPS id BE8C184218 for ; Mon, 25 Jan 2016 02:34:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1453689249; bh=2n3q6Esf0yZNNlLNcJ6ZaknbXF826GY75E5qjDk5wVY=; h=From:To:Cc:Subject:Date:From:Subject; b=oRCgF+X9BtgLIDX+hRsJ+0COQRY3Nm+J3gTfy7KKn3NaWDFd1kEhCD4DUI/AICLxL17ISdl6k4W4ocHqRmK3XhF4hA7KqEQWtqtqeqZhoAwMIN/1Lz1dH/A0rEOZ3wa4da+a9oiPy2IxSJrYYVcommGz7BtVdIYyBUzZI8eDuoOmafC4EQBMowDZnf5tpwYmnGg1jDdwbyNk3/MFUFQ1vAfFTd7wq5WWEgRJvpUsPSKAJP4z6tyKqJKq9++H1acc4FTJuPp/QExOMCvcDwKxk+cLEMLv6vWJfIsQcUJChHxZJPH4APWW81s8g2o0J1u48O/OAhgodoKFgCek5O6Pug== Received: from [98.138.226.179] by nm3.bullet.mail.ne1.yahoo.com with NNFMP; 25 Jan 2016 02:34:09 -0000 Received: from [98.138.84.39] by tm14.bullet.mail.ne1.yahoo.com with NNFMP; 25 Jan 2016 02:34:09 -0000 Received: from [127.0.0.1] by smtp107.mail.ne1.yahoo.com with NNFMP; 25 Jan 2016 02:34:09 -0000 X-Yahoo-Newman-Id: 158545.60590.bm@smtp107.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: yqmjEp4VM1nk..YbHX5P9OtzMd7ZN1TqI4XtFVCmPUgKxBr krZ_bv3wTjex_sVFGBpEpLIDBjf9cSjuaoX5NkO7yqj42nu4SsUN82JVYHU1 QbnIktCEO6PxDHT45az0.OhWAAwJHaDQ41EeToGuQR1q_iQPCNqstyD5hd_0 eNIu0YtSGuDEoRwoAad17NsYPGFSaxn2nyrpy2.0gDBT.OSzy9dI6Nm1bexi MKyte_9x9T50azlQu7btnPVcHx9ov8XJy9XVFDPN4Rh4KJmiAzqObGRPfO4f Dxn1pHcgXZFkUhngcNCuQOhoV3FdqiFqBL51oQinY4ptyWBYtmVie3QgxrdR BDtNPgQ_oriPXzl340X_MCx.2cET1ZVqUDRCtIvqFyJA7HtijPrEQDiQ8w6d q2UnoqLr2OSgGFpYmywoUBXSgxR7dEwFCb4FOSedC8kEJJWMG1HyirmauISM 82Pi6XkmKu4M6N4fSdw9beIIxaBWEy83E.1LGmaomGnRTGZJnX7azG8JJpfd EspyB5A6Cjh5i9Q543RX6dSlXVlrHobcTpqbZ X-Yahoo-SMTP: tVp.douswBADms9I1_pvnFcs0w-- From: Doug Kehn To: buildroot@buildroot.org Date: Sun, 24 Jan 2016 20:33:59 -0600 Message-Id: <1453689239-1215-1-git-send-email-rdkehn@yahoo.com> X-Mailer: git-send-email 2.7.0 Cc: ricardo.martincoski@gmail.com Subject: [Buildroot] [PATCH v5 1/1] package/dhcp: bump version to 4.3.3-P1 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" bind source tar-ball is now embedded into the dhcp source. The embedded bind tar-ball is extracted after the dhcp source so cross compiling patches can be applied to the dhcp and bind before the package is built. The embedded bind configure is called as part of dhcp make instead of dhcp configure; therefore, make is called from a POST_CONFIGURE_HOOK to explicitly configure bind. bind is built from a PRE_BUILD_HOOK using $(MAKE1) because it would not build in parallel. 0001-cross-compile.patch has been submitted upstream as part of a cross compiling enhancement suggestion to dhcp-suggest@isc.org. Reference ISC-Bugs #41502. Buildroot thread http://lists.busybox.net/pipermail/buildroot/2016-January/149079.html has related information. Signed-off-by: Doug Kehn Cc: Arnout Vandecappelle Cc: Ricardo Martincoski --- Changes v4 -> v5 - update hash reference (suggested by Arnout) - expand comments (suggested by Arnout) Changes v3 -> v4 - consolidate into single patch (suggested by Arnout) - separate into POST_CONFIGURE_HOOK & PRE_BUILD_HOOK (suggested by Arnout) Changes v2 -> v3 - removed RFC tag - updated version from 4.3.3 to 4.3.3-P1 (suggested by Richardo) - external toolchain support (suggested by Richardo) Changes v1 -> v2 - removed DHCP_PRE_BUILD_HOOKS in favor of patch (suggested by Arnout) --- package/dhcp/0001-cross-compile.patch | 200 ++++++++++++++++++++++++++++++++++ package/dhcp/dhcp.hash | 4 +- package/dhcp/dhcp.mk | 31 +++++- 3 files changed, 231 insertions(+), 4 deletions(-) create mode 100644 package/dhcp/0001-cross-compile.patch diff --git a/package/dhcp/0001-cross-compile.patch b/package/dhcp/0001-cross-compile.patch new file mode 100644 index 0000000..61c51d2 --- /dev/null +++ b/package/dhcp/0001-cross-compile.patch @@ -0,0 +1,200 @@ +cross compile support integration + +dns/Makefile.in patch is derived from: +http://wiki.beyondlogic.org/patches/dhcp-4.3.0b1.bind_arm-linux-gnueabi.patch + +This patch is submitted upstream as part of a cross compiling enhancement +suggestion to dhcp-suggest@isc.org. Reference ISC-Bugs #41502. + +Signed-off-by: Doug Kehn + +Index: dhcp-4.3.3-P1/bind/Makefile.in +=================================================================== +--- dhcp-4.3.3-P1.orig/bind/Makefile.in ++++ dhcp-4.3.3-P1/bind/Makefile.in +@@ -30,7 +30,9 @@ bindconfig = --disable-kqueue --disable- + --without-openssl --without-libxml2 --enable-exportlib \ + --with-gssapi=no --enable-threads=no @BINDCONFIG@ \ + --with-export-includedir=${binddir}/include \ +- --with-export-libdir=${binddir}/lib ++ --with-export-libdir=${binddir}/lib \ ++ --target=@target_alias@ --host=@host_alias@ \ ++ --build=@build_alias@ + + @BIND_ATF_FALSE@cleandirs = ./lib ./include + @BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf +Index: dhcp-4.3.3-P1/bind/bind-9.9.7-P3/lib/export/dns/Makefile.in +=================================================================== +--- dhcp-4.3.3-P1.orig/bind/bind-9.9.7-P3/lib/export/dns/Makefile.in ++++ dhcp-4.3.3-P1/bind/bind-9.9.7-P3/lib/export/dns/Makefile.in +@@ -168,7 +168,9 @@ code.h: gen + ./gen -s ${srcdir} > code.h + + gen: ${srcdir}/gen.c +- ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS} ++ ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \ ++ ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c \ ++ ${BUILD_LIBS} + + #We don't need rbtdb64 for this library + #rbtdb64.@O@: rbtdb.c +Index: dhcp-4.3.3-P1/common/Makefile.in +=================================================================== +--- dhcp-4.3.3-P1.orig/common/Makefile.in ++++ dhcp-4.3.3-P1/common/Makefile.in +@@ -99,7 +99,7 @@ CONFIG_HEADER = $(top_builddir)/includes + CONFIG_CLEAN_FILES = + CONFIG_CLEAN_VPATH_FILES = + LIBRARIES = $(noinst_LIBRARIES) +-AR = ar ++AR = @AR@ + ARFLAGS = cru + AM_V_AR = $(am__v_AR_@AM_V@) + am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +Index: dhcp-4.3.3-P1/configure +=================================================================== +--- dhcp-4.3.3-P1.orig/configure ++++ dhcp-4.3.3-P1/configure +@@ -658,6 +658,7 @@ CPPFLAGS + LDFLAGS + CFLAGS + CC ++AR + host_os + host_vendor + host_cpu +@@ -4459,7 +4460,7 @@ if test "$GCC" = "yes"; then + fi + + # We can have some flags to pass to bind configure +-BINDCONFIG= ++BINDCONFIG=$BINDCONFIG + + + # POSIX doesn't include the IPv6 Advanced Socket API and glibc hides +@@ -4925,7 +4926,99 @@ $as_echo "$ac_cv_safe_to_define___extens + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + ++# begin - AR ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. ++set dummy ${ac_tool_prefix}ar; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_AR+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$AR"; then ++ ac_cv_prog_AR="$AR" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_AR="${ac_tool_prefix}ar" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++AR=$ac_cv_prog_AR ++if test -n "$AR"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 ++$as_echo "$AR" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_AR"; then ++ ac_ct_AR=$AR ++ # Extract the first word of "ar", so it can be a program name with args. ++set dummy ar; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_AR+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_AR"; then ++ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_AR="ar" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_AR=$ac_cv_prog_ac_ct_AR ++if test -n "$ac_ct_AR"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 ++$as_echo "$ac_ct_AR" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi + ++ if test "x$ac_ct_AR" = x; then ++ AR=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ AR=$ac_ct_AR ++ fi ++else ++ AR="$ac_cv_prog_AR" ++fi ++# end - AR + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +Index: dhcp-4.3.3-P1/dhcpctl/Makefile.in +=================================================================== +--- dhcp-4.3.3-P1.orig/dhcpctl/Makefile.in ++++ dhcp-4.3.3-P1/dhcpctl/Makefile.in +@@ -131,7 +131,7 @@ am__uninstall_files_from_dir = { \ + am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" + LIBRARIES = $(lib_LIBRARIES) +-AR = ar ++AR = @AR@ + ARFLAGS = cru + AM_V_AR = $(am__v_AR_@AM_V@) + am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +Index: dhcp-4.3.3-P1/omapip/Makefile.in +=================================================================== +--- dhcp-4.3.3-P1.orig/omapip/Makefile.in ++++ dhcp-4.3.3-P1/omapip/Makefile.in +@@ -129,7 +129,7 @@ am__uninstall_files_from_dir = { \ + } + am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" + LIBRARIES = $(lib_LIBRARIES) +-AR = ar ++AR = @AR@ + ARFLAGS = cru + AM_V_AR = $(am__v_AR_@AM_V@) + am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) diff --git a/package/dhcp/dhcp.hash b/package/dhcp/dhcp.hash index 84e3c63..1baea54 100644 --- a/package/dhcp/dhcp.hash +++ b/package/dhcp/dhcp.hash @@ -1,2 +1,2 @@ -# Verified from ftp://ftp.isc.org/isc/dhcp/4.1-ESV-R12/dhcp-4.1-ESV-R12.tar.gz.sha256.asc -sha256 53265d1bf5e2073379df03c73a1a34d38a904307609c0f9cb77223912e753e5f dhcp-4.1-ESV-R12.tar.gz +# Verified from https://ftp.isc.org/isc/dhcp/4.2.3-P1/dhcp-4.2.3-P1.tar.gz.sha256.asc +sha256 c11e896dffa1bfbc49462965d3f6dec45534e34068603546d9a236f2aa669921 dhcp-4.3.3-P1.tar.gz diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk index c05e694..c39c2ad 100644 --- a/package/dhcp/dhcp.mk +++ b/package/dhcp/dhcp.mk @@ -4,7 +4,7 @@ # ################################################################################ -DHCP_VERSION = 4.1-ESV-R12 +DHCP_VERSION = 4.3.3-P1 DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION) DHCP_INSTALL_STAGING = YES DHCP_LICENSE = ISC @@ -12,7 +12,8 @@ DHCP_LICENSE_FILES = LICENSE DHCP_CONF_ENV = \ CPPFLAGS='-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \ -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"' \ - ac_cv_file__dev_random=yes + ac_cv_file__dev_random=yes \ + BINDCONFIG='--with-randomdev=/dev/random' DHCP_CONF_OPTS = \ --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \ @@ -25,6 +26,32 @@ DHCP_CONF_OPTS = \ --with-relay-pid-file=/var/run/dhcrelay.pid \ --with-relay6-pid-file=/var/run/dhcrelay6.pid +# The source for the bind libraries used by dhcp are embedded in the dhcp source +# as a tar-ball. Extract the bind source to allow any patches to be applied +# during the patch phase. +define DHCP_EXTRACT_BIND + cd $(@D)/bind; tar -xvf bind.tar.gz +endef +DHCP_POST_EXTRACT_HOOKS += DHCP_EXTRACT_BIND + +# bind configure is called as part of dhcp make instead of dhcp configure. +# Configure bind via appropriate make target, ensuring needed options/variables +# are available. +DHCP_BIND_CONF_ENV = \ + $(TARGET_CONFIGURE_OPTS) \ + BUILD_CC="$(HOSTCC)" + +define DHCP_BIND_CONFIGURE + $(DHCP_BIND_CONF_ENV) $(MAKE1) -C $(@D)/bind bind1 +endef +DHCP_POST_CONFIGURE_HOOKS += DHCP_BIND_CONFIGURE + +# bind make does not supported parallel builds, build bind separately. +define DHCP_BIND_MAKE + $(DHCP_MAKE_ENV) $(MAKE1) -C $(@D)/bind +endef +DHCP_PRE_BUILD_HOOKS += DHCP_BIND_MAKE + ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y) DHCP_CONF_OPTS += --enable-delayed-ack endif