Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Peter Korsgaard <peter@korsgaard.com>
Cc: Anisse Astier <anisse@astier.eu>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/2] package/go: explicitly set GOMODCACHE
Date: Mon, 16 Jan 2023 21:30:07 +0100	[thread overview]
Message-ID: <20230116203007.GF2770@scaer> (raw)
In-Reply-To: <20230116105032.1890904-2-peter@korsgaard.com>

Peter, All,

On 2023-01-16 11:50 +0100, Peter Korsgaard spake thusly:
> go mod vendor caches downloaded modules to the Go module cache, which
> defaults to $GOPATH/pkg/mod - But can be overridden with the GOMODCACHE
> environment variable:
> 
> https://go.dev/ref/mod#module-cache
> 
> So explicitly set GOMODCACHE= for reproducibility.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Applied to master, thanks, but see below...

> ---
>  package/go/go.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/go/go.mk b/package/go/go.mk
> index c4f72d403c..c38ae0b99c 100644
> --- a/package/go/go.mk
> +++ b/package/go/go.mk
> @@ -26,6 +26,7 @@ HOST_GO_COMMON_ENV = \
>  	GOROOT="$(HOST_GO_ROOT)" \
>  	GOPATH="$(HOST_GO_GOPATH)" \
>  	GOCACHE="$(HOST_GO_TARGET_CACHE)" \
> +	GOMODCACHE="$(HOST_GO_GOPATH)/pkg/mod" \

HOST_GO_GOPATH is $(HOST_DIR)/share/go-path, however, with PPD, HOST_DIR
is per-package, so there will not besharing of the cache between two
packages, unless there is a build dependency between them (unlikely in
the go ecosystem).

If we wanted to really share the go cache(s), we need to hit somewhere
in $(BR2_DL_DIR), like we do for cargo, see 8450b7691870 (package/pkg-cargo:
move CARGO_HOME into DL_DIR).

Still, this patch guarantees that the current situation is reproducible,
and does not depend on the user's environment.

Applied to master, thanks.

Regards,
Yann E. MORIN.

>  	GOPROXY=off \
>  	PATH=$(BR_PATH) \
>  	GOBIN= \
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-01-16 20:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 10:50 [Buildroot] [PATCH 1/2] package/go: set GOCACHE for download post-process Peter Korsgaard
2023-01-16 10:50 ` [Buildroot] [PATCH 2/2] package/go: explicitly set GOMODCACHE Peter Korsgaard
2023-01-16 20:30   ` Yann E. MORIN [this message]
2023-01-16 20:52     ` Peter Korsgaard
2023-01-16 20:38   ` Christian Stewart via buildroot
2023-01-16 20:55     ` Peter Korsgaard
2023-01-16 21:35       ` Christian Stewart via buildroot
2023-01-17  9:27   ` Peter Korsgaard
2023-01-16 20:26 ` [Buildroot] [PATCH 1/2] package/go: set GOCACHE for download post-process Yann E. MORIN
2023-01-16 20:36 ` Christian Stewart via buildroot
2023-01-16 20:56   ` Peter Korsgaard
2023-01-17  9:27 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230116203007.GF2770@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=anisse@astier.eu \
    --cc=buildroot@buildroot.org \
    --cc=peter@korsgaard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox