Install apt packages host jobs need (libatomic1 for Node 26)
actions/setup-node's Node 26 fails on minimal Ubuntu 24.04 with 'libatomic.so.1: cannot open shared object file'. RUNNER_APT_PACKAGES in the host file lists packages install.sh installs when missing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -35,7 +35,10 @@ JavaScript actions (`actions/checkout`, `actions/setup-node`, …) also need
|
|||||||
`node` on the host, or they fail with `Cannot find: node in PATH`: set
|
`node` on the host, or they fail with `Cannot find: node in PATH`: set
|
||||||
`RUNNER_NODE_VERSION` in the host file and `install.sh` puts that release at
|
`RUNNER_NODE_VERSION` in the host file and `install.sh` puts that release at
|
||||||
`/usr/local/bin/node` (only `node`; jobs get their own Node from
|
`/usr/local/bin/node` (only `node`; jobs get their own Node from
|
||||||
`actions/setup-node`). A VM without Tailscale can
|
`actions/setup-node`). Shared libraries those jobs need go in
|
||||||
|
`RUNNER_APT_PACKAGES` (e.g. `libatomic1`, without which the Node 26 that
|
||||||
|
`actions/setup-node` installs fails with `libatomic.so.1: cannot open shared
|
||||||
|
object file`). A VM without Tailscale can
|
||||||
still be set up from the Proxmox host: `qm guest exec <vmid> -- bash -c '...'`.
|
still be set up from the Proxmox host: `qm guest exec <vmid> -- bash -c '...'`.
|
||||||
|
|
||||||
## Upgrading
|
## Upgrading
|
||||||
|
|||||||
@@ -8,3 +8,5 @@ RUNNER_CAPACITY=2
|
|||||||
RUNNER_LABELS="build:host"
|
RUNNER_LABELS="build:host"
|
||||||
# For JavaScript actions in host jobs (actions/checkout@v5 is node24).
|
# For JavaScript actions in host jobs (actions/checkout@v5 is node24).
|
||||||
RUNNER_NODE_VERSION=24.22.3
|
RUNNER_NODE_VERSION=24.22.3
|
||||||
|
# Space-separated apt packages for host jobs. libatomic1: Node 26 (setup-node).
|
||||||
|
RUNNER_APT_PACKAGES="libatomic1"
|
||||||
|
|||||||
@@ -6,3 +6,5 @@ RUNNER_NAME=stpvm
|
|||||||
RUNNER_USER=adamf
|
RUNNER_USER=adamf
|
||||||
RUNNER_CAPACITY=1
|
RUNNER_CAPACITY=1
|
||||||
RUNNER_LABELS="self-hosted:host,ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest,ubuntu-24.04:docker://docker.gitea.com/runner-images:ubuntu-24.04,ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04"
|
RUNNER_LABELS="self-hosted:host,ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest,ubuntu-24.04:docker://docker.gitea.com/runner-images:ubuntu-24.04,ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04"
|
||||||
|
# Space-separated apt packages for host jobs. libatomic1: Node 26 (setup-node).
|
||||||
|
RUNNER_APT_PACKAGES="libatomic1"
|
||||||
|
|||||||
+16
@@ -68,6 +68,22 @@ if [ "$current" != "v${VERSION}" ]; then
|
|||||||
changed=1
|
changed=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# --- host packages -----------------------------------------------------------
|
||||||
|
# Libraries host-mode jobs need that a minimal Ubuntu lacks, e.g. libatomic1
|
||||||
|
# for the Node 26 that actions/setup-node installs.
|
||||||
|
if [ -n "${RUNNER_APT_PACKAGES:-}" ]; then
|
||||||
|
read -ra pkgs <<<"$RUNNER_APT_PACKAGES"
|
||||||
|
missing=()
|
||||||
|
for p in "${pkgs[@]}"; do
|
||||||
|
dpkg-query -W -f='${Status}' "$p" 2>/dev/null | grep -q "ok installed" || missing+=("$p")
|
||||||
|
done
|
||||||
|
if [ ${#missing[@]} -gt 0 ]; then
|
||||||
|
echo "Installing packages: ${missing[*]}"
|
||||||
|
apt-get update -qq
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq "${missing[@]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# --- node (host-mode JavaScript actions) -------------------------------------
|
# --- node (host-mode JavaScript actions) -------------------------------------
|
||||||
# In host mode the runner runs actions such as actions/checkout with the
|
# In host mode the runner runs actions such as actions/checkout with the
|
||||||
# host's `node`. Only `node` goes on PATH: the job's own Node comes from
|
# host's `node`. Only `node` goes on PATH: the job's own Node comes from
|
||||||
|
|||||||
Reference in New Issue
Block a user