Validate FreeBSD Fruix rootfs trees

This commit is contained in:
2026-04-01 18:49:40 +02:00
parent e4288dc330
commit 514ec97f6b
5 changed files with 378 additions and 1 deletions

View File

@@ -1960,6 +1960,87 @@ Current assessment:
- Phase 7.2 is now satisfied on the current FreeBSD prototype track
- the next step is to materialize and statically validate an installable root filesystem tree from this system closure
## 2026-04-01 — Phase 7.3 completed: installable rootfs tree validated from the system closure
Completed work:
- added the Phase 7.3 rootfs materialization harnesses:
- `tests/system/materialize-phase7-rootfs.scm`
- `tests/system/run-phase7-rootfs.sh`
- wrote the Phase 7.3 report:
- `docs/reports/phase7-rootfs-freebsd.md`
- ran the rootfs harness successfully and captured metadata under:
- `/tmp/phase7-rootfs-metadata.txt`
Important findings:
- the declarative Fruix FreeBSD system can now be materialized as a root filesystem tree rather than only as a store closure directory
- the rootfs uses a Guix-like anchor:
- `/run/current-system`
so that boot assets, generated configuration, and system-profile content remain tied to the declarative system closure
- static validation confirmed:
- boot asset linkage
- generated `/etc` linkage
- activation payload presence
- Shepherd `rc.d` launch integration
- declared filesystem entries
- declared user/group provisioning in the activation path
- deterministic ready-state wiring through `/var/lib/fruix/ready`
- observed metadata confirmed:
- `rootfs=/tmp/.../rootfs`
- `closure_path=/frx/store/...-fruix-system-fruix-freebsd`
- `run_current_system_target=/frx/store/...-fruix-system-fruix-freebsd`
- `activate_target=/run/current-system/activate`
- `bin_target=/run/current-system/profile/bin`
- `sbin_target=/run/current-system/profile/sbin`
- `boot_kernel_target=/run/current-system/boot/kernel`
- `boot_loader_target=/run/current-system/boot/loader`
- `boot_loader_efi_target=/run/current-system/boot/loader.efi`
- `rc_conf_target=/run/current-system/etc/rc.conf`
- `rc_script_target=/run/current-system/usr/local/etc/rc.d/fruix-shepherd`
- `ready_marker=/var/lib/fruix/ready`
- `validation_mode=static-rootfs-check`
Current assessment:
- Phase 7.3 is now satisfied on the current FreeBSD prototype track
- Phase 7 as a whole is now complete on the active FreeBSD amd64 prototype path
## 2026-04-01 — Phase 7 completed on the current FreeBSD prototype track
Phase 7 is now considered complete for the active FreeBSD amd64 prototype path.
Why this milestone is satisfied:
- **Phase 7.1** success criteria were met on the prototype track:
- a minimal Fruix operating-system object now exists for FreeBSD
- it evaluates into a coherent system-closure specification
- **Phase 7.2** success criteria were met on the prototype track:
- that system model now materializes into a reproducible closure under `/frx/store`
- the closure contains boot assets, generated `/etc` files, activation payloads, and Shepherd launch integration
- **Phase 7.3** success criteria were met on the prototype track:
- the closure now materializes into a concrete rootfs tree
- the resulting rootfs passes static validation for later image-construction work
Important scope note:
- this completes the **declarative system-composition milestone** for the current prototype track, not a fully booted Fruix guest yet
- the current output is a validated closure plus rootfs tree; Phase 8 still needs to turn that into a reproducible bhyve-friendly disk image
- the chosen first system-init strategy remains:
- FreeBSD init + `rc.d` launching Shepherd
rather than Shepherd-as-PID-1
- the current system model remains Fruix-owned and FreeBSD-oriented rather than attempting full upstream Guix System integration prematurely
Next recommended step:
1. begin Phase 8.1 by creating a reproducible disk-image build path from the generated Fruix rootfs tree
2. keep the current init decision explicit for the first boot target:
- FreeBSD init + `rc.d` + Shepherd
3. continue preserving the selective Fruix naming policy:
- Fruix at the product boundary
- `/frx` as the canonical store root
- stable upstream-derived internal names unless there is strong architectural value in renaming them
Current assessment:
- Phase 7.1 is now satisfied on the current FreeBSD prototype track

View File

@@ -0,0 +1,78 @@
# Phase 7.3: Installable FreeBSD rootfs tree materialized from the Fruix system closure
Date: 2026-04-01
## Summary
This step takes the Phase 7.2 system closure and materializes a root filesystem tree suitable for later image-construction work.
Added files:
- `tests/system/materialize-phase7-rootfs.scm`
- `tests/system/run-phase7-rootfs.sh`
## Validation command
Run command:
```sh
METADATA_OUT=/tmp/phase7-rootfs-metadata.txt \
./tests/system/run-phase7-rootfs.sh
```
## What the harness does
The harness:
1. ensures the local Guile/Fibers/Shepherd runtime is available
2. reuses the declarative Phase 7 operating-system model
3. materializes the referenced system closure under `/frx/store`
4. creates a root filesystem tree that points at that closure through:
- `/run/current-system`
- boot symlinks
- `/bin`, `/sbin`, `/lib`, and `/usr/*` links into the system profile
- generated `/etc` links into the system closure
- generated Shepherd `rc.d` launch integration
5. performs static validation of the generated rootfs structure
## Observed results
Observed metadata included:
- `rootfs=/tmp/.../rootfs`
- `closure_path=/frx/store/...-fruix-system-fruix-freebsd`
- `run_current_system_target=/frx/store/...-fruix-system-fruix-freebsd`
- `activate_target=/run/current-system/activate`
- `bin_target=/run/current-system/profile/bin`
- `sbin_target=/run/current-system/profile/sbin`
- `boot_kernel_target=/run/current-system/boot/kernel`
- `boot_loader_target=/run/current-system/boot/loader`
- `boot_loader_efi_target=/run/current-system/boot/loader.efi`
- `rc_conf_target=/run/current-system/etc/rc.conf`
- `rc_script_target=/run/current-system/usr/local/etc/rc.d/fruix-shepherd`
- `ready_marker=/var/lib/fruix/ready`
- `validation_mode=static-rootfs-check`
- `ready_state_mode=freebsd-init+rc.d-shepherd`
## Important findings
- the current FreeBSD Fruix track now has a concrete rootfs tree derived from the declarative system model and closure rather than only a closure directory in the store
- the rootfs uses a Guix-like `/run/current-system` anchor so that generated configuration and system profile content remain tied back to the declarative closure
- static validation confirmed:
- boot asset linkage
- generated `/etc` linkage
- activation payload presence
- Shepherd launch integration
- declared filesystem content
- declared user/group provisioning in the activation path
- the deterministic ready-marker path for the first boot target
- the chosen ready state for the first integrated FreeBSD system remains:
- FreeBSD init + `rc.d` + Shepherd-managed ready marker
## Conclusion
Phase 7.3 is satisfied on the current FreeBSD prototype track:
- a root filesystem tree can now be materialized from the declarative Fruix system closure
- the rootfs is internally coherent enough for the next image-construction phase
- Phase 7 as a whole is now complete on the active FreeBSD amd64 prototype path