|
|
|
@ -1,11 +1,12 @@
|
|
|
|
|
%global srcname urllib3
|
|
|
|
|
|
|
|
|
|
# When bootstrapping Python, we cannot test this yet
|
|
|
|
|
# Tests are disabled to remove the test dependencies
|
|
|
|
|
# Specify --with tests to run the tests on e.g. EPEL
|
|
|
|
|
%bcond_with tests
|
|
|
|
|
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
|
Version: 1.25.7
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Version: 1.26.5
|
|
|
|
|
Release: 5%{?dist}.1
|
|
|
|
|
Summary: Python HTTP library with thread-safe connection pooling and file post
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
@ -13,42 +14,61 @@ URL: https://github.com/urllib3/urllib3
|
|
|
|
|
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
|
|
|
|
|
# Unbundle ssl_match_hostname since we depend on it
|
|
|
|
|
Source1: ssl_match_hostname_py3.py
|
|
|
|
|
# CVE-2021-33503 Catastrophic backtracking in URL authority parser
|
|
|
|
|
# Tracking bug: https://bugzilla.redhat.com/show_bug.cgi?id=1968074
|
|
|
|
|
# Upstream fix: https://github.com/urllib3/urllib3/commit/2d4a3fee6de2fa45eb82169361918f759269b4ec
|
|
|
|
|
Patch0: CVE-2021-33503.patch
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# Exclude i686 arch. Due to a modularity issue it's being added to the
|
|
|
|
|
# x86_64 compose of CRB, but we don't want to ship it at all.
|
|
|
|
|
# See: https://projects.engineering.redhat.com/browse/RCM-72605
|
|
|
|
|
ExcludeArch: i686
|
|
|
|
|
|
|
|
|
|
# CVE-2023-43804
|
|
|
|
|
# Added the `Cookie` header to the list of headers to strip from
|
|
|
|
|
# requests when redirecting to a different host. As before, different headers
|
|
|
|
|
# can be set via `Retry.remove_headers_on_redirect`.
|
|
|
|
|
# Tests backported only partially as we don't use the whole part of
|
|
|
|
|
# testing with dummyserver.
|
|
|
|
|
# Tracking bug: https://bugzilla.redhat.com/show_bug.cgi?id=2242493
|
|
|
|
|
# Upstream fix: https://github.com/urllib3/urllib3/commit/01220354d389cd05474713f8c982d05c9b17aafb
|
|
|
|
|
Patch1: CVE-2023-43804.patch
|
|
|
|
|
|
|
|
|
|
# CVE-2023-45803
|
|
|
|
|
# Remove HTTP request body when request method is changed.
|
|
|
|
|
# Tracking bug: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2023-45803
|
|
|
|
|
# Upstream fix: https://github.com/urllib3/urllib3/commit/4e98d57809dacab1cbe625fddeec1a290c478ea9
|
|
|
|
|
Patch2: CVE-2023-45803.patch
|
|
|
|
|
|
|
|
|
|
# PoolManager.urlopen fails with TypeError for http connection if the PoolManager is instantiated with server_hostname
|
|
|
|
|
# Tracking bug: https://issues.redhat.com/browse/RHEL-39285
|
|
|
|
|
# Upstream fix: https://github.com/urllib3/urllib3/commit/f1d40fd07f7b5d9cf846a18fb5a920b4be07dfc5
|
|
|
|
|
Patch3: Add-server_hostname-to-SSL_KEYWORDS.patch
|
|
|
|
|
|
|
|
|
|
# CVE-2024-37891
|
|
|
|
|
# Proxy-authorization request header is not stripped during cross-origin redirects.
|
|
|
|
|
# Tracking bug: https://issues.redhat.com/browse/RHEL-43172
|
|
|
|
|
# Upstream fix: https://github.com/urllib3/urllib3/commit/40b6d1605814dd1db0a46e202d6e56f2e4c9a468
|
|
|
|
|
Patch4: CVE-2024-37891.patch
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Python HTTP module with connection pooling and file POST abilities.
|
|
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
|
Summary: Python3 HTTP library with thread-safe connection pooling and file post
|
|
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-nose
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-mock
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-six
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pysocks
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-tornado
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-trustme
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-idna
|
|
|
|
|
BuildRequires: python3-dateutil
|
|
|
|
|
BuildRequires: python3-six
|
|
|
|
|
BuildRequires: python3-pysocks
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python3-pytest-freezegun
|
|
|
|
|
BuildRequires: python3-pytest-timeout
|
|
|
|
|
BuildRequires: python3-tornado
|
|
|
|
|
BuildRequires: python3-trustme
|
|
|
|
|
BuildRequires: python3-idna
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Requires: ca-certificates
|
|
|
|
|
Requires: python%{python3_pkgversion}-idna
|
|
|
|
|
Requires: python%{python3_pkgversion}-six
|
|
|
|
|
Requires: python%{python3_pkgversion}-pysocks
|
|
|
|
|
Requires: python3-idna
|
|
|
|
|
Requires: python3-six
|
|
|
|
|
Requires: python3-pysocks
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
|
%description -n python3-%{srcname}
|
|
|
|
|
Python3 HTTP module with connection pooling and file POST abilities.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -85,6 +105,11 @@ rm -rf test/contrib/
|
|
|
|
|
# fail when combined with the unbundling of backports-ssl_match_hostname
|
|
|
|
|
rm -f test/test_no_ssl.py
|
|
|
|
|
|
|
|
|
|
# Use the standard library instead of a backport
|
|
|
|
|
sed -i -e 's/^import mock/from unittest import mock/' \
|
|
|
|
|
-e 's/^from mock import /from unittest.mock import /' \
|
|
|
|
|
test/*.py docs/conf.py
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
@ -93,8 +118,8 @@ rm -f test/test_no_ssl.py
|
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
|
|
# Unbundle the Python 3 build
|
|
|
|
|
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py*
|
|
|
|
|
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six*
|
|
|
|
|
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
|
|
|
|
|
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six.*
|
|
|
|
|
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/
|
|
|
|
@ -108,13 +133,11 @@ ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
pushd test
|
|
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pytest -v
|
|
|
|
|
popd
|
|
|
|
|
%pytest -v
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
|
|
|
|
|
%{python3_sitelib}/urllib3/
|
|
|
|
@ -122,19 +145,71 @@ popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Dec 12 2023 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.25.7-5
|
|
|
|
|
- Rebuilt for MSVSphere 8.8
|
|
|
|
|
|
|
|
|
|
* Tue Jun 29 2021 Lumír Balhar <lbalhar@redhat.com> - 1.25.7-5
|
|
|
|
|
* Tue Jun 18 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 1.26.5-5.1
|
|
|
|
|
- Security fix for CVE-2024-37891
|
|
|
|
|
- Backport upstream patch to fix TypeError for http connection if the PoolManager
|
|
|
|
|
- is instantiated with server_hostname
|
|
|
|
|
Resolves: RHEL-49853
|
|
|
|
|
|
|
|
|
|
* Tue Dec 12 2023 Lumír Balhar <lbalhar@redhat.com> - 1.26.5-5
|
|
|
|
|
- Security fix for CVE-2023-45803
|
|
|
|
|
Resolves: RHEL-16874
|
|
|
|
|
|
|
|
|
|
* Thu Oct 12 2023 Lumír Balhar <lbalhar@redhat.com> - 1.26.5-4
|
|
|
|
|
- Security fix for CVE-2023-43804
|
|
|
|
|
Resolves: RHEL-12001
|
|
|
|
|
|
|
|
|
|
* Tue Feb 08 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 1.26.5-3
|
|
|
|
|
- Add automatically generated Obsoletes tag with the python39- prefix
|
|
|
|
|
for smoother upgrade from RHEL8
|
|
|
|
|
- Related: rhbz#1990421
|
|
|
|
|
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.26.5-2
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Wed Jun 16 2021 Karolina Surma <ksurma@redhat.com> - 1.26.5-1
|
|
|
|
|
- Update to 1.26.5
|
|
|
|
|
- Fix for CVE-2021-33503 Catastrophic backtracking in URL authority parser
|
|
|
|
|
Resolves: rhbz#1968074
|
|
|
|
|
Resolves: rhbz#1972639
|
|
|
|
|
|
|
|
|
|
* Tue May 18 2021 Miro Hrončok <mhroncok@redhat.com> - 1.26.4-1
|
|
|
|
|
- Update to 1.26.4
|
|
|
|
|
Resolves: rhbz#1935737
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.25.10-6
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Mon Mar 08 2021 Charalampos Stratakis <cstratak@redhat.com> - 1.25.10-5
|
|
|
|
|
- Disable tests on RHEL9 to remove the python-tornado dependency
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.10-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 15 2021 Miro Hrončok <mhroncok@redhat.com> - 1.25.10-3
|
|
|
|
|
- Drop redundant BuildRequires for nose
|
|
|
|
|
- Instead of the mock backport, use unittest.mock from the standard library
|
|
|
|
|
|
|
|
|
|
* Tue Jan 05 2021 Anna Khaitovich <akhaitov@redhat.com> - 1.25.10-2
|
|
|
|
|
- Update RECENT_DATE dynamically
|
|
|
|
|
|
|
|
|
|
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 1.25.7-4
|
|
|
|
|
- Exclude unsupported i686 arch
|
|
|
|
|
* Sun Sep 27 2020 Kevin Fenzi <kevin@scrye.com> - 1.25.10-1
|
|
|
|
|
- Update to 1.25.10. Fixed bug #1824900
|
|
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.8-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 1.25.8-3
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1.25.8-2
|
|
|
|
|
- Bootstrap for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Sun Mar 22 2020 Carl George <carl@george.computer> - 1.25.8-1
|
|
|
|
|
- Latest upstream rhbz#1771186
|
|
|
|
|
|
|
|
|
|
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 1.25.7-3
|
|
|
|
|
- Adjusted for Python 3.8 module in RHEL 8
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.7-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Nov 18 2019 Miro Hrončok <mhroncok@redhat.com> - 1.25.7-2
|
|
|
|
|
- Subpackage python2-urllib3 has been removed
|
|
|
|
|