-
Notifications
You must be signed in to change notification settings - Fork 182
osbuild: use bootc install to deploy the container #4224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jbtrystram
wants to merge
1
commit into
coreos:main
Choose a base branch
from
jbtrystram:osbuild-bootc-install-fs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
src/0001-stages-ignition-parametrize-the-path-to-boot.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
From e37bd5d256c02f2a7693ec220322cf131e8e5274 Mon Sep 17 00:00:00 2001 | ||
From: jbtrystram <[email protected]> | ||
Date: Thu, 17 Jul 2025 15:59:27 +0200 | ||
Subject: [PATCH] stages/ignition: parametrize the path to boot | ||
|
||
Allow passing a mount to specify where to write the igntion.firstboot | ||
file. | ||
This keeps the default `tree:///` value to not break existing stages. | ||
--- | ||
stages/org.osbuild.ignition | 13 ++++++++----- | ||
stages/org.osbuild.ignition.meta.json | 5 +++++ | ||
2 files changed, 13 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/stages/org.osbuild.ignition b/stages/org.osbuild.ignition | ||
index 23f91c48..4466cabf 100755 | ||
--- a/stages/org.osbuild.ignition | ||
+++ b/stages/org.osbuild.ignition | ||
@@ -2,18 +2,17 @@ | ||
import sys | ||
|
||
import osbuild.api | ||
+from osbuild.util import parsing | ||
|
||
|
||
-def main(tree, options): | ||
- network = options.get("network", []) | ||
- | ||
+def main(network, location): | ||
# grub, when detecting the '/boot/ignition.firstboot' file | ||
# will set the "ignition_firstboot" option so that ignition | ||
# gets triggered during that boot. Additionally, the file | ||
# itself will be sourced this the 'ignition_network_kcmdline' | ||
# that is also in the "ignition_firstboot" variable can be | ||
# overwritten with the contents of `network` | ||
- with open(f"{tree}/boot/ignition.firstboot", "w", encoding="utf8") as f: | ||
+ with open(f"{location}/ignition.firstboot", "w", encoding="utf8") as f: | ||
if network: | ||
netstr = " ".join(network) | ||
f.write(f"set ignition_network_kcmdline='{netstr}'") | ||
@@ -23,5 +22,9 @@ def main(tree, options): | ||
|
||
if __name__ == '__main__': | ||
args = osbuild.api.arguments() | ||
- r = main(args["tree"], args.get("options", {})) | ||
+ options = args.get("options", {}) | ||
+ target = options.get("target", "tree:///boot") | ||
+ location = parsing.parse_location(target, args) | ||
+ network = options.get("network", []) | ||
+ r = main(network, location) | ||
sys.exit(r) | ||
diff --git a/stages/org.osbuild.ignition.meta.json b/stages/org.osbuild.ignition.meta.json | ||
index 612d59c7..dd295c24 100644 | ||
--- a/stages/org.osbuild.ignition.meta.json | ||
+++ b/stages/org.osbuild.ignition.meta.json | ||
@@ -22,6 +22,11 @@ | ||
"items": { | ||
"type": "string" | ||
} | ||
+ }, | ||
+ "target": { | ||
+ "type": "string", | ||
+ "description": "Location to write the 'ignition.firstboot' file.", | ||
+ "default": "tree:///boot" | ||
} | ||
} | ||
} | ||
-- | ||
2.50.1 | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.