internal/rosa: bash artifact
All checks were successful
Test / Create distribution (push) Successful in 1m4s
Test / Sandbox (push) Successful in 2m56s
Test / Hakurei (push) Successful in 4m6s
Test / ShareFS (push) Successful in 4m17s
Test / Hpkg (push) Successful in 4m48s
Test / Sandbox (race detector) (push) Successful in 5m12s
Test / Hakurei (race detector) (push) Successful in 6m12s
Test / Flake checks (push) Successful in 1m45s

Required by llvm unit and regression tests.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-22 04:06:48 +09:00
parent dcb8a6ea06
commit cdf2e4a2fb
2 changed files with 29 additions and 0 deletions

View File

@@ -139,3 +139,30 @@ make DESTDIR=/work install
pkg.TarGzip,
)))
}
// NewBash returns a [pkg.Artifact] containing an installation of GNU Bash.
func (t Toolchain) NewBash() pkg.Artifact {
const (
version = "5.3"
checksum = "4LQ_GRoB_ko-Ih8QPf_xRKA02xAm_TOxQgcJLmFDT6udUPxTAWrsj-ZNeuTusyDq"
)
return t.New("bash-"+version, []pkg.Artifact{
t.NewMake(),
}, nil, nil, `
cd /usr/src/bash
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
cd "$(mktemp -d)"
/usr/src/bash/configure \
--prefix=/system \
--build="${ROSA_TRIPLE}" \
--without-bash-malloc
make "-j$(nproc)" check
make DESTDIR=/work install
`, pkg.Path(AbsUsrSrc.Append("bash"), true, pkg.NewHTTPGetTar(
nil,
"https://ftp.gnu.org/gnu/bash/bash-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
)))
}