From 858c69d56e93beab36e7bc5d726f14427a3b4e05 Mon Sep 17 00:00:00 2001 From: akhila-guruju Date: Sat, 21 Dec 2024 11:08:02 +0000 Subject: [PATCH 1/4] Upgrade: python-pymongo version to 4.2.0 --- ...atch_hostname-from-the-Python-stdlib.patch | 14 --- .../python-pymongo.signatures.json | 8 +- .../python-pymongo/python-pymongo.spec | 103 ++++++++++++------ cgmanifest.json | 4 +- 4 files changed, 75 insertions(+), 54 deletions(-) delete mode 100644 SPECS-EXTENDED/python-pymongo/SOURCES/0001-Use-ssl.match_hostname-from-the-Python-stdlib.patch diff --git a/SPECS-EXTENDED/python-pymongo/SOURCES/0001-Use-ssl.match_hostname-from-the-Python-stdlib.patch b/SPECS-EXTENDED/python-pymongo/SOURCES/0001-Use-ssl.match_hostname-from-the-Python-stdlib.patch deleted file mode 100644 index 9de0fdf1b16..00000000000 --- a/SPECS-EXTENDED/python-pymongo/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-EXTENDED/python-pymongo/python-pymongo.signatures.json b/SPECS-EXTENDED/python-pymongo/python-pymongo.signatures.json index 0353f3916ab..62b12518851 100644 --- a/SPECS-EXTENDED/python-pymongo/python-pymongo.signatures.json +++ b/SPECS-EXTENDED/python-pymongo/python-pymongo.signatures.json @@ -1,5 +1,5 @@ { - "Signatures": { - "pymongo-3.10.1.tar.gz": "24dc5aa6f379de44ce5299b610d72e92a401a2b4fdac3516dfed536cc5b080fe" - } -} + "Signatures": { + "python-pymongo-4.2.0.tar.gz": "efd44e18a6f16156f8495d7786afbdc3952d1d09cfe9ad022bee3b86a6535e3f" + } +} \ No newline at end of file diff --git a/SPECS-EXTENDED/python-pymongo/python-pymongo.spec b/SPECS-EXTENDED/python-pymongo/python-pymongo.spec index 96b485df4eb..a376b565f5b 100644 --- a/SPECS-EXTENDED/python-pymongo/python-pymongo.spec +++ b/SPECS-EXTENDED/python-pymongo/python-pymongo.spec @@ -1,38 +1,29 @@ %global bootstrap 0 -%{!?python3_sitearch: %define python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} -%{!?__python3: %global __python3 /usr/bin/python3} -%{!?py3_build: %define py3_build CFLAGS="%{optflags}" %{__python3} setup.py build} -%{!?py3_install: %define py3_install %{__python3} setup.py install --skip-build --root %{buildroot}} - Name: python-pymongo -Version: 3.10.1 -Release: 6%{?dist} -# All code is ASL 2.0 except for: -# - bson/time64*.{c,h} - MIT, -# - encoding_helpers.c - Unicode with a "Portions Copyright 2001 Unicode, Inc." header, -# - ssl_match_hostname.py - Python-2.0 -License: ASL 2.0 and MIT and Python-2.0 and Unicode -Summary: Python driver for MongoDB -URL: https://github.com/mongodb/mongo-python-driver +Version: 4.2.0 +Release: 9%{?dist} + +# All code is ASL 2.0 except bson/time64*.{c,h} which is MIT +License: ASL 2.0 and MIT Vendor: Microsoft Corporation Distribution: Azure Linux -Source0: https://github.com/mongodb/mongo-python-driver/archive/%{version}/pymongo-%{version}.tar.gz -# 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 +Summary: Python driver for MongoDB +URL: https://pymongo.readthedocs.io/en/stable/ +Source0: https://github.com/mongodb/mongo-python-driver/archive/%{version}/pymongo-%{version}.tar.gz#/%{name}-%{version}.tar.gz + BuildRequires: gcc +BuildRequires: make %if 0%{!?bootstrap:1} BuildRequires: python3-sphinx %endif BuildRequires: python3-devel BuildRequires: python3-setuptools -BuildRequires: python3-xml %description The Python driver for MongoDB. + %package doc BuildArch: noarch Summary: Documentation for python-pymongo @@ -40,6 +31,7 @@ Summary: Documentation for python-pymongo %description doc Documentation for python-pymongo. + %package -n python3-bson Summary: Python bson library %{?python_provide:%python_provide python3-bson} @@ -50,6 +42,7 @@ to be lightweight, traversable, and efficient. BSON, like JSON, supports the embedding of objects and arrays within other objects and arrays. This package contains the python3 version of this module. + %package -n python3-pymongo Summary: Python driver for MongoDB Requires: python3-bson%{?_isa} = %{version}-%{release} @@ -59,6 +52,7 @@ Requires: python3-bson%{?_isa} = %{version}-%{release} The Python driver for MongoDB. This package contains the python3 version of this module. + %package -n python3-pymongo-gridfs Summary: Python GridFS driver for MongoDB Requires: python3-pymongo%{?_isa} = %{version}-%{release} @@ -68,59 +62,100 @@ Requires: python3-pymongo%{?_isa} = %{version}-%{release} GridFS is a storage specification for large objects in MongoDB. This package contains the python3 version of this module. + %prep %setup -q -n mongo-python-driver-%{version} -%patch 01 -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 %py3_build %if 0%{!?bootstrap:1} pushd doc -make %{?_smp_mflags} html +%make_build html popd %endif + %install %py3_install # Fix permissions chmod 755 %{buildroot}%{python3_sitearch}/bson/*.so chmod 755 %{buildroot}%{python3_sitearch}/pymongo/*.so + %files doc -%license LICENSE THIRD-PARTY-NOTICES +%license LICENSE %if 0%{!?bootstrap:1} %doc doc/_build/html/* %endif + %files -n python3-bson -%license LICENSE THIRD-PARTY-NOTICES +%license LICENSE %doc README.rst %{python3_sitearch}/bson + %files -n python3-pymongo -%license LICENSE THIRD-PARTY-NOTICES +%license LICENSE %doc README.rst %{python3_sitearch}/pymongo %{python3_sitearch}/pymongo-%{version}-*.egg-info + %files -n python3-pymongo-gridfs -%license LICENSE THIRD-PARTY-NOTICES +%license LICENSE %doc README.rst %{python3_sitearch}/gridfs + %changelog -* Tue Sep 03 2024 Pawel Winogrodzki - 3.10.1-6 -- Release bump to fix package information. +* Fri Dec 20 2024 Akhila Guruju - 4.2.0-9 +- Initial Azure Linux import from Fedora 41 (license: MIT). - License verified. -* Mon Oct 19 2020 Steve Laughman - 3.10.1-5 -- Initial CBL-Mariner import from Fedora 33 (license: MIT) +* Fri Jul 19 2024 Fedora Release Engineering - 4.2.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 4.2.0-7 +- Rebuilt for Python 3.13 + +* Fri Jan 26 2024 Fedora Release Engineering - 4.2.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 4.2.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 4.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 4.2.0-3 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 4.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Aug 27 2022 Orion Poplawski - 4.2.0-1 +- Update to 4.2.0 + +* Fri Jul 22 2022 Fedora Release Engineering - 3.10.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 3.10.1-9 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 3.10.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.10.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 3.10.1-6 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 3.10.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 3.10.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/cgmanifest.json b/cgmanifest.json index 4677d2e58ba..cfdb1c41f45 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -23953,8 +23953,8 @@ "type": "other", "other": { "name": "python-pymongo", - "version": "3.10.1", - "downloadUrl": "https://github.com/mongodb/mongo-python-driver/archive/3.10.1/pymongo-3.10.1.tar.gz" + "version": "4.2.0", + "downloadUrl": "https://github.com/mongodb/mongo-python-driver/archive/refs/tags/4.2.0.tar.gz" } } }, From 14f3cea27ea5d39d138225bdbdfb57d2590c3cf5 Mon Sep 17 00:00:00 2001 From: akhila-guruju Date: Tue, 7 Jan 2025 06:50:02 +0000 Subject: [PATCH 2/4] Modified Source URL same as the URL in cgmanifest.json --- .../python-pymongo/python-pymongo.spec | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/SPECS-EXTENDED/python-pymongo/python-pymongo.spec b/SPECS-EXTENDED/python-pymongo/python-pymongo.spec index a376b565f5b..064fbd98984 100644 --- a/SPECS-EXTENDED/python-pymongo/python-pymongo.spec +++ b/SPECS-EXTENDED/python-pymongo/python-pymongo.spec @@ -3,15 +3,13 @@ Name: python-pymongo Version: 4.2.0 Release: 9%{?dist} - # All code is ASL 2.0 except bson/time64*.{c,h} which is MIT License: ASL 2.0 and MIT Vendor: Microsoft Corporation Distribution: Azure Linux Summary: Python driver for MongoDB URL: https://pymongo.readthedocs.io/en/stable/ -Source0: https://github.com/mongodb/mongo-python-driver/archive/%{version}/pymongo-%{version}.tar.gz#/%{name}-%{version}.tar.gz - +Source0: https://github.com/mongodb/mongo-python-driver/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: make %if 0%{!?bootstrap:1} @@ -23,7 +21,6 @@ BuildRequires: python3-setuptools %description The Python driver for MongoDB. - %package doc BuildArch: noarch Summary: Documentation for python-pymongo @@ -31,7 +28,6 @@ Summary: Documentation for python-pymongo %description doc Documentation for python-pymongo. - %package -n python3-bson Summary: Python bson library %{?python_provide:%python_provide python3-bson} @@ -42,7 +38,6 @@ to be lightweight, traversable, and efficient. BSON, like JSON, supports the embedding of objects and arrays within other objects and arrays. This package contains the python3 version of this module. - %package -n python3-pymongo Summary: Python driver for MongoDB Requires: python3-bson%{?_isa} = %{version}-%{release} @@ -52,7 +47,6 @@ Requires: python3-bson%{?_isa} = %{version}-%{release} The Python driver for MongoDB. This package contains the python3 version of this module. - %package -n python3-pymongo-gridfs Summary: Python GridFS driver for MongoDB Requires: python3-pymongo%{?_isa} = %{version}-%{release} @@ -62,11 +56,9 @@ Requires: python3-pymongo%{?_isa} = %{version}-%{release} GridFS is a storage specification for large objects in MongoDB. This package contains the python3 version of this module. - %prep %setup -q -n mongo-python-driver-%{version} - %build %py3_build @@ -76,40 +68,34 @@ pushd doc popd %endif - %install %py3_install # Fix permissions chmod 755 %{buildroot}%{python3_sitearch}/bson/*.so chmod 755 %{buildroot}%{python3_sitearch}/pymongo/*.so - %files doc %license LICENSE %if 0%{!?bootstrap:1} %doc doc/_build/html/* %endif - %files -n python3-bson %license LICENSE %doc README.rst %{python3_sitearch}/bson - %files -n python3-pymongo %license LICENSE %doc README.rst %{python3_sitearch}/pymongo %{python3_sitearch}/pymongo-%{version}-*.egg-info - %files -n python3-pymongo-gridfs %license LICENSE %doc README.rst %{python3_sitearch}/gridfs - %changelog * Fri Dec 20 2024 Akhila Guruju - 4.2.0-9 - Initial Azure Linux import from Fedora 41 (license: MIT). From 7c8f69caca7dc2e477cfd306c8e79d2ea94891e1 Mon Sep 17 00:00:00 2001 From: akhila-guruju Date: Tue, 21 Jan 2025 11:21:26 +0000 Subject: [PATCH 3/4] Rebased with latest 3.0-dev --- SPECS-EXTENDED/python-pymongo/python-pymongo.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS-EXTENDED/python-pymongo/python-pymongo.spec b/SPECS-EXTENDED/python-pymongo/python-pymongo.spec index 064fbd98984..4d9b5218142 100644 --- a/SPECS-EXTENDED/python-pymongo/python-pymongo.spec +++ b/SPECS-EXTENDED/python-pymongo/python-pymongo.spec @@ -97,7 +97,7 @@ chmod 755 %{buildroot}%{python3_sitearch}/pymongo/*.so %{python3_sitearch}/gridfs %changelog -* Fri Dec 20 2024 Akhila Guruju - 4.2.0-9 +* Mon Dec 23 2024 Akhila Guruju - 4.2.0-9 - Initial Azure Linux import from Fedora 41 (license: MIT). - License verified. From bd2ca8e747b6e89475ed59a3f938bf7ce06b2b17 Mon Sep 17 00:00:00 2001 From: akhila-guruju Date: Tue, 11 Feb 2025 04:22:49 +0000 Subject: [PATCH 4/4] used autosetup macro --- SPECS-EXTENDED/python-pymongo/python-pymongo.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS-EXTENDED/python-pymongo/python-pymongo.spec b/SPECS-EXTENDED/python-pymongo/python-pymongo.spec index 4d9b5218142..38313658013 100644 --- a/SPECS-EXTENDED/python-pymongo/python-pymongo.spec +++ b/SPECS-EXTENDED/python-pymongo/python-pymongo.spec @@ -57,7 +57,7 @@ GridFS is a storage specification for large objects in MongoDB. This package contains the python3 version of this module. %prep -%setup -q -n mongo-python-driver-%{version} +%autosetup -n mongo-python-driver-%{version} %build %py3_build