Fix .spec
This commit is contained in:
parent
cc8be3c069
commit
11e0c88643
6 changed files with 77 additions and 151 deletions
|
|
@ -8,7 +8,7 @@ Subject: [PATCH] Remove coverage test
|
|||
1 file changed, 162 deletions(-)
|
||||
|
||||
diff --git a/build.xml b/build.xml
|
||||
index 8c4e9f5d..3d13bf45 100644
|
||||
index 8c4e9f5..3d13bf4 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -1279,82 +1279,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
|
||||
|
|
@ -188,5 +188,5 @@ index 8c4e9f5d..3d13bf45 100644
|
|||
|
||||
<!-- ***************************** -->
|
||||
--
|
||||
2.37.1
|
||||
2.48.1
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ Subject: [PATCH] remove AuthenticationOciClient plugin due to missing oracle dep
|
|||
delete mode 100644 src/main/protocol-impl/java/com/mysql/cj/protocol/a/authentication/AuthenticationOciClient.java
|
||||
|
||||
diff --git a/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeAuthenticationProvider.java b/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeAuthenticationProvider.java
|
||||
index 0d94061d..58bbf23b 100644
|
||||
index 0d94061..58bbf23 100644
|
||||
--- a/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeAuthenticationProvider.java
|
||||
+++ b/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeAuthenticationProvider.java
|
||||
@@ -58,7 +58,6 @@ import com.mysql.cj.protocol.a.NativeConstants.StringSelfDataType;
|
||||
|
|
@ -32,7 +32,7 @@ index 0d94061d..58bbf23b 100644
|
|||
// plugins from authenticationPluginClasses connection parameter
|
||||
diff --git a/src/main/protocol-impl/java/com/mysql/cj/protocol/a/authentication/AuthenticationOciClient.java b/src/main/protocol-impl/java/com/mysql/cj/protocol/a/authentication/AuthenticationOciClient.java
|
||||
deleted file mode 100644
|
||||
index 473e532f..00000000
|
||||
index 473e532..0000000
|
||||
--- a/src/main/protocol-impl/java/com/mysql/cj/protocol/a/authentication/AuthenticationOciClient.java
|
||||
+++ /dev/null
|
||||
@@ -1,177 +0,0 @@
|
||||
|
|
@ -214,7 +214,7 @@ index 473e532f..00000000
|
|||
- }
|
||||
-}
|
||||
diff --git a/src/main/resources/com/mysql/cj/LocalizedErrorMessages.properties b/src/main/resources/com/mysql/cj/LocalizedErrorMessages.properties
|
||||
index e4709a75..d29cdeb3 100644
|
||||
index 8a5bfc1..53affc4 100644
|
||||
--- a/src/main/resources/com/mysql/cj/LocalizedErrorMessages.properties
|
||||
+++ b/src/main/resources/com/mysql/cj/LocalizedErrorMessages.properties
|
||||
@@ -50,12 +50,6 @@ AuthenticationLdapSaslClientPlugin.MissingLdapServerHostname=An LDAP Server host
|
||||
|
|
@ -231,5 +231,5 @@ index e4709a75..d29cdeb3 100644
|
|||
AuthenticationProvider.BadDefaultAuthenticationPlugin=Improper value "{0}" for property ''defaultAuthenticationPlugin''.
|
||||
AuthenticationProvider.DefaultAuthenticationPluginIsNotListed=Default authentication plugin "{0}" is neither one of the built-in plugins nor one of the plugins listed in ''authenticationPlugins''.
|
||||
--
|
||||
2.35.1
|
||||
2.48.1
|
||||
|
||||
|
|
@ -8,10 +8,10 @@ Subject: [PATCH] patch
|
|||
1 file changed, 50 deletions(-)
|
||||
|
||||
diff --git a/src/test/java/testsuite/regression/StatementRegressionTest.java b/src/test/java/testsuite/regression/StatementRegressionTest.java
|
||||
index b5c53e9a..89483a07 100644
|
||||
index 7e5a5f8..8e77de5 100644
|
||||
--- a/src/test/java/testsuite/regression/StatementRegressionTest.java
|
||||
+++ b/src/test/java/testsuite/regression/StatementRegressionTest.java
|
||||
@@ -154,7 +154,6 @@ import com.mysql.cj.util.TimeUtil;
|
||||
@@ -156,7 +156,6 @@ import com.mysql.cj.util.TimeUtil;
|
||||
import testsuite.BaseQueryInterceptor;
|
||||
import testsuite.BaseTestCase;
|
||||
import testsuite.UnreliableSocketFactory;
|
||||
|
|
@ -19,7 +19,7 @@ index b5c53e9a..89483a07 100644
|
|||
|
||||
/**
|
||||
* Regression tests for the Statement class
|
||||
@@ -11602,20 +11601,6 @@ public class StatementRegressionTest extends BaseTestCase {
|
||||
@@ -11607,20 +11606,6 @@ public class StatementRegressionTest extends BaseTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ index b5c53e9a..89483a07 100644
|
|||
|
||||
/**
|
||||
* Tests fix for Bug#71929 (18346501), Prefixing query with double comments cancels query DML validation.
|
||||
@@ -11643,41 +11628,6 @@ public class StatementRegressionTest extends BaseTestCase {
|
||||
@@ -11648,41 +11633,6 @@ public class StatementRegressionTest extends BaseTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -83,5 +83,5 @@ index b5c53e9a..89483a07 100644
|
|||
* Tests fix for Bug#101389 (32089018), GETWARNINGS SHOULD CHECK WARNING COUNT BEFORE SENDING SHOW.
|
||||
*
|
||||
--
|
||||
2.34.1
|
||||
2.48.1
|
||||
|
||||
42
0004-Port-to-Java-21.patch
Normal file
42
0004-Port-to-Java-21.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
From 790e9bdb1c73b3695a1bea9d0fccf91341728fc7 Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Fri, 24 Jan 2025 10:09:16 +0100
|
||||
Subject: [PATCH 4/4] Port to Java 21
|
||||
|
||||
---
|
||||
build.xml | 12 +-----------
|
||||
1 file changed, 1 insertion(+), 11 deletions(-)
|
||||
|
||||
diff --git a/build.xml b/build.xml
|
||||
index 3d13bf4..b3437d5 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -350,17 +350,6 @@ 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').">
|
||||
- <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" />
|
||||
- </and>
|
||||
- </not>
|
||||
- </condition>
|
||||
- </fail>
|
||||
-
|
||||
<exec executable="${com.mysql.cj.build.jdk.javac}"
|
||||
outputproperty="com.mysql.cj.dist.jdk.compilerVersion"
|
||||
failonerror="true"
|
||||
@@ -1054,6 +1043,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
|
||||
executable="${com.mysql.cj.build.jdk.javac}"
|
||||
compiler="modern"
|
||||
includeantruntime="false"
|
||||
+ release="8"
|
||||
encoding="UTF-8">
|
||||
<include name="**/*.java" />
|
||||
<exclude name="testsuite/**" />
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
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_jdk17>
|
||||
|
||||
# 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/jdk17" />
|
||||
|
||||
<!-- 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 17 is required. Set the full path to this JDK home with the property 'com.mysql.cj.build.jdk'. Default: '/usr/lib/jvm/jdk17').">
|
||||
<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 "17" 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 17 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:17
|
||||
%endif
|
||||
|
||||
%if 0%{?sles12:1} || 0%{?sles15:1}
|
||||
-Requires: java-headless >= 1.8.0
|
||||
+Requires: java-headless >= 17
|
||||
%else
|
||||
-Requires: java-headless >= 1:1.8.0
|
||||
+Requires: java-headless >= 1:17
|
||||
%endif
|
||||
|
||||
%description
|
||||
|
|
@ -1,58 +1,27 @@
|
|||
|
||||
Summary: Official JDBC driver for MySQL
|
||||
Name: mysql-connector-java
|
||||
Version: 8.0.30
|
||||
Release: 8%{?dist}
|
||||
Epoch: 1
|
||||
License: GPL-2.0-only
|
||||
URL: http://dev.mysql.com/downloads/connector/j/
|
||||
Source0: %{name}-%{version}-nojars.tar.xz
|
||||
|
||||
# Mysql has a mirror redirector for its downloads
|
||||
# You can get this tarball by following a link from:
|
||||
# http://dev.mysql.com/get/Downloads/Connector-J/%%{name}-%%{version}.tar.gz
|
||||
#
|
||||
# OR
|
||||
# https://github.com/mysql/mysql-connector-j/archive/%%{version}.tar.gz
|
||||
# Following prebuilt jars and sources have been removed from the tarball:
|
||||
#
|
||||
# %%{name}-%%{version}-bin.jar
|
||||
# lib/c3p0-0.9.1-pre6.jar
|
||||
# lib/c3p0-0.9.1-pre6.src.zip
|
||||
# lib/jboss-common-jdbc-wrapper.jar
|
||||
# lib/jboss-common-jdbc-wrapper-src.jar
|
||||
# lib/protobuf-java-3.6.1.jar
|
||||
# lib/slf4j-api-1.6.1.jar
|
||||
#
|
||||
# See http://bugs.mysql.com/bug.php?id=28512 for details.
|
||||
|
||||
# To make it easier a script generate-tarball.sh has been created:
|
||||
# ./generate-tarball.sh version
|
||||
# will create a new tarball compressed with xz and without those jar files.
|
||||
Source1: generate-tarball.sh
|
||||
|
||||
Patch1: remove-coverage-test.patch
|
||||
Patch2: java-11-migration.patch
|
||||
Patch3: remove-authentication-plugin.patch
|
||||
Patch4: remove-StatementsTest.patch
|
||||
|
||||
BuildArch: noarch
|
||||
Name: mysql-connector-java
|
||||
Epoch: 1
|
||||
Version: 8.0.30
|
||||
Release: 8%{?dist}
|
||||
Summary: Official JDBC driver for MySQL
|
||||
License: GPL-2.0-only
|
||||
URL: https://dev.mysql.com/downloads/connector/j/
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
|
||||
BuildRequires: ant >= 1.6.0
|
||||
BuildRequires: ant-junit
|
||||
BuildRequires: apache-commons-logging
|
||||
BuildRequires: git
|
||||
BuildRequires: javassist
|
||||
BuildRequires: java-devel >= 1:1.6.0
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: junit5
|
||||
BuildRequires: protobuf-java
|
||||
BuildRequires: slf4j
|
||||
BuildRequires: java-17-openjdk-devel
|
||||
# Generated with generate-tarball.sh
|
||||
Source0: %{name}-%{version}-nojars.tar.xz
|
||||
Source1: generate-tarball.sh
|
||||
|
||||
Requires: slf4j
|
||||
Requires: java
|
||||
Patch: 0001-Remove-coverage-test.patch
|
||||
Patch: 0002-Remove-authentication-plugin.patch
|
||||
Patch: 0003-Remove-StatementsTest.patch
|
||||
Patch: 0004-Port-to-Java-21.patch
|
||||
|
||||
BuildRequires: javapackages-local-openjdk21
|
||||
BuildRequires: ant-junit5
|
||||
BuildRequires: javassist
|
||||
BuildRequires: protobuf-java
|
||||
BuildRequires: slf4j
|
||||
|
||||
%description
|
||||
MySQL Connector/J is a native Java driver that converts JDBC (Java Database
|
||||
|
|
@ -64,27 +33,8 @@ IV JDBC driver and has a complete JDBC feature set that supports the
|
|||
capabilities of MySQL.
|
||||
|
||||
%prep
|
||||
%setup -q -n mysql-connector-j-%{version}
|
||||
|
||||
# fix line endings
|
||||
for file in README README.md; do
|
||||
sed -i.orig 's|\r||g' $file
|
||||
touch -r $file.orig $file
|
||||
rm $file.orig
|
||||
done
|
||||
|
||||
%autosetup -p1 -C
|
||||
sed -i 's/>@.*</>%{version}</' src/build/misc/pom.xml
|
||||
|
||||
%patch 1 -p1
|
||||
%patch 2 -p1
|
||||
%patch 3 -p1
|
||||
%patch 4 -p1
|
||||
|
||||
%build
|
||||
|
||||
# We need both JDK1.5 (for JDBC3.0; appointed by $JAVA_HOME) and JDK1.6 (for JDBC4.0; appointed in the build.xml)
|
||||
export CLASSPATH=$(build-classpath jdbc-stdext junit slf4j commons-logging.jar)
|
||||
|
||||
# We currently need to disable jboss integration because of missing jboss-common-jdbc-wrapper.jar (built from sources).
|
||||
# See BZ#480154 and BZ#471915 for details.
|
||||
rm -rf src/main/user-impl/java/com/mysql/cj/jdbc/integration/jboss
|
||||
|
|
@ -92,7 +42,8 @@ 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-17-openjdk \
|
||||
%build
|
||||
ant -Dcom.mysql.cj.build.jdk=%{java_home} \
|
||||
-Dcom.mysql.cj.extra.libs=%{_javadir} \
|
||||
test dist
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue