Skip to content

release 0.27.0#94

Merged
mobileoverlord merged 12 commits intomainfrom
rel/0.27.0
Mar 6, 2026
Merged

release 0.27.0#94
mobileoverlord merged 12 commits intomainfrom
rel/0.27.0

Conversation

@mobileoverlord
Copy link
Contributor

@mobileoverlord mobileoverlord commented Mar 6, 2026

Summary

  • Add var_files support for extensions: files matching var_files patterns are excluded from the .raw sysext image (they live on the var partition)
  • Add Docker image priming for runtime builds: pre-pulls container images before building to avoid mid-build pull failures
  • Fix host Docker contamination from inner dockerd during image priming
  • Detect broken Docker daemon and suggest restart on failure
  • Add sdk package <section> command: stages cross-compiled artifacts and builds architecture-specific RPMs via rpmbuild, with optional Yocto-inspired sub-package splitting (-dev, -dbg, -src)
  • Add $AVOCADO_BUILD_DIR env var to sdk compile, sdk clean, and ext build install scripts for per-section out-of-tree build output
  • Fix sdk clean to pass AVOCADO_BUILD_DIR alongside AVOCADO_SDK_PREFIX
  • Add --out flag to sdk package to copy RPM(s) to host; success message shows host-relative path
  • Add --out flag to ext image to copy resulting .raw image to host after creation
  • Make ext and runtime subcommand names positional args (e.g. avocado ext image app, avocado runtime build dev); -e/-r flags kept hidden for backward compatibility
  • Extend positional name args to top-level provision, deploy, and sign commands; update stamp fix_command output to use positional syntax
  • Fix: pass AVOCADO_BUILD_DIR to kernel install script during runtime build (set to $AVOCADO_SDK_PREFIX/build/<section> matching the SDK compile path)
  • Add automatic update notifications: CLI checks for new releases in the background on every command and prints a notice to stderr when a newer version is available; results cached 24 hours, opt-out via AVOCADO_NO_UPDATE_CHECK

Test plan

  • avocado sdk compile <section> — verify $AVOCADO_BUILD_DIR is available in compile script
  • avocado sdk clean <section> — verify $AVOCADO_BUILD_DIR is set in clean script
  • avocado sdk package <section> --out ./rpms — RPM appears at rpms/<name>.rpm, success message shows host path
  • avocado sdk package <section> (no --out) — success message shows filename only, not container-internal path
  • avocado ext image -e <ext> --out ./images.raw image copied to host output dir
  • Runtime build with var_files — verify var files excluded from sysext image
  • Docker image priming — verify images are pre-pulled before runtime build
  • avocado ext image app — positional name arg works without -e flag
  • avocado runtime build dev — positional name arg works without -r flag
  • avocado provision dev, avocado deploy dev, avocado sign dev — positional name args work
  • Runtime build with kernel install script — verify $AVOCADO_BUILD_DIR is set correctly
  • Run any command with a newer release available — update notice appears after command output
  • Run same command again within 24h — no network call made (cached), notice still shown if newer version available
  • AVOCADO_NO_UPDATE_CHECK=1 avocado build — no update notice shown

- Exclude var_files patterns from sysext/confext .raw images (erofs and squashfs)
- Apply extension var_files to var partition during runtime build
- Apply runtime-level var_files mappings to var partition
- Prime Docker image cache on var partition by starting a temporary dockerd
- Auto-add --privileged to runtime build when extensions declare docker_images
- Update compute_runtime_input_hash to include full parsed config for hash stability
Two issues caused the host Docker daemon to break after a runtime build
with docker_images configured:

1. Cgroup contamination: the inner dockerd wrote into the host's
   /sys/fs/cgroup (via --privileged bind-mount). Fix: overmount
   /sys/fs/cgroup with a private cgroup2/tmpfs before starting the
   inner dockerd and umount it on exit.

2. docker0 deletion: with --network=host the inner dockerd shares the
   host network namespace and removes the docker0 bridge when it exits,
   breaking subsequent docker run calls on the host. Fix: save docker0's
   IP before starting the inner dockerd and restore the bridge in the
   cleanup trap if it was deleted.

Also add --exec-opt native.cgroupdriver=cgroupfs to avoid systemd-cgroup
interaction, use a trap for cleanup so it runs even on pull failure, and
read remote extension configs directly from the Docker volume mountpoint
(get_volume_mountpoint_sync) before falling back to spinning up a
throwaway container, making the version-field merge more reliable.
When a container command fails due to a known Docker daemon health
problem, print an actionable hint instead of the confusing low-level
error. Currently handles two cases:

- Missing docker0 bridge (bridge/veth Device does not exist): caused by
  an inner dockerd tearing down the host bridge on exit. Suggests
  `sudo systemctl restart docker`.

- Daemon not running / socket missing: suggests
  `sudo systemctl start docker`.

The hint is printed alongside the existing verbose error output so no
information is lost.
- Add `sdk package <section>` command that stages compiled artifacts into
  a sysroot layout and builds architecture-specific RPMs via rpmbuild
- Add `PackageConfig` and `SplitPackageConfig` structs to config; extend
  `CompileConfig` with optional `package` block (backward compatible)
- Expose `$AVOCADO_BUILD_DIR` env var in `sdk compile`, `sdk clean`, and
  `ext build` install scripts for per-section out-of-tree build output
- Fix `sdk clean` to pass `AVOCADO_BUILD_DIR` alongside `AVOCADO_SDK_PREFIX`
- Use `--out` flag (consistent with other commands) for host output path;
  success message shows host-relative path, not container-internal path
…n compat flags

Extension and runtime names can now be passed as positional arguments
(e.g. `avocado ext image app`, `avocado runtime build dev`) matching
the pattern already used by `avocado sdk compile <name>`. The -e and
-r flags are kept hidden for backward compatibility. Note: `ext dnf`
and `runtime dnf` are excluded due to clap limitations with
trailing_var_arg.
…ds and fix commands

- Add positional name arg to Commands::Provision, Deploy, Sign (hide -r/--runtime flag)
- Update stamp fix_command() output to use positional syntax (avocado ext build app)
- Update all tests to match new positional fix command format
…uild

The kernel install script needs AVOCADO_BUILD_DIR to locate the bzImage
produced by the SDK compile step. Set it to $AVOCADO_SDK_PREFIX/build/<section>
matching the path used during compilation.
@mobileoverlord mobileoverlord merged commit ac56e0e into main Mar 6, 2026
5 checks passed
@mobileoverlord mobileoverlord deleted the rel/0.27.0 branch March 6, 2026 13:08
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