From 3f8c73e9fdb168351e2b28260ba9eb9102e1ca04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Mon, 18 Nov 2024 11:08:04 +0100 Subject: [PATCH] sysext.just: Also run pre-commands in SELinux step As we install all packages again in this step, we need the pre commands to make it consistent with the download step. --- sysext.just | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysext.just b/sysext.just index 47de3c7..14f45d7 100644 --- a/sysext.just +++ b/sysext.just @@ -298,6 +298,11 @@ reset-selinux-labels target: SUDO="sudo" fi + pre_commands="" + if [[ -n "{{pre_commands}}" ]]; then + pre_commands+="{{pre_commands}} ; " + fi + filecontexts="/etc/selinux/targeted/contexts/files/file_contexts" echo "🏷️ Resetting SELinux labels" podman run --rm -ti \ @@ -307,7 +312,7 @@ reset-selinux-labels target: --security-opt label=disable \ --privileged \ "{{target}}" \ - bash -c "dnf install -y ./rpms/* && cd rootfs && setfiles -r . ${filecontexts} . && chcon --user=system_u --recursive ." + bash -c "${pre_commands}dnf install -y ./rpms/* && cd rootfs && setfiles -r . ${filecontexts} . && chcon --user=system_u --recursive ." # Creates the EROFS sysext file build-erofs target: