Skip to main content

Module bundle_stage

Module bundle_stage 

Source
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§

StagedBundle
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 --env boot needs to serve an already-staged revision, from a locally-available .gtbundle.
stage_local_bundle
Extract bundle_path under <env_dir>/revisions/<rev>/bundle/, pin every embedded .gtpack into a pack-list.lock, and return the refs to record on the revision. Idempotent: a re-stage of the same revision id replaces the prior extraction.