migrate to java-11
This commit is contained in:
parent
d17588b870
commit
ffeb3f35e8
2 changed files with 75 additions and 3 deletions
67
java-11-migration.patch
Normal file
67
java-11-migration.patch
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
diff --git a/build.xml b/build.xml
|
||||
index 9c8ab7d..040318c 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -97,7 +97,7 @@ com.mysql.cj.extra.libs=<full_path_to_connector-j-jardeps>
|
||||
# - Must point to JDK home directory.
|
||||
# - Also used for testing if 'com.mysql.cj.testsuite.jvm' is not provided.
|
||||
# - Mandatory.
|
||||
-com.mysql.cj.build.jdk=<full_path_to_jdk1.8>
|
||||
+com.mysql.cj.build.jdk=<full_path_to_jdk11>
|
||||
|
||||
# Single JVM/MySQL tests:
|
||||
# - Must point to JDK or JRE home directory.
|
||||
@@ -259,7 +259,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
|
||||
</condition>
|
||||
|
||||
<!-- The JDK used to compile the code. -->
|
||||
- <property name="com.mysql.cj.build.jdk" value="/usr/lib/jvm/jdk1.8" />
|
||||
+ <property name="com.mysql.cj.build.jdk" value="/usr/lib/jvm/jdk11" />
|
||||
|
||||
<!-- Generate debugging info in compiled code. -->
|
||||
<property name="com.mysql.cj.build.addDebugInfo" value="yes" />
|
||||
@@ -352,12 +352,12 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
|
||||
<arg value="-version" />
|
||||
</exec>
|
||||
|
||||
- <fail message="Java 8 is required. Set the full path to this JDK home with the property 'com.mysql.cj.build.jdk'. Default: '/usr/lib/jvm/jdk1.8').">
|
||||
+ <fail message="Java 11 is required. Set the full path to this JDK home with the property 'com.mysql.cj.build.jdk'. Default: '/usr/lib/jvm/jdk11').">
|
||||
<condition>
|
||||
<not>
|
||||
<and>
|
||||
<equals arg1="${com.mysql.cj.build.jdk.exitStatus}" arg2="0" />
|
||||
- <contains string="${com.mysql.cj.build.jdk.version}" substring="version "1.8" casesensitive="true" />
|
||||
+ <contains string="${com.mysql.cj.build.jdk.version}" substring="version "11" casesensitive="true" />
|
||||
</and>
|
||||
</not>
|
||||
</condition>
|
||||
@@ -385,7 +385,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
|
||||
<arg value="-version" />
|
||||
</exec>
|
||||
|
||||
- <fail message="Testing Connector/J requires a JVM 1.8 or higher. Set the path to this JVM (JRE or JDK) home with the property 'com.mysql.cj.testsuite.jvm'. Default: '${com.mysql.cj.build.jdk}'.">
|
||||
+ <fail message="Testing Connector/J requires a JVM 11 or higher. Set the path to this JVM (JRE or JDK) home with the property 'com.mysql.cj.testsuite.jvm'. Default: '${com.mysql.cj.build.jdk}'.">
|
||||
<condition>
|
||||
<not>
|
||||
<equals arg1="${com.mysql.cj.testsuite.jvm.exitStatus}" arg2="0" />
|
||||
diff --git a/src/build/misc/rpm.spec.in b/src/build/misc/rpm.spec.in
|
||||
index d2926bb..9cf507b 100644
|
||||
--- a/src/build/misc/rpm.spec.in
|
||||
+++ b/src/build/misc/rpm.spec.in
|
||||
@@ -84,13 +84,13 @@ BuildRequires: ant
|
||||
%endif
|
||||
|
||||
%if 0%{!?with_java:1}
|
||||
-BuildRequires: java-devel >= 1:1.8.0
|
||||
+BuildRequires: java-devel >= 1:11
|
||||
%endif
|
||||
|
||||
%if 0%{?sles12:1} || 0%{?sles15:1}
|
||||
-Requires: java-headless >= 1.8.0
|
||||
+Requires: java-headless >= 11
|
||||
%else
|
||||
-Requires: java-headless >= 1:1.8.0
|
||||
+Requires: java-headless >= 1:11
|
||||
%endif
|
||||
|
||||
%description
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
Summary: Official JDBC driver for MySQL
|
||||
Name: mysql-connector-java
|
||||
Version: 8.0.25
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2 with exceptions
|
||||
URL: http://dev.mysql.com/downloads/connector/j/
|
||||
|
|
@ -32,6 +32,7 @@ Source0: %{name}-%{version}-nojars.tar.xz
|
|||
Source1: generate-tarball.sh
|
||||
|
||||
Patch1: remove-coverage-test.patch
|
||||
Patch2: java-11-migration.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
|
@ -45,7 +46,7 @@ BuildRequires: javapackages-local
|
|||
BuildRequires: junit5
|
||||
BuildRequires: protobuf-java
|
||||
BuildRequires: slf4j
|
||||
BuildRequires: java-1.8.0-openjdk-devel
|
||||
BuildRequires: java-11-openjdk-devel
|
||||
|
||||
Requires: slf4j
|
||||
Requires: java
|
||||
|
|
@ -72,6 +73,7 @@ done
|
|||
sed -i 's/>@.*</>%{version}</' src/build/misc/pom.xml
|
||||
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
|
||||
|
|
@ -85,7 +87,7 @@ rm src/test/java/testsuite/regression/ConnectionRegressionTest.java
|
|||
rm src/test/java/testsuite/regression/DataSourceRegressionTest.java
|
||||
rm src/test/java/testsuite/simple/StatementsTest.java
|
||||
|
||||
ant -Dcom.mysql.cj.build.jdk=/usr/lib/jvm/java-1.8.0-openjdk \
|
||||
ant -Dcom.mysql.cj.build.jdk=/usr/lib/jvm/java-11-openjdk \
|
||||
-Dcom.mysql.cj.extra.libs=%{_javadir} \
|
||||
test dist
|
||||
|
||||
|
|
@ -100,6 +102,9 @@ ant -Dcom.mysql.cj.build.jdk=/usr/lib/jvm/java-1.8.0-openjdk \
|
|||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Wed Aug 18 2021 Ondrej Dubaj <odubaj@redhat.com> - 1:8.0.25-4
|
||||
- migrate to java-11
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:8.0.25-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue