Discussion:
Bug#1067715: calibre: doesn't install DeACSM plugin
(too old to reply)
José Luis González
2024-03-25 22:00:01 UTC
Permalink
Package: calibre
Version: 6.13.0+repack-2+deb12u3
Severity: important

I am unable to install the DeACSM plugin. It gives the following errors:


calibre, version 6.13.0
ERROR: Fallo en la instalación del complemento: Ha ocurrido un error al instalar este complemento y a continuación se desinstalará. Por favor, publique el mensaje de error que aparece en los detalles de más abajo en la conversación del foro para este complemento y reinicie calibre.

Traceback (most recent call last):
File "/usr/lib/calibre/calibre/customize/ui.py", line 677, in initialize_plugin
p.initialize()
File "calibre_plugins.deacsm.__init__", line 226, in initialize
from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
File "/tmp/calibre_6.13.0_tmp_bazwlmj0/szujnx8a.zip/libadobe.py", line 59, in <module>
from oscrypto import keys
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module>
from ._asymmetric import parse_certificate, parse_private, parse_public
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module>
from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module>
from .util import rand_bytes
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module>
from ._openssl.util import rand_bytes
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module>
from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in <module>
from ._libcrypto_ctypes import (
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 47, in <module>
raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/dialogs/plugin_updater.py", line 710, in _install_clicked
plugin = add_plugin(zip_path)
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/calibre/calibre/customize/ui.py", line 487, in add_plugin
plugin = initialize_plugin(plugin, path_to_zip_file, PluginInstallationType.EXTERNAL)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/calibre/calibre/customize/ui.py", line 682, in initialize_plugin
raise InvalidPlugin((_('Initialization of plugin %s failed with traceback:')
calibre.customize.InvalidPlugin: La inicialización del complemento Traceback (most recent call last):
File "/usr/lib/calibre/calibre/customize/ui.py", line 677, in initialize_plugin
p.initialize()
File "calibre_plugins.deacsm.__init__", line 226, in initialize
from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
File "/tmp/calibre_6.13.0_tmp_bazwlmj0/szujnx8a.zip/libadobe.py", line 59, in <module>
from oscrypto import keys
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module>
from ._asymmetric import parse_certificate, parse_private, parse_public
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module>
from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module>
from .util import rand_bytes
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module>
from ._openssl.util import rand_bytes
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module>
from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in <module>
from ._libcrypto_ctypes import (
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 47, in <module>
raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto
falló y generó la siguiente traza:
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/customize/ui.py", line 677, in initialize_plugin
p.initialize()
File "calibre_plugins.deacsm.__init__", line 226, in initialize
from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
File "/tmp/calibre_6.13.0_tmp_bazwlmj0/szujnx8a.zip/libadobe.py", line 59, in <module>
from oscrypto import keys
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in <module>
from ._asymmetric import parse_certificate, parse_private, parse_public
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in <module>
from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in <module>
from .util import rand_bytes
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in <module>
from ._openssl.util import rand_bytes
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in <module>
from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in <module>
from ._libcrypto_ctypes import (
File "/home/jlg/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 47, in <module>
raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto


This plugin is essential for me to use Calibre. It's needed to upload
Adobe DRM protected EPUBs to my ereader.
yokota
2024-03-26 04:30:01 UTC
Permalink
Hello, José.

I'm not maintain external plugins.
So I can't fix plugin codes.

But this bug might fix when you installs Debian
python3-oscrypto/1.3.0-1+deb12u1 package.
https://tracker.debian.org/pkg/oscrypto

DeACSM plugin seems to load properly on my Debian Calibre 7.7.0.


Here is my technical analysis about this issue.

1. This line shows Python oscrypto code fails to detect OpenSSL version.
Post by José Luis González
raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto
DeACSM plugin includes Python oscrypto module, and use it when required.

2. Current upstream oscrypto release code has some bugs about OpenSSL
version detection.
OpenSSL has MAJOR.MINOR.PATCHLEVEL version scheme and each section
has 1 or more
digits.
But oscrypto code can only accepts 1 digit for each section. And it
fails to detect version numbers.
Current Debian OpenSSL version in Debian stable is 3.0.11, and it
has 2 degits in PATCHLEVEL.

3. This bug was fixed in oscrypto upstream development codes, but not
in release codes.
https://github.com/wbond/oscrypto/pull/76

4. This bug was also fixed in Debian bug 1055598. And released as
python3-oscrypto/1.3.0-1+deb12u1.
Use Debian oscrypto module instead of included oscrypto module
might fix the bug.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055598

5. If it went wrong, fix manually oscrypto code in plugin code. The
oscrypto code is Zip-ed as oscrypto.zip
See previous GitHub pull request for fix.
https://github.com/wbond/oscrypto/pull/76

--
YOKOTA
yokota
2024-03-26 23:40:01 UTC
Permalink
Hello, José.
Post by José Luis González
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto
This bug was already fixed on DeACSM upstream development code.
Try it from DeACSM plugin forum.
https://www.mobileread.com/forums/showpost.php?p=4157570&postcount=2
https://www.mobileread.com/forums/showthread.php?t=341975

FYI: DeACSM plugin was renamed to ACSMInput plugin.

Use "calibre-customize --add-plugin FILE_PATH" to install plugins from
local path.
https://manual.calibre-ebook.com/generated/en/calibre-customize.html

--
YOKOTA
José Luis González
2024-03-28 13:00:01 UTC
Permalink
On Wed, 27 Mar 2024 08:28:34 +0900
Post by yokota
Hello, José.
Hi,
Post by yokota
Post by José Luis González
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto
This bug was already fixed on DeACSM upstream development code.
Try it from DeACSM plugin forum.
https://www.mobileread.com/forums/showpost.php?p=4157570&postcount=2
https://www.mobileread.com/forums/showthread.php?t=341975
FYI: DeACSM plugin was renamed to ACSMInput plugin.
Use "calibre-customize --add-plugin FILE_PATH" to install plugins from
local path.
https://manual.calibre-ebook.com/generated/en/calibre-customize.html
Thanks a lot for the information, really. I will try it when I have the
time.

Cheers!
José Luis González
2024-03-28 16:00:02 UTC
Permalink
reopen 1067715
tags 1067715 + fixed-upstream
thanks

On Thu, 28 Mar 2024 15:15:05 +0000
This is an automatic notification regarding your Bug report
#1067715: calibre: doesn't install DeACSM plugin
Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
replying to this email.
«This bug is now closed because it was already fixed on upstream
development code.»

Yokota,

Please, don't close bugs just because they are fixed upstream, the
fixed-upstream exists exactly for this. The report shall remain open
until the bug is fixed on all currently published Debian releases. I
don't know yet whether the fix is already on an official Calibre
release, or just on their development repository. What I have no doubt
is the bug is still present on stable (bookworm), so until it gets
fixed there this report shall remain open. Feel free to tag it for
bookworkm, bullseye and buster appropriately if the fix is already into
testing and unstable.

Thanks a lot for your understanding and your effort at maintaining the
package.

Best regards,
José Luis
yokota
2024-03-29 04:10:01 UTC
Permalink
Hello,
Post by José Luis González
Please, don't close bugs just because they are fixed upstream, the
fixed-upstream exists exactly for this.
I think it's external plugin's bug and not Calibre's bug.
But I will keep this bug open as you requested.

If you think the bug is fixed, let me know.
Or close this bug by yourself.

Best regards,
--
YOKOTA

Loading...