Shared infrastructure for building Linux distribution ISOs.
This crate provides common abstractions used by both leviso (LevitateOS) and AcornOS builders.
distro-builder (this crate)
│
├── component/ Declarative component system
│ └── Installable trait, Phase enum, generic Op variants
│
├── build/ Build utilities
│ ├── context DistroConfig and BuildContext traits
│ └── filesystem FHS directory structure utilities
│
├── artifact/ Artifact builder interfaces
│ ├── rootfs mkfs.erofs wrapper (EROFS only)
│ ├── initramfs cpio+gzip builder
│ └── iso xorriso wrapper
│
└── preflight/ Host tool validation
use distro_builder::component::{Installable, Op, Phase};
use distro_builder::build::context::DistroConfig;
// Implement DistroConfig for your distribution
struct MyDistroConfig;
impl DistroConfig for MyDistroConfig {
fn os_name(&self) -> &str { "MyDistro" }
fn os_id(&self) -> &str { "mydistro" }
// ... other methods
}
// Define components using the Installable trait
struct MyComponent;
impl Installable for MyComponent {
fn name(&self) -> &str { "MyComponent" }
fn phase(&self) -> Phase { Phase::Services }
fn ops(&self) -> Vec<Op> {
vec![
Op::Dir("etc/myservice".into()),
Op::WriteFile("etc/myservice/config".into(), "key=value".into()),
]
}
}This crate is currently a structural skeleton. The abstractions are defined but artifact builders contain placeholder implementations. Full extraction from leviso requires testing with both LevitateOS and AcornOS builds.
Installabletrait andPhaseenum- Generic
Opvariants (directory, file, symlink, user/group, binary) DistroConfigandBuildContexttraits- FHS filesystem utilities (with tests)
- Host tool preflight validation
- EROFS builder (interface only)
- Initramfs builder (interface only)
- ISO builder (interface only)
- distro-spec - Distribution specifications (constants, paths, services)
- leviso - LevitateOS ISO builder
- AcornOS - AcornOS ISO builder
- docs/00_MIGRATION_INDEX.md - migration index for numbered distro-builder migration tracks
- docs/01_MIGRATION_FEDORA_SWAP.md - active Fedora Server DVD swap plan for the Levitate/Ralph Stage 01 source path
- docs/02_MIGRATION_BOOTC.md - cancelled track; the repo is keeping the current A/B model instead of migrating to
bootc - docs/03_MIGRATION_STAGELESS.md - active migration plan for replacing stage-numbered composition with product-oriented ownership
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.