[packages/python-backports-ssl_match_hostname] new, version 3.4.0.2

glen glen at pld-linux.org
Sat May 23 18:45:06 CEST 2015


commit 42763b0226b69a1c7ba6f782a6a6a3902fddcc44
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 23 19:44:07 2015 +0300

    new, version 3.4.0.2
    
    based on fedora package bb49e2f

 namespace.patch                          | 26 ++++++++++++++
 python-backports-ssl_match_hostname.spec | 60 ++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)
---
diff --git a/python-backports-ssl_match_hostname.spec b/python-backports-ssl_match_hostname.spec
new file mode 100644
index 0000000..89e8397
--- /dev/null
+++ b/python-backports-ssl_match_hostname.spec
@@ -0,0 +1,60 @@
+%define		module_name	backports.ssl_match_hostname
+Summary:	The ssl.match_hostname() function from Python 3
+Name:		python-backports-ssl_match_hostname
+Version:	3.4.0.2
+Release:	1
+License:	Python
+Group:		Libraries/Python
+Source0:	http://pypi.python.org/packages/source/b/%{module_name}/%{module_name}-%{version}.tar.gz
+# Source0-md5:	788214f20214c64631f0859dc79f23c6
+Patch0:		namespace.patch
+URL:		https://bitbucket.org/brandon/backports.ssl_match_hostname
+BuildRequires:	python-setuptools
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.219
+Requires:	python-backports
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+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}
+%patch0 -p1
+
+mv src/backports/ssl_match_hostname/README.txt .
+mv src/backports/ssl_match_hostname/LICENSE.txt .
+
+%build
+%{__python} setup.py build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__python} setup.py install --skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.txt LICENSE.txt
+%{py_sitescriptdir}/backports/ssl_match_hostname
+%{py_sitescriptdir}/backports.ssl_match_hostname-%{version}-py*-nspkg.pth
+%{py_sitescriptdir}/backports.ssl_match_hostname-%{version}-py*.egg-info
diff --git a/namespace.patch b/namespace.patch
new file mode 100644
index 0000000..a1b0c1c
--- /dev/null
+++ b/namespace.patch
@@ -0,0 +1,26 @@
+# https://bitbucket.org/brandon/backports.ssl_match_hostname/pull-request/1
+
+From 0e1ca304dd2ebecbc3f91d16d9e71947afd85b3f Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Wed, 17 Sep 2014 14:34:12 -0400
+Subject: [PATCH] Namespace.
+
+---
+ setup.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/setup.py b/setup.py
+index dc82951..09b30eb 100644
+--- a/setup.py
++++ b/setup.py
+@@ -16,6 +16,7 @@ setup(
+ 
+     package_dir = {'': 'src'},
+     packages = find_packages('src'),
++    namespace_packages=['backports'],
+     include_package_data = True,
+     install_requires = [],
+     entry_points = '',
+-- 
+1.9.3
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-backports-ssl_match_hostname.git/commitdiff/42763b0226b69a1c7ba6f782a6a6a3902fddcc44



More information about the pld-cvs-commit mailing list