public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/calibre] rawhide: Drop bundled Cryptodome->Crypto import redirect; require python3-pycryptodomex
@ 2026-09-10 23:14 Florian Wallner
0 siblings, 0 replies; only message in thread
From: Florian Wallner @ 2026-09-10 23:14 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/calibre
Branch : rawhide
Commit : 67c802a0b69ba2e50f509b1e6c8a12a489504537
Author : Florian Wallner <florian.wallner@proton.me>
Date : 2026-09-09T17:10:22+02:00
Stats : +18/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/calibre/c/67c802a0b69ba2e50f509b1e6c8a12a489504537?branch=rawhide
Log:
Drop bundled Cryptodome->Crypto import redirect; require python3-pycryptodomex
calibre's DeVendor import hook redirected all Cryptodome imports to the
Crypto namespace, assuming the bundled pycryptodome. On Fedora that
namespace is provided by the obsolete python3-crypto (PyCrypto 2.6.1),
which lacks modern APIs such as RSA.import_key -- breaking py7zr and
crypto-using plugins. Patch out the redirect so Cryptodome resolves to
the system python3-pycryptodomex, and add it as a (Build)Requires.
Resolves: rhbz#2527047
---
diff --git a/calibre-cryptodome-unbundle.patch b/calibre-cryptodome-unbundle.patch
new file mode 100644
index 0000000..ac20467
--- /dev/null
+++ b/calibre-cryptodome-unbundle.patch
@@ -0,0 +1,13 @@
+--- a/src/calibre/constants.py
++++ b/src/calibre/constants.py
+@@ -214,10 +214,6 @@
+ if fullname == 'PyQt5':
+ return ModuleSpec(fullname, DeVendorLoader('qt'))
+ return ModuleSpec(fullname, DeVendorLoader('qt.webengine' if 'QWebEngine' in fullname else 'qt.core'))
+- if fullname.startswith('Cryptodome'):
+- # this is needed for py7zr which uses pycryptodomex instead of
+- # pycryptodome for some reason
+- return ModuleSpec(fullname, DeVendorLoader(fullname.replace('dome', '', 1)))
+
+
+ class ExtensionsPackageLoader(Loader):
diff --git a/calibre.spec b/calibre.spec
index fc032f3..e5d5223 100644
--- a/calibre.spec
+++ b/calibre.spec
@@ -25,6 +25,9 @@ Patch: calibre-9.13.0-feedparser-downgrade.patch
# fix openssl test
Patch: calibre-9.12.0-openssl.patch
+# use system pycryptodomex instead of the bundled Cryptodome->Crypto redirect
+Patch: calibre-cryptodome-unbundle.patch
+
ExclusiveArch: %{qt6_qtwebengine_arches}
BuildRequires: python3-devel
@@ -103,6 +106,7 @@ BuildRequires: python3-pyqt6-webengine-devel
BuildRequires: python3-fonttools
BuildRequires: python3-zstd
BuildRequires: python3dist(xxhash)
+BuildRequires: python3dist(pycryptodomex)
BuildRequires: pykakasi
BuildRequires: mesa-libEGL
BuildRequires: python3-tzlocal
@@ -166,6 +170,7 @@ Requires: python3-jeepney
Requires: qt6-qtmultimedia
Requires: (qt6-qtspeech-flite or qt6-qtspeech-speechd)
Requires: python3-xxhash
+Requires: python3dist(pycryptodomex)
Recommends: python3dist(zeroconf)
%description
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-10 23:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 23:14 [rpms/calibre] rawhide: Drop bundled Cryptodome->Crypto import redirect; require python3-pycryptodomex Florian Wallner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox