From patchwork Fri Mar 9 22:41:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 884051 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=broadcom.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zyj6z20mYz9shy for ; Sat, 10 Mar 2018 09:42:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4DBB887EAD; Fri, 9 Mar 2018 22:41:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oMzrfSGukNvH; Fri, 9 Mar 2018 22:41:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B2048894B0; Fri, 9 Mar 2018 22:41:56 +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 1FC9F1C121F for ; Fri, 9 Mar 2018 22:41:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1C65D890BE for ; Fri, 9 Mar 2018 22:41:55 +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 Oir-HEVDEOPM for ; Fri, 9 Mar 2018 22:41:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by whitealder.osuosl.org (Postfix) with ESMTPS id 24D1889033 for ; Fri, 9 Mar 2018 22:41:54 +0000 (UTC) Received: from triton.mmayer.net ([96.48.174.102]) by shaw.ca with ESMTP id uQhzewpMYXziTuQi1eNPIU; Fri, 09 Mar 2018 15:41:53 -0700 X-Authority-Analysis: v=2.3 cv=X6B81lbe c=1 sm=1 tr=0 a=IfKG9KDHjPrX0SZ8gMoyrg==:117 a=IfKG9KDHjPrX0SZ8gMoyrg==:17 a=v2DPQv5-lfwA:10 a=Q-fNiiVtAAAA:8 a=nT-Ct6wqSoucKf3CD2cA:9 a=Fp8MccfUoT0GBdDC_Lng:22 Received: by triton.mmayer.net (Postfix, from userid 501) id B0D582032DC26A; Fri, 9 Mar 2018 14:41:51 -0800 (PST) From: Markus Mayer To: buildroot@buildroot.org Date: Fri, 9 Mar 2018 14:41:49 -0800 Message-Id: <20180309224149.20225-1-mmayer@broadcom.com> X-Mailer: git-send-email 2.14.1 X-CMAE-Envelope: MS4wfFhv2tSQRiYK6ziUTNco3vdICQf/3pEFIsEVYeprXRIpk5nuuiasyaIF+U/tLDrgaG+qZtK7H4o4pIzLbishs79EX4l2oDMQ7ydD0gU9U25RV6HrmUiE jYY3x+US8ImtbOBnBighOpErR8Am8zClU7yeWV27dhjpofh4qWEWqwMT29+WRobEMLBsxI2cSPXP9ZSERXZuSUejPqgYZp9eRn8= Subject: [Buildroot] [PATCH v2] package: dropbear: make PATH configurable X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Mayer MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Make the default PATH dropbear is using configurable. If not specified, it will continue to default to dropbear's DEFAULT_PATH. Signed-off-by: Markus Mayer --- Changes since v1: - Made regex safer + allow multiple spaces after #define + make sure there are spaces or tabs after DEFAULT_PATH package/dropbear/Config.in | 6 ++++++ package/dropbear/dropbear.mk | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in index 6700778161ba..0cc68d737d2c 100644 --- a/package/dropbear/Config.in +++ b/package/dropbear/Config.in @@ -55,4 +55,10 @@ config BR2_PACKAGE_DROPBEAR_LASTLOG Enable logging of dropbear access to lastlog. Notice that Buildroot does not generate lastlog by default. +config BR2_PACKAGE_DROPBEAR_PATH + string "dropbear default path" + help + Use the path specified here as dropbear's default path. + If not specified, dropbear will use "/usr/bin:/bin". + endif diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk index 01a1a07b7696..9da340670a70 100644 --- a/package/dropbear/dropbear.mk +++ b/package/dropbear/dropbear.mk @@ -51,6 +51,14 @@ define DROPBEAR_DISABLE_STANDALONE $(SED) 's:\(#define NON_INETD_MODE\):/*\1 */:' $(@D)/options.h endef +ifneq ($(BR2_PACKAGE_DROPBEAR_PATH),"") +define DROPBEAR_CUSTOM_PATH + $(SED) 's|^\(#define \+DEFAULT_PATH\)[ ]\+.*|\1 $(BR2_PACKAGE_DROPBEAR_PATH)|' $(@D)/options.h +endef + +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_CUSTOM_PATH +endif + define DROPBEAR_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/dropbear/dropbear.service \ $(TARGET_DIR)/usr/lib/systemd/system/dropbear.service