diff --git a/mysql-connector-java-generated-for-protobuf-3.9.2.tar.xz b/mysql-connector-java-generated-for-protobuf-3.9.2.tar.xz new file mode 100644 index 0000000..19be258 --- /dev/null +++ b/mysql-connector-java-generated-for-protobuf-3.9.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78985b13a5a3783d07059493de8a8b324a0501914ca62c6e0ddb19a8f570c075 +size 113808 diff --git a/mysql-connector-java.changes b/mysql-connector-java.changes index d54663f..ff5d706 100644 --- a/mysql-connector-java.changes +++ b/mysql-connector-java.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jan 27 16:38:41 UTC 2023 - David Anes + +- Ship protobuf 3.9.2 compatible generated files to support + older distro versions. + - Added file mysql-connector-java-generated-for-protobuf-3.9.2.tar.xz + ------------------------------------------------------------------- Thu Jan 26 17:12:29 UTC 2023 - David Anes diff --git a/mysql-connector-java.spec b/mysql-connector-java.spec index 97d5887..5865977 100644 --- a/mysql-connector-java.spec +++ b/mysql-connector-java.spec @@ -25,6 +25,13 @@ Summary: Official JDBC Driver for MySQL License: GPL-2.0-or-later URL: https://dev.mysql.com/downloads/connector/j/ Source0: https://github.com/mysql/mysql-connector-j/archive/refs/tags/%{version}.tar.gz#:/%{name}-%{version}.tar.gz +# NOTE: +# the following file contains the generated protobuf files with +# previous versions of protoc (protobuf) that are needed to build +# in previous SUSE distros. +# Source from: +# https://github.com/mysql/mysql-connector-j/commit/6976d9d779b498c254fc5cab5e69cfc74fc3e4f0 +Source1: mysql-connector-java-generated-for-protobuf-3.9.2.tar.xz Group: Development/Languages/Java Patch0: javac-check.patch # NOTE: Oracle OCI is not packaged yet @@ -70,6 +77,15 @@ set that supports the capabilities of MySQL. %patch0 -p1 %patch1 -p1 +%if 0%{?suse_version} <= 1500 && 0%{?sle_version} <= 150200 +# ship protobuf generated files compatible with protobuf 3.9.2 +# which is the version we have in SLE15 SP2, the files were taken +# from commit 6976d9d779b498c254fc5cab5e69cfc74fc3e4f0, which is +# the last version compatible with that version of protobuf and +# are equivalent in functionality +tar -xvf %SOURCE1 -C . +%endif + # remove OCI support rm -rf src/main/protocol-impl/java/com/mysql/cj/protocol/a/authentication/AuthenticationOciClient.java