From: Sergey Matyukevich <geomatsi@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 1/1] package/dhcp: add host-gawk to global dependencies and build environment
Date: Fri, 21 May 2021 00:52:24 +0300 [thread overview]
Message-ID: <20210520215224.2749900-1-geomatsi@gmail.com> (raw)
DHCP package may silently fail to install binaries to the target image.
The problem occurs when buildroot output/host and build server provide
different flavors of awk. For instance, mawk on build server and gawk
in buildroot output/host. In this case isc-dhcp configure script detects
gawk in output/host and generates Makefiles specifying gawk without
absolute path. During Buildroot installation phase, those Makefiles
are used to install dhcp binaries. They attempt to use gawk without
absolute path. However build host does not have gawk.
To resolve the issue add host-gawk to dependencies and specify absolute
path to host-gawk in dhcp configure script using DHCP_CONF_ENV.
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
Changes v1 -> v2 (after review and tests by Thomas Petazzoni):
- suggested change is the same
- root cause is figured out and commit message updated
Changes v2 -> v3 (after patch by Heiko Thiery)
- keep host-gawk in global dependencies
The root cause is explained in the commit message. Here are the
steps to reproduce the issue on the up-to-date master branch in
Buildroot Docker image from support/docker/Dockerfile:
- start from default qemu_x86_defconfig
- enable isc-dhcp server and client
As a result, neither dhclient nor dhcpd are installed to the target.
Note that Buildroot Docker image provides mawk. On the other hand,
dhcp package (with server enabled) pulls host-gawk as a dependency.
So build host awk (mawk) differs from buildroot host awk (gawk).
To reproduce the same issue only for dhclient, uclibc can be
replaced by glibc, which also pulls host-gawk as a dependency.
Regards,
Sergey
package/dhcp/dhcp.mk | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk
index 8d7157f357..db58870f88 100644
--- a/package/dhcp/dhcp.mk
+++ b/package/dhcp/dhcp.mk
@@ -9,7 +9,7 @@ DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION)
DHCP_INSTALL_STAGING = YES
DHCP_LICENSE = MPL-2.0
DHCP_LICENSE_FILES = LICENSE
-DHCP_DEPENDENCIES = bind
+DHCP_DEPENDENCIES = bind host-gawk
DHCP_CPE_ID_VENDOR = isc
# use libtool-enabled configure.ac
@@ -22,6 +22,8 @@ DHCP_CONF_ENV = \
-D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"' \
CFLAGS='$(TARGET_CFLAGS) -DISC_CHECK_NONE=1'
+DHCP_CONF_ENV += ac_cv_prog_AWK=$(HOST_DIR)/bin/gawk
+
DHCP_CONF_OPTS = \
--with-libbind=$(STAGING_DIR)/usr \
--with-randomdev=/dev/random \
@@ -55,7 +57,6 @@ define DHCP_INSTALL_LIBS
endef
ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
-DHCP_DEPENDENCIES += host-gawk
define DHCP_INSTALL_CTL_LIBS
$(MAKE) -C $(@D)/dhcpctl install-exec DESTDIR=$(TARGET_DIR)
endef
--
2.31.1
next reply other threads:[~2021-05-20 21:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 21:52 Sergey Matyukevich [this message]
2021-05-21 8:02 ` [Buildroot] [PATCH v3 1/1] package/dhcp: add host-gawk to global dependencies and build environment Arnout Vandecappelle
2021-05-23 18:38 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210520215224.2749900-1-geomatsi@gmail.com \
--to=geomatsi@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox