diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-29 17:46:18 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-29 17:46:30 +0900 |
| commit | 2d63ea8feee3ece4a158da0b1cce5fd7ebc87769 (patch) | |
| tree | 0c165c4eaf95290ba1dd9d8f3a50e647772a1674 /internal/rosa | |
| parent | dd4326418c6a0d44751abba9f7a149ec140dca4e (diff) | |
internal/rosa: gzip artifact
Toybox does not implement this, and it is used by many programs, including toybox itself.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa')
| -rw-r--r-- | internal/rosa/all.go | 2 | ||||
| -rw-r--r-- | internal/rosa/gnu.go | 23 | ||||
| -rw-r--r-- | internal/rosa/toybox.go | 1 |
3 files changed, 26 insertions, 0 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go index 5cffdbef..8bab65ae 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -24,6 +24,7 @@ const ( Git Go Gperf + Gzip Hakurei HakureiDist IniConfig @@ -100,6 +101,7 @@ func (t Toolchain) ResolveName(name string) (p PArtifact, ok bool) { "git": Git, "go": Go, "gperf": Gperf, + "gzip": Gzip, "hakurei": Hakurei, "hakurei-dist": HakureiDist, "iniconfig": IniConfig, diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index 0160e636..e4142476 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -79,6 +79,29 @@ make DESTDIR=/work install } func init() { artifactsF[Autoconf] = Toolchain.newAutoconf } +func (t Toolchain) newGzip() pkg.Artifact { + const ( + version = "1.14" + checksum = "NWhjUavnNfTDFkZJyAUonL9aCOak8GVajWX2OMlzpFnuI0ErpBFyj88mz2xSjz0q" + ) + return t.New("gzip-"+version, false, []pkg.Artifact{ + t.Load(Make), + }, nil, nil, ` +cd "$(mktemp -d)" +/usr/src/gzip/configure \ + --prefix=/system \ + --build="${ROSA_TRIPLE}" +make "-j$(nproc)" +make DESTDIR=/work install +`, pkg.Path(AbsUsrSrc.Append("gzip"), false, pkg.NewHTTPGetTar( + nil, + "https://ftp.gnu.org/gnu/gzip/gzip-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ))) +} +func init() { artifactsF[Gzip] = Toolchain.newGzip } + func (t Toolchain) newGettext() pkg.Artifact { const ( version = "0.26" diff --git a/internal/rosa/toybox.go b/internal/rosa/toybox.go index f2e83a08..8ca02e66 100644 --- a/internal/rosa/toybox.go +++ b/internal/rosa/toybox.go @@ -10,6 +10,7 @@ func (t Toolchain) newToybox() pkg.Artifact { return t.New("toybox-"+version, false, stage3Concat(t, []pkg.Artifact{}, t.Load(Make), t.Load(Bash), + t.Load(Gzip), t.Load(KernelHeaders), ), nil, stage3Concat(t, []string{}, |
