From 7897e662fd73124f3137bb98ccd1121e25de3d2c Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 13 May 2020 18:43:16 +0200 Subject: [PATCH] stages/rpm-ostree: add initramfs-args Add a new stage option `initramfs-args`, that will in turn be set on the Treefile that is then passed to rpm-ostree. This will pass the options on to dracut when building the initramfs module. NB: the `ostree` dracut module will also always be automatically included by rpm-ostree. --- stages/org.osbuild.rpm-ostree | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stages/org.osbuild.rpm-ostree b/stages/org.osbuild.rpm-ostree index 061fd8c1..efdf8563 100755 --- a/stages/org.osbuild.rpm-ostree +++ b/stages/org.osbuild.rpm-ostree @@ -46,6 +46,11 @@ SCHEMA = """ "description": "Array of group names to still keep in /etc/group", "type": "array", "items": { "type": "string" } + }, + "initramfs-args": { + "description": "Array of arguments passed to dracut", + "type": "array", + "items": { "type": "string" } } } """ @@ -53,6 +58,7 @@ SCHEMA = """ def main(tree, options): etc_group_members = options.get("etc_group_members", []) + initramfs = options.get("initramfs-args", []) # rpm-ostree will either ensure that machine-id is empty # when machineid-compat is 'true' is or will remove it @@ -65,6 +71,7 @@ def main(tree, options): treefile["boot-location"] = "new" treefile["machineid-compat"] = machineid_compat treefile["etc-group-members"] = etc_group_members + treefile["initramfs-args"] = initramfs with treefile.as_tmp_file() as path: subprocess.run(["rpm-ostree", "compose", "postprocess",