Expand description
Local .gtbundle staging into an env’s revision directory. Two callers:
the deployer’s op revisions stage --bundle (stage_local_bundle), and a
remote worker re-materializing an already-staged revision at boot
(materialize_revision_from_bundle).
Extracts a local .gtbundle under the env’s revision directory, derives a
pinned pack list from the embedded .gtpack artifacts (sha256 over the
on-disk file, so it matches what the runner host re-verifies at load), and
writes the pack-list.lock document that the revision’s pack_list_lock_ref
points at. The runtime-config materializer then surfaces that ref for
greentic-start to boot from.
SquashFS extraction is delegated to greentic-bundle’s hardened
unbundle_artifact (path-traversal + symlink-escape guards), rather than
re-implementing the unpack here.
Structs§
- Staged
Bundle - Refs produced by staging a local bundle, threaded onto the new
Revision.
Functions§
- materialize_
revision_ from_ bundle - Materialize, on disk, everything the bundle-less
greentic-start --envboot needs to serve an already-staged revision, from a locally-available.gtbundle. - stage_
local_ bundle - Extract
bundle_pathunder<env_dir>/revisions/<rev>/bundle/, pin every embedded.gtpackinto apack-list.lock, and return the refs to record on the revision. Idempotent: a re-stage of the same revision id replaces the prior extraction.