From 9f98d12ad892235cf2b835bdf92d4313fe22661b Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 2 Feb 2026 18:49:18 +0900 Subject: [PATCH] internal/rosa/gnu: automake artifact This is very expensive. Avoid. Signed-off-by: Ophestra --- internal/rosa/all.go | 2 ++ internal/rosa/gnu.go | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/internal/rosa/all.go b/internal/rosa/all.go index 00f01ce..f5436b2 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -13,6 +13,7 @@ const ( ACL PArtifact = iota Attr Autoconf + Automake Bash CMake Coreutils @@ -94,6 +95,7 @@ func ResolveName(name string) (p PArtifact, ok bool) { "acl": ACL, "attr": Attr, "autoconf": Autoconf, + "automake": Automake, "bash": Bash, "cmake": CMake, "coreutils": Coreutils, diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index 6d3d1e4..874fbae 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -65,6 +65,40 @@ func (t Toolchain) newAutoconf() pkg.Artifact { } func init() { artifactsF[Autoconf] = Toolchain.newAutoconf } +func (t Toolchain) newAutomake() pkg.Artifact { + const ( + version = "1.18.1" + checksum = "FjvLG_GdQP7cThTZJLDMxYpRcKdpAVG-YDs1Fj1yaHlSdh_Kx6nRGN14E0r_BjcG" + ) + return t.NewViaMake("automake", version, pkg.NewHTTPGetTar( + nil, "https://ftpmirror.gnu.org/gnu/automake/automake-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ), &MakeAttr{ + Writable: true, + ScriptEarly: ` +cd /usr/src/automake + +test_disable() { chmod +w "$2" && echo "$1" > "$2"; } + +test_disable '#!/bin/sh' t/objcxx-minidemo.sh +test_disable '#!/bin/sh' t/objcxx-deps.sh + +test_disable '#!/bin/sh' t/dist-no-built-sources.sh +test_disable '#!/bin/sh' t/distname.sh +test_disable '#!/bin/sh' t/pr9.sh +`, + }, + t.Load(M4), + t.Load(Perl), + t.Load(Grep), + t.Load(Gzip), + t.Load(Autoconf), + t.Load(Diffutils), + ) +} +func init() { artifactsF[Automake] = Toolchain.newAutomake } + func (t Toolchain) newGzip() pkg.Artifact { const ( version = "1.14"