Blame SPECS/python-backports-ssl_match_hostname.spec

f6c4e1
%global module_name backports.ssl_match_hostname
f6c4e1
f6c4e1
Name:           python-backports-ssl_match_hostname
f6c4e1
Version:        3.5.0.1
f6c4e1
Release:        12%{?dist}
f6c4e1
Summary:        The ssl.match_hostname() function from Python 3
f6c4e1
f6c4e1
License:        Python
f6c4e1
URL:            https://bitbucket.org/brandon/backports.ssl_match_hostname
f6c4e1
Source0:        https://pypi.python.org/packages/source/b/%{module_name}/%{module_name}-%{version}.tar.gz
f6c4e1
f6c4e1
BuildArch:      noarch
f6c4e1
BuildRequires:  python2-devel
f6c4e1
f6c4e1
%global _description\
f6c4e1
The Secure Sockets layer is only actually secure if you check the hostname in\
f6c4e1
the certificate returned by the server to which you are connecting, and verify\
f6c4e1
that it matches to hostname that you are trying to reach.\
f6c4e1
\
f6c4e1
But the matching logic, defined in RFC2818, can be a bit tricky to implement on\
f6c4e1
your own. So the ssl package in the Standard Library of Python 3.2 now includes\
f6c4e1
a match_hostname() function for performing this check instead of requiring\
f6c4e1
every application to implement the check separately.\
f6c4e1
\
f6c4e1
This backport brings match_hostname() to users of earlier versions of Python.\
f6c4e1
The actual code is only slightly modified from Python 3.5.\
f6c4e1
f6c4e1
f6c4e1
%description %_description
f6c4e1
f6c4e1
%package -n python2-backports-ssl_match_hostname
f6c4e1
Summary: %summary
f6c4e1
Requires: python2-backports
f6c4e1
Requires: python2-ipaddress
f6c4e1
%{?python_provide:%python_provide python2-backports-ssl_match_hostname}
f6c4e1
f6c4e1
%description -n python2-backports-ssl_match_hostname %_description
f6c4e1
f6c4e1
%prep
f6c4e1
%setup -qn %{module_name}-%{version}
f6c4e1
f6c4e1
cp backports/ssl_match_hostname/README.txt ./
f6c4e1
cp backports/ssl_match_hostname/LICENSE.txt ./
f6c4e1
f6c4e1
%build
f6c4e1
python2 setup.py build
f6c4e1
f6c4e1
%install
f6c4e1
python2 setup.py install --skip-build --root %{buildroot}
f6c4e1
rm -f %{buildroot}%{python2_sitelib}/backports/__init__.py*
f6c4e1
f6c4e1
%files -n python2-backports-ssl_match_hostname
f6c4e1
%{!?_licensedir:%global license %%doc}
f6c4e1
%license LICENSE.txt
f6c4e1
%doc README.txt
f6c4e1
%{python2_sitelib}/backports/ssl_match_hostname/
f6c4e1
%{python2_sitelib}/backports.ssl_match_hostname-%{version}-*egg*
f6c4e1
f6c4e1
%changelog
f6c4e1
* Wed Dec 16 2020 Tomas Orsava <torsava@redhat.com> - 3.5.0.1-12
f6c4e1
- Remove unversioned Provides
f6c4e1
- Resolves: rhbz#1908300
f6c4e1
f6c4e1
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 3.5.0.1-11
f6c4e1
- Bumping due to problems with modular RPM upgrade path
f6c4e1
- Resolves: rhbz#1695587
f6c4e1
f6c4e1
* Mon Jul 16 2018 Lumír Balhar <lbalhar@redhat.com> - 3.5.0.1-10
f6c4e1
- First version for python27 module