internal/rosa: early toybox variant
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m52s
Test / Hakurei (push) Successful in 5m6s
Test / ShareFS (push) Successful in 5m15s
Test / Hpkg (push) Successful in 5m55s
Test / Sandbox (race detector) (push) Successful in 6m15s
Test / Hakurei (race detector) (push) Successful in 7m16s
Test / Flake checks (push) Successful in 2m35s
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m52s
Test / Hakurei (push) Successful in 5m6s
Test / ShareFS (push) Successful in 5m15s
Test / Hpkg (push) Successful in 5m55s
Test / Sandbox (race detector) (push) Successful in 6m15s
Test / Hakurei (race detector) (push) Successful in 7m16s
Test / Flake checks (push) Successful in 2m35s
This is a variant of toybox with unfinished tools enabled, for artifacts that will end up in a dependency loop without them. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -54,6 +54,7 @@ const (
|
|||||||
Sed
|
Sed
|
||||||
Setuptools
|
Setuptools
|
||||||
Toybox
|
Toybox
|
||||||
|
toyboxEarly
|
||||||
Wayland
|
Wayland
|
||||||
WaylandProtocols
|
WaylandProtocols
|
||||||
XCB
|
XCB
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ func (t Toolchain) newGit() pkg.Artifact {
|
|||||||
)
|
)
|
||||||
return t.New("git-"+version, 0, stage3Concat(t, []pkg.Artifact{},
|
return t.New("git-"+version, 0, stage3Concat(t, []pkg.Artifact{},
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
|
t.Load(Gawk),
|
||||||
|
t.Load(Coreutils),
|
||||||
t.Load(Perl),
|
t.Load(Perl),
|
||||||
t.Load(M4),
|
t.Load(M4),
|
||||||
t.Load(Autoconf),
|
t.Load(Autoconf),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ func (t Toolchain) newMake() pkg.Artifact {
|
|||||||
version = "4.4.1"
|
version = "4.4.1"
|
||||||
checksum = "YS_B07ZcAy9PbaK5_vKGj64SrxO2VMpnMKfc9I0Q9IC1rn0RwOH7802pJoj2Mq4a"
|
checksum = "YS_B07ZcAy9PbaK5_vKGj64SrxO2VMpnMKfc9I0Q9IC1rn0RwOH7802pJoj2Mq4a"
|
||||||
)
|
)
|
||||||
return t.New("make-"+version, 0, nil, nil, nil, `
|
return t.New("make-"+version, TEarly, nil, nil, nil, `
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
/usr/src/make/configure \
|
/usr/src/make/configure \
|
||||||
--prefix=/system \
|
--prefix=/system \
|
||||||
@@ -31,7 +31,9 @@ func (t Toolchain) newM4() pkg.Artifact {
|
|||||||
)
|
)
|
||||||
return t.New("m4-"+version, 0, []pkg.Artifact{
|
return t.New("m4-"+version, 0, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
|
t.Load(Gawk),
|
||||||
t.Load(Coreutils),
|
t.Load(Coreutils),
|
||||||
|
t.Load(Diffutils),
|
||||||
}, 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
|
||||||
@@ -59,6 +61,8 @@ func (t Toolchain) newSed() pkg.Artifact {
|
|||||||
return t.New("sed-"+version, 0, []pkg.Artifact{
|
return t.New("sed-"+version, 0, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
t.Load(Gawk),
|
t.Load(Gawk),
|
||||||
|
t.Load(Coreutils),
|
||||||
|
t.Load(Diffutils),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
/usr/src/sed/configure \
|
/usr/src/sed/configure \
|
||||||
@@ -85,7 +89,9 @@ 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(Gawk),
|
||||||
t.Load(Coreutils),
|
t.Load(Coreutils),
|
||||||
|
t.Load(Diffutils),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
/usr/src/autoconf/configure \
|
/usr/src/autoconf/configure \
|
||||||
@@ -112,6 +118,8 @@ func (t Toolchain) newGzip() pkg.Artifact {
|
|||||||
)
|
)
|
||||||
return t.New("gzip-"+version, 0, []pkg.Artifact{
|
return t.New("gzip-"+version, 0, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
|
t.Load(Gawk),
|
||||||
|
t.Load(Coreutils),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
/usr/src/gzip/configure \
|
/usr/src/gzip/configure \
|
||||||
@@ -135,7 +143,9 @@ func (t Toolchain) newGettext() pkg.Artifact {
|
|||||||
)
|
)
|
||||||
return t.New("gettext-"+version, 0, []pkg.Artifact{
|
return t.New("gettext-"+version, 0, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
|
t.Load(Gawk),
|
||||||
t.Load(Coreutils),
|
t.Load(Coreutils),
|
||||||
|
t.Load(Diffutils),
|
||||||
t.Load(Gzip),
|
t.Load(Gzip),
|
||||||
t.Load(Sed),
|
t.Load(Sed),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
@@ -174,7 +184,7 @@ func (t Toolchain) newDiffutils() pkg.Artifact {
|
|||||||
version = "3.12"
|
version = "3.12"
|
||||||
checksum = "9J5VAq5oA7eqwzS1Yvw-l3G5o-TccUrNQR3PvyB_lgdryOFAfxtvQfKfhdpquE44"
|
checksum = "9J5VAq5oA7eqwzS1Yvw-l3G5o-TccUrNQR3PvyB_lgdryOFAfxtvQfKfhdpquE44"
|
||||||
)
|
)
|
||||||
return t.New("diffutils-"+version, 0, []pkg.Artifact{
|
return t.New("diffutils-"+version, TEarly, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
cd /usr/src/diffutils
|
cd /usr/src/diffutils
|
||||||
@@ -204,7 +214,7 @@ func (t Toolchain) newPatch() pkg.Artifact {
|
|||||||
version = "2.8"
|
version = "2.8"
|
||||||
checksum = "MA0BQc662i8QYBD-DdGgyyfTwaeALZ1K0yusV9rAmNiIsQdX-69YC4t9JEGXZkeR"
|
checksum = "MA0BQc662i8QYBD-DdGgyyfTwaeALZ1K0yusV9rAmNiIsQdX-69YC4t9JEGXZkeR"
|
||||||
)
|
)
|
||||||
return t.New("patch-"+version, 0, []pkg.Artifact{
|
return t.New("patch-"+version, TEarly, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
cd /usr/src/patch
|
cd /usr/src/patch
|
||||||
@@ -233,7 +243,7 @@ func (t Toolchain) newBash() pkg.Artifact {
|
|||||||
version = "5.3"
|
version = "5.3"
|
||||||
checksum = "4LQ_GRoB_ko-Ih8QPf_xRKA02xAm_TOxQgcJLmFDT6udUPxTAWrsj-ZNeuTusyDq"
|
checksum = "4LQ_GRoB_ko-Ih8QPf_xRKA02xAm_TOxQgcJLmFDT6udUPxTAWrsj-ZNeuTusyDq"
|
||||||
)
|
)
|
||||||
return t.New("bash-"+version, 0, []pkg.Artifact{
|
return t.New("bash-"+version, TEarly, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
@@ -258,7 +268,7 @@ func (t Toolchain) newCoreutils() pkg.Artifact {
|
|||||||
version = "9.9"
|
version = "9.9"
|
||||||
checksum = "B1_TaXj1j5aiVIcazLWu8Ix03wDV54uo2_iBry4qHG6Y-9bjDpUPlkNLmU_3Nvw6"
|
checksum = "B1_TaXj1j5aiVIcazLWu8Ix03wDV54uo2_iBry4qHG6Y-9bjDpUPlkNLmU_3Nvw6"
|
||||||
)
|
)
|
||||||
return t.New("coreutils-"+version, 0, []pkg.Artifact{
|
return t.New("coreutils-"+version, TEarly, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
t.Load(Perl),
|
t.Load(Perl),
|
||||||
t.Load(Bash),
|
t.Load(Bash),
|
||||||
@@ -314,7 +324,7 @@ func (t Toolchain) newGawk() pkg.Artifact {
|
|||||||
version = "5.3.2"
|
version = "5.3.2"
|
||||||
checksum = "uIs0d14h_d2DgMGYwrPtegGNyt_bxzG3D6Fe-MmExx_pVoVkQaHzrtmiXVr6NHKk"
|
checksum = "uIs0d14h_d2DgMGYwrPtegGNyt_bxzG3D6Fe-MmExx_pVoVkQaHzrtmiXVr6NHKk"
|
||||||
)
|
)
|
||||||
return t.New("gawk-"+version, 0, []pkg.Artifact{
|
return t.New("gawk-"+version, TEarly, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
@@ -338,6 +348,9 @@ func (t Toolchain) newFindutils() pkg.Artifact {
|
|||||||
)
|
)
|
||||||
return t.New("findutils-"+version, 0, []pkg.Artifact{
|
return t.New("findutils-"+version, 0, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
|
t.Load(Gawk),
|
||||||
|
t.Load(Coreutils),
|
||||||
|
t.Load(Diffutils),
|
||||||
t.Load(XZ),
|
t.Load(XZ),
|
||||||
t.Load(Sed),
|
t.Load(Sed),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ cd /usr/src/linux
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t Toolchain) newKernelHeaders() pkg.Artifact {
|
func (t Toolchain) newKernelHeaders() pkg.Artifact {
|
||||||
return t.newKernel(0, nil, `
|
return t.newKernel(TEarly, nil, `
|
||||||
make "-j$(nproc)" \
|
make "-j$(nproc)" \
|
||||||
INSTALL_HDR_PATH=/work/system \
|
INSTALL_HDR_PATH=/work/system \
|
||||||
headers_install
|
headers_install
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ func (t Toolchain) newLibffi() pkg.Artifact {
|
|||||||
)
|
)
|
||||||
return t.New("libffi-"+version, 0, []pkg.Artifact{
|
return t.New("libffi-"+version, 0, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
|
t.Load(Gawk),
|
||||||
|
t.Load(Coreutils),
|
||||||
|
|
||||||
t.Load(KernelHeaders),
|
t.Load(KernelHeaders),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ cp -r /system/include /usr/include && rm -rf /system/include
|
|||||||
t.Load(Perl),
|
t.Load(Perl),
|
||||||
t.Load(Diffutils),
|
t.Load(Diffutils),
|
||||||
t.Load(Bash),
|
t.Load(Bash),
|
||||||
|
t.Load(Gawk),
|
||||||
t.Load(Coreutils),
|
t.Load(Coreutils),
|
||||||
t.Load(Findutils),
|
t.Load(Findutils),
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ func (t Toolchain) newMksh() pkg.Artifact {
|
|||||||
return t.New("mksh-"+version, 0, stage3Concat(t, []pkg.Artifact{},
|
return t.New("mksh-"+version, 0, stage3Concat(t, []pkg.Artifact{},
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
t.Load(Perl),
|
t.Load(Perl),
|
||||||
|
t.Load(Coreutils),
|
||||||
), nil, []string{
|
), nil, []string{
|
||||||
"LDSTATIC=-static",
|
"LDSTATIC=-static",
|
||||||
}, `
|
}, `
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ func (t Toolchain) newPerl() pkg.Artifact {
|
|||||||
version = "5.42.0"
|
version = "5.42.0"
|
||||||
checksum = "2KR7Jbpk-ZVn1a30LQRwbgUvg2AXlPQZfzrqCr31qD5-yEsTwVQ_W76eZH-EdxM9"
|
checksum = "2KR7Jbpk-ZVn1a30LQRwbgUvg2AXlPQZfzrqCr31qD5-yEsTwVQ_W76eZH-EdxM9"
|
||||||
)
|
)
|
||||||
return t.New("perl-"+version, 0, []pkg.Artifact{
|
return t.New("perl-"+version, TEarly, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
chmod -R +w /usr/src/perl && cd /usr/src/perl
|
chmod -R +w /usr/src/perl && cd /usr/src/perl
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ func (t Toolchain) newPython() pkg.Artifact {
|
|||||||
}
|
}
|
||||||
return t.New("python-"+version, 0, []pkg.Artifact{
|
return t.New("python-"+version, 0, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
|
t.Load(Gawk),
|
||||||
|
t.Load(Coreutils),
|
||||||
|
|
||||||
t.Load(Zlib),
|
t.Load(Zlib),
|
||||||
t.Load(Libffi),
|
t.Load(Libffi),
|
||||||
}, nil, []string{
|
}, nil, []string{
|
||||||
|
|||||||
@@ -178,6 +178,8 @@ var absCureScript = fhs.AbsUsrBin.Append(".cure-script")
|
|||||||
const (
|
const (
|
||||||
// TExclusive denotes an exclusive [pkg.Artifact].
|
// TExclusive denotes an exclusive [pkg.Artifact].
|
||||||
TExclusive = 1 << iota
|
TExclusive = 1 << iota
|
||||||
|
// TEarly hints for an early variant of [Toybox] to be used when available.
|
||||||
|
TEarly
|
||||||
)
|
)
|
||||||
|
|
||||||
// New returns a [pkg.Artifact] compiled on this toolchain.
|
// New returns a [pkg.Artifact] compiled on this toolchain.
|
||||||
@@ -253,6 +255,10 @@ ln -vs ../usr/bin /work/bin
|
|||||||
|
|
||||||
boot := t - 1
|
boot := t - 1
|
||||||
musl, compilerRT, runtimes, clang := boot.NewLLVM()
|
musl, compilerRT, runtimes, clang := boot.NewLLVM()
|
||||||
|
toybox := Toybox
|
||||||
|
if flag&TEarly != 0 {
|
||||||
|
toybox = toyboxEarly
|
||||||
|
}
|
||||||
support = slices.Concat(extra, []pkg.Artifact{
|
support = slices.Concat(extra, []pkg.Artifact{
|
||||||
cureEtc{newIANAEtc()},
|
cureEtc{newIANAEtc()},
|
||||||
musl,
|
musl,
|
||||||
@@ -260,7 +266,7 @@ ln -vs ../usr/bin /work/bin
|
|||||||
runtimes,
|
runtimes,
|
||||||
clang,
|
clang,
|
||||||
boot.Load(Mksh),
|
boot.Load(Mksh),
|
||||||
boot.Load(Toybox),
|
boot.Load(toybox),
|
||||||
})
|
})
|
||||||
env = fixupEnviron(env, []string{
|
env = fixupEnviron(env, []string{
|
||||||
EnvTriplet + "=" + triplet(),
|
EnvTriplet + "=" + triplet(),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ func (t Toolchain) newRsync() pkg.Artifact {
|
|||||||
version = "3.4.1"
|
version = "3.4.1"
|
||||||
checksum = "VBlTsBWd9z3r2-ex7GkWeWxkUc5OrlgDzikAC0pK7ufTjAJ0MbmC_N04oSVTGPiv"
|
checksum = "VBlTsBWd9z3r2-ex7GkWeWxkUc5OrlgDzikAC0pK7ufTjAJ0MbmC_N04oSVTGPiv"
|
||||||
)
|
)
|
||||||
return t.New("rsync-"+version, 0, []pkg.Artifact{
|
return t.New("rsync-"+version, TEarly, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
t.Load(Gawk),
|
t.Load(Gawk),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ package rosa
|
|||||||
|
|
||||||
import "hakurei.app/internal/pkg"
|
import "hakurei.app/internal/pkg"
|
||||||
|
|
||||||
func (t Toolchain) newToybox() pkg.Artifact {
|
func (t Toolchain) newToybox(suffix, script string) pkg.Artifact {
|
||||||
const (
|
const (
|
||||||
version = "0.8.13"
|
version = "0.8.13"
|
||||||
checksum = "rZ1V1ATDte2WeQZanxLVoiRGdfPXhMlEo5-exX-e-ml8cGn9qOv0ABEUVZpX3wTI"
|
checksum = "rZ1V1ATDte2WeQZanxLVoiRGdfPXhMlEo5-exX-e-ml8cGn9qOv0ABEUVZpX3wTI"
|
||||||
)
|
)
|
||||||
return t.New("toybox-"+version, 0, stage3Concat(t, []pkg.Artifact{},
|
return t.New("toybox-"+version+suffix, TEarly, stage3Concat(t, []pkg.Artifact{},
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
t.Load(Bash),
|
t.Load(Bash),
|
||||||
t.Load(Gzip),
|
t.Load(Gzip),
|
||||||
@@ -30,12 +30,7 @@ make defconfig
|
|||||||
sed -i \
|
sed -i \
|
||||||
's/^CONFIG_TOYBOX_ZHELP=y$/CONFIG_TOYBOX_ZHELP=0/' \
|
's/^CONFIG_TOYBOX_ZHELP=y$/CONFIG_TOYBOX_ZHELP=0/' \
|
||||||
.config
|
.config
|
||||||
echo '
|
`+script+`
|
||||||
CONFIG_EXPR=y
|
|
||||||
CONFIG_TR=y
|
|
||||||
CONFIG_AWK=y
|
|
||||||
CONFIG_DIFF=y
|
|
||||||
' >> .config
|
|
||||||
make \
|
make \
|
||||||
"-j$(nproc)" \
|
"-j$(nproc)" \
|
||||||
LDFLAGS="${LDFLAGS} -static"
|
LDFLAGS="${LDFLAGS} -static"
|
||||||
@@ -51,4 +46,19 @@ ln -s ../../system/bin/env /work/usr/bin
|
|||||||
pkg.TarGzip,
|
pkg.TarGzip,
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
func init() { artifactsF[Toybox] = Toolchain.newToybox }
|
func init() {
|
||||||
|
artifactsF[Toybox] = func(t Toolchain) pkg.Artifact {
|
||||||
|
return t.newToybox("", "")
|
||||||
|
}
|
||||||
|
|
||||||
|
artifactsF[toyboxEarly] = func(t Toolchain) pkg.Artifact {
|
||||||
|
return t.newToybox("-early", `
|
||||||
|
echo '
|
||||||
|
CONFIG_EXPR=y
|
||||||
|
CONFIG_TR=y
|
||||||
|
CONFIG_AWK=y
|
||||||
|
CONFIG_DIFF=y
|
||||||
|
' >> .config
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ func (t Toolchain) newXZ() pkg.Artifact {
|
|||||||
)
|
)
|
||||||
return t.New("xz-"+version, 0, []pkg.Artifact{
|
return t.New("xz-"+version, 0, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
|
t.Load(Gawk),
|
||||||
|
t.Load(Coreutils),
|
||||||
|
t.Load(Diffutils),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
/usr/src/xz/configure \
|
/usr/src/xz/configure \
|
||||||
|
|||||||
Reference in New Issue
Block a user