All checks were successful
Test / Create distribution (push) Successful in 59s
Test / Sandbox (push) Successful in 2m37s
Test / Hakurei (push) Successful in 3m59s
Test / ShareFS (push) Successful in 4m0s
Test / Hpkg (push) Successful in 4m33s
Test / Sandbox (race detector) (push) Successful in 5m12s
Test / Hakurei (race detector) (push) Successful in 5m56s
Test / Flake checks (push) Successful in 1m38s
This took far longer to complete because the aarch64 development machine is much slower. Signed-off-by: Ophestra <cat@gensokyo.uk>
76 lines
1.4 KiB
Go
76 lines
1.4 KiB
Go
package rosa
|
|
|
|
import (
|
|
"runtime"
|
|
"sync"
|
|
|
|
"hakurei.app/internal/pkg"
|
|
)
|
|
|
|
func (t Toolchain) newStage0() pkg.Artifact {
|
|
musl, compilerRT, runtimes, clang := t.NewLLVM()
|
|
return t.New("rosa-stage0", 0, []pkg.Artifact{
|
|
musl,
|
|
compilerRT,
|
|
runtimes,
|
|
clang,
|
|
|
|
t.Load(Bzip2),
|
|
|
|
t.Load(Patch),
|
|
t.Load(Make),
|
|
t.Load(CMake),
|
|
t.Load(Ninja),
|
|
|
|
t.Load(Libffi),
|
|
t.Load(Python),
|
|
t.Load(Perl),
|
|
t.Load(Diffutils),
|
|
t.Load(Bash),
|
|
t.Load(Gawk),
|
|
t.Load(Coreutils),
|
|
t.Load(Findutils),
|
|
|
|
t.Load(KernelHeaders),
|
|
}, nil, nil, `
|
|
umask 377
|
|
tar \
|
|
-vjc \
|
|
-C / \
|
|
-f /work/stage0-`+triplet()+`.tar.bz2 \
|
|
system bin usr/bin/env
|
|
`)
|
|
}
|
|
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"
|
|
case "arm64":
|
|
seed = "CJj3ZSnRyLmFHlWIQtTPQD9oikOZY4cD_mI3v_-LIYc2hhg-cq_CZFBLzQBAkFIn"
|
|
|
|
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
|
|
}
|