diff --git a/.gitignore b/.gitignore index 5a7f3df..02478b1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1 @@ -mysql-connector-java-5.1.12.tar.xz -/mysql-connector-java-5.1.14.tar.xz -/mysql-connector-java-5.1.15.tar.gz -/mysql-connector-java-5.1.15.tar.xz /mysql-connector-java-5.1.17.tar.xz diff --git a/mysql-connector-java-jdbc-4.1.patch b/mysql-connector-java-jdbc-4.1.patch index 921f1f2..853fc8a 100644 --- a/mysql-connector-java-jdbc-4.1.patch +++ b/mysql-connector-java-jdbc-4.1.patch @@ -1,16 +1,60 @@ -diff -up ./src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java.sav ./src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java ---- ./src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java.sav 2012-01-25 14:43:27.000000000 -0500 -+++ ./src/com/mysql/jdbc/JDBC4LoadBalancedMySQLConnection.java 2012-01-25 14:48:52.000000000 -0500 -@@ -40,6 +40,8 @@ import com.mysql.jdbc.ConnectionImpl; - import com.mysql.jdbc.Messages; - import com.mysql.jdbc.SQLError; - -+import java.util.concurrent.Executor; +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; - public class JDBC4LoadBalancedMySQLConnection extends - LoadBalancedMySQLConnection implements JDBC4MySQLConnection { -@@ -129,4 +131,24 @@ public class JDBC4LoadBalancedMySQLConne +@@ -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(); } diff --git a/mysql-connector-java.spec b/mysql-connector-java.spec index a219f32..56d9b17 100644 --- a/mysql-connector-java.spec +++ b/mysql-connector-java.spec @@ -1,6 +1,6 @@ %global builddir build-mysql-jdbc %global distdir dist-mysql-jdbc -%global gcj_support 1 +%global gcj_support 0 %global java6_rtpath %{java_home}/jre/lib/rt.jar %global java6_javacpath /usr/bin/javac %global java6_javapath /usr/bin/javac @@ -8,7 +8,7 @@ Summary: Official JDBC driver for MySQL Name: mysql-connector-java Version: 5.1.17 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 # MySQL FLOSS Exception @@ -37,26 +37,30 @@ Source0: %{name}-%{version}.tar.xz Patch0: %{name}-jdbc-4.1.patch BuildRoot: %{_tmppath}/%{name}-%{epoch}-%{version}-%{release}-root-%(%{__id_u} -n) + +%if ! %{gcj_support} +BuildArch: noarch +%endif + %if %{gcj_support} BuildRequires: java-gcj-compat-devel >= 1.0.31 Requires(post): java-gcj-compat >= 1.0.31 Requires(postun): java-gcj-compat >= 1.0.31 -%else -BuildRequires: java-devel >= 1.4.2 -Requires: java >= 1.4.2 %endif -Requires: jta >= 1.0 -Requires: slf4j + +BuildRequires: java-devel >= 1:1.6.0 BuildRequires: ant >= 1.6.0 BuildRequires: ant-contrib >= 1.0 BuildRequires: jpackage-utils >= 1.6 BuildRequires: jta >= 1.0 BuildRequires: junit BuildRequires: slf4j -BuildRequires: java-devel >= 1:1.6.0 BuildRequires: java-1.5.0-gcj-devel BuildRequires: jakarta-commons-logging +Requires: java >= 1:1.6.0 +Requires: jta >= 1.0 +Requires: slf4j Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils @@ -79,7 +83,7 @@ rm README README.txt # fix line endings sed -i 's/\r//' docs/README.txt -%patch0 +%patch0 -p1 %build @@ -151,6 +155,12 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sat May 5 2012 Tom Lane 1:5.1.17-5 +- Switch to noarch (non-GCJ) build +Resolves: #688937, #819139 +- Fix mysql-connector-java-jdbc-4.1.patch to cover both driver classes +Related: #816696 + * Wed Jan 25 2012 Deepak Bhole - 1:5.1.17-4 - Removed java-1.6.0-openjdk-devel requirement