osbuild/SOURCES/ostree-bootloader-backend.p...

76 lines
2.7 KiB
Diff

From 7ec305a343c48444678416bc187cd7c2ab54e26d Mon Sep 17 00:00:00 2001
From: Christian Kellner <christian@kellner.me>
Date: Thu, 9 Sep 2021 11:03:12 +0200
Subject: [PATCH 1/2] ostree.config: add `bootloader` config option
Ability to set the bootloader backend that OSTree should use. NB:
normally this should be set to `none` since in modern distros and
bootloaders the BLS is used and the BLS snippets are generated on
`none` but none of the of the specific bootloader tools are run,
like `grub2-mkconfig` for grub.
Update the fedora image manifest to use that config setting.
---
stages/org.osbuild.ostree.config | 8 ++++++++
test/data/manifests/fedora-ostree-image.json | 3 ++-
test/data/manifests/fedora-ostree-image.mpp.json | 3 ++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/stages/org.osbuild.ostree.config b/stages/org.osbuild.ostree.config
index 5dc378c..4bd25c4 100755
--- a/stages/org.osbuild.ostree.config
+++ b/stages/org.osbuild.ostree.config
@@ -5,6 +5,9 @@ Change OSTree configuration
Change the configuration for an OSTree repository.
Currently only the following values are supported:
- `sysroot.readonly`
+ - `sysroot.bootloader`
+
+See `ostree.repo-config(5)` for more information.
"""
import os
@@ -32,6 +35,11 @@ SCHEMA = """
"additionalProperties": false,
"description": "Options concerning the sysroot",
"properties": {
+ "bootloader": {
+ "description": "Configure the bootloader that OSTree uses (use 'none' for BLS).",
+ "type": "string",
+ "enum": ["none", "auto", "grub2", "syslinux", "uboot", "zipl"]
+ },
"readonly": {
"description": "Read only sysroot and boot",
"type": "boolean"
diff --git a/test/data/manifests/fedora-ostree-image.json b/test/data/manifests/fedora-ostree-image.json
index 2562dab..2e6e716 100644
--- a/test/data/manifests/fedora-ostree-image.json
+++ b/test/data/manifests/fedora-ostree-image.json
@@ -870,7 +870,8 @@
"repo": "/ostree/repo",
"config": {
"sysroot": {
- "readonly": true
+ "readonly": true,
+ "bootloader": "none"
}
}
}
diff --git a/test/data/manifests/fedora-ostree-image.mpp.json b/test/data/manifests/fedora-ostree-image.mpp.json
index bab2eb4..689cbf0 100644
--- a/test/data/manifests/fedora-ostree-image.mpp.json
+++ b/test/data/manifests/fedora-ostree-image.mpp.json
@@ -282,7 +282,8 @@
"repo": "/ostree/repo",
"config": {
"sysroot": {
- "readonly": true
+ "readonly": true,
+ "bootloader": "none"
}
}
}
--
2.31.1