Skip to content

Commit 050df90

Browse files
committed
osbuild: update patchset for OSBuild v136 release
OSbuild v136 was released and landed in F41. That release included the commit for one of the patches we are carrying [1] so we can drop 0004-util-chroot-Add-support-for-custom-directory-bind-mo.patch Two of the other patches we are carrying were merged upstream [2] [3], so we'll update the patches here to their final versions. [1] osbuild/osbuild#1917 [2] osbuild/osbuild#1927 [3] osbuild/osbuild#1944
1 parent 7033260 commit 050df90

6 files changed

+47
-131
lines changed

build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,7 @@ patch_osbuild() {
174174

175175
# Now all the software is under the /usr/lib/osbuild dir and we can patch
176176
cat /usr/lib/coreos-assembler/0001-osbuild-remoteloop-add-more-loop-device-options.patch \
177-
/usr/lib/coreos-assembler/0002-osbuild-loop-make-the-loop-device-if-missing.patch \
178-
/usr/lib/coreos-assembler/0003-util-osrelease.py-improve-whitespace-and-quote-strip.patch \
179-
/usr/lib/coreos-assembler/0004-util-chroot-Add-support-for-custom-directory-bind-mo.patch \
177+
/usr/lib/coreos-assembler/0001-util-osrelease.py-Replaced-string-stripping-with-shl.patch \
180178
/usr/lib/coreos-assembler/0005-stages-add-coreos.live-artifacts.mono-stage.patch \
181179
| patch -d /usr/lib/osbuild -p1
182180

src/0001-osbuild-remoteloop-add-more-loop-device-options.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 9edf8572ad4797033e7342c308ac617aa284f3ae Mon Sep 17 00:00:00 2001
1+
From f4b899873b1f108edbf12d81ee5dbed037238a7e Mon Sep 17 00:00:00 2001
22
From: Dusty Mabe <[email protected]>
33
Date: Fri, 22 Nov 2024 19:02:57 -0500
4-
Subject: [PATCH 1/5] osbuild/remoteloop: add more loop device options
4+
Subject: [PATCH] osbuild/remoteloop: add more loop device options
55

66
This adds lock, partscan, read_only, sector_size to _create_device()
77
similar to make_loop() from devices/org.osbuild.loopback.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 07d4f6955dd5dd5535b3e2f8e4722eb20f95e613 Mon Sep 17 00:00:00 2001
2+
From: Renata Ravanelli <[email protected]>
3+
Date: Tue, 12 Nov 2024 15:12:52 -0300
4+
Subject: [PATCH] util/osrelease.py: Replaced string stripping with
5+
`shlex.split()`
6+
7+
- Replaced string stripping with `shlex.split()` to properly
8+
handle values in the os-release file;
9+
- This ensures cleaner and more accurate key-value assignments,
10+
follwing a broader set of shell-like parsing rules;
11+
- Add os-release file for Fedora CoreOS 40 for testing.
12+
13+
Signed-off-by: Renata Ravanelli <[email protected]>
14+
---
15+
osbuild/util/osrelease.py | 6 +++++-
16+
1 file changed, 5 insertions(+), 1 deletion(-)
17+
18+
diff --git a/osbuild/util/osrelease.py b/osbuild/util/osrelease.py
19+
index b8d56e73..cc97faf5 100644
20+
--- a/osbuild/util/osrelease.py
21+
+++ b/osbuild/util/osrelease.py
22+
@@ -5,6 +5,7 @@ related documentation can be found in `os-release(5)`.
23+
"""
24+
25+
import os
26+
+import shlex
27+
28+
# The default paths where os-release is located, as per os-release(5)
29+
DEFAULT_PATHS = [
30+
@@ -33,7 +34,10 @@ def parse_files(*paths):
31+
if line[0] == "#":
32+
continue
33+
key, value = line.split("=", 1)
34+
- osrelease[key] = value.strip('"')
35+
+ split_value = shlex.split(value)
36+
+ if not split_value or len(split_value) > 1:
37+
+ raise ValueError(f"Key '{key}' has an empty value or more than one token: {value}")
38+
+ osrelease[key] = split_value[0]
39+
40+
return osrelease
41+
42+
--
43+
2.47.0
44+

src/0002-osbuild-loop-make-the-loop-device-if-missing.patch

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/0003-util-osrelease.py-improve-whitespace-and-quote-strip.patch

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/0004-util-chroot-Add-support-for-custom-directory-bind-mo.patch

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)