mysql-connector-java/mysql-connector-java.spec
David Anes 3469ba37f8 Accepting request 973641 from home:david.anes:branches:Java:packages
- Update to 8.0.29: 
  Functionality added or changed:
    * Historically, MySQL has used utf8 as an alias for utf8mb3. 
      Since release 8.0.29, utf8mb3 has become a recognized (though 
      deprecated) character set on its own for MySQL Server. 
      Therefore, Connector/J has added utf8mb3 to its character set 
      mapping, and users are encouraged to update to 
      Connector/J 8.0.29 to avoid potential issues when working with 
      MySQL Server 8.0.29 or later. (Bug #33850155)
    * A new connection property socksProxyRemoteDns has been added, 
      which, when set to true, makes the SocksProxySocketFactory 
      execute its own connect() implementation that passes the 
      unresolved InetSocketAddress of a MySQL Server host to the 
      created proxy socket, instead of having the address resolved 
      locally. (Bug #77924, Bug #25710160)
    * The code for prepared statements has been refactored to make 
      the code simpler and the logic for binding more consistent 
      between ServerPreparedStatement and ClientPreparedStatement.
    * Connector/J now supports Fast Identity Online (FIDO) 
      Authentication. See Connecting Using Fast Identity Online 
      (FIDO) Authentication for details. 
  Bugs fixed:
    * X DevAPI: If the connection property xdevapi.ssl-mode was set
      to DISABLED (or xdevapi.ssl-mode was not set, but the value 
      was picked up from the sslMode setting), specifying some of 
      the security properties caused Connector/J to throw an error. 
      With this fix, even when encryption is turned off and 
      irrelevant security properties are set, Connector/J does not 
      throw an error.
    * DatabaseMetaData.getDefaultTransactionIsolation() returned a

OBS-URL: https://build.opensuse.org/request/show/973641
OBS-URL: https://build.opensuse.org/package/show/Java:packages/mysql-connector-java?expand=0&rev=65
2022-04-28 10:29:44 +00:00

121 lines
3.9 KiB
RPMSpec

#
# spec file for package mysql-connector-java
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: mysql-connector-java
Version: 8.0.29
Release: 0
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
Group: Development/Languages/Java
Patch0: javac-check.patch
# NOTE: Oracle OCI is not packaged yet
# The patch doesn't remove the file AuthenticationOciClient.java
# therefore it's removed during prep phase
Patch1: %{name}-remove-oci-support.patch
BuildRequires: ant
BuildRequires: ant-contrib
BuildRequires: apache-commons-logging
BuildRequires: geronimo-jta-1_1-api
BuildRequires: git
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: javassist >= 3.28.0
BuildRequires: junit
BuildRequires: protobuf-java >= 3.9.2
BuildRequires: reload4j
BuildRequires: slf4j
BuildRequires: xz
Requires: jta >= 1.0
Requires: reload4j
Requires: slf4j
Provides: mm.mysql = %{version}
Obsoletes: mm.mysql < %{version}
# manual is no longer distributed
Provides: %{name}-manual = %{version}
Obsoletes: %{name}-manual < %{version}
BuildArch: noarch
%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
%setup -q -n mysql-connector-j-%{version}
%patch0 -p1
%patch1 -p1
# remove OCI support
rm -rf src/main/protocol-impl/java/com/mysql/cj/protocol/a/authentication/AuthenticationOciClient.java
# extra libs
mkdir -p lib
mkdir -p src/lib
ln -f -s %{_datadir}/java/ant/ant-contrib.jar lib/ant-contrib.jar
ln -f -s %{_datadir}/java/slf4j/api.jar lib/slf4j-api.jar
ln -s %{_datadir}/java/javassist.jar lib/javassist.jar
ln -s %{_datadir}/java/protobuf.jar lib/protobuf.jar
%build
export CLASSPATH=$(build-classpath \
ant-contrib \
commons-logging \
slf4j \
jdbc-stdext\
jta \
junit \
reload4j \
protobuf)
%{ant} \
-Dsnapshot.version= \
-Dcom.mysql.jdbc.extra.libs=lib \
-Dant.java.version=1.8 \
-Dant.build.javac.source=1.8 \
-Dant.build.javac.target=1.8 \
-Dcom.mysql.cj.build.jdk=%{java_home} \
-Dcom.mysql.cj.build.jdk.javac=%{javac} \
-Dcom.mysql.cj.build.jdk.java=%{java} \
dist
%install
install -d -m 755 %{buildroot}%{_javadir}
install build/%{name}-%{version}-SNAPSHOT/%{name}-%{version}-SNAPSHOT.jar %{buildroot}%{_javadir}/%{name}.jar
rm -rf %{buildroot}%{name}-%{version}/docs/release-test-output
# Install the Maven build information
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 build/%{name}-%{version}-SNAPSHOT/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
sed -i 's/-SNAPSHOT//' %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar
%files -f .mfiles
%license LICENSE
%doc CHANGES README
%changelog