From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Christian Stewart <christian@aperture.us>
Cc: James Hilliard <james.hilliard1@gmail.com>,
Anisse Astier <anisse@astier.eu>,
Christian Stewart via buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH v4 1/2] package/pkg-golang.mk: allow packages to override download GOPROXY
Date: Tue, 6 Aug 2024 18:57:31 +0200 [thread overview]
Message-ID: <20240806185731.372f8f3e@windsurf> (raw)
In-Reply-To: <CA+h8R2reErtSWPO1hGpX7tT5Xejb_SNqiuSCnXvJZKHwhzdcZg@mail.gmail.com>
Hello,
On Tue, 6 Aug 2024 09:13:50 -0700
Christian Stewart <christian@aperture.us> wrote:
> The reasoning for using GOPROXY=direct is as follows:
>
> When we enable the proxy, the Go tool will download the sources for the
> dependencies from Google.
>
> This is OK in general, but in the context of buildroot we typically
> download sources from their upstream releases or Git repositories.
>
> GOPROXY is not broken.
>
> That said, a lot of dependencies cause problems when they change what tag a
> git release points to retroactively (rare but happens), or delete a older
> commit from their repository (which happens extremely rarely).
Crap, those projects do that? They change a tag, or remove an older
commit from their repo? Yikes for reproducibility :-/
> The proxy smooths this over by always serving the same thing for a git tag
> or commit hash.
>
> The problem with this is, now we have something different being returned
> for a dependency than what it says in go.mod.
>
> The go.mod might say we are fetching foo at version 1.0.0, but in fact, if
> you go to the repository for foo, and go to version 1.0.0, it could be a
> completely different source tree from the one we get in the proxied
> download.
And that obviously sucks, and using a proxy doesn't seem like a great
workaround.
> This opens up the opportunity for bad actors to hide code in the proxied
> version and then retroactively change the git tag to hide that bad code.
>
> For this reason the default was set to always use Git to fetch the
> dependencies for Buildroot as we would prefer to detect the mismatch and
> deal with it up front, possibly falling back to fetching the .tar.gz from
> our own mirror, rather than depend on this behavior from the Google proxy
> to always be there and save us.
>
> As you can see we have never had an issue with this setting until now, when
> we have an actual broken dependency somewhere, and its when we are adding
> the package, not retroactively, that the issue is found and solved.
I'm not sure to follow you on this. Why would this only happen when we
add the package? If we use GOPROXY=direct, and 3 months after we've
added the package some upstream dependency decides to change its tag or
remove some commits, then it will start failing (of course,
sources.buildroot.net will have a backup, but sources.buildroot.net is
not meant to really be used in "normal" circumstances).
> This is my pitch for keeping GOPROXY=direct. If we want to use the Google
> proxy with all the cavets I mentioned above, we could add the option
> HOST_GO_GOPROXY and default it to the Google proxy. But personally I will
> still always override this value to direct in my projects.
>
> For now we can just include the latest commit hash of tailscale until they
> make a new release and nothing else needs to be changed.
Don't understand this last part. What is your proposal to fix the
tailscale situation?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-08-06 16:57 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 16:31 [Buildroot] [PATCH v4 1/2] package/pkg-golang.mk: allow packages to override download GOPROXY James Hilliard
2024-08-05 16:31 ` [Buildroot] [PATCH v4 2/2] package/tailscale: new package James Hilliard
2024-08-06 1:14 ` Christian Stewart via buildroot
2024-08-12 20:17 ` Christian Stewart via buildroot
2024-08-19 19:57 ` Christian Stewart via buildroot
2024-08-05 17:34 ` [Buildroot] [PATCH v4 1/2] package/pkg-golang.mk: allow packages to override download GOPROXY Christian Stewart via buildroot
2024-08-05 20:31 ` Thomas Petazzoni via buildroot
2024-08-05 22:01 ` James Hilliard
2024-08-06 1:07 ` Christian Stewart via buildroot
2024-08-06 14:50 ` Thomas Petazzoni via buildroot
2024-08-06 15:49 ` James Hilliard
2024-08-06 16:13 ` Christian Stewart via buildroot
2024-08-06 16:43 ` James Hilliard
2024-08-06 16:57 ` Thomas Petazzoni via buildroot [this message]
2024-08-06 18:53 ` Christian Stewart via buildroot
2024-10-23 15:21 ` James Hilliard
2024-10-23 16:35 ` Christian Stewart via buildroot
2024-10-23 17:30 ` James Hilliard
2024-10-23 19:25 ` Thomas Petazzoni via buildroot
2024-10-23 19:49 ` James Hilliard
2024-10-23 20:36 ` Christian Stewart via buildroot
2024-10-23 21:05 ` Thomas Petazzoni via buildroot
2024-10-23 21:51 ` James Hilliard
2024-10-25 20:11 ` Christian Stewart via buildroot
2024-10-26 4:58 ` Christian Stewart via buildroot
2024-10-26 4:59 ` Christian Stewart via buildroot
2025-02-05 12:51 ` Christian Stewart via buildroot
2025-02-05 14:02 ` James Hilliard
2025-02-05 15:45 ` Arnout Vandecappelle via buildroot
2025-02-05 18:02 ` James Hilliard
2025-02-05 20:01 ` Christian Stewart via buildroot
2025-02-05 20:38 ` James Hilliard
2025-02-05 21:22 ` Christian Stewart via buildroot
2025-02-05 21:53 ` Arnout Vandecappelle via buildroot
2025-02-05 22:05 ` James Hilliard
2025-02-05 22:25 ` Christian Stewart via buildroot
2025-02-05 21:55 ` James Hilliard
2025-02-05 22:18 ` Christian Stewart via buildroot
2025-02-05 22:56 ` James Hilliard
2025-02-05 23:31 ` Christian Stewart via buildroot
2025-02-05 23:45 ` James Hilliard
2025-02-05 17:56 ` [Buildroot] Fwd: " Christian Stewart via buildroot
2025-02-05 18:45 ` James Hilliard
2025-02-06 19:31 ` Fiona Klute via buildroot
2025-02-07 17:35 ` James Hilliard
2025-02-07 17:50 ` Christian Stewart via buildroot
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=20240806185731.372f8f3e@windsurf \
--to=buildroot@buildroot.org \
--cc=anisse@astier.eu \
--cc=christian@aperture.us \
--cc=james.hilliard1@gmail.com \
--cc=thomas.petazzoni@bootlin.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