From patchwork Sat Oct 22 13:03:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 685496 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]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t1p2M1rKJz9t1P for ; Sun, 23 Oct 2016 16:32:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BF8B98BB82; Sun, 23 Oct 2016 05:32:09 +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 jdyYN24MuLxI; Sun, 23 Oct 2016 05:32:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3266F86585; Sun, 23 Oct 2016 05:32:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4C77D1CF8B5 for ; Sun, 23 Oct 2016 05:32:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4096792D25 for ; Sun, 23 Oct 2016 05:32:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uihjlJ5FOIWI for ; Sun, 23 Oct 2016 05:32:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (up.free-electrons.com [163.172.77.33]) by whitealder.osuosl.org (Postfix) with ESMTP id 15D3E97CA1 for ; Sat, 22 Oct 2016 13:03:21 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 177B920C30; Sat, 22 Oct 2016 15:03:19 +0200 (CEST) Received: from localhost (LFbn-1-6691-76.w90-120.abo.wanadoo.fr [90.120.129.76]) by mail.free-electrons.com (Postfix) with ESMTPSA id E501320788; Sat, 22 Oct 2016 15:03:18 +0200 (CEST) From: Thomas Petazzoni To: buildroot@buildroot.org Date: Sat, 22 Oct 2016 15:03:17 +0200 Message-Id: <1477141397-22592-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.7.4 Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH] rp-pppoe: pass the appropriate path for various tools 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" The rp-pppoe configure script uses AC_PATH_PROG() to find the path of a number of tools on the build machine. But in fact, those paths are not used to call the tools on the build machine, but rather to replace variables in scripts that are executed in the target. Due to this, if those tools on the build machine are not located at the same place as their equivalent in the target, the scripts will fail to run. To address this, we pass the necessary cache variables to override the autoconf checks. The path from pppd has been taken from the build result of the pppd package. The path for setsid, id and echo have been taken from the build result of Busybox, assuming that full-blown variants of those tools would be installed at the same location. Fixes bug #8811. Signed-off-by: Thomas Petazzoni --- package/rp-pppoe/rp-pppoe.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/rp-pppoe/rp-pppoe.mk b/package/rp-pppoe/rp-pppoe.mk index 4306254..99d231e 100644 --- a/package/rp-pppoe/rp-pppoe.mk +++ b/package/rp-pppoe/rp-pppoe.mk @@ -15,8 +15,16 @@ RP_PPPOE_TARGET_SCRIPTS = pppoe-connect pppoe-init pppoe-setup pppoe-start \ pppoe-status pppoe-stop RP_PPPOE_MAKE_OPTS = PLUGIN_DIR=/usr/lib/pppd/$(PPPD_VERSION) RP_PPPOE_CONF_OPTS = --disable-debugging + +# The pppd, echo, setsid and id paths must be the ones on the +# target. Indeed, the result of these checks is used to replace +# variables in scripts that are installed in the target. RP_PPPOE_CONF_ENV = \ rpppoe_cv_pack_bitfields=normal \ + ac_cv_path_PPPD=/usr/sbin/pppd \ + ac_cv_path_ECHO=/bin/echo \ + ac_cv_path_SETSID=/usr/bin/setsid \ + ac_cv_path_ID=/usr/bin/id \ PPPD_H=$(PPPD_DIR)/pppd/pppd.h define RP_PPPOE_INSTALL_TARGET_CMDS