diff --git a/venv-salt-minion.changes b/venv-salt-minion.changes index a66abf3..748ae0c 100644 --- a/venv-salt-minion.changes +++ b/venv-salt-minion.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 4 07:55:57 UTC 2026 - Victor Zhestkov + +- 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 diff --git a/venv-salt-minion.spec b/venv-salt-minion.spec index 3443e35..3298097 100644 --- a/venv-salt-minion.spec +++ b/venv-salt-minion.spec @@ -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