Skip to main content

Module pack

Module pack 

Source
Expand description

cog-pack: build a cog package directory from a cog source directory (vendor/cogs/src/cogs/<id>, holding the unmodified cog.toml) plus one binary per arch (from our fork build or upstream released binaries).

Structs§

CogPackInput
Inputs to pack_cog.

Enums§

PackError
Packing failure.

Constants§

COGNITUM_PROVENANCE_KIND
Attestation kind stamped when the cog dir’s provenance.json says the binary is a licensed Cognitum install (trust = "cognitum-sha256"). Unlike COGNITUM_RECORD_KIND it is not a signed release record and is never parsed as one; it only marks the package Cognitum-origin.
COGNITUM_PROVENANCE_PATH
Path of the stamped provenance attestation.
COGNITUM_RECORD_PATH
Path of a packaged Cognitum release record.
NO_PROVENANCE_KIND
Attestation kind recorded when the operator packed a redistributable package with --no-provenance-ok, so the signed manifest shows the claim.
NO_PROVENANCE_PATH
Path of the no-provenance assertion.

Functions§

cog_identity
[cog].id and [cog].version from cog.toml text.
pack_cog
Build an unsigned cog package in out_dir (which must not exist or be empty) and return its envelope. Sign it with super::sign::sign_envelope and persist with write_manifest.
write_manifest
Write (or overwrite) out_dir/cogpkg.json.
write_source_build_provenance
Record an operator’s own source build in <cog_dir>/provenance.json (trust = "source-build", with the sha256 of binary), which is what pack --redistributable accepts as evidence the binary is not a licensed Cognitum one. One provenance describes one binary.