Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package/go: fix go-bootstrap when parent dir contains invalid .git
Building host-go within docker fails: error obtaining VCS status: exit status 128 Use -buildvcs=false to disable VCS stamping. Reproduction of the issue: mkdir go-issue-61620 cd ./go-issue-61620 wget https://go.dev/dl/go1.19.11.src.tar.gz mkdir go-bootstrap tar -xf go1.19.11.src.tar.gz -C ./go-bootstrap --strip-components=1 cd ./go-bootstrap/src/ bash make.bash cd ../../ wget https://go.dev/dl/go1.20.6.src.tar.gz mkdir go tar -xf go1.20.6.src.tar.gz -C ./go/ --strip-components=1 printf "gitdir: ../../does/not/exist/.git" > ./.git cd ./go/src/ GOROOT_BOOTSTRAP=$(pwd)/../../go-bootstrap/ bash make.bash The error only occurs when the .git that git detects in the parent directory of the GOROOT_BOOTSTRAP is invalid or not present causing errors when running `git` commands within GOROOT_BOOTSTRAP. Report: https://lists.buildroot.org/pipermail/buildroot/2023-July/671344.html Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/4725186525 Upstream issue: golang/go#61620 Upstream PR: golang/go#61621 Signed-off-by: Christian Stewart <christian@aperture.us> --- v1 -> v2: - sort HOST_GO_MAKE_ENV alphabetically - simplify the patch to set buildvcs=false unconditionally for go-bootstrap - create a minimal reproduction of the issue - simplify the commit message with the minimal reproduction
- Loading branch information