aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-02-09 02:26:14 +0900
committerOphestra <cat@gensokyo.uk>2026-02-09 02:26:52 +0900
commitf511f0a9e9446f5af64c4ef02fa7658e7eb1ab68 (patch)
treed8522df5fac8955ad51c4058523026e194997e7c /internal/rosa
parent47995137b3c1c7cb1cc623bf1bea8344c94aab45 (diff)
internal/rosa: bzip2 artifact
For creating the stage0 tarball. Might be replaced by a custom artifact at some point. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa')
-rw-r--r--internal/rosa/all.go2
-rw-r--r--internal/rosa/bzip2.go22
2 files changed, 24 insertions, 0 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go
index fbe27445..0fdfdc8a 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 00000000..e4ba4c82
--- /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 }