From 7ca7966916077bc6ef94fe8f55c2d00d2acb8388a2c78fb38d558cbc36fe16b6 Mon Sep 17 00:00:00 2001 From: Till Wegmueller Date: Sat, 1 Nov 2025 15:03:09 +0100 Subject: [PATCH] Add Rust toolchain support for Solaris-based environments This commit updates the Solstice job script to install the Rust toolchain (`developer/rustc`) via the IPS package manager on Solaris-based systems (SunOS). It also adjusts the `ensure_rust` function to prioritize system package installation before falling back to `rustup`. --- .solstice/job.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.solstice/job.sh b/.solstice/job.sh index 4f8bc94..2f85b29 100755 --- a/.solstice/job.sh +++ b/.solstice/job.sh @@ -51,7 +51,7 @@ install_illumos() { if command -v pkg >/dev/null 2>&1; then # OpenIndiana IPS packages (best-effort) sudo pkg refresh || true - sudo pkg install -v developer/build/gnu-make developer/gcc-13 git developer/protobuf || true + sudo pkg install -v developer/build/gnu-make developer/gcc-13 git developer/protobuf developer/rustc || true elif command -v pkgin >/dev/null 2>&1; then sudo pkgin -y install git gcc gmake protobuf || true else @@ -61,6 +61,13 @@ install_illumos() { ensure_rust() { if command -v cargo >/dev/null 2>&1; then return 0; fi + OS=$(uname -s 2>/dev/null || echo unknown) + if [ "$OS" = "SunOS" ] && command -v pkg >/dev/null 2>&1; then + log "installing Rust toolchain via IPS package manager (developer/rustc)" + sudo pkg refresh || true + sudo pkg install -v developer/rustc || true + if command -v cargo >/dev/null 2>&1; then return 0; fi + fi log "installing Rust toolchain with rustup" curl -fsSL https://sh.rustup.rs | sh -s -- -y # shellcheck disable=SC1091