Skip to content

0.36.2: include overlay in rootfs/initramfs singleton discriminator#135

Merged
mobileoverlord merged 3 commits intomainfrom
rel/0.36.2
Apr 29, 2026
Merged

0.36.2: include overlay in rootfs/initramfs singleton discriminator#135
mobileoverlord merged 3 commits intomainfrom
rel/0.36.2

Conversation

@mobileoverlord
Copy link
Copy Markdown
Contributor

Summary

  • Fix cannot mix singleton form ... and named-map form error when rootfs: or initramfs: blocks use the new overlay: key alongside packages: / filesystem:. The overlay field on ImageConfig was added but not registered with the singleton-vs-named-map deserializer, so it was treated as an unknown key and tipped the form-detection heuristic into mixed-form rejection.
  • Add unit tests covering overlay-only and overlay-with-other-fields singleton forms for both rootfs and initramfs.
  • Bump version to 0.36.2.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --verbose (868 lib + 7 integration + 6 doc tests pass)
  • New tests: test_rootfs_singleton_with_overlay_only, test_rootfs_singleton_with_overlay_and_packages, test_initramfs_singleton_with_overlay_only, test_initramfs_singleton_with_overlay_and_packages

…tramfs

The `feat: overlay support for rootfs and initramfs sysroots` change added
an `overlay` field to `ImageConfig`, but the singleton-vs-named-map
deserializer was not updated. As a result, `rootfs:` / `initramfs:` blocks
that used `overlay` alongside `packages` / `filesystem` were rejected with:

  cannot mix singleton form ... and named-map form ...

Add `overlay` to the field-name list passed to the named-or-single
deserializer for both rootfs and initramfs, and add tests covering
overlay-only and overlay-with-other-fields singleton forms.
The rootfs/initramfs install command runs with `source_environment: false`
to keep DNF's environment minimal, so `rsync` (provided by the SDK
toolchain, like in the original extension overlay path) is not on PATH
when the overlay snippet runs:

  Applying overlay 'overlay' to initramfs sysroot (merge mode)
  bash: line 250: rsync: command not found

Source `${AVOCADO_SDK_PREFIX}/environment-setup` inside the overlay
snippet itself (both merge and opaque modes) so the overlay step is
self-sufficient regardless of how the parent install command was
invoked. Add unit tests asserting the env source line is present in
both branches.
@mobileoverlord mobileoverlord merged commit b5dad2d into main Apr 29, 2026
5 checks passed
@mobileoverlord mobileoverlord deleted the rel/0.36.2 branch April 29, 2026 12:58
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