Accepting request 1041322 from home:david.anes:branches:Java:packages

- Rebased javac-check.patch to new build.xml.
- Changed ant target from "dist" to "build", as it's been renamed.
- As Oracle renamed the package to "mysql-connector-j", we are
  "providing" both names for now, but the package has to be renamed
  to accommodate the change because the old name will be deprecated
  at some point in the future without further notice.
- Update to 8.0.31:
  Functionality Added or Changed
    * Important Change: To comply with proper naming guidelines, the
      Maven groupId and artifactId for Connector/J have been changed
      to the following starting with this release:
        groupId: com.mysql
        artifactId: mysql-connector-j
    * The old groupId and artifactId can still be used for linking 
      the Connector/J library, but they will point to a Maven 
      relocation POM, redirecting users to the new coordinates. 
      Please switch to the new coordinates as soon as possible, as 
      the old coordinates could be discontinued anytime without 
      notice. See Installing Connector/J Using Maven.
    * Also, to go with these changes, the .jar library for 
      Connector/J has been renamed to mysql-connector-j-x.y.z for 
      all channels of distribution by Oracle, not just the Maven 
      repository.
    * Before release 8.0.29, Connector/J always interpolated byte
      arrays as hexadecimal literals when obtaining a prepared 
      statement's string representation by the toString() method. 
      Since 8.0.29, all byte array values were displayed as 
      ** BYTE ARRAY DATA ** when converted to strings. The same is 
      also true for null values.
    * To allow different ways to display byte array data and null

OBS-URL: https://build.opensuse.org/request/show/1041322
OBS-URL: https://build.opensuse.org/package/show/Java:packages/mysql-connector-java?expand=0&rev=71
This commit is contained in:
Fridrich Strba 2022-12-08 13:24:10 +00:00 committed by Git OBS Bridge
parent d080b007b9
commit 2a03262005
5 changed files with 98 additions and 21 deletions

View File

@ -1,16 +1,16 @@
Description: Disable the JDK check
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
Index: mysql-connector-java-8.0.25/build.xml
Index: mysql-connector-j-8.0.31/build.xml
===================================================================
--- mysql-connector-java-8.0.25.orig/build.xml
+++ mysql-connector-java-8.0.25/build.xml
@@ -401,7 +401,7 @@ See also com.mysql.cj.conf.PropertyDefin
--- mysql-connector-j-8.0.31.orig/build.xml
+++ mysql-connector-j-8.0.31/build.xml
@@ -405,7 +405,7 @@ See also com.mysql.cj.conf.PropertyDefin
<!-- Prepares files and settings for compiling driver. -->
- <target name="init" depends="-extra-libs-check, -compiler-check, -init-copy, -init-notices-commercial, -init-notices-gpl, -init-info-files">
+ <target name="init" depends="-extra-libs-check, -init-copy, -init-notices-commercial, -init-notices-gpl, -init-info-files">
<!-- The following is needed for source distributions as the classpath can't be dynamically altered, and not having this directory present causes the
build to fail. -->
<available property="com.mysql.cj.prebuiltDocsPresent" file="${com.mysql.cj.dist.dir.prebuilt.docs}" />
<!-- Initialize the build directory and check requirements for compiling the driver code. -->
- <target name="-init" depends="-extra-libs-check, -compiler-check, -copy-files, -copy-notices-commercial, -copy-notices-gpl, -init-info-files">
+ <target name="-init" depends="-extra-libs-check, -copy-files, -copy-notices-commercial, -copy-notices-gpl, -init-info-files">
<!-- The following is needed as the classpath can't be modified dynamically, and not having this library present causes the build to fail. -->
<available property="com.mysql.cj.c3p0Present" classname="com.mchange.v2.c3p0.QueryConnectionTester" classpathref="com.mysql.cj.build.classpath" />
</target>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e8bedd9f7fa153407ff6bdf73ab9915ffa0c54ffa72cb598d24a1736cb826872
size 1893121

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3b5b9e9cd7bd3d5fe832c31382a96f74a47ec2dd32d8ddcdb9c3d13bfd37c316
size 1896506

View File

@ -1,3 +1,71 @@
-------------------------------------------------------------------
Thu Dec 8 06:21:44 UTC 2022 - David Anes <david.anes@suse.com>
- Rebased javac-check.patch to new build.xml.
- Changed ant target from "dist" to "build", as it's been renamed.
- As Oracle renamed the package to "mysql-connector-j", we are
"providing" both names for now, but the package has to be renamed
to accommodate the change because the old name will be deprecated
at some point in the future without further notice.
- Update to 8.0.31:
Functionality Added or Changed
* Important Change: To comply with proper naming guidelines, the
Maven groupId and artifactId for Connector/J have been changed
to the following starting with this release:
groupId: com.mysql
artifactId: mysql-connector-j
* The old groupId and artifactId can still be used for linking
the Connector/J library, but they will point to a Maven
relocation POM, redirecting users to the new coordinates.
Please switch to the new coordinates as soon as possible, as
the old coordinates could be discontinued anytime without
notice. See Installing Connector/J Using Maven.
* Also, to go with these changes, the .jar library for
Connector/J has been renamed to mysql-connector-j-x.y.z for
all channels of distribution by Oracle, not just the Maven
repository.
* Before release 8.0.29, Connector/J always interpolated byte
arrays as hexadecimal literals when obtaining a prepared
statement's string representation by the toString() method.
Since 8.0.29, all byte array values were displayed as
** BYTE ARRAY DATA ** when converted to strings. The same is
also true for null values.
* To allow different ways to display byte array data and null
values, a new connection property, maxByteArrayAsHex, has been
introduced: byte arrays shorter than the value of
maxByteArrayAsHex are now shown as hexadecimal literals like
before release 8.0.29. Any byte arrays longer than this value
are interpolated generically as ** BYTE ARRAY DATA **.
Bugs Fixed
* X DevAPI: When parsing a string into a JSON string, some
escape character sequences were not parsed properly, causing
the Server to throw a com.mysql.cj.exceptions.WrongArgumentException
when receiving the JSON value. This fix ensures that escape
sequences are handled properly.
* X DevAPI: When using the modify() method on JSON documents,
any backslashes inside a literal to be used for the modification
were lost. This fix corrects the mistakes in the expression
parser that caused the issue.
* Executing a PreparedStatment after applying setFetchSize(0) on
it caused an ArrayIndexOutOfBoundsException.
* Due to some old limitations, when used with Java applets,
Connector/J found out the default character set on a system by
various workarounds like reading the system property
file.encoding, using an OutpuStreamWriter, etc. With this fix,
Connector/J now uses Charset.defaultCharset(), the standard
method for the purpose.
-------------------------------------------------------------------
Mon Aug 1 10:44:23 UTC 2022 - David Anes <david.anes@suse.com>

View File

@ -16,8 +16,10 @@
#
%define new_name mysql-connector-j
Name: mysql-connector-java
Version: 8.0.30
Version: 8.0.31
Release: 0
Summary: Official JDBC Driver for MySQL
License: GPL-2.0-or-later
@ -47,6 +49,8 @@ Requires: reload4j
Requires: slf4j
Provides: mm.mysql = %{version}
Obsoletes: mm.mysql < %{version}
# we'll be providing the new package name until this one is deprecated
Provides: %{new_name}
# manual is no longer distributed
Provides: %{name}-manual = %{version}
Obsoletes: %{name}-manual < %{version}
@ -97,21 +101,26 @@ export CLASSPATH=$(build-classpath \
-Dcom.mysql.cj.build.jdk=%{java_home} \
-Dcom.mysql.cj.build.jdk.javac=%{javac} \
-Dcom.mysql.cj.build.jdk.java=%{java} \
dist
build
%install
install -d -m 755 %{buildroot}%{_javadir}
install build/%{name}-%{version}-SNAPSHOT/%{name}-%{version}-SNAPSHOT.jar %{buildroot}%{_javadir}/%{name}.jar
install build/%{new_name}-%{version}-SNAPSHOT/%{new_name}-%{version}-SNAPSHOT.jar %{buildroot}%{_javadir}/%{new_name}.jar
rm -rf %{buildroot}%{name}-%{version}/docs/release-test-output
rm -rf %{buildroot}%{new_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
# Install the Maven build information as new name
install -pm 644 build/%{new_name}-%{version}-SNAPSHOT/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{new_name}.pom
sed -i 's/-SNAPSHOT//' %{buildroot}%{_mavenpomdir}/JPP-%{new_name}.pom
%add_maven_depmap JPP-%{new_name}.pom %{new_name}.jar
# Provide poms with "old name" mysql-connector-java (now it's mysql-connector-j)
install -pm 644 build/%{new_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 %{new_name}.jar
%files -f .mfiles
%license LICENSE