From 82a19ba9b1629df0f1a539b49a482c371705b23e Mon Sep 17 00:00:00 2001 From: Paul Adelsbach Date: Thu, 17 Sep 2026 10:32:07 -0700 Subject: [PATCH] Address nightly failure in BSD kernel workflow --- .github/workflows/bsdkm.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bsdkm.yml b/.github/workflows/bsdkm.yml index 1eee8f05..7a9a5745 100644 --- a/.github/workflows/bsdkm.yml +++ b/.github/workflows/bsdkm.yml @@ -47,12 +47,13 @@ jobs: steps: - uses: actions/checkout@v5 - # FreeBSD kernel code: BSD make, and kldload needs a real kernel. README.md - # says 14.2, but FreeBSD no longer serves it (only 14.3+), so run 14.3. + # FreeBSD kernel code: BSD make, and kldload needs a real kernel. + # kernel/bsdkm/README.md says 14.2, but the mirror only carries releases + # that are still supported, so run the current 14.x instead. - name: Build the module and load it in a FreeBSD VM uses: vmactions/freebsd-vm@v1 with: - release: '14.3' + release: '14.5' usesh: true prepare: | pkg install -y git autoconf automake libtool @@ -64,11 +65,19 @@ jobs: if [ ! -f /usr/src/sys/conf/kmod.mk ]; then # keyed off the running kernel, so this cannot drift from the VM rel=$(uname -r | sed 's/-p[0-9]*$//') - f=1; while :; do - fetch -o /tmp/src.txz "https://download.freebsd.org/releases/amd64/${rel}/src.txz" && break - [ "$f" -ge 5 ] && { echo "FAIL: src.txz fetch failed"; exit 1; } - f=$((f + 1)); sleep 10 + # BSD moves old releases to the archive, so try both hosts + ok=0 + for base in "https://download.freebsd.org/releases/amd64" \ + "https://archive.freebsd.org/old-releases/amd64"; do + f=1; while [ "$f" -le 3 ]; do + if fetch -o /tmp/src.txz "$base/${rel}/src.txz"; then + ok=1; break + fi + f=$((f + 1)); sleep 10 + done + [ "$ok" -eq 1 ] && break done + [ "$ok" -eq 1 ] || { echo "FAIL: src.txz fetch failed"; exit 1; } tar -C / -xf /tmp/src.txz fi test -f /usr/src/sys/conf/kmod.mk