* [Buildroot] [RFC PATCH 0/3] package/dhcp
@ 2016-01-09 21:59 Doug Kehn
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 1/3] package/dhcp: bump version to 4.3.3 Doug Kehn
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Doug Kehn @ 2016-01-09 21:59 UTC (permalink / raw)
To: buildroot
This patch series bumps dhcp package to 4.3.3. I'm doing this as an RFC to get
feed back on the handling of the embedded bind tar-ball that now exists within
the dhcp package.
It looks to me that the embedded bind source is only used to build static
libraries for use by the dhcp source. I don't think these libraries are indented
to be used outside the dhcp package.
I built with an arm-buildroot-linux-gnueabihf toolchain and tested dhclient on a
custom TI-AM3352 based board.
Buildroot thread
http://lists.busybox.net/pipermail/buildroot/2016-January/149079.html
for related information.
Regards,
...doug
Doug Kehn (3):
package/dhcp: bump version to 4.3.3
package/dhcp: fix bind configure for cross-compiling
package/dhcp: ensure host cc is used for compiling gen
package/dhcp/0001-bind-configure.patch | 19 +++++++++++++++++++
package/dhcp/0002-dhcp-bind-host-gen.patch | 22 ++++++++++++++++++++++
package/dhcp/dhcp.hash | 4 ++--
package/dhcp/dhcp.mk | 21 ++++++++++++++++++++-
4 files changed, 63 insertions(+), 3 deletions(-)
create mode 100644 package/dhcp/0001-bind-configure.patch
create mode 100644 package/dhcp/0002-dhcp-bind-host-gen.patch
--
2.6.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [RFC PATCH 1/3] package/dhcp: bump version to 4.3.3
2016-01-09 21:59 [Buildroot] [RFC PATCH 0/3] package/dhcp Doug Kehn
@ 2016-01-09 21:59 ` Doug Kehn
2016-01-10 16:01 ` Arnout Vandecappelle
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 2/3] package/dhcp: fix bind configure for cross-compiling Doug Kehn
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 3/3] package/dhcp: ensure host cc is used for compiling gen Doug Kehn
2 siblings, 1 reply; 6+ messages in thread
From: Doug Kehn @ 2016-01-09 21:59 UTC (permalink / raw)
To: buildroot
Parallel builds are not supported because the bind libraries must be built
first.
The embedded bind configure is called as part of dhcp make instead of dhcp
configure. dhcp make environment is expanded to ensure bind configure has the
proper information.
The embedded bind tar-ball is extracted after the source so patches can be
applied to dhcp and bind before the package is built.
I noticed that host ar was being called for target archives. This is fixed up.
(The host ar is/was called for 4.1-ESV-R12 too.)
Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
---
package/dhcp/dhcp.hash | 4 ++--
package/dhcp/dhcp.mk | 21 ++++++++++++++++++++-
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/package/dhcp/dhcp.hash b/package/dhcp/dhcp.hash
index 84e3c63..ae770ce 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 ftp://ftp.isc.org/isc/dhcp/4.3-3/dhcp-4.3.3.tar.gz.sha256.asc
+sha256 553c4945b09b1c1b904c4780f34f72aaefa2fc8c6556715de0bc9d4e3d255ede dhcp-4.3.3.tar.gz
diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk
index c05e694..bab79c0 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
DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION)
DHCP_INSTALL_STAGING = YES
DHCP_LICENSE = ISC
@@ -25,6 +25,25 @@ DHCP_CONF_OPTS = \
--with-relay-pid-file=/var/run/dhcrelay.pid \
--with-relay6-pid-file=/var/run/dhcrelay6.pid
+DHCP_MAKE=$(MAKE1)
+
+DHCP_MAKE_ENV = \
+ GNU_TARGET_NAME=$(GNU_TARGET_NAME) \
+ GNU_HOST_NAME=$(GNU_HOST_NAME) \
+ BUILD_CC="$(HOSTCC)"
+
+define DHCP_EXTRACT_BIND
+ cd $(@D)/bind; tar -xvf bind.tar.gz
+endef
+DHCP_POST_EXTRACT_HOOKS += DHCP_EXTRACT_BIND
+
+define DHCP_TOOLCHAIN_AR_REF
+ for d in common dhcpctl omapip; do \
+ sed -i 's#^AR.*#AR = $(TARGET_AR)#' $(@D)/$$d/Makefile; \
+ done
+endef
+DHCP_PRE_BUILD_HOOKS += DHCP_TOOLCHAIN_AR_REF
+
ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y)
DHCP_CONF_OPTS += --enable-delayed-ack
endif
--
2.6.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [RFC PATCH 2/3] package/dhcp: fix bind configure for cross-compiling
2016-01-09 21:59 [Buildroot] [RFC PATCH 0/3] package/dhcp Doug Kehn
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 1/3] package/dhcp: bump version to 4.3.3 Doug Kehn
@ 2016-01-09 21:59 ` Doug Kehn
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 3/3] package/dhcp: ensure host cc is used for compiling gen Doug Kehn
2 siblings, 0 replies; 6+ messages in thread
From: Doug Kehn @ 2016-01-09 21:59 UTC (permalink / raw)
To: buildroot
Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
---
package/dhcp/0001-bind-configure.patch | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 package/dhcp/0001-bind-configure.patch
diff --git a/package/dhcp/0001-bind-configure.patch b/package/dhcp/0001-bind-configure.patch
new file mode 100644
index 0000000..41af039
--- /dev/null
+++ b/package/dhcp/0001-bind-configure.patch
@@ -0,0 +1,19 @@
+fix bind configure for cross-compiling
+
+Signed-of-by: Doug Kehn <rdkehn@yahoo.com>
+
+Index: dhcp-4.3.3/bind/Makefile.in
+===================================================================
+--- dhcp-4.3.3.orig/bind/Makefile.in
++++ dhcp-4.3.3/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=$(GNU_TARGET_NAME) --host=$(GNU_TARGET_NAME) \
++ --build=$(GNU_HOST_NAME) --with-randomdev=/dev/urandom
+
+ @BIND_ATF_FALSE at cleandirs = ./lib ./include
+ @BIND_ATF_TRUE at cleandirs = ./lib ./include ./atf
--
2.6.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [RFC PATCH 3/3] package/dhcp: ensure host cc is used for compiling gen
2016-01-09 21:59 [Buildroot] [RFC PATCH 0/3] package/dhcp Doug Kehn
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 1/3] package/dhcp: bump version to 4.3.3 Doug Kehn
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 2/3] package/dhcp: fix bind configure for cross-compiling Doug Kehn
@ 2016-01-09 21:59 ` Doug Kehn
2 siblings, 0 replies; 6+ messages in thread
From: Doug Kehn @ 2016-01-09 21:59 UTC (permalink / raw)
To: buildroot
This patch is derived from:
http://wiki.beyondlogic.org/patches/dhcp-4.3.0b1.bind_arm-linux-gnueabi.patch
Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
---
package/dhcp/0002-dhcp-bind-host-gen.patch | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 package/dhcp/0002-dhcp-bind-host-gen.patch
diff --git a/package/dhcp/0002-dhcp-bind-host-gen.patch b/package/dhcp/0002-dhcp-bind-host-gen.patch
new file mode 100644
index 0000000..0a33693
--- /dev/null
+++ b/package/dhcp/0002-dhcp-bind-host-gen.patch
@@ -0,0 +1,22 @@
+ensure host cc is used for compiling gen
+
+This patch is derived from:
+http://wiki.beyondlogic.org/patches/dhcp-4.3.0b1.bind_arm-linux-gnueabi.patch
+
+Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
+
+Index: dhcp-4.3.3/bind/bind-9.9.7-P3/lib/export/dns/Makefile.in
+===================================================================
+--- dhcp-4.3.3.orig/bind/bind-9.9.7-P3/lib/export/dns/Makefile.in
++++ dhcp-4.3.3/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. at O@: rbtdb.c
--
2.6.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [RFC PATCH 1/3] package/dhcp: bump version to 4.3.3
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 1/3] package/dhcp: bump version to 4.3.3 Doug Kehn
@ 2016-01-10 16:01 ` Arnout Vandecappelle
2016-01-10 16:52 ` rdkehn at yahoo.com
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2016-01-10 16:01 UTC (permalink / raw)
To: buildroot
On 09-01-16 22:59, Doug Kehn wrote:
[snip]
> +define DHCP_TOOLCHAIN_AR_REF
> + for d in common dhcpctl omapip; do \
> + sed -i 's#^AR.*#AR = $(TARGET_AR)#' $(@D)/$$d/Makefile; \
> + done
> +endef
> +DHCP_PRE_BUILD_HOOKS += DHCP_TOOLCHAIN_AR_REF
This should be a post-patch hook. Or if the Makefile is generated by the
configure step, a post-configure hook (but in that case it would be better to
patch the configure script to generate the right thing to begin with).
Oh yes, even better is an actual patch that can be upstreamed.
Regards,
Arnout
> +
> ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y)
> DHCP_CONF_OPTS += --enable-delayed-ack
> endif
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [RFC PATCH 1/3] package/dhcp: bump version to 4.3.3
2016-01-10 16:01 ` Arnout Vandecappelle
@ 2016-01-10 16:52 ` rdkehn at yahoo.com
0 siblings, 0 replies; 6+ messages in thread
From: rdkehn at yahoo.com @ 2016-01-10 16:52 UTC (permalink / raw)
To: buildroot
Hi Arnout,
On Sun, Jan 10, 2016 at 05:01:55PM +0100, Arnout Vandecappelle wrote:
> On 09-01-16 22:59, Doug Kehn wrote:
> [snip]
> > +define DHCP_TOOLCHAIN_AR_REF
> > + for d in common dhcpctl omapip; do \
> > + sed -i 's#^AR.*#AR = $(TARGET_AR)#' $(@D)/$$d/Makefile; \
> > + done
> > +endef
> > +DHCP_PRE_BUILD_HOOKS += DHCP_TOOLCHAIN_AR_REF
>
> This should be a post-patch hook. Or if the Makefile is generated by the
> configure step, a post-configure hook (but in that case it would be better to
> patch the configure script to generate the right thing to begin with).
>
> Oh yes, even better is an actual patch that can be upstreamed.
I first tried to patch all the relevant Makefile.in where 'AR = ar'
is hard coded so the patch could be submitted upstream; however, I
could never get the patch to take. Either configure or make would
fail. I'll be glad to try any suggestions.
Regards,
...doug
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-01-10 16:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-09 21:59 [Buildroot] [RFC PATCH 0/3] package/dhcp Doug Kehn
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 1/3] package/dhcp: bump version to 4.3.3 Doug Kehn
2016-01-10 16:01 ` Arnout Vandecappelle
2016-01-10 16:52 ` rdkehn at yahoo.com
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 2/3] package/dhcp: fix bind configure for cross-compiling Doug Kehn
2016-01-09 21:59 ` [Buildroot] [RFC PATCH 3/3] package/dhcp: ensure host cc is used for compiling gen Doug Kehn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox