Compare commits

...

No commits in common. "c8" and "c9-beta" have entirely different histories.
c8 ... c9-beta

6 changed files with 173 additions and 148 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/mariadb-connector-j-2.7.1.tar.gz
SOURCES/3.0.3.tar.gz

View File

@ -1 +1 @@
a838d52134182704d3665488278f98104cef4b42 SOURCES/mariadb-connector-j-2.7.1.tar.gz
be4c9984d1704b91295e2a598963aa1ad7027a42 SOURCES/3.0.3.tar.gz

View File

@ -0,0 +1,25 @@
commit 5cee5e0b2a68d9a62cc5bb447dc1487457517238
Author: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu Feb 3 15:10:07 2022 +0100
[PATCH] change Java9 compile source root
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6354ce0a..c6690f8b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,7 +124,7 @@
<source>9</source>
<target>9</target>
<compileSourceRoots>
- <compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
+ <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
--
2.34.1

View File

@ -1,52 +0,0 @@
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

View File

@ -1,24 +1,21 @@
From c1e587054376db950495c02672675c801f454a6b Mon Sep 17 00:00:00 2001
From: Ondrej Dubaj <odubaj@redhat.com>
Date: Mon, 10 Feb 2020 18:08:39 +0100
Date: Thu, 6 May 2021 08:28:06 +0200
Subject: [PATCH] remove waffle-jna
---
.../send/authentication/gssapi/GssUtility.java | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
.../authentication/addon/gssapi/GssUtility.java | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
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 810500e..127b580 100644
--- 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
@@ -5,26 +5,12 @@ import com.sun.jna.*;
diff --git a/src/main/java/org/mariadb/jdbc/plugin/authentication/addon/gssapi/GssUtility.java b/src/main/java/org/mariadb/jdbc/plugin/authentication/addon/gssapi/GssUtility.java
index 5f050df..1801701 100644
--- a/src/main/java/org/mariadb/jdbc/plugin/authentication/addon/gssapi/GssUtility.java
+++ b/src/main/java/org/mariadb/jdbc/plugin/authentication/addon/gssapi/GssUtility.java
@@ -9,26 +9,11 @@ import com.sun.jna.Platform;
public class GssUtility {
/**
- * Get authentication method according to classpath. Windows native authentication is using
- * Waffle-jna.
+ * Get authentication method according to classpath.
+ *
+ * Get authentication method according to classpath
*
* @return authentication method
*/
@ -41,5 +38,5 @@ index 810500e..127b580 100644
}
}
--
2.19.1
2.30.2

View File

@ -1,74 +1,82 @@
%global build_javadoc 0
Name: mariadb-java-client
Version: 2.7.1
Release: 2%{?dist}
Version: 3.0.3
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-corporation/mariadb-connector-j/archive/refs/tags/%{version}.tar.gz/mariadb-connector-j-%{version}.tar.gz
URL: https://mariadb.com/kb/en/mariadb/about-mariadb-connector-j/
Source0: https://github.com/mariadb-corporation/mariadb-connector-j/archive/refs/tags/%{version}.tar.gz
# optional dependency not in Fedora
Patch0: remove_waffle-jna.patch
Patch1: compliance-for-jna-4.patch
Patch1: compile_source_root.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.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core)
# Since version 2.4.0
# removing coverage test because of dependencies
#BuildRequires: mvn(org.jacoco:jacoco-maven-plugin)
# since version 1.5.2 missing optional dependency (windows)
#BuildRequires: mvn(com.github.dblock.waffle:waffle-jna)
Suggests: mariadb-server
%if %build_javadoc == 0
Obsoletes: %{name}-javadoc < 3.0.3
%endif
%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.
%if %build_javadoc
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains the API documentation for %{name}.
%endif
%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 ch.qos.logback:logback-classic
%pom_remove_dep junit:junit
%pom_remove_dep com.amazonaws:aws-java-sdk-rds
%pom_remove_dep software.amazon.awssdk:bom
%pom_remove_dep software.amazon.awssdk:rds
%pom_remove_dep org.junit:junit-bom
%pom_remove_dep org.junit.jupiter:junit-jupiter-engine
%pom_remove_dep org.slf4j:slf4j-api
# 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
%pom_add_dep net.java.dev.jna:jna-platform
# add slf4j dep again, this time not dependent on any specific version
%pom_add_dep org.slf4j:slf4j-api
# 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
rm -r src/main/java/org/mariadb/jdbc/plugin/credential/aws
# removing dependencies and 'provides', which mariadb-java-client cannot process from module-info.java
sed -i '/aws/d' src/main/java9/module-info.java
sed -i '/waffle/d' src/main/java9/module-info.java
# removing missing dependencies from META-INF, so that the mariadb-java-client module would be valid
sed -i '/aws/d' src/main/resources/META-INF/services/org.mariadb.jdbc.plugin.CredentialPlugin
sed -i '/aws/d' src/test/resources/META-INF/services/org.mariadb.jdbc.plugin.CredentialPlugin
# also remove the file using the removed plugin
rm -r src/main/java/org/mariadb/jdbc/credential/aws
rm src/main/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/WindowsNativeSspiAuthentication.java
rm -f src/main/java/org/mariadb/jdbc/plugin/authentication/addon/gssapi/WindowsNativeSspiAuthentication.java
# patch the sources so that the missing file is not making trouble
%patch0 -p1
%patch1 -p1
@ -78,80 +86,127 @@ rm src/main/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/Window
%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-javadoc-plugin
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
%pom_remove_plugin com.coveo:fmt-maven-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>'
%pom_remove_plugin -r :maven-javadoc-plugin
%build
%if %build_javadoc == 0
opts="-j"
%endif
# tests are skipped, while they require running application server
%mvn_build -f
%mvn_build -f $opts
%install
%mvn_install
%files -f .mfiles
%doc documentation/* README.md
%doc README.md
%license LICENSE
%if %build_javadoc
%files javadoc -f .mfiles-javadoc
%license LICENSE
%endif
%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
* Thu Feb 03 2022 Zuzana Miklankova <zmiklank@redhat.com> - 3.0.3-1
- Rebase to 3.0.3
- Temporarily disable generation of -javadoc.rpm, due to missing feature in xmvn,
which leads to build crash
* 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
* Wed Aug 18 2021 Ondrej Dubaj <odubaj@redhat.com> - 3.0.1-1
- Rebase to new major version 3.0.1 (it's Beta version)
- Removed documentation/ folder, as it was removed by upstream
* Fri Jun 26 2020 Michal Schorm <mschorm@redhat.com> - 2.2.5-3
- Fix requirement on MariaDB
Resolves: #1797057
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.7.1-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Jun 14 2018 Jakub Janco <jjanco@redhat.com> - 2.2.5-1
- update version
* Wed Jun 30 2021 Ondrej Dubaj <odubaj@redhat.com> - 2.7.1-4
- Remove maven-javadoc-plugin dependency
* Mon May 28 2018 Michael Simacek <msimacek@redhat.com> - 2.2.3-2
- Remove BR on maven-javadoc-plugin
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.7.1-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Dec 10 2020 Ondrej Dubaj <odubaj@redhat.com> - 2.7.1-1
- Rebase to version 2.7.1 (#1906291)
* Fri Sep 25 2020 Ondrej Dubaj <odubaj@redhat.com> - 2.7.0-1
- Rebase to version 2.7.0 (#1882558)
* Sun Aug 30 2020 Fabio Valentini <decathorpe@gmail.com> - 2.6.2-2
- Remove unnecessary dependency on sonatype-oss-parent.
* Wed Aug 19 2020 Ondrej Dubaj <odubaj@redhat.com> - 2.6.2-1
- Rebase to version 2.6.2 (#1860212)
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 2.6.1-2
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Wed Jun 24 2020 Ondrej Dubaj <odubaj@redhat.com> - 2.6.1-1
- Rebase to version 2.6.1 (#1850111)
* Mon Mar 30 2020 Michal Schorm <mschorm@redhat.com> - 2.6.0-2
- Remove the dependency on mariadb (#1818814)
* Mon Mar 23 2020 Ondrej Dubaj <odubaj@redhat.com> - 2.6.0-1
- Rebase to version 2.6.0 (#1815696)
* Thu Feb 20 2020 Ondrej Dubaj <odubaj@redhat.com> - 2.5.4-1
- Rebase to version 2.5.4 (#1752069)
* Wed Feb 19 2020 Ondrej Dubaj <odubaj@redhat.com> - 2.4.3-3
- Resolved FTBFS (#1799633)
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Sep 10 2019 Michal Schorm <mschorm@redhat.com> - 2.4.3-1
- Rebase to version 2.4.3
* Tue Sep 10 2019 Michal Schorm <mschorm@redhat.com> - 2.4.1-3
- Remove dependency to orphaned HikariCP
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Mar 27 2019 Jakub Janco <jjanco@redhat.com> - 2.4.1-1
- new version
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jan 29 2019 Jakub Janco <jjanco@redhat.com> - 2.4.0-1
- new version
* Mon Nov 26 2018 Jakub Janco <jjanco@redhat.com> - 2.3.0-1
- new version
* Tue Aug 07 2018 Jakub Janco <jjanco@redhat.com> - 2.2.6-1
- new version
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jun 04 2018 Jakub Janco <jjanco@redhat.com> - 2.2.5-1
- new version
* Tue May 15 2018 Jakub Janco <jjanco@redhat.com> - 2.2.4-3
- remove unused aws-java-sdk dependency
* Sat May 05 2018 Jakub Janco <jjanco@redhat.com> - 2.2.4-2
- Refactor pom, add tests package
* Sat May 05 2018 Jakub Janco <jjanco@redhat.com> - 2.2.4-1
- new version
* Tue Mar 13 2018 Jakub Janco <jjanco@redhat.com> - 2.2.3-1
- update version