Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] optionally set GOPROXY, GOSUMDB when building go packages #43668

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hazen2215
Copy link
Contributor

@hazen2215 hazen2215 commented Apr 29, 2023

  • I tested the changes in this PR: YES

This will allow xbps-src to set environment variable GOPROXY and GOSUMDB when building go packages.
When GOPROXY is set to direct, it pulls modules from source repositories like github and git and mercurial needs to be in hostmakedepends.

@classabbyamp
Copy link
Member

classabbyamp commented Apr 29, 2023

cc: @the-maldridge

@hazen2215
Copy link
Contributor Author

hazen2215 commented Apr 29, 2023

According to go help vcs, go will only use git and mercurial to download code from public servers.

edit: spammed comment by accident, sorry

@classabbyamp
Copy link
Member

what's your use-case for this?

@ahesford
Copy link
Member

Adding magic to XBPS really only makes sense if it impacts more than a couple of templates. If you have a template that would benefit from this (and, if so, why isn't it being modified to use these features here?), you might as well just export the variables directly and add the dependencies you require.

@hazen2215
Copy link
Contributor Author

I use xbps-src to build a lot of my own local packages because of its advantages (like building on chroot and similarity to BSD ports).
Also I often rebuild packages with custom FLAGS, and when building go package I prefer these varaibles to be set for some reasons like privacy.

Related blog post:
https://drewdevault.com/2022/05/25/Google-has-been-DDoSing-sourcehut.html
https://drewdevault.com/2021/08/06/goproxy-breaks-go.html

@hazen2215
Copy link
Contributor Author

Adding magic to XBPS really only makes sense if it impacts more than a couple of templates. If you have a template that would benefit from this (and, if so, why isn't it being modified to use these features here?), you might as well just export the variables directly and add the dependencies you require.

It impacts when building any go package locally.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

Copy link

github-actions bot commented Apr 5, 2024

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
xbps-src xbps-src related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants