distpack

command standard library
go1.22.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Distpack creates the tgz and zip files for a Go distribution. It writes into GOROOT/pkg/distpack:

  • a binary distribution (tgz or zip) for the current GOOS and GOARCH
  • a source distribution that is independent of GOOS/GOARCH
  • the module mod, info, and zip files for a distribution in module form (as used by GOTOOLCHAIN support in the go command).

Distpack is typically invoked by the -distpack flag to make.bash. A cross-compiled distribution for goos/goarch can be built using:

GOOS=goos GOARCH=goarch ./make.bash -distpack

To test that the module downloads are usable with the go command:

./make.bash -distpack
mkdir -p /tmp/goproxy/golang.org/toolchain/
ln -sf $(pwd)/../pkg/distpack /tmp/goproxy/golang.org/toolchain/@v
GOPROXY=file:///tmp/goproxy GOTOOLCHAIN=$(sed 1q ../VERSION) gotip version

gotip can be replaced with an older released Go version once there is one. It just can't be the one make.bash built, because it knows it is already that version and will skip the download.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL