commit c47ff1ac8c477d3b0ff46fcfc5e6b3f07fa4ea4c Author: Matthew Finkel sysrqb@torproject.org Date: Wed Jul 14 03:29:29 2021 +0000
Bug 40232: Move Alpha to Go 1.16 --- projects/go/0001-Use-fixed-go-build-tmp-directory.patch | 6 +++--- projects/go/config | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/projects/go/0001-Use-fixed-go-build-tmp-directory.patch b/projects/go/0001-Use-fixed-go-build-tmp-directory.patch index 022aa23..5321847 100644 --- a/projects/go/0001-Use-fixed-go-build-tmp-directory.patch +++ b/projects/go/0001-Use-fixed-go-build-tmp-directory.patch @@ -11,17 +11,17 @@ diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/actio index 33b7818fb2..5e369d0f53 100644 --- a/src/cmd/go/internal/work/action.go +++ b/src/cmd/go/internal/work/action.go -@@ -249,9 +249,13 @@ func (b *Builder) Init() { +@@ -252,9 +252,13 @@ func (b *Builder) Init() { if cfg.BuildN { b.WorkDir = "$WORK" } else { -- tmp, err := ioutil.TempDir(cfg.Getenv("GOTMPDIR"), "go-build") +- tmp, err := os.MkdirTemp(cfg.Getenv("GOTMPDIR"), "go-build") - if err != nil { - base.Fatalf("go: creating work dir: %v", err) + tmp := filepath.Join(cfg.Getenv("GOTMPDIR"), "go-build-workdir") + _, err := os.Stat(tmp) + if !os.IsNotExist(err) { -+ tmp, err = ioutil.TempDir(cfg.Getenv("GOTMPDIR"), "go-build") ++ tmp, err = os.MkdirTemp(cfg.Getenv("GOTMPDIR"), "go-build") + if err != nil { + base.Fatalf("go: creating work dir: %v", err) + } diff --git a/projects/go/config b/projects/go/config index 8a67ae8..79f24a2 100644 --- a/projects/go/config +++ b/projects/go/config @@ -1,5 +1,5 @@ # vim: filetype=yaml sw=2 -version: 1.15.13 +version: 1.16.6 filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
var: @@ -118,7 +118,7 @@ input_files: enable: '[% ! c("var/linux") %]' - URL: 'https://golang.org/dl/go%5B% c("version") %].src.tar.gz' name: go - sha256sum: 99069e7223479cce4553f84f874b9345f6f4045f27cf5089489b546da619a244 + sha256sum: a3a5d4bc401b51db065e4f93b523347a4d343ae0c0b08a65c3423b05a138037d - URL: 'https://golang.org/dl/go%5B% c("var/go14_version") %].src.tar.gz' name: go14 sha256sum: 9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959
tbb-commits@lists.torproject.org