From 472606bb316006a8cf2ba2d00af46f50a3c9de9a Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 13 Oct 2023 14:09:33 +0200 Subject: [PATCH] build: move gobootsrc to checksums --- build/checksums.txt | 6 ++++++ build/ci.go | 12 ++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/build/checksums.txt b/build/checksums.txt index d1ec9f9d16..a15cf09b46 100644 --- a/build/checksums.txt +++ b/build/checksums.txt @@ -53,6 +53,12 @@ bce02f7232723cb727755ee11f168a700a00896a25d37f87c4b173bce55596b4 golangci-lint- cf6403f84707ce8c98664736772271bc8874f2e760c2fd0f00cf3e85963507e9 golangci-lint-1.51.1-windows-armv7.zip # This is the builder on PPA that will build Go itself (inception-y), don't modify! +# +# This version is fine to be old and full of security holes, we just use it +# to build the latest Go. Don't change it. If it ever becomes insufficient, +# we need to switch over to a recursive builder to jump across supported +# versions. +# # version:ppa-builder 1.19.6 # https://go.dev/dl/ d7f0013f82e6d7f862cc6cb5c8cdb48eef5f2e239b35baa97e2f1a7466043767 go1.19.6.src.tar.gz diff --git a/build/ci.go b/build/ci.go index 6f0705fce5..869ca07d11 100644 --- a/build/ci.go +++ b/build/ci.go @@ -136,14 +136,6 @@ var ( "golang-go": "/usr/lib/go", } - // This is the version of Go that will be used to bootstrap the PPA builder. - // - // This version is fine to be old and full of security holes, we just use it - // to build the latest Go. Don't change it. If it ever becomes insufficient, - // we need to switch over to a recursive builder to jumpt across supported - // versions. - gobootVersion = "1.19.6" - // This is where the tests should be unpacked. executionSpecTestsDir = "tests/spec-tests" ) @@ -759,6 +751,10 @@ func doDebianSource(cmdline []string) { // to bootstrap the builder Go. func downloadGoBootstrapSources(cachedir string) string { csdb := build.MustLoadChecksums("build/checksums.txt") + gobootVersion, err := build.Version(csdb, "ppa-builder") + if err != nil { + log.Fatal(err) + } file := fmt.Sprintf("go%s.src.tar.gz", gobootVersion) url := "https://dl.google.com/go/" + file dst := filepath.Join(cachedir, file)