From 3bc5a25d5f17b3ba6f136da80c96a1a6667d0613 Mon Sep 17 00:00:00 2001 From: neilpang Date: Tue, 11 Aug 2026 10:08:21 +0800 Subject: [PATCH 1/3] [freebsd] Add FreeBSD CI job to GitHub Actions Nothing has reported a FreeBSD result on this repository since 2026-05-25. The last commit carrying one is 96d65e5, which has main freebsd_instance:family/freebsd-14-3 success main freebsd_instance:family/freebsd-15-0-amd64-zfs success Each of the 18 commits after it, 8ed9501 (2026-06-10) through abd5ba4 (2026-07-24), carries 14 to 17 check-runs and commit statuses -- the two linux jobs, macos, and eleven ci/circleci contexts -- and not one freebsd context among them. So the dialect 00DIALECTS lists first, and README calls "fully maintained and tested on Cirrus CI", currently has no build or test coverage here at all. This adds a job that runs the same two build paths .cirrus.yml covered, in a FreeBSD VM on a GitHub-hosted runner, for 15.1 and 14.3: autotools autoreconf -vif; configure; make; make check legacy ./Configure -n freebsd; make; bash ./check.bash freebsd Both paths need the kernel sources. AC_CHECK_TYPES for struct lockf_entry succeeds on both releases -- the type is visible from userland through -- so HEADER_GENERATE always runs and cuts struct lock_owner out of ${FREEBSD_SYS}/kern/kern_lockf.c. The release images ship an empty /usr/src, so without the fetch the autotools path stops at configure: WARNING: No kernel sources in /usr/src/sys or /sys configure: error: can't read /kern/kern_lockf.c and the legacy path stops at the matching FATAL ERROR: can't read /kern/kern_lockf.c FATAL ERROR: ./lockf_owner.h creation failed (see 00FAQ) Unpacking only usr/src/sys out of the release source set takes about 15 seconds and 580MB of VM disk, so the job does that rather than cloning git.FreeBSD.org. The autotools build runs out of tree, which keeps the source tree clean for the legacy Configure run and removes the need for the "git clean -fdx ." that .cirrus.yml used between its two build paths. Verified on GitHub Actions. On both releases and both paths: make check TOTAL 21 PASS 18 SKIP 3 FAIL 0 check.bash successful: 12 skipped: 2 failed: 0 All 14 test cases are passed successfully Wall clock is 2.8 minutes for 15.1 and 3.1 minutes for 14.3, next to 3.6 minutes for the existing linux (ubuntu-24.04) job. --- .github/workflows/build.yml | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fee31f14..718611ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,3 +57,48 @@ jobs: make DESTDIR=$PWD/prefix make install make check + + freebsd: + strategy: + fail-fast: false + matrix: + release: ["15.1", "14.3"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: build and test in a FreeBSD vm + uses: vmactions/freebsd-vm@v1 + with: + release: ${{ matrix.release }} + usesh: true + copyback: false + prepare: | + pkg install -y bash git autoconf automake libtool groff pkgconf + run: | + set -e + src=$(pwd) + + # Both build paths cut "struct lock_owner" out of the kernel sources + # (configure.ac: HEADER_GENERATE lockf_owner.h), and the release + # image ships an empty /usr/src, so configure stops with + # configure: error: can't read /kern/kern_lockf.c + # 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" + tar -xf /tmp/src.txz -C / usr/src/sys + + # autotools build, out of tree so the source tree stays pristine for + # the legacy Configure run below + autoreconf -vif + mkdir /tmp/build + cd /tmp/build + "$src"/configure + make + make check || { cat test-suite.log; exit 1; } + cd "$src" + + # legacy Configure, the path .cirrus.yml used to cover + ./Configure -n freebsd + make + bash ./check.bash freebsd From 409c680b7c7db8eb5fb55618b7d4fac253afd2b2 Mon Sep 17 00:00:00 2001 From: neilpang Date: Tue, 11 Aug 2026 10:08:21 +0800 Subject: [PATCH 2/3] [openbsd] Recognize OpenBSD 7.4 and later in Configure Configure's OpenBSD version table stops at 7.3. Anything above it falls into the "*)" arm, which configures for LSOF_VERS=3090 -- OpenBSD 3.9, released in 2006. On 7.9: Unknown OpenBSD release: 7.9 Assuming OpenBSD 3.9 cc -DOPENBSDV=3090 ... -DLSOF_VSTR="7.9" ... WARNING: unsupported dialect or version and the classic test suite then refuses to run at all: This suite has not been validated on: LT_CC LT_DIAL_openbsd LT_VERS=3090 *** Error 1 in tests (Makefile:28 'all': @./CkTestDB; ...) so bash ./check.bash openbsd exits 1. Two things go wrong together. The "*)" arm is the only arm in the table that does not set LSOF_TSTBIGF, so -DLT_BIGF is dropped and the big-file test is quietly disabled; and LSOF_TSTKMEM is 0 for this dialect, so -DLT_KMEM is absent as well. The line CkTestDB builds is therefore LT_CC LT_DIAL_openbsd LT_VERS=3090 which matches neither the 3090 row in tests/TestDB -- that one carries both LT_BIGF and LT_KMEM -- nor the 7020 and 7030 rows. This adds a 7.9 arm and a 7.x catch-all written the way the 2.x and 3.x series already are, plus the single TestDB row the result produces. Because the catch-all puts 7.4 through 7.8 on the same LSOF_VERS as 7.9, one row covers the whole series instead of one row per release. OPENBSDV is not read anywhere in the C sources; grep finds it only in Configure and 00FAQ, so no compiled code changes here. What changes is which test flags get set and which TestDB row matches. FREEBSDV and NETBSDV, by contrast, are both used in #if tests in their dialects' headers. Verified in an OpenBSD 7.9 VM on GitHub Actions. Before: config.cflags = -DLT_DIAL_openbsd -DLT_CC -DLT_VERS=3090 bash ./check.bash openbsd -> exit 1 After: config.cflags = -DLT_DIAL_openbsd -DLT_BIGF -DLT_CC -DLT_VERS=7090 compiler flags: -DOPENBSDV=7090 ... -DLSOF_VSTR="7.9" bash ./check.bash openbsd -> exit 0 successful: 14 skipped: 0 failed: 0 All 14 test cases are passed successfully --- Configure | 12 +++++++++++- tests/TestDB | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Configure b/Configure index e4a304ca..dff48eab 100755 --- a/Configure +++ b/Configure @@ -3651,6 +3651,16 @@ LOCKF4 LSOF_TSTBIGF=" " LSOF_VERS=7030 ;; + 7.9*) + LSOF_TSTBIGF=" " + LSOF_VERS=7090 + ;; + 7*) + LSOF_TSTBIGF=" " + LSOF_VERS=7090 + echo "!!!WARNING!!! Unsupported OpenBSD 7.x version: $LSOF_VSTR" + echo "!!!WARNING!!! Configuring for OpenBSD 7.9" + ;; *) echo "Unknown OpenBSD release: $LSOF_VSTR" echo Assuming OpenBSD 3.9 @@ -3662,7 +3672,7 @@ LOCKF4 # Test for legal OpenBSD version. case $LSOF_VERS in # { - 1020|2050|2060|2070|2080|2090|3000|3010|3020|3030|3040|3050|3060|3070|3080|3090|7020|7030) + 1020|2050|2060|2070|2080|2090|3000|3010|3020|3030|3040|3050|3060|3070|3080|3090|7020|7030|7090) ;; *) echo "Unknown OpenBSD version: $LSOF_VERS" diff --git a/tests/TestDB b/tests/TestDB index e6ec4303..58296383 100644 --- a/tests/TestDB +++ b/tests/TestDB @@ -152,3 +152,4 @@ LT_BIGF LT_CC LT_DIAL_darwin LT_VERS=1900 LT_BIGF LT_CC LT_DIAL_openbsd LT_VERS=7020 LT_BIGF LT_CC LT_DIAL_openbsd LT_VERS=7030 LT_BIGF LT_CC LT_DEV64 LT_DIAL_freebsd LT_VERS=15000 +LT_BIGF LT_CC LT_DIAL_openbsd LT_VERS=7090 From dcd90aba986fb9d2ef616ade61b8665bfc32eee3 Mon Sep 17 00:00:00 2001 From: neilpang Date: Tue, 11 Aug 2026 10:08:21 +0800 Subject: [PATCH 3/3] [openbsd] Add OpenBSD CI job to GitHub Actions .builds/openbsd.yml last produced a passing result on 2023-11-10. The job after that, #1520293 on 2025-06-28, failed, and nothing has run on builds.sr.ht since; the SourceHut badge in README currently reads "builds: failure". No sr.ht context appears on any of the last 19 commits here either, so even when those builds did run, their result was never visible on a commit or a pull request in this repository. This adds a job that runs the build in an OpenBSD 7.9 VM on a GitHub-hosted runner: autotools autoreconf -vif; configure; make legacy ./Configure -n openbsd; make; bash ./check.bash openbsd libtool has to come from packages. OpenBSD's base /usr/bin/libtool is a different program and brings no GNU libtool m4 files, so without the package aclocal cannot find LT_INIT and autoreconf stops at Makefile.am:100: you'll need to arrange for the Libtool m4 files Makefile.am:100: to be found by aclocal autoreconf-2.72: error: automake failed with exit status: 1 after which the half-written configure dies with configure[3882]: syntax error: `disable-fast-install' unexpected .builds/openbsd.yml installs libtool for the same reason. autoconf and automake are pinned to a package version because pkg_add reports both names as ambiguous -- 7.9 packages eighteen autoconf versions and twelve automake versions -- and AUTOCONF_VERSION / AUTOMAKE_VERSION have to agree with whichever is installed. "make check" is deliberately not run on the autotools build. It fails tests/LTbasic2 there with "opened regular file wasn't found"; that test is not part of the legacy suite, and the two paths end up with very different flag sets, since configure.ac's openbsd arm sets only LSOF_VERS while Configure also sets HASIPv6, HAS_SYS_PIPEH and HAS_STRFTIME. That is left for a separate change. Verified on GitHub Actions, OpenBSD 7.9: bash ./check.bash openbsd successful: 14 skipped: 0 failed: 0 All 14 test cases are passed successfully --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 718611ec..4610841c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,3 +102,39 @@ jobs: ./Configure -n freebsd make bash ./check.bash freebsd + + openbsd: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: build and test in an OpenBSD vm + uses: vmactions/openbsd-vm@v1 + with: + release: "7.9" + usesh: true + copyback: false + prepare: | + pkg_add -I bash git libtool groff autoconf-2.72p0 automake-1.18.1 + run: | + set -e + src=$(pwd) + export AUTOCONF_VERSION=2.72 + export AUTOMAKE_VERSION=1.18 + + # autotools path: build only. "make check" additionally fails + # tests/LTbasic2 here with "opened regular file wasn't found"; + # that test is not part of the legacy suite below and is left + # for a separate fix. libtool has to come from packages -- the + # base /usr/bin/libtool is a different program and aclocal + # cannot find LT_INIT without the package's m4 files. + autoreconf -vif + mkdir /tmp/build + cd /tmp/build + "$src"/configure + make + cd "$src" + + # legacy Configure, the path .builds/openbsd.yml covered + ./Configure -n openbsd + make + bash ./check.bash openbsd