Merged
Conversation
c961cfa to
232ebde
Compare
e49a707 to
3553ab8
Compare
3553ab8 to
d9733f9
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.
Add runtime management, TUF-based updates, and JSON output
Summary
This PR introduces runtime lifecycle management to
avocadoctl, enabling devices to stage, activate, inspect, and update complete runtime images via content-addressable storage and TUF (The Update Framework) verified updates. It also adds machine-readable JSON output across all commands.10 commits, 15 files changed (+4,420 / -399 lines)
New Features
Runtime management (
avocadoctl runtime)runtime list-- list all staged runtimes and identify the active oneruntime add --url <tuf-repo>-- fetch and stage a runtime from a TUF repository with signature and hash verificationruntime add --manifest <path>-- stage a runtime from a local manifest fileruntime remove <id>-- remove a staged runtime (with active-runtime safety guard)runtime activate <id>-- activate a staged runtime by swinging theactivesymlinkruntime inspect <id>-- display runtime details including extensions and image pathsTUF-based verified updates (
src/update.rs)timestamp.jsonandtargets.json, verifies ed25519 signatures against a locally provisioned root of trust, and validates SHA-256 hashes on all downloaded targetsContent-addressable image storage (
src/manifest.rs,src/staging.rs)image_idsimages/directoryRoot authority inspection (
avocadoctl root-authority)root.jsonMachine-readable output (
--output json/-o json)--outputflag added;table(default) orjsonstatus,merge,unmerge,refresh,enable,disableall emit structured JSON when requestedOutputManagerupdated to suppress human-readable decoration in JSON modeChanges to existing code
extcommands --status_extensionsnow loads the active runtime manifest and enriches status output with runtime metadata;enable/disablewarn when an active manifest is present (manifest takes precedence over symlink discovery); lifecycle events now respect per-scope enablement checksconfig-- newruntimes_dirconfig key andget_avocado_base_dir()accessor (respectsAVOCADO_BASE_DIRenv var, then config, then/var/lib/avocadodefault)Dependencies
New crate dependencies added to
Cargo.toml/Cargo.lock:tough(TUF metadata parsing),ed25519-compact(signature verification),sha2(hash verification),uuid(content-addressable IDs), and their transitive dependencies.