diff --git a/M2Crypto-0.26.4.tar.gz b/M2Crypto-0.26.4.tar.gz deleted file mode 100644 index be99731..0000000 --- a/M2Crypto-0.26.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5cae7acc0b34821f8c0ddf6665e482893fe1f198ad6379e61ffa9d8e65f5c199 -size 1116587 diff --git a/M2Crypto-0.27.0.tar.gz b/M2Crypto-0.27.0.tar.gz new file mode 100644 index 0000000..4d11b7c --- /dev/null +++ b/M2Crypto-0.27.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82317459d653322d6b37f122ce916dc91ddcd9d1b814847497ac796c4549dd68 +size 1119288 diff --git a/fix-build-python3.diff b/fix-build-python3.diff new file mode 100644 index 0000000..fd3518f --- /dev/null +++ b/fix-build-python3.diff @@ -0,0 +1,16 @@ +Index: M2Crypto-0.27.0/setup.py +=================================================================== +--- M2Crypto-0.27.0.orig/setup.py ++++ M2Crypto-0.27.0/setup.py +@@ -48,7 +48,10 @@ def _get_additional_includes(): + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + _, err = pid.communicate() +- err = [line.lstrip() for line in err.split('\n') if line and line[0] == ' '] ++ if sys.version_info[0] == 2: ++ err = [line.lstrip() for line in err.split('\n') if line and line[0] == ' '] ++ else: ++ err = [line.lstrip() for line in err.split(b'\n') if line and line[0] == b' '] + return err + + diff --git a/fix-openssl-include-path.diff b/fix-openssl-include-path.diff new file mode 100644 index 0000000..7640f65 --- /dev/null +++ b/fix-openssl-include-path.diff @@ -0,0 +1,13 @@ +Index: M2Crypto-0.27.0/setup.py +=================================================================== +--- M2Crypto-0.27.0.orig/setup.py ++++ M2Crypto-0.27.0/setup.py +@@ -159,7 +164,7 @@ class _M2CryptoBuildExt(build_ext.build_ + + if platform.system() == "Linux": + self.include_dirs += _get_additional_includes() +- inc_openssl_dir = '/usr/include/openssl' ++ inc_openssl_dir = '/usr/include/' + if inc_openssl_dir not in self.include_dirs: + self.include_dirs.append(inc_openssl_dir) + log.debug('self.include_dirs = %s', self.include_dirs) diff --git a/python-M2Crypto.changes b/python-M2Crypto.changes index 91cee19..6f299d5 100644 --- a/python-M2Crypto.changes +++ b/python-M2Crypto.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Wed Oct 18 07:13:58 UTC 2017 - alarrosa@suse.com + +- Update to 0.27.0 + * Fix licence: it is MIT, not BSD + * At least minimal support of SNI in httpslib. + * Small bugfixes and cleanups. + * More effort to make build system more robust. + * Restore m2.rsa_set_e() and m2.rsa_set_n(). + * Make sure that every exceptional return throws and exception and viceversa. +- Add patch fix-build-python3.diff to let it build with python3 +- Add patch fix-openssl-include-path.diff to fix openssl include path + (the code already includes the openssl/ part) +- Create a new package python-M2Crypto-doc for documentation since rpmlint + was complaining around 75% of the package was documentation. + ------------------------------------------------------------------- Tue Sep 26 12:32:25 UTC 2017 - michael@stroeder.com diff --git a/python-M2Crypto.spec b/python-M2Crypto.spec index 9a25508..2a16370 100644 --- a/python-M2Crypto.spec +++ b/python-M2Crypto.spec @@ -22,13 +22,17 @@ %define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-M2Crypto -Version: 0.26.4 +Version: 0.27.0 Release: 0 Url: https://gitlab.com/m2crypto/m2crypto Summary: Crypto and SSL toolkit for Python License: MIT and ZPL-2.0 and BSD-3-Clause Group: Development/Languages/Python Source: https://pypi.io/packages/source/M/M2Crypto/M2Crypto-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix-build-python3.diff -- Fixes a str/bytes issue when building with python3 +Patch0: fix-build-python3.diff +# PATCH-FIX-OPENSUSE fix-openssl-include-path.diff -- Fixes include path for openssl +Patch1: fix-openssl-include-path.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} @@ -67,8 +71,28 @@ HMAC'ing AuthCookies for web session management. FTP/TLS client and server. S/MIME. ZServerSSL: A HTTPS server for Zope. ZSmime: An S/MIME messenger for Zope. +%package -n %{name}-doc +Summary: Documentation for the Crypto and SSL toolkit for Python +Group: Development/Libraries/Python +BuildArch: noarch +Requires: %{name} = %{version} + +%description -n %{name}-doc +M2Crypto is a crypto and SSL toolkit for Python featuring the following: + +RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including +AES). SSL functionality to implement clients and servers. HTTPS +extensions to Python's httplib, urllib, and xmlrpclib. Unforgeable +HMAC'ing AuthCookies for web session management. FTP/TLS client and +server. S/MIME. ZServerSSL: A HTTPS server for Zope. ZSmime: An S/MIME +messenger for Zope. + +Documentation for the Crypto and SSL toolkit for Python + %prep %setup -q -n M2Crypto-%{version} +%patch0 -p1 +%patch1 -p1 %build export CFLAGS="%{optflags}" @@ -77,6 +101,7 @@ export CFLAGS="%{optflags}" %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitearch} +%fdupes %{buildroot}%{_docdir} %if %{with tests} %check @@ -86,7 +111,10 @@ export CFLAGS="%{optflags}" %files %{python_files} %defattr(-,root,root) %doc CHANGES LICENCE README.rst -%doc doc/ %{python_sitearch}/* +%files -n %{name}-doc +%defattr(-,root,root) +%doc doc/* + %changelog