From patchwork Sat Jul 13 14:43:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1960173 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLrms4zVPz1xqj for ; Sun, 14 Jul 2024 00:43:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B13DC4068B; Sat, 13 Jul 2024 14:43:23 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id a6HlVKrhInAO; Sat, 13 Jul 2024 14:43:22 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6595D406C7 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 6595D406C7; Sat, 13 Jul 2024 14:43:22 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 7D5551BF41B for ; Sat, 13 Jul 2024 14:43:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 78048606A7 for ; Sat, 13 Jul 2024 14:43:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id y7Z9jp_k4zkX for ; Sat, 13 Jul 2024 14:43:20 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::336; helo=mail-wm1-x336.google.com; envelope-from=arnout.vandecappelle@essensium.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 6499A606B9 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6499A606B9 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6499A606B9 for ; Sat, 13 Jul 2024 14:43:20 +0000 (UTC) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42793d4abbbso19851295e9.2 for ; Sat, 13 Jul 2024 07:43:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720881798; x=1721486598; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K11KPqcI1T7PRvqnQN4WLUXSHOnGtpOMufPMoKsHQxA=; b=AgGo0M0BsJ8+E8PgBiwKqgDbYL26X8/1lHARXGB9M9r5GLvc7hbl3Ss3Hz3/CjBNgO +czt/dlJwX3hiuMpx6yPyKtfpFQ3Ggqp5O2Exr/lj1dxuqORezobYm8rzP/TyOd+mSQB mnGOYgKD3EUl1GOD5fQSt46cSSP+ECRYseWVJMgQMB4h/ye09jWrTY4Xoqkdir3dRakW Rh4174vHWjzmQ3QLFoTCdUjL8kTAzwwXIFv3nUJin6y4nKKD7GEZwewZkB8X9dTBUBJ3 F4pb8Uj7sP/O4htvU5SAiOLG3px/+fI1Qb9CV6mq43bYdb5r2koBsMXo7gnOijBrDd0v PssQ== X-Gm-Message-State: AOJu0Yyx9va5NingjPGvewWYaov3ofFIY/svr/L9vbdZyecAt+fDxaWT qsUrsV4IowgfjuGH4r/bjgRYv2JkyR2OtTQHGN0/IARig62P/A2NH3F9FWDhqQBy2EoYlUU6R3W 81uI= X-Google-Smtp-Source: AGHT+IG+fBQwBmgnbvBaJX/TmhTEgh20KGDFAnDmPxyMdsllPkRz0yUYUi1F8xG1Uchl3E7jb/8Lpg== X-Received: by 2002:a05:600c:4c8a:b0:426:6e93:4ad0 with SMTP id 5b1f17b1804b1-426707d7977mr101914595e9.17.1720881798217; Sat, 13 Jul 2024 07:43:18 -0700 (PDT) Received: from arnoutx1.home (2a01cb05949d5800b48198b5611fe783.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:b481:98b5:611f:e783]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f276b14sm57610835e9.23.2024.07.13.07.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jul 2024 07:43:17 -0700 (PDT) To: buildroot@buildroot.org Date: Sat, 13 Jul 2024 16:43:14 +0200 Message-ID: <20240713144316.403640-1-arnout@mind.be> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1720881798; x=1721486598; darn=buildroot.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=K11KPqcI1T7PRvqnQN4WLUXSHOnGtpOMufPMoKsHQxA=; b=XpeUlsKgWxn5xF61MmWF5Xy1gQ+lPRimxNYDJbKEd6gHZvc2o/0T4c/TL/7d8O8I8y CFyAbQ1MUJuxfJvr3W3XDmqZU7HBXy9jv/2s0HLT4nl+VEHTRvePng1Y5XEbN0rfH8ab WiotumucMR+ZOExjkZG5cZofwuz88pzTGiJDIbc2UWraMfwHVVbMf6ERPOatZm0hJ480 LmoDr7c43ShMPiANJvi5D73k/jCRjzxfOuMSAh7hby/Kjh7sWkoRiCfqG/BCLL4HUTyJ GcXPPZLRLziHZDo0bGzhaISaWtv4E20HtR0kXH5HPuFF/4eY3S4zHHW+GJh+0P1JB/Gz G2Dg== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=mind.be X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=XpeUlsKg Subject: [Buildroot] [PATCH 1/3] utils/docker-run: allow to specify extra mount points to propagate X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: Arnout Vandecappelle via buildroot From: Arnout Vandecappelle Reply-To: Arnout Vandecappelle Cc: "Fiona Klute \(WIWA\)" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Sometimes, the build needs access to directories which are outside of the current directory, e.g. for pre-downloaded toolchains, local kernel sources, OVERRIDE_SRCDIR, BR2_EXTERNALs, ... We need these to be mounted into the container to be able to perform the build. Since there is no generic way to find out all the directories that are needed, we need a manual mechanism. We choose the environment variable EXTRA_MOUNTPOINTS which contains a space-separated list of directories (or files) to mount. We choose an environment variable to avoid having to parse command-line arguments to docker-run. Update the terse documentation in utils/readme.txt with this information. Signed-off-by: Arnout Vandecappelle Reviewed-by: Brandon Maier --- utils/docker-run | 5 +++++ utils/readme.txt | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/utils/docker-run b/utils/docker-run index 1adb02d74e..3bb7b6a41b 100755 --- a/utils/docker-run +++ b/utils/docker-run @@ -90,6 +90,11 @@ if [ "${BR2_DL_DIR}" ]; then docker_opts+=( --env BR2_DL_DIR ) fi +if [ -n "${EXTRA_MOUNTPOINTS:-}" ]; then + read -r -a extra_mountpoints <<<"${EXTRA_MOUNTPOINTS}" + mountpoints+=( "${extra_mountpoints[@]}" ) +fi + # shellcheck disable=SC2013 # can't use while-read because of the assignment for dir in $(printf '%s\n' "${mountpoints[@]}" |LC_ALL=C sort -u); do docker_opts+=( --mount "type=bind,src=${dir},dst=${dir}" ) diff --git a/utils/readme.txt b/utils/readme.txt index 6488d13c75..0cc665e478 100644 --- a/utils/readme.txt +++ b/utils/readme.txt @@ -21,7 +21,10 @@ check-package docker-run a script that runs a command (like make check-package) inside the buildroot CI docker container; pass no command to get an interactive - shell. + shell. If additional directories need to be accessible inside the + container, specify them with the environment variable EXTRA_MOUNTPOINTS. + The buildroot directory, the current directory, and the download + directory are automatically propagated. genrandconfig a script that generates a random configuration, used by the autobuilders From patchwork Sat Jul 13 14:43:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1960174 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLrmz0Gzyz1xqj for ; Sun, 14 Jul 2024 00:43:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 1DAFC406C7; Sat, 13 Jul 2024 14:43:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Y-hhHxaQCUGX; Sat, 13 Jul 2024 14:43:26 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 70F7241558 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 70F7241558; Sat, 13 Jul 2024 14:43:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C94EF1BF41B for ; Sat, 13 Jul 2024 14:43:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C0C5A814BB for ; Sat, 13 Jul 2024 14:43:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id jea8d-RDnDCj for ; Sat, 13 Jul 2024 14:43:21 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::32b; helo=mail-wm1-x32b.google.com; envelope-from=arnout.vandecappelle@essensium.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org ECDEA81467 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org ECDEA81467 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by smtp1.osuosl.org (Postfix) with ESMTPS id ECDEA81467 for ; Sat, 13 Jul 2024 14:43:20 +0000 (UTC) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-427a0efdb9bso9579555e9.0 for ; Sat, 13 Jul 2024 07:43:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720881799; x=1721486599; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sRnbdR+1QbJntJ5uGFnk75Kpm7L8GFDuujgDYOf8lcU=; b=JDZLxUWWuZOhDT+gbjeWZaJW2GCcFJC9E5FB4Nzd2vo8WTZSU3khez0Ot0Xamw+hHL Zpr4rMs/FAoxPDgqGyzNLd4DZQicHT8+BgHuCsHO321H9ao9qkkssjI1V8Ms9D1w7V24 rRe9UtUkI3cgUWbmICdb1xOhRf6aInaWfyfmqge3hXF+DgQq2GDb3SOg7GP9oHjgAp8N ZAwFctINI8coonIuj2ghbozwTCBwjRsImWLQx/EGjZ3ayd3TKs40MCPhi9Jx8XVw9klN nufjGiwXul9Kg61iKKK2zHNKYxq9QPdh/TWB5YYbdX91rYqL4zONRhpt/S0KxRwdTU6b CrPg== X-Gm-Message-State: AOJu0Yw7YkCrcBq+l8QFK8m3bwUycX6vGPxLvaL1BEeziiAvfrrmG7Tz r+eUOIbHJQsbxNFMDMvudm6uoIcn2u5ZuBuqQDSYTY3vY+p1X6Ciuf+6SWW6mI0FZmrT9ea2doY gmLw= X-Google-Smtp-Source: AGHT+IGIjjZA5DMEwyXjxPNvD0+rLsCKcSMCrdryRqFZnEXMq2mEXONnwjLcwJ24wN0+FCHBkD9GYQ== X-Received: by 2002:a05:600c:28b:b0:426:6f81:d235 with SMTP id 5b1f17b1804b1-426707d9c3dmr114178435e9.15.1720881799074; Sat, 13 Jul 2024 07:43:19 -0700 (PDT) Received: from arnoutx1.home (2a01cb05949d5800b48198b5611fe783.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:b481:98b5:611f:e783]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f276b14sm57610835e9.23.2024.07.13.07.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jul 2024 07:43:18 -0700 (PDT) To: buildroot@buildroot.org Date: Sat, 13 Jul 2024 16:43:15 +0200 Message-ID: <20240713144316.403640-2-arnout@mind.be> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240713144316.403640-1-arnout@mind.be> References: <20240713144316.403640-1-arnout@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1720881799; x=1721486599; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sRnbdR+1QbJntJ5uGFnk75Kpm7L8GFDuujgDYOf8lcU=; b=ImD8sSoNDGpenTw5iR79t72lxk4hUDNZ60b1qF93fqfExG0YqDpTj03dWMm181U0pm R62jGlYJfKKKfd1S9p1kzbGqOlSEGobehvJ60xfkntVd/WdIdiwWaPTJieTTkWhfyJct kUy6g6V2Z1YenwwZbr2h/i0y0K4BDNiFSewaS/EoDsCLnHYsNSwT61mOtqwXoFeqWiVW LVBZJitSDA9FMEscUjVuk9MxqneSXWiEHdnKxB+By6Dmx59yHlkJIefmkIPSOp+BmDKQ LT8+Gl02tuMUqWqBtEEgIzTPPanR+Afuc7FNps7SIwD36nr0rDxeOWc+LAB3nSaurbZi KXKg== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=mind.be X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=ImD8sSoN Subject: [Buildroot] [PATCH 2/3] utils/docker-run: also mount externals X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: Arnout Vandecappelle via buildroot From: Arnout Vandecappelle Reply-To: Arnout Vandecappelle Cc: "Fiona Klute \(WIWA\)" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" When building in docker, we may want to include BR2_EXTERNALs that are not in the current directory. These need to be mounted into the container as well. There is unfortunately no easy, generic way to find the list of externals, except by running `make printvars`, but we'd need to run that inside the container with all the command-line overrides set in order to be fully correct. That is pretty hopeless, so as an approximation we look for `.br2-external.mk` in the current directory. Clearly this is quite limited because it doesn't support O= or BR2_EXTERNAL= passed on the command line. This also means that the first time, it doesn't work at all, because .br2-external.mk doesn't exist yet. The EXTRA_MOUNTPOINTS feature can be used for that. Signed-off-by: Arnout Vandecappelle --- Since this feature is not bulletproof, and EXTRA_MOUNTPOINTS already covers the use case, it's perhaps not necessary to include this patch. --- utils/docker-run | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/utils/docker-run b/utils/docker-run index 3bb7b6a41b..76fb81b074 100755 --- a/utils/docker-run +++ b/utils/docker-run @@ -29,6 +29,19 @@ declare -a mountpoints=( "$(pwd)" ) +# If any externals are defined, mount them as well. We assume that the current +# directory is OUTPUT_DIR - ideally we'd parse O= and BR2_EXTERNAL= from the +# command line but that's not really feasible in practice. +if [ -e '.br2-external.mk' ]; then + mapfile -t mountpoints_external < <( + # We obviously want to quote the make syntax here + # shellcheck disable=SC2016 + make -f .br2-external.mk -E \ + 'default:; @:$(foreach external,$(BR2_EXTERNAL_DIRS),$(info $(external)))' + ) + mountpoints+=("${mountpoints_external[@]}") +fi + # We use the PODMAN_USERNS environment variable rather than using the # --userns command line argument because Fedora system may have the # podman-docker package installed, providing the "docker" From patchwork Sat Jul 13 14:43:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1960175 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLrn15Gbbz1xqj for ; Sun, 14 Jul 2024 00:43:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 28D8540015; Sat, 13 Jul 2024 14:43:31 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id U0PtXlOoSO7D; Sat, 13 Jul 2024 14:43:29 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E36CA416ED Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id E36CA416ED; Sat, 13 Jul 2024 14:43:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id E479A1BF41B for ; Sat, 13 Jul 2024 14:43:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D1D8C606B9 for ; Sat, 13 Jul 2024 14:43:22 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id cMGzZf52yCHS for ; Sat, 13 Jul 2024 14:43:22 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::32c; helo=mail-wm1-x32c.google.com; envelope-from=arnout.vandecappelle@essensium.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org D435C606A7 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D435C606A7 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by smtp3.osuosl.org (Postfix) with ESMTPS id D435C606A7 for ; Sat, 13 Jul 2024 14:43:21 +0000 (UTC) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-42662d80138so18233925e9.1 for ; Sat, 13 Jul 2024 07:43:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720881800; x=1721486600; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=phH1/1B80YEM66Z7Qf0sOihlOOsNYsJCe2Rxv2TQBNE=; b=hcBIU31S7EDZcFQ2G3TA1pSFbQWC9Ktj3zT2/ZFviDx3iZ4if+9vG5opJu1U1BuKcj R47thRfhduElateUwsWkeEVdWJq/jZGrGIj46qqzDldO0a/9Bv2NPCBB5MBKAPKW7Ibz H5VfPzCyuZLAD3qkKPdjRkRLEohtb8H1OL2gE1Q7UEuGhwr0yoZNhU6CKCVOA9IUQXNK wmk9ML+nqzSTqmEVVBiNNWe7dxib9DbD0iNE1bJCLNps7N968glsK840YiSkjv8TAT63 YYTp+DWb6xuvm5JGHK2oM9KKaHudIhaak4admuOW1oWA+kVzLMXUO2uJ0R/LheNN+aw2 uUbg== X-Gm-Message-State: AOJu0YxdZn2+aMb6PsyrtLzvc4Mq38TcfD6xW37g6p6RardPCXvutiux f3kzlkcIT7B1pXE3lXtP6b66CTZNwWuwSRWx6PA+Vn9q/0Lc8spYwD6f2zN/2nJny7sSIoqO3cM AWjM= X-Google-Smtp-Source: AGHT+IEALxxVupgXlUsZTCIQxd8muKwtmA7i4pKsA3CRG7oDxOY/Kcn5vxXc+swcwG9P+aYIM7PmrA== X-Received: by 2002:a7b:c40e:0:b0:426:59f3:d976 with SMTP id 5b1f17b1804b1-426708fabdemr95092655e9.38.1720881800003; Sat, 13 Jul 2024 07:43:20 -0700 (PDT) Received: from arnoutx1.home (2a01cb05949d5800b48198b5611fe783.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:b481:98b5:611f:e783]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f276b14sm57610835e9.23.2024.07.13.07.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jul 2024 07:43:19 -0700 (PDT) To: buildroot@buildroot.org Date: Sat, 13 Jul 2024 16:43:16 +0200 Message-ID: <20240713144316.403640-3-arnout@mind.be> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240713144316.403640-1-arnout@mind.be> References: <20240713144316.403640-1-arnout@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1720881800; x=1721486600; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=phH1/1B80YEM66Z7Qf0sOihlOOsNYsJCe2Rxv2TQBNE=; b=SwYuUABP/+nlPkZW5EU5fuG0i/hdMwxMD9/pBOsjhNNfjR++oRxzQ+jYd61pVfueS2 HGhh5J8QB8J2v4J7Twtehz8xBBZOYSijz0QJANTl0WjV90TWuo1uDFn3cstyVgBiiZjN LAo+ATqW4Fml52ugx6mU7FbNSfbAbCMC8rbnIQBYrkd8x579tESaP3cF8KuETKgUDT8M CSHdgiee/Z13iM41BPGpRRKiBrN5/dTekj5AGIeyoALGOWW38pVHfCaucfUJfGjre8om T5BLnF9i7nfagIJkUIzM+Gbp7mhkKL/BmLsLs20Rwu7tX3Swu+NtCGkoGC2rKUoRHSoq 4nVA== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=mind.be X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=SwYuUABP Subject: [Buildroot] [PATCH 3/3] utils/brmake: allow override of MAKE X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: Arnout Vandecappelle via buildroot From: Arnout Vandecappelle Reply-To: Arnout Vandecappelle Cc: "Fiona Klute \(WIWA\)" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Allow to override the 'make' program to use by setting the environment variable MAKE (which is the standard environment variable used by make itself). This makes it possible to use an alternative make binary, or to provide a wrapper around make. For example, to run the build itself under docker, you can use: MAKE='utils/docker-run make' utils/brmake ... (Running brmake itself under docker isn't possible because our image doesn't have unbuffer.) Signed-off-by: Arnout Vandecappelle --- utils/brmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/brmake b/utils/brmake index 70dfb6cdc8..06977cc18d 100755 --- a/utils/brmake +++ b/utils/brmake @@ -2,6 +2,8 @@ # (C) 2016, "Yann E. MORIN" # License: WTFPL, https://spdx.org/licenses/WTFPL.html +MAKE="${MAKE:-make}" + main() { local ret start d h m mf @@ -12,7 +14,9 @@ main() { start=${SECONDS} - ( exec 2>&1; unbuffer make "${@}"; ) \ + # We want word splitting of ${MAKE} + # shellcheck disable=SC2086 + ( exec 2>&1; unbuffer ${MAKE} "${@}"; ) \ > >( while read -r line; do printf "%(%Y-%m-%dT%H:%M:%S)T %s\n" -1 "${line}" done \