diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-22 04:06:48 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-22 04:06:48 +0900 |
| commit | cdf2e4a2fb364599f2ac186f98f35384032277f4 (patch) | |
| tree | 2406446f187708d03155df151976d1cfb988a898 | |
| parent | dcb8a6ea068eef318f10b73de8b572c5652e4191 (diff) | |
internal/rosa: bash artifact
Required by llvm unit and regression tests.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/rosa/gnu.go | 27 | ||||
| -rw-r--r-- | internal/rosa/llvm.go | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index 1ee76b85..b2087187 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -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, + ))) +} diff --git a/internal/rosa/llvm.go b/internal/rosa/llvm.go index 898c92cc..fd31d4b0 100644 --- a/internal/rosa/llvm.go +++ b/internal/rosa/llvm.go @@ -129,6 +129,8 @@ func (t Toolchain) newLLVM(variant string, attr *llvmAttr) pkg.Artifact { t.NewPython(), t.NewPerl(), t.NewDiffutils(), + t.NewBash(), + t.NewKernelHeaders(), } if t == toolchainStage3 { |
