Skip to content

Release avocado-cli 0.28.0#95

Merged
mobileoverlord merged 10 commits intomainfrom
rel/0.28.0
Mar 12, 2026
Merged

Release avocado-cli 0.28.0#95
mobileoverlord merged 10 commits intomainfrom
rel/0.28.0

Conversation

@mobileoverlord
Copy link
Contributor

@mobileoverlord mobileoverlord commented Mar 12, 2026

Summary

  • Build rootfs and initramfs images from packages
  • Add top-level rootfs and initramfs CLI commands with shared code
  • Replace avocado-build hooks with stone bundle in runtime build
  • Support erofs-lz4 and erofs-zst compression for extension images
  • Write AVOCADO_OS_BUILD_ID to sysroot and inject into initrd-release
  • Fix build ordering so var image exists before stone bundle
  • Fix stone build dir cleanup to prevent stale artifacts
  • Resolve clippy and formatting warnings for CI compliance
  • Fix RUSTSEC-2026-0037: upgrade quinn-proto to 0.11.14 (DoS vulnerability)
  • Update yanked js-sys and wasm-bindgen crates
  • Bump version to 0.28.0

Test plan

  • cargo fmt --all -- --check passes
  • cargo clippy --all-targets --all-features -- -D warnings passes
  • cargo build --verbose passes
  • cargo test --verbose passes
  • cargo audit passes (0 vulnerabilities, 0 warnings)

Build rootfs (erofs) and initramfs (cpio.zst) images from RPM package
sysroots instead of using pre-built Yocto images. This enables
AVOCADO_OS_BUILD_ID injection into os-release for hardware-rooted boot
verification.

Key changes:
- Add top-level rootfs/initramfs config sections with sensible defaults
- Install initramfs sysroot alongside rootfs during sdk install
- Build rootfs erofs and initramfs cpio images during runtime build
- Create usrmerge symlinks, empty /etc/machine-id, /init symlink
- Add offline systemctl wrapper for service enablement in sysroots
- Add depmod wrapper gated by AVOCADO_SYSROOT_SCRIPTS for cross-arch
- Use host-native ldconfig -r for cross-arch ld.so.cache generation
- Run systemd preset-all at build time for read-only rootfs
- Clean initramfs sysroot in sdk clean
- Add initramfs sysroot type to lockfile
Add `avocado rootfs {install,image,clean}` and `avocado initramfs
{install,image,clean}` as top-level commands. The image subcommands
support `--out` for specifying the output directory.

Refactor sdk/install.rs and runtime/build.rs to call into the new
shared modules instead of duplicating the sysroot install and image
build logic inline. This removes ~320 lines of duplicated code.
- Replace avocado-build-$TARGET_ARCH hook call with direct `stone bundle`
  invocation, building the .aos bundle before var partition assembly
- Add os_bundle field (image_id + sha256) to runtime manifest (v2) when
  the .aos file is produced by stone bundle
- Update connect upload to discover and upload .aos artifact alongside
  extension images
- Reorder build script: stone bundle runs after rootfs/initramfs but
  before var assembly, so the manifest can include the bundle hash
Move var partition assembly (var_files, manifest, mkfs.btrfs) before
stone bundle so the var image exists when stone bundle copies manifest
inputs to the build directory. This fixes provision failing with
"Image file 'avocado-image-var-*.btrfs' not found".

The manifest baked into the var partition no longer contains os_bundle
(it doesn't exist yet). After stone bundle produces the .aos, a
post-bundle step patches the manifest in var-staging with os_bundle
for connect upload (which reads var-staging directly, not the btrfs).
…ages

Write AVOCADO_OS_BUILD_ID to the sysroot os-release in addition to the
work copy so stone bundle can read it for the verify section.

Also fix rootfs install to install all configured packages instead of
only the first one.
Fix map_clone clippy lint by using .cloned() and apply cargo fmt.
The initramfs build was only writing the content-addressable hash to
os-release-initrd but not to initrd-release, leaving BUILD_ID as "0".
Now injects AVOCADO_OS_BUILD_ID into both files.
Add erofs-lz4 and erofs-zst as valid filesystem types, passing the
appropriate -z compression flag to mkfs.erofs. Introduce
compute_ext_input_hash_with_fs so that changing the filesystem format
invalidates the image stamp. Resolve the effective filesystem early
from per-extension config or the rootfs default.
The stone build directory at $AVOCADO_PREFIX/output/runtimes/$RUNTIME_NAME/stone
persisted between builds, causing stone to reuse cached rootfs images
instead of picking up freshly built ones. Add rm -rf before invoking
stone bundle as a defensive measure.
@mobileoverlord mobileoverlord merged commit 0fe355e into main Mar 12, 2026
5 checks passed
@mobileoverlord mobileoverlord deleted the rel/0.28.0 branch March 12, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant