]> Cypherpunks repositories - gostls13.git/commit
cmd/distpack: make go_$GOOS_$GOARCH_exec programs executable
authorDmitri Shuralyov <dmitshur@golang.org>
Fri, 16 Jun 2023 13:03:11 +0000 (09:03 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 16 Jun 2023 16:01:47 +0000 (16:01 +0000)
commit4eceefa3388c11afc2b71302de53cac921f7f439
tree4bbca5f37b23b9dba1975a5c7979e426dc361dd7
parent1a7709d6af76c06d465c5e969b502fc206f8e687
cmd/distpack: make go_$GOOS_$GOARCH_exec programs executable

The go command recognizes when a program named go_$GOOS_$GOARCH_exec
is in PATH. There are two such programs living in GOROOT/misc/wasm.
Like GOROOT/bin/{go,gofmt} and GOROOT/pkg/tool/**, these programs
need to have the executable bit set to do their job, so set it.

Comparing a distpack produced before and after this change shows that
the pack.go file is modified, the two go_{js,wasip1}_wasm_exec programs
have the new file mode, and there are no other changes, as expected.

The mode change is relevant to the binary and source distributions only.
No change to the module zip since it doesn't include GOROOT/misc at all,
so no effect on previously created toolchain modules whose checksums
are already recorded in the Go checksum database and cannot be changed.
(Other than by changing their "v0.0.1" version, but that's expensive.)

Fixes #60843.

Change-Id: I799b6aacff59c0785cb7743cbd17dda5a9ef91be
Reviewed-on: https://go-review.googlesource.com/c/go/+/503975
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
src/cmd/distpack/pack.go