SELinux policy modules for MySQL and MariaDB packages
Go to file
Michal Schorm 3461bc3864 Don't ignore errors in SELinux scriptlets
... well, at leats on the SPECfile side. They are still being ignored in the macros themselves

$ rpm -E %selinux_modules_install
|
| if [ -e /etc/selinux/config ]; then
|   . /etc/selinux/config
| fi
| _policytype=
| if [ -z "${_policytype}" ]; then
|   _policytype="targeted"
| fi
| if [ "${SELINUXTYPE}" = "${_policytype}" ]; then
|   /usr/sbin/semodule -n -s ${_policytype} -X 200 -i  || :
|   /usr/sbin/selinuxenabled && /usr/sbin/load_policy || :
| fi

$ rpm -E %selinux_modules_uninstall
|
| if [ -e /etc/selinux/config ]; then
|   . /etc/selinux/config
| fi
| _policytype=
| if [ -z "${_policytype}" ]; then
|   _policytype="targeted"
| fi
| if [ $1 -eq 0 ]; then
|   if [ "${SELINUXTYPE}" = "${_policytype}" ]; then
|     /usr/sbin/semodule -n -X 200 -s ${_policytype} -r  &> /dev/null || :
|     /usr/sbin/selinuxenabled && /usr/sbin/load_policy || :
|   fi
| fi

Defined here:
https://src.fedoraproject.org/rpms/selinux-policy/blob/rawhide/f/rpm.macros#_48

The reason is described here: https://bugzilla.redhat.com/show_bug.cgi?id=1665643
TL;DR: The return values of any scriptlet in Fedora MUST be zero.
No matter how the errors in the scriptlets are handled.
For now, the "handled" means "ignored" in the case of SELinux scriplet macros.

Related: RHEL-19372
2024-01-23 10:07:41 +01:00
.fmf Merged update from upstream sources 2021-02-06 04:35:20 +00:00
.gitignore Enhance .gitignore 2022-06-09 13:04:43 +02:00
README.md Merged update from upstream sources 2021-02-06 04:35:20 +00:00
ci.fmf Merged update from upstream sources 2021-02-06 04:35:20 +00:00
gating.yaml Merged update from upstream sources 2021-02-06 04:35:20 +00:00
mysql-selinux.spec Don't ignore errors in SELinux scriptlets 2024-01-23 10:07:41 +01:00
sources 1.0.7 upstream release 2024-01-23 10:07:29 +01:00

README.md

mysql-selinux

The mysql-selinux package