wsl: drop the SELinux packages from the WSL base image

WSL does not support SELinux, so at best it's pointless to install. This
also actively breaks WSL 1 users, although I don't think we should
suggest that we support that, and if the policy on the builder doesn't
match the target things break during the build.

It also reduced the build time from ~80 seconds to ~70 seconds for me,
so that's nice.

Signed-off-by: Jeremy Cline <jeremycline@linux.microsoft.com>
This commit is contained in:
Jeremy Cline
2025-08-28 13:33:42 -04:00
parent 01d839d633
commit 39b379f7d9
2 changed files with 1 additions and 3 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ echo "Configure image: [$kiwi_iname]-[$kiwi_profiles]..."
#======================================
# Set SELinux booleans
#--------------------------------------
if [[ "$kiwi_profiles" != *"Container"* ]] && [[ "$kiwi_profiles" != *"FEX"* ]]; then
if [[ "$kiwi_profiles" != *"Container"* ]] && [[ "$kiwi_profiles" != *"FEX"* ]] && [[ "$kiwi_profiles" != *"WSL"* ]]; then
## Fixes KDE Plasma, see rhbz#2058657
setsebool -P selinuxuser_execmod 1
fi
-2
View File
@@ -15,9 +15,7 @@
<package name="dnf5"/>
<package name="dnf5-plugins"/>
<package name="fedora-release-wsl"/>
<package name="policycoreutils"/>
<package name="rpm"/>
<package name="selinux-policy-targeted"/>
</packages>
<packages type="image" patternType="plusRecommended" profiles="WSL-Base">
<package name="attr"/>