From 56567307ec793ab96c665950f6c643965ada3ea9 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 21 Feb 2026 18:09:51 +0900 Subject: [PATCH] internal/rosa: gnu tar artifact Initially, libarchive was going to be used, but its test suite simply does not want to work under musl, not even with libiconv. The ticket last discussing this ceased any activity in 2020. Signed-off-by: Ophestra --- internal/rosa/all.go | 2 ++ internal/rosa/gnu.go | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/internal/rosa/all.go b/internal/rosa/all.go index f6ae034..aabc8a2 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -82,6 +82,7 @@ const ( Setuptools SquashfsTools TamaGo + Tar Texinfo Toybox toyboxEarly @@ -204,6 +205,7 @@ func ResolveName(name string) (p PArtifact, ok bool) { "setuptools": Setuptools, "squashfs-tools": SquashfsTools, "tamago": TamaGo, + "tar": Tar, "texinfo": Texinfo, "toybox": Toybox, "unzip": Unzip, diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index 358d954..9e6951e 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -419,6 +419,38 @@ func (t Toolchain) newLibiconv() pkg.Artifact { } func init() { artifactsF[Libiconv] = Toolchain.newLibiconv } +func (t Toolchain) newTar() pkg.Artifact { + const ( + version = "1.35" + checksum = "zSaoSlVUDW0dSfm4sbL4FrXLFR8U40Fh3zY5DWhR5NCIJ6GjU6Kc4VZo2-ZqpBRA" + ) + return t.NewViaMake("tar", version, pkg.NewHTTPGetTar( + nil, "https://ftpmirror.gnu.org/gnu/tar/tar-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ), &MakeAttr{ + Env: []string{ + // very expensive + "TARTEST_SKIP_LARGE_FILES=1", + }, + Configure: [][2]string{ + {"disable-acl"}, + {"without-posix-acls"}, + {"without-xattrs"}, + }, + Make: []string{ + `TESTSUITEFLAGS="-j$(nproc)"`, + }, + }, + t.Load(Diffutils), + + t.Load(Gzip), + t.Load(Bzip2), + t.Load(Zstd), + ) +} +func init() { artifactsF[Tar] = Toolchain.newTar } + func (t Toolchain) newBinutils() pkg.Artifact { const ( version = "2.45"