* [Buildroot] [RFC PATCH v2 1/1] package/pkg-download: don't export the download command variables
@ 2025-02-13 18:09 Dario Binacchi
2025-02-13 21:23 ` Julien Olivain
0 siblings, 1 reply; 2+ messages in thread
From: Dario Binacchi @ 2025-02-13 18:09 UTC (permalink / raw)
To: buildroot; +Cc: Niklas Cassel, Julien Olivain, Dario Binacchi, linux-amarula
Exporting the download variables can cause unfortunate name clashes, as
occurred with the SCP variable used by Binman for compiling U-Boot [1].
Do not globally export the package download commands anymore; instead,
pass them to the dl-wrapper environment.
[1] https://lore.kernel.org/buildroot/a023971c7c8bfa4826a9a8721500c7ff@free.fr/T/
Cc: Julien Olivain <ju.o@free.fr>
Suggested-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
Changes v1 -> v2:
- Drop the -C option
package/pkg-download.mk | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index ca01ff67a59e..20173805c60e 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -7,16 +7,6 @@
#
################################################################################
-# Download method commands
-export CURL := $(call qstrip,$(BR2_CURL))
-export WGET := $(call qstrip,$(BR2_WGET))
-export SVN := $(call qstrip,$(BR2_SVN))
-export CVS := $(call qstrip,$(BR2_CVS))
-export BZR := $(call qstrip,$(BR2_BZR))
-export GIT := $(call qstrip,$(BR2_GIT))
-export HG := $(call qstrip,$(BR2_HG))
-export SCP := $(call qstrip,$(BR2_SCP))
-export SFTP := $(call qstrip,$(BR2_SFTP))
export LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))
# Version of the format of the archives we generate in the corresponding
@@ -118,6 +108,15 @@ define DOWNLOAD
$(Q)$(DOWNLOAD_SET_UMASK) $(EXTRA_ENV) \
$($(PKG)_DL_ENV) \
TAR="$(TAR)" \
+ CURL="$(call qstrip,$(BR2_CURL))" \
+ WGET="$(call qstrip,$(BR2_WGET))" \
+ SVN="$(call qstrip,$(BR2_SVN))" \
+ CVS="$(call qstrip,$(BR2_CVS))" \
+ BZR="$(call qstrip,$(BR2_BZR))" \
+ GIT="$(call qstrip,$(BR2_GIT))" \
+ HG="$(call qstrip,$(BR2_HG))" \
+ SCP="$(call qstrip,$(BR2_SCP))" \
+ SFTP="$(call qstrip,$(BR2_SFTP))" \
BR_NO_CHECK_HASH_FOR="$(if $(BR2_DOWNLOAD_FORCE_CHECK_HASHES),,$(BR_NO_CHECK_HASH_FOR))" \
flock $($(PKG)_DL_DIR)/.lock $(DL_WRAPPER) \
-c '$($(PKG)_DL_VERSION)' \
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [RFC PATCH v2 1/1] package/pkg-download: don't export the download command variables
2025-02-13 18:09 [Buildroot] [RFC PATCH v2 1/1] package/pkg-download: don't export the download command variables Dario Binacchi
@ 2025-02-13 21:23 ` Julien Olivain
0 siblings, 0 replies; 2+ messages in thread
From: Julien Olivain @ 2025-02-13 21:23 UTC (permalink / raw)
To: Dario Binacchi; +Cc: buildroot, Niklas Cassel, linux-amarula
Hi Dario, All,
On 13/02/2025 19:09, Dario Binacchi wrote:
> Exporting the download variables can cause unfortunate name clashes, as
> occurred with the SCP variable used by Binman for compiling U-Boot [1].
> Do not globally export the package download commands anymore; instead,
> pass them to the dl-wrapper environment.
>
> [1]
> https://lore.kernel.org/buildroot/a023971c7c8bfa4826a9a8721500c7ff@free.fr/T/
> Cc: Julien Olivain <ju.o@free.fr>
> Suggested-by: Peter Korsgaard <peter@korsgaard.com>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
I applied the patch to master. I did few minor changes, see:
https://gitlab.com/buildroot.org/buildroot/-/commit/56cc6fa2c71eff27efcb66d60f254da04439ac18
Thank you for your patience and perseverance!
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-13 21:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 18:09 [Buildroot] [RFC PATCH v2 1/1] package/pkg-download: don't export the download command variables Dario Binacchi
2025-02-13 21:23 ` Julien Olivain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox