Skip to content

Commit

Permalink
org.osbuild.ostree.config: Add support for composefs option
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexlarsson committed Jul 11, 2023
1 parent d2b6a2e commit 506d6cf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion stages/org.osbuild.ostree.config
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
}
}
Expand All @@ -50,7 +55,6 @@ SCHEMA = """
}
"""


def ostree(*args, _input=None, **kwargs):
args = list(args) + [f'--{k}={v}' for k, v in kwargs.items()]
print("ostree " + " ".join(args), file=sys.stderr)
Expand All @@ -74,6 +78,9 @@ 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()
Expand Down

0 comments on commit 506d6cf

Please sign in to comment.