internal/rosa: migrate to make helper

This migrates artifacts that the helper cannot produce an identical instance of.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-31 05:09:17 +09:00
parent 29ebc52e26
commit 8b4576bc5f
15 changed files with 262 additions and 263 deletions

View File

@@ -9,31 +9,25 @@ func (t Toolchain) newLibseccomp() pkg.Artifact {
version = "2.6.0"
checksum = "mMu-iR71guPjFbb31u-YexBaanKE_nYPjPux-vuBiPfS_0kbwJdfCGlkofaUm-EY"
)
return t.New("libseccomp-"+version, 0, []pkg.Artifact{
t.Load(Make),
t.Load(Bash),
t.Load(Gawk),
t.Load(Coreutils),
t.Load(Diffutils),
t.Load(Gperf),
t.Load(KernelHeaders),
}, nil, nil, `
ln -s ../system/bin/bash /bin/bash
cd "$(mktemp -d)"
/usr/src/libseccomp/configure \
--prefix=/system \
--build="${ROSA_TRIPLE}" \
--enable-static
make "-j$(nproc)" check
make DESTDIR=/work install
`, pkg.Path(AbsUsrSrc.Append("libseccomp"), false, pkg.NewHTTPGetTar(
return t.NewViaMake("libseccomp", version, pkg.NewHTTPGetTar(
nil,
"https://github.com/seccomp/libseccomp/releases/download/"+
"v"+version+"/libseccomp-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
)))
), &MakeAttr{
ScriptEarly: `
ln -s ../system/bin/bash /bin/
`,
Configure: [][2]string{
{"enable-static"},
},
},
t.Load(Bash),
t.Load(Diffutils),
t.Load(Gperf),
t.Load(KernelHeaders),
)
}
func init() { artifactsF[Libseccomp] = Toolchain.newLibseccomp }