Accepting request 307056 from Java:packages
- Update to 5.1.35 (see CHANGES for full list of issues) bnc#927981 CVE-2015-2575: * http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1.html - Remove not applicable patch: * mysql-connector-java-7-jdbc-4.1.patch - Do not explicitely check for jdk6 but be happy with 7 and 8: * jdk6-check-use-jdk7.patch - Do not require hibernate4 to actually build: * extra-libs-build.patch - Do not build jdk5 depending jdbc3: * no-jdk5-requirement.patch - Add and rebase jdbc4.1 patch: * mysql-connector-java-jdbc-4.1.patch - Add new patch to build tests: * use-classpath-in-tests.patch OBS-URL: https://build.opensuse.org/request/show/307056 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mysql-connector-java?expand=0&rev=23
This commit is contained in:
commit
2ce62e4974
66
extra-libs-build.patch
Normal file
66
extra-libs-build.patch
Normal file
@ -0,0 +1,66 @@
|
||||
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
|
||||
@@ -449,7 +449,7 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
|
||||
|
||||
<!-- 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" />
|
||||
@@ -457,7 +457,7 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
|
||||
|
||||
<!-- 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" />
|
||||
@@ -465,7 +465,7 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
|
||||
|
||||
<!-- 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" />
|
||||
@@ -473,7 +473,7 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
|
||||
|
||||
<!-- 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" />
|
||||
@@ -481,7 +481,7 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
|
||||
|
||||
<!-- Copy README-commercial info (Package). -->
|
||||
- <target name="-copy-license-commercial" depends="-extra-libs-check, -init-copy" if="com.mysql.jdbc.commercialBuild">
|
||||
+ <target name="-copy-license-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" />
|
||||
@@ -500,7 +500,7 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
|
||||
|
||||
<!-- 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}" />
|
||||
|
||||
@@ -773,6 +773,7 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
compiler="modern"
|
||||
includeantruntime="false">
|
||||
<include name="**/*.java" />
|
||||
+ <exclude name="demo/**" />
|
||||
<exclude name="testsuite/**" />
|
||||
<exclude name="com/mysql/jdbc/integration/**" />
|
||||
<exclude name="com/mysql/jdbc/log/Log4JLogger.java" />
|
15
generate-tarball.sh
Normal file
15
generate-tarball.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
VERSION=$1
|
||||
|
||||
rm -rf mysql-connector-java-$VERSION
|
||||
|
||||
tar xfz mysql-connector-java-$VERSION.tar.gz || exit 1
|
||||
|
||||
find mysql-connector-java-$VERSION -name '*.jar' -exec rm {} \; -o -name '*.zip' -exec rm {} \;
|
||||
|
||||
tar cfJ mysql-connector-java-$VERSION-suse.tar.xz mysql-connector-java-$VERSION || exit 1
|
||||
|
||||
rm -rf mysql-connector-java-$VERSION
|
||||
|
||||
exit 0
|
16
jdk6-check-use-jdk7.patch
Normal file
16
jdk6-check-use-jdk7.patch
Normal file
@ -0,0 +1,16 @@
|
||||
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
|
||||
@@ -267,10 +267,7 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
<fail message="Java 6 (for JDBC4+ implementation) is required. Set the full path to this JDK home with the property 'com.mysql.jdbc.jdk6'. Default: '/usr/lib/jvm/jdk1.6'.">
|
||||
<condition>
|
||||
<not>
|
||||
- <and>
|
||||
- <equals arg1="${jdk6checkexitstatus}" arg2="0" />
|
||||
- <contains string="${com.mysql.jdbc.jdk6.version}" substring="java version "1.6" casesensitive="true" />
|
||||
- </and>
|
||||
+ <equals arg1="${jdk6checkexitstatus}" arg2="0" />
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:37a31f6afea8ce3b4c382dd0b0e93b284bdbb3e9c7180919581c0fbfdf551260
|
||||
size 1336544
|
3
mysql-connector-java-5.1.35-suse.tar.xz
Normal file
3
mysql-connector-java-5.1.35-suse.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9c2e0805b8e40d6b09b5dccfaf0f071d6e35470d7c392d019feddf885c1fe5d0
|
||||
size 1432996
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 21 15:22:44 UTC 2015 - tchvatal@suse.com
|
||||
|
||||
- Update to 5.1.35 (see CHANGES for full list of issues)
|
||||
bnc#927981 CVE-2015-2575:
|
||||
* http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1.html
|
||||
- Remove not applicable patch:
|
||||
* mysql-connector-java-7-jdbc-4.1.patch
|
||||
- Do not explicitely check for jdk6 but be happy with 7 and 8:
|
||||
* jdk6-check-use-jdk7.patch
|
||||
- Do not require hibernate4 to actually build:
|
||||
* extra-libs-build.patch
|
||||
- Do not build jdk5 depending jdbc3:
|
||||
* no-jdk5-requirement.patch
|
||||
- Add and rebase jdbc4.1 patch:
|
||||
* mysql-connector-java-jdbc-4.1.patch
|
||||
- Add new patch to build tests:
|
||||
* use-classpath-in-tests.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 18 09:46:18 UTC 2015 - tchvatal@suse.com
|
||||
|
||||
|
@ -17,32 +17,33 @@
|
||||
|
||||
|
||||
Name: mysql-connector-java
|
||||
Version: 5.1.25
|
||||
Version: 5.1.35
|
||||
Release: 0
|
||||
Summary: Official JDBC Driver for MySQL
|
||||
License: GPL-2.0+
|
||||
Group: Development/Libraries/Java
|
||||
Url: http://www.mysql.com/downloads/api-jdbc-stable.html
|
||||
# url-for-download: http://dev.mysql.com/get/Downloads/Connector-J/%{name}-%{version}.zip/from/pick#mirrors
|
||||
# docs are now under very strict proprietary license by Oracle, so lets not distribute them
|
||||
# remove bundled jars as well
|
||||
# tar -xf %{name}-%{version}.tar.gz
|
||||
# rm -rf %{name}-%{version}/docs
|
||||
# find %{name}-%{version} -name '*jar' -delete
|
||||
# tar -xJf %{name}-%{version}-suse.tar.xz
|
||||
Url: http://dev.mysql.com/downloads/connector/j/
|
||||
Source0: %{name}-%{version}-suse.tar.xz
|
||||
# Patch to build Java 7/jdbc 4.1
|
||||
Patch0: mysql-connector-java-7-jdbc-4.1.patch
|
||||
# Script to repack upstream tarball
|
||||
# ./generate-tarball.sh VERSION
|
||||
Source99: generate-tarball.sh
|
||||
# PATCH-FIX-UPSTREAM: do not strictly require jdk6 to compile
|
||||
Patch0: jdk6-check-use-jdk7.patch
|
||||
# PATCH-FIX-UPSTREAM: do not require hibernate4 to actually just build
|
||||
Patch1: extra-libs-build.patch
|
||||
# PATCH-FIX-SUSE: do not build jdbc3 driver needing too old java
|
||||
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-contrib
|
||||
BuildRequires: apache-commons-logging
|
||||
#BuildRequires: jta >= 1.0
|
||||
BuildRequires: geronimo-jta-1_1-api
|
||||
#BuildRequires: java-1_5_0-gcj-compat-devel
|
||||
BuildRequires: java-devel >= 1.6.0
|
||||
BuildRequires: javapackages-tools
|
||||
BuildRequires: junit
|
||||
#!BuildIgnore: maven2-bootstrap
|
||||
BuildRequires: log4j-mini
|
||||
BuildRequires: slf4j
|
||||
BuildRequires: xz
|
||||
@ -69,6 +70,10 @@ set that supports the capabilities of MySQL.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
# dup
|
||||
rm -f README
|
||||
@ -76,13 +81,15 @@ rm -f README
|
||||
sed -i -e 's/.$//' README.txt
|
||||
|
||||
%build
|
||||
|
||||
# disable jboss integration
|
||||
rm -rf src/com/mysql/jdbc/integration/jboss
|
||||
rm src/testsuite/regression/ConnectionRegressionTest.java
|
||||
rm src/testsuite/regression/DataSourceRegressionTest.java
|
||||
rm src/testsuite/simple/ReadOnlyCallableStatementTest.java
|
||||
rm src/testsuite/simple/jdbc4/StatementsTest.java
|
||||
# disable hibernate4 integration
|
||||
rm -rf src/com/mysql/fabric/hibernate
|
||||
rm -rf src/demo
|
||||
|
||||
export CLASSPATH=$(build-classpath \
|
||||
ant-contrib \
|
||||
@ -92,17 +99,12 @@ export CLASSPATH=$(build-classpath \
|
||||
jta \
|
||||
junit \
|
||||
log4j)
|
||||
|
||||
# we need jdk5 for jdbc3.0
|
||||
# XXX: JAVA_HOME must be setup **after** CLASSPATH
|
||||
#export JAVA_HOME=%{_libdir}/jvm/java-1.5.0-gcj
|
||||
ant \
|
||||
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
|
||||
-DbuildDir=build-mysql-jdbc \
|
||||
-DdistDir=dist-mysql-jdbc \
|
||||
-Dcom.mysql.jdbc.java6.javac="%{javac}" \
|
||||
-Dcom.mysql.jdbc.java6.java="%{java}" \
|
||||
-Dcom.mysql.jdbc.java6.rtjar"=%{java_home}/jre/lib/rt.jar"
|
||||
-Dcom.mysql.jdbc.jdk6.javac="%{javac}" \
|
||||
-Dcom.mysql.jdbc.jdk6.java="%{java}"
|
||||
|
||||
%install
|
||||
install -d -m 755 %{buildroot}%{_javadir}
|
||||
|
53
no-jdk5-requirement.patch
Normal file
53
no-jdk5-requirement.patch
Normal file
@ -0,0 +1,53 @@
|
||||
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
|
||||
@@ -219,7 +219,7 @@ com.mysql.jdbc.noCleanBetweenCompiles=ye
|
||||
|
||||
|
||||
<!-- Check for required JDKs for compilation. -->
|
||||
- <target name="-compiler-check" depends="-jdk5-check, -jdk6-check" />
|
||||
+ <target name="-compiler-check" depends="-jdk6-check" />
|
||||
|
||||
|
||||
<!-- Check for required JDK5 for compilation of JDBC3 implementation. -->
|
||||
@@ -756,7 +756,7 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
<!-- Compile the driver including JDBC3 and JDBC4+ implementations only. -->
|
||||
<target name="compile-driver"
|
||||
description="Compiles driver including JDBC3 and JDBC4+ implementations only."
|
||||
- depends="-compile-driver-jdbc3, -compile-driver-jdbc4" />
|
||||
+ depends="-compile-driver-jdbc4" />
|
||||
|
||||
|
||||
<!-- Compile JDBC3 implementation. -->
|
||||
@@ -787,7 +787,7 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
|
||||
|
||||
<!-- Compile JDBC4+ implementation. -->
|
||||
- <target name="-compile-driver-jdbc4" depends="-compile-driver-jdbc3">
|
||||
+ <target name="-compile-driver-jdbc4" depends="init, -clean-output">
|
||||
<echo>Compiling MySQL Connector/J JDBC4+ implementation with '${com.mysql.jdbc.jdk6}' to '${compiler.output}'</echo>
|
||||
|
||||
<javac sourcepath=""
|
||||
@@ -816,21 +816,6 @@ Java 6 (for JDBC4+ implementation) is al
|
||||
|
||||
<javac sourcepath=""
|
||||
srcdir="${buildDir}/${fullProdName}"
|
||||
- destdir="${compiler.output}"
|
||||
- deprecation="off"
|
||||
- debug="${debug.enable}"
|
||||
- fork="yes"
|
||||
- executable="${com.mysql.jdbc.jdk5.javac}"
|
||||
- compiler="modern"
|
||||
- includeantruntime="false">
|
||||
- <include name="testsuite/**" />
|
||||
- <exclude name="testsuite/requiresNonRedists/**" />
|
||||
- <exclude name="testsuite/**/jdbc4/**" />
|
||||
- <classpath refid="project.build.classpath" />
|
||||
- </javac>
|
||||
-
|
||||
- <javac sourcepath=""
|
||||
- srcdir="${buildDir}/${fullProdName}"
|
||||
destdir="${compiler.output}"
|
||||
deprecation="off"
|
||||
debug="${debug.enable}"
|
12
use-classpath-in-tests.patch
Normal file
12
use-classpath-in-tests.patch
Normal file
@ -0,0 +1,12 @@
|
||||
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…
Reference in New Issue
Block a user