minimal: Add /var/lib/selinux -> /etc/selinux symlink

On rpm-ostree systems, the SELinux policy store is moved from
`/var/lib/selinux` to `/etc/selinux`. Embed a compatibility symlink so
that tools like chunkah which evaluate rpmdb paths can "see" the move.

See also https://github.com/coreos/rpm-ostree/pull/5572 for more info.

Assisted-by: OpenCode (Claude Opus 4.6)
This commit is contained in:
Jonathan Lebon 2026-03-06 16:48:54 -05:00
commit 4c8a2e5045
No known key found for this signature in database
2 changed files with 5 additions and 0 deletions

View file

@ -4,4 +4,6 @@ set -xeuo pipefail
ln -s ../run var/run
# https://gitlab.com/fedora/bootc/tracker/-/issues/58
mkdir -p var/lib/rpm-state
# https://github.com/coreos/rpm-ostree/pull/5572
ln -s ../../etc/selinux var/lib/selinux
test -d var/tmp || mkdir -m 1777 var/tmp

View file

@ -2,3 +2,6 @@
set -xeuo pipefail
# Verify directories we expect to exist
test -d var/tmp
# SELinux store compatibility symlink for rpm-ostree systems
test -L var/lib/selinux
test "$(readlink var/lib/selinux)" = "../../etc/selinux"