3.9 KiB
Phase 15.1: make the FreeBSD base version a declarative Fruix input
Date: 2026-04-03
Goal
Phase 15.1 made the FreeBSD base an explicit declarative part of the Fruix system model instead of leaving it as an implicit property of whatever /usr/src happened to be present on the builder host.
Implementation
New declarative base record
Added in modules/fruix/packages/freebsd.scm:
freebsd-basefreebsd-base?- accessors for:
nameversion-labelreleasebranchsource-roottargettarget-archkernconfmake-flags
%default-freebsd-base
This gives Fruix an explicit model for the base input used by native FreeBSD artifacts.
Native package constructors now accept a declared base
Added package constructors:
freebsd-native-kernel-forfreebsd-native-world-forfreebsd-native-runtime-forfreebsd-native-bootloader-forfreebsd-native-headers-forfreebsd-native-system-packages-forfreebsd-native-development-profile-packages-for
The existing exported package variables remain as the %default-freebsd-base instances:
freebsd-native-kernelfreebsd-native-worldfreebsd-native-runtimefreebsd-native-bootloaderfreebsd-native-headers
That preserves the validated Phase 14 path while making alternative declared bases possible.
Operating-system model now records the declared base
Added to modules/fruix/system/freebsd.scm:
operating-system-freebsd-base- new
#:freebsd-basefield onoperating-system
The declared base is now recorded in:
operating-system-closure-specoperating-system-image-specmetadata/freebsd-base.scmmetadata/store-layout.scm
CLI metadata now exposes the declared base
scripts/fruix.scm now emits, for fruix system build and image:
freebsd_base_namefreebsd_base_version_labelfreebsd_base_releasefreebsd_base_branchfreebsd_base_source_rootfreebsd_base_targetfreebsd_base_target_archfreebsd_base_kernconffreebsd_base_file
Native build metadata now records the declared base
Native build manifests and .freebsd-native-build-info.scm now carry a declared-base block so the native artifacts themselves record the declarative base choice.
New files
Added:
tests/system/phase15-declarative-base-pid1-operating-system.scm.intests/system/run-phase15-declarative-base-build.sh
Validation
Passing run:
PASS phase15-declarative-base-build- workdir:
/tmp/phase15-1-build-1775202535
The harness used an explicit declared base:
(freebsd-base
#:name "stable-default"
#:version-label "15.0-STABLE-declarative"
#:release "15.0-STABLE"
#:branch "stable/15"
#:source-root "/usr/src"
#:target "amd64"
#:target-arch "amd64"
#:kernconf "GENERIC")
Confirmed:
kernel_store=/frx/store/8fcef04c7e507e86ea5e92f251fe3c6ac1aa3bcf4809fa77ddd8b92854bfcde0-freebsd-native-kernel-15.0-STABLE-declarative
bootloader_store=/frx/store/7a0ba431e487dc35a8f6318108da16a37c8426c43e77e7a7f91404ba1d980eef-freebsd-native-bootloader-15.0-STABLE-declarative
runtime_store=/frx/store/17c24ad20ddcb136c39352b68e758deae0b480258ba0128a5546f696a7eba0a6-freebsd-native-runtime-15.0-STABLE-declarative
native_base_store_count=3
host_base_store_count=0
freebsd_base_name=stable-default
freebsd_base_version_label=15.0-STABLE-declarative
freebsd_base_release=15.0-STABLE
freebsd_base_branch=stable/15
freebsd_base_source_root=/usr/src
freebsd_base_kernconf=GENERIC
declarative_base_input=ok
The harness also confirmed:
metadata/freebsd-base.scmexistsparameters.scmrecords the declared basemetadata/store-layout.scmrecords the declared base- native build info files record the declared base version/branch
Result
Phase 15.1 is complete.
Fruix now has an explicit declarative FreeBSD base input in the system model, while still allowing the current validated /usr/src-based path to work unchanged by default.