Skip to content

Commit 3148873

Browse files
committed
osbuild: use bootc install to deploy the container
Instead of deploying the container to the tree then copy all the contents to the disk image, use bootc to directly manage the installation to the target filesystems. Right now this requires to use the image as the buildroot so this requires python (for osbuild). This is tracked in [1]. As we have python in rawhide now I duplicated the manifest and added a switch in the osbuild wrapper script. We can keep the manifest duplicated until we are confident to roll this to all streams. [1] bootc-dev/bootc#1410 Requires: bootc-dev/bootc#1460 bootc-dev/bootc#1451 osbuild/osbuild#2149 osbuild/osbuild#2152 All of which have landed in osbuild-159 and bootc 1.6
1 parent 46af48f commit 3148873

File tree

3 files changed

+576
-4
lines changed

3 files changed

+576
-4
lines changed

src/cmd-osbuild

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,14 +409,22 @@ main() {
409409
cmd="runvm_with_cache"
410410
fi
411411

412+
# Use the bootc install to-filesystem manifest if applicable
413+
bootc_suffix=""
414+
if should_use_bootc_install; then
415+
bootc_suffix=".bootc"
416+
fi
417+
418+
manifest_path="/usr/lib/coreos-assembler/osbuild-manifests/coreos.osbuild.${basearch}${bootc_suffix}.mpp.yaml"
419+
412420
# To get a shell in the osbuild supermin VM uncomment this.
413421
# osbuild can then be started with `bash tmp/build.<artifact>/cmd.sh`
414422
# See comment about checkpoints in runvm-osbuild
415423
# RUNVM_SHELL=1 \
416-
$cmd -- /usr/lib/coreos-assembler/runvm-osbuild \
417-
--config "${runvm_osbuild_config_json}" \
418-
--mpp "/usr/lib/coreos-assembler/osbuild-manifests/coreos.osbuild.${basearch}.mpp.yaml" \
419-
--outdir "${outdir}" \
424+
$cmd -- /usr/lib/coreos-assembler/runvm-osbuild \
425+
--config "${runvm_osbuild_config_json}" \
426+
--mpp "${manifest_path}" \
427+
--outdir "${outdir}" \
420428
--platforms "$(IFS=,; echo "${platforms[*]}")"
421429

422430
for platform in "${platforms[@]}"; do

src/cmdlib.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ should_use_bootc_install() {
191191
_should_enable_feature "COSA_OSBUILD_USE_BOOTC_INSTALL" "use_bootc_install"
192192
}
193193

194+
should_build_with_buildah() {
195+
_should_enable_feature "COSA_BUILD_WITH_BUILDAH" "build_with_buildah"
196+
}
197+
194198
prepare_build() {
195199
preflight
196200
preflight_kvm

0 commit comments

Comments
 (0)