From patchwork Wed Oct 31 21:39:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 991718 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.136; helo=silver.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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42lhlt1tpPz9s8J for ; Thu, 1 Nov 2018 08:48:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C3E4520770; Wed, 31 Oct 2018 21:48:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5fodSZ4D3n5d; Wed, 31 Oct 2018 21:48:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id A8CED20775; Wed, 31 Oct 2018 21:48:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id AC0881BF5A8 for ; Wed, 31 Oct 2018 21:48:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A960F863A5 for ; Wed, 31 Oct 2018 21:48:00 +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 ZCj0wq1coa58 for ; Wed, 31 Oct 2018 21:47:56 +0000 (UTC) X-Greylist: delayed 00:08:07 by SQLgrey-1.7.6 Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) by hemlock.osuosl.org (Postfix) with ESMTPS id 4CFB486399 for ; Wed, 31 Oct 2018 21:47:56 +0000 (UTC) Received: from tethys.mmayer.net ([70.68.144.247]) by shaw.ca with ESMTP id HyDLgvCQ4dRKIHyDMgsB1u; Wed, 31 Oct 2018 15:39:49 -0600 X-Authority-Analysis: v=2.3 cv=aY6wYigt c=1 sm=1 tr=0 a=5Vvn7CJLxh9yo+qVPaC6cg==:117 a=5Vvn7CJLxh9yo+qVPaC6cg==:17 a=smKx5t2vBNcA:10 a=Q-fNiiVtAAAA:8 a=5xqabCzo_pDJ41othxwA:9 a=Fp8MccfUoT0GBdDC_Lng:22 Received: by tethys.mmayer.net (Postfix, from userid 501) id C50DC300398E50; Wed, 31 Oct 2018 14:39:31 -0700 (PDT) From: Markus Mayer To: buildroot@buildroot.org Date: Wed, 31 Oct 2018 14:39:30 -0700 Message-Id: <20181031213930.49837-1-mmayer@broadcom.com> X-Mailer: git-send-email 2.17.0 X-CMAE-Envelope: MS4wfAlISzAWPdhx648UooZTt6CeuC49dQG2V+bRcvocVu30GleBaNg5/L5siL/xfqAIN4ExLGrsAZuUXsi3nEL46xfSwaKbIZS9TDIZMwT08l52mcsz0VsB qI5AyBF4KUUGtLsLOgfC0ydewLSyoXAoRXbDYHQhNLMrvO+JPY5ksuJgsjIu/f3e3lJSSnVivnngGIIel1KwXdiZvubkN9L5hoNfFsfuPk3a/gQuKN9g1Ds1 Subject: [Buildroot] [PATCH] Config.in: add BR2_DL_DIR_OPTS X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 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" Provide a simple mechanism to pass extra arguments to "mkdir" when creating download directories. This can be helpful if one needs the download directories to be writable multiple users ("shared download cache"). Signed-off-by: Markus Mayer --- Config.in | 14 ++++++++++++++ package/pkg-download.mk | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Config.in b/Config.in index 42cdf7a3ebdc..0442d8403b4a 100644 --- a/Config.in +++ b/Config.in @@ -214,6 +214,20 @@ config BR2_DL_DIR The default is $(TOPDIR)/dl +config BR2_DL_DIR_OPTS + string "Options for mkdir when it creates BR2_DL_DIR" + default "" + help + Specify command line options for the mkdir command when it + creates BR2_DL_DIR. + + For example, this can be used to specify directory permissions + (say, "-m 0775") for directories inside BR2_DL_DIR. One would + want this if the download directory is a shared "cache" for + multiple users, so everybody can write to these directories. + + The default empty (no additional options). + config BR2_HOST_DIR string "Host dir" default "$(BASE_DIR)/host" diff --git a/package/pkg-download.mk b/package/pkg-download.mk index 73ea2a69f829..d6bfe2bb06d0 100644 --- a/package/pkg-download.mk +++ b/package/pkg-download.mk @@ -91,7 +91,7 @@ endif endif define DOWNLOAD - $(Q)mkdir -p $($(PKG)_DL_DIR) + $(Q)mkdir $(BR2_DL_DIR_OPTS) -p $($(PKG)_DL_DIR) $(Q)$(EXTRA_ENV) $(FLOCK) $(DL_WRAPPER) \ -c '$($(PKG)_DL_VERSION)' \ -d '$($(PKG)_DL_DIR)' \