From 9fb0722cdf58aac3d630dc0de51b9758c0d63e93 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 8 Feb 2026 01:44:08 +0900 Subject: [PATCH 1/3] internal/rosa/go: alternative bootstrap path For targets where the bootstrap toolchain is not available. Signed-off-by: Ophestra --- internal/rosa/go.go | 46 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/internal/rosa/go.go b/internal/rosa/go.go index 31417ee..27bfa43 100644 --- a/internal/rosa/go.go +++ b/internal/rosa/go.go @@ -63,18 +63,54 @@ ln -s \ } func (t Toolchain) newGoLatest() pkg.Artifact { + var ( + bootstrapEnv []string + bootstrapExtra []pkg.Artifact + + finalEnv []string + ) + switch runtime.GOARCH { + case "amd64": + bootstrapExtra = append(bootstrapExtra, t.newGoBootstrap()) + + case "arm64": + bootstrapEnv = append(bootstrapEnv, + "GOROOT_BOOTSTRAP=/system", + ) + bootstrapExtra = append(bootstrapExtra, + t.Load(Binutils), + + t.Load(GMP), + t.Load(MPFR), + t.Load(MPC), + + t.Load(Zlib), + t.Load(Libucontext), + + t.Load(gcc), + ) + + finalEnv = append(finalEnv, "CGO_ENABLED=0") + + default: + panic("unsupported target " + runtime.GOARCH) + } + go119 := t.newGo( "1.19", "9_e0aFHsIkVxWVGsp9T2RvvjOc3p4n9o9S8tkNe9Cvgzk_zI2FhRQB7ioQkeAAro", - []string{"CGO_ENABLED=0"}, ` + append(bootstrapEnv, "CGO_ENABLED=0"), ` rm \ crypto/tls/handshake_client_test.go \ + cmd/pprof/pprof_test.go \ os/os_unix_test.go +sed -i \ + 's/os\.Getenv("GCCGO")$/"nonexistent"/' \ + go/internal/gccgoimporter/importer_test.go echo \ 'type syscallDescriptor = int' >> \ os/rawconn_test.go -`, t.newGoBootstrap(), - ) +`, bootstrapExtra...) go121 := t.newGo( "1.21.13", @@ -97,7 +133,7 @@ echo \ go123 := t.newGo( "1.23.12", "wcI32bl1tkqbgcelGtGWPI4RtlEddd-PTd76Eb-k7nXA5LbE9yTNdIL9QSOOxMOs", - nil, ` + []string{"CGO_ENABLED=0"}, ` sed -i \ 's,/lib/ld-musl-`+linuxArch()+`.so.1,/system/bin/linker,' \ cmd/link/internal/`+runtime.GOARCH+`/obj.go @@ -107,7 +143,7 @@ sed -i \ go125 := t.newGo( "1.25.6", "x0z430qoDvQbbw_fftjW0rh_GSoh0VJhPzttWk_0hj9yz9AKOjuwRMupF_Q0dbt7", - nil, ` + finalEnv, ` sed -i \ 's,/lib/ld-musl-`+linuxArch()+`.so.1,/system/bin/linker,' \ cmd/link/internal/`+runtime.GOARCH+`/obj.go From a9e2a5e59f667dcccda3cd508d30745dbb19c724 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 8 Feb 2026 15:42:58 +0900 Subject: [PATCH 2/3] internal/rosa/go: 1.25.6 to 1.25.7 Signed-off-by: Ophestra --- internal/rosa/go.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rosa/go.go b/internal/rosa/go.go index 27bfa43..e365287 100644 --- a/internal/rosa/go.go +++ b/internal/rosa/go.go @@ -141,8 +141,8 @@ sed -i \ ) go125 := t.newGo( - "1.25.6", - "x0z430qoDvQbbw_fftjW0rh_GSoh0VJhPzttWk_0hj9yz9AKOjuwRMupF_Q0dbt7", + "1.25.7", + "fyylHdBVRUobnBjYj3NKBaYPUw3kGmo2mEELiZonOYurPfbarNU1x77B99Fjut7Q", finalEnv, ` sed -i \ 's,/lib/ld-musl-`+linuxArch()+`.so.1,/system/bin/linker,' \ From c4f64f7606f1779f3939b40c7193b70415f102e5 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 8 Feb 2026 16:03:41 +0900 Subject: [PATCH 3/3] dist: include target in filename Backport patch will be removed in the next release. Signed-off-by: Ophestra --- dist/release.sh | 2 +- internal/rosa/hakurei.go | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/dist/release.sh b/dist/release.sh index 0ba9104..2990ee1 100755 --- a/dist/release.sh +++ b/dist/release.sh @@ -1,7 +1,7 @@ #!/bin/sh -e cd "$(dirname -- "$0")/.." VERSION="${HAKUREI_VERSION:-untagged}" -pname="hakurei-${VERSION}" +pname="hakurei-${VERSION}-$(go env GOARCH)" out="${DESTDIR:-dist}/${pname}" echo '# Preparing distribution files.' diff --git a/internal/rosa/hakurei.go b/internal/rosa/hakurei.go index cefd224..f264284 100644 --- a/internal/rosa/hakurei.go +++ b/internal/rosa/hakurei.go @@ -49,7 +49,7 @@ HAKUREI_VERSION='v`+version+`' "v"+version+".tar.gz", mustDecode(checksum), pkg.TarGzip, - ), true, [2]string{"dist", `From 67e453f5c4de915de23ecbe5980e595758f0f2fb Mon Sep 17 00:00:00 2001 + ), true, [2]string{"dist-00-tests", `From 67e453f5c4de915de23ecbe5980e595758f0f2fb Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 27 Jan 2026 06:49:48 +0900 Subject: [PATCH] dist: run tests @@ -236,7 +236,20 @@ index d737a18..98713cb 100644 + if !cur.EqualWithIgnore(mnt[i], "\x00") { fail = true - log.Printf("[FAIL] %s", cur)`}), + log.Printf("[FAIL] %s", cur)`}, [2]string{"dist-01-tarball-name", `diff --git a/dist/release.sh b/dist/release.sh +index 0ba9104..2990ee1 100755 +--- a/dist/release.sh ++++ b/dist/release.sh +@@ -1,7 +1,7 @@ + #!/bin/sh -e + cd "$(dirname -- "$0")/.." + VERSION="${HAKUREI_VERSION:-untagged}" +-pname="hakurei-${VERSION}" ++pname="hakurei-${VERSION}-$(go env GOARCH)" + out="${DESTDIR:-dist}/${pname}" + + echo '# Preparing distribution files.' +`}), ), pkg.Path(AbsUsrSrc.Append("hostname", "main.go"), false, pkg.NewFile( "hostname.go", []byte(`