From 5cd7632a712beed71a2e56a41b8de64e487168db Mon Sep 17 00:00:00 2001 From: Ondrej Dubaj Date: Wed, 18 Aug 2021 15:32:06 +0200 Subject: [PATCH] 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: https://src.fedoraproject.org/rpms/mariadb-java-client/c/16f85de242fe59bedb3ef7eff43995d15e75028a?branch=rawhide https://src.fedoraproject.org/rpms/mariadb-java-client/c/ed122496b45f91c58ed62c64497e2b4674828043?branch=rawhide 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 --- .gitignore | 4 +++ mariadb-java-client.spec | 68 +++++++++++----------------------------- remove_waffle-jna.patch | 23 ++++++-------- sources | 2 +- 4 files changed, 33 insertions(+), 64 deletions(-) diff --git a/.gitignore b/.gitignore index 3a0d5dd..0f27f9c 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/mariadb-java-client.spec b/mariadb-java-client.spec index 6112cec..33ea9db 100644 --- a/mariadb-java-client.spec +++ b/mariadb-java-client.spec @@ -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 . ' -true - - - ${project.groupId} - MariaDB JDBC Client - ${project.version}.0 - org.mariadb.jdbc.* - - !com.sun.jna.*, - javax.net;resolution:=optional, - javax.net.ssl;resolution:=optional, - javax.sql;resolution:=optional, - javax.transaction.xa;resolution:=optional - - - - - - bundle-manifest - process-classes - - manifest - - -' - %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 - 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 - 2.7.1-5 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 diff --git a/remove_waffle-jna.patch b/remove_waffle-jna.patch index e30649c..b162481 100644 --- a/remove_waffle-jna.patch +++ b/remove_waffle-jna.patch @@ -1,24 +1,21 @@ -From c1e587054376db950495c02672675c801f454a6b Mon Sep 17 00:00:00 2001 -From: Ondrej Dubaj -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 diff --git a/sources b/sources index 0b08025..0ddcd1b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (2.7.1.tar.gz) = 023601f1363f62b45697d9505501748e5fd75a9c726144038e1c048f0522e34eb4d62aef9ae6f5a4216ed8236b0f7924eaa483255d3b2bebaa3f569b3eea04d2 +SHA512 (3.0.1.tar.gz) = 10e8137f9899ba7834363d19985d8c355250daf01ca41a30db5e0cedbf134df6efcac0709e37fe76ddb560848879bbce92b26c3d23816211fa543a1bc573c5eb