aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/gnu.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/gnu.go')
-rw-r--r--internal/rosa/gnu.go34
1 files changed, 31 insertions, 3 deletions
diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go
index b2087187..5d0b917a 100644
--- a/internal/rosa/gnu.go
+++ b/internal/rosa/gnu.go
@@ -149,9 +149,6 @@ func (t Toolchain) NewBash() pkg.Artifact {
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 \
@@ -166,3 +163,34 @@ make DESTDIR=/work install
pkg.TarGzip,
)))
}
+
+// NewCoreutils returns a [pkg.Artifact] containing an installation of GNU Coreutils.
+func (t Toolchain) NewCoreutils() pkg.Artifact {
+ const (
+ version = "9.9"
+ checksum = "B1_TaXj1j5aiVIcazLWu8Ix03wDV54uo2_iBry4qHG6Y-9bjDpUPlkNLmU_3Nvw6"
+ )
+ return t.New("coreutils-"+version, []pkg.Artifact{
+ t.NewMake(),
+ t.NewPerl(),
+
+ t.NewKernelHeaders(),
+ }, nil, nil, `
+cd /usr/src/coreutils
+test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
+
+test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh
+
+cd "$(mktemp -d)"
+/usr/src/coreutils/configure \
+ --prefix=/system \
+ --build="${ROSA_TRIPLE}"
+make "-j$(nproc)" check
+make DESTDIR=/work install
+`, pkg.Path(AbsUsrSrc.Append("coreutils"), true, pkg.NewHTTPGetTar(
+ nil,
+ "https://ftp.gnu.org/gnu/coreutils/coreutils-"+version+".tar.gz",
+ mustDecode(checksum),
+ pkg.TarGzip,
+ )))
+}