internal/rosa/package: migrate stage0
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m58s
Test / ShareFS (push) Successful in 3m45s
Test / Hakurei (push) Successful in 3m53s
Test / Sandbox (race detector) (push) Successful in 5m33s
Test / Hakurei (race detector) (push) Successful in 6m34s
Test / Flake checks (push) Successful in 1m19s
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m58s
Test / ShareFS (push) Successful in 3m45s
Test / Hakurei (push) Successful in 3m53s
Test / Sandbox (race detector) (push) Successful in 5m33s
Test / Hakurei (race detector) (push) Successful in 6m34s
Test / Flake checks (push) Successful in 1m19s
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -439,8 +439,6 @@ func main() {
|
|||||||
var (
|
var (
|
||||||
flagGentoo string
|
flagGentoo string
|
||||||
flagChecksum string
|
flagChecksum string
|
||||||
|
|
||||||
flagStage0 bool
|
|
||||||
)
|
)
|
||||||
c.NewCommand(
|
c.NewCommand(
|
||||||
"stage3",
|
"stage3",
|
||||||
@@ -502,17 +500,6 @@ func main() {
|
|||||||
"("+pkg.Encode(checksum[0].Value())+")",
|
"("+pkg.Encode(checksum[0].Value())+")",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if flagStage0 {
|
|
||||||
if err = cm.Do(func(cache *pkg.Cache) (err error) {
|
|
||||||
pathname, _, err = cache.Cure(rosa.Native().Std().NewStage0())
|
|
||||||
return
|
|
||||||
}); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
log.Println(pathname)
|
|
||||||
}
|
|
||||||
|
|
||||||
return
|
return
|
||||||
},
|
},
|
||||||
).Flag(
|
).Flag(
|
||||||
@@ -523,10 +510,6 @@ func main() {
|
|||||||
&flagChecksum,
|
&flagChecksum,
|
||||||
"checksum", command.StringFlag(""),
|
"checksum", command.StringFlag(""),
|
||||||
"Checksum of Gentoo stage3 tarball",
|
"Checksum of Gentoo stage3 tarball",
|
||||||
).Flag(
|
|
||||||
&flagStage0,
|
|
||||||
"stage0", command.BoolFlag(false),
|
|
||||||
"Create bootstrap stage0 tarball",
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,31 @@
|
|||||||
package stage0-dist {
|
package rosa-stage0 {
|
||||||
description = "Rosa OS stage0 bootstrap seed";
|
description = "Rosa OS stage0 bootstrap seed";
|
||||||
|
version = unversioned;
|
||||||
|
exclude = true;
|
||||||
|
|
||||||
|
source = hakurei-source;
|
||||||
|
extra = [
|
||||||
|
llvm,
|
||||||
|
mksh,
|
||||||
|
toybox-early,
|
||||||
|
];
|
||||||
|
overlay = "/stage0";
|
||||||
|
exec = generic {
|
||||||
|
build = `
|
||||||
|
umask 377
|
||||||
|
tar \
|
||||||
|
-vjc \
|
||||||
|
-C /stage0 \
|
||||||
|
-f /work/stage0-`+triple+`.tar.bz2 \
|
||||||
|
.
|
||||||
|
`;
|
||||||
|
};
|
||||||
|
|
||||||
|
inputs = [ bzip2 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
package stage0-dist {
|
||||||
|
description = "Rosa OS stage0 bootstrap seed (binary distribution)";
|
||||||
exclude = true;
|
exclude = true;
|
||||||
|
|
||||||
version* = "20260504";
|
version* = "20260504";
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ const (
|
|||||||
stageIntermediateGentoo
|
stageIntermediateGentoo
|
||||||
|
|
||||||
// stageStdGentoo is like Std, but bootstrapped from stageGentoo. This
|
// stageStdGentoo is like Std, but bootstrapped from stageGentoo. This
|
||||||
// toolchain creates the first [Stage0] distribution.
|
// toolchain creates the first stage0 distribution.
|
||||||
stageStdGentoo
|
stageStdGentoo
|
||||||
|
|
||||||
// stageEarly denotes the stage0 toolchain. Special care must be taken
|
// stageEarly denotes the stage0 toolchain. Special care must be taken
|
||||||
@@ -322,24 +322,6 @@ mkdir -vp /work/system/bin
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewStage0 returns a [pkg.Artifact] curing to a stage0 distribution.
|
|
||||||
func (t Toolchain) NewStage0() pkg.Artifact {
|
|
||||||
return t.New("stage0", 0, t.Append(nil,
|
|
||||||
H("bzip2"),
|
|
||||||
), nil, nil, `
|
|
||||||
umask 377
|
|
||||||
tar \
|
|
||||||
-vjc \
|
|
||||||
-C /stage0 \
|
|
||||||
-f /work/stage0-`+t.triple()+`.tar.bz2 \
|
|
||||||
.
|
|
||||||
`, pkg.Path(fhs.AbsRoot.Append("stage0"), false, t.Append(nil,
|
|
||||||
_llvm,
|
|
||||||
_mksh,
|
|
||||||
_toyboxEarly,
|
|
||||||
)...))
|
|
||||||
}
|
|
||||||
|
|
||||||
// HasStageEarly returns whether a stage0 distribution is available.
|
// HasStageEarly returns whether a stage0 distribution is available.
|
||||||
func (s *S) HasStageEarly() (ok bool) {
|
func (s *S) HasStageEarly() (ok bool) {
|
||||||
func() {
|
func() {
|
||||||
|
|||||||
Reference in New Issue
Block a user