[community-mysql/f19] Require /etc/my.cnf instead of shipping it
Honza Horak
hhorak at fedoraproject.org
Mon Jun 30 12:54:19 UTC 2014
commit 0afc7fe8a9d4902be02bd7eb466a5e6c88ae7eb8
Author: Honza Horak <hhorak at redhat.com>
Date: Fri Jun 27 17:20:46 2014 +0200
Require /etc/my.cnf instead of shipping it
Conflicts:
community-mysql.spec
community-mysql.spec | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/community-mysql.spec b/community-mysql.spec
index 9af0d04..a819558 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: 1%{?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 <hhorak at redhat.com> - 5.5.38-3
+- Require /etc/my.cnf instead of shipping it
+
* Tue Jun 17 2014 Honza Horak <hhorak at redhat.com> - 5.5.38-1
- Update to MySQL 5.5.38, for various fixes described at
http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-38.html
More information about the scm-commits
mailing list