Michal Vyskocil 2012-06-18 13:16:55 +00:00 committed by Git OBS Bridge
parent 1a8db28968
commit 531bbe3605
7 changed files with 136 additions and 1473 deletions

View File

@ -0,0 +1,81 @@
diff -Naur mysql-connector-java-5.1.17.orig/src/com/mysql/jdbc/JDBC4Connection.java mysql-connector-java-5.1.17/src/com/mysql/jdbc/JDBC4Connection.java
--- mysql-connector-java-5.1.17.orig/src/com/mysql/jdbc/JDBC4Connection.java 2011-07-04 10:24:08.000000000 -0400
+++ mysql-connector-java-5.1.17/src/com/mysql/jdbc/JDBC4Connection.java 2012-05-03 18:03:28.311324320 -0400
@@ -28,9 +28,11 @@
import java.sql.Clob;
import java.sql.SQLClientInfoException;
import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
import java.sql.SQLXML;
import java.sql.NClob;
import java.sql.Struct;
+import java.util.concurrent.Executor;
import java.util.Properties;
import java.util.TimerTask;
@@ -234,4 +236,25 @@
return this.infoProvider;
}
+
+ public int getNetworkTimeout() throws SQLException {
+ throw new SQLFeatureNotSupportedException("Not supported");
+ }
+
+ public void setNetworkTimeout(Executor executor, int millis) throws SQLException {
+ throw new SQLFeatureNotSupportedException("Not supported");
+ }
+
+ public void abort(Executor executor) throws SQLException {
+ throw new SQLFeatureNotSupportedException("Not supported");
+ }
+
+ public String getSchema() throws SQLException {
+ throw new SQLFeatureNotSupportedException("Not supported");
+ }
+
+ public void setSchema(String schema) throws SQLException {
+ throw new SQLFeatureNotSupportedException("Not supported");
+ }
+
}
diff -Naur mysql-connector-java-5.1.17.orig/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java mysql-connector-java-5.1.17/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java
--- mysql-connector-java-5.1.17.orig/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java 2011-07-04 10:24:08.000000000 -0400
+++ mysql-connector-java-5.1.17/src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java 2012-05-03 18:03:28.312324397 -0400
@@ -29,9 +29,11 @@
import java.sql.Clob;
import java.sql.SQLClientInfoException;
import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
import java.sql.SQLXML;
import java.sql.NClob;
import java.sql.Struct;
+import java.util.concurrent.Executor;
import java.util.Properties;
import java.util.TimerTask;
@@ -129,4 +131,24 @@
return this.getJDBC4Connection().getClientInfoProviderImpl();
}
+
+ public int getNetworkTimeout() throws SQLException {
+ throw new SQLFeatureNotSupportedException("Not supported");
+ }
+
+ public void setNetworkTimeout(Executor executor, int millis) throws SQLException {
+ throw new SQLFeatureNotSupportedException("Not supported");
+ }
+
+ public void abort(Executor executor) throws SQLException {
+ throw new SQLFeatureNotSupportedException("Not supported");
+ }
+
+ public String getSchema() throws SQLException {
+ throw new SQLFeatureNotSupportedException("Not supported");
+ }
+
+ public void setSchema(String schema) throws SQLException {
+ throw new SQLFeatureNotSupportedException("Not supported");
+ }
}

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6690c7895dad63bf2c81c62865ff123f607c27cd3086c982692f8f81942decfd
size 2054192
oid sha256:5715fe210ad0d6ff606841b65ea02840babbf4d0c881e30478d2f9bcb6762420
size 1307836

View File

@ -1,60 +0,0 @@
# This patch was taken from Debian package libmysql-java. It disables JDBC 4 support.
Index: build.xml
===================================================================
--- build.xml.orig 2012-04-25 11:15:50.608856591 +0200
+++ build.xml 2012-04-25 15:52:16.992070845 +0200
@@ -135,7 +135,7 @@
</if>
</target>
- <target name="init" depends="-compiler-check, -init-copy, -init-no-crypto">
+ <target name="init" depends="-init-copy, -init-no-crypto">
<!-- We need the following for source distributions as there we
can't dynamically alter the classpath, and not having this
directory present causes the build to fail -->
@@ -429,7 +429,7 @@
<section name="common">
<attribute name="Specification-Title" value="JDBC" />
- <attribute name="Specification-Version" value="4.0" />
+ <attribute name="Specification-Version" value="3.0" />
<attribute name="Specification-Vendor" value="Sun Microsystems Inc." />
<attribute name="Implementation-Title" value="MySQL Connector/J" />
<attribute name="Implementation-Version" value="${full.version}" />
@@ -756,12 +756,12 @@
</target>
- <target name="compile" depends="init, compile-driver, compile-testsuite, compile.integration">
+ <target name="compile" depends="init, compile-driver, compile.integration">
</target>
<!-- Compiles the driver itself -->
- <target name="compile-driver" depends="compile-driver-jdbc3, compile-driver-jdbc4" />
+ <target name="compile-driver" depends="compile-driver-jdbc3" />
<target name="compile-driver-jdbc3" depends="init, -clean-output">
<javac sourcepath="" srcdir="${buildDir}/${fullProdName}"
@@ -787,6 +787,8 @@
fork="yes"
executable="${com.mysql.jdbc.java6.javac}"
compiler="modern"
+ source="1.5"
+ tartget="1.5"
sourcepath="" srcdir="${buildDir}/${fullProdName}"
bootclasspath="${com.mysql.jdbc.java6.rtjar}">
<include name="**/JDBC4*.java" />
Index: src/com/mysql/jdbc/Util.java
===================================================================
--- src/com/mysql/jdbc/Util.java.orig 2012-04-25 15:51:26.894312592 +0200
+++ src/com/mysql/jdbc/Util.java 2012-04-25 15:52:38.843837776 +0200
@@ -105,7 +105,7 @@
try {
Class.forName("java.sql.NClob");
- isJdbc4 = true;
+ isJdbc4 = false;
} catch (Throwable t) {
isJdbc4 = false;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +0,0 @@
Index: mysql-connector-java-5.1.19/README.txt
===================================================================
--- mysql-connector-java-5.1.19.orig/README.txt 2012-04-02 10:14:19.000000000 +0200
+++ mysql-connector-java-5.1.19/README.txt 2012-05-04 14:46:08.868387250 +0200
@@ -48,12 +48,11 @@
* Third-Party Component Notices
DOCUMENTATION LOCATION
-
-The documentation formerly contained in this file has moved
-into the 'doc' directory, where it is available in HTML, PDF
-and plaintext forms.
-You may also find the latest copy of the documentation on
+Due the license issues SUSE is no longer beeing able to redistribute the
+documentation.
+
+You may find the latest copy of the documentation on
the MySQL website at
http://dev.mysql.com/doc/refman/5.1/en/connector-j.html

View File

@ -1,78 +0,0 @@
-------------------------------------------------------------------
Fri May 4 12:48:41 UTC 2012 - mvyskocil@suse.cz
- remove the docs/ from source tarball due license issues
-------------------------------------------------------------------
Fri Apr 27 09:54:08 UTC 2012 - mvyskocil@suse.cz
- update to 5.1.19
* plugable authentication via com.mysql.jdbc.AuthenticationPlugin
* retrieve servet charset name using index
* ability to determine if the connection is against server on the same host
* added slf4j logging adapter
* and many more features and bugfixes
- removed -javadoc patch and package
- add maven pom
-------------------------------------------------------------------
Thu Sep 11 10:23:35 CEST 2008 - anosek@suse.cz
- updated to version 5.1.6
- introduces driver which conforms to the JDBC 4.0 specifications.
However this was disabled because of missing dependencies
- dropped obsoleted patch (build_xml.patch)
- added patch (disableJDBC4.patch) taken from Debian
-------------------------------------------------------------------
Thu Aug 7 09:46:22 CEST 2008 - mvyskocil@suse.cz
- update to the 5.0.8 (improved spec from jpackage.org)
- fix of [bnc#99151]
- added two new subpackages (javadoc and manual)
- removed the dependency on jboss4
- add a support for build with java6 and java5 together (ia64 build fix)
- use source="1.5" and target="1.5"
-------------------------------------------------------------------
Thu Jul 17 07:54:00 CEST 2008 - coolo@suse.de
- trying to avoid another build cycle
-------------------------------------------------------------------
Wed Sep 27 15:50:56 CEST 2006 - skh@suse.de
- don't use icecream
- use source="1.4" and target="1.4" for build with java 1.5
-------------------------------------------------------------------
Tue Feb 7 09:54:31 CET 2006 - jsmeix@suse.de
- Current version 3.1.12 from JPackage.org
-------------------------------------------------------------------
Wed Jan 25 21:47:09 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Thu Jul 28 16:49:05 CEST 2005 - jsmeix@suse.de
- Adjustments in the spec file.
-------------------------------------------------------------------
Mon Jul 18 16:52:27 CEST 2005 - jsmeix@suse.de
- Current version 3.1.8 from JPackage.org
-------------------------------------------------------------------
Fri Feb 18 18:03:35 CET 2005 - skh@suse.de
- update to version 3.1.6
- don't use icecream
-------------------------------------------------------------------
Thu Sep 2 18:26:14 CEST 2004 - skh@suse.de
- Initial package created with version 3.0.11 (JPackage 1.5)

View File

@ -17,45 +17,45 @@
# icecream 0
%define section free
%define builddir build-mysql-jdbc
%define distdir dist-mysql-jdbc
%define with_jboss4 0
Name: mysql-connector-java
Version: 5.1.19
Release: 0
Summary: Official JDBC Driver for MySQL
License: GPL-2.0+
Group: Development/Libraries/Java
Version: 5.1.19
Release: 0
Url: http://www.mysql.com/downloads/api-jdbc-stable.html
# 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 %{name}-%{version}/%{name}-%{version}-bin.jar
# rm -rf %{name}-%{version}/docs
# find %{name}-%{version} -name '*jar' -delete
# tar -xJf %{name}-%{version}-suse.tar.xz
Source0: %{name}-%{version}-suse.tar.xz
Patch2: %{name}-5.1.6-java6-compatibility.patch
Patch3: %{name}-5.1.6-disableJDBC4.patch
#PATCH-FIX-SUSE: inform users about fact the documentation is not distributed anymore
Patch4: mysql-connector-java-suse-docs.patch
Url: http://www.mysql.com/downloads/api-jdbc-stable.html
# Patch to build with JDBC 4.1/Java 7
Patch0: mysql-connector-java-5.1.19-java7.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: ant
BuildRequires: ant-contrib
BuildRequires: apache-commons-logging
BuildRequires: java-1_5_0-gcj-compat-devel
BuildRequires: java-devel
BuildRequires: jta
BuildRequires: junit
BuildRequires: slf4j
#!BuildIgnore: maven2-bootstrap
%if %{with_jboss4}
BuildRequires: jboss4-common
BuildRequires: jboss4-connector
%endif
BuildRequires: jpackage-utils
BuildRequires: junit
BuildRequires: log4j-mini
Requires: jta >= 1.0
Requires: log4j
Requires: slf4j
Provides: mm.mysql = %{version}
Obsoletes: mm.mysql < %{version}
# manual is no longer distributed
Provides: %{name}-manual = %{version}
Obsoletes: %{name}-manual < %{version}
@ -71,18 +71,7 @@ set that supports the capabilities of MySQL.
%prep
%setup -q -n %{name}-%{version}
# patch only for javac 1.6.0
if [[ "$(javac -version 2>&1 | grep '1\.6\.0')" != "" ]]; then
%patch2 -b .sav2
fi
%patch3
%patch4 -p1
# remove all binary libs
find . \( -name "*.jar" -o -name "*.class" \) | xargs -t %{__rm} -f
%if ! %{with_jboss4}
rm -r src/com/mysql/jdbc/integration/jboss/
rm -r src/testsuite/regression/DataSourceRegressionTest.java
%endif
%patch0 -p1
# dup
rm -f README
@ -90,34 +79,38 @@ rm -f README
sed -i -e 's/.$//' README.txt
%build
# jboss jars needed for test suite
export CLASSPATH="$(build-classpath ant-contrib \
commons-logging slf4j \
%if %{with_jboss4}
jboss4/jboss-common-jdbc-wrapper \
%endif
jdbc-stdext jta \
junit log4j xml-commons-jaxp-1.3-apis)"
ant -Dant.build.javac.source=1.6 \
-Dant.build.javac.target=1.6 \
-DbuildDir="%{builddir}" \
-DdistDir="%{distdir}" \
# 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
export CLASSPATH=$(build-classpath \
ant-contrib \
commons-logging \
slf4j \
jdbc-stdext\
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 -DbuildDir=build-mysql-jdbc \
-DdistDir=dist-mysql-jdbc \
-Dcom.mysql.jdbc.java6.javac="%{javac}" \
-Dcom.mysql.jdbc.java6.rtjar="%{java_home}/jre/lib/rt.jar" \
dist
-Dcom.mysql.jdbc.java6.java="%{java}" \
-Dcom.mysql.jdbc.java6.rtjar"=%{java_home}/jre/lib/rt.jar"
%install
install -d -m 755 %{buildroot}%{_javadir}
install ./build-mysql-jdbc/%{name}-%{version}-SNAPSHOT/%{name}-%{version}-SNAPSHOT-bin.jar \
%{buildroot}%{_javadir}/%{name}-%{version}.jar
%{buildroot}%{_javadir}/%{name}.jar
(
cd %{buildroot}%{_javadir} && \
for jar in *-%{version}*.jar; do
%{__ln_s} -f ${jar} `echo $jar | %{__sed} "s|-%{version}||g"`
done
)
rm -rf %{buildroot}%{name}-%{version}/docs/release-test-output
# Install the Maven build information
@ -127,13 +120,19 @@ sed -i 's/>@.*</>%{version}</' %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_to_maven_depmap mysql %{name} %{version} JPP %{name}
%post
%update_maven_depmap
%postun
%update_maven_depmap
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files
%defattr(0644,root,root,0755)
%doc CHANGES COPYING
%attr(0644,root,root) %{_javadir}/*.jar
%doc CHANGES COPYING README.txt
%attr(0644,root,root) %{_javadir}/%{name}.jar
%config(noreplace) %{_mavendepmapfragdir}/*
%{_mavenpomdir}/*.pom