diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index 24d6fde..fcff5a2 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -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 diff --git a/docs/reports/phase13-native-base-model-freebsd.md b/docs/reports/phase13-native-base-model-freebsd.md new file mode 100644 index 0000000..f08ec57 --- /dev/null +++ b/docs/reports/phase13-native-base-model-freebsd.md @@ -0,0 +1,144 @@ +# Phase 13.1: model FreeBSD world and kernel as native Fruix build artifacts + +Date: 2026-04-02 + +## Goal + +Phase 13 begins the Option B pivot from host-copy FreeBSD base packages toward builder-produced FreeBSD base artifacts in `/frx/store`. + +This first subphase focused on the modeling and package/materialization layer: + +- define native Fruix package objects for FreeBSD kernel and world outputs +- make their output identity depend on `/usr/src` and explicit build parameters +- teach the system metadata to distinguish host-staged base stores from native base stores + +The purpose of this step was not yet to prove a full boot from those new outputs. It was to land the description and materialization model that Phase 13.2 can exercise concretely. + +## Implementation + +### 1. Added native package definitions in `modules/fruix/packages/freebsd.scm` + +New package objects: + +- `freebsd-native-kernel` +- `freebsd-native-world` + +New predicate: + +- `freebsd-native-build-package?` + +The native packages are intentionally FreeBSD-specific and currently parameterized with: + +- `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 also carries an explicit runtime-oriented prune list: + +- `usr/share/doc` +- `usr/share/examples` +- `usr/share/info` +- `usr/share/man` +- `usr/tests` + +That keeps the first native world target narrower and aligned with the current boot/runtime goal. + +### 2. Added native build-system support in `modules/fruix/system/freebsd.scm` + +`materialize-freebsd-package` now understands three classes of package build system: + +- `copy-build-system` +- `freebsd-world-build-system` +- `freebsd-kernel-build-system` + +For the native FreeBSD path, the materializer now records identity from: + +- `/usr/src` +- explicit build parameters +- the selected kernel configuration + +The `/usr/src` source identity is currently represented by an `mtree`-based tree digest using: + +- `type` +- `link` +- `size` +- `mode` +- `sha256digest` + +The kernel configuration is also hashed explicitly via its resolved `KERNCONF` path. + +The code now has dedicated helpers for: + +- native source identity +- native build-root identity +- buildworld/buildkernel stamp handling +- staged installworld/installkernel materialization +- writing native build metadata beside the resulting store outputs + +### 3. Store-layout metadata now separates native and host-staged base stores + +The closure metadata and CLI metadata now distinguish: + +- `host_base_stores` +- `native_base_stores` +- `fruix_runtime_stores` + +This is important for the architecture transition: a system can now say explicitly which parts of its FreeBSD base still come from transitional host-copy packages and which parts come from native `/usr/src`-driven artifacts. + +### 4. Merged output trees now skip private dotfile metadata + +The profile/tree merge logic now ignores private dotfile metadata in store outputs. This keeps internal build metadata files from leaking into the merged runtime tree when native base outputs start being consumed by real system closures. + +## Validation + +### Package/model load + +Verified that the package/system modules still load after the native build-model additions, and that the new native package objects are present. + +Observed output included: + +```text +freebsd-kernel-build-system +#t +``` + +for: + +- `freebsd-native-kernel` build-system lookup +- `freebsd-native-build-package? freebsd-native-world` + +### Existing closure path regression check + +To make sure the modeling work did not break the already validated host-copy path, re-ran: + +- `tests/system/run-phase7-system-closure.sh` + +Passing run: + +- `PASS phase7-system-closure` +- workdir: `/tmp/phase13-1-closure-1775164392` + +This confirmed that the existing FreeBSD system closure path still works while the new native base model is being introduced. + +## Assessment + +Phase 13.1 is complete. + +Fruix now has a real representation for native FreeBSD base artifacts in its package/materialization model rather than only the older host-copy package set. Just as importantly, the output identity story is no longer purely implicit: `/usr/src`, `KERNCONF`, and the selected build parameters are now part of the native artifact definition. + +This is the necessary bridge into Phase 13.2, where those new package definitions need to be exercised to produce concrete kernel/world outputs in `/frx/store`. + +## Next recommended step + +Proceed to Phase 13.2: + +- build the first concrete `freebsd-native-kernel` and `freebsd-native-world` outputs from `/usr/src` +- inspect their staged contents in `/frx/store` +- document the exact split that the first native runtime target provides diff --git a/modules/fruix/packages/freebsd.scm b/modules/fruix/packages/freebsd.scm index f4019f4..9a46900 100644 --- a/modules/fruix/packages/freebsd.scm +++ b/modules/fruix/packages/freebsd.scm @@ -28,6 +28,9 @@ freebsd-zlib freebsd-sh freebsd-bash + freebsd-native-kernel + freebsd-native-world + freebsd-native-build-package? freebsd-host-staged-package? %freebsd-host-staged-all-packages %freebsd-host-staged-core-packages @@ -461,6 +464,62 @@ library for profile experiments." #:install-plan '((file "/lib/libz.so.6" "lib/libz.so.6")))) +(define freebsd-native-kernel + (freebsd-package + #:name "freebsd-native-kernel" + #:version freebsd-release + #:build-system 'freebsd-kernel-build-system + #:home-page "https://www.freebsd.org/" + #:synopsis "Native Fruix-managed FreeBSD kernel artifact" + #:description + "FreeBSD-specific package definition that builds a kernel from /usr/src and +stages the resulting boot/kernel tree as a real Fruix store artifact. This is +the first native replacement for the earlier host-copy kernel package." + #:license 'bsd-2 + #:install-plan + '((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"))))) + +(define freebsd-native-world + (freebsd-package + #:name "freebsd-native-world" + #:version freebsd-release + #:build-system 'freebsd-world-build-system + #:home-page "https://www.freebsd.org/" + #:synopsis "Native Fruix-managed FreeBSD world artifact" + #:description + "FreeBSD-specific package definition that builds and installs a minimal +runtime-oriented world from /usr/src into a real Fruix store artifact. The +first split intentionally focuses on the world needed for the Fruix guest to +boot, network, activate, and run Shepherd." + #:license 'bsd-2 + #:install-plan + '((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")) + (prune-paths . ("usr/share/doc" + "usr/share/examples" + "usr/share/info" + "usr/share/man" + "usr/tests"))))) + +(define (freebsd-native-build-package? package) + (not (not (memq (freebsd-package-build-system package) + '(freebsd-kernel-build-system freebsd-world-build-system))))) + ;; Transitional boundary: the FreeBSD base layer below is still staged by ;; copying selected artifacts from the builder host. Plan 3 keeps these ;; package sets explicit so they can be replaced incrementally by native @@ -511,10 +570,11 @@ library for profile experiments." %freebsd-host-staged-system-packages))) (define (freebsd-host-staged-package? package) - (any (lambda (candidate) - (string=? (freebsd-package-name candidate) - (freebsd-package-name package))) - %freebsd-host-staged-all-packages)) + (and (not (freebsd-native-build-package? package)) + (any (lambda (candidate) + (string=? (freebsd-package-name candidate) + (freebsd-package-name package))) + %freebsd-host-staged-all-packages))) (define %freebsd-host-staged-replacement-order '((first-wave . (freebsd-kernel freebsd-bootloader)) diff --git a/modules/fruix/system/freebsd.scm b/modules/fruix/system/freebsd.scm index 3f27f18..0212a65 100644 --- a/modules/fruix/system/freebsd.scm +++ b/modules/fruix/system/freebsd.scm @@ -251,7 +251,71 @@ (_ (error (format #f "unsupported install plan entry: ~s" entry))))) -(define (package-manifest-string package input-paths) +(define native-freebsd-build-version "1") + +(define (freebsd-native-build-system? build-system) + (not (not (memq build-system '(freebsd-kernel-build-system freebsd-world-build-system))))) + +(define (build-plan-ref plan key default) + (match (assoc key plan) + ((_ . value) value) + (#f default))) + +(define (make-flag->pair flag) + (match (string-split flag #\=) + ((name value ...) (cons name (string-join value "="))) + ((name) (cons name "yes")) + (_ (error (format #f "invalid make flag: ~a" flag))))) + +(define (native-build-kernconf-path plan) + (or (build-plan-ref plan 'kernconf-path #f) + (string-append (build-plan-ref plan 'source-root "/usr/src") + "/sys/" + (build-plan-ref plan 'target-arch "amd64") + "/conf/" + (build-plan-ref plan 'kernconf "GENERIC")))) + +(define (native-build-source-tree-sha256 source-root) + (string-hash + (command-output "mtree" "-c" "-k" "type,link,size,mode,sha256digest" "-p" source-root))) + +(define (native-build-common-manifest plan) + (let* ((source-root (build-plan-ref plan 'source-root "/usr/src")) + (target (build-plan-ref plan 'target "amd64")) + (target-arch (build-plan-ref plan 'target-arch "amd64")) + (kernconf (build-plan-ref plan 'kernconf "GENERIC")) + (make-flags (build-plan-ref plan 'make-flags '())) + (kernconf-path (native-build-kernconf-path plan))) + (unless (file-exists? source-root) + (error (format #f "native FreeBSD source root does not exist: ~a" source-root))) + (unless (file-exists? kernconf-path) + (error (format #f "native FreeBSD kernconf does not exist: ~a" kernconf-path))) + `((build-version . ,native-freebsd-build-version) + (source-root . ,source-root) + (source-tree-identity-mode . "mtree:type,link,size,mode,sha256digest") + (source-tree-sha256 . ,(native-build-source-tree-sha256 source-root)) + (target . ,target) + (target-arch . ,target-arch) + (kernconf . ,kernconf) + (kernconf-path . ,kernconf-path) + (kernconf-sha256 . ,(file-hash kernconf-path)) + (make-flags . ,make-flags)))) + +(define (native-build-manifest-string package input-paths) + (let* ((plan (freebsd-package-install-plan package)) + (common (native-build-common-manifest plan)) + (prune-paths (build-plan-ref plan 'prune-paths '()))) + (string-append + "name=" (freebsd-package-name package) "\n" + "version=" (freebsd-package-version package) "\n" + "build-system=" (symbol->string (freebsd-package-build-system package)) "\n" + "inputs=" (string-join input-paths ",") "\n" + "native-build-common=\n" + (object->string common) + "\nprune-paths=\n" + (object->string prune-paths)))) + +(define (copy-build-manifest-string package input-paths) (string-append "name=" (freebsd-package-name package) "\n" "version=" (freebsd-package-version package) "\n" @@ -262,6 +326,11 @@ (freebsd-package-install-plan package)) "\n"))) +(define (package-manifest-string package input-paths) + (if (freebsd-native-build-system? (freebsd-package-build-system package)) + (native-build-manifest-string package input-paths) + (copy-build-manifest-string package input-paths))) + (define (copy-regular-file source destination) (let ((mode (stat:perms (stat source)))) (copy-file source destination) @@ -291,6 +360,137 @@ (_ (error (format #f "unsupported install plan entry: ~s" entry))))) +(define (delete-path-if-exists path) + (when (or (file-exists? path) (false-if-exception (readlink path))) + (let ((kind (stat:type (lstat path)))) + (case kind + ((directory) (delete-file-recursively path)) + (else (delete-file path)))))) + +(define (stage-tree-into-output stage-root output-path) + (mkdir-p output-path) + (for-each (lambda (entry) + (copy-node (string-append stage-root "/" entry) + (string-append output-path "/" entry))) + (directory-entries stage-root))) + +(define (current-build-jobs) + (or (getenv "FRUIX_FREEBSD_BUILD_JOBS") + (safe-command-output "sysctl" "-n" "hw.ncpu") + "1")) + +(define (native-build-root common) + (string-append "/var/tmp/fruix-freebsd-native-build-" + (string-hash (object->string common)))) + +(define (native-make-arguments common build-root) + (append + (list "-C" (assoc-ref common 'source-root) + (string-append "MAKEOBJDIRPREFIX=" build-root "/obj") + (string-append "TARGET=" (assoc-ref common 'target)) + (string-append "TARGET_ARCH=" (assoc-ref common 'target-arch)) + (string-append "KERNCONF=" (assoc-ref common 'kernconf))) + (assoc-ref common 'make-flags))) + +(define* (make-command-string common build-root target #:key (parallel? #f) (destdir #f)) + (string-join + (append + (list "make") + (if parallel? + (list (string-append "-j" (current-build-jobs))) + '()) + (native-make-arguments common build-root) + (if destdir + (list (string-append "DESTDIR=" destdir)) + '()) + (list target)) + " ")) + +(define (run-command/log log-file command) + (mkdir-p (dirname log-file)) + (let ((status (system* "sh" "-c" (string-append command " >" log-file " 2>&1")))) + (unless (zero? status) + (error (format #f "command failed; see ~a: ~a" log-file command))))) + +(define (ensure-native-build-root common build-root) + (mkdir-p build-root) + (mkdir-p (string-append build-root "/logs")) + (mkdir-p (string-append build-root "/stamps")) + (write-file (string-append build-root "/build-parameters.scm") + (object->string common))) + +(define (ensure-native-buildworld common build-root) + (let ((stamp (string-append build-root "/stamps/buildworld.done"))) + (ensure-native-build-root common build-root) + (unless (file-exists? stamp) + (run-command/log (string-append build-root "/logs/buildworld.log") + (make-command-string common build-root "buildworld" #:parallel? #t)) + (write-file stamp "ok\n")))) + +(define (ensure-native-buildkernel common build-root) + (let ((stamp (string-append build-root "/stamps/buildkernel-" (assoc-ref common 'kernconf) ".done"))) + (ensure-native-buildworld common build-root) + (unless (file-exists? stamp) + (run-command/log (string-append build-root "/logs/buildkernel-" (assoc-ref common 'kernconf) ".log") + (make-command-string common build-root "buildkernel" #:parallel? #t)) + (write-file stamp "ok\n")))) + +(define (prune-stage-paths stage-root paths) + (for-each (lambda (path) + (delete-path-if-exists (string-append stage-root "/" path))) + paths)) + +(define (native-build-output-metadata package common build-root stage-root) + `((package . ,(freebsd-package-name package)) + (version . ,(freebsd-package-version package)) + (build-system . ,(freebsd-package-build-system package)) + (source-root . ,(assoc-ref common 'source-root)) + (source-tree-sha256 . ,(assoc-ref common 'source-tree-sha256)) + (target . ,(assoc-ref common 'target)) + (target-arch . ,(assoc-ref common 'target-arch)) + (kernconf . ,(assoc-ref common 'kernconf)) + (kernconf-path . ,(assoc-ref common 'kernconf-path)) + (kernconf-sha256 . ,(assoc-ref common 'kernconf-sha256)) + (make-flags . ,(assoc-ref common 'make-flags)) + (build-root . ,build-root) + (stage-root . ,stage-root) + (buildworld-log . ,(string-append build-root "/logs/buildworld.log")) + (buildkernel-log . ,(string-append build-root "/logs/buildkernel-" (assoc-ref common 'kernconf) ".log")) + (install-log . ,(string-append build-root "/logs/install-" (freebsd-package-name package) ".log")))) + +(define (materialize-native-freebsd-package package input-paths manifest output-path) + (let* ((plan (freebsd-package-install-plan package)) + (common (native-build-common-manifest plan)) + (build-root (native-build-root common)) + (stage-root (string-append build-root "/stage-" (freebsd-package-name package) "-" (string-hash manifest))) + (install-log (string-append build-root "/logs/install-" (freebsd-package-name package) ".log"))) + (case (freebsd-package-build-system package) + ((freebsd-world-build-system) + (ensure-native-buildworld common build-root) + (delete-path-if-exists stage-root) + (mkdir-p stage-root) + (run-command/log install-log + (string-append (make-command-string common build-root "installworld" #:destdir stage-root) + " && " + (make-command-string common build-root "distribution" #:destdir stage-root))) + (prune-stage-paths stage-root (build-plan-ref plan 'prune-paths '()))) + ((freebsd-kernel-build-system) + (ensure-native-buildkernel common build-root) + (delete-path-if-exists stage-root) + (mkdir-p stage-root) + (run-command/log install-log + (make-command-string common build-root "installkernel" #:destdir stage-root))) + (else + (error (format #f "unsupported native FreeBSD build system: ~a" + (freebsd-package-build-system package))))) + (mkdir-p output-path) + (stage-tree-into-output stage-root output-path) + (write-file (string-append output-path "/.references") + (string-join input-paths "\n")) + (write-file (string-append output-path "/.fruix-package") manifest) + (write-file (string-append output-path "/.freebsd-native-build-info.scm") + (object->string (native-build-output-metadata package common build-root stage-root))))) + (define (package-cache-key package) (string-append (freebsd-package-name package) "-" (freebsd-package-version package))) @@ -308,13 +508,20 @@ "-" (freebsd-package-version package)))) (unless (file-exists? output-path) - (mkdir-p output-path) - (for-each (lambda (entry) - (materialize-plan-entry output-path entry)) - (freebsd-package-install-plan package)) - (write-file (string-append output-path "/.references") - (string-join input-paths "\n")) - (write-file (string-append output-path "/.fruix-package") manifest)) + (case (freebsd-package-build-system package) + ((copy-build-system) + (mkdir-p output-path) + (for-each (lambda (entry) + (materialize-plan-entry output-path entry)) + (freebsd-package-install-plan package)) + (write-file (string-append output-path "/.references") + (string-join input-paths "\n")) + (write-file (string-append output-path "/.fruix-package") manifest)) + ((freebsd-world-build-system freebsd-kernel-build-system) + (materialize-native-freebsd-package package input-paths manifest output-path)) + (else + (error (format #f "unsupported package build system: ~a" + (freebsd-package-build-system package)))))) (hash-set! cache (package-cache-key package) output-path) output-path)))) @@ -1033,7 +1240,8 @@ (string-append output-path "/" relative)))) (for-each (lambda (entry) - (unless (member entry '(".references" ".fruix-package")) + (unless (or (member entry '(".references" ".fruix-package")) + (string-prefix? "." entry)) (let* ((entry-relative (if (string-null? relative) entry (string-append relative "/" entry))) @@ -1067,11 +1275,19 @@ (shepherd-prefix "/tmp/shepherd-freebsd-validate-install")) (validate-operating-system os) (let* ((cache (make-hash-table)) - (kernel-store (materialize-freebsd-package (operating-system-kernel os) store-dir cache)) - (bootloader-store (materialize-freebsd-package (operating-system-bootloader os) store-dir cache)) + (kernel-package (operating-system-kernel os)) + (bootloader-package (operating-system-bootloader os)) + (base-packages (operating-system-base-packages os)) + (kernel-store (materialize-freebsd-package kernel-package store-dir cache)) + (bootloader-store (materialize-freebsd-package bootloader-package store-dir cache)) (base-package-stores (map (lambda (package) (materialize-freebsd-package package store-dir cache)) - (operating-system-base-packages os))) + base-packages)) + (base-package-pairs (map cons base-packages base-package-stores)) + (store-classification + (append (list (cons kernel-package kernel-store) + (cons bootloader-package bootloader-store)) + base-package-pairs)) (guile-runtime-extra-files '(("/usr/local/lib/libgc-threaded.so.1" . "lib/libgc-threaded.so.1") ("/usr/local/lib/libffi.so.8" . "lib/libffi.so.8") @@ -1093,8 +1309,18 @@ #:extra-files (append guile-runtime-extra-files guile-extra-runtime-files))) (shepherd-store (materialize-prefix shepherd-prefix "fruix-shepherd-runtime" "1.0.9" store-dir)) - (host-base-stores (delete-duplicates (append (list kernel-store bootloader-store) - base-package-stores))) + (host-base-stores + (delete-duplicates + (map cdr + (filter (lambda (entry) + (freebsd-host-staged-package? (car entry))) + store-classification)))) + (native-base-stores + (delete-duplicates + (map cdr + (filter (lambda (entry) + (freebsd-native-build-package? (car entry))) + store-classification)))) (fruix-runtime-stores (list guile-store guile-extra-store shepherd-store)) (metadata-files `(("metadata/host-base-provenance.scm" @@ -1103,6 +1329,8 @@ . ,(object->string `((host-base-store-count . ,(length host-base-stores)) (host-base-stores . ,host-base-stores) + (native-base-store-count . ,(length native-base-stores)) + (native-base-stores . ,native-base-stores) (fruix-runtime-store-count . ,(length fruix-runtime-stores)) (fruix-runtime-stores . ,fruix-runtime-stores) (host-base-replacement-order . ,%freebsd-host-staged-replacement-order) @@ -1116,7 +1344,7 @@ . ,(render-activation-rc-script)) ("usr/local/etc/rc.d/fruix-shepherd" . ,(render-rc-script shepherd-store guile-store guile-extra-store))))) - (references (delete-duplicates (append host-base-stores fruix-runtime-stores))) + (references (delete-duplicates (append host-base-stores native-base-stores fruix-runtime-stores))) (manifest (string-append "closure-spec=\n" (object->string (operating-system-closure-spec os)) @@ -1171,6 +1399,7 @@ (shepherd-store . ,shepherd-store) (base-package-stores . ,base-package-stores) (host-base-stores . ,host-base-stores) + (native-base-stores . ,native-base-stores) (fruix-runtime-stores . ,fruix-runtime-stores) (host-base-provenance-file . ,(string-append closure-path "/metadata/host-base-provenance.scm")) (store-layout-file . ,(string-append closure-path "/metadata/store-layout.scm")) diff --git a/scripts/fruix.scm b/scripts/fruix.scm index 547fb37..ee33e9b 100644 --- a/scripts/fruix.scm +++ b/scripts/fruix.scm @@ -164,6 +164,7 @@ Options:\n\ (references (assoc-ref result 'references)) (base-package-stores (assoc-ref result 'base-package-stores)) (host-base-stores (assoc-ref result 'host-base-stores)) + (native-base-stores (assoc-ref result 'native-base-stores)) (fruix-runtime-stores (assoc-ref result 'fruix-runtime-stores)) (host-provenance (call-with-input-file (assoc-ref result 'host-base-provenance-file) read))) (emit-metadata @@ -182,6 +183,8 @@ Options:\n\ (base_package_stores . ,(string-join base-package-stores ",")) (host_base_store_count . ,(length host-base-stores)) (host_base_stores . ,(string-join host-base-stores ",")) + (native_base_store_count . ,(length native-base-stores)) + (native_base_stores . ,(string-join native-base-stores ",")) (fruix_runtime_store_count . ,(length fruix-runtime-stores)) (fruix_runtime_stores . ,(string-join fruix-runtime-stores ",")) (host_base_provenance_file . ,(assoc-ref result 'host-base-provenance-file)) @@ -220,6 +223,7 @@ Options:\n\ (image-spec (assoc-ref result 'image-spec)) (store-items (assoc-ref result 'store-items)) (host-base-stores (assoc-ref result 'host-base-stores)) + (native-base-stores (assoc-ref result 'native-base-stores)) (fruix-runtime-stores (assoc-ref result 'fruix-runtime-stores)) (host-provenance (call-with-input-file (assoc-ref result 'host-base-provenance-file) read))) (emit-metadata @@ -235,6 +239,8 @@ Options:\n\ (closure_path . ,(assoc-ref result 'closure-path)) (host_base_store_count . ,(length host-base-stores)) (host_base_stores . ,(string-join host-base-stores ",")) + (native_base_store_count . ,(length native-base-stores)) + (native_base_stores . ,(string-join native-base-stores ",")) (fruix_runtime_store_count . ,(length fruix-runtime-stores)) (fruix_runtime_stores . ,(string-join fruix-runtime-stores ",")) (host_base_provenance_file . ,(assoc-ref result 'host-base-provenance-file))