internal/rosa: gzip artifact
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m43s
Test / Hakurei (push) Successful in 3m56s
Test / ShareFS (push) Successful in 4m3s
Test / Hpkg (push) Successful in 4m33s
Test / Sandbox (race detector) (push) Successful in 4m59s
Test / Hakurei (race detector) (push) Successful in 6m12s
Test / Flake checks (push) Successful in 1m40s

Toybox does not implement this, and it is used by many programs, including toybox itself.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-29 17:46:18 +09:00
parent dd4326418c
commit 2d63ea8fee
3 changed files with 26 additions and 0 deletions

View File

@@ -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,

View File

@@ -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"

View File

@@ -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{},