Skip to content

Commit 6ce8e88

Browse files
committed
supermin: add ostree prepare-root config file
Bootc is looking for the prepare-root config file in the buildroot environnement because the main assumption is that it's run from the target container. However, in osbuild, it's run from te buildroot, because podman inside bwrap (inside supermin in our case) causes issues. It's fine for RHCOS and SCOS where we use the target container as the buildroot but we cannot do that for FCOS because we require python in the buildroot. For now, insert a prepare-root file in the supermin VM (use as the buildroot for osbuild) until either : - bootc learn to look into the container for it [1] - we ship python in our images and can use them as buildroot. Another approach would be to layer python and the osbuild dependencies on top of our image and use that as the buildroot, but that would create room for packages drift (what was in the repos at build time?). At least using COSA it's easier to keep track of versions. [1] bootc-dev/bootc#1410
1 parent 78aa013 commit 6ce8e88

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/supermin-init-prelude.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,13 @@ touch /etc/cosa-supermin
8787
# the missing link. Hehe.
8888
update-alternatives --install /etc/alternatives/iptables iptables /usr/sbin/iptables-legacy 1
8989
update-alternatives --install /etc/alternatives/ip6tables ip6tables /usr/sbin/ip6tables-legacy 1
90+
91+
# To build the disk image using osbuild and bootc install to-filesystem we need to
92+
# have a prepare-root config in the build environnement for bootc to read.
93+
# This workaround can be removed when https://github.com/bootc-dev/bootc/issues/1410
94+
# is fixed or we have python in all streams which allows us to use the OCI image as the buildroot.
95+
# Note that RHCOS and SCOS use the OCI as buildroot so they should not be affected by this.
96+
cat > /usr/lib/ostree/prepare-root.conf <<EOF
97+
[composefs]
98+
enabled = true
99+
EOF

0 commit comments

Comments
 (0)