From 614a48c874cbe3e1c94de58774638ac0abe9f573 Mon Sep 17 00:00:00 2001 From: Maciej Borzecki Date: Wed, 2 Feb 2022 09:40:40 +0100 Subject: [PATCH] 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 --- spread.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spread.yaml b/spread.yaml index a6a42286f3..e289bf57df 100644 --- a/spread.yaml +++ b/spread.yaml @@ -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.