diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..82a535e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/r3.6.3.tar.gz diff --git a/.rh-mongodb36-mongo-java-driver.metadata b/.rh-mongodb36-mongo-java-driver.metadata new file mode 100644 index 0000000..6d20ad9 --- /dev/null +++ b/.rh-mongodb36-mongo-java-driver.metadata @@ -0,0 +1 @@ +b845a8507e9ef2ba664ca532530e0dcb65c84a0d SOURCES/r3.6.3.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-Maven-support.patch b/SOURCES/0001-Maven-support.patch new file mode 100644 index 0000000..549baf8 --- /dev/null +++ b/SOURCES/0001-Maven-support.patch @@ -0,0 +1,616 @@ +From ce1fc6cd336f623101a72b6d3de3d95d42998316 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Fri, 23 Jun 2017 18:21:43 +0200 +Subject: [PATCH] Maven support + +--- + bson/pom.xml | 90 ++++++++++++++ + driver-async/pom.xml | 106 +++++++++++++++++ + driver-core/pom.xml | 120 +++++++++++++++++++ + .../unit/com/mongodb/ConnectionStringTest.java | 2 +- + driver/pom.xml | 77 ++++++++++++ + mongo-java-driver/pom.xml | 130 +++++++++++++++++++++ + pom.xml | 27 +++++ + 7 files changed, 551 insertions(+), 1 deletion(-) + create mode 100644 bson/pom.xml + create mode 100644 driver-async/pom.xml + create mode 100644 driver-core/pom.xml + create mode 100644 driver/pom.xml + create mode 100644 mongo-java-driver/pom.xml + create mode 100644 pom.xml + +diff --git a/bson/pom.xml b/bson/pom.xml +new file mode 100644 +index 0000000..4076687 +--- /dev/null ++++ b/bson/pom.xml +@@ -0,0 +1,90 @@ ++ ++ ++ 4.0.0 ++ ++ org.mongodb ++ aggregator-project ++ @VERSION@ ++ ++ org.mongodb ++ bson ++ @VERSION@ ++ BSON ++ The BSON library ++ http://bsonspec.org ++ bundle ++ ++ ++ The Apache Software License, Version 2.0 ++ http://www.apache.org/licenses/LICENSE-2.0.txt ++ repo ++ ++ ++ ++ ++ Various ++ MongoDB ++ ++ ++ ++ scm:https://github.com/mongodb/mongo-java-driver.git ++ scm:git@github.com:mongodb/mongo-java-driver.git ++ https://github.com/mongodb/mongo-java-driver ++ ++ ++ ++ org.slf4j ++ slf4j-api ++ 1.7.6 ++ true ++ ++ ++ junit ++ junit ++ 4.12 ++ test ++ ++ ++ ++ src/main ++ src/test/unit ++ ++ ++ maven-compiler-plugin ++ ++ 1.7 ++ 1.7 ++ ++ ++ ++ maven-jar-plugin ++ ++ ++ ++ test-jar ++ ++ ++ ++ ++ ++ org.apache.felix ++ maven-bundle-plugin ++ true ++ ++ ++ Red Hat, Inc. ++ org.mongodb.bson ++ org.bson,org.bson.* ++ ++ javax.xml.bind.*, ++ org.slf4j;resolution:=optional, ++ ++ ++ <_nouses>true ++ ++ ++ ++ ++ ++ +diff --git a/driver-async/pom.xml b/driver-async/pom.xml +new file mode 100644 +index 0000000..7771e1b +--- /dev/null ++++ b/driver-async/pom.xml +@@ -0,0 +1,106 @@ ++ ++ ++ 4.0.0 ++ ++ org.mongodb ++ aggregator-project ++ @VERSION@ ++ ++ ++ org.mongodb ++ mongodb-driver-async ++ @VERSION@ ++ MongoDB Asynchronous Driver ++ The MongoDB Asynchronous Driver ++ http://www.mongodb.org ++ bundle ++ ++ ++ The Apache Software License, Version 2.0 ++ http://www.apache.org/licenses/LICENSE-2.0.txt ++ repo ++ ++ ++ ++ ++ Various ++ MongoDB ++ ++ ++ ++ scm:https://github.com/mongodb/mongo-java-driver.git ++ scm:git@github.com:mongodb/mongo-java-driver.git ++ https://github.com/mongodb/mongo-java-driver ++ ++ ++ ++ org.mongodb ++ bson ++ @VERSION@ ++ ++ ++ org.mongodb ++ mongodb-driver-core ++ @VERSION@ ++ ++ ++ io.netty ++ netty-transport ++ 4.0.26.Final ++ true ++ ++ ++ org.slf4j ++ slf4j-api ++ 1.7.6 ++ true ++ ++ ++ junit ++ junit ++ 4.12 ++ test ++ ++ ++ ++ src/main ++ src/test/unit ++ ++ ++ maven-compiler-plugin ++ ++ 1.7 ++ 1.7 ++ ++ ++ ++ org.apache.felix ++ maven-bundle-plugin ++ true ++ ++ ++ Red Hat, Inc. ++ org.mongodb.driver-async ++ com.mongodb.* ++ ++ org.bson.*, ++ javax.crypto.*, ++ javax.crypto.spec.*, ++ javax.management.*, ++ javax.net.*, ++ javax.net.ssl.*, ++ javax.security.sasl.*, ++ javax.security.auth.callback.*, ++ org.ietf.jgss.*, ++ io.netty.*;resolution:=optional, ++ org.slf4j;resolution:=optional, ++ ++ ++ <_nouses>true ++ ++ ++ ++ ++ ++ +diff --git a/driver-core/pom.xml b/driver-core/pom.xml +new file mode 100644 +index 0000000..3f6804b +--- /dev/null ++++ b/driver-core/pom.xml +@@ -0,0 +1,126 @@ ++ ++ ++ 4.0.0 ++ ++ org.mongodb ++ aggregator-project ++ @VERSION@ ++ ++ org.mongodb ++ mongodb-driver-core ++ @VERSION@ ++ MongoDB Java Driver Core ++ The Java operations layer for the MongoDB Java Driver. Third parties can ' + ++ 'wrap this layer to provide custom higher-level APIs ++ http://www.mongodb.org ++ bundle ++ ++ ++ The Apache Software License, Version 2.0 ++ http://www.apache.org/licenses/LICENSE-2.0.txt ++ repo ++ ++ ++ ++ ++ Various ++ MongoDB ++ ++ ++ ++ scm:https://github.com/mongodb/mongo-java-driver.git ++ scm:git@github.com:mongodb/mongo-java-driver.git ++ https://github.com/mongodb/mongo-java-driver ++ ++ ++ ++ org.mongodb ++ bson ++ @VERSION@ ++ ++ ++ org.xerial.snappy ++ snappy-java ++ 1.1.4 ++ true ++ ++ ++ io.netty ++ netty-buffer ++ 4.0.26.Final ++ true ++ ++ ++ io.netty ++ netty-transport ++ 4.0.26.Final ++ true ++ ++ ++ io.netty ++ netty-handler ++ 4.0.26.Final ++ true ++ ++ ++ org.slf4j ++ slf4j-api ++ 1.7.6 ++ true ++ ++ ++ org.mongodb ++ bson ++ test-jar ++ @VERSION@ ++ test ++ ++ ++ junit ++ junit ++ 4.12 ++ test ++ ++ ++ ++ src/main ++ src/test/unit ++ ++ ++ maven-compiler-plugin ++ ++ 1.7 ++ 1.7 ++ ++ ++ ++ org.apache.felix ++ maven-bundle-plugin ++ true ++ ++ ++ Red Hat, Inc. ++ org.mongodb.driver-core ++ com.mongodb.* ++ ++ org.bson.*, ++ javax.crypto.*, ++ javax.crypto.spec.*, ++ javax.management.*, ++ javax.net.*, ++ javax.net.ssl.*, ++ javax.security.sasl.*, ++ javax.security.auth.callback.*, ++ org.ietf.jgss.*, ++ io.netty.*;resolution:=optional, ++ org.slf4j;resolution:=optional, ++ ++ ++ <_nouses>true ++ ++ ++ ++ ++ ++ +diff --git a/driver/pom.xml b/driver/pom.xml +new file mode 100644 +index 0000000..c2b9606 +--- /dev/null ++++ b/driver/pom.xml +@@ -0,0 +1,77 @@ ++ ++ ++ 4.0.0 ++ ++ org.mongodb ++ aggregator-project ++ @VERSION@ ++ ++ org.mongodb ++ mongodb-driver ++ @VERSION@ ++ MongoDB Driver ++ The MongoDB Driver ++ http://www.mongodb.org ++ ++ ++ The Apache Software License, Version 2.0 ++ http://www.apache.org/licenses/LICENSE-2.0.txt ++ repo ++ ++ ++ ++ ++ Various ++ MongoDB ++ ++ ++ ++ scm:https://github.com/mongodb/mongo-java-driver.git ++ scm:git@github.com:mongodb/mongo-java-driver.git ++ https://github.com/mongodb/mongo-java-driver ++ ++ ++ ++ org.mongodb ++ bson ++ @VERSION@ ++ ++ ++ org.mongodb ++ mongodb-driver-core ++ @VERSION@ ++ ++ ++ org.slf4j ++ slf4j-api ++ 1.7.6 ++ true ++ ++ ++ junit ++ junit ++ 4.12 ++ test ++ ++ ++ org.hamcrest ++ hamcrest-library ++ 1.3 ++ test ++ ++ ++ ++ src/main ++ src/test/unit ++ ++ ++ maven-compiler-plugin ++ ++ 1.7 ++ 1.7 ++ ++ ++ ++ ++ +diff --git a/mongo-java-driver/pom.xml b/mongo-java-driver/pom.xml +new file mode 100644 +index 0000000..14092e0 +--- /dev/null ++++ b/mongo-java-driver/pom.xml +@@ -0,0 +1,130 @@ ++ ++ ++ 4.0.0 ++ ++ org.mongodb ++ aggregator-project ++ @VERSION@ ++ ++ org.mongodb ++ mongo-java-driver ++ @VERSION@ ++ MongoDB Java Driver ++ The MongoDB Java Driver uber-artifact, containing mongodb-driver, mongodb-driver-core, and bson ++ http://www.mongodb.org ++ bundle ++ ++ ++ The Apache Software License, Version 2.0 ++ http://www.apache.org/licenses/LICENSE-2.0.txt ++ repo ++ ++ ++ ++ ++ Various ++ MongoDB ++ ++ ++ ++ scm:https://github.com/mongodb/mongo-java-driver.git ++ scm:git@github.com:mongodb/mongo-java-driver.git ++ https://github.com/mongodb/mongo-java-driver ++ ++ ++ ++ io.netty ++ netty-buffer ++ 4.0.26.Final ++ true ++ ++ ++ io.netty ++ netty-transport ++ 4.0.26.Final ++ true ++ ++ ++ io.netty ++ netty-handler ++ 4.0.26.Final ++ true ++ ++ ++ org.slf4j ++ slf4j-api ++ 1.7.6 ++ true ++ ++ ++ org.mongodb ++ mongodb-driver ++ @VERSION@ ++ true ++ ++ ++ org.mongodb ++ mongodb-driver-core ++ @VERSION@ ++ true ++ ++ ++ org.mongodb ++ bson ++ @VERSION@ ++ true ++ ++ ++ ++ ++ ++ maven-shade-plugin ++ 2.4.3 ++ ++ ++ package ++ ++ shade ++ ++ ++ ++ ++ ++ ++ org.mongodb:* ++ ++ ++ ++ ++ ++ org.apache.felix ++ maven-bundle-plugin ++ true ++ ++ ++ Red Hat, Inc. ++ org.mongodb.mongo-java-driver ++ ++ com.mongodb.*, ++ org.bson.*, ++ ++ ++ javax.xml.bind.*, ++ javax.crypto.*, ++ javax.management.*, ++ javax.net.*, ++ javax.security.sasl.*, ++ javax.security.auth.callback.*, ++ org.ietf.jgss.*, ++ io.netty.*;resolution:=optional, ++ org.slf4j;resolution:=optional, ++ ++ ++ <_nouses>true ++ ++ ++ ++ ++ ++ +diff --git a/pom.xml b/pom.xml +new file mode 100644 +index 0000000..63c6925 +--- /dev/null ++++ b/pom.xml +@@ -0,0 +1,27 @@ ++ ++ ++ 4.0.0 ++ org.mongodb ++ aggregator-project ++ @VERSION@ ++ pom ++ ++ mongo-java-driver ++ bson ++ driver-core ++ driver-async ++ driver ++ ++ ++ ++ ++ ++ org.apache.felix ++ maven-bundle-plugin ++ 1.4.0 ++ ++ ++ ++ ++ +-- +2.9.4 + diff --git a/SPECS/mongo-java-driver.spec b/SPECS/mongo-java-driver.spec new file mode 100644 index 0000000..6c3c62c --- /dev/null +++ b/SPECS/mongo-java-driver.spec @@ -0,0 +1,199 @@ +%{?scl:%scl_package mongo-java-driver} +%{!?scl:%global pkg_name %{name}} + +Name: %{?scl_prefix}mongo-java-driver +Version: 3.6.3 +Release: 1%{?dist} +Summary: A Java driver for MongoDB + +Group: Development/Libraries +BuildArch: noarch +License: ASL 2.0 +URL: http://www.mongodb.org/display/DOCS/Java+Language+Center +Source0: https://github.com/mongodb/%{pkg_name}/archive/r%{version}.tar.gz +Patch0: 0001-Maven-support.patch + +BuildRequires: %{?scl_prefix_maven}maven-local +BuildRequires: %{?scl_prefix_maven}mvn(org.slf4j:slf4j-api) +BuildRequires: %{?scl_prefix_maven}mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven.plugins:maven-shade-plugin) +BuildRequires: %{?scl_prefix_maven}mvn(org.hamcrest:hamcrest-library) +BuildRequires: %{?scl_prefix_maven}mvn(org.xerial.snappy:snappy-java) + +BuildRequires: %{?scl_prefix}mvn(io.netty:netty-buffer) +BuildRequires: %{?scl_prefix}mvn(io.netty:netty-transport) +BuildRequires: %{?scl_prefix}mvn(io.netty:netty-handler) + +%description +This is the Java driver for MongoDB. + +%package bson +Summary: A Java-based BSON implementation +Group: Development/Libraries + +%description bson +This is the Java implementation of BSON that the Java driver for +MongoDB ships with. It can be used separately by Java applications +that require BSON. +# Upstream has hinted that eventually, their bson implementation will +# be better separated out: http://bsonspec.org/#/implementation +# To make things easier for when that does happen, for now the jar +# and javadocs for this are in separate subpackages. + +%package driver +Summary: The MongoDB Java Driver +Group: Development/Libraries + +%description driver +The MongoDB Java Driver + +%package driver-core +Summary: The MongoDB Java Operations Layer +Group: Development/Libraries + +%description driver-core +The Java operations layer for the MongoDB Java Driver. Third +parties can wrap this layer to provide custom higher-level APIs + +%package driver-async +Summary: The MongoDB Java Async Driver +Group: Development/Libraries + +%description driver-async +The MongoDB Asynchronous Driver. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation + +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -qn %{pkg_name}-r%{version} + +%patch0 -p1 + +sed -i 's/@VERSION@/%{version}/g' `find -name pom.xml` + +find -name '*.class' -exec rm -f '{}' \; +find -name '*.jar' -exec rm -f '{}' \; + +%mvn_package org.mongodb:bson:* %{pkg_name}-bson +%mvn_package org.mongodb:%{pkg_name}:* %{pkg_name} +%mvn_package org.mongodb:mongodb-driver-core:* %{pkg_name}-driver-core +%mvn_package org.mongodb:mongodb-driver-async:* %{pkg_name}-driver-async +%mvn_package org.mongodb:mongodb-driver:* %{pkg_name}-driver +%mvn_package org.mongodb:mongodb-javadoc-utils:* __noinstall +%mvn_file org.mongodb:bson:* %{pkg_name}/bson +%mvn_file org.mongodb:%{pkg_name}:* %{pkg_name}/mongo +%mvn_file org.mongodb:mongodb-driver-core:* %{pkg_name}/driver-core +%mvn_file org.mongodb:mongodb-driver-async:* %{pkg_name}/driver-async +%mvn_file org.mongodb:mongodb-driver:* %{pkg_name}/driver + +%build +export MAVEN_OPTS="-Xmx2048m" +%mvn_build -- -Dproject.build.sourceEncoding=UTF-8 + +%install +%mvn_install + +%files -f .mfiles-%{pkg_name} -f .mfiles +%doc README.md LICENSE.txt + +%files bson -f .mfiles-%{pkg_name}-bson +%doc README.md LICENSE.txt + +%files driver -f .mfiles-%{pkg_name}-driver +%doc README.md LICENSE.txt + +%files driver-core -f .mfiles-%{pkg_name}-driver-core +%doc README.md LICENSE.txt + +%files driver-async -f .mfiles-%{pkg_name}-driver-async + +%files javadoc -f .mfiles-javadoc +%doc README.md LICENSE.txt + + +%changelog +* Mon Feb 26 2018 Marek Skalický - 3.6.3-1 +- Update to latest upstream release + +* Mon Aug 07 2017 Marek Skalický - 3.5.0-1 +- Update to latest upstream version + +* Fri Jun 23 2017 Michael Simacek - 3.4.2-1 +- Update to 3.4.2 and rh-maven35 + +* Tue Mar 29 2016 Severin Gehwolf - 3.2.1-3 +- Add basic OSGi metadata. + +* Thu Feb 18 2016 Marek Skalicky - 3.2.1-2 +- Fixed directory ownership + +* Tue Feb 2 2016 Marek Skalicky - 3.2.1-1 +- Upgrade to 3.2.1 release (from Fedora 24) + +* Mon Jul 27 2015 Severin Gehwolf - 2.13.2-5 +- Fix bugs in SCL-ization. Most importantly, pkg name prefix. + +* Mon Jul 27 2015 Severin Gehwolf - 2.13.2-4 +- SCL-ize package. + +* Mon Jun 22 2015 Omair Majid - 2.13.2-3 +- Require javapackages-tools, not jpackage-utils. + +* Wed Jun 17 2015 Fedora Release Engineering - 2.13.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Jun 10 2015 Severin Gehwolf - 2.13.2-1 +- Update to lastest upstream version. +- Resolves RHBZ#1178257. + +* Tue Jun 10 2014 Severin Gehwolf - 2.11.3-4 +- Fix FTBFS. Resolves RHBZ#1106228. +- Fix @VERSION@ substitution. Resolves RHBZ#1048200. + +* Sat Jun 07 2014 Fedora Release Engineering - 2.11.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Mar 28 2014 Michael Simacek - 2.11.3-2 +- Use Requires: java-headless rebuild (#1067528) + +* Tue Sep 24 2013 Severin Gehwolf - 2.11.3-1 +- Update to latest upstream release. + +* Thu Sep 05 2013 Omair Majid - 2.11.2-2 +- Do not require -bson subpackage. The classes are present in both jars. + +* Fri Aug 30 2013 Omair Majid - 2.11.2-1 +- Update to 2.11.2 +- Generate tarball from commit tag, according to packaging guidelines + +* Sat Aug 03 2013 Fedora Release Engineering - 2.7.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 2.7.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 2.7.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Apr 24 2012 Jon VanAlten 2.7.3-1 +- Bump to 2.7.3. + +* Mon Jan 16 2012 Alexander Kurtakov 2.6.5-4 +- Add depmap/pom. + +* Fri Jan 13 2012 Fedora Release Engineering - 2.6.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Nov 29 2011 Jon VanAlten - 2.6.5-2 +- Sources moved to lookaside cache where they belong + +* Tue Nov 29 2011 Jon VanAlten - 2.6.5-1 +- Add missing BuildDep: git (git-hash is used during build) + +* Tue Oct 11 2011 Jon VanAlten - 2.6.5-1 +- Initial packaging of mongo-java-driver for Fedora.