Rebase to new major version 3.0.1, which is currently a Beta version.

This commit is a squash of two commits from Fedora, version 3.0.0 (Alpha)
and 3.0.1 (Beta). Links:

16f85de242
ed122496b4

This change is API and ABI incompatible with the previous version 2.7.*, but it is needed for future updates
of mariadb in rhel-9

Resolves: #1995101
This commit is contained in:
Ondrej Dubaj 2021-08-18 15:32:06 +02:00
parent a568353d2b
commit 5cd7632a71
4 changed files with 33 additions and 64 deletions

4
.gitignore vendored
View File

@ -24,3 +24,7 @@
/2.6.2.tar.gz
/2.7.0.tar.gz
/2.7.1.tar.gz
/2.7.2.tar.gz
/2.7.3.tar.gz
/3.0.0.tar.gz
/3.0.1.tar.gz

View File

@ -1,6 +1,6 @@
Name: mariadb-java-client
Version: 2.7.1
Release: 5%{?dist}
Version: 3.0.1
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+
@ -37,31 +37,29 @@ Summary: Javadoc for %{name}
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
%setup -qn mariadb-connector-j-%{version}-beta
# 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 com.amazonaws:aws-java-sdk-bom
%pom_remove_dep org.junit:junit-bom
%pom_add_dep net.java.dev.jna:jna
%pom_add_dep net.java.dev.jna:jna-platform
%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/credential/aws
sed -i 's|org.osgi.compendium|osgi.cmpn|' pom.xml
rm -r src/main/java/org/mariadb/jdbc/plugin/credential/aws
sed -i 's/public void close() {/public void close() throws Exception {/' src/main/java/org/mariadb/jdbc/pool/Pool.java
# also remove the file using the removed plugin
rm -f 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
@ -75,40 +73,6 @@ rm -f src/main/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/Win
%pom_remove_plugin -r :maven-gpg-plugin
%pom_remove_plugin -r :maven-javadoc-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 -f
@ -117,13 +81,17 @@ rm src/main/resources/META-INF/MANIFEST.MF
%mvn_install
%files -f .mfiles
%doc documentation/* README.md
%doc README.md
%license LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
* 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
* 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

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 +1 @@
SHA512 (2.7.1.tar.gz) = 023601f1363f62b45697d9505501748e5fd75a9c726144038e1c048f0522e34eb4d62aef9ae6f5a4216ed8236b0f7924eaa483255d3b2bebaa3f569b3eea04d2
SHA512 (3.0.1.tar.gz) = 10e8137f9899ba7834363d19985d8c355250daf01ca41a30db5e0cedbf134df6efcac0709e37fe76ddb560848879bbce92b26c3d23816211fa543a1bc573c5eb