internal/rosa: consistent stage0 paths
Some checks failed
Test / Hakurei (race detector) (push) Has been cancelled
Test / Flake checks (push) Has been cancelled
Test / Hpkg (push) Has been cancelled
Test / Sandbox (push) Has been cancelled
Test / Hakurei (push) Has been cancelled
Test / Sandbox (race detector) (push) Has been cancelled
Test / Create distribution (push) Has been cancelled
Test / ShareFS (push) Has been cancelled
Some checks failed
Test / Hakurei (race detector) (push) Has been cancelled
Test / Flake checks (push) Has been cancelled
Test / Hpkg (push) Has been cancelled
Test / Sandbox (push) Has been cancelled
Test / Hakurei (push) Has been cancelled
Test / Sandbox (race detector) (push) Has been cancelled
Test / Create distribution (push) Has been cancelled
Test / ShareFS (push) Has been cancelled
This makes using the gentoo stage3 as our stage0 compatible with Rosa OS stage0 tarballs. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -173,7 +173,7 @@ func fixupEnviron(env, extras []string, paths ...string) []string {
|
|||||||
|
|
||||||
// absCureScript is the absolute pathname [Toolchain.New] places the fixed-up
|
// absCureScript is the absolute pathname [Toolchain.New] places the fixed-up
|
||||||
// build script under.
|
// build script under.
|
||||||
var absCureScript = fhs.AbsUsrBin.Append(".cure-script")
|
var absCureScript = AbsSystem.Append("bin", ".cure-script")
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// TExclusive denotes an exclusive [pkg.Artifact].
|
// TExclusive denotes an exclusive [pkg.Artifact].
|
||||||
@@ -187,7 +187,7 @@ func (t Toolchain) New(
|
|||||||
name string,
|
name string,
|
||||||
flag int,
|
flag int,
|
||||||
extra []pkg.Artifact,
|
extra []pkg.Artifact,
|
||||||
checksum *pkg.Checksum,
|
knownChecksum *pkg.Checksum,
|
||||||
env []string,
|
env []string,
|
||||||
script string,
|
script string,
|
||||||
|
|
||||||
@@ -204,8 +204,6 @@ func (t Toolchain) New(
|
|||||||
case toolchainBusybox:
|
case toolchainBusybox:
|
||||||
name += "-early"
|
name += "-early"
|
||||||
support = slices.Concat([]pkg.Artifact{newBusyboxBin()}, extra)
|
support = slices.Concat([]pkg.Artifact{newBusyboxBin()}, extra)
|
||||||
path = AbsSystem.Append("bin", "busybox")
|
|
||||||
args[0] = "hush"
|
|
||||||
env = fixupEnviron(env, nil, "/system/bin")
|
env = fixupEnviron(env, nil, "/system/bin")
|
||||||
|
|
||||||
case toolchainStage0:
|
case toolchainStage0:
|
||||||
@@ -220,14 +218,14 @@ func (t Toolchain) New(
|
|||||||
default:
|
default:
|
||||||
panic("unsupported target " + runtime.GOARCH)
|
panic("unsupported target " + runtime.GOARCH)
|
||||||
}
|
}
|
||||||
path = fhs.AbsRoot.Append("bin", "bash")
|
|
||||||
args[0] = "bash"
|
|
||||||
support = slices.Concat([]pkg.Artifact{
|
support = slices.Concat([]pkg.Artifact{
|
||||||
cureEtc{},
|
cureEtc{},
|
||||||
toolchainBusybox.New("stage0", 0, nil, nil, nil, `
|
toolchainBusybox.New("stage0", 0, nil, nil, nil, `
|
||||||
tar -C /work -xf /usr/src/stage0.tar.xz
|
tar -C /work -xf /usr/src/stage0.tar.xz
|
||||||
rm -rf /work/dev/ /work/proc/
|
rm -rf /work/dev/ /work/proc/
|
||||||
ln -vs ../usr/bin /work/bin
|
ln -vs ../usr/bin /work/bin
|
||||||
|
mkdir -vp /work/system/bin
|
||||||
|
ln -vs ../../bin/sh /work/system/bin
|
||||||
`, pkg.Path(AbsUsrSrc.Append("stage0.tar.xz"), false,
|
`, pkg.Path(AbsUsrSrc.Append("stage0.tar.xz"), false,
|
||||||
pkg.NewHTTPGet(
|
pkg.NewHTTPGet(
|
||||||
nil, "https://basement.gensokyo.uk/seed/"+seed,
|
nil, "https://basement.gensokyo.uk/seed/"+seed,
|
||||||
@@ -279,7 +277,7 @@ ln -vs ../usr/bin /work/bin
|
|||||||
}
|
}
|
||||||
|
|
||||||
return pkg.NewExec(
|
return pkg.NewExec(
|
||||||
name, checksum, pkg.ExecTimeoutMax, flag&TExclusive != 0,
|
name, knownChecksum, pkg.ExecTimeoutMax, flag&TExclusive != 0,
|
||||||
fhs.AbsRoot, env,
|
fhs.AbsRoot, env,
|
||||||
path, args,
|
path, args,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user