diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-02-02 18:37:40 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-02-02 18:38:01 +0900 |
| commit | 550e83dda9dd7a5434ce79e3ef16d99fefbde490 (patch) | |
| tree | 752f9bb26ca8e4bee3298aa234ede272b89ee767 | |
| parent | 7877b4e6275f8b76c30540f5ae82c570417b17f7 (diff) | |
internal/rosa/gnu: grep artifact
Some GNU software do not like the grep in toybox.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/rosa/all.go | 2 | ||||
| -rw-r--r-- | internal/rosa/gnu.go | 28 |
2 files changed, 28 insertions, 2 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go index a46cfb8b..00f01cea 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -24,6 +24,7 @@ const ( Git Go Gperf + Grep Gzip Hakurei HakureiDist @@ -104,6 +105,7 @@ func ResolveName(name string) (p PArtifact, ok bool) { "git": Git, "go": Go, "gperf": Gperf, + "grep": Grep, "gzip": Gzip, "hakurei": Hakurei, "hakurei-dist": HakureiDist, diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index ee9ef50e..6d3d1e49 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -49,8 +49,7 @@ func (t Toolchain) newAutoconf() pkg.Artifact { checksum = "-c5blYkC-xLDer3TWEqJTyh1RLbOd1c5dnRLKsDnIrg_wWNOLBpaqMY8FvmUFJ33" ) return t.NewViaMake("autoconf", version, pkg.NewHTTPGetTar( - nil, - "https://ftpmirror.gnu.org/gnu/autoconf/autoconf-"+version+".tar.gz", + nil, "https://ftpmirror.gnu.org/gnu/autoconf/autoconf-"+version+".tar.gz", mustDecode(checksum), pkg.TarGzip, ), &MakeAttr{ @@ -250,6 +249,31 @@ func (t Toolchain) newGawk() pkg.Artifact { } func init() { artifactsF[Gawk] = Toolchain.newGawk } +func (t Toolchain) newGrep() pkg.Artifact { + const ( + version = "3.12" + checksum = "qMB4RjaPNRRYsxix6YOrjE8gyAT1zVSTy4nW4wKW9fqa0CHYAuWgPwDTirENzm_1" + ) + return t.NewViaMake("grep", version, pkg.NewHTTPGetTar( + nil, "https://ftpmirror.gnu.org/gnu/grep/grep-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ), &MakeAttr{ + Writable: true, + ScriptEarly: ` +cd /usr/src/grep + +test_disable() { chmod +w "$2" && echo "$1" > "$2"; } + +test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh +test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c +`, + }, + t.Load(Diffutils), + ) +} +func init() { artifactsF[Grep] = Toolchain.newGrep } + func (t Toolchain) newFindutils() pkg.Artifact { const ( version = "4.10.0" |
