7
0

[testing] Fix the issue preventing SELinux profile to be loaded on SLES 16 (bsc#1258957) #24

Manually merged
vizhestkov merged 1 commits from bundle_testing_fix_selinux_on_sle16 into bundle_testing 2026-03-04 14:01:18 +01:00
2 changed files with 9 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Mar 4 07:55:57 UTC 2026 - Victor Zhestkov <vzhestkov@suse.com>
- Fix the issue preventing SELinux profile to be loaded on SLES 16
deployed using cloud images (bsc#1258957)
-------------------------------------------------------------------
Mon Feb 16 13:46:38 UTC 2026 - Victor Zhestkov <vzhestkov@suse.com>

View File

@@ -1040,7 +1040,7 @@ if [ $1 -gt 1 ] && [ ! -d "%{salt_venv}%{venv}/lib/%{python_ver_short}" ]; then
# Upgrading python version; save the previous environment
prev_python_ver_short="$(find %{salt_venv}%{venv}/lib/python* -maxdepth 0 -type d | xargs basename || :)"
rm -rf %{salt_venv}%{venv}/lib/prev_env
if [ ! -z "$prev_python_ver_short" ]; then
if [ ! -z "$prev_python_ver_short" ]; then
cp -r "%{salt_venv}%{venv}/lib/$prev_python_ver_short" "%{salt_venv}%{venv}/lib/prev_env"
echo $prev_python_ver_short > "%{salt_venv}%{venv}/lib/prev_env/prev_python_ver_short"
fi
@@ -1048,7 +1048,7 @@ fi
%post
if test -f %{salt_venv}%{venv}/selinux/venv-salt-minion.pp ; then
if which semodule > /dev/null 2>&1 ; then
if command -v semodule > /dev/null 2>&1 ; then
semodule -n -i %{salt_venv}%{venv}/selinux/venv-salt-minion.pp 2> /dev/null || :
if /usr/sbin/selinuxenabled ; then
/usr/sbin/load_policy
@@ -1143,7 +1143,7 @@ if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
%else
if [ $1 -eq 0 ]; then
%endif
if which semodule > /dev/null 2>&1 ; then
if command -v semodule > /dev/null 2>&1 ; then
semodule -n -r venv-salt-minion 2> /dev/null || :
if /usr/sbin/selinuxenabled ; then
/usr/sbin/load_policy