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

x/build: update for new distribution archive builds #58659

Open
rsc opened this issue Feb 23, 2023 · 4 comments
Open

x/build: update for new distribution archive builds #58659

rsc opened this issue Feb 23, 2023 · 4 comments
Assignees
Labels
Builders x/build issues (builders, bots, dashboards) early-in-cycle A change that should be done early in the 3 month dev cycle. NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Feb 23, 2023

For #24904, I have mailed CL 470676, which adds a new make.bash -distpack flag that generates distribution archives.

On the release infrastructure side, x/build needs to start using make.bash -distpack in Go 1.21 and later to produce the distribution archives (including the source archives), instead of the code it currently uses to generate them. The -distpack mode also writes the module files that we need to serve for GOTOOLCHAIN support (#57001). Those need to start being served from go.dev/dl like the other archives.

When writing a VERSION file for Go 1.21 or later, the file should be of the form

goX.Y.Z
time 2022-02-23T12:34:56Z

That time stamp is used as the modification time in the archives (for reproducibility). This means something in the x/build metadata will have to record the time to use for each release and then write that time into the VERSION file.

The reproducibility work enables building distribution archives on any kind of machine. In particular it should be possible to build everything on an appropriately trusted+locked down linux/amd64 system. You use GOOS=goos GOARCH=goarch ./make.bash -distpack.

Note that if we move the generation of the linux/arm distribution archives to linux/amd64, we need to set GOARM=6 as well, to mimic the environment on linux-arm-aws. So GOOS=linux GOARCH=arm GOARM=6 ./make.bash -distpack.

It doesn't matter what goos/goarch is used to generate the source archives (you get the same result on every system, as one would expect), but it does need to be generated by make.bash -distpack for reproducibility.

Once the release infrastructure is updated, we should issue a go1.21alpha1 (built from a master branch is fine, no need for a release branch) to exercise the infrastructure and to test that external users can reproduce the archives (#57120).

/cc @golang/release

@rsc rsc added the early-in-cycle A change that should be done early in the 3 month dev cycle. label Feb 23, 2023
@rsc rsc added this to the Go1.21 milestone Feb 23, 2023
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Feb 23, 2023
@thanm thanm added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 23, 2023
@gopherbot
Copy link

Change https://go.dev/cl/470755 mentions this issue: cmd/release: deprecate

@rsc
Copy link
Contributor Author

rsc commented Feb 23, 2023

One question is how to test that things stay reproducible.

One possible answer would be to use the trusted Linux machine as source of truth but then also build everything on Windows and require getting bit-for-bit identical outputs before blessing those files as part of the release. The Windows machine does not have to be as trusted since it is only a sanity check on the trusted builder. The two OSes Windows and Linux should be sufficiently different to serve as a good check.

gopherbot pushed a commit to golang/build that referenced this issue Feb 23, 2023
Relui replaced release since Go 1.18 or so. We kept it around a bit
longer while there were remaining Go+BoringCrypto releases that still
used the release command. Those are no more, so to avoid confusion,
remove cmd/release code given it's no longer maintained or supported.

Updates golang/go#40279.
Updates golang/go#58659.
Fixes golang/go#45893.

Change-Id: Id0d641bee49c9584c52e5616322f0656b89cd851
Reviewed-on: https://go-review.googlesource.com/c/build/+/470755
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
@heschi
Copy link
Contributor

heschi commented Mar 3, 2023

@rsc once the CL is merged we'll prioritize this. Looking forward to it.

@gopherbot
Copy link

Change https://go.dev/cl/478158 mentions this issue: internal/relui: cross-compile Go 1.21 with -distpack

@heschi heschi self-assigned this Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) early-in-cycle A change that should be done early in the 3 month dev cycle. NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
Status: In Progress
Development

No branches or pull requests

5 participants