diff --git a/stages/org.osbuild.oci-archive b/stages/org.osbuild.oci-archive index 047e3484..70ab0af5 100755 --- a/stages/org.osbuild.oci-archive +++ b/stages/org.osbuild.oci-archive @@ -16,6 +16,10 @@ as the `config` option for the "OCI Image Configuration" (see [2]), except those that map to the "Go type map[string]struct{}", which are represented as array of strings. +Manifest annotations can be included via the `annotation` options. Any +`key`, `value` pair is allowed, with the exception of the pre-defined +`org.osbuild` and `org.opencontainer` namespaces. + The final resulting tarball, aka a "orci-archive", can be imported via podman[3] with `podman pull oci-archive:`. @@ -96,6 +100,15 @@ SCHEMA_2 = r""" "type": "string" } } + }, + "annotations": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^(?!org.osbuild|org.opencontainer).+": { + "type": "string" + } + } } } }, @@ -250,6 +263,10 @@ def create_oci_dir(inputs, output_dir, options): "layers": [] } + annotations = options.get("annotations", {}) + if annotations: + manifest["annotations"] = annotations + index = { "schemaVersion": 2, "manifests": []