aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-11-09 18:35:48 +0900
committerOphestra <cat@gensokyo.uk>2026-11-09 18:35:48 +0900
commit6d1ae6a864464150c0e7545702e62d15771a3b30 (patch)
treee4108f22d71057b4af083bc6a6f482d3ee8008db /internal
parentb2db26370cc009866665f719fabfe860018bc087 (diff)
internal/rosa/package/hakurei: install hsu
This avoids having to set up the setuid wrapper while making the system image. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/package/hakurei.az12
1 files changed, 4 insertions, 8 deletions
diff --git a/internal/rosa/package/hakurei.az b/internal/rosa/package/hakurei.az
index 1079c2ae..8041d380 100644
--- a/internal/rosa/package/hakurei.az
+++ b/internal/rosa/package/hakurei.az
@@ -35,11 +35,11 @@ export PKG_CONFIG_SYSROOT_DIR='`+prefix+`/`+arch+`'
export PKG_CONFIG_LIBDIR='`+prefix+`/`+arch+prefix+`/lib/pkgconfig:`+prefix+`/`+arch+prefix+`/share/pkgconfig'
`;
build = `
-mkdir -p /work`+prefix+`/libexec/hakurei/
+mkdir -p /work`+prefix+`/bin/
echo "Building hakurei for $(go env GOOS)/`+arch+`."
go generate ./...
-GOARCH='`+arch+`' go build -trimpath -tags=rosa -o /work`+prefix+`/libexec/hakurei -ldflags="-s -w
+GOARCH='`+arch+`' go build -trimpath -tags=rosa -o /work`+prefix+`/bin -ldflags="-s -w
-buildid=
-linkmode external
-extldflags=-static
@@ -49,7 +49,7 @@ GOARCH='`+arch+`' go build -trimpath -tags=rosa -o /work`+prefix+`/libexec/hakur
" ./cmd/hakurei ./cmd/sharefs
echo "Building hsu for $(go env GOOS)/$(go env GOARCH)."
-GOARCH='`+arch+`' CGO_ENABLED=0 go build -trimpath -tags=rosa -o /work`+prefix+`/libexec/hakurei -ldflags="-s -w
+GOARCH='`+arch+`' CGO_ENABLED=0 go build -trimpath -tags=rosa -o /work`+prefix+`/bin -ldflags="-s -w
-buildid=
-X main.hakureiPath=`+prefix+`/bin/hakurei
" ./cmd/hsu`;
@@ -62,11 +62,7 @@ echo`;
cross = unset;
};
install = `
-mkdir -p /work`+prefix+`/bin/
-(cd /work`+prefix+`/libexec/hakurei && mv \
- hakurei \
- sharefs \
- ../../bin/)
+chmod 4511 /work`+prefix+`/bin/hsu
`;
};