Model native FreeBSD world and kernel artifacts

This commit is contained in:
2026-04-02 23:19:11 +02:00
parent 1108153277
commit 6021a57c38
5 changed files with 543 additions and 19 deletions

View File

@@ -2874,3 +2874,88 @@ Next recommended step:
1. begin Phase 13.1 by modeling FreeBSD `world` and `kernel` as Fruix-managed build artifacts rather than host-copy packages
2. use `/usr/src` as the initial source of truth on the builder side
3. target the first bootable replacement for the current host-staged kernel and core runtime path
## 2026-04-02 — Phase 13.1: modeled native FreeBSD world/kernel artifacts
Completed work:
- wrote the Phase 13.1 report:
- `docs/reports/phase13-native-base-model-freebsd.md`
- added native FreeBSD base package objects in `modules/fruix/packages/freebsd.scm`:
- `freebsd-native-kernel`
- `freebsd-native-world`
- added and exported:
- `freebsd-native-build-package?`
- encoded the first native build parameters directly in those package definitions, including:
- `source-root=/usr/src`
- `target=amd64`
- `target-arch=amd64`
- `kernconf=GENERIC`
- make flags:
- `__MAKE_CONF=/dev/null`
- `SRCCONF=/dev/null`
- `SRC_ENV_CONF=/dev/null`
- `MK_DEBUG_FILES=no`
- `MK_TESTS=no`
- the first native world artifact now also carries an explicit runtime-oriented prune list:
- `usr/share/doc`
- `usr/share/examples`
- `usr/share/info`
- `usr/share/man`
- `usr/tests`
- extended `modules/fruix/system/freebsd.scm` so `materialize-freebsd-package` now understands:
- `copy-build-system`
- `freebsd-world-build-system`
- `freebsd-kernel-build-system`
- added native-build identity/materialization helpers for:
- `/usr/src` source-tree identity
- `KERNCONF` path hashing
- build-root identity
- buildworld/buildkernel stamp handling
- staged installworld/installkernel materialization
- native build metadata files in store outputs
- chose an `mtree`-based `/usr/src` identity for the first native output model using:
- `type`
- `link`
- `size`
- `mode`
- `sha256digest`
- updated closure/image metadata modeling so the system can now distinguish:
- `host_base_stores`
- `native_base_stores`
- `fruix_runtime_stores`
- updated profile/tree merging to skip private dotfile metadata from store outputs so native-build metadata does not leak into the merged runtime tree
Validation:
- confirmed the updated package/system modules still load after the native build-model additions
- confirmed the new native package objects are present and classified as expected:
- `freebsd-native-kernel` reports build-system `freebsd-kernel-build-system`
- `freebsd-native-build-package? freebsd-native-world` returns `#t`
- re-ran the existing host-copy regression check successfully:
- `tests/system/run-phase7-system-closure.sh`
- workdir: `/tmp/phase13-1-closure-1775164392`
- result: `PASS phase7-system-closure`
Important findings:
- Fruix now has a real model for FreeBSD base artifacts built from `/usr/src`; the project is no longer limited to describing the FreeBSD base only as host-copy packages
- the first native identity story is explicit:
- `/usr/src` contributes through an `mtree`-based tree digest
- `KERNCONF` contributes through its resolved path hash
- selected make/build parameters are part of the manifest too
- the repo can now describe a mixed system more honestly by separating:
- transitional host-staged base stores
- native base stores
- Fruix runtime stores
Current assessment:
- Phase 13.1 is complete
- the next step is no longer architectural guesswork; it is concrete execution of the newly added native package/materialization path
Next recommended step:
1. build the first concrete `freebsd-native-kernel` and `freebsd-native-world` outputs from `/usr/src`
2. inspect/document their staged contents in `/frx/store`
3. then wire a bootable system closure/image around those native outputs