From f511f0a9e9446f5af64c4ef02fa7658e7eb1ab68 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 9 Feb 2026 02:26:14 +0900 Subject: [PATCH] internal/rosa: bzip2 artifact For creating the stage0 tarball. Might be replaced by a custom artifact at some point. Signed-off-by: Ophestra --- internal/rosa/all.go | 2 ++ internal/rosa/bzip2.go | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 internal/rosa/bzip2.go diff --git a/internal/rosa/all.go b/internal/rosa/all.go index fbe2744..0fdfdc8 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -16,6 +16,7 @@ const ( Automake Bash Binutils + Bzip2 CMake Coreutils Curl @@ -113,6 +114,7 @@ func ResolveName(name string) (p PArtifact, ok bool) { "automake": Automake, "bash": Bash, "binutils": Binutils, + "bzip2": Bzip2, "cmake": CMake, "coreutils": Coreutils, "curl": Curl, diff --git a/internal/rosa/bzip2.go b/internal/rosa/bzip2.go new file mode 100644 index 0000000..e4ba4c8 --- /dev/null +++ b/internal/rosa/bzip2.go @@ -0,0 +1,22 @@ +package rosa + +import "hakurei.app/internal/pkg" + +func (t Toolchain) newBzip2() pkg.Artifact { + const ( + version = "1.0.8" + checksum = "cTLykcco7boom-s05H1JVsQi1AtChYL84nXkg_92Dm1Xt94Ob_qlMg_-NSguIK-c" + ) + return t.New("bzip2-"+version, 0, []pkg.Artifact{ + t.Load(Make), + }, nil, nil, ` +cd /usr/src/bzip2 +make CC=cc +make PREFIX=/work/system install +`, pkg.Path(AbsUsrSrc.Append("bzip2"), true, pkg.NewHTTPGetTar( + nil, "https://sourceware.org/pub/bzip2/bzip2-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ))) +} +func init() { artifactsF[Bzip2] = Toolchain.newBzip2 }