diff --git a/client.cnf b/client.cnf new file mode 100644 index 0000000..9028505 --- /dev/null +++ b/client.cnf @@ -0,0 +1,13 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# + + +[client] + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] + diff --git a/mariadb-connector-c.spec b/mariadb-connector-c.spec index 733f3f2..a1a1c40 100644 --- a/mariadb-connector-c.spec +++ b/mariadb-connector-c.spec @@ -1,9 +1,11 @@ Name: mariadb-connector-c Version: 3.0.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The MariaDB Native Client library (C driver) License: LGPLv2+ Source: https://downloads.mariadb.org/interstitial/connector-c-%{version}/mariadb-connector-c-%{version}-src.tar.gz +Source2: my.cnf +Source3: client.cnf Url: http://mariadb.org/ # More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/ @@ -28,6 +30,17 @@ Development files for mariadb-connector-c. Contains everything needed to build against libmariadb.so >=3 client library. +%package config +Summary: Configuration files for mariadb-connector-c +BuildArch: noarch + +%description config +This package delivers /etc/my.cnf that includes other configuration files +from the /etc/my.cnf.d directory and ships this directory as well. +Other packages should only put their files into /etc/my.cnf.d directory +and require this package, so the /etc/my.cnf file is present. + + %prep %setup -q -n mariadb-connector-c-%{version}-src @@ -85,6 +98,10 @@ rm %{buildroot}%{_libdir}/lib*.a ln -s mariadb_config %{buildroot}%{_bindir}/mysql_config ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h +# Install config files +install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/my.cnf +install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf + %check @@ -144,6 +161,12 @@ end %license COPYING.LIB +%files config +%dir %{_sysconfdir}/my.cnf.d +%config(noreplace) %{_sysconfdir}/my.cnf +%config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf + + # RPMLint issues from 2.3.2 release tracked on the upstream JIRA: # https://jira.mariadb.org/browse/CONC-232 @@ -153,6 +176,10 @@ end # https://jira.mariadb.org/browse/CONC-291 %changelog +* Tue Jul 17 2018 Honza Horak - 3.0.5-3 +- Add -config sub-package that delivers system-wide /etc/my.cnf and + /etc/my.cnf.d directory, that other packages should use + * Fri Jul 13 2018 Fedora Release Engineering - 3.0.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/my.cnf b/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d +