diff --git a/stages/org.osbuild.ostree.config b/stages/org.osbuild.ostree.config index 7d5bb71d..5a91a8ae 100755 --- a/stages/org.osbuild.ostree.config +++ b/stages/org.osbuild.ostree.config @@ -39,6 +39,10 @@ SCHEMA = """ "type": "string", "enum": ["none", "auto", "grub2", "syslinux", "uboot", "zipl", "aboot"] }, + "bootprefix": { + "description": "If set to true, the bootloader entries generated will include /boot as a prefix.", + "type": "boolean" + }, "readonly": { "description": "Read only sysroot and boot", "type": "boolean" @@ -63,6 +67,11 @@ def main(tree, options): if bootloader: ostree.cli("config", "set", "sysroot.bootloader", bootloader, repo=repo) + bootprefix = sysroot_options.get("bootprefix") + if bootprefix is not None: # can be False, which we would want to set + bp = "true" if bootprefix else "false" + ostree.cli("config", "set", "sysroot.bootprefix", bp, repo=repo) + readonly = sysroot_options.get("readonly") if readonly is not None: # can be False, which we would want to set ro = "true" if readonly else "false" diff --git a/test/data/manifests/fedora-coreos-container.json b/test/data/manifests/fedora-coreos-container.json index ba1f0ad4..bc9303d4 100644 --- a/test/data/manifests/fedora-coreos-container.json +++ b/test/data/manifests/fedora-coreos-container.json @@ -467,7 +467,8 @@ "sysroot": { "readonly": true, "bootloader": "none", - "bls-append-except-default": "grub_users=\"\"" + "bls-append-except-default": "grub_users=\"\"", + "bootprefix": true } } } diff --git a/test/data/manifests/fedora-coreos-container.mpp.yaml b/test/data/manifests/fedora-coreos-container.mpp.yaml index d6f220d3..59fdf552 100644 --- a/test/data/manifests/fedora-coreos-container.mpp.yaml +++ b/test/data/manifests/fedora-coreos-container.mpp.yaml @@ -98,6 +98,7 @@ pipelines: readonly: true bootloader: none bls-append-except-default: grub_users="" + bootprefix: true - type: org.osbuild.mkdir options: paths: