%global upstream_name mysql-connector-j Name: mysql-connector-java Epoch: 1 Version: 9.7.0 Release: %autorelease Summary: Official JDBC driver for MySQL License: GPL-2.0-only WITH Universal-FOSS-exception-1.0 URL: https://dev.mysql.com/downloads/connector/j/ BuildArch: noarch ExclusiveArch: %{java_arches} noarch # Generated with generate-tarball.sh Source0: %{name}-%{version}-nojars.tar.xz Source1: generate-tarball.sh Patch: 0001-Remove-OCI-authentication-plugin.patch Patch: 0002-Remove-Java-8-version-check.patch Patch: 0003-Remove-OpenTelemetry-integration.patch BuildRequires: javapackages-local-openjdk25 BuildRequires: ant BuildRequires: javassist BuildRequires: protobuf-java BuildRequires: slf4j Requires: java-headless >= 1:17 %description MySQL Connector/J is a native Java driver that converts JDBC (Java Database Connectivity) calls into the network protocol used by the MySQL database. It lets developers working with the Java programming language easily build programs and applets that interact with MySQL and connect all corporate data, even in a heterogeneous environment. MySQL Connector/J is a Type IV JDBC driver and has a complete JDBC feature set that supports the capabilities of MySQL. %prep %autosetup -p1 -C %pom_xpath_set 'pom:project/pom:version' %{version} src/build/misc/pom.xml %pom_xpath_set 'pom:project/pom:artifactId' %{upstream_name} src/build/misc/pom.xml %pom_xpath_set 'pom:project/pom:licenses/pom:license/pom:name' 'GNU General Public License, version 2, with the FOSS exception' src/build/misc/pom.xml %pom_remove_dep com.oracle.oci.sdk: src/build/misc/pom.xml # OCI authentication plugin requires proprietary Oracle OCI SDK (com.oracle.bmc) rm src/main/protocol-impl/java/com/mysql/cj/protocol/a/authentication/AuthenticationOciClient.java sed -i '/^AuthenticationOciClientPlugin\./d' src/main/resources/com/mysql/cj/LocalizedErrorMessages.properties # OpenTelemetry API (io.opentelemetry) is not packaged in Fedora rm -rf src/main/core-impl/java/com/mysql/cj/otel %build ant -Dcom.mysql.cj.build.jdk=%{java_home} \ -Dcom.mysql.cj.extra.libs=%{_javadir} \ build %install %mvn_file com.mysql:%{upstream_name} %{name} %mvn_alias com.mysql:%{upstream_name} mysql:mysql-connector-java %mvn_artifact src/build/misc/pom.xml build/%{upstream_name}-%{version}-SNAPSHOT/%{upstream_name}-%{version}-SNAPSHOT.jar %mvn_install %files -f .mfiles %doc CHANGES README README.md %license LICENSE %changelog %autochangelog