Skip to content

Commit eef9194

Browse files
committed
osbuild: update coreos.platforms stage patch
Update to the latest from upstream which fixes an os.dirname() bug (it should be os.path.dirname()). osbuild/osbuild#1589
1 parent c4d0ae5 commit eef9194

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

src/0001-util-Add-bls-module.patch

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From a16a27938627d0f16d7a9f09daa889ec29ec9740 Mon Sep 17 00:00:00 2001
1+
From 636d3810acaa2cf7ce33616a1d57a2eeed39797b Mon Sep 17 00:00:00 2001
22
From: Renata Ravanelli <[email protected]>
33
Date: Mon, 19 Feb 2024 10:30:34 -0300
44
Subject: [PATCH 1/2] util: Add bls module
@@ -8,20 +8,19 @@ Boot Loader Specification (BLS) as needed.
88

99
Signed-off-by: Renata Ravanelli <[email protected]>
1010
---
11-
osbuild/util/bls.py | 38 ++++++++++++++++++++
11+
osbuild/util/bls.py | 35 ++++++++++++++++++++
1212
stages/org.osbuild.kernel-cmdline.bls-append | 20 ++---------
13-
2 files changed, 40 insertions(+), 18 deletions(-)
13+
2 files changed, 37 insertions(+), 18 deletions(-)
1414
create mode 100644 osbuild/util/bls.py
1515

1616
diff --git a/osbuild/util/bls.py b/osbuild/util/bls.py
1717
new file mode 100644
18-
index 00000000..4168bd71
18+
index 00000000..f7ee6dad
1919
--- /dev/null
2020
+++ b/osbuild/util/bls.py
21-
@@ -0,0 +1,38 @@
21+
@@ -0,0 +1,35 @@
2222
+import glob
2323
+import os
24-
+import re
2524
+
2625
+"""
2726
+Function for appending parameters to
@@ -40,8 +39,6 @@ index 00000000..4168bd71
4039
+ kernel_arguments (list): A list of kernel arguments to be added.
4140
+
4241
+ """
43-
+ # There is unlikely to be more than one bls config, but just
44-
+ # in case we'll iterate over them.
4542
+ entries = []
4643
+ for entry in glob.glob(f"{root_path}/loader/entries/*.conf"):
4744
+ entries.append(entry)

src/0002-Add-coreos.platforms-stage.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From d26d29a9cfea000418ea1f24127e8697af88e351 Mon Sep 17 00:00:00 2001
1+
From 00edf67a4ec9a909919e8fa480f04c823b75ab63 Mon Sep 17 00:00:00 2001
22
From: Renata Ravanelli <[email protected]>
33
Date: Wed, 7 Feb 2024 16:43:54 -0300
44
Subject: [PATCH 2/2] Add coreos.platforms stage
@@ -25,7 +25,7 @@ Signed-off-by: Renata Ravanelli <[email protected]>
2525

2626
diff --git a/stages/org.osbuild.coreos.platform b/stages/org.osbuild.coreos.platform
2727
new file mode 100755
28-
index 00000000..9eceac0e
28+
index 00000000..f064fde0
2929
--- /dev/null
3030
+++ b/stages/org.osbuild.coreos.platform
3131
@@ -0,0 +1,115 @@
@@ -133,12 +133,12 @@ index 00000000..9eceac0e
133133
+ json_grub_args, json_kargs = process_platforms_json(platforms_dest_path, platform)
134134
+ if json_kargs:
135135
+ kernel_arguments.extend(json_kargs)
136-
+
137136
+ # Write out the GRUB2 console.cfg on all platforms where grub is being used
138-
+ if os.path.exists(os.dirname(grub_console_cfg_path)):
137+
+ if os.path.exists(os.path.dirname(grub_console_cfg_path)):
138+
+ # We add console.cfg file in grub.cfg, that's how the grubconfigs are added
139139
+ generate_console_settings_file(json_grub_args, grub_console_cfg_path)
140140
+ # Append kernel arguments in bls entries
141-
+ bls.options_append(f"{boot_path}", kernel_arguments)
141+
+ bls.options_append(boot_path, kernel_arguments)
142142
+
143143
+if __name__ == "__main__":
144144
+ args = osbuild.api.arguments()

0 commit comments

Comments
 (0)