--- rpms/mariadb-connector-c/contribs10/mariadb-connector-c.spec 2021/11/10 04:27:36 1.2 +++ rpms/mariadb-connector-c/contribs10/mariadb-connector-c.spec 2021/11/11 00:02:14 1.3 @@ -1,40 +1,27 @@ # For deep debugging we need to build binaries with extra debug info %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 - - Name: mariadb-connector-c Version: 3.1.13 Release: 1%{?with_debug:.debug}%{?dist} Summary: The MariaDB Native Client library (C driver) License: LGPLv2+ -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 Source2: my.cnf Source3: client.cnf Url: http://mariadb.org/ # More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/ -%if %{with testsuite} -Patch1: testsuite.patch -%endif - Requires: %{_sysconfdir}/my.cnf -BuildRequires: gcc-c++ cmake openssl-devel zlib-devel +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 +Requires: %{name}-config = %{version}-%{release} + %description The MariaDB Native Client library (C driver) is used to connect applications developed in C/C++ to MariaDB and MySQL databases. @@ -46,7 +33,9 @@ Summary: Development files for ma Requires: %{name} = %{version}-%{release} Requires: openssl-devel zlib-devel BuildRequires: multilib-rpm-config -Conflicts: %{?fedora:community-}mysql-devel +Conflicts: mysql-devel + +Requires: mariadb-devel >= 3:10.3.27 %description devel Development files for mariadb-connector-c. @@ -54,20 +43,6 @@ Contains everything needed to build agai -%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 - - %package config Summary: Configuration files for packages that use /etc/my.cnf as a configuration file BuildArch: noarch @@ -83,23 +58,27 @@ and require this package, so the /etc/my %prep %setup -q -n %{name}-%{version}-src -%if %{with testsuite} -%patch1 -p1 -%endif # Remove unsused parts -rm -r win win-iconv zlib +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. # If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services. # If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say. # I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file. -# 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 # so we can't use %%{_datadir} and so forth here. %cmake . \ @@ -109,38 +88,31 @@ rm -r win win-iconv zlib -DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \ -DMARIADB_PORT=3306 \ \ - -DWITH_EXTERNAL_ZLIB=ON \ + -DWITH_EXTERNAL_ZLIB=YES \ -DWITH_SSL=OPENSSL \ -DWITH_MYSQLCOMPAT=ON \ -DPLUGIN_CLIENT_ED25519=DYNAMIC \ \ -DINSTALL_LAYOUT=RPM \ + -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ -DINSTALL_BINDIR="bin" \ -DINSTALL_LIBDIR="%{_lib}" \ -DINSTALL_INCLUDEDIR="include/mysql" \ -DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \ -DINSTALL_PCDIR="%{_lib}/pkgconfig" \ \ -%if %{with testsuite} - -DWITH_UNIT_TESTS=ON -%endif + -DWITH_UNITTEST=ON -# 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 -cmake -B %__cmake_builddir -LAH -%cmake_build +#cmake -LAH + +%make_build %install -%cmake_install +%make_install %multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h @@ -165,11 +137,10 @@ install -D -p -m 0644 %{SOURCE3} %{build # - 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 -%if %{with testsuite} pushd unittest/libmariadb/ -%ctest || : +ctest || : popd -%endif + %files @@ -201,6 +172,7 @@ popd %dir %{_includedir}/mysql %{_includedir}/mysql/* +%license COPYING.LIB %files config @@ -210,29 +182,6 @@ popd -%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 - %changelog * Fri May 14 2021 Michal Schorm - 3.1.13-1 - Rebase to 3.1.13 @@ -240,126 +189,56 @@ popd * Wed Feb 24 2021 Michal Schorm - 3.1.12-1 - Rebase to 3.1.12 -* Tue Jan 26 2021 Fedora Release Engineering - 3.1.11-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild +* Thu Dec 03 2020 Michal Schorm - 3.1.11-2 +- Require specific minimal version of the 'mariadb' package, if it is installed -* Wed Nov 04 2020 Michal Schorm - 3.1.11-1 +* Tue Nov 10 2020 Michal Schorm - 3.1.11-1 - Rebase to 3.1.11 -* Fri Sep 18 2020 Lukas Javorsky - 3.1.10-1 -- Rebase to 3.1.10 - -* Tue Aug 04 2020 Michal Schorm - 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 - 3.1.9-4 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 3.1.9-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jul 14 2020 Michal Schorm - 3.1.9-2 -- Add explicit confict between mariadb-connector-c-devel and community-mysql-devel packages - * Wed Jun 24 2020 Lukas Javorsky - 3.1.9-1 - Rebase to 3.1.9 - -* Thu May 14 2020 Lukas Javorsky - 3.1.8-1 -- Rebase to 3.1.8 - -* Mon Mar 16 2020 Michal Schorm - 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 - 3.1.7-1 -- Rebase to 3.1.7 - -* Wed Jan 29 2020 Fedora Release Engineering - 3.1.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Tue Dec 17 2019 Lukas Javorsky - 3.1.6-1 -- Rebase to 3.1.6 - -* Tue Nov 12 2019 Michal Schorm - 3.1.5-1 -- Rebase to 3.1.5 - -* Sun Nov 03 2019 Michal Schorm - 3.1.4-2 -- Fix for #1624533 - -* Wed Sep 18 2019 Lukas Javorsky - 3.1.4-1 -- Rebase to 3.1.4 - -* Wed Sep 11 2019 Michal Schorm - 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 - 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 - 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 - 3.1.2-2 -- Use macro to set build flags +- 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 - 3.1.2-1 -- Rebase to 3.1 version -- Disabling the ED25519 plugin -- Plugindir patch upstreamed -- Added debug build switch - -* Tue May 21 2019 Michal Schorm - 3.0.10-2 -- Fix overlinking issues +- 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 - 3.0.10-1 - Rebase to 3.0.10 -- Remove scriplet; no longer needed +- 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 - 3.0.9-3 +* Fri Mar 29 2019 Michal Schorm - 3.0.8-2 - Add "zlib-devel" requirement in "-devel" subpackage. MariaDB requires linking with "-lz", which will fail without the zlib library -- Related: #1693966 - -* Mon Feb 18 2019 Michal Schorm - 3.0.9-2 -- Fix plugindir issues - Resolves: #1624533 - -* Mon Feb 18 2019 Michal Schorm - 3.0.9-1 -- Rebase to 3.0.9 - -* Fri Feb 01 2019 Fedora Release Engineering - 3.0.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild +- Resolves: #1710471 * Wed Jan 02 2019 Michal Schorm - 3.0.8-1 - Rebase to 3.0.8 -* Mon Nov 19 2018 Michal Schorm - 3.0.7-1 +* Mon Dec 10 2018 Michal Schorm - 3.0.7-1 - Rebase to 3.0.7 * Tue Sep 04 2018 Michal Schorm - 3.0.6-2 - Fix parallel installability of x86_64 and i686 devel package +- Resolves: #1637031 * Fri Aug 03 2018 Michal Schorm - 3.0.6-1 - Rebase to 3.0.6 -* Tue Jul 17 2018 Honza Horak - 3.0.5-3 +* Tue Jul 17 2018 Honza Horak - 3.0.5-2 - Add -config sub-package that delivers system-wide /etc/my.cnf and /etc/my.cnf.d directory, that other packages should use This package also obsoletes mariadb-config -* Fri Jul 13 2018 Fedora Release Engineering - 3.0.5-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - * Fri Jun 08 2018 Michal Schorm - 3.0.5-1 - Rebase to 3.0.5