core/image-release
Assemble a factory GPT disk and an authenticated update bundle from shared payloads.
Assemble a factory GPT disk and an authenticated update bundle from shared payloads.
Inputs
-
layout -
Kind: file
GPT ImageLayout in JSON or TOML.
-
partitions -
Kind: directory
Partition images named by their one-based partition numbers.
-
manifest -
Kind: file
Rugix bundle manifest mapping payload files to target slots.
-
payloads -
Kind: directory
Bundle payload files at the paths referenced by the manifest.
-
certificate -
Kind: file
Single PEM-encoded X.509 end-entity signer certificate issued directly by the trusted root. No intermediates. The default signer requires RSA.
Parameters
-
size -
Default:
0Factory disk capacity in bytes. Zero sizes the disk from its partitions.
-
signing-time -
Default:
""Signing time as Unix seconds in a string. Empty uses the build source epoch.
Outputs
-
image -
Artifact Source:
{"rule":{"node":"disk","output":"image"}} -
bundle -
Artifact Source:
{"rule":{"node":"signed","output":"bundle"}} -
bundle-hash -
Artifact Source:
{"rule":{"node":"signed","output":"hash"}}
Rule Parameters
Callers can replace these operations through rules bindings. An implementation
receives the listed inputs and parameters and must produce the listed outputs.
See Rule Parameters.
bundle-signer
Create a CMS signature over the bundle’s signed metadata. Bakery verifies it against certificate.
Default implementation: core/sign-cms.
-
Input
content -
Kind: file
Signed bundle metadata.
-
Input
certificate -
Kind: file
Signer certificate that must verify the signature.
-
Parameter
signing-time -
Signing time as Unix seconds in a string. Empty means the build source epoch.
-
Output
signature -
Kind: file
DER-encoded CMS SignedData with the encapsulated content and signer certificate.
Execution
Composes other rules into a build graph.
Behavior
Create a factory GPT disk and a signed Rugix update bundle in one composition.
layout and numbered partitions feed core/image-gpt; manifest and
payloads feed core/bundle-rugix.
core/sign-bundle-rugix authenticates the bundle with
the bundle-signer rule parameter and verifies the signature against
certificate.
Supply one PEM-encoded signing certificate; the default bundle signer requires RSA. The bundle embeds only this signer certificate, without intermediates. Issue it directly from the root that Rugix Ctrl trusts. The signer must not be a CA certificate. Concatenated PEM certificate chains are not supported by this signing rule.
This composition joins those operations without imposing partition roles, payload names, or a boot scheme. The caller connects the same artifacts to factory partitions and bundle payloads. The manifest maps payload filenames to the consuming system’s Rugix Ctrl slots.
size is the disk capacity in bytes; zero sizes it from the layout.
signing-time is Unix seconds encoded as a string; an empty value uses the
build source epoch. Outputs are image, bundle, and bundle-hash.
Bundle Signer
The default bundle-signer, core/sign-cms, signs with a
private key file. Bind its key secret through
rules.bundle-signer.secrets.key. To sign with an HSM or a KMS, bind another
rule as described in core/sign-bundle-rugix.
Example
For example, assemble an existing layout and payload set:
uses = "core/image-release"
inputs.layout = { path = "release/layout.toml" }
inputs.partitions = { path = "release/partitions" }
inputs.manifest = { path = "release/rugix-bundle.toml" }
inputs.payloads = { path = "release/payloads" }
inputs.certificate = { path = "keys/bundle.crt" }
rules.bundle-signer.secrets.key = { path = "keys/bundle.key" }
Save the invocation as build-rule.toml and run
./run-bakery bake rule build-rule.toml build/result.