import mariadb-java-client-2.2.5-2.el8
This commit is contained in:
commit
5468c57a09
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/2.2.5.tar.gz
|
1
.mariadb-java-client.metadata
Normal file
1
.mariadb-java-client.metadata
Normal file
@ -0,0 +1 @@
|
||||
ecd339fcfe3e6e57852d6d7e631967a5898a9cf0 SOURCES/2.2.5.tar.gz
|
63
SOURCES/remove_waffle-jna.patch
Normal file
63
SOURCES/remove_waffle-jna.patch
Normal file
@ -0,0 +1,63 @@
|
||||
From d4d3f02f3b940693e99f065dd543e6bc03721f53 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Janco <jjanco@redhat.com>
|
||||
Date: Sat, 5 May 2018 15:37:06 +0200
|
||||
Subject: [PATCH] Remove WindowsNativeSspiAuthentication This dependency is
|
||||
optional and not in Fedora
|
||||
|
||||
---
|
||||
.../internal/com/send/SendGssApiAuthPacket.java | 26 +---------------------
|
||||
1 file changed, 1 insertion(+), 25 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/org/mariadb/jdbc/internal/com/send/SendGssApiAuthPacket.java b/src/main/java/org/mariadb/jdbc/internal/com/send/SendGssApiAuthPacket.java
|
||||
index 55771a61..d6a76979 100644
|
||||
--- a/src/main/java/org/mariadb/jdbc/internal/com/send/SendGssApiAuthPacket.java
|
||||
+++ b/src/main/java/org/mariadb/jdbc/internal/com/send/SendGssApiAuthPacket.java
|
||||
@@ -57,7 +57,6 @@ import org.mariadb.jdbc.internal.com.read.Buffer;
|
||||
import org.mariadb.jdbc.internal.com.read.ErrorPacket;
|
||||
import org.mariadb.jdbc.internal.com.send.gssapi.GssapiAuth;
|
||||
import org.mariadb.jdbc.internal.com.send.gssapi.StandardGssapiAuthentication;
|
||||
-import org.mariadb.jdbc.internal.com.send.gssapi.WindowsNativeSspiAuthentication;
|
||||
import org.mariadb.jdbc.internal.io.input.PacketInputStream;
|
||||
import org.mariadb.jdbc.internal.io.output.PacketOutputStream;
|
||||
|
||||
@@ -88,7 +87,7 @@ public class SendGssApiAuthPacket extends AbstractAuthSwitchSendResponsePacket i
|
||||
String mechanisms = buffer.readStringNullEnd(StandardCharsets.UTF_8);
|
||||
if (mechanisms.isEmpty()) mechanisms = "Kerberos";
|
||||
|
||||
- GssapiAuth gssapiAuth = getAuthenticationMethod();
|
||||
+ GssapiAuth gssapiAuth = new StandardGssapiAuthentication(reader, packSeq);
|
||||
gssapiAuth.authenticate(pos, serverPrincipalName, mechanisms);
|
||||
}
|
||||
|
||||
@@ -107,28 +106,5 @@ public class SendGssApiAuthPacket extends AbstractAuthSwitchSendResponsePacket i
|
||||
}
|
||||
}
|
||||
|
||||
- /**
|
||||
- * 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
|
||||
- if (Platform.isWindows()) {
|
||||
- try {
|
||||
- Class.forName("waffle.windows.auth.impl.WindowsAuthProviderImpl");
|
||||
- return new WindowsNativeSspiAuthentication(reader, packSeq);
|
||||
- } catch (ClassNotFoundException cle) {
|
||||
- //waffle not in the classpath
|
||||
- }
|
||||
- }
|
||||
- } catch (Throwable cle) {
|
||||
- //jna jar's are not in classpath
|
||||
- }
|
||||
- return new StandardGssapiAuthentication(reader, packSeq);
|
||||
- }
|
||||
-
|
||||
}
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
184
SPECS/mariadb-java-client.spec
Normal file
184
SPECS/mariadb-java-client.spec
Normal file
@ -0,0 +1,184 @@
|
||||
Name: mariadb-java-client
|
||||
Version: 2.2.5
|
||||
Release: 2%{?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
|
||||
|
||||
# optional dependency not in Fedora
|
||||
Patch0: remove_waffle-jna.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(net.java.dev.jna:jna)
|
||||
BuildRequires: mvn(net.java.dev.jna:jna-platform)
|
||||
BuildRequires: mvn(com.google.code.maven-replacer-plugin:replacer)
|
||||
# fedora 25
|
||||
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 (windows)
|
||||
#BuildRequires: mvn(com.github.dblock.waffle:waffle-jna)
|
||||
|
||||
Requires: mariadb
|
||||
|
||||
%description
|
||||
MariaDB Connector/J is a Type 4 JDBC driver, also known as the Direct to
|
||||
Database Pure Java Driver. It was developed specifically as a lightweight
|
||||
JDBC connector for use with MySQL and MariaDB database servers.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
|
||||
%description javadoc
|
||||
This package contains the API documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -qn mariadb-connector-j-%{version}
|
||||
|
||||
# convert files from dos to unix line encoding
|
||||
for file in README.md documentation/*.creole; do
|
||||
sed -i.orig 's|\r||g' $file
|
||||
touch -r $file.orig $file
|
||||
rm $file.orig
|
||||
done
|
||||
|
||||
# remove missing optional dependency waffle-jna
|
||||
%pom_remove_dep com.github.waffle:waffle-jna
|
||||
%pom_remove_dep com.zaxxer:HikariCP
|
||||
%pom_remove_dep ch.qos.logback:logback-classic
|
||||
# also remove the file using the removed plugin
|
||||
rm -f src/main/java/org/mariadb/jdbc/internal/com/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
|
||||
|
||||
%pom_remove_plugin org.apache.maven.plugins:maven-checkstyle-plugin
|
||||
%pom_remove_plugin org.apache.maven.plugins:maven-source-plugin
|
||||
%pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin
|
||||
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
|
||||
%pom_remove_plugin pl.project13.maven:git-commit-id-plugin
|
||||
%pom_remove_plugin -r :maven-gpg-plugin
|
||||
|
||||
# remove preconfigured OSGi manifest file and generate OSGi manifest file
|
||||
# with maven-bundle-plugin instead of using maven-jar-plugin
|
||||
rm src/main/resources/META-INF/MANIFEST.MF
|
||||
%pom_xpath_set "pom:packaging" bundle
|
||||
%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:archive/pom:manifestFile" '${project.build.outputDirectory}/META-INF/MANIFEST.MF'
|
||||
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:archive/pom:manifestEntries"
|
||||
|
||||
%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.5.4 . '
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Bundle-SymbolicName>${project.groupId}</Bundle-SymbolicName>
|
||||
<Bundle-Name>MariaDB JDBC Client</Bundle-Name>
|
||||
<Bundle-Version>${project.version}.0</Bundle-Version>
|
||||
<Export-Package>org.mariadb.jdbc.*</Export-Package>
|
||||
<Import-Package>
|
||||
!com.sun.jna.*,
|
||||
javax.net;resolution:=optional,
|
||||
javax.net.ssl;resolution:=optional,
|
||||
javax.sql;resolution:=optional,
|
||||
javax.transaction.xa;resolution:=optional
|
||||
</Import-Package>
|
||||
</instructions>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundle-manifest</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>manifest</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>'
|
||||
|
||||
%build
|
||||
# tests are skipped, while they require running application server
|
||||
%mvn_build -- -Dmaven.test.skip
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
%files -f .mfiles
|
||||
%doc documentation/* README.md
|
||||
%license LICENSE
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Thu Jun 14 2018 Jakub Janco <jjanco@redhat.com> - 2.2.5-1
|
||||
- update version
|
||||
|
||||
* Mon May 28 2018 Michael Simacek <msimacek@redhat.com> - 2.2.3-2
|
||||
- Remove BR on maven-javadoc-plugin
|
||||
|
||||
* Tue Mar 13 2018 Jakub Janco <jjanco@redhat.com> - 2.2.3-1
|
||||
- update version
|
||||
|
||||
* Mon Feb 26 2018 Jakub Janco <jjanco@redhat.com> - 2.2.2-1
|
||||
- update version
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Wed Jan 03 2018 Jakub Janco <jjanco@redhat.com> - 2.2.1-1
|
||||
- Update to 2.2.1
|
||||
|
||||
* Tue Nov 21 2017 Jakub Janco <jjanco@redhat.com> - 2.2.0-1
|
||||
- Update to 2.2.0
|
||||
|
||||
* Tue Aug 29 2017 Tomas Repik <trepik@redhat.com> - 2.1.0-1
|
||||
- Update to 2.1.0
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Mon Jun 26 2017 Tomas Repik <trepik@redhat.com> - 2.0.2-1
|
||||
- version update
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.5-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Mon Nov 28 2016 Tomas Repik <trepik@redhat.com> - 1.5.5-1
|
||||
- version update
|
||||
|
||||
* Mon Oct 03 2016 Tomas Repik <trepik@redhat.com> - 1.5.3-1
|
||||
- version update
|
||||
|
||||
* 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
|
||||
- version update
|
||||
|
||||
* Mon Apr 18 2016 Tomas Repik <trepik@redhat.com> - 1.4.2-1
|
||||
- version update
|
||||
|
||||
* Wed Mar 23 2016 Tomas Repik <trepik@redhat.com> - 1.3.7-1
|
||||
- version update
|
||||
- BSD license added
|
||||
- cosmetic updates in prep phase
|
||||
|
||||
* Thu Mar 10 2016 Tomas Repik <trepik@redhat.com> - 1.3.6-1
|
||||
- version update
|
||||
|
||||
* Mon Feb 15 2016 Tomas Repik <trepik@redhat.com> - 1.3.5-1
|
||||
- version update
|
||||
|
||||
* Wed Jan 20 2016 Tomáš Repík <trepik@redhat.com> - 1.3.3-3
|
||||
- generating OSGi manifest file with maven-bundle-plugin
|
||||
|
||||
* Wed Dec 16 2015 Tomáš Repík <trepik@redhat.com> - 1.3.3-2
|
||||
- installing LICENSE added
|
||||
- conversion from dos to unix line encoding revised
|
||||
- unnecessary tasks removed
|
||||
|
||||
* Wed Dec 9 2015 Tomáš Repík <trepik@redhat.com> - 1.3.3-1
|
||||
- Initial package
|
Loading…
Reference in New Issue
Block a user