1 |
# For deep debugging we need to build binaries with extra debug info |
# For deep debugging we need to build binaries with extra debug info |
2 |
%bcond_with debug |
%bcond_with debug |
|
# Enable building and packing of the testsuite |
|
|
%bcond_without testsuite |
|
|
|
|
|
# Enable CMake in-source builds |
|
|
# This is is a workaround for the https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds |
|
|
# which reverts the CMake behaviour to before F33 |
|
|
# The Change owners offered themselves to help fix the affected packages via ProvenPackager rights. |
|
|
# I'm generally in favor of this change, however when I tried to adapt it, I encountered a number of issues. |
|
|
# That's why I disabled it for now. |
|
|
%global __cmake_in_source_build 1 |
|
|
|
|
|
|
|
3 |
|
|
4 |
Name: mariadb-connector-c |
Name: mariadb-connector-c |
5 |
Version: 3.1.13 |
Version: 3.1.13 |
6 |
Release: 1%{?with_debug:.debug}%{?dist} |
Release: 2%{?with_debug:.debug}%{?dist} |
7 |
Summary: The MariaDB Native Client library (C driver) |
Summary: The MariaDB Native Client library (C driver) |
8 |
License: LGPLv2+ |
License: LGPLv2+ |
9 |
Source: https://downloads.mariadb.org/interstitial/connector-c-%{version}/%{name}-%{version}-src.tar.gz |
Source: https://downloads.mariadb.org/interstitial/connector-c-%{version}/mariadb-connector-c-%{version}-src.tar.gz |
10 |
Source2: my.cnf |
Source2: my.cnf |
11 |
Source3: client.cnf |
Source3: client.cnf |
12 |
Url: http://mariadb.org/ |
Url: http://mariadb.org/ |
13 |
# More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/ |
# More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/ |
14 |
|
|
|
%if %{with testsuite} |
|
|
Patch1: testsuite.patch |
|
|
%endif |
|
|
|
|
15 |
Requires: %{_sysconfdir}/my.cnf |
Requires: %{_sysconfdir}/my.cnf |
16 |
BuildRequires: gcc-c++ cmake openssl-devel zlib-devel |
BuildRequires: zlib-devel cmake openssl-devel gcc-c++ |
17 |
# Remote-IO plugin |
# Remote-IO plugin |
18 |
BuildRequires: libcurl-devel |
BuildRequires: libcurl-devel |
19 |
# auth_gssapi_client plugin |
# auth_gssapi_client plugin |
20 |
BuildRequires: krb5-devel |
BuildRequires: krb5-devel |
21 |
|
|
22 |
|
Requires: mariadb |
23 |
|
#Requires: mariadb >= 3:10.3.27 |
24 |
|
Requires: %{name}-config = %{version}-%{release} |
25 |
|
|
26 |
%description |
%description |
27 |
The MariaDB Native Client library (C driver) is used to connect applications |
The MariaDB Native Client library (C driver) is used to connect applications |
28 |
developed in C/C++ to MariaDB and MySQL databases. |
developed in C/C++ to MariaDB and MySQL databases. |
34 |
Requires: %{name} = %{version}-%{release} |
Requires: %{name} = %{version}-%{release} |
35 |
Requires: openssl-devel zlib-devel |
Requires: openssl-devel zlib-devel |
36 |
BuildRequires: multilib-rpm-config |
BuildRequires: multilib-rpm-config |
37 |
Conflicts: %{?fedora:community-}mysql-devel |
Conflicts: mysql-devel |
38 |
|
|
39 |
|
Requires: mariadb-devel |
40 |
|
#Requires: mariadb-devel >= 3:10.3.27 |
41 |
|
|
42 |
%description devel |
%description devel |
43 |
Development files for mariadb-connector-c. |
Development files for mariadb-connector-c. |
45 |
|
|
46 |
|
|
47 |
|
|
|
%if %{with testsuite} |
|
|
%package test |
|
|
Summary: Testsuite files for mariadb-connector-c |
|
|
Requires: %{name} = %{version}-%{release} |
|
|
Requires: cmake |
|
|
Requires: mariadb-server |
|
|
|
|
|
%description test |
|
|
Testsuite files for mariadb-connector-c. |
|
|
Contains binaries and a prepared CMake ctest file. |
|
|
Requires running MariaDB / MySQL server with create database "test". |
|
|
%endif |
|
|
|
|
|
|
|
48 |
%package config |
%package config |
49 |
Summary: Configuration files for packages that use /etc/my.cnf as a configuration file |
Summary: Configuration files for packages that use /etc/my.cnf as a configuration file |
50 |
BuildArch: noarch |
BuildArch: noarch |
60 |
|
|
61 |
%prep |
%prep |
62 |
%setup -q -n %{name}-%{version}-src |
%setup -q -n %{name}-%{version}-src |
|
%if %{with testsuite} |
|
|
%patch1 -p1 |
|
|
%endif |
|
63 |
|
|
64 |
# Remove unsused parts |
# Remove unsused parts |
65 |
rm -r win win-iconv zlib |
rm -r win zlib win-iconv |
66 |
|
|
67 |
|
|
68 |
|
|
69 |
%build |
%build |
70 |
|
%{set_build_flags} |
71 |
|
|
72 |
|
# Override all optimization flags when making a debug build |
73 |
|
%{?with_debug: CFLAGS="$CFLAGS -O0 -g"} |
74 |
|
CXXFLAGS="$CFLAGS" |
75 |
|
export CFLAGS CXXFLAGS |
76 |
|
|
77 |
# https://jira.mariadb.org/browse/MDEV-13836: |
# https://jira.mariadb.org/browse/MDEV-13836: |
78 |
# The server has (used to have for ages) some magic around the port number. |
# The server has (used to have for ages) some magic around the port number. |
79 |
# If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services. |
# If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services. |
80 |
# If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say. |
# If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say. |
81 |
# I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file. |
# I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file. |
82 |
|
|
83 |
# The INSTALL_* macros have to be specified relative to CMAKE_INSTALL_PREFIX |
# The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX |
84 |
# so we can't use %%{_datadir} and so forth here. |
# so we can't use %%{_datadir} and so forth here. |
85 |
|
|
86 |
%cmake . \ |
%cmake . \ |
90 |
-DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \ |
-DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \ |
91 |
-DMARIADB_PORT=3306 \ |
-DMARIADB_PORT=3306 \ |
92 |
\ |
\ |
93 |
-DWITH_EXTERNAL_ZLIB=ON \ |
-DWITH_EXTERNAL_ZLIB=YES \ |
94 |
-DWITH_SSL=OPENSSL \ |
-DWITH_SSL=OPENSSL \ |
95 |
-DWITH_MYSQLCOMPAT=ON \ |
-DWITH_MYSQLCOMPAT=ON \ |
96 |
-DPLUGIN_CLIENT_ED25519=DYNAMIC \ |
-DPLUGIN_CLIENT_ED25519=DYNAMIC \ |
97 |
\ |
\ |
98 |
-DINSTALL_LAYOUT=RPM \ |
-DINSTALL_LAYOUT=RPM \ |
99 |
|
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \ |
100 |
-DINSTALL_BINDIR="bin" \ |
-DINSTALL_BINDIR="bin" \ |
101 |
-DINSTALL_LIBDIR="%{_lib}" \ |
-DINSTALL_LIBDIR="%{_lib}" \ |
102 |
-DINSTALL_INCLUDEDIR="include/mysql" \ |
-DINSTALL_INCLUDEDIR="include/mysql" \ |
103 |
-DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \ |
-DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \ |
104 |
-DINSTALL_PCDIR="%{_lib}/pkgconfig" \ |
-DINSTALL_PCDIR="%{_lib}/pkgconfig" \ |
105 |
\ |
\ |
106 |
%if %{with testsuite} |
-DWITH_UNITTEST=ON |
|
-DWITH_UNIT_TESTS=ON |
|
|
%endif |
|
107 |
|
|
|
# Override all optimization flags when making a debug build |
|
|
%if %{with debug} |
|
|
CFLAGS="$CFLAGS -O0 -g"; export CFLAGS |
|
|
CXXFLAGS="$CXXFLAGS -O0 -g"; export CXXFLAGS |
|
|
FFLAGS="$FFLAGS -O0 -g"; export FFLAGS |
|
|
FCFLAGS="$FCFLAGS -O0 -g"; export FCFLAGS |
|
|
%endif |
|
108 |
|
|
|
cmake -B %__cmake_builddir -LAH |
|
109 |
|
|
110 |
%cmake_build |
#cmake -LAH |
111 |
|
|
112 |
|
%make_build |
113 |
|
|
114 |
|
|
115 |
|
|
116 |
%install |
%install |
117 |
%cmake_install |
%make_install |
118 |
|
|
119 |
%multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h |
%multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h |
120 |
|
|
139 |
# - don't run mytap tests |
# - don't run mytap tests |
140 |
# - ignore the testsuite result for now. Enable tests now, fix them later. |
# - ignore the testsuite result for now. Enable tests now, fix them later. |
141 |
# Note: there must be a database called 'test' created for the testcases to be run |
# Note: there must be a database called 'test' created for the testcases to be run |
|
%if %{with testsuite} |
|
142 |
pushd unittest/libmariadb/ |
pushd unittest/libmariadb/ |
143 |
%ctest || : |
ctest || : |
144 |
popd |
popd |
145 |
%endif |
|
146 |
|
|
147 |
|
|
148 |
%files |
%files |
174 |
%dir %{_includedir}/mysql |
%dir %{_includedir}/mysql |
175 |
%{_includedir}/mysql/* |
%{_includedir}/mysql/* |
176 |
|
|
177 |
|
%license COPYING.LIB |
178 |
|
|
179 |
|
|
180 |
%files config |
%files config |
184 |
|
|
185 |
|
|
186 |
|
|
|
%if %{with testsuite} |
|
|
%files test |
|
|
%dir %{_datadir}/%{name} |
|
|
%{_datadir}/%{name}/* |
|
|
%{_libdir}/libcctap.so |
|
|
%endif |
|
|
|
|
|
|
|
|
# Opened issues on the upstream tracker: |
|
|
# https://jira.mariadb.org/browse/CONC-293 |
|
|
# DESCRIPTION: add mysql_config and mariadb_config man page |
|
|
# IN_PROGRESS: upsteam plans to add it to 3.1 release |
|
|
# https://jira.mariadb.org/browse/CONC-436 |
|
|
# DESCRIPTION: Make testsuite independent / portable |
|
|
# NEW: PR submitted, problem explained, waiting on upstream response |
|
|
|
|
|
# Downstream issues: |
|
|
# Start running this package testsuite at the build time |
|
|
# It requires a running MariaDB server |
|
|
# mariadb-server package pulls in mariadb-connector-c as a dependency |
|
|
# Need to ensure, that the testsuite is ran against the newly build library, instead of the one from the pulled package |
|
|
# Need to ensure, that the testsuite will also run properly on 'fedpkg local' buid, not damaging the host machine |
|
|
|
|
187 |
%changelog |
%changelog |
188 |
|
* Sat Nov 20 2021 Jean-Philippe Pialasse <tests@pialasse.com> - 3.1.13-2 |
189 |
|
- Lower Requirement for SME10 |
190 |
|
|
191 |
* Fri May 14 2021 Michal Schorm <mschorm@redhat.com> - 3.1.13-1 |
* Fri May 14 2021 Michal Schorm <mschorm@redhat.com> - 3.1.13-1 |
192 |
- Rebase to 3.1.13 |
- Rebase to 3.1.13 |
193 |
|
|
194 |
* Wed Feb 24 2021 Michal Schorm <mschorm@redhat.com> - 3.1.12-1 |
* Wed Feb 24 2021 Michal Schorm <mschorm@redhat.com> - 3.1.12-1 |
195 |
- Rebase to 3.1.12 |
- Rebase to 3.1.12 |
196 |
|
|
197 |
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.11-2 |
* Thu Dec 03 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-2 |
198 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild |
- Require specific minimal version of the 'mariadb' package, if it is installed |
199 |
|
|
200 |
* Wed Nov 04 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-1 |
* Tue Nov 10 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-1 |
201 |
- Rebase to 3.1.11 |
- Rebase to 3.1.11 |
202 |
|
|
|
* Fri Sep 18 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.10-1 |
|
|
- Rebase to 3.1.10 |
|
|
|
|
|
* Tue Aug 04 2020 Michal Schorm <mschorm@redhat.com> - 3.1.9-5 |
|
|
- Revert the CMake change regarding the in-source builds for now |
|
|
- %%cmake macro covers the %%{set_build_flags}, so they are not needed |
|
|
That also means, the debug buildchnages to the build flags must be done AFTER the |
|
|
%%cmake macro was used. |
|
|
- %%cmake macro also covers the CMAKE_INSTALL_PREFIX="%%{_prefix}" option |
|
|
- Default to %%cmake commands instead fo %%make commands |
|
|
- Update the WITH_UNITTEST macro to the one upstream use now |
|
|
- Introduce macro to enable / disable testusite (and building of the *-test subpackage) |
|
|
|
|
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-4 |
|
|
- Second attempt - Rebuilt for |
|
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild |
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-3 |
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild |
|
|
|
|
|
* Tue Jul 14 2020 Michal Schorm <mschorm@redhat.com> - 3.1.9-2 |
|
|
- Add explicit confict between mariadb-connector-c-devel and community-mysql-devel packages |
|
|
|
|
203 |
* Wed Jun 24 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.9-1 |
* Wed Jun 24 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.9-1 |
204 |
- Rebase to 3.1.9 |
- Rebase to 3.1.9 |
205 |
|
- Overlinking issues fixed by upstream in 3.1.3 release |
206 |
* Thu May 14 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.8-1 |
- Add explicit confict between mariadb-connector-c-devel and mysql-devel packages |
|
- Rebase to 3.1.8 |
|
|
|
|
|
* Mon Mar 16 2020 Michal Schorm <mschorm@redhat.com> - 3.1.7-2 |
|
|
- Rebase to 3.1.7 latest git |
|
|
Fix for: https://jira.mariadb.org/browse/CONC-441 |
|
|
|
|
|
* Mon Feb 03 2020 Michal Schorm <mschorm@redhat.com> - 3.1.7-1 |
|
|
- Rebase to 3.1.7 |
|
|
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.6-2 |
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |
|
|
|
|
|
* Tue Dec 17 2019 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.6-1 |
|
|
- Rebase to 3.1.6 |
|
|
|
|
|
* Tue Nov 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.5-1 |
|
|
- Rebase to 3.1.5 |
|
|
|
|
|
* Sun Nov 03 2019 Michal Schorm <mschorm@redhat.com> - 3.1.4-2 |
|
|
- Fix for #1624533 |
|
|
|
|
|
* Wed Sep 18 2019 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.4-1 |
|
|
- Rebase to 3.1.4 |
|
|
|
|
|
* Wed Sep 11 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-3 |
|
|
- Enable building of the ed25519 client plugin. |
|
|
It won't be shipped anymore by 'mariadb-server' |
|
|
|
|
|
* Mon Aug 19 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-2 |
|
|
- Extract the prepared testsuite to the standalone subpackage so it can be run outside of the buildroot |
|
|
|
|
|
* Fri Aug 02 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-1 |
|
|
- Rebase to 3.1.3 version |
|
|
- Patch upstreamed |
|
|
- Remove glob from library version, as per Fedora Packaging Guidelines |
|
|
|
|
|
* Fri Jul 19 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-2 |
|
|
- Use macro to set build flags |
|
207 |
|
|
208 |
* Fri Jul 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-1 |
* Fri Jul 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-1 |
209 |
- Rebase to 3.1 version |
- Rebase to 3.1.2 |
210 |
- Disabling the ED25519 plugin |
- Introducing ED25519 plugin |
211 |
- Plugindir patch upstreamed |
- Plugindir issues (from 3.0.9 release) fixed by upstream |
212 |
- Added debug build switch |
Resolves: #1691176 |
|
|
|
|
* Tue May 21 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-2 |
|
|
- Fix overlinking issues |
|
213 |
|
|
214 |
* Wed May 15 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-1 |
* Wed May 15 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-1 |
215 |
- Rebase to 3.0.10 |
- Rebase to 3.0.10 |
216 |
- Remove scriplet; no longer needed |
- Use macro for tarball name |
217 |
|
- Use macro to set build flags |
218 |
|
- Use macros for make commands |
219 |
|
- Remove the scriptlets non relevant for RHEL-8 |
220 |
|
- Add info for the testsuite execution |
221 |
|
- Remove glob from library version |
222 |
|
- Remove info about the upstream issues |
223 |
|
|
224 |
* Fri Mar 29 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-3 |
* Fri Mar 29 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-2 |
225 |
- Add "zlib-devel" requirement in "-devel" subpackage. MariaDB requires |
- Add "zlib-devel" requirement in "-devel" subpackage. MariaDB requires |
226 |
linking with "-lz", which will fail without the zlib library |
linking with "-lz", which will fail without the zlib library |
227 |
- Related: #1693966 |
- Resolves: #1710471 |
|
|
|
|
* Mon Feb 18 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-2 |
|
|
- Fix plugindir issues |
|
|
Resolves: #1624533 |
|
|
|
|
|
* Mon Feb 18 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-1 |
|
|
- Rebase to 3.0.9 |
|
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-2 |
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
|
228 |
|
|
229 |
* Wed Jan 02 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-1 |
* Wed Jan 02 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-1 |
230 |
- Rebase to 3.0.8 |
- Rebase to 3.0.8 |
231 |
|
|
232 |
* Mon Nov 19 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1 |
* Mon Dec 10 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1 |
233 |
- Rebase to 3.0.7 |
- Rebase to 3.0.7 |
234 |
|
|
235 |
* Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2 |
* Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2 |
236 |
- Fix parallel installability of x86_64 and i686 devel package |
- Fix parallel installability of x86_64 and i686 devel package |
237 |
|
- Resolves: #1637031 |
238 |
|
|
239 |
* Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1 |
* Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1 |
240 |
- Rebase to 3.0.6 |
- Rebase to 3.0.6 |
241 |
|
|
242 |
* Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-3 |
* Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-2 |
243 |
- Add -config sub-package that delivers system-wide /etc/my.cnf and |
- Add -config sub-package that delivers system-wide /etc/my.cnf and |
244 |
/etc/my.cnf.d directory, that other packages should use |
/etc/my.cnf.d directory, that other packages should use |
245 |
This package also obsoletes mariadb-config |
This package also obsoletes mariadb-config |
246 |
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-2 |
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
|
|
|
|
247 |
* Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1 |
* Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1 |
248 |
- Rebase to 3.0.5 |
- Rebase to 3.0.5 |
249 |
|
|