From 337b77780f581c3c48ea714b286949c5733f5a91 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Jun 30 2014 12:39:32 +0000 Subject: Require /etc/my.cnf instead of shipping it --- diff --git a/community-mysql.spec b/community-mysql.spec index 8fe9a58..ba03e59 100644 --- a/community-mysql.spec +++ b/community-mysql.spec @@ -1,6 +1,11 @@ +# When there is already another package that ships /etc/my.cnf, +# rather include it than ship the file again, since conflicts between +# those files may create issues +%global ship_my_cnf 0 + Name: community-mysql Version: 5.5.38 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MySQL client programs and shared libraries Group: Applications/Databases @@ -112,6 +117,9 @@ MySQL server. Summary: The shared files required for MySQL server and client Group: Applications/Databases +%if ! %{ship_my_cnf} +Requires: %{_sysconfdir}/my.cnf +%endif %description common The mysql-common package provides the essential shared files for any @@ -422,7 +430,9 @@ mkdir -p $RPM_BUILD_ROOT/var/run/mysqld install -m 0755 -d $RPM_BUILD_ROOT/var/lib/mysql mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} +%if %{ship_my_cnf} install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/my.cnf +%endif # install systemd unit files and scripts for handling server startup mkdir -p ${RPM_BUILD_ROOT}%{_unitdir} @@ -569,7 +579,9 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %doc storage/innobase/COPYING.Percona storage/innobase/COPYING.Google # although the default my.cnf contains only server settings, we put it in the # libs package because it can be used for client settings too. -%config(noreplace) /etc/my.cnf +%if %{ship_my_cnf} +%config(noreplace) %{_sysconfdir}/my.cnf +%endif %dir %{_libdir}/mysql %{_libdir}/mysql/libmysqlclient.so.* /etc/ld.so.conf.d/* @@ -722,6 +734,9 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %{_mandir}/man1/mysql_client_test.1* %changelog +* Fri Jun 27 2014 Honza Horak - 5.5.38-3 +- Require /etc/my.cnf instead of shipping it + * Tue Jun 17 2014 Honza Horak - 5.5.38-2 - Re-enable tests again