From fd8b2fd52229b10092fca7fb520ed33e14f3f50c Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 30 Jan 2026 01:36:47 +0900 Subject: [PATCH] internal/rosa: fix up dependencies These are no longer provided by the (incomplete) toybox implementations, so they need to be specified explicitly. Signed-off-by: Ophestra --- internal/rosa/acl.go | 4 ++++ internal/rosa/gnu.go | 3 +++ internal/rosa/go.go | 14 +------------- internal/rosa/hakurei.go | 11 +++++++---- internal/rosa/libexpat.go | 2 ++ internal/rosa/libseccomp.go | 2 ++ internal/rosa/libxml2.go | 3 +++ internal/rosa/pkg-config.go | 2 ++ internal/rosa/wayland.go | 2 ++ internal/rosa/x.go | 4 ++++ internal/rosa/xcb.go | 4 ++++ 11 files changed, 34 insertions(+), 17 deletions(-) diff --git a/internal/rosa/acl.go b/internal/rosa/acl.go index 54c2937..ca9b877 100644 --- a/internal/rosa/acl.go +++ b/internal/rosa/acl.go @@ -10,6 +10,8 @@ func (t Toolchain) newAttr() pkg.Artifact { return t.New("attr-"+version, 0, []pkg.Artifact{ t.Load(Make), t.Load(Perl), + t.Load(Gawk), + t.Load(Coreutils), }, nil, nil, ` ln -s ../../system/bin/perl /usr/bin @@ -77,6 +79,8 @@ func (t Toolchain) newACL() pkg.Artifact { ) return t.New("acl-"+version, 0, []pkg.Artifact{ t.Load(Make), + t.Load(Gawk), + t.Load(Coreutils), t.Load(Attr), }, nil, nil, ` diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index 0945279..347ff64 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -304,6 +304,9 @@ func (t Toolchain) newGperf() pkg.Artifact { ) return t.New("gperf-"+version, 0, []pkg.Artifact{ t.Load(Make), + t.Load(Gawk), + t.Load(Coreutils), + t.Load(Diffutils), }, nil, nil, ` cd "$(mktemp -d)" /usr/src/gperf/configure \ diff --git a/internal/rosa/go.go b/internal/rosa/go.go index 7004ceb..4cd2a07 100644 --- a/internal/rosa/go.go +++ b/internal/rosa/go.go @@ -20,19 +20,7 @@ cp -r /usr/src/go /work cd /work/go/src chmod -R +w .. -ln -s ../system/bin/toybox /bin/pwd -cat << EOF > /bin/hostname -#!/bin/sh -echo cure -EOF -chmod +x /bin/hostname - -rm \ - cmd/objdump/objdump_test.go \ - syscall/creds_test.go \ - net/multicast_test.go - -./all.bash +./make.bash cd /work/ mkdir system/ mv go/ system/ diff --git a/internal/rosa/hakurei.go b/internal/rosa/hakurei.go index 1fdf73e..4157296 100644 --- a/internal/rosa/hakurei.go +++ b/internal/rosa/hakurei.go @@ -32,6 +32,7 @@ func (t Toolchain) newHakurei(script string) pkg.Artifact { t.Load(Wayland), t.Load(WaylandProtocols), }, nil, []string{ + "CGO_ENABLED=1", "GOCACHE=/tmp/gocache", "CC=clang -O3 -Werror", }, ` @@ -193,7 +194,7 @@ func main() { func init() { artifactsF[Hakurei] = func(t Toolchain) pkg.Artifact { return t.newHakurei(` -mkdir -p /work/system/{bin,libexec/hakurei} +mkdir -p /work/system/libexec/hakurei/ echo '# Building hakurei.' go generate -v ./... @@ -210,9 +211,11 @@ echo '# Testing hakurei.' go test -ldflags='-buildid= -extldflags=-static' ./... echo -mv \ - /work/system/libexec/hakurei/{hakurei,sharefs} \ - /work/system/bin +mkdir -p /work/system/bin/ +(cd /work/system/libexec/hakurei && mv \ + hakurei \ + sharefs \ + ../../bin/) `) } artifactsF[HakureiDist] = func(t Toolchain) pkg.Artifact { diff --git a/internal/rosa/libexpat.go b/internal/rosa/libexpat.go index f158f10..2139e44 100644 --- a/internal/rosa/libexpat.go +++ b/internal/rosa/libexpat.go @@ -14,6 +14,8 @@ func (t Toolchain) newLibexpat() pkg.Artifact { return t.New("libexpat-"+version, 0, []pkg.Artifact{ t.Load(Make), t.Load(Bash), + t.Load(Gawk), + t.Load(Coreutils), }, nil, nil, ` cd "$(mktemp -d)" /usr/src/libexpat/configure \ diff --git a/internal/rosa/libseccomp.go b/internal/rosa/libseccomp.go index 8b9ce9e..a2e5ce1 100644 --- a/internal/rosa/libseccomp.go +++ b/internal/rosa/libseccomp.go @@ -12,7 +12,9 @@ func (t Toolchain) newLibseccomp() pkg.Artifact { 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), diff --git a/internal/rosa/libxml2.go b/internal/rosa/libxml2.go index dd6bd9c..e2dcc4b 100644 --- a/internal/rosa/libxml2.go +++ b/internal/rosa/libxml2.go @@ -13,6 +13,9 @@ func (t Toolchain) newLibxml2() pkg.Artifact { ) return t.New("libxml2-"+version, 0, []pkg.Artifact{ t.Load(Make), + t.Load(Gawk), + t.Load(Coreutils), + t.Load(Diffutils), t.Load(XZ), }, nil, nil, ` cd /usr/src/ diff --git a/internal/rosa/pkg-config.go b/internal/rosa/pkg-config.go index c4fb722..1e3ff21 100644 --- a/internal/rosa/pkg-config.go +++ b/internal/rosa/pkg-config.go @@ -9,6 +9,8 @@ func (t Toolchain) newPkgConfig() pkg.Artifact { ) return t.New("pkg-config-"+version, 0, []pkg.Artifact{ t.Load(Make), + t.Load(Gawk), + t.Load(Coreutils), }, nil, nil, ` cd "$(mktemp -d)" /usr/src/pkg-config/configure \ diff --git a/internal/rosa/wayland.go b/internal/rosa/wayland.go index ab9c7fb..48ab9a6 100644 --- a/internal/rosa/wayland.go +++ b/internal/rosa/wayland.go @@ -13,6 +13,8 @@ func (t Toolchain) newWayland() pkg.Artifact { t.Load(PkgConfig), t.Load(CMake), t.Load(Ninja), + t.Load(Gawk), + t.Load(Diffutils), t.Load(Libffi), t.Load(Libexpat), diff --git a/internal/rosa/x.go b/internal/rosa/x.go index 8b9e6ed..19f3ee6 100644 --- a/internal/rosa/x.go +++ b/internal/rosa/x.go @@ -9,6 +9,8 @@ func (t Toolchain) newXproto() pkg.Artifact { ) return t.New("xproto-"+version, 0, []pkg.Artifact{ t.Load(Make), + t.Load(Gawk), + t.Load(Coreutils), t.Load(PkgConfig), }, nil, nil, ` cd "$(mktemp -d)" @@ -32,6 +34,8 @@ func (t Toolchain) newLibXau() pkg.Artifact { ) return t.New("libXau-"+version, 0, []pkg.Artifact{ t.Load(Make), + t.Load(Gawk), + t.Load(Coreutils), t.Load(PkgConfig), t.Load(Xproto), diff --git a/internal/rosa/xcb.go b/internal/rosa/xcb.go index ff90d0a..134f5d2 100644 --- a/internal/rosa/xcb.go +++ b/internal/rosa/xcb.go @@ -9,6 +9,8 @@ func (t Toolchain) newXCBProto() pkg.Artifact { ) return t.New("xcb-proto-"+version, 0, []pkg.Artifact{ t.Load(Make), + t.Load(Gawk), + t.Load(Coreutils), t.Load(Python), }, nil, nil, ` cd "$(mktemp -d)" @@ -33,6 +35,8 @@ func (t Toolchain) newXCB() pkg.Artifact { ) return t.New("xcb-"+version, 0, []pkg.Artifact{ t.Load(Make), + t.Load(Gawk), + t.Load(Coreutils), t.Load(Python), t.Load(PkgConfig),