public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Florian Wallner <florian.wallner@proton.me>
To: git-commits@fedoraproject.org
Subject: [rpms/calibre] rawhide: Drop bundled Cryptodome->Crypto import redirect; require python3-pycryptodomex
Date: Thu, 10 Sep 2026 23:14:39 GMT [thread overview]
Message-ID: <178908207967.1.5557431112209768355.rpms-calibre-67c802a0b69b@fedoraproject.org> (raw)
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
reply other threads:[~2026-09-10 23:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178908207967.1.5557431112209768355.rpms-calibre-67c802a0b69b@fedoraproject.org \
--to=florian.wallner@proton.me \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox