fedora-coreos-config icon indicating copy to clipboard operation
fedora-coreos-config copied to clipboard

overlay/15fcos: fix selinux labels in /boot and /sysroot

Open jbtrystram opened this issue 1 year ago • 4 comments

/boot/efi and /sysroot dir and subfiles are unlabeled_t since 40.20240504.3.0. This is likely due to a missing step in the OSBuild pipeline as this started with coreos/fedora-coreos-tracker#1653.

This should be removed after the next barrier release, if the newly produced images are fixed.

See coreos/fedora-coreos-tracker#1771 And coreos/fedora-coreos-tracker#1772

jbtrystram avatar Sep 09 '24 09:09 jbtrystram

See https://docs.fedoraproject.org/en-US/fedora-silverblue/troubleshooting/#_running_restorecon for why you should never run restorecon -R on /sysroot.

It's also part of the reasons that we made /sysroot RO by default on Atomic Desktops. There should be more links in the change page.

travier avatar Sep 09 '24 13:09 travier

Probably going to need to make this more complex unfortunately: https://github.com/coreos/fedora-coreos-tracker/issues/1772#issuecomment-2338849028

dustymabe avatar Sep 09 '24 21:09 dustymabe

Let's focus on /boot first as that's what blocking bootupd. We can fix /sysroot afterwards.

travier avatar Sep 13 '24 14:09 travier

Here is what the root filesystem looks like after this script ran. For comparison, this is extracted from a good filesystem the only file i am curious about is /ostree/deploy/fedora-coreos/deploy/$COMMIT.0.origin

jbtrystram avatar Sep 18 '24 08:09 jbtrystram

I've updated this PR to fix existing FCOS and RHCOS systems and to include the tests from https://github.com/coreos/fedora-coreos-config/pull/3172 (which I'll now close in favor of this PR for those tests).

dustymabe avatar Sep 26 '24 17:09 dustymabe

I think I've tested this enough now that I'm comfortable with it merging if it passes review.

dustymabe avatar Sep 26 '24 20:09 dustymabe

I can't approved my own PR, but LGTM !

jbtrystram avatar Sep 27 '24 13:09 jbtrystram

I'll leave this open for a few more hours for further reviews.

dustymabe avatar Sep 27 '24 14:09 dustymabe