diff --git a/.gitignore b/.gitignore index f5368d3..c011aeb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/pymongo-3.6.1.tar.gz +SOURCES/pymongo-4.2.0.tar.gz diff --git a/.python-pymongo.metadata b/.python-pymongo.metadata index 64dfbb2..b79ed03 100644 --- a/.python-pymongo.metadata +++ b/.python-pymongo.metadata @@ -1 +1 @@ -c45d2e4376976362a868823a9f8c01b3df75d7ee SOURCES/pymongo-3.6.1.tar.gz +dad74c5ea6aa8c6ffe30dcb796573bfeb89513f9 SOURCES/pymongo-4.2.0.tar.gz diff --git a/SOURCES/0001-Use-ssl.match_hostname-from-the-Python-stdlib.patch b/SOURCES/0001-Use-ssl.match_hostname-from-the-Python-stdlib.patch deleted file mode 100644 index 9de0fdf..0000000 --- a/SOURCES/0001-Use-ssl.match_hostname-from-the-Python-stdlib.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/pymongo/pool.py b/pymongo/pool.py -index 859d0e0..f55fd8e 100644 ---- a/pymongo/pool.py -+++ b/pymongo/pool.py -@@ -49,8 +49,7 @@ from pymongo.network import (command, - SocketChecker) - from pymongo.read_preferences import ReadPreference - from pymongo.server_type import SERVER_TYPE --# Always use our backport so we always have support for IP address matching --from pymongo.ssl_match_hostname import match_hostname, CertificateError -+from ssl import match_hostname, CertificateError - - # For SNI support. According to RFC6066, section 3, IPv4 and IPv6 literals are - # not permitted for SNI hostname. diff --git a/SPECS/python-pymongo.spec b/SPECS/python-pymongo.spec index 71cb6c8..51a23fe 100644 --- a/SPECS/python-pymongo.spec +++ b/SPECS/python-pymongo.spec @@ -1,60 +1,22 @@ -# Only build on architectures supported by mongodb in RHEL8 -%global mongodb_arches x86_64 ppc64le aarch64 s390x %{arm} - -# Fix private-shared-object-provides error -%{?filter_setup: -%filter_provides_in %{python_sitearch}.*\.so$ -%filter_setup -} - -# Conditionalize tests -%bcond_without tests - -%if 0%{?rhel} > 7 -# Disable python2 build by default -%bcond_with python2 -%else -%bcond_without python2 -%endif +%global bootstrap 0 Name: python-pymongo -Version: 3.6.1 -Release: 5%{?dist} +Version: 4.2.0 +Release: 8%{?dist} # All code is ASL 2.0 except bson/time64*.{c,h} which is MIT License: ASL 2.0 and MIT Summary: Python driver for MongoDB -URL: http://api.mongodb.org/python +URL: https://pymongo.readthedocs.io/en/stable/ Source0: https://github.com/mongodb/mongo-python-driver/archive/%{version}/pymongo-%{version}.tar.gz -# Only build on architectures supported by mongodb in RHEL8 -ExclusiveArch: %{mongodb_arches} - -# This patch removes the bundled ssl.match_hostname library as it was vulnerable to CVE-2013-7440 -# and CVE-2013-2099, and wasn't needed anyway since Fedora >= 22 has the needed module in the Python -# standard library. It also adjusts imports so that they exclusively use the code from Python. -Patch01: 0001-Use-ssl.match_hostname-from-the-Python-stdlib.patch - -%if %{with tests} -%ifnarch armv7hl ppc64 s390 s390x -# These are needed for tests, and the tests don't work on armv7hl. -# MongoDB server is not available on big endian arches (ppc64, s390(x)). -BuildRequires: mongodb-server -BuildRequires: net-tools -BuildRequires: procps-ng +BuildRequires: gcc +BuildRequires: make +%if 0%{!?bootstrap:1} +BuildRequires: python3-sphinx %endif -%endif # with tests - -%if %{with python2} -BuildRequires: python2-tools -BuildRequires: python2-devel -BuildRequires: python2-setuptools -%endif # with python2 - BuildRequires: python3-devel BuildRequires: python3-setuptools -BuildRequires: python3-sphinx - %description The Python driver for MongoDB. @@ -64,28 +26,14 @@ The Python driver for MongoDB. BuildArch: noarch Summary: Documentation for python-pymongo - %description doc Documentation for python-pymongo. -%if %{with python2} -%package -n python2-bson -Summary: Python bson library -%{?python_provide:%python_provide python2-bson} - - -%description -n python2-bson -BSON is a binary-encoded serialization of JSON-like documents. BSON is designed -to be lightweight, traversable, and efficient. BSON, like JSON, supports the -embedding of objects and arrays within other objects and arrays. -%endif # with python2 - %package -n python3-bson Summary: Python bson library %{?python_provide:%python_provide python3-bson} - %description -n python3-bson BSON is a binary-encoded serialization of JSON-like documents. BSON is designed to be lightweight, traversable, and efficient. BSON, like JSON, supports the @@ -93,52 +41,21 @@ embedding of objects and arrays within other objects and arrays. This package contains the python3 version of this module. -%if %{with python2} -%package -n python2-pymongo -Summary: Python driver for MongoDB - -Requires: python2-bson%{?_isa} = %{version}-%{release} -Provides: pymongo = %{version}-%{release} -Obsoletes: pymongo <= 2.1.1-4 -%{?python_provide:%python_provide python2-pymongo} - - -%description -n python2-pymongo -The Python driver for MongoDB. This package contains the python2 version of -this module. -%endif # with python2 - - %package -n python3-pymongo Summary: Python driver for MongoDB Requires: python3-bson%{?_isa} = %{version}-%{release} %{?python_provide:%python_provide python3-pymongo} - %description -n python3-pymongo The Python driver for MongoDB. This package contains the python3 version of this module. -%if %{with python2} -%package -n python2-pymongo-gridfs -Summary: Python GridFS driver for MongoDB -Requires: python2-pymongo%{?_isa} = %{version}-%{release} -Provides: pymongo-gridfs = %{version}-%{release} -Obsoletes: pymongo-gridfs <= 2.1.1-4 -%{?python_provide:%python_provide python2-pymongo-gridfs} - - -%description -n python2-pymongo-gridfs -GridFS is a storage specification for large objects in MongoDB. -%endif # with python2 - %package -n python3-pymongo-gridfs Summary: Python GridFS driver for MongoDB Requires: python3-pymongo%{?_isa} = %{version}-%{release} %{?python_provide:%python_provide python3-pymongo-gridfs} - %description -n python3-pymongo-gridfs GridFS is a storage specification for large objects in MongoDB. This package contains the python3 version of this module. @@ -146,79 +63,30 @@ contains the python3 version of this module. %prep %setup -q -n mongo-python-driver-%{version} -%patch01 -p1 -b .ssl -# Remove the bundled ssl.match_hostname library as it was vulnerable to CVE-2013-7440 -# and CVE-2013-2099, and isn't needed anyway since Fedora >= 22 has the needed module in the Python -# standard library. -rm pymongo/ssl_match_hostname.py %build -%if %{with python2} -%py2_build -%endif # with python2 - %py3_build +%if 0%{!?bootstrap:1} pushd doc -SPHINXBUILD=sphinx-build-3 make %{?_smp_mflags} html +%make_build html popd +%endif %install -%if %{with python2} -%py2_install -# Fix permissions -chmod 755 %{buildroot}%{python2_sitearch}/bson/*.so -chmod 755 %{buildroot}%{python2_sitearch}/pymongo/*.so -%endif # with python2 - %py3_install # Fix permissions chmod 755 %{buildroot}%{python3_sitearch}/bson/*.so chmod 755 %{buildroot}%{python3_sitearch}/pymongo/*.so -%if %{with tests} -%check -# For some reason, the tests never think they can connect to mongod on armv7hl even though netstat -# says it's listening. mongod is not available on big endian arches (ppc64, s390(x)). -%ifnarch armv7hl ppc64 s390 s390x - -if [ "$(netstat -ln | grep :27017)" != "" ] -then - pkill mongod -fi - -mkdir ./mongod -mongod --fork --dbpath ./mongod --logpath ./mongod/mongod.log -# Give MongoDB some time to settle -while [ "$(netstat -ln | grep :27017)" == "" ] -do - sleep 1 -done - -%if %{with python2} -%{__python2} setup.py test || (pkill mongod && exit 1) -%endif # with python2 - -%{__python3} setup.py test || (pkill mongod && exit 1) - -pkill mongod -%endif -%endif # with tests - - %files doc %license LICENSE +%if 0%{!?bootstrap:1} %doc doc/_build/html/* - -%if %{with python2} -%files -n python2-bson -%license LICENSE -%doc README.rst -%{python2_sitearch}/bson -%endif # with python2 +%endif %files -n python3-bson @@ -226,14 +94,6 @@ pkill mongod %doc README.rst %{python3_sitearch}/bson -%if %{with python2} -%files -n python2-pymongo -%license LICENSE -%doc README.rst -%{python2_sitearch}/pymongo -%{python2_sitearch}/pymongo-%{version}-*.egg-info -%endif # with python2 - %files -n python3-pymongo %license LICENSE @@ -241,13 +101,6 @@ pkill mongod %{python3_sitearch}/pymongo %{python3_sitearch}/pymongo-%{version}-*.egg-info -%if %{with python2} -%files -n python2-pymongo-gridfs -%license LICENSE -%doc README.rst -%{python2_sitearch}/gridfs -%endif # with python2 - %files -n python3-pymongo-gridfs %license LICENSE @@ -256,202 +109,118 @@ pkill mongod %changelog -* Tue Jun 18 2019 Johnny Hughes - 3.6.1-5 -- build on armhfp - -* Tue Jun 26 2018 Tomas Orsava - 3.6.1-5 -- Fix checking of running mongod - test only open ports (not I-Node number) - -* Mon Jun 25 2018 Tomas Orsava - 3.6.1-4 -- Only build on architectures supported by mongodb in RHEL8 -- Re-enable tests - -* Tue Jun 19 2018 Charalampos Stratakis - 3.6.1-3 -- Conditionalize the python2 subpackage -- Conditionalize tests and disable them for now - -* Thu Jun 14 2018 Tomas Orsava - 3.6.1-2 -- Switch to using Python 3 version of sphinx - -* Sat Mar 10 2018 Randy Barlow - 3.6.1-1 -- Update to 3.6.1 (#1550757). -- http://api.mongodb.com/python/3.6.1/changelog.html - -* Mon Feb 19 2018 Marek Skalický - 3.6.0-1 -- Rebase to latest release - -* Fri Feb 09 2018 Fedora Release Engineering - 3.5.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Fri Sep 22 2017 Marek Skalický - 3.5.1-1 -- Update to latest version +* Sat Jan 04 2025 Arkady L. Shane - 4.2.0-8 +- Rebuilt for MSVSphere 10 -* Thu Aug 03 2017 Fedora Release Engineering - 3.4.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild +* Fri Jul 19 2024 Fedora Release Engineering - 4.2.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild -* Thu Jul 27 2017 Fedora Release Engineering - 3.4.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild +* Fri Jun 07 2024 Python Maint - 4.2.0-7 +- Rebuilt for Python 3.13 -* Fri Jul 07 2017 Igor Gnatenko - 3.4.0-5 -- Rebuild due to bug in RPM (RHBZ #1468476) +* Fri Jan 26 2024 Fedora Release Engineering - 4.2.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Sat Feb 11 2017 Fedora Release Engineering - 3.4.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild +* Mon Jan 22 2024 Fedora Release Engineering - 4.2.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Fri Jan 06 2017 Randy Barlow - 3.4.0-3 -- Run the test suite in the check section (#1409251). +* Fri Jul 21 2023 Fedora Release Engineering - 4.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild -* Tue Dec 20 2016 Miro Hrončok - 3.4.0-2 -- Rebuild for Python 3.6 +* Tue Jun 13 2023 Python Maint - 4.2.0-3 +- Rebuilt for Python 3.12 -* Sun Dec 18 2016 Randy Barlow - 3.4.0-1 -- Update to 3.4.0 (#1400227). -- Use new install macros. -- Drop unneeded BuildRequires on python-nose. -- pymongo now requires bson by arch as it should. +* Fri Jan 20 2023 Fedora Release Engineering - 4.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild -* Fri Dec 09 2016 Charalampos Stratakis - 3.3.0-6 -- Rebuild for Python 3.6 +* Sat Aug 27 2022 Orion Poplawski - 4.2.0-1 +- Update to 4.2.0 -* Tue Nov 29 2016 Dan Horák - 3.3.0-5 -- Update test BRs +* Fri Jul 22 2022 Fedora Release Engineering - 3.10.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild -* Fri Nov 25 2016 Randy Barlow - 3.3.0-4 -- Run the tests with setup.py test instead of with nosetests. +* Mon Jun 13 2022 Python Maint - 3.10.1-9 +- Rebuilt for Python 3.11 -* Fri Nov 25 2016 Randy Barlow - 3.3.0-3 -- Run the tests against a live mongod. +* Fri Jan 21 2022 Fedora Release Engineering - 3.10.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild -* Tue Jul 19 2016 Fedora Release Engineering - 3.3.0-2 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages +* Fri Jul 23 2021 Fedora Release Engineering - 3.10.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild -* Fri Jul 15 2016 Randy Barlow - 3.3.0-1 -- Update to 3.3.0 (#1356334). -- Remove the exclude arch on big endian systems, since 3.3.0 now supports them. -- Use the newer Python build macros. -- Add a skip test on another test that requires a running mongod. -- Convert the -doc subpackage into a noarch, as it should be. -- python2-pymongo-gridfs now requires python2-pymongo(isa) instead of python-pymongo(isa). -- Build the docs in parallel. +* Fri Jun 04 2021 Python Maint - 3.10.1-6 +- Rebuilt for Python 3.10 -* Tue Mar 15 2016 Randy Barlow - 3.2.2-1 -- Update to 3.2.2 (#1318073). +* Wed Jan 27 2021 Fedora Release Engineering - 3.10.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild -* Wed Feb 03 2016 Randy Barlow - 3.2.1-1 -- Remove use of needless defattr macros (#1303426). -- Update to 3.2.1 (#1304137). -- Remove lots of if statements as this spec file will only be used on Rawhide. -- Remove dependency on python-backports-ssl_match_hostname as it is not needed in Fedora. -- Rework the patch for CVE-2013-7440 and CVE-2013-2099 so that it exclusively uses code from Python. +* Wed Jul 29 2020 Fedora Release Engineering - 3.10.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild -* Tue Jan 19 2016 Randy Barlow - 3.2-1 -- Update to 3.2. -- Rename the python- subpackages with a python2- prefix. -- Add a -doc subpackage with built html docs. -- Skip a few new tests that use MongoDB. -- Reorganize the spec file a bit. -- Use the license macro. -- Pull source from GitHub. +* Sun May 24 2020 Miro Hrončok - 3.10.1-3 +- Rebuilt for Python 3.9 -* Mon Jan 18 2016 Randy Barlow - 3.0.3-3 -- Do not use 2to3 for Python 3 (#1294130). +* Thu Jan 30 2020 Fedora Release Engineering - 3.10.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild -* Wed Nov 04 2015 Matej Stuchlik - 3.0.3-2 -- Rebuilt for Python 3.5 +* Tue Jan 21 2020 Randy Barlow - 3.10.1-1 +- Update to 3.10.1 (#1782385). +- https://github.com/mongodb/mongo-python-driver/blob/3.10.1/doc/changelog.rst -* Thu Oct 01 2015 Haïkel Guémar - 3.0.3-1 -- Upstream 3.0.3 -- Fix CVE-2013-7440 (RHBZ#1231231 #1231232) +* Thu Oct 03 2019 Miro Hrončok - 3.8.0-4 +- Rebuilt for Python 3.8.0rc1 (#1748018) -* Thu Jun 18 2015 Fedora Release Engineering - 2.5.2-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild +* Sun Aug 18 2019 Miro Hrončok - 3.8.0-3 +- Rebuilt for Python 3.8 -* Sun Aug 17 2014 Fedora Release Engineering - 2.5.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild +* Fri Jul 26 2019 Fedora Release Engineering - 3.8.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild -* Sat Jun 07 2014 Fedora Release Engineering - 2.5.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild +* Tue Jun 04 2019 Randy Barlow - 3.8.0-1 +- Update to 3.8.0 (#1686670). +- http://api.mongodb.com/python/3.8.0/changelog.html -* Wed May 14 2014 Bohuslav Kabrda - 2.5.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 +* Tue Mar 26 2019 Randy Barlow - 3.7.2-2 +- Drop build dependency on mongodb-server, since it is no longer shipped in Fedora. +- As a result of the above, we no longer run the tests. -* Sun Aug 04 2013 Fedora Release Engineering - 2.5.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild +* Thu Feb 28 2019 Yatin Karel - 3.7.2-1 +- Update to 3.7.2 +- http://api.mongodb.com/python/3.7.2/changelog.html -* Thu Jun 13 2013 Andrew McNabb - 2.5.2-2 -- Bump the obsoletes version for pymongo-gridfs +* Sat Feb 02 2019 Fedora Release Engineering - 3.7.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild -* Wed Jun 12 2013 Andrew McNabb - 2.5.2-1 -- Update to pymongo 2.5.2 +* Mon Jan 28 2019 Miro Hrončok - 3.7.1-3 +- Subpackages python2-bson, python2-pymongo, python2-pymongo-gridfs have been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal -* Tue Jun 11 2013 Andrew McNabb - 2.5-5 -- Bump the obsoletes version +* Mon Dec 10 2018 Honza Horak - 3.7.1-3 +- Add bootstrap macro and python2 condition -* Wed Apr 24 2013 Andrew McNabb - 2.5-4 -- Fix the test running procedure +* Tue Jul 31 2018 Florian Weimer - 3.7.1-2 +- Rebuild with fixed binutils -* Wed Apr 24 2013 Andrew McNabb - 2.5-3 -- Exclude tests in pymongo 2.5 that depend on MongoDB +* Mon Jul 30 2018 Randy Barlow - 3.7.1-1 +- Update to 3.7.1 (#1601651). +- http://api.mongodb.com/python/3.7.1/changelog.html -* Mon Apr 22 2013 Andrew McNabb - 2.5-1 -- Update to PyMongo 2.5 (bug #954152) +* Sat Jul 14 2018 Fedora Release Engineering - 3.6.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild -* Thu Feb 14 2013 Fedora Release Engineering - 2.3-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild +* Tue Jun 19 2018 Miro Hrončok - 3.6.1-2 +- Rebuilt for Python 3.7 -* Sat Jan 5 2013 Andrew McNabb - 2.3-6 -- Fix dependency of python3-pymongo-gridfs (bug #892214) - -* Tue Nov 27 2012 Andrew McNabb - 2.3-5 -- Fix the name of the python-pymongo-gridfs subpackage - -* Tue Nov 27 2012 Andrew McNabb - 2.3-4 -- Fix obsoletes for python-pymongo-gridfs subpackage - -* Tue Nov 27 2012 Andrew McNabb - 2.3-3 -- Fix requires to include the arch, and add docs to all subpackages - -* Tue Nov 27 2012 Andrew McNabb - 2.3-2 -- Remove preexisting egg-info - -* Mon Nov 26 2012 Andrew McNabb - 2.3-1 -- Rename, update to 2.3, and add support for Python 3 - -* Sat Jul 21 2012 Fedora Release Engineering - 2.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Tue Apr 10 2012 Silas Sewell - 2.1.1-1 -- Update to 2.1.1 - -* Sat Jan 14 2012 Fedora Release Engineering - 1.11-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Sun Jul 24 2011 Silas Sewell - 1.11-1 -- Update to 1.11 - -* Tue Feb 08 2011 Fedora Release Engineering - 1.9-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Nov 18 2010 Dan Horák - 1.9-5 -- add ExcludeArch to match mongodb package - -* Tue Oct 26 2010 Silas Sewell - 1.9-4 -- Add comment about multi-license - -* Thu Oct 21 2010 Silas Sewell - 1.9-3 -- Fixed tests so they actually run -- Change python-devel to python2-devel - -* Wed Oct 20 2010 Silas Sewell - 1.9-2 -- Add check section -- Use correct .so filter -- Added python3 stuff (although disabled) +* Sat Mar 10 2018 Randy Barlow - 3.6.1-1 +- Update to 3.6.1 (#1550757). +- http://api.mongodb.com/python/3.6.1/changelog.html -* Tue Sep 28 2010 Silas Sewell - 1.9-1 -- Update to 1.9 +* Tue Feb 27 2018 Iryna Shcherbina - 3.6.0-2 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) -* Tue Sep 28 2010 Silas Sewell - 1.8.1-1 -- Update to 1.8.1 +* Mon Feb 19 2018 Marek Skalický - 3.6.0-1 +- Rebase to latest release -* Sat Dec 05 2009 Silas Sewell - 1.1.2-1 -- Initial build +* Fri Feb 09 2018 Fedora Release Engineering - 3.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild