From 88467a02755f2b0f86c819cf7f1a8b3399200a16 Mon Sep 17 00:00:00 2001 From: hja Date: Thu, 29 Oct 2026 08:08:02 +0000 Subject: [PATCH] fix: Investigate and fix FreeBSD 14.3 CI failure (#372) Resolves #372 --- .cirrus.yml | 10 ++++++---- .github/workflows/build.yml | 12 ++++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c897c25c..1f39d077 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,13 +2,15 @@ task: freebsd_instance: cpu: 1 matrix: - - image_family: freebsd-15-0-amd64-zfs - - image_family: freebsd-14-3 + - image_name: freebsd-15-1-release-amd64-ufs + - image_name: freebsd-14-5-release-amd64-ufs install_script: pkg install -y bash git autoconf automake libtool groff pkgconf kernel_src_script: | uname -r - if [[ $(uname -r) == "14.3-RELEASE" ]]; then - git clone --branch releng/14.3 https://git.FreeBSD.org/src.git /usr/src + if [ ! -f /usr/src/sys/kern/kern_lockf.c ]; then + rm -rf /usr/src + rel=$(uname -r | sed 's/-p[0-9]*$//; s/-RELEASE$//') + git clone --branch "releng/${rel}" https://git.FreeBSD.org/src.git /usr/src fi; build_script: - ./Configure -n freebsd diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4610841c..eba63da7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,7 +62,7 @@ jobs: strategy: fail-fast: false matrix: - release: ["15.1", "14.3"] + release: ["15.1", "14.5"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 @@ -85,7 +85,15 @@ jobs: # unless the sources are there. Unpack just usr/src/sys out of the # release source set; that is ~15s and about 580MB on disk. rel=$(uname -r | sed 's/-p[0-9]*$//') - fetch -o /tmp/src.txz "https://download.freebsd.org/releases/$(uname -m)/${rel}/src.txz" + if ! fetch -o /tmp/src.txz "https://download.freebsd.org/releases/$(uname -m)/${rel}/src.txz"; then + # FreeBSD removes release artifacts from download.freebsd.org + # once a release reaches EOL, but the old-releases archive keeps + # them. Fall back there so a release removed from the main + # mirror can still provide its sources. + echo "warning: source set not on download.freebsd.org, trying archive.freebsd.org" + rm -f /tmp/src.txz + fetch -o /tmp/src.txz "https://archive.freebsd.org/old-releases/$(uname -m)/${rel}/src.txz" + fi tar -xf /tmp/src.txz -C / usr/src/sys # autotools build, out of tree so the source tree stays pristine for