Skip to content

composefs: Add selinux policy finalization #2511

In review

Description

@cgwalters

Something like ostreedev/ostree#2569 also cc ostreedev/ostree#3649

There's a lot of nontrivial code related to this in ostree using bwrap etc - would need some design discussion to apply here

Activity

  1. added
    area/composefs
    on Sep 28, 2026
  2. cgwalters commented on Sep 28, 2026

    @cgwalters
    MemberAuthor

    @cgwalters-bot take a look on a spike for this one

  3. moved this to In Progress in Workstreamon Sep 28, 2026
  4. cgwalters-bot commented on Sep 28, 2026

    @cgwalters-bot
    Contributor

    Spike done: this ports cleanly and is simpler than ostree's. Right after the /etc merge in composefs-finalize-staged, we mount the staged EROFS, chroot into it with the existing ChrootCmd (no bwrap) with the merged /etc bound over it, and run semodule -N --refresh. systemd loads the policy from the deployment's state /etc after switch-root, so nothing in the UKI or the sealed EROFS changes.
    PoC with a new tmt test (a local module plus a policy change in the new image, across a bootc switch): it passes on composefs (grub/BLS, unsealed) and ostree, and fails on current main, where the new image's policy is silently dropped. cgwalters-forge#31
    Like ostree, the PoC treats a refresh failure as fatal, which is the ostree#3563 wedge risk. Design, options and open questions (mainly that failure policy and a stage-time check): https://gist.github.com/cgwalters-bot/7fa03dcf6c3866961aed7d5199366aaa

    Generated-by: https://github.com/cgwalters/#llms

  5. RoyalOughtness commented on Oct 1, 2026

    @RoyalOughtness

    FYI for those running into issues caused by this: a quick semodule -B will work around it it (until the next policy update)

  6. Johan-Liebert1 commented on Nov 23, 2026

    @Johan-Liebert1
    Member

    I can pick this up. If anyone has already started on this please let me know :)

    Ping @cgwalters, were you able to find time to take a look at the bot's PR?

  7. added 2 commits that reference this issue on Nov 25, 2026
    4203cbb
    6064226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/composefs

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions