internal/rosa: self-host stage0 tarball
All checks were successful
Test / Create distribution (push) Successful in 59s
Test / Sandbox (push) Successful in 2m47s
Test / Hakurei (push) Successful in 3m54s
Test / ShareFS (push) Successful in 4m4s
Test / Hpkg (push) Successful in 4m40s
Test / Sandbox (race detector) (push) Successful in 5m3s
Test / Hakurei (race detector) (push) Successful in 3m54s
Test / Flake checks (push) Successful in 1m57s
All checks were successful
Test / Create distribution (push) Successful in 59s
Test / Sandbox (push) Successful in 2m47s
Test / Hakurei (push) Successful in 3m54s
Test / ShareFS (push) Successful in 4m4s
Test / Hpkg (push) Successful in 4m40s
Test / Sandbox (race detector) (push) Successful in 5m3s
Test / Hakurei (race detector) (push) Successful in 3m54s
Test / Flake checks (push) Successful in 1m57s
This replaces gentoo stage3 tarballs. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -109,46 +109,66 @@ func main() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
c.NewCommand(
|
{
|
||||||
"stage3",
|
var (
|
||||||
"Check for toolchain 3-stage non-determinism",
|
flagStage0 bool
|
||||||
func(args []string) (err error) {
|
)
|
||||||
_, _, _, stage1 := (rosa.Std - 2).NewLLVM()
|
c.NewCommand(
|
||||||
_, _, _, stage2 := (rosa.Std - 1).NewLLVM()
|
"stage3",
|
||||||
_, _, _, stage3 := rosa.Std.NewLLVM()
|
"Check for toolchain 3-stage non-determinism",
|
||||||
var (
|
func(args []string) (err error) {
|
||||||
pathname *check.Absolute
|
_, _, _, stage1 := (rosa.Std - 2).NewLLVM()
|
||||||
checksum [2]unique.Handle[pkg.Checksum]
|
_, _, _, stage2 := (rosa.Std - 1).NewLLVM()
|
||||||
)
|
_, _, _, stage3 := rosa.Std.NewLLVM()
|
||||||
|
var (
|
||||||
if pathname, _, err = cache.Cure(stage1); err != nil {
|
pathname *check.Absolute
|
||||||
return err
|
checksum [2]unique.Handle[pkg.Checksum]
|
||||||
}
|
|
||||||
log.Println("stage1:", pathname)
|
|
||||||
|
|
||||||
if pathname, checksum[0], err = cache.Cure(stage2); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
log.Println("stage2:", pathname)
|
|
||||||
if pathname, checksum[1], err = cache.Cure(stage3); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
log.Println("stage3:", pathname)
|
|
||||||
|
|
||||||
if checksum[0] != checksum[1] {
|
|
||||||
err = &pkg.ChecksumMismatchError{
|
|
||||||
Got: checksum[0].Value(),
|
|
||||||
Want: checksum[1].Value(),
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
log.Println(
|
|
||||||
"stage2 is identical to stage3",
|
|
||||||
"("+pkg.Encode(checksum[0].Value())+")",
|
|
||||||
)
|
)
|
||||||
}
|
|
||||||
return
|
if pathname, _, err = cache.Cure(stage1); err != nil {
|
||||||
},
|
return err
|
||||||
)
|
}
|
||||||
|
log.Println("stage1:", pathname)
|
||||||
|
|
||||||
|
if pathname, checksum[0], err = cache.Cure(stage2); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
log.Println("stage2:", pathname)
|
||||||
|
if pathname, checksum[1], err = cache.Cure(stage3); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
log.Println("stage3:", pathname)
|
||||||
|
|
||||||
|
if checksum[0] != checksum[1] {
|
||||||
|
err = &pkg.ChecksumMismatchError{
|
||||||
|
Got: checksum[0].Value(),
|
||||||
|
Want: checksum[1].Value(),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log.Println(
|
||||||
|
"stage2 is identical to stage3",
|
||||||
|
"("+pkg.Encode(checksum[0].Value())+")",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if flagStage0 {
|
||||||
|
if pathname, _, err = cache.Cure(
|
||||||
|
rosa.Std.Load(rosa.Stage0),
|
||||||
|
); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
log.Println(pathname)
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
},
|
||||||
|
).
|
||||||
|
Flag(
|
||||||
|
&flagStage0,
|
||||||
|
"stage0", command.BoolFlag(false),
|
||||||
|
"Create bootstrap stage0 tarball",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -83,6 +83,10 @@ const (
|
|||||||
// stages only. This preset and its direct output must never be exposed.
|
// stages only. This preset and its direct output must never be exposed.
|
||||||
gcc
|
gcc
|
||||||
|
|
||||||
|
// Stage0 is a tarball containing all compile-time dependencies of artifacts
|
||||||
|
// part of the [Std] toolchain.
|
||||||
|
Stage0
|
||||||
|
|
||||||
// _presetEnd is the total number of presets and does not denote a preset.
|
// _presetEnd is the total number of presets and does not denote a preset.
|
||||||
_presetEnd
|
_presetEnd
|
||||||
)
|
)
|
||||||
|
|||||||
40
internal/rosa/stage0.go
Normal file
40
internal/rosa/stage0.go
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
package rosa
|
||||||
|
|
||||||
|
import "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, `
|
||||||
|
chmod +w /bin
|
||||||
|
umask 377
|
||||||
|
tar \
|
||||||
|
-vjc \
|
||||||
|
-C / \
|
||||||
|
-f /work/stage0-`+triplet()+`.tar.bz2 \
|
||||||
|
system bin usr/bin/env
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
func init() { artifactsF[Stage0] = Toolchain.newStage0 }
|
||||||
Reference in New Issue
Block a user