[python-backports-ssl_match_hostname/el5] initial el5 build
Erik Johnson
terminalmage at fedoraproject.org
Mon Aug 4 23:50:57 UTC 2014
commit 2638a50de204238dadd350bc2cabf24e79f2add6
Author: Erik Johnson <erik at saltstack.com>
Date: Mon Aug 4 18:50:50 2014 -0500
initial el5 build
python-backports-ssl_match_hostname.spec | 70 ++++++++++++++++++++++--------
1 files changed, 51 insertions(+), 19 deletions(-)
---
diff --git a/python-backports-ssl_match_hostname.spec b/python-backports-ssl_match_hostname.spec
index c739abc..20546cc 100644
--- a/python-backports-ssl_match_hostname.spec
+++ b/python-backports-ssl_match_hostname.spec
@@ -1,18 +1,27 @@
-%global module_name backports.ssl_match_hostname
+%global __python2 /usr/bin/python2.6
+%global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
+%global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
-Name: python-backports-ssl_match_hostname
+%global srcname backports.ssl_match_hostname
+%global realname backports-ssl_match_hostname
+
+Name: python-%{realname}
Version: 3.4.0.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: The ssl.match_hostname() function from Python 3
+Group: Development/Languages
License: Python
-URL: https://bitbucket.org/brandon/backports.ssl_match_hostname
-Source0: http://pypi.python.org/packages/source/b/%{module_name}/%{module_name}-%{version}.tar.gz
+URL: https://bitbucket.org/brandon/%{srcname}
+Source0: http://pypi.python.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{srcname}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-BuildRequires: python2-devel
-BuildRequires: python-setuptools
-Requires: python-backports
+
+BuildRequires: python26-devel
+BuildRequires: python26-distribute
+Requires: python26
+Requires: python26-backports
%description
The Secure Sockets layer is only actually secure if you check the hostname in
@@ -27,30 +36,53 @@ every application to implement the check separately.
This backport brings match_hostname() to users of earlier versions of Python.
The actual code inside comes verbatim from Python 3.2.
+%package -n python26-%{realname}
+Summary: The ssl.match_hostname() function from Python 3
+Group: Development/Languages
+BuildRequires: python26-devel
+BuildRequires: python26-distribute
+Requires: python26
+Requires: python26-backports
+
+%description -n python26-%{realname}
+The Secure Sockets layer is only actually secure if you check the hostname in
+the certificate returned by the server to which you are connecting, and verify
+that it matches to hostname that you are trying to reach.
+
+But the matching logic, defined in RFC2818, can be a bit tricky to implement on
+your own. So the ssl package in the Standard Library of Python 3.2 now includes
+a match_hostname() function for performing this check instead of requiring
+every application to implement the check separately.
+
+This backport brings match_hostname() to users of earlier versions of Python.
+The actual code inside comes verbatim from Python 3.2.
%prep
-%setup -qn %{module_name}-%{version}
+%setup -qn %{srcname}-%{version}
mv src/backports/ssl_match_hostname/README.txt ./
mv src/backports/ssl_match_hostname/LICENSE.txt ./
-
%build
-python setup.py build
-
+%{__python2} setup.py build
%install
-python setup.py install --skip-build --root %{buildroot}
-rm %{buildroot}%{python_sitelib}/backports/__init__.py*
+rm -rf %{buildroot}
+%{__python2} setup.py install --skip-build --root %{buildroot}
+rm %{buildroot}%{python2_sitelib}/backports/__init__.py*
+%clean
+rm -rf %{buildroot}
-%files
-%{!?_licensedir:%global license %%doc}
-%license LICENSE.txt
-%doc README.txt
-%{python_sitelib}/*
+%files -n python26-%{realname}
+%defattr(-,root,root,-)
+%doc README.txt LICENSE.txt
+%{python2_sitelib}/*
%changelog
+* Mon Aug 4 2014 Erik Johnson <erik at saltstack.com> - 3.4.0.2-4
+- Initial EL5 build
+
* Thu Jul 31 2014 Tom Callaway <spot at fedoraproject.org> - 3.4.0.2-3
- fix license handling
More information about the scm-commits
mailing list