version update

This commit is contained in:
Tomas Repik 2016-09-14 12:49:59 +02:00
parent 81c78126ed
commit 6b074a1791
6 changed files with 73 additions and 9 deletions

3
.gitignore vendored
View File

@ -1 +1,4 @@
/1.3.7.tar.gz
/1.5.0-RC1.tar.gz
/*.src.rpm
/1.5.2.tar.gz

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,14 @@
Name: mariadb-java-client
Version: 1.4.6
Version: 1.5.2
Release: 1%{?dist}
Summary: Connects applications developed in Java to MariaDB and MySQL databases
# added BSD license because of https://bugzilla.redhat.com/show_bug.cgi?id=1291558#c13
License: BSD and LGPLv2+
URL: https://mariadb.com/kb/en/mariadb/about-mariadb-connector-j/
Source0: https://github.com/MariaDB/mariadb-connector-j/archive/%{version}.tar.gz
Patch0: remove_waffle-jna.patch
BuildArch: noarch
BuildRequires: maven-local
BuildRequires: mvn(net.java.dev.jna:jna)
@ -17,6 +18,8 @@ BuildRequires: mvn(com.google.code.maven-replacer-plugin:replacer)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
# since version 1.5.2 missing optional dependency
#BuildRequires: mvn(com.github.dblock.waffle:waffle-jna)
Requires: mariadb
@ -35,16 +38,18 @@ This package contains the API documentation for %{name}.
%setup -qn mariadb-connector-j-%{version}
# convert files from dos to unix line encoding
for file in README.md documentation/*.md; do
for file in README.md documentation/*.creole; do
sed -i.orig 's|\r||g' $file
touch -r $file.orig $file
rm $file.orig
done
# Fix BR
# net.java.dev.jna:jna:jar:platform:3.3.0
%pom_xpath_remove "pom:dependency[pom:classifier = 'platform']"
%pom_add_dep net.java.dev.jna:jna-platform:'${jna.version}' . "<optional>true</optional>"
# remove missing optional dependency waffle-jna
%pom_remove_dep com.github.dblock.waffle:waffle-jna
# also remove the file using the removed plugin
rm -f src/main/java/org/mariadb/jdbc/internal/packet/send/gssapi/WindowsNativeSspiAuthentication.java
# patch the sources so that the missing file is not making trouble
%patch0 -p1
%mvn_file org.mariadb.jdbc:%{name} %{name}
%mvn_alias org.mariadb.jdbc:%{name} mariadb:mariadb-connector-java
@ -99,8 +104,11 @@ rm src/main/resources/META-INF/MANIFEST.MF
%license LICENSE
%changelog
* Wed Sep 14 2016 Tomas Repik <trepik@redhat.com> - 1.5.2-1
- version update
* Tue Jun 21 2016 Tomas Repik <trepik@redhat.com> - 1.4.6-1
- update version
- version update
* Mon Apr 18 2016 Tomas Repik <trepik@redhat.com> - 1.4.2-1
- version update

53
remove_waffle-jna.patch Normal file
View File

@ -0,0 +1,53 @@
--- mariadb-connector-j-1.5.2/src/main/java/org/mariadb/jdbc/internal/packet/send/SendGssApiAuthPacket.java 2016-08-31 01:52:20.000000000 +0200
+++ SendGssApiAuthPacket.java 2016-09-14 12:12:17.784284202 +0200
@@ -55,7 +55,6 @@
import org.mariadb.jdbc.internal.packet.result.ErrorPacket;
import org.mariadb.jdbc.internal.packet.send.gssapi.GssapiAuth;
import org.mariadb.jdbc.internal.packet.send.gssapi.StandardGssapiAuthentication;
-import org.mariadb.jdbc.internal.packet.send.gssapi.WindowsNativeSspiAuthentication;
import org.mariadb.jdbc.internal.stream.PacketOutputStream;
import org.mariadb.jdbc.internal.util.buffer.Buffer;
import org.mariadb.jdbc.internal.util.dao.QueryException;
@@ -85,7 +84,7 @@
String mechanisms = buffer.readString(Charset.forName("UTF-8"));
if (mechanisms.equals("")) mechanisms = "Kerberos";
- GssapiAuth gssapiAuth = getAuthenticationMethod();
+ GssapiAuth gssapiAuth = new StandardGssapiAuthentication(packetFetcher, packSeq);
gssapiAuth.authenticate(writer, serverPrincipalName, mechanisms);
}
@@ -103,33 +102,5 @@
throw new QueryException("Authentication exception", 1045, "28000", e);
}
}
-
- /**
- * Get authentication method according to classpath.
- * Windows native authentication is using Waffle-jna.
- *
- * @return authentication method
- */
- private GssapiAuth getAuthenticationMethod() {
- try {
- //Waffle-jna has jna as dependency, so if not available on classpath, just use standard authentication
- Class platformClass = Class.forName("com.sun.jna.Platform");
- @SuppressWarnings("unchecked")
- Method method = platformClass.getMethod("isWindows");
- Boolean isWindows = (Boolean) method.invoke(platformClass);
- if (isWindows.booleanValue()) {
- try {
- Class.forName("waffle.windows.auth.impl.WindowsAuthProviderImpl");
- return new WindowsNativeSspiAuthentication(packetFetcher, packSeq);
- } catch (ClassNotFoundException cle) {
- //waffle not in the classpath
- }
- }
- } catch (Exception cle) {
- //jna jar's are not in classpath
- }
- return new StandardGssapiAuthentication(packetFetcher, packSeq);
- }
-
}

View File

@ -1 +1 @@
4636718798217a16b20beb7eec89ec57 1.3.7.tar.gz
8292a05e21a1bd2f5c29b66ff7ba4420 1.5.2.tar.gz