Skip to content

Commit c880bc3

Browse files
committed
osbuild/bootc: hard-code container sigpolicy flag
Until we are able to tune this through and install config file, let's always pass the flag at the osbuild label. This can be dropped once we have bootc-dev/bootc#2116 in bootc.
1 parent a33335b commit c880bc3

2 files changed

Lines changed: 53 additions & 21 deletions

File tree

build.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -193,27 +193,27 @@ write_archive_info() {
193193
}
194194

195195
patch_osbuild() {
196-
return # No patches at this time
197-
### Add a few patches that either haven't made it into a release or
198-
### that will be obsoleted with other work that will be done soon.
199-
###
200-
### To make it easier to apply patches we'll move around the osbuild
201-
### code on the system first:
202-
##rmdir /usr/lib/osbuild/osbuild
203-
##python_lib_dir=$(ls -d /usr/lib/python*)
204-
##mv "${python_lib_dir}/site-packages/osbuild" /usr/lib/osbuild/
205-
##mkdir -p /usr/lib/osbuild/tools
206-
##mv /usr/bin/osbuild-mpp /usr/lib/osbuild/tools/
207-
### Now all the software is under the /usr/lib/osbuild dir and we can patch
208-
### shellcheck disable=SC2002
209-
##cat \
210-
## /usr/lib/coreos-assembler/foo.patch \
211-
## | patch -d /usr/lib/osbuild -p1
212-
### And then move the files back; supermin appliance creation will need it back
213-
### in the places delivered by the RPM.
214-
##mv /usr/lib/osbuild/tools/osbuild-mpp /usr/bin/osbuild-mpp
215-
##mv /usr/lib/osbuild/osbuild "${python_lib_dir}/site-packages/osbuild"
216-
##mkdir -p /usr/lib/osbuild/osbuild
196+
#return # No patches at this time
197+
# Add a few patches that either haven't made it into a release or
198+
# that will be obsoleted with other work that will be done soon.
199+
#
200+
# To make it easier to apply patches we'll move around the osbuild
201+
# code on the system first:
202+
rmdir /usr/lib/osbuild/osbuild
203+
python_lib_dir=$(ls -d /usr/lib/python*)
204+
mv "${python_lib_dir}/site-packages/osbuild" /usr/lib/osbuild/
205+
mkdir -p /usr/lib/osbuild/tools
206+
mv /usr/bin/osbuild-mpp /usr/lib/osbuild/tools/
207+
# Now all the software is under the /usr/lib/osbuild dir and we can patch
208+
# shellcheck disable=SC2002
209+
cat \
210+
/usr/lib/coreos-assembler/0001-bootc-install-to-fs-hardcode-enforce-container-sigpo.patch \
211+
| patch -d /usr/lib/osbuild -p1
212+
# And then move the files back; supermin appliance creation will need it back
213+
# in the places delivered by the RPM.
214+
mv /usr/lib/osbuild/tools/osbuild-mpp /usr/bin/osbuild-mpp
215+
mv /usr/lib/osbuild/osbuild "${python_lib_dir}/site-packages/osbuild"
216+
mkdir -p /usr/lib/osbuild/osbuild
217217
}
218218

219219
fixup_file_permissions() {
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From 02145c49309b35e98e539f44745873b81858bad8 Mon Sep 17 00:00:00 2001
2+
From: jbtrystram <jbtrystram@redhat.com>
3+
Date: Wed, 8 Apr 2026 12:00:38 +0200
4+
Subject: [PATCH] bootc-install-to-fs: hardcode `enforce-container-sigpolicy`
5+
flag
6+
7+
Until this can be tuned through an install-config flag, let's hardcode
8+
this at the osbuild stage level and carry this patch only in COSA.
9+
---
10+
stages/org.osbuild.bootc.install-to-filesystem | 6 ++++++
11+
1 file changed, 6 insertions(+)
12+
13+
diff --git a/stages/org.osbuild.bootc.install-to-filesystem b/stages/org.osbuild.bootc.install-to-filesystem
14+
index fc5f6cd7..5aa8f934 100755
15+
--- a/stages/org.osbuild.bootc.install-to-filesystem
16+
+++ b/stages/org.osbuild.bootc.install-to-filesystem
17+
@@ -65,6 +65,12 @@ def main(options, inputs, paths):
18+
if options.get("bootupd-skip-boot-uuid", False):
19+
pargs.extend(["--bootupd-skip-boot-uuid"])
20+
21+
+ # XXX: This is a temporary hack to have bootc
22+
+ # enforcing sigpolicy until it can be done through
23+
+ # an install config knob
24+
+ # See https://github.com/bootc-dev/bootc/pull/2116
25+
+ pargs.extend(["--enforce-container-sigpolicy"])
26+
+
27+
# add target and go
28+
pargs.append(dst)
29+
subprocess.run(pargs, env=env, check=True)
30+
--
31+
2.53.0
32+

0 commit comments

Comments
 (0)