SPECfile cleanup - Transform %require_mysql_selinux general macro to a control macro

This commit is contained in:
Michal Schorm 2023-11-30 14:00:26 +01:00 committed by Lukas Javorsky
parent 82993239f3
commit fdceea6e72

View File

@ -17,9 +17,6 @@
# Set to 1 to force run the testsuite even if it was already tested in current version
%global force_run_testsuite 0
# Aditional SELinux rules
%global require_mysql_selinux 1
# In f20+ use unversioned docdirs, otherwise the old versioned one
%global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}}
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{pkg_name}-%{version}}
@ -49,6 +46,9 @@
# For deep debugging we need to build binaries with extra debug info
%bcond_with debug
# Aditional SELinux rules from a standalone package 'mysql-selinux' (that holds rules shared between MariaDB and MySQL)
%bcond_without require_mysql_selinux
# Include files for systemd
%global daemon_name mysqld
@ -301,7 +301,7 @@ Requires(post): policycoreutils-python-utils
# Aditional SELinux rules (common for MariaDB & MySQL) shipped in a separate package
# For cases, where we want to fix a SELinux issues in MySQL sooner than patched selinux-policy-targeted package is released
%if %require_mysql_selinux
%if %{with require_mysql_selinux}
Requires: (mysql-selinux if selinux-policy-targeted)
%endif