package/pkg-golang.mk: use golang toolchain default GOPROXY
PATCH v6 1/3 package/pkg-golang.mk: use golang toolchain default GOPROXY
This change sets the default GOPROXY value to match Go's built-in default of "https://proxy.golang.org,direct" which provides several benefits:
- Avoid package breakages due to missing module sources
- Better alignment with upstream Go toolchain defaults
- Faster downloads via the proxy compared to direct Git clones
- Maintains reproducible builds through Go's module checksum validation
The default value from the toolchain can be read with "go env GOPROXY"
--- package/pkg-golang.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-golang.mk +1 -1
@@ -101,7 +101,7 @@ $(2)_POST_PATCH_HOOKS += $(2)_GEN_GOMOD $(2)_DOWNLOAD_POST_PROCESS = go $(2)_DL_ENV += \ $$(HOST_GO_COMMON_ENV) \ - GOPROXY=direct \ + GOPROXY="https://proxy.golang.org,direct" \ $$($(2)_GO_ENV) # If building in a sub directory, do the vendoring in there
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 2/3 package/pkg-golang.mk: make GOPROXY configurable
BR2_GOPROXY now configures the Go module proxy URL used to download Go modules specified in project go.mod and go.sum files. By default, it uses Google's official Go module mirror at proxy.golang.org, falling back to direct downloads if the module is not found in the mirror.
The default value from the toolchain can be read with "go env GOPROXY"
We rely on package developers to audit their dependencies in go.mod and go.sum.
The value can be configured to:
- A comma-separated list of proxy URLs
- "off" to disable all downloads
- "direct" to download directly from source repositories
For more details on Go module proxies:
https://go.dev/ref/mod#module-proxy
Discussion:
https://lore.kernel.org/all/CADvTj4pXO2rwJ8oCzzGNY+OxLuo3uJnDT2PAxbyquw0L6dhfiA@mail.gmail.com/T/#t
---
v1 -> v2:
- added more context and links
- renamed to GOPROXY instead of GOPROXY_LIST
- moved into the !BR2_PRIMARY_SITE_ONLY section
v2 -> v3:
- split out GOPROXY default change
--- Config.in | 16 ++++++++++++++++ package/pkg-golang.mk | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-)
Config.in +16 -0
@@ -335,6 +335,22 @@ config BR2_LUAROCKS_MIRROR See http://luarocks.org +config BR2_GOPROXY + string "Go module proxy" + default "https://proxy.golang.org,direct" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + help + The Go module proxy URL used to download Go modules. By + default, it uses the official Go module mirror, falling back + to direct downloads if the module is not found in the mirror. + + The value can be one of: + - Comma-separated list of proxy URLs + - "off" to disable all downloads + - "direct" to download directly from source repositories + + See https://go.dev/ref/mod#module-proxy + config BR2_CPAN_MIRROR string "CPAN mirror (Perl packages)" default "https://cpan.metacpan.org"
package/pkg-golang.mk +1 -1
@@ -101,7 +101,7 @@ $(2)_POST_PATCH_HOOKS += $(2)_GEN_GOMOD $(2)_DOWNLOAD_POST_PROCESS = go $(2)_DL_ENV += \ $$(HOST_GO_COMMON_ENV) \ - GOPROXY="https://proxy.golang.org,direct" \ + GOPROXY=$$(call qstrip,$$(BR2_GOPROXY)) \ $$($(2)_GO_ENV) # If building in a sub directory, do the vendoring in there
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 2/3] package/pkg-golang.mk: make GOPROXY configurable
Hi all,
Quoted 80 lines · James Hilliard
BR2_GOPROXYnow configures the Go module proxy URL used to download Go modules specified in project go.mod and go.sum files. By default, it uses Google's official Go module mirror at proxy.golang.org, falling back to direct downloads if the module is not found in the mirror.The default value from the toolchain can be read with "go env GOPROXY"
We rely on package developers to audit their dependencies in go.mod and go.sum.
The value can be configured to:
- A comma-separated list of proxy URLs
- "off" to disable all downloads
- "direct" to download directly from source repositoriesFor more details on Go module proxies:
https://go.dev/ref/mod#module-proxyDiscussion:
https://lore.kernel.org/all/CADvTj4pXO2rwJ8oCzzGNY+OxLuo3uJnDT2PAxbyquw0L6dhfiA@mail.gmail.com/T/#tSigned-off-by James Hilliard <[email protected]>Signed-off-by Christian Stewart <[email protected]>---
v1 -> v2:- added more context and links
- renamed to GOPROXY instead ofGOPROXY_LIST
- moved into the !BR2_PRIMARY_SITE_ONLY sectionv2 -> v3:
- split out GOPROXY default changeSigned-off-by Christian Stewart <[email protected]>--- Config.in | 16 ++++++++++++++++ package/pkg-golang.mk | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-)Config.in +16
-0@@ -335,6 +335,22 @@ config BR2_LUAROCKS_MIRROR See http://luarocks.org +config BR2_GOPROXY + string "Go module proxy" + default "https://proxy.golang.org,direct" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + help + The Go module proxy URL used to download Go modules. By + default, it uses the official Go module mirror, falling back + to direct downloads if the module is not found in the mirror. + + The value can be one of: + - Comma-separated list of proxy URLs + - "off" to disable all downloads + - "direct" to download directly from source repositories + + See https://go.dev/ref/mod#module-proxy + config BR2_CPAN_MIRROR string "CPAN mirror (Perl packages)" default "https://cpan.metacpan.org"package/pkg-golang.mk +1
-2@@ -101,7 +101,7 @@ $(2)_POST_PATCH_HOOKS += $(2)_GEN_GOMOD $(2)_DOWNLOAD_POST_PROCESS = go $(2)_DL_ENV += \ $$(HOST_GO_COMMON_ENV) \ - GOPROXY="https://proxy.golang.org,direct" \ + GOPROXY=$$(call qstrip,$$(BR2_GOPROXY)) \ $$($(2)_GO_ENV) # If building in a sub directory, do the vendoring in there --
Quoted 2 lines
2.43.0
This PR has been hanging for a while - I recommend merging it.
Best regards, happy holidays, happy new year, etc :)
_______________________________________________
buildroot mailing list [email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 2/3] package/pkg-golang.mk: make GOPROXY configurable
Hello James, Christian and all,
We just discussed this series IRL.
Quoted 11 lines · Christian Stewart via buildroot
Hi all,
Quoted 6 lines · James Hilliard
BR2_GOPROXYnow configures the Go module proxy URL used to download Go modules specified in project go.mod and go.sum files. By default, it uses Google's official Go module mirror at proxy.golang.org, falling back to direct downloads if the module is not found in the mirror.The default value from the toolchain can be read with "go env GOPROXY"
[--SNIP--]
Quoted 4 lines
Config.in config BR2_LUAROCKS_MIRROR · line 340
Quoted 4 lines
Config.in +3
-0+config BR2_GOPROXY + string "Go module proxy" + default "https://proxy.golang.org,direct"
In my opinion (with my LTS steward hat), we shouldn't change the default in Buildroot to go through the proxy first, as it may introduce supply-chain related vulnerabilities.
Would you consider setting the default to direct (as it is currently), and then in the help text below (or the Buildroot user manual), indicate that some packages may actually require to use "https://proxy.golang.org,direct", at the user's own risk ?
Kind regards,
Titouan
Quoted 34 lines
Quoted 30 lines
Config.in +13
-0+ depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + help + The Go module proxy URL used to download Go modules. By + default, it uses the official Go module mirror, falling back + to direct downloads if the module is not found in the mirror. + + The value can be one of: + - Comma-separated list of proxy URLs + - "off" to disable all downloads + - "direct" to download directly from source repositories + + See https://go.dev/ref/mod#module-proxy + config BR2_CPAN_MIRROR string "CPAN mirror (Perl packages)" default "https://cpan.metacpan.org"package/pkg-golang.mk +1
-2@@ -101,7 +101,7 @@ $(2)_POST_PATCH_HOOKS += $(2)_GEN_GOMOD $(2)_DOWNLOAD_POST_PROCESS = go $(2)_DL_ENV += \ $$(HOST_GO_COMMON_ENV) \ - GOPROXY="https://proxy.golang.org,direct" \ + GOPROXY=$$(call qstrip,$$(BR2_GOPROXY)) \ $$($(2)_GO_ENV) # If building in a sub directory, do the vendoring in there --Quoted 2 lines
2.43.0
This PR has been hanging for a while - I recommend merging it.
Quoted 7 lines
Signed-off-by Christian Stewart <[email protected]>Best regards, happy holidays, happy new year, etc :)
_______________________________________________
buildroot mailing list [email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 2/3] package/pkg-golang.mk: make GOPROXY configurable
Quoted 20 lines · Titouan Christophe
Hello James, Christian and all,
We just discussed this series IRL.
Quoted 11 lines · Christian Stewart via buildroot
Hi all,
Quoted 6 lines · James Hilliard
BR2_GOPROXYnow configures the Go module proxy URL used to download Go modules specified in project go.mod and go.sum files. By default, it uses Google's official Go module mirror at proxy.golang.org, falling back to direct downloads if the module is not found in the mirror.The default value from the toolchain can be read with "go env GOPROXY"
[--SNIP--]
Quoted 1 line
Quoted 1 line
Quoted 6 lines
Quoted 3 lines
Config.in config BR2_LUAROCKS_MIRROR · line 340
Quoted 3 lines
Config.in +3
-0+config BR2_GOPROXY + string "Go module proxy" + default "https://proxy.golang.org,direct"In my opinion (with my LTS steward hat), we shouldn't change the default in Buildroot to go through the proxy first, as it may introduce supply-chain related vulnerabilities.
It doesn't because all dependencies are hashed anyway in go.sum, I don't see why buildroot defaults should differ from normal golang defaults here, especially when golang hashes all dependencies.
Currently we have golang packages with known vulnerabilities due to us being unable to upgrade those packages at all due to them not being able to build with the non-standard GOPROXY=direct setting.
Quoted 5 lines
Would you consider setting the default to
direct(as it is currently), and then in the help text below (or the Buildroot user manual), indicate that some packages may actually require to use "https://proxy.golang.org,direct", at the user's own risk ?
For autobuilders to function the default GOPROXY must also be functional for packages, in the golang ecosystem it's essentially always assumed dependencies are downloaded via the proxy, as essentially nobody tests if GOPROXY=direct works.
There's probably an argument that can be made that the golang ecosystem should have designed things differently but as a downstream integrator it's impractical for buildroot to differ from the normal golang expectations here.
Quoted 46 lines
Kind regards,
TitouanQuoted 41 lines
Quoted 30 lines
Config.in +13
-0+ depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + help + The Go module proxy URL used to download Go modules. By + default, it uses the official Go module mirror, falling back + to direct downloads if the module is not found in the mirror. + + The value can be one of: + - Comma-separated list of proxy URLs + - "off" to disable all downloads + - "direct" to download directly from source repositories + + See https://go.dev/ref/mod#module-proxy + config BR2_CPAN_MIRROR string "CPAN mirror (Perl packages)" default "https://cpan.metacpan.org"package/pkg-golang.mk +1
-2@@ -101,7 +101,7 @@ $(2)_POST_PATCH_HOOKS += $(2)_GEN_GOMOD $(2)_DOWNLOAD_POST_PROCESS = go $(2)_DL_ENV += \ $$(HOST_GO_COMMON_ENV) \ - GOPROXY="https://proxy.golang.org,direct" \ + GOPROXY=$$(call qstrip,$$(BR2_GOPROXY)) \ $$($(2)_GO_ENV) # If building in a sub directory, do the vendoring in there --Quoted 2 lines
2.43.0
This PR has been hanging for a while - I recommend merging it.
Signed-off-by Christian Stewart <[email protected]>Best regards, happy holidays, happy new year, etc :)
_______________________________________________
buildroot mailing list [email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 2/3] package/pkg-golang.mk: make GOPROXY configurable
Hi all,
Quoted 9 lines · James Hilliard
On Tue, Feb 3, 2026 at 2:28 AM Titouan Christophe
Quoted 7 lines
Quoted 4 lines
Config.in config BR2_LUAROCKS_MIRROR · line 340
Quoted 4 lines
Config.in +3
-0+config BR2_GOPROXY + string "Go module proxy" + default "https://proxy.golang.org,direct"In my opinion (with my LTS steward hat), we shouldn't change the default in Buildroot to go through the proxy first, as it may introduce supply-chain related vulnerabilities.
For the LTS branches, leave it as-is, for the latest branch, change it?
This won't introduce supply-chain vulnerabilities - as James said, projects ship go.sum which checksums dependencies and ensures there is no tampering.
Quoted 8 lines
It doesn't because all dependencies are hashed anyway in go.sum, I don't see why buildroot defaults should differ from normal golang defaults here, especially when golang hashes all dependencies.
Currently we have golang packages with known vulnerabilities due to us being unable to upgrade those packages at all due to them not being able to build with the non-standard GOPROXY=direct setting.
If they have known vulnerabilities, on the other hand, did we file upstream issues about the GOPROXY=direct not working?
Quoted 4 lines
Quoted 4 lines
Would you consider setting the default to
direct(as it is currently), and then in the help text below (or the Buildroot user manual), indicate that some packages may actually require to use "https://proxy.golang.org,direct", at the user's own risk ?
I think changing it per-package is actually messier than just changing the default.
Quoted 4 lines
For autobuilders to function the default GOPROXY must also be functional for packages, in the golang ecosystem it's essentially always assumed dependencies are downloaded via the proxy, as essentially nobody tests if GOPROXY=direct works.
Best regards,
Christian Stewart
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 2/3] package/pkg-golang.mk: make GOPROXY configurable
Quoted 24 lines · Christian Stewart
Hi all,
Quoted 9 lines · James Hilliard
On Tue, Feb 3, 2026 at 2:28 AM Titouan Christophe
Quoted 7 lines
Quoted 4 lines
Config.in config BR2_LUAROCKS_MIRROR · line 340
Quoted 4 lines
Config.in +3
-0+config BR2_GOPROXY + string "Go module proxy" + default "https://proxy.golang.org,direct"In my opinion (with my LTS steward hat), we shouldn't change the default in Buildroot to go through the proxy first, as it may introduce supply-chain related vulnerabilities.
For the LTS branches, leave it as-is, for the latest branch, change it?
This won't introduce supply-chain vulnerabilities - as James said, projects ship go.sum which checksums dependencies and ensures there is no tampering.
Quoted 4 lines
It doesn't because all dependencies are hashed anyway in go.sum, I don't see why buildroot defaults should differ from normal golang defaults here, especially when golang hashes all dependencies.
Quoted 7 lines
Quoted 4 lines
Currently we have golang packages with known vulnerabilities due to us being unable to upgrade those packages at all due to them not being able to build with the non-standard GOPROXY=direct setting.
If they have known vulnerabilities, on the other hand, did we file upstream issues about the GOPROXY=direct not working?
I think tailscale has some known vulnerabilities, unsure if any are in practice exploitable.
I haven't really bothered with reporting GOPROXY=direct issues upstream recently as it's such an uncommon issue for anyone to encounter and I feel it's mostly just generating unwanted noise for upstream projects.
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Would you consider setting the default to
direct(as it is currently), and then in the help text below (or the Buildroot user manual), indicate that some packages may actually require to use "https://proxy.golang.org,direct", at the user's own risk ?I think changing it per-package is actually messier than just changing the default.
Quoted 7 lines
Quoted 4 lines
For autobuilders to function the default GOPROXY must also be functional for packages, in the golang ecosystem it's essentially always assumed dependencies are downloaded via the proxy, as essentially nobody tests if GOPROXY=direct works.
Best regards,
Christian Stewart
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 2/3] package/pkg-golang.mk: make GOPROXY configurable
Hi James,
Quoted 7 lines · James Hilliard
I think tailscale has some known vulnerabilities, unsure if any are in practice exploitable.
I haven't really bothered with reporting GOPROXY=direct issues upstream recently as it's such an uncommon issue for anyone to encounter and I feel it's mostly just generating unwanted noise for upstream projects.
Tailscale promptly fixed the issue last time reported it so it's hardly unwanted noise.
We could write a script that detects this issue and generates a .md file with issues to file.
I would happily file the issues from my GitHub account if needed.
Thanks,
Christian
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 2/3] package/pkg-golang.mk: make GOPROXY configurable
Quoted 7 lines · Christian Stewart
Hi James,
Quoted 3 lines · James Hilliard
I think tailscale has some known vulnerabilities, unsure if any are in practice exploitable.
Quoted 7 lines
Quoted 4 lines
I haven't really bothered with reporting GOPROXY=direct issues upstream recently as it's such an uncommon issue for anyone to encounter and I feel it's mostly just generating unwanted noise for upstream projects.
Tailscale promptly fixed the issue last time reported it so it's hardly unwanted noise.
Yeah, maybe.
Quoted 2 lines
We could write a script that detects this issue and generates a .md file with issues to file.
I think the best way to push projects towards preventing any GOPROXY=direct breakage would be to write a github action so that projects which care about GOPROXY=direct support can get immediate feedback on whether or not a dependency is broken or not with GOPROXY=direct(and probably also have it validate the default GOPROXY configuration as well to ensure that it doesn't regress either).
Quoted 4 lines
I would happily file the issues from my GitHub account if needed.
Thanks,
Christian
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 3/3 package/tailscale: bump to version 1.92.3
In reply to James HilliardFixes:
https://tailscale.com/security-bulletins#ts-2025-008
---
Changes v5 -> v6:
- update tailscale to 1.92.3
Changes v4 -> v5:
- update tailscale to 1.90.9 fixing security vulnerability
Changes v3 -> v4:
- update tailscale to 1.90.6
--- package/tailscale/tailscale.hash | 2 +- package/tailscale/tailscale.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
package/tailscale/tailscale.hash +1 -1
@@ -1,3 +1,3 @@ # Locally computed -sha256 4830cd822a838d5d44fd5eeebd07a2aacaf0255fb3fb7d3852d57659f54e51bc tailscale-1.78.1-go2.tar.gz +sha256 24783770ce8332ea81178c5ae0f1339f0aad80adbaae5a1c53abb3e44fd8b322 tailscale-1.92.3-go2.tar.gz sha256 d1ee1c7947d4b2c1963ea214d5324f1d4c89f2f1d0f0224889b4dfb868dad725 LICENSE
package/tailscale/tailscale.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -TAILSCALE_VERSION = 1.78.1 +TAILSCALE_VERSION = 1.92.3 TAILSCALE_SITE = $(call github,tailscale,tailscale,v$(TAILSCALE_VERSION)) TAILSCALE_LICENSE = BSD-3-Clause TAILSCALE_LICENSE_FILES = LICENSE
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot