From 45cd3e982b8ebe90a65adab80c6c2fd60ea6e939 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 17 2022 09:01:20 +0000 Subject: import mariadb-java-client-3.0.3-1.el9 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a132824 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/3.0.3.tar.gz diff --git a/.mariadb-java-client.metadata b/.mariadb-java-client.metadata new file mode 100644 index 0000000..d8af434 --- /dev/null +++ b/.mariadb-java-client.metadata @@ -0,0 +1 @@ +be4c9984d1704b91295e2a598963aa1ad7027a42 SOURCES/3.0.3.tar.gz diff --git a/SOURCES/compile_source_root.patch b/SOURCES/compile_source_root.patch new file mode 100644 index 0000000..f33edd2 --- /dev/null +++ b/SOURCES/compile_source_root.patch @@ -0,0 +1,25 @@ +commit 5cee5e0b2a68d9a62cc5bb447dc1487457517238 +Author: Mikolaj Izdebski +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 @@ + 9 + 9 + +- ${project.basedir}/src/main/java9 ++ ${project.basedir}/src/main/java + + true + +-- +2.34.1 diff --git a/SOURCES/remove_waffle-jna.patch b/SOURCES/remove_waffle-jna.patch new file mode 100644 index 0000000..b162481 --- /dev/null +++ b/SOURCES/remove_waffle-jna.patch @@ -0,0 +1,42 @@ +Date: Thu, 6 May 2021 08:28:06 +0200 +Subject: [PATCH] remove waffle-jna + +--- + .../authentication/addon/gssapi/GssUtility.java | 17 +---------------- + 1 file changed, 1 insertion(+), 16 deletions(-) + +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 + * + * @return authentication method + */ + public static 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(); +- } catch (ClassNotFoundException cle) { +- // waffle not in the classpath +- } +- } +- } catch (Throwable cle) { +- // jna jar's are not in classpath +- } + return new StandardGssapiAuthentication(); + } + } +-- +2.30.2 + diff --git a/SPECS/mariadb-java-client.spec b/SPECS/mariadb-java-client.spec new file mode 100644 index 0000000..725f548 --- /dev/null +++ b/SPECS/mariadb-java-client.spec @@ -0,0 +1,273 @@ +%global build_javadoc 0 + +Name: mariadb-java-client +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 +# optional dependency not in Fedora +Patch0: remove_waffle-jna.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) +# 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) + +%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} + +# 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 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 + +%pom_add_dep net.java.dev.jna:jna +%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 -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 + +%mvn_file org.mariadb.jdbc:%{name} %{name} +%mvn_alias org.mariadb.jdbc:%{name} mariadb:mariadb-connector-java + +%pom_remove_plugin org.jacoco:jacoco-maven-plugin +%pom_remove_plugin org.apache.maven.plugins:maven-source-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 +%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 $opts + +%install +%mvn_install + +%files -f .mfiles +%doc README.md +%license LICENSE + +%if %build_javadoc +%files javadoc -f .mfiles-javadoc +%license LICENSE +%endif + +%changelog +* Thu Feb 03 2022 Zuzana Miklankova - 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 + +* 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 + +* Wed Jun 30 2021 Ondrej Dubaj - 2.7.1-4 +- Remove maven-javadoc-plugin dependency + +* Fri Apr 16 2021 Mohan Boddu - 2.7.1-3 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 2.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Dec 10 2020 Ondrej Dubaj - 2.7.1-1 +- Rebase to version 2.7.1 (#1906291) + +* Fri Sep 25 2020 Ondrej Dubaj - 2.7.0-1 +- Rebase to version 2.7.0 (#1882558) + +* Sun Aug 30 2020 Fabio Valentini - 2.6.2-2 +- Remove unnecessary dependency on sonatype-oss-parent. + +* Wed Aug 19 2020 Ondrej Dubaj - 2.6.2-1 +- Rebase to version 2.6.2 (#1860212) + +* Tue Jul 28 2020 Fedora Release Engineering - 2.6.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat Jul 11 2020 Jiri Vanek - 2.6.1-2 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Wed Jun 24 2020 Ondrej Dubaj - 2.6.1-1 +- Rebase to version 2.6.1 (#1850111) + +* Mon Mar 30 2020 Michal Schorm - 2.6.0-2 +- Remove the dependency on mariadb (#1818814) + +* Mon Mar 23 2020 Ondrej Dubaj - 2.6.0-1 +- Rebase to version 2.6.0 (#1815696) + +* Thu Feb 20 2020 Ondrej Dubaj - 2.5.4-1 +- Rebase to version 2.5.4 (#1752069) + +* Wed Feb 19 2020 Ondrej Dubaj - 2.4.3-3 +- Resolved FTBFS (#1799633) + +* Wed Jan 29 2020 Fedora Release Engineering - 2.4.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Sep 10 2019 Michal Schorm - 2.4.3-1 +- Rebase to version 2.4.3 + +* Tue Sep 10 2019 Michal Schorm - 2.4.1-3 +- Remove dependency to orphaned HikariCP + +* Thu Jul 25 2019 Fedora Release Engineering - 2.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Mar 27 2019 Jakub Janco - 2.4.1-1 +- new version + +* Fri Feb 01 2019 Fedora Release Engineering - 2.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Jan 29 2019 Jakub Janco - 2.4.0-1 +- new version + +* Mon Nov 26 2018 Jakub Janco - 2.3.0-1 +- new version + +* Tue Aug 07 2018 Jakub Janco - 2.2.6-1 +- new version + +* Fri Jul 13 2018 Fedora Release Engineering - 2.2.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jun 04 2018 Jakub Janco - 2.2.5-1 +- new version + +* Tue May 15 2018 Jakub Janco - 2.2.4-3 +- remove unused aws-java-sdk dependency + +* Sat May 05 2018 Jakub Janco - 2.2.4-2 +- Refactor pom, add tests package + +* Sat May 05 2018 Jakub Janco - 2.2.4-1 +- new version + +* Tue Mar 13 2018 Jakub Janco - 2.2.3-1 +- update version + +* Mon Feb 26 2018 Jakub Janco - 2.2.2-1 +- update version + +* Thu Feb 08 2018 Fedora Release Engineering - 2.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jan 03 2018 Jakub Janco - 2.2.1-1 +- Update to 2.2.1 + +* Tue Nov 21 2017 Jakub Janco - 2.2.0-1 +- Update to 2.2.0 + +* Tue Aug 29 2017 Tomas Repik - 2.1.0-1 +- Update to 2.1.0 + +* Wed Jul 26 2017 Fedora Release Engineering - 2.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jun 26 2017 Tomas Repik - 2.0.2-1 +- version update + +* Fri Feb 10 2017 Fedora Release Engineering - 1.5.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Nov 28 2016 Tomas Repik - 1.5.5-1 +- version update + +* Mon Oct 03 2016 Tomas Repik - 1.5.3-1 +- version update + +* Wed Sep 14 2016 Tomas Repik - 1.5.2-1 +- version update + +* Tue Jun 21 2016 Tomas Repik - 1.4.6-1 +- version update + +* Mon Apr 18 2016 Tomas Repik - 1.4.2-1 +- version update + +* Wed Mar 23 2016 Tomas Repik - 1.3.7-1 +- version update +- BSD license added +- cosmetic updates in prep phase + +* Thu Mar 10 2016 Tomas Repik - 1.3.6-1 +- version update + +* Mon Feb 15 2016 Tomas Repik - 1.3.5-1 +- version update + +* Wed Jan 20 2016 Tomáš Repík - 1.3.3-3 +- generating OSGi manifest file with maven-bundle-plugin + +* Wed Dec 16 2015 Tomáš Repík - 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 - 1.3.3-1 +- Initial package