File project.diff of Package python-pycryptodome

--- python-pycryptodome.changes.orig
+++ python-pycryptodome.changes
@@ -1,4 +1,22 @@
 -------------------------------------------------------------------
+Tue Nov 19 12:58:46 UTC 2019 - Hans-Peter Jansen <hpj@urpla.net>
+
+- Update to 3.9.4 (18 November 2019)
+  + Resolved issues
+    * GH#341: Prevent key_to_english from creating invalid data
+      when fed with keys of length not multiple of 8.
+      Thanks to vstoykovbg.
+    * GH#347: Fix blocking RSA signing/decryption when key has very
+      small factor. Thanks to Martijn Pieters.
+
+- Update to version 3.9.3 (12 November 2019)
+  + Resolved issues
+    * GH#308: Align stack of functions using SSE2 intrinsics to
+      avoid crashes, when compiled with gcc on 32-bit x86 platforms.
+
+- Unify specs using the multibuild approach
+
+-------------------------------------------------------------------
 Sun Nov 10 16:54:21 UTC 2019 - Hans-Peter Jansen <hpj@urpla.net>
 
 - Update to 3.9.2 (10 November 2019):
--- python-pycryptodome.spec.orig
+++ python-pycryptodome.spec
@@ -1,7 +1,8 @@
 #
-# spec file for package python-pycryptodome
+# spec file for package python
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC.
+# Copyright (c) 2019 LISA GmbH, Bingen, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,9 +18,52 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%global flavor @BUILD_FLAVOR@%{nil}
+
+%if "%{flavor}" == "x"
+%bcond_without separate_namespace
+%define _displayname PyCryptodomex
+%define _distname pycryptodomex
+%define _namespace Cryptodome
+%define _suffix x
+%else
+%bcond_with separate_namespace
+%define _displayname PyCryptodome
+%define _distname pycryptodome
+%define _namespace Crypto
+%define _suffix %{nil}
+%endif
+
+%define _description \
+* Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)\
+* Accelerated AES on Intel platforms via AES-NI\
+* First class support for PyPy\
+* Elliptic curves cryptography (NIST P-256 curve only)\
+* Better and more compact API (`nonce` and `iv` attributes for\
+  ciphers, automatic generation of random nonces and IVs, simplified\
+  CTR cipher mode, and more)\
+* SHA-3 (including SHAKE XOFs), SHA-512/t and BLAKE2 hash algorithms\
+* Salsa20 and ChaCha20 stream ciphers\
+* Poly1305 MAC\
+* ChaCha20-Poly1305 authenticated cipher\
+* scrypt and HKDF\
+* Deterministic (EC)DSA\
+* Password-protected PKCS#8 key containers\
+* Shamir´s Secret Sharing scheme\
+* Random numbers get sourced directly from the OS (and not from a\
+  CSPRNG in userspace)\
+* Simplified install process, including better support for Windows\
+* Cleaner RSA and DSA key generation (largely based on FIPS 186-4)\
+* Major clean ups and simplification of the code base\
+\
+%{_displayname} is not a wrapper to a separate C library like *OpenSSL*.\
+To the largest possible extent, algorithms are implemented in pure\
+Python. Only the pieces that are extremely critical to performance\
+(e.g. block ciphers) are implemented as C extensions.
+
 %define oldpython python
-Name:           python-pycryptodome
-Version:        3.9.2
+Name:           python-pycryptodome%{_suffix}
+Version:        3.9.4
 Release:        0
 Summary:        Cryptographic library for Python
 License:        BSD-2-Clause
@@ -31,56 +75,49 @@ BuildRequires:  %{python_module setuptoo
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 %if !0%{?_no_weakdeps}
-# PyCryptodome uses gmp via cffi as runtime optimization
+# pycryptodome{,x} uses gmp via cffi as runtime optimization
 # would be better, if libgmp* would provide gmp
 Suggests:       libgmp10
 Suggests:       python-cffi
 %endif
+%if ! %{with separate_namespace}
 Provides:       python-pycrypto = %{version}
 Obsoletes:      python-pycrypto < %{version}
+%endif
+# ifpython2 macro doesn't nest well...
 %ifpython2
+%if ! %{with separate_namespace}
 Provides:       %{oldpython}-pycrypto = %{version}
 Obsoletes:      %{oldpython}-pycrypto < %{version}
 %endif
+%endif
 %python_subpackages
 
+%if %{with separate_namespace}
 %description
-PyCryptodome is a self-contained Python package of low-level
+%{_displayname} is a self-contained Python package of low-level
 cryptographic primitives.
 
-PyCryptodome is a fork of PyCrypto, residing in the `Crypto`
+Unlike PyCryptodome, it resides in its own namespace `Cryptodome`.
+
+%{_displayname} is a fork of PyCrypto. It brings several enhancements
+with respect to the last official version of PyCrypto (2.6.1),
+for instance:
+%{_description}
+%else
+%description
+%{_displayname} is a fork of PyCrypto, residing in the usual `Crypto`
 namespace for better drop-in compatibility, while it brings several
 enhancements with respect to the last official version of PyCrypto
 (2.6.1), for instance:
-
-* Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
-* Accelerated AES on Intel platforms via AES-NI
-* First class support for PyPy
-* Elliptic curves cryptography (NIST P-256 curve only)
-* Better and more compact API (`nonce` and `iv` attributes for
-  ciphers, automatic generation of random nonces and IVs, simplified
-  CTR cipher mode, and more)
-* SHA-3 (including SHAKE XOFs), SHA-512/t and BLAKE2 hash algorithms
-* Salsa20 and ChaCha20 stream ciphers
-* Poly1305 MAC
-* ChaCha20-Poly1305 authenticated cipher
-* scrypt and HKDF
-* Deterministic (EC)DSA
-* Password-protected PKCS#8 key containers
-* Shamir's Secret Sharing scheme
-* Random numbers get sourced directly from the OS (and not from a
-  CSPRNG in userspace)
-* Simplified install process, including better support for Windows
-* Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
-* Major clean ups and simplification of the code base
-
-PyCryptodome is not a wrapper to a separate C library like *OpenSSL*.
-To the largest possible extent, algorithms are implemented in pure
-Python. Only the pieces that are extremely critical to performance
-(e.g. block ciphers) are implemented as C extensions.
+%{_description}
+%endif
 
 %prep
 %setup -q -n pycryptodome-%{version}
+%if %{with separate_namespace}
+touch .separate_namespace
+%endif
 
 %build
 export LC_ALL=en_US.UTF-8
@@ -99,7 +136,7 @@ export LC_ALL=en_US.UTF-8
 %files %{python_files}
 %license LICENSE.rst
 %doc AUTHORS.rst Changelog.rst README.rst
-%{python_sitearch}/Crypto/
-%{python_sitearch}/pycryptodome-%{version}-py*.egg-info
+%{python_sitearch}/%{_namespace}/
+%{python_sitearch}/%{_distname}-%{version}-py*.egg-info
 
 %changelog