import mariadb-connector-c-3.1.11-2.el8_3

This commit is contained in:
CentOS Sources 2021-03-30 09:20:23 -04:00 committed by Stepan Oksanichenko
parent 4fd41b0740
commit 7293567332
3 changed files with 66 additions and 39 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/mariadb-connector-c-3.0.7-src.tar.gz
SOURCES/mariadb-connector-c-3.1.11-src.tar.gz

View File

@ -1 +1 @@
fb78c69ebefed7edd02d7e547fa4f81409a3861d SOURCES/mariadb-connector-c-3.0.7-src.tar.gz
33c124ac6203aa8f936743d91f37f63aa13d8977 SOURCES/mariadb-connector-c-3.1.11-src.tar.gz

View File

@ -1,6 +1,9 @@
# For deep debugging we need to build binaries with extra debug info
%bcond_with debug
Name: mariadb-connector-c
Version: 3.0.7
Release: 1%{?dist}
Version: 3.1.11
Release: 2%{?with_debug:.debug}%{?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
@ -13,6 +16,11 @@ Requires: %{_sysconfdir}/my.cnf
BuildRequires: zlib-devel cmake openssl-devel gcc-c++
# Remote-IO plugin
BuildRequires: libcurl-devel
# auth_gssapi_client plugin
BuildRequires: krb5-devel
Requires: ( mariadb >= 3:10.3.27 if mariadb )
Requires: ( %{name}-config = %{version}-%{release} if %{name}-config )
%description
The MariaDB Native Client library (C driver) is used to connect applications
@ -23,8 +31,11 @@ developed in C/C++ to MariaDB and MySQL databases.
%package devel
Summary: Development files for mariadb-connector-c
Requires: %{name} = %{version}-%{release}
Requires: openssl-devel
Requires: openssl-devel zlib-devel
BuildRequires: multilib-rpm-config
Conflicts: mysql-devel
Requires: ( mariadb-devel >= 3:10.3.27 if mariadb-devel )
%description devel
Development files for mariadb-connector-c.
@ -46,14 +57,20 @@ and require this package, so the /etc/my.cnf file is present.
%prep
%setup -q -n mariadb-connector-c-%{version}-src
%setup -q -n %{name}-%{version}-src
# Remove unsused parts
rm -r win zlib win-iconv examples
rm -r win zlib win-iconv
%build
%{set_build_flags}
# Override all optimization flags when making a debug build
%{?with_debug: CFLAGS="$CFLAGS -O0 -g"}
CXXFLAGS="$CFLAGS"
export CFLAGS CXXFLAGS
# https://jira.mariadb.org/browse/MDEV-13836:
# The server has (used to have for ages) some magic around the port number.
@ -65,7 +82,7 @@ rm -r win zlib win-iconv examples
# so we can't use %%{_datadir} and so forth here.
%cmake . \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \
-DCMAKE_SYSTEM_PROCESSOR="%{_arch}" \
\
-DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \
@ -74,6 +91,7 @@ rm -r win zlib win-iconv examples
-DWITH_EXTERNAL_ZLIB=YES \
-DWITH_SSL=OPENSSL \
-DWITH_MYSQLCOMPAT=ON \
-DPLUGIN_CLIENT_ED25519=DYNAMIC \
\
-DINSTALL_LAYOUT=RPM \
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
@ -81,6 +99,7 @@ rm -r win zlib win-iconv examples
-DINSTALL_LIBDIR="%{_lib}" \
-DINSTALL_INCLUDEDIR="include/mysql" \
-DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \
-DINSTALL_PCDIR="%{_lib}/pkgconfig" \
\
-DWITH_UNITTEST=ON
@ -88,12 +107,12 @@ rm -r win zlib win-iconv examples
#cmake -LAH
make %{?_smp_mflags}
%make_build
%install
make install DESTDIR=%{buildroot}
%make_install
%multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h
@ -108,12 +127,6 @@ ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/my.cnf
install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
%if 0%{?__isa_bits} != 32
mkdir -p %{buildroot}/%{_libdir}/pkgconfig
mv %{buildroot}/usr/lib/pkgconfig/libmariadb.pc %{buildroot}/%{_libdir}/pkgconfig
rmdir %{buildroot}/usr/lib/pkgconfig
%endif
%check
@ -123,29 +136,15 @@ rmdir %{buildroot}/usr/lib/pkgconfig
# Run the unit tests
# - don't run mytap tests
# - ignore the testsuite result for now. Enable tests now, fix them later.
# Note: there must be a database called 'test' created for the testcases to be run
pushd unittest/libmariadb/
ctest || :
popd
# https://fedoraproject.org/wiki/Packaging:Directory_Replacement
%pretrans -p <lua>
path = "%{_libdir}/mariadb"
st = posix.stat(path)
if st and st.type == "link" then
os.remove(path)
end
path = "%{_libdir}/mysql"
st = posix.stat(path)
if st and st.type == "link" then
os.remove(path)
end
%files
%{_libdir}/libmariadb.so.*
%{_libdir}/libmariadb.so.3
%dir %{_libdir}/mariadb
%dir %{_libdir}/mariadb/plugin
@ -183,14 +182,42 @@ end
# RPMLint issues from 2.3.2 release tracked on the upstream JIRA:
# https://jira.mariadb.org/browse/CONC-232
# https://jira.mariadb.org/browse/CONC-234
# RPMLint issues from 3.0.2 release tracked on the upstream JIRA:
# https://jira.mariadb.org/browse/CONC-287
# https://jira.mariadb.org/browse/CONC-291
%changelog
* Thu Dec 03 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-2
- Require specific minimal version of the 'mariadb' package, if it is installed
* Tue Nov 10 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-1
- Rebase to 3.1.11
* Wed Jun 24 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.9-1
- Rebase to 3.1.9
- Overlinking issues fixed by upstream in 3.1.3 release
- Add explicit confict between mariadb-connector-c-devel and mysql-devel packages
* Fri Jul 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-1
- Rebase to 3.1.2
- Introducing ED25519 plugin
- Plugindir issues (from 3.0.9 release) fixed by upstream
Resolves: #1691176
* Wed May 15 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-1
- Rebase to 3.0.10
- Use macro for tarball name
- Use macro to set build flags
- Use macros for make commands
- Remove the scriptlets non relevant for RHEL-8
- Add info for the testsuite execution
- Remove glob from library version
- Remove info about the upstream issues
* Fri Mar 29 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-2
- Add "zlib-devel" requirement in "-devel" subpackage. MariaDB requires
linking with "-lz", which will fail without the zlib library
- Resolves: #1710471
* Wed Jan 02 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-1
- Rebase to 3.0.8
* Mon Dec 10 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1
- Rebase to 3.0.7