From 4623e76ba6e3e7a7e0f481016aac4fd687e83be9 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 11 Jul 2023 10:14:10 +0200 Subject: [PATCH] org.osbuild.ostree.config: Add support for composefs option The new `composefs` key will, if set, set the `composefs` key in the `ex-integrity.composefs` configuration section. If set to true, it means that when deploying from this repository a composefs image will be created. A value of `maybe` is also supported, which means composefs will only be created if support is built into ostree. Support for this was added in ostree 2023.4, earlier versions ignore this key. --- stages/org.osbuild.ostree.config | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stages/org.osbuild.ostree.config b/stages/org.osbuild.ostree.config index b004fbaf79..bd3a28a01c 100755 --- a/stages/org.osbuild.ostree.config +++ b/stages/org.osbuild.ostree.config @@ -42,6 +42,11 @@ SCHEMA = """ "readonly": { "description": "Read only sysroot and boot", "type": "boolean" + }, + "composefs": { + "description": "Enable composefs image generation on deploy.", + "type": "string", + "enum": ["true", "false", "maybe"] } } } @@ -74,6 +79,10 @@ def main(tree, options): ro = "true" if readonly else "false" ostree("config", "set", "sysroot.readonly", ro, repo=repo) + composefs = sysroot_options.get("composefs") + if composefs is not None: + ostree("config", "set", "ex-integrity.composefs", composefs, repo=repo) + if __name__ == '__main__': stage_args = osbuild.api.arguments()