Rebase to 3.3.10

Remove LTO "warnings as errors" workaround, in favor of newly implemented upstream mechanism:
https://github.com/mariadb-corporation/mariadb-connector-c/commit/39564154
This commit is contained in:
Michal Schorm 2024-07-31 12:45:52 +02:00
parent fc688f48bd
commit 8f8dec94e6
3 changed files with 7 additions and 46 deletions

View File

@ -1,40 +0,0 @@
This code has been introduced by Upstream in the commit:
https://github.com/mariadb-corporation/mariadb-connector-c/commit/1acb81e
and later modified in the:
https://github.com/mariadb-corporation/mariadb-connector-c/commit/5f88f50
between the version mariadb-connector-c 3.3.5 and 3.3.7
It results in a lot of warnings being treated as errors and thus killing the compilation.
Specifically lot of occuerences of these:
| libmariadb/ma_client_plugin.c:83:39: error: type of mysql_native_password_client_plugin does not match original declaration [-Werror=lto-type-mismatch]
| libmariadb/ma_client_plugin.c:84:39: error: type of mysql_old_password_client_plugin does not match original declaration [-Werror=lto-type-mismatch]
| libmariadb/ma_client_plugin.c:85:39: error: type of zlib_client_plugin does not match original declaration [-Werror=lto-type-mismatch]
| libmariadb/ma_client_plugin.c:86:39: error: type of pvio_socket_client_plugin does not match original declaration [-Werror=lto-type-mismatch]
Note: These warnings were present even before:
e.g. this build.log of release 3.3.5:
https://koji.fedoraproject.org/koji/buildinfo?buildID=2244099
https://kojipkgs.fedoraproject.org//packages/mariadb-connector-c/3.3.5/2.fc39/data/logs/x86_64/build.log
search for "[-Wlto-type-mismatch]"
The difference is that since they started to be treated as errors and thus killing the build.
--- mariadb-connector-c-3.3.8-src/CMakeLists.txt 2023-11-01 11:28:04.000000000 +0100
+++ mariadb-connector-c-3.3.8-src/CMakeLists.txt_patched 2024-01-12 20:57:58.031375024 +0100
@@ -395,16 +395,6 @@ ENDIF()
MESSAGE1(SYSTEM_LIBS "SYSTEM_LIBS ${SYSTEM_LIBS}")
MARK_AS_ADVANCED(SYSTEM_LIBS)
-IF(NOT IS_SUBPROJECT)
-IF ((NOT WIN32) AND (CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "GNU"))
- SET(WARNING_AS_ERROR "-Werror")
-ELSEIF(CMAKE_C_COMPILER_ID MATCHES "MSVC")
- SET(WARNING_AS_ERROR "/WX")
-ENDIF()
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_AS_ERROR}")
-ENDIF()
-
-
IF(NOT REMOTEIO_PLUGIN_TYPE MATCHES "OFF")
IF(CURL_FOUND)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})

View File

@ -6,8 +6,8 @@
Name: mariadb-connector-c
Version: 3.3.8
Release: 4%{?with_debug:.debug}%{?dist}
Version: 3.3.10
Release: 1%{?with_debug:.debug}%{?dist}
Summary: The MariaDB Native Client library (C driver)
License: LGPL-2.1-or-later
Source: https://archive.mariadb.org/connector-c-%{version}/%{name}-%{version}-src.tar.gz
@ -20,8 +20,6 @@ Url: http://mariadb.org/
Patch1: testsuite.patch
%endif
Patch2: lto-type-mismatch.patch
%if 0%{?flatpak}
Requires: %{name}-config = %{version}-%{release}
%else
@ -95,7 +93,6 @@ and require this package, so the /etc/my.cnf file is present.
%if %{with testsuite}
%patch -P1 -p1
%endif
%patch -P2 -p1
# Remove unsused parts
rm -r win win-iconv external/zlib
@ -115,6 +112,7 @@ rm -r win win-iconv external/zlib
%cmake . \
-DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \
-DCMAKE_SYSTEM_PROCESSOR="%{_arch}" \
-DCMAKE_COMPILE_WARNING_AS_ERROR=0 \
\
-DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \
-DMARIADB_PORT=3306 \
@ -250,6 +248,9 @@ install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
# Need to ensure, that the testsuite will also run properly on 'fedpkg local' buid, not damaging the host machine
%changelog
* Wed Jul 31 2024 Michal Schorm <mschorm@redhat.com> - 3.3.10-1
- Rebase to 3.3.10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.3.8-4
- Bump release for June 2024 mass rebuild

View File

@ -1 +1 @@
SHA512 (mariadb-connector-c-3.3.8-src.tar.gz) = d2630bda8deb28696842a6b5dd308060a8b9a83a04dfb3ed908387f53af4108510c6f536aaecc4a3c9a035c7be91b98229d6c480366a3579b6be2c5a8d85ff56
SHA512 (mariadb-connector-c-3.3.10-src.tar.gz) = 8cfab3015faa434e7d3b8341b8d4591337a61700e5e3cd4a9dc674bd8d6aedfb4e7689b74950cd51c688783d6f4a4cb1ecf83b7b7057e6d13aa7a3ce97c6ede7