spread: disable enforcing mode on CentOS 8 Stream

The default image is configured in SELinux enforcing mode, which isn't quite
compatible with tests that touch random things in the system. Switch to
permissive mode early in the setup. Note, there are tests that verify snapd's
SELinux policy that explicitly enable enforcing mode for the duration of the
test.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
This commit is contained in:
Maciej Borzecki
2022-02-02 09:40:40 +01:00
parent f2febaca20
commit 614a48c874

View File

@@ -582,6 +582,13 @@ prepare: |
restorecon -v /etc/gai.conf
fi
if [[ "$SPREAD_SYSTEM" == centos-8-* ]]; then
# the default image of CentOS 8 Stream is set up in enforcing mode,
# which may break some tests. Note that there are tests targeting
# SELinux which explicitly enable enforcing mode.
setenforce 0
fi
# Note that os.query or any other tool cannot be used here before the current.delta file is unpacked
if [[ "$SPREAD_SYSTEM" == fedora-* ]]; then
# The Fedora archive mirror seems to be unreliable.