1
0
forked from rosa/hakurei

internal/rosa: configurable architecture

This enables curing via binfmt.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-07 19:45:36 +09:00
parent 8d72b9e5bd
commit 65b7dd8b37
8 changed files with 39 additions and 53 deletions

View File

@@ -5,7 +5,6 @@ import (
"io"
"net/http"
"os"
"runtime"
"time"
"hakurei.app/fhs"
@@ -88,7 +87,7 @@ func (a busyboxBin) Cure(t *pkg.TContext) (err error) {
// the https://busybox.net/downloads/binaries/ binary release.
func newBusyboxBin() pkg.Artifact {
var version, url, checksum string
switch runtime.GOARCH {
switch arch {
case "amd64":
version = "1.35.0"
url = "https://busybox.net/downloads/binaries/" +
@@ -101,7 +100,7 @@ func newBusyboxBin() pkg.Artifact {
checksum = "npJjBO7iwhjW6Kx2aXeSxf8kXhVgTCDChOZTTsI8ZfFfa3tbsklxRiidZQdrVERg"
default:
panic("unsupported target " + runtime.GOARCH)
panic("unsupported target " + arch)
}
return pkg.NewExec(