internal/rosa: use self-hosted stage0
All checks were successful
Test / Create distribution (push) Successful in 59s
Test / Sandbox (push) Successful in 2m42s
Test / Hakurei (push) Successful in 3m53s
Test / ShareFS (push) Successful in 4m3s
Test / Hpkg (push) Successful in 4m31s
Test / Sandbox (race detector) (push) Successful in 5m4s
Test / Hakurei (race detector) (push) Successful in 5m58s
Test / Flake checks (push) Successful in 3m10s
All checks were successful
Test / Create distribution (push) Successful in 59s
Test / Sandbox (push) Successful in 2m42s
Test / Hakurei (push) Successful in 3m53s
Test / ShareFS (push) Successful in 4m3s
Test / Hpkg (push) Successful in 4m31s
Test / Sandbox (race detector) (push) Successful in 5m4s
Test / Hakurei (race detector) (push) Successful in 5m58s
Test / Flake checks (push) Successful in 3m10s
This removes the bootstrap dependency on Gentoo stage3 tarball. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
import (
|
||||
"runtime"
|
||||
"sync"
|
||||
|
||||
"hakurei.app/internal/pkg"
|
||||
)
|
||||
|
||||
func (t Toolchain) newStage0() pkg.Artifact {
|
||||
musl, compilerRT, runtimes, clang := t.NewLLVM()
|
||||
@@ -37,3 +42,32 @@ tar \
|
||||
`)
|
||||
}
|
||||
func init() { artifactsF[Stage0] = Toolchain.newStage0 }
|
||||
|
||||
var (
|
||||
// stage0 stores the tarball unpack artifact.
|
||||
stage0 pkg.Artifact
|
||||
// stage0Once is for lazy initialisation of stage0.
|
||||
stage0Once sync.Once
|
||||
)
|
||||
|
||||
// NewStage0 returns a stage0 distribution created from curing [Stage0].
|
||||
func NewStage0() pkg.Artifact {
|
||||
stage0Once.Do(func() {
|
||||
var seed string
|
||||
switch runtime.GOARCH {
|
||||
case "amd64":
|
||||
seed = "tqM1Li15BJ-uFG8zU-XjgFxoN_kuzh1VxrSDVUVa0vGmo-NeWapSftH739sY8EAg"
|
||||
|
||||
default:
|
||||
panic("unsupported target " + runtime.GOARCH)
|
||||
}
|
||||
|
||||
stage0 = pkg.NewHTTPGetTar(
|
||||
nil, "https://hakurei.app/seed/20260210/"+
|
||||
"stage0-"+triplet()+".tar.bz2",
|
||||
mustDecode(seed),
|
||||
pkg.TarBzip2,
|
||||
)
|
||||
})
|
||||
return stage0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user