import mariadb-java-client-2.7.1-2.el8
This commit is contained in:
parent
8c24b689f3
commit
16b8691617
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/2.2.5.tar.gz
|
SOURCES/mariadb-connector-j-2.7.1.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
ecd339fcfe3e6e57852d6d7e631967a5898a9cf0 SOURCES/2.2.5.tar.gz
|
a838d52134182704d3665488278f98104cef4b42 SOURCES/mariadb-connector-j-2.7.1.tar.gz
|
||||||
|
52
SOURCES/compliance-for-jna-4.patch
Normal file
52
SOURCES/compliance-for-jna-4.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
From 6851cb325a3508bbdaf58324dcf5968b31eebde8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zuzana Miklankova <zmiklank@redhat.com>
|
||||||
|
Date: Mon, 11 Apr 2022 12:44:39 +0200
|
||||||
|
Subject: [PATCH] compliance for jna 4
|
||||||
|
|
||||||
|
More information:
|
||||||
|
https://github.com/java-native-access/jna/blob/5.0.0/src/com/sun/jna/Native.java#L599
|
||||||
|
https://github.com/java-native-access/jna/blob/5.0.0/CHANGES.md#features-12
|
||||||
|
|
||||||
|
---
|
||||||
|
.../mariadb/jdbc/internal/io/socket/SharedMemorySocket.java | 4 ++--
|
||||||
|
.../org/mariadb/jdbc/internal/util/pid/JnaPidFactory.java | 2 +-
|
||||||
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/mariadb/jdbc/internal/io/socket/SharedMemorySocket.java b/src/main/java/org/mariadb/jdbc/internal/io/socket/SharedMemorySocket.java
|
||||||
|
index 74a4f4b1..2abdcba8 100644
|
||||||
|
--- a/src/main/java/org/mariadb/jdbc/internal/io/socket/SharedMemorySocket.java
|
||||||
|
+++ b/src/main/java/org/mariadb/jdbc/internal/io/socket/SharedMemorySocket.java
|
||||||
|
@@ -284,7 +284,7 @@ public class SharedMemorySocket extends Socket {
|
||||||
|
|
||||||
|
public interface Kernel32 extends StdCallLibrary {
|
||||||
|
|
||||||
|
- Kernel32 INSTANCE = Native.load("Kernel32", Kernel32.class, WIN32API_OPTIONS);
|
||||||
|
+ Kernel32 INSTANCE = Native.loadLibrary("Kernel32", Kernel32.class, WIN32API_OPTIONS);
|
||||||
|
int FILE_MAP_WRITE = 0x0002;
|
||||||
|
int FILE_MAP_READ = 0x0004;
|
||||||
|
int EVENT_MODIFY_STATE = 0x0002;
|
||||||
|
@@ -327,7 +327,7 @@ public class SharedMemorySocket extends Socket {
|
||||||
|
|
||||||
|
public interface Advapi32 extends StdCallLibrary {
|
||||||
|
|
||||||
|
- Advapi32 INSTANCE = Native.load("advapi32", Advapi32.class, WIN32API_OPTIONS);
|
||||||
|
+ Advapi32 INSTANCE = Native.loadLibrary("advapi32", Advapi32.class, WIN32API_OPTIONS);
|
||||||
|
|
||||||
|
boolean ConvertStringSecurityDescriptorToSecurityDescriptor(
|
||||||
|
String sddl, int sddlVersion, PointerByReference psd, IntByReference length);
|
||||||
|
diff --git a/src/main/java/org/mariadb/jdbc/internal/util/pid/JnaPidFactory.java b/src/main/java/org/mariadb/jdbc/internal/util/pid/JnaPidFactory.java
|
||||||
|
index 88cc2d5e..6e872035 100644
|
||||||
|
--- a/src/main/java/org/mariadb/jdbc/internal/util/pid/JnaPidFactory.java
|
||||||
|
+++ b/src/main/java/org/mariadb/jdbc/internal/util/pid/JnaPidFactory.java
|
||||||
|
@@ -99,7 +99,7 @@ public class JnaPidFactory {
|
||||||
|
}
|
||||||
|
|
||||||
|
private interface CLibrary extends Library {
|
||||||
|
- CLibrary INSTANCE = Native.load("c", CLibrary.class);
|
||||||
|
+ CLibrary INSTANCE = Native.loadLibrary("c", CLibrary.class);
|
||||||
|
|
||||||
|
int getpid();
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
@ -1,63 +1,45 @@
|
|||||||
From d4d3f02f3b940693e99f065dd543e6bc03721f53 Mon Sep 17 00:00:00 2001
|
From c1e587054376db950495c02672675c801f454a6b Mon Sep 17 00:00:00 2001
|
||||||
From: Jakub Janco <jjanco@redhat.com>
|
From: Ondrej Dubaj <odubaj@redhat.com>
|
||||||
Date: Sat, 5 May 2018 15:37:06 +0200
|
Date: Mon, 10 Feb 2020 18:08:39 +0100
|
||||||
Subject: [PATCH] Remove WindowsNativeSspiAuthentication This dependency is
|
Subject: [PATCH] remove waffle-jna
|
||||||
optional and not in Fedora
|
|
||||||
|
|
||||||
---
|
---
|
||||||
.../internal/com/send/SendGssApiAuthPacket.java | 26 +---------------------
|
.../send/authentication/gssapi/GssUtility.java | 18 ++----------------
|
||||||
1 file changed, 1 insertion(+), 25 deletions(-)
|
1 file changed, 2 insertions(+), 16 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
|
diff --git a/src/main/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/GssUtility.java b/src/main/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/GssUtility.java
|
||||||
index 55771a61..d6a76979 100644
|
index 810500e..127b580 100644
|
||||||
--- a/src/main/java/org/mariadb/jdbc/internal/com/send/SendGssApiAuthPacket.java
|
--- a/src/main/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/GssUtility.java
|
||||||
+++ b/src/main/java/org/mariadb/jdbc/internal/com/send/SendGssApiAuthPacket.java
|
+++ b/src/main/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/GssUtility.java
|
||||||
@@ -57,7 +57,6 @@ import org.mariadb.jdbc.internal.com.read.Buffer;
|
@@ -5,26 +5,12 @@ import com.sun.jna.*;
|
||||||
import org.mariadb.jdbc.internal.com.read.ErrorPacket;
|
public class GssUtility {
|
||||||
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);
|
- * Get authentication method according to classpath. Windows native authentication is using
|
||||||
if (mechanisms.isEmpty()) mechanisms = "Kerberos";
|
- * Waffle-jna.
|
||||||
|
+ * Get authentication method according to classpath.
|
||||||
- GssapiAuth gssapiAuth = getAuthenticationMethod();
|
+ *
|
||||||
+ GssapiAuth gssapiAuth = new StandardGssapiAuthentication(reader, packSeq);
|
*
|
||||||
gssapiAuth.authenticate(pos, serverPrincipalName, mechanisms);
|
* @return authentication method
|
||||||
}
|
*/
|
||||||
|
public static GssapiAuth getAuthenticationMethod() {
|
||||||
@@ -107,28 +106,5 @@ public class SendGssApiAuthPacket extends AbstractAuthSwitchSendResponsePacket i
|
- try {
|
||||||
}
|
- // Waffle-jna has jna as dependency, so if not available on classpath, just use standard
|
||||||
}
|
- // authentication
|
||||||
|
- if (Platform.isWindows()) {
|
||||||
- /**
|
|
||||||
- * Get authentication method according to classpath.
|
|
||||||
- * Windows native authentication is using Waffle-jna.
|
|
||||||
- *
|
|
||||||
- * @return authentication method
|
|
||||||
- */
|
|
||||||
- private GssapiAuth getAuthenticationMethod() {
|
|
||||||
- try {
|
- try {
|
||||||
- //Waffle-jna has jna as dependency, so if not available on classpath, just use standard authentication
|
- Class.forName("waffle.windows.auth.impl.WindowsAuthProviderImpl");
|
||||||
- if (Platform.isWindows()) {
|
- return new WindowsNativeSspiAuthentication();
|
||||||
- try {
|
- } catch (ClassNotFoundException cle) {
|
||||||
- Class.forName("waffle.windows.auth.impl.WindowsAuthProviderImpl");
|
- // waffle not in the classpath
|
||||||
- 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);
|
- }
|
||||||
|
- } catch (Throwable cle) {
|
||||||
|
- // jna jar's are not in classpath
|
||||||
- }
|
- }
|
||||||
-
|
return new StandardGssapiAuthentication();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.14.3
|
2.19.1
|
||||||
|
|
||||||
|
@ -1,24 +1,25 @@
|
|||||||
Name: mariadb-java-client
|
Name: mariadb-java-client
|
||||||
Version: 2.2.5
|
Version: 2.7.1
|
||||||
Release: 3%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Connects applications developed in Java to MariaDB and MySQL databases
|
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
|
# added BSD license because of https://bugzilla.redhat.com/show_bug.cgi?id=1291558#c13
|
||||||
License: BSD and LGPLv2+
|
License: BSD and LGPLv2+
|
||||||
URL: https://mariadb.com/kb/en/mariadb/about-mariadb-connector-j/
|
URL: https://mariadb.com/kb/en/mariadb/about-mariadb-connector-j/
|
||||||
Source0: https://github.com/MariaDB/mariadb-connector-j/archive/%{version}.tar.gz
|
Source0: https://github.com/mariadb-corporation/mariadb-connector-j/archive/refs/tags/%{version}.tar.gz/mariadb-connector-j-%{version}.tar.gz
|
||||||
|
|
||||||
# optional dependency not in Fedora
|
# optional dependency not in Fedora
|
||||||
Patch0: remove_waffle-jna.patch
|
Patch0: remove_waffle-jna.patch
|
||||||
|
Patch1: compliance-for-jna-4.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: maven-local
|
BuildRequires: maven-local
|
||||||
BuildRequires: mvn(net.java.dev.jna:jna)
|
BuildRequires: mvn(net.java.dev.jna:jna)
|
||||||
BuildRequires: mvn(net.java.dev.jna:jna-platform)
|
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.apache.felix:maven-bundle-plugin)
|
||||||
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
|
|
||||||
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
||||||
|
BuildRequires: mvn(org.osgi:osgi.cmpn)
|
||||||
|
BuildRequires: mvn(org.osgi:osgi.core)
|
||||||
|
BuildRequires: mvn(org.slf4j:slf4j-api)
|
||||||
# since version 1.5.2 missing optional dependency (windows)
|
# since version 1.5.2 missing optional dependency (windows)
|
||||||
#BuildRequires: mvn(com.github.dblock.waffle:waffle-jna)
|
#BuildRequires: mvn(com.github.dblock.waffle:waffle-jna)
|
||||||
|
|
||||||
@ -47,21 +48,39 @@ done
|
|||||||
|
|
||||||
# remove missing optional dependency waffle-jna
|
# remove missing optional dependency waffle-jna
|
||||||
%pom_remove_dep com.github.waffle:waffle-jna
|
%pom_remove_dep com.github.waffle:waffle-jna
|
||||||
%pom_remove_dep com.zaxxer:HikariCP
|
|
||||||
%pom_remove_dep ch.qos.logback:logback-classic
|
%pom_remove_dep ch.qos.logback:logback-classic
|
||||||
|
%pom_remove_dep junit:junit
|
||||||
|
%pom_remove_dep com.amazonaws:aws-java-sdk-rds
|
||||||
|
|
||||||
|
# remove and add jna, so that it is stated as
|
||||||
|
# non-optional dependency
|
||||||
|
%pom_remove_dep net.java.dev.jna:jna
|
||||||
|
%pom_add_dep net.java.dev.jna:jna
|
||||||
|
|
||||||
|
# change required version of the jna-platform, as mariadb-java-client is patched to
|
||||||
|
# be compliant also with jna 4
|
||||||
|
%pom_change_dep net.java.dev.jna:jna-platform net.java.dev.jna:jna-platform:any
|
||||||
|
|
||||||
|
# use latest OSGi implementation
|
||||||
|
%pom_change_dep -r :org.osgi.core org.osgi:osgi.core
|
||||||
|
%pom_change_dep -r :org.osgi.compendium org.osgi:osgi.cmpn
|
||||||
|
|
||||||
|
|
||||||
# also remove the file using the removed plugin
|
# also remove the file using the removed plugin
|
||||||
rm -f src/main/java/org/mariadb/jdbc/internal/com/send/gssapi/WindowsNativeSspiAuthentication.java
|
rm -r src/main/java/org/mariadb/jdbc/credential/aws
|
||||||
|
rm src/main/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/WindowsNativeSspiAuthentication.java
|
||||||
# patch the sources so that the missing file is not making trouble
|
# patch the sources so that the missing file is not making trouble
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%mvn_file org.mariadb.jdbc:%{name} %{name}
|
%mvn_file org.mariadb.jdbc:%{name} %{name}
|
||||||
%mvn_alias org.mariadb.jdbc:%{name} mariadb:mariadb-connector-java
|
%mvn_alias org.mariadb.jdbc:%{name} mariadb:mariadb-connector-java
|
||||||
|
|
||||||
%pom_remove_plugin org.apache.maven.plugins:maven-checkstyle-plugin
|
%pom_remove_plugin org.jacoco:jacoco-maven-plugin
|
||||||
%pom_remove_plugin org.apache.maven.plugins:maven-source-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.apache.maven.plugins:maven-javadoc-plugin
|
||||||
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
|
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
|
||||||
%pom_remove_plugin pl.project13.maven:git-commit-id-plugin
|
%pom_remove_plugin com.coveo:fmt-maven-plugin
|
||||||
%pom_remove_plugin -r :maven-gpg-plugin
|
%pom_remove_plugin -r :maven-gpg-plugin
|
||||||
|
|
||||||
# remove preconfigured OSGi manifest file and generate OSGi manifest file
|
# remove preconfigured OSGi manifest file and generate OSGi manifest file
|
||||||
@ -100,7 +119,7 @@ rm src/main/resources/META-INF/MANIFEST.MF
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
# tests are skipped, while they require running application server
|
# tests are skipped, while they require running application server
|
||||||
%mvn_build -- -Dmaven.test.skip
|
%mvn_build -f
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%mvn_install
|
%mvn_install
|
||||||
@ -113,6 +132,17 @@ rm src/main/resources/META-INF/MANIFEST.MF
|
|||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 24 2022 Zuzana Miklankova <zmiklank@redhat.com> - 2.7.1-2
|
||||||
|
- autogenerate the Requires only for jna, not jna-platform
|
||||||
|
- change required version of jna-platform to 'any' in pom.xml
|
||||||
|
Resolves: #2089627
|
||||||
|
|
||||||
|
* Mon Feb 07 2022 Zuzana Miklankova <zmiklank@redhat.com> - 2.7.1-1
|
||||||
|
- Update to 2.7.1
|
||||||
|
- Retain compatibility with jna4
|
||||||
|
- Adjust pom.xml, so that the rpm Requires jna and jna-platform
|
||||||
|
Resolves: #2043212
|
||||||
|
|
||||||
* Fri Jun 26 2020 Michal Schorm <mschorm@redhat.com> - 2.2.5-3
|
* Fri Jun 26 2020 Michal Schorm <mschorm@redhat.com> - 2.2.5-3
|
||||||
- Fix requirement on MariaDB
|
- Fix requirement on MariaDB
|
||||||
Resolves: #1797057
|
Resolves: #1797057
|
||||||
|
Loading…
Reference in New Issue
Block a user