From 0d84761a5f90f8e73a9e7ac0331a0088f85ff0c7 Mon Sep 17 00:00:00 2001 From: Mohamed El Morabity Date: Thu, 11 Apr 2024 22:50:13 +0200 Subject: [PATCH] Update to 3.20.0 --- .gitignore | 2 +- python-pycryptodomex-3.10.1-sphinx_4.patch | 21 ---------------- ...omex-3.15.0-use_external_libtomcrypt.patch | 25 +++++++------------ python-pycryptodomex.spec | 16 ++++++------ sources | 2 +- 5 files changed, 19 insertions(+), 47 deletions(-) delete mode 100644 python-pycryptodomex-3.10.1-sphinx_4.patch rename python-pycryptodomex-3.10.1-use_external_libtomcrypt.patch => python-pycryptodomex-3.15.0-use_external_libtomcrypt.patch (57%) diff --git a/.gitignore b/.gitignore index d5b5c6b..1f213c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/pycryptodomex-3.14.0.tar.gz +/pycryptodomex-3.20.0.tar.gz diff --git a/python-pycryptodomex-3.10.1-sphinx_4.patch b/python-pycryptodomex-3.10.1-sphinx_4.patch deleted file mode 100644 index e817070..0000000 --- a/python-pycryptodomex-3.10.1-sphinx_4.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up ./Doc/conf.py.bak ./Doc/conf.py ---- ./Doc/conf.py.bak 2021-07-05 08:16:40.083571171 +0000 -+++ ./Doc/conf.py 2021-07-05 08:17:17.754162806 +0000 -@@ -15,7 +15,7 @@ import sys, os - - # Modules to document with autodoc are in another directory - sys.path.insert(0, os.path.abspath('../lib')) --print sys.path -+print(sys.path) - - # Mock existence of native modules - from Crypto.Util import _raw_api -@@ -155,7 +155,7 @@ html_static_path = ['_static'] - # Ensure that text wrapping works in a table, by overring some CSS. - # See https://github.com/rtfd/sphinx_rtd_theme/issues/117 - def setup(app): -- app.add_stylesheet('theme_overrides.css') -+ app.add_css_file('theme_overrides.css') - - # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, - # using the given strftime format. diff --git a/python-pycryptodomex-3.10.1-use_external_libtomcrypt.patch b/python-pycryptodomex-3.15.0-use_external_libtomcrypt.patch similarity index 57% rename from python-pycryptodomex-3.10.1-use_external_libtomcrypt.patch rename to python-pycryptodomex-3.15.0-use_external_libtomcrypt.patch index 9e45b26..66e683d 100644 --- a/python-pycryptodomex-3.10.1-use_external_libtomcrypt.patch +++ b/python-pycryptodomex-3.15.0-use_external_libtomcrypt.patch @@ -1,37 +1,30 @@ 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), +--- ./setup.py.bak 2022-06-22 20:21:37.000000000 +0200 ++++ ./setup.py 2022-06-23 11:09:44.260182023 +0200 +@@ -369,10 +369,12 @@ ext_modules = [ Extension("Crypto.Cipher._raw_des", -- include_dirs=['src/', 'src/libtom/'], -+ include_dirs=['src/'], + include_dirs=['src/', 'src/libtom/'], 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/'], + include_dirs=['src/', 'src/libtom/'], 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), +@@ -417,6 +419,7 @@ ext_modules = [ Extension("Crypto.Cipher._Salsa20", -- include_dirs=['src/', 'src/libtom/'], -+ include_dirs=['src/'], + include_dirs=['src/', 'src/libtom/'], 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 +--- ./src/DES.c.bak 2022-06-22 20:21:37.000000000 +0200 ++++ ./src/DES.c 2022-06-23 11:10:58.166711358 +0200 @@ -39,7 +39,7 @@ FAKE_INIT(raw_des3) /* Include the actial DES implementation */ diff --git a/python-pycryptodomex.spec b/python-pycryptodomex.spec index b276c0f..eda26ae 100644 --- a/python-pycryptodomex.spec +++ b/python-pycryptodomex.spec @@ -28,19 +28,17 @@ Note: all modules are installed under the Cryptodome package to avoid conflicts with the PyCrypto library.} Name: python-%{srcname} -Version: 3.14.0 +Version: 3.20.0 Release: 1%{?dist} Summary: A self-contained cryptographic library for Python # PyCrypto-based code is public domain, further PyCryptodome contributions are # BSD -License: BSD and Public Domain +License: BSD-2-Clause AND LicenseRef-Fedora-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.10.1-use_external_libtomcrypt.patch -# Fix build with Sphinx 4.2 -Patch1: %{name}-3.10.1-sphinx_4.patch +Patch0: %{name}-3.15.0-use_external_libtomcrypt.patch BuildRequires: gcc BuildRequires: libtomcrypt-devel @@ -85,7 +83,6 @@ mv lib/Crypto/SelfTest/__main__.py.new lib/Crypto/SelfTest/__main__.py %generate_buildrequires -export PYCRYPTODOME_DEBUG=1 %pyproject_buildrequires -r @@ -107,14 +104,14 @@ install -Dpm 0644 Doc/_build/man/pycryptodome.1 $RPM_BUILD_ROOT%{_mandir}/man1/p %check -PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch}/ %{__python3} setup.py test +PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch}/ %{__python3} %{py_setup} test %files -n python3-%{srcname} -f %{pyproject_files} %doc AUTHORS.rst Changelog.rst README.rst %license LICENSE.rst %exclude %{python3_sitearch}/Cryptodome/SelfTest/ -%{_mandir}/man1/pycryptodome.1.* +%{_mandir}/man1/pycryptodome.1* %files -n python3-%{srcname}-selftest @@ -122,5 +119,8 @@ PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch}/ %{__python3} setup.py test %changelog +* Sun Feb 25 2024 Mohamed El Morabity - 3.20.0-1 +- Update to 3.20.0 + * Wed Feb 02 2022 Mohamed El Morabity - 3.14.0-1 - Initial EPEL9 release diff --git a/sources b/sources index b03a5c8..6594073 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pycryptodomex-3.14.0.tar.gz) = 2f20a3a2bfef14a0f4c05587d64da3a4be7303ae37aaee02e49a3c7ef69009fa958e4b7151c1441f2cc63833cc29642d6d13c1006fb0f215743178d36c9de802 +SHA512 (pycryptodomex-3.20.0.tar.gz) = 0d65ccd93f9f78548c04aa3af01cb65b6a39e81bb3dfa4bb08acc5a5a731b17f9c5b07a1d1780739b3f358402a3596b04e446fc7b39345a4c6f03fd5a2de7ff9