Skip to content
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

osbuild: update patchset for OSBuild v136 release #3990

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,7 @@ patch_osbuild() {

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 9edf8572ad4797033e7342c308ac617aa284f3ae Mon Sep 17 00:00:00 2001
From f4b899873b1f108edbf12d81ee5dbed037238a7e Mon Sep 17 00:00:00 2001
From: Dusty Mabe <[email protected]>
Date: Fri, 22 Nov 2024 19:02:57 -0500
Subject: [PATCH 1/5] osbuild/remoteloop: add more loop device options
Subject: [PATCH] osbuild/remoteloop: add more loop device options

This adds lock, partscan, read_only, sector_size to _create_device()
similar to make_loop() from devices/org.osbuild.loopback.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 07d4f6955dd5dd5535b3e2f8e4722eb20f95e613 Mon Sep 17 00:00:00 2001
From: Renata Ravanelli <[email protected]>
Date: Tue, 12 Nov 2024 15:12:52 -0300
Subject: [PATCH] util/osrelease.py: Replaced string stripping with
`shlex.split()`

- Replaced string stripping with `shlex.split()` to properly
handle values in the os-release file;
- This ensures cleaner and more accurate key-value assignments,
follwing a broader set of shell-like parsing rules;
- Add os-release file for Fedora CoreOS 40 for testing.

Signed-off-by: Renata Ravanelli <[email protected]>
---
osbuild/util/osrelease.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/osbuild/util/osrelease.py b/osbuild/util/osrelease.py
index b8d56e73..cc97faf5 100644
--- a/osbuild/util/osrelease.py
+++ b/osbuild/util/osrelease.py
@@ -5,6 +5,7 @@ related documentation can be found in `os-release(5)`.
"""

import os
+import shlex

# The default paths where os-release is located, as per os-release(5)
DEFAULT_PATHS = [
@@ -33,7 +34,10 @@ def parse_files(*paths):
if line[0] == "#":
continue
key, value = line.split("=", 1)
- osrelease[key] = value.strip('"')
+ split_value = shlex.split(value)
+ if not split_value or len(split_value) > 1:
+ raise ValueError(f"Key '{key}' has an empty value or more than one token: {value}")
+ osrelease[key] = split_value[0]

return osrelease

--
2.47.0

34 changes: 0 additions & 34 deletions src/0002-osbuild-loop-make-the-loop-device-if-missing.patch

This file was deleted.

This file was deleted.

This file was deleted.

Empty file modified src/osbuild-manifests/platform.live.ipp.yaml
100755 → 100644
Empty file.
Loading