manifest/raw_bootc: Label / and /boot before running bootc install#2525
manifest/raw_bootc: Label / and /boot before running bootc install#2525jbtrystram wants to merge 1 commit into
Conversation
b4cc44b to
d564632
Compare
|
Which image types are you seeing a problem with? Please provide a reproducer if possible. Also, have you tested this? I gave it a quick try and it blows up in your new mkdir stage because mounts already create the mountpoint, not need to do it manually. |
d564632 to
cce1e23
Compare
|
@brlane-rht thanks for the review ! I fixed the PR. The mkdir stage is still here because we want to label the mountpoint without anything mounted. So when further files are created in the mounted FS, they inherit the correct SELinux label from the mountpoint. I am building fedora CoreOS using blueprints defined here : https://github.com/joelcapitao/bib-fcos-experimentation/ So for a QEMU image for x86 I have the following blueprint : I am building the image with : With this PR, the resulting labels are corrects : Here is the generated manifest : fedora-coreos-rawhide.osbuild-manifest.json See #2494 |
When SELinux is enabled, insert a few stages before running `bootc install` that will make sure the `root` and `boot` mount points are labelled. This avoid files under `/sysroot` created by bootc to be `unlabeled_t` and this makes sure files under `/boot` created by bootupd inherit the correct `boot_t` label. See osbuild#2494 Assisted-by: Opencode.ai <Opus 4.6>
cce1e23 to
f8614fa
Compare
When SELinux is enabled, insert a few stages before running
bootc installthat will make sure therootandbootmount points are labelled. This avoid files under/sysrootcreated by bootc to beunlabeled_tand this makes sure files under/bootcreated by bootupd inherit the correctboot_tlabel.See #2494
Assisted-by: Opencode.ai <Opus 4.6>