Merge branch 'test/mariadb-connector-c' into '2.12'

Use mariadb-connector-c for RHEL 8+

See merge request packaging/rpm-icinga2!25

https://github.com/Icinga/icinga-packaging/issues/205
This commit is contained in:
Henrik Triem 2021-07-20 14:08:21 +00:00
commit a894a068dd

View File

@ -251,9 +251,13 @@ BuildRequires: libmysqlclient-devel
BuildRequires: mysql-devel BuildRequires: mysql-devel
%endif %endif
%else
%if 0%{?rhel} >= 8
BuildRequires: mariadb-connector-c-devel
%else %else
BuildRequires: mysql-devel BuildRequires: mysql-devel
%endif #suse %endif #suse
%endif
Requires: %{name}-bin = %{version}-%{release} Requires: %{name}-bin = %{version}-%{release}
@ -643,6 +647,7 @@ getent passwd %{icinga_user} >/dev/null || %{_sbindir}/useradd -c "icinga" -s /s
%endif %endif
%endif %endif
%if %{with mysql}
%post ido-mysql %post ido-mysql
if [ ${1:-0} -eq 1 ] && [ -e %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf ] if [ ${1:-0} -eq 1 ] && [ -e %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf ]
then then
@ -659,7 +664,9 @@ if [ "$1" = "0" ]; then
fi fi
exit 0 exit 0
%endif
%if %{with pgsql}
%post ido-pgsql %post ido-pgsql
if [ ${1:-0} -eq 1 ] && [ -e %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf ] if [ ${1:-0} -eq 1 ] && [ -e %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf ]
then then
@ -676,6 +683,7 @@ if [ "$1" = "0" ]; then
fi fi
exit 0 exit 0
%endif
%if 0%{?use_selinux} %if 0%{?use_selinux}
%post selinux %post selinux