aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-26 05:28:36 +0900
committerOphestra <cat@gensokyo.uk>2026-01-26 05:28:36 +0900
commit504f5d28fe96f481b13049b1aaaba2f87e8b0d86 (patch)
tree7a4f4b5ffe9b7dd3b41c40d3bbe0051983cccdfc /internal
parent3eadd5c580c6b38f468f53549497c64201c00605 (diff)
internal/rosa: libseccomp artifact
Required by hakurei. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/all.go1
-rw-r--r--internal/rosa/libseccomp.go35
2 files changed, 36 insertions, 0 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go
index 7bfd9dfa..babd61dc 100644
--- a/internal/rosa/all.go
+++ b/internal/rosa/all.go
@@ -24,6 +24,7 @@ const (
Libexpat
Libffi
Libgd
+ Libseccomp
Libxml2
M4
Make
diff --git a/internal/rosa/libseccomp.go b/internal/rosa/libseccomp.go
new file mode 100644
index 00000000..830af263
--- /dev/null
+++ b/internal/rosa/libseccomp.go
@@ -0,0 +1,35 @@
+package rosa
+
+import (
+ "hakurei.app/internal/pkg"
+)
+
+func (t Toolchain) newLibseccomp() pkg.Artifact {
+ const (
+ version = "2.6.0"
+ checksum = "mMu-iR71guPjFbb31u-YexBaanKE_nYPjPux-vuBiPfS_0kbwJdfCGlkofaUm-EY"
+ )
+ return t.New("libseccomp-"+version, []pkg.Artifact{
+ t.Load(Make),
+ t.Load(Bash),
+ 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}"
+make "-j$(nproc)" check
+make DESTDIR=/work install
+`, pkg.Path(AbsUsrSrc.Append("libseccomp"), false, pkg.NewHTTPGetTar(
+ nil,
+ "https://github.com/seccomp/libseccomp/releases/download/"+
+ "v"+version+"/libseccomp-"+version+".tar.gz",
+ mustDecode(checksum),
+ pkg.TarGzip,
+ )))
+}
+func init() { artifactsF[Libseccomp] = Toolchain.newLibseccomp }