Commit graph

3 commits

Author SHA1 Message Date
Till Wegmueller
7d97061e0f
Eliminate rootfs copy: populate directly into target filesystem
Restructure the QCOW2 build pipeline so the target filesystem is created
and mounted before Phase 1, allowing rootfs population directly into it.
This removes the wasteful and fragile copy_rootfs step that was the source
of merged-/usr symlink breakage and fixes the ZFS shadow-mount bug where
the BE dataset was mounted over the staging root.

New flow: Phase 2 prepare → Phase 1 populate → Phase 2 finalize → cleanup.
OCI/Artifact targets are unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 18:16:35 +01:00
Till Wegmueller
4290439e00
Add comprehensive tests and fix compiler warnings
- Fix false-positive unused_assignments warnings from thiserror/miette
  derive macros in Rust 2024 edition with crate-level #![allow]
- Add 5 tests for tar_layer (empty dir, files, nested dirs, symlinks,
  deterministic digest)
- Add 5 tests for manifest (default options, entrypoint/env, multiple
  layers, config digest verification, no entrypoint)
- Add 6 tests for layout (structure creation, oci-layout content,
  index.json references, layer blobs, config digest, multiple layers)
- Add 11 tests for overlays (file copy, empty file, missing source,
  ensure dir, symlink, remove file, remove dir contents, shadow
  create/update, multiple overlays)
- Add 4 tests for customizations (single user, multiple users, append
  to existing, no users noop)
- Add 3 tests for phase2/oci (layout output, entrypoint/env, empty
  staging)
- Add tempfile dev-dependency to forge-oci for test support

42 tests passing, 0 warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:40:16 +01:00
Till Wegmueller
48f8db1236
Initial implementation of refraction-forger
Standalone workspace with 4 crates for building optimized OS images
and publishing to OCI registries:

- spec-parser: KDL image spec parsing with include resolution and
  profile-based conditional filtering
- forge-oci: OCI image creation (tar layers, manifests, Image Layout)
  and registry push via oci-client
- forge-engine: Build pipeline with Phase 1 (rootfs assembly via native
  package managers with -R) and Phase 2 (QCOW2/OCI/artifact targets),
  plus dyn-compatible ToolRunner trait for external tool execution
- forger: CLI binary with build, validate, inspect, push, and targets
  commands

Ported KDL specs and overlay files from the vm-manager prototype.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:30:22 +01:00