Open
Conversation
The install command now detects packages removed from avocado.yaml by comparing against the lock file and triggers a clean sysroot reinstall to keep the build environment consistent. Previously, DNF's additive behavior meant removed packages would persist in the sysroot. Adds dual-mode install: `avocado install` (no args) syncs all sysroots, while `avocado install <packages> -e|-r|--sdk` adds packages to avocado.yaml and installs them. New `avocado uninstall` command removes packages from the config and reconciles the sysroot. Introduces config_edit module for comment-preserving YAML modifications so that `avocado install/uninstall` can surgically update avocado.yaml without destroying user comments or formatting. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the deprecated VersionedExtension and External extension code
paths that are no longer used. Unify all extensions under a single
"extensions" key in the lock file (v3) with richer metadata: each
extension now tracks optional source info (type, package, version)
alongside sysroot packages via the new ExtensionLock type. This
eliminates the separate "fetched-extensions" top-level key and
simplifies the extension model to just local vs remote sources.
- Bump lock file to v3 with migration from v1 and v2
- Remove SysrootType::VersionedExtension variant
- Remove ExtensionLocation::External and ExtensionDependency::{External,Versioned}
- Delete dead code: install_versioned_extension, build_external_extension,
discover_all_external_extensions, and related functions
- Add lock file integration to ext fetch for version pinning
- Simplify ExtensionDependency enums in build.rs and install.rs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When avocado install/build runs with no extra arguments, only process extensions that are dependencies of runtimes present in the config. Previously, all sdk.compile sections and extension SDK deps were processed regardless of whether the extensions referencing them were needed by any active runtime, causing failures when unavailable packages were referenced. - Add shared find_active_extensions/find_active_compile_sections utilities to config.rs for runtime-aware extension filtering - Filter compile deps, extension SDK deps, and remote extension fetching in sdk/install.rs to only active extensions - Fix install.rs fallback to return empty list (not all extensions) when no runtimes match the target - Add separate compile-deps stamp to track target-sysroot state, enabling detection of stale compile deps when runtimes change Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace --downloadonly + rpm2cpio/cpio extraction with DNF --installroot for fetching extension packages from the repository. This gives proper RPM tracking, clean upgrades, and version management — matching the pattern already used for extension dependency installs. Each extension gets a per-extension installroot at $AVOCADO_PREFIX/includes/<ext_name>. Force mode cleans the installroot before reinstalling to ensure a fresh state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Stamp validation errors now use the same colored [ERROR]/[INFO]/[WARNING] tag format as the rest of the CLI output instead of plain "Error:" text. This also fixes the doubled "Error: Error:" prefix from anyhow wrapping. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Support extensions.<name>.filesystem config option, defaulting to squashfs for backward compatibility while allowing users to opt into erofs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nsions
When a remote extension's composed config contains a wildcard version
(e.g., "2024.*" from {{ avocado.distro.version }}), query the RPM
database to resolve the actual installed version. Local extensions
must still specify a concrete semver. Applied to both ext build and
ext image commands.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Separate concerns that were previously overloaded on distro.version:
- Rename distro.version → distro.release (with serde alias for compat)
- Use "releasever" internally for the composed {release}/{channel} value
- Migrate repo config from sdk.* to distro.repo.* with new env var
priority chains (AVOCADO_REPO_URL, AVOCADO_RELEASEVER,
AVOCADO_DISTRO_RELEASE, AVOCADO_DISTRO_CHANNEL)
- Core packages use "*" — repo scoping via --releasever + lock file
- Remove wildcard version resolution / RPM DB fallback from ext build
and ext image — config version is validated directly
- Consolidate validate_semver() into shared utils/version.rs module
- Add distro_release to lock file as a feed year compatibility guard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace cp -rp and cp -a with plain cp -r to avoid copying security.selinux extended attributes that fail on overlay2 layers inside Docker containers on SELinux-enabled hosts. GNU coreutils cp with any --preserve flag (including mode) still attempts to preserve SELinux security context on btrfs+bindfs+overlay2, causing ENOTSUP. Plain cp -r is sufficient since rpmbuild controls final permissions via the %files section.
YAML like `distro.release: 2024` parses as an integer, causing deserialization to fail. Add a custom serde visitor that accepts both strings and integers, converting integers to strings.
Allows config files to declare a semver requirement (e.g., ">=0.26.0") that the running CLI must satisfy, giving users a clear upgrade message instead of confusing errors when configs use newer features.
…rget }}
Extension config lookups in ext build/image/clean/package used direct
key matching against the composed config, which fails when the YAML key
is still a template string (e.g., "avocado-bsp-{{ avocado.target }}").
Add find_ext_in_mapping() helper that tries direct lookup first, then
falls back to iterating keys and matching via interpolate_name.
Also move test module to end of install.rs to fix clippy
items_after_test_module lint.
Replace silent fallback to "0.1.0" default when an extension's version field is missing with an explicit error. Also fail loudly when a remote extension's avocado.yaml cannot be parsed instead of silently skipping the merge, which caused downstream version resolution to silently break.
Resolve wildcard extension versions from the RPM database for remote extensions and apply cargo fmt fixes.
- Unify default include patterns across all source types so switching doesn't change the composed config hash - Scope stamp hash comparison to matching component types so extension hashes aren't compared against SDK/compile-deps stamps - Fix runtime build to use get_merged_runtime_config() for hash computation, matching how the install stamp was created - Clear stale package-installed files before bindfs mount to prevent "mountpoint is not empty" errors when switching from package to path - Fix flaky env var tests with #[serial] and clearing higher-priority env vars - Update repository URL in Cargo.toml
Three fixes for seamless target switching without requiring a clean: 1. Restore repo_url after cp in sdk init: the `cp -r /etc/dnf` was overwriting the custom AVOCADO_REPO_URL with the container default, causing sdk install to search the wrong repo for target packages. 2. Auto-initialize SDK env in fetch: when fetching metadata for a new target, auto-create the minimal SDK directory structure so dnf makecache can run without requiring sdk install first. 3. Make missing sysroots non-fatal in fetch: rootfs and target-sysroot now print info and skip instead of erroring, matching the existing behavior for extensions and runtimes.
Update default.yaml and init tests to match the 0.26.0 config changes: - Add cli_requirement: ">=0.26.0" - Rename distro.version to distro.release with feed year (2024) - Simplify distro.channel from "apollo-edge" to "edge" - Update SDK image tag to include release and channel - Fix clippy uninlined_format_args warnings in config.rs and lockfile.rs
6aef5bf to
086cf72
Compare
Replace extensions.sort()+dedup() with order-preserving dedup so the manifest extensions array reflects the user's config ordering. This ordering is used by avocadoctl to enforce deterministic systemd-sysext/confext merge priority.
086cf72 to
ad37df0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.