internal/rosa: replace busybox with toybox
All checks were successful
Test / Create distribution (push) Successful in 1m48s
Test / Sandbox (push) Successful in 4m0s
Test / ShareFS (push) Successful in 5m22s
Test / Hakurei (push) Successful in 5m26s
Test / Hpkg (push) Successful in 5m56s
Test / Sandbox (race detector) (push) Successful in 6m4s
Test / Hakurei (race detector) (push) Successful in 7m5s
Test / Flake checks (push) Successful in 2m2s

The busybox artifact does not run on aarch64, and the workarounds required for it to compile successfully on x86_64 is unacceptably shaky. This change fully replaces it with toybox.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-29 19:51:18 +09:00
parent 6c90e879da
commit abf96d2283
8 changed files with 21 additions and 7 deletions

View File

@@ -31,6 +31,7 @@ func (t Toolchain) newM4() pkg.Artifact {
) )
return t.New("m4-"+version, false, []pkg.Artifact{ return t.New("m4-"+version, false, []pkg.Artifact{
t.Load(Make), t.Load(Make),
t.Load(Coreutils),
}, nil, nil, ` }, nil, nil, `
cd /usr/src/m4 cd /usr/src/m4
chmod +w tests/test-c32ispunct.sh && echo '#!/bin/sh' > tests/test-c32ispunct.sh chmod +w tests/test-c32ispunct.sh && echo '#!/bin/sh' > tests/test-c32ispunct.sh
@@ -84,6 +85,7 @@ func (t Toolchain) newAutoconf() pkg.Artifact {
t.Load(M4), t.Load(M4),
t.Load(Perl), t.Load(Perl),
t.Load(Bash), t.Load(Bash),
t.Load(Coreutils),
}, nil, nil, ` }, nil, nil, `
cd "$(mktemp -d)" cd "$(mktemp -d)"
/usr/src/autoconf/configure \ /usr/src/autoconf/configure \
@@ -133,6 +135,9 @@ func (t Toolchain) newGettext() pkg.Artifact {
) )
return t.New("gettext-"+version, false, []pkg.Artifact{ return t.New("gettext-"+version, false, []pkg.Artifact{
t.Load(Make), t.Load(Make),
t.Load(Coreutils),
t.Load(Gzip),
t.Load(Sed),
}, nil, nil, ` }, nil, nil, `
cd /usr/src/gettext cd /usr/src/gettext
test_disable() { chmod +w "$2" && echo "$1" > "$2"; } test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
@@ -147,6 +152,8 @@ test_disable '#!/bin/sh' gettext-tools/tests/format-c-5
test_disable '#!/bin/sh' gettext-tools/gnulib-tests/test-c32ispunct.sh test_disable '#!/bin/sh' gettext-tools/gnulib-tests/test-c32ispunct.sh
test_disable 'int main(){return 0;}' gettext-tools/gnulib-tests/test-stdcountof-h.c test_disable 'int main(){return 0;}' gettext-tools/gnulib-tests/test-stdcountof-h.c
touch gettext-tools/misc/archive.dir.tar
cd "$(mktemp -d)" cd "$(mktemp -d)"
/usr/src/gettext/configure \ /usr/src/gettext/configure \
--prefix=/system \ --prefix=/system \
@@ -175,6 +182,7 @@ test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh
test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c
test_disable '#!/bin/sh' tests/cmp
cd "$(mktemp -d)" cd "$(mktemp -d)"
/usr/src/diffutils/configure \ /usr/src/diffutils/configure \
@@ -315,7 +323,7 @@ cd "$(mktemp -d)"
--build="${ROSA_TRIPLE}" --build="${ROSA_TRIPLE}"
make "-j$(nproc)" make "-j$(nproc)"
make DESTDIR=/work install make DESTDIR=/work install
`, pkg.Path(AbsUsrSrc.Append("gawk"), true, pkg.NewHTTPGetTar( `, pkg.Path(AbsUsrSrc.Append("gawk"), false, pkg.NewHTTPGetTar(
nil, "https://ftp.gnu.org/gnu/gawk/gawk-"+version+".tar.gz", nil, "https://ftp.gnu.org/gnu/gawk/gawk-"+version+".tar.gz",
mustDecode(checksum), mustDecode(checksum),
pkg.TarGzip, pkg.TarGzip,
@@ -333,9 +341,9 @@ func (t Toolchain) newFindutils() pkg.Artifact {
t.Load(XZ), t.Load(XZ),
t.Load(Sed), t.Load(Sed),
}, nil, nil, ` }, nil, nil, `
cd /usr/src cd /usr/src/
xzcat findutils.tar.xz | tar -x tar xf findutils.tar.xz
mv 'findutils-`+version+`' findutils mv findutils-`+version+` findutils
cd findutils cd findutils
echo '#!/bin/sh' > gnulib-tests/test-c32ispunct.sh echo '#!/bin/sh' > gnulib-tests/test-c32ispunct.sh

View File

@@ -20,7 +20,7 @@ cp -r /usr/src/go /work
cd /work/go/src cd /work/go/src
chmod -R +w .. chmod -R +w ..
ln -s ../system/bin/busybox /bin/pwd ln -s ../system/bin/toybox /bin/pwd
cat << EOF > /bin/hostname cat << EOF > /bin/hostname
#!/bin/sh #!/bin/sh
echo cure echo cure

View File

@@ -11,6 +11,8 @@ func (t Toolchain) newHakurei(script string) pkg.Artifact {
) )
return t.New("hakurei-"+version, false, []pkg.Artifact{ return t.New("hakurei-"+version, false, []pkg.Artifact{
t.Load(Go), t.Load(Go),
t.Load(Gzip),
t.Load(PkgConfig), t.Load(PkgConfig),
t.Load(KernelHeaders), t.Load(KernelHeaders),

View File

@@ -12,6 +12,7 @@ func (t Toolchain) newLibseccomp() pkg.Artifact {
return t.New("libseccomp-"+version, false, []pkg.Artifact{ return t.New("libseccomp-"+version, false, []pkg.Artifact{
t.Load(Make), t.Load(Make),
t.Load(Bash), t.Load(Bash),
t.Load(Coreutils),
t.Load(Gperf), t.Load(Gperf),
t.Load(KernelHeaders), t.Load(KernelHeaders),

View File

@@ -13,6 +13,7 @@ func (t Toolchain) newLibxml2() pkg.Artifact {
) )
return t.New("libxml2-"+version, false, []pkg.Artifact{ return t.New("libxml2-"+version, false, []pkg.Artifact{
t.Load(Make), t.Load(Make),
t.Load(XZ),
}, nil, nil, ` }, nil, nil, `
cd /usr/src/ cd /usr/src/
tar xf libxml2.tar.xz tar xf libxml2.tar.xz

View File

@@ -44,6 +44,7 @@ rmdir -v /work/lib
return t.New("musl-"+version, false, stage3Concat(t, attr.Extra, return t.New("musl-"+version, false, stage3Concat(t, attr.Extra,
t.Load(Make), t.Load(Make),
t.Load(Coreutils),
), nil, slices.Concat([]string{ ), nil, slices.Concat([]string{
"ROSA_MUSL_TARGET=" + target, "ROSA_MUSL_TARGET=" + target,
}, attr.Env), ` }, attr.Env), `

View File

@@ -13,6 +13,7 @@ func (t Toolchain) newPerl() pkg.Artifact {
chmod -R +w /usr/src/perl && cd /usr/src/perl chmod -R +w /usr/src/perl && cd /usr/src/perl
echo 'print STDOUT "1..0 # Skip broken test\n";' > ext/Pod-Html/t/htmldir3.t echo 'print STDOUT "1..0 # Skip broken test\n";' > ext/Pod-Html/t/htmldir3.t
rm -f /system/bin/ps # perl does not like toybox ps
./Configure \ ./Configure \
-des \ -des \

View File

@@ -190,7 +190,7 @@ func (t Toolchain) New(
var ( var (
path = AbsSystem.Append("bin", "sh") path = AbsSystem.Append("bin", "sh")
args = []string{"mksh", absCureScript.String()} args = []string{"sh", absCureScript.String()}
support []pkg.Artifact support []pkg.Artifact
) )
switch t { switch t {
@@ -255,7 +255,7 @@ ln -vs ../usr/bin /work/bin
runtimes, runtimes,
clang, clang,
boot.Load(Mksh), boot.Load(Mksh),
boot.Load(Busybox), boot.Load(Toybox),
}) })
env = fixupEnviron(env, []string{ env = fixupEnviron(env, []string{
EnvTriplet + "=" + triplet(), EnvTriplet + "=" + triplet(),