diff --git a/.gitignore b/.gitignore index 77e145d..39e0a35 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /pycryptodomex-3.9.4.tar.gz /pycryptodomex-3.9.6.tar.gz /pycryptodomex-3.9.7.tar.gz +/pycryptodomex-3.10.1.tar.gz diff --git a/python-pycryptodomex-3.10.1-use_external_libtomcrypt.patch b/python-pycryptodomex-3.10.1-use_external_libtomcrypt.patch new file mode 100644 index 0000000..9e45b26 --- /dev/null +++ b/python-pycryptodomex-3.10.1-use_external_libtomcrypt.patch @@ -0,0 +1,43 @@ +diff -up ./setup.py.bak ./setup.py +--- ./setup.py.bak 2021-02-08 22:14:54.000000000 +0100 ++++ ./setup.py 2021-02-09 15:55:53.785892041 +0100 +@@ -367,12 +367,14 @@ ext_modules = [ + sources=["src/CAST.c"], + py_limited_api=True), + Extension("Crypto.Cipher._raw_des", +- include_dirs=['src/', 'src/libtom/'], ++ include_dirs=['src/'], + sources=["src/DES.c"], ++ extra_link_args=["-ltomcrypt"], + py_limited_api=True), + Extension("Crypto.Cipher._raw_des3", +- include_dirs=['src/', 'src/libtom/'], ++ include_dirs=['src/'], + sources=["src/DES3.c"], ++ extra_link_args=["-ltomcrypt"], + py_limited_api=True), + Extension("Crypto.Util._cpuid_c", + include_dirs=['src/'], +@@ -410,8 +412,9 @@ ext_modules = [ + sources=["src/ARC4.c"], + py_limited_api=True), + Extension("Crypto.Cipher._Salsa20", +- include_dirs=['src/', 'src/libtom/'], ++ include_dirs=['src/'], + sources=["src/Salsa20.c"], ++ extra_link_args=["-ltomcrypt"], + py_limited_api=True), + Extension("Crypto.Cipher._chacha20", + include_dirs=['src/'], +diff -up ./src/DES.c.bak ./src/DES.c +--- ./src/DES.c.bak 2021-02-08 22:14:54.000000000 +0100 ++++ ./src/DES.c 2021-02-09 15:55:53.785892041 +0100 +@@ -39,7 +39,7 @@ FAKE_INIT(raw_des3) + + /* Include the actial DES implementation */ + #define LTC_NO_PROTOTYPES +-#include "libtom/tomcrypt_des.c" ++#include + + struct block_state { + symmetric_key sk; diff --git a/python-pycryptodomex-3.7.0-sphinx.patch b/python-pycryptodomex-3.7.0-sphinx.patch deleted file mode 100644 index bc83b2c..0000000 --- a/python-pycryptodomex-3.7.0-sphinx.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up ./Doc/conf.py.bak ./Doc/conf.py ---- ./Doc/conf.py.bak 2018-10-27 23:08:03.000000000 +0200 -+++ ./Doc/conf.py 2018-11-17 15:34:58.392588884 +0100 -@@ -20,6 +20,10 @@ print sys.path - # Mock existence of native modules - from Crypto.Util import _raw_api - -+from distutils.version import LooseVersion -+ -+import sphinx -+ - class MockLib(object): - ghash_portable = None - ghash_expand_portable = None -@@ -40,7 +44,11 @@ _raw_api.load_pycryptodome_raw_lib = lam - - # Add any Sphinx extension module names here, as strings. They can be extensions - # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. --extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', -+if LooseVersion(sphinx.__version__) <= LooseVersion('1.2'): -+ napoleon_ext = 'sphinxcontrib.napoleon' -+else: -+ napoleon_ext = 'sphinx.ext.napoleon' -+extensions = [ 'sphinx.ext.autodoc', napoleon_ext, - 'sphinx.ext.mathjax' ] - - # Add any paths that contain templates here, relative to this directory. diff --git a/python-pycryptodomex-3.7.3-cflags.patch b/python-pycryptodomex-3.7.3-cflags.patch deleted file mode 100644 index d5c9920..0000000 --- a/python-pycryptodomex-3.7.3-cflags.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up ./compiler_opt.py.bak ./compiler_opt.py ---- ./compiler_opt.py.bak 2019-01-19 22:52:55.000000000 +0100 -+++ ./compiler_opt.py 2019-02-15 16:40:42.739281229 +0100 -@@ -334,7 +334,6 @@ def set_compiler_options(package_root, e - - # Options specific to GCC and CLANG - if clang or gcc: -- extra_cc_options.append('-O3') - if compiler_supports_sse2_with_x86intrin_h(): - extra_cc_options.append('-msse2') - extra_macros.append(("HAVE_X86INTRIN_H", None)) diff --git a/python-pycryptodomex-3.7.3-use_external_libtomcrypt.patch b/python-pycryptodomex-3.7.3-use_external_libtomcrypt.patch deleted file mode 100644 index 97bd2e6..0000000 --- a/python-pycryptodomex-3.7.3-use_external_libtomcrypt.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up ./setup.py.bak ./setup.py ---- ./setup.py.bak 2019-01-19 22:52:55.000000000 +0100 -+++ ./setup.py 2019-02-15 15:29:46.960976879 +0100 -@@ -367,11 +367,13 @@ ext_modules = [ - include_dirs=['src/'], - sources=["src/CAST.c"]), - Extension("Crypto.Cipher._raw_des", -- include_dirs=['src/', 'src/libtom/'], -- sources=["src/DES.c"]), -+ include_dirs=['src/'], -+ sources=["src/DES.c"], -+ extra_link_args=["-ltomcrypt"]), - Extension("Crypto.Cipher._raw_des3", -- include_dirs=['src/', 'src/libtom/'], -- sources=["src/DES3.c"]), -+ include_dirs=['src/'], -+ sources=["src/DES3.c"], -+ extra_link_args=["-ltomcrypt"]), - Extension("Crypto.Util._cpuid_c", - include_dirs=['src/'], - sources=['src/cpuid.c']), -@@ -400,8 +402,9 @@ ext_modules = [ - include_dirs=['src/'], - sources=["src/ARC4.c"]), - Extension("Crypto.Cipher._Salsa20", -- include_dirs=['src/', 'src/libtom/'], -- sources=["src/Salsa20.c"]), -+ include_dirs=['src/'], -+ sources=["src/Salsa20.c"], -+ extra_link_args=["-ltomcrypt"]), - Extension("Crypto.Cipher._chacha20", - include_dirs=['src/'], - sources=["src/chacha20.c"]), -diff -up ./src/DES.c.bak ./src/DES.c ---- ./src/DES.c.bak 2019-01-19 22:52:55.000000000 +0100 -+++ ./src/DES.c 2019-02-15 15:30:27.014967034 +0100 -@@ -39,7 +39,7 @@ FAKE_INIT(raw_des3) - - /* Include the actial DES implementation */ - #define LTC_NO_PROTOTYPES --#include "libtom/tomcrypt_des.c" -+#include - - struct block_state { - symmetric_key sk; diff --git a/python-pycryptodomex.spec b/python-pycryptodomex.spec index 4d75183..a6dd908 100644 --- a/python-pycryptodomex.spec +++ b/python-pycryptodomex.spec @@ -31,7 +31,7 @@ with the PyCrypto library. %global _with_tests 1 Name: python-%{srcname} -Version: 3.9.7 +Version: 3.10.1 Release: 1%{?dist} Summary: A self-contained cryptographic library for Python @@ -41,9 +41,7 @@ License: BSD and Public Domain URL: http://www.pycryptodome.org/ Source0: https://github.com/Legrandin/pycryptodome/archive/v%{version}/%{srcname}-%{version}.tar.gz # Use external libtomcrypt library -Patch0: %{name}-3.7.3-use_external_libtomcrypt.patch -# Fix documentation build with Sphinx <= 1.2, especially on EL -Patch1: %{name}-3.7.0-sphinx.patch +Patch0: %{name}-3.10.1-use_external_libtomcrypt.patch BuildRequires: gcc BuildRequires: libtomcrypt-devel @@ -115,12 +113,6 @@ touch .separate_namespace # Install man pages install -Dpm 0644 Doc/_build/man/pycryptodome.1 $RPM_BUILD_ROOT%{_mandir}/man1/pycryptodome.1 -# Fix permissions -%if 0%{_with_python2} -chmod 0755 $RPM_BUILD_ROOT%{python2_sitearch}/Cryptodome/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p256.sh -%endif -chmod 0755 $RPM_BUILD_ROOT%{python3_sitearch}/Cryptodome/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p256.sh - %check %if 0%{?_with_tests} @@ -150,6 +142,9 @@ chmod 0755 $RPM_BUILD_ROOT%{python3_sitearch}/Cryptodome/SelfTest/PublicKey/test %changelog +* Tue Aug 03 2021 Mohamed El Morabity - 3.10.1-1 +- Update to 3.10.1 + * Fri Feb 21 2020 Mohamed El Morabity - 3.9.7-1 - Update to 3.9.7 diff --git a/sources b/sources index b3a7387..3545a2c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pycryptodomex-3.9.7.tar.gz) = 3b0361d7afc772d9dec068b42d6a36732faeec55b7317cbe31fa86d65069b314c735fcfce03e68381d86f64dcb7abd751b0225c05f760631266063c1664fca4c +SHA512 (pycryptodomex-3.10.1.tar.gz) = 4c7e7e989d5363064e7e184f6b00a174045e03916cdf1199626afd7fe75eb5efcd13888ecdee607b974e96faad465694b384eb6d91edb8de1d0277ad71888c52