forked from pool/mysql-connector-java
- Drop patch use-classpath-in-tests.patch
- Add patch disabling testsuite: * disable-testsuite.patch - Drop patch extra-libs-build.patch: * Rather use the thing to propagate some wrongly found libs - Drop patch no-jdk5-requirement.patch: * Simply override the value in ant command - Add patch hibernate-check.patch to remove hibernate check OBS-URL: https://build.opensuse.org/package/show/Java:packages/mysql-connector-java?expand=0&rev=36
This commit is contained in:
parent
1a9cfd5f88
commit
81bd08a58f
19
disable-testsuite.patch
Normal file
19
disable-testsuite.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
From: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
|
||||||
|
Date: Thu, 25 Aug 2011 10:44:00 +0200
|
||||||
|
Subject: [PATCH] disable testsuite
|
||||||
|
|
||||||
|
---
|
||||||
|
build.xml | 2 +-
|
||||||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
--- a/build.xml
|
||||||
|
+++ b/build.xml
|
||||||
|
@@ -835,7 +835,7 @@
|
||||||
|
<!-- Compile the driver including JDBC 3 and JDBC 4+ implementations, JUnit test suite and 'helpers' for third-party software. -->
|
||||||
|
<target name="compile"
|
||||||
|
description="Compiles driver including JDBC 3 and JDBC 4+ implementations, JUnit test suite and integration 'helpers' for third-party software."
|
||||||
|
- depends="init, compile-driver, compile-testsuite, compile-integration" />
|
||||||
|
+ depends="init, compile-driver, compile-integration" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Compile the driver including JDBC 3 and JDBC 4+ implementations only. -->
|
@ -1,66 +0,0 @@
|
|||||||
Index: mysql-connector-java-5.1.42/build.xml
|
|
||||||
===================================================================
|
|
||||||
--- mysql-connector-java-5.1.42.orig/build.xml
|
|
||||||
+++ mysql-connector-java-5.1.42/build.xml
|
|
||||||
@@ -513,7 +513,7 @@ Java 8 (for JDBC 4+ implementation) is a
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Add commercial license configuration class (Build). -->
|
|
||||||
- <target name="-init-filter-license" depends="-extra-libs-check, -init-copy" if="com.mysql.jdbc.filterLicense">
|
|
||||||
+ <target name="-init-filter-license" depends="-init-copy" if="com.mysql.jdbc.filterLicense">
|
|
||||||
<copy file="${com.mysql.jdbc.extra.libs}/CommercialLicenseConfiguration.notjava"
|
|
||||||
toFile="${buildDir}/${fullProdName}/com/mysql/jdbc/LicenseConfiguration.java"
|
|
||||||
overwrite="true" />
|
|
||||||
@@ -521,7 +521,7 @@ Java 8 (for JDBC 4+ implementation) is a
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Add no-crypto export control class (Build). -->
|
|
||||||
- <target name="-init-no-crypto" depends="-extra-libs-check, -init-copy" if="com.mysql.jdbc.noCryptoBuild">
|
|
||||||
+ <target name="-init-no-crypto" depends="-init-copy" if="com.mysql.jdbc.noCryptoBuild">
|
|
||||||
<copy file="${com.mysql.jdbc.extra.libs}/ExportControlledNoCrypto.notjava"
|
|
||||||
toFile="${buildDir}/${fullProdName}/com/mysql/jdbc/ExportControlled.java"
|
|
||||||
overwrite="true" />
|
|
||||||
@@ -529,7 +529,7 @@ Java 8 (for JDBC 4+ implementation) is a
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Copy commercial license configuration class (Package). -->
|
|
||||||
- <target name="-copy-filter-license" depends="-extra-libs-check, -init-copy" if="com.mysql.jdbc.filterLicense">
|
|
||||||
+ <target name="-copy-filter-license" depends="-init-copy" if="com.mysql.jdbc.filterLicense">
|
|
||||||
<copy file="${com.mysql.jdbc.extra.libs}/CommercialLicenseConfiguration.notjava"
|
|
||||||
toFile="${packageDest}/src/com/mysql/jdbc/LicenseConfiguration.java"
|
|
||||||
overwrite="true" />
|
|
||||||
@@ -537,7 +537,7 @@ Java 8 (for JDBC 4+ implementation) is a
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Copy no-crypto export control class (Package). -->
|
|
||||||
- <target name="-copy-no-crypto" depends="-extra-libs-check, -init-copy" if="com.mysql.jdbc.noCryptoBuild">
|
|
||||||
+ <target name="-copy-no-crypto" depends="-init-copy" if="com.mysql.jdbc.noCryptoBuild">
|
|
||||||
<copy file="${com.mysql.jdbc.extra.libs}/ExportControlledNoCrypto.notjava"
|
|
||||||
toFile="${packageDest}/src/com/mysql/jdbc/ExportControlled.java"
|
|
||||||
overwrite="true" />
|
|
||||||
@@ -545,7 +545,7 @@ Java 8 (for JDBC 4+ implementation) is a
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Copy README-commercial info (Package). -->
|
|
||||||
- <target name="-copy-readme-commercial" depends="-extra-libs-check, -init-copy" if="com.mysql.jdbc.commercialBuild">
|
|
||||||
+ <target name="-copy-readme-commercial" depends="-init-copy" if="com.mysql.jdbc.commercialBuild">
|
|
||||||
<copy file="${com.mysql.jdbc.extra.libs}/README-commercial" tofile="${packageDest}/README.txt" filtering="true">
|
|
||||||
<filterset refid="versionFilterset" />
|
|
||||||
<filterset refid="licenseFilterset" />
|
|
||||||
@@ -564,7 +564,7 @@ Java 8 (for JDBC 4+ implementation) is a
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Copy LICENCE.mysql and replace license commercial headers (Package). -->
|
|
||||||
- <target name="-replace-license-commercial" depends="-extra-libs-check, -init-copy" if="com.mysql.jdbc.commercialBuild">
|
|
||||||
+ <target name="-replace-license-commercial" depends="-init-copy" if="com.mysql.jdbc.commercialBuild">
|
|
||||||
<delete file="${packageDest}/COPYING" />
|
|
||||||
<copy file="${com.mysql.jdbc.extra.libs}/LICENSE.mysql" toDir="${packageDest}" />
|
|
||||||
|
|
||||||
@@ -860,6 +860,7 @@ Java 8 (for JDBC 4+ implementation) is a
|
|
||||||
source="1.5"
|
|
||||||
target="1.5">
|
|
||||||
<include name="**/*.java" />
|
|
||||||
+ <exclude name="demo/**" />
|
|
||||||
<exclude name="testsuite/**" />
|
|
||||||
<exclude name="com/mysql/jdbc/integration/**" />
|
|
||||||
<exclude name="com/mysql/jdbc/log/Log4JLogger.java" />
|
|
32
hibernate-check.patch
Normal file
32
hibernate-check.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
Description: Do not compile MultiTenantConnectionProvider since it requires Hibernate 4 which isn't in Debian yet
|
||||||
|
Author: Emmanuel Bourg <ebourg@apache.org>
|
||||||
|
Forwarded: not-needed
|
||||||
|
--- a/build.xml
|
||||||
|
+++ b/build.xml
|
||||||
|
@@ -244,6 +244,7 @@
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
</fail>
|
||||||
|
+<!--
|
||||||
|
<fail message="Hibernate libraries, required for build tasks, must be in the directory '${com.mysql.jdbc.extra.libs}/hibernate4'.">
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
@@ -251,6 +252,7 @@
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
</fail>
|
||||||
|
+-->
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -889,8 +891,10 @@
|
||||||
|
bootclasspath="${com.mysql.jdbc.jre6.rtjar}"
|
||||||
|
source="1.6"
|
||||||
|
target="1.6">
|
||||||
|
+<!--
|
||||||
|
<include name="**/FabricMultiTenantConnectionProvider.java" />
|
||||||
|
<include name="**/HibernateFabric.java" />
|
||||||
|
+-->
|
||||||
|
<include name="**/JDBC4*.java" />
|
||||||
|
<exclude name="**/JDBC42*.java" />
|
||||||
|
<include name="com/mysql/jdbc/exceptions/jdbc4/*" />
|
@ -1,16 +1,14 @@
|
|||||||
Index: mysql-connector-java-5.1.42/build.xml
|
Description: Disable the JDK check
|
||||||
===================================================================
|
Author: Emmanuel Bourg <ebourg@apache.org>
|
||||||
--- mysql-connector-java-5.1.42.orig/build.xml
|
Forwarded: not-needed
|
||||||
+++ mysql-connector-java-5.1.42/build.xml
|
--- a/build.xml
|
||||||
@@ -303,10 +303,7 @@ Java 8 (for JDBC 4+ implementation) is a
|
+++ b/build.xml
|
||||||
<fail message="Java 8 (for JDBC 4+ implementation) is required. Set the full path to this JDK home with the property 'com.mysql.jdbc.jdk8'. Default: '/usr/lib/jvm/jdk1.8'.">
|
@@ -415,7 +415,7 @@
|
||||||
<condition>
|
|
||||||
<not>
|
|
||||||
- <and>
|
<!-- Prepares files and settings for compiling driver. -->
|
||||||
- <equals arg1="${jdk8checkexitstatus}" arg2="0" />
|
- <target name="init" depends="-compiler-check, -init-copy, -init-filter-license, -init-no-crypto">
|
||||||
- <contains string="${com.mysql.jdbc.jdk8.version}" substring="java version "1.8" casesensitive="true" />
|
+ <target name="init" depends="-init-copy, -init-filter-license, -init-no-crypto">
|
||||||
- </and>
|
<!-- The following is needed for source distributions as the classpath can't be dynamically altered, and not having this directory present causes the
|
||||||
+ <equals arg1="${jdk8checkexitstatus}" arg2="0" />
|
build to fail. -->
|
||||||
</not>
|
<available file="${com.mysql.jdbc.docs.sourceDir}" property="com.mysql.jdbc.docs.sourcesPresent" />
|
||||||
</condition>
|
|
||||||
</fail>
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 18 11:55:03 UTC 2017 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Drop patch use-classpath-in-tests.patch
|
||||||
|
- Add patch disabling testsuite:
|
||||||
|
* disable-testsuite.patch
|
||||||
|
- Drop patch extra-libs-build.patch:
|
||||||
|
* Rather use the thing to propagate some wrongly found libs
|
||||||
|
- Drop patch no-jdk5-requirement.patch:
|
||||||
|
* Simply override the value in ant command
|
||||||
|
- Add patch hibernate-check.patch to remove hibernate check
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 18 10:42:07 UTC 2017 - tchvatal@suse.com
|
Thu May 18 10:42:07 UTC 2017 - tchvatal@suse.com
|
||||||
|
|
||||||
|
@ -27,16 +27,10 @@ Source0: %{name}-%{version}-suse.tar.xz
|
|||||||
# Script to repack upstream tarball
|
# Script to repack upstream tarball
|
||||||
# ./generate-tarball.sh VERSION
|
# ./generate-tarball.sh VERSION
|
||||||
Source99: generate-tarball.sh
|
Source99: generate-tarball.sh
|
||||||
# PATCH-FIX-SUSE: relax the check for java compiler
|
|
||||||
Patch0: javac-check.patch
|
Patch0: javac-check.patch
|
||||||
# PATCH-FIX-UPSTREAM: do not require hibernate4 to actually just build
|
Patch1: hibernate-check.patch
|
||||||
Patch1: extra-libs-build.patch
|
Patch2: mysql-connector-java-jdbc-4.1.patch
|
||||||
# PATCH-FIX-SUSE: do not build jdbc3 driver needing too old java
|
Patch3: disable-testsuite.patch
|
||||||
Patch2: no-jdk5-requirement.patch
|
|
||||||
# PATCH-FIX-UPSTREAM: build with jdbc4.1 and also with new javac
|
|
||||||
Patch3: mysql-connector-java-jdbc-4.1.patch
|
|
||||||
# PATCH-FIX-UPSTREAM: do not lose classpath during tests build
|
|
||||||
Patch4: use-classpath-in-tests.patch
|
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
BuildRequires: ant-contrib
|
BuildRequires: ant-contrib
|
||||||
BuildRequires: apache-commons-logging
|
BuildRequires: apache-commons-logging
|
||||||
@ -69,17 +63,22 @@ set that supports the capabilities of MySQL.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
# dup
|
# dup
|
||||||
rm -f README
|
rm -f README
|
||||||
# wrong end of line encoding
|
# wrong end of line encoding
|
||||||
sed -i -e 's/.$//' README.txt
|
sed -i -e 's/.$//' README.txt
|
||||||
|
|
||||||
|
# extra libs
|
||||||
|
mkdir -p lib
|
||||||
|
mkdir -p src/lib
|
||||||
|
ln -f -s /usr/share/java/ant/ant-contrib.jar lib/ant-contrib.jar
|
||||||
|
ln -f -s /usr/share/java/slf4j/api.jar lib/slf4j-api.jar
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# disable jboss integration
|
# disable jboss integration
|
||||||
rm -rf src/com/mysql/jdbc/integration/jboss
|
rm -rf src/com/mysql/jdbc/integration/jboss
|
||||||
@ -100,9 +99,11 @@ export CLASSPATH=$(build-classpath \
|
|||||||
junit \
|
junit \
|
||||||
log4j)
|
log4j)
|
||||||
ant \
|
ant \
|
||||||
-Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
|
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
|
||||||
-DbuildDir=build-mysql-jdbc \
|
-DbuildDir=build-mysql-jdbc \
|
||||||
-DdistDir=dist-mysql-jdbc \
|
-DdistDir=dist-mysql-jdbc \
|
||||||
|
-Dcom.mysql.jdbc.extra.libs=lib \
|
||||||
|
-Dcom.mysql.jdbc.jdk5.javac="%{javac}" \
|
||||||
-Dcom.mysql.jdbc.jdk8.javac="%{javac}" \
|
-Dcom.mysql.jdbc.jdk8.javac="%{javac}" \
|
||||||
-Dcom.mysql.jdbc.jdk8.java="%{java}" \
|
-Dcom.mysql.jdbc.jdk8.java="%{java}" \
|
||||||
dist
|
dist
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
Index: mysql-connector-java-5.1.42/build.xml
|
|
||||||
===================================================================
|
|
||||||
--- mysql-connector-java-5.1.42.orig/build.xml
|
|
||||||
+++ mysql-connector-java-5.1.42/build.xml
|
|
||||||
@@ -255,7 +255,7 @@ com.mysql.jdbc.noCleanBetweenCompiles=ye
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Check for required JDKs for compilation. -->
|
|
||||||
- <target name="-compiler-check" depends="-jdk5-check, -jdk8-check, -jre6-rtjar-check" />
|
|
||||||
+ <target name="-compiler-check" depends="-jdk8-check, -jre6-rtjar-check" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Check for required JDK5 for compilation of JDBC 3 implementation. -->
|
|
||||||
@@ -854,7 +854,7 @@ Java 8 (for JDBC 4+ implementation) is a
|
|
||||||
deprecation="off"
|
|
||||||
debug="${debug.enable}"
|
|
||||||
fork="yes"
|
|
||||||
- executable="${com.mysql.jdbc.jdk5.javac}"
|
|
||||||
+ executable="${com.mysql.jdbc.jdk8.javac}"
|
|
||||||
compiler="modern"
|
|
||||||
includeantruntime="false"
|
|
||||||
source="1.5"
|
|
||||||
@@ -929,7 +929,7 @@ Java 8 (for JDBC 4+ implementation) is a
|
|
||||||
deprecation="off"
|
|
||||||
debug="${debug.enable}"
|
|
||||||
fork="yes"
|
|
||||||
- executable="${com.mysql.jdbc.jdk5.javac}"
|
|
||||||
+ executable="${com.mysql.jdbc.jdk8.javac}"
|
|
||||||
compiler="modern"
|
|
||||||
includeantruntime="false"
|
|
||||||
source="1.5"
|
|
@ -1,12 +0,0 @@
|
|||||||
Index: mysql-connector-java-5.1.35/build.xml
|
|
||||||
===================================================================
|
|
||||||
--- mysql-connector-java-5.1.35.orig/build.xml
|
|
||||||
+++ mysql-connector-java-5.1.35/build.xml
|
|
||||||
@@ -191,6 +191,7 @@ com.mysql.jdbc.noCleanBetweenCompiles=ye
|
|
||||||
</fileset>
|
|
||||||
|
|
||||||
<pathelement location="${buildDir}/${fullProdName}" />
|
|
||||||
+ <pathelement path="${java.class.path}" />
|
|
||||||
</path>
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user