From 722211df00742076f586e559c19d537c948be317 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 12 May 2021 18:45:15 +0000 Subject: [PATCH] stages/oci-archive: define ostree annotations Define a set of pre-defined ostree related annotations that can and should be used to indicate that a container image contains an OSTree commit. This can be used by other tools to inspect and extract the commit more easily. --- stages/org.osbuild.oci-archive | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/stages/org.osbuild.oci-archive b/stages/org.osbuild.oci-archive index 70ab0af5..88e34ab8 100755 --- a/stages/org.osbuild.oci-archive +++ b/stages/org.osbuild.oci-archive @@ -20,6 +20,14 @@ 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. +Specific annotations can be used to indicate that a container contains +an OSTree commit via the following: + - `org.osbuild.layer`: The layer containing the OSTree repository + - `org.osbuild.repo`: Path inside the container to the repository + - `org.osbuild.ref`: OSTree reference of the commit inside the repo +The `org.osbuild.layer` value can either bey a index (starting at 0), +or a digest in the form of :. + The final resulting tarball, aka a "orci-archive", can be imported via podman[3] with `podman pull oci-archive:`. @@ -103,6 +111,20 @@ SCHEMA_2 = r""" }, "annotations": { "type": "object", + "properties": { + "org.osbuild.ostree.layer": { + "description": "The layer that contains the OSTree repository", + "type": "string" + }, + "org.osbuild.ostree.repo": { + "description": "Path to the OSTree repository inside the layer", + "type": "string" + }, + "org.osbuild.ostree.ref": { + "description": "Reference of the OSTree commit in the repository", + "type": "string" + } + }, "additionalProperties": false, "patternProperties": { "^(?!org.osbuild|org.opencontainer).+": {