Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 814773 - dev-python/cryptography-3.4.7-r2 fails to execute with dev-libs/openssl-3.0.0
Summary: dev-python/cryptography-3.4.7-r2 fails to execute with dev-libs/openssl-3.0.0
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL: https://github.com/pyca/cryptography/...
Whiteboard: Latest fixed, but needs backport for ...
Keywords: PATCH
: 823852 (view as bug list)
Depends on:
Blocks: openssl-3.0
  Show dependency tree
 
Reported: 2021-09-25 07:44 UTC by Thomas Bettler
Modified: 2022-08-18 18:10 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cryptography-3.4.x-py310_openssl30.patch (cryptography-3.4.8-py310_openssl30.patch,40.83 KB, patch)
2021-10-09 08:30 UTC, Perfect Gentleman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bettler 2021-09-25 07:44:30 UTC
$ certbot 

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/certbot", line 33, in <module>
    sys.exit(load_entry_point('certbot==1.18.0', 'console_scripts', 'certbot')())
  File "/usr/lib/python-exec/python3.9/certbot", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/certbot/main.py", line 2, in <module>
    from certbot._internal import main as internal_main
  File "/usr/lib/python3.9/site-packages/certbot/_internal/main.py", line 17, in <module>
    import josepy as jose
  File "/usr/lib/python3.9/site-packages/josepy/__init__.py", line 41, in <module>
    from josepy.interfaces import JSONDeSerializable
  File "/usr/lib/python3.9/site-packages/josepy/interfaces.py", line 6, in <module>
    from josepy import errors, util
  File "/usr/lib/python3.9/site-packages/josepy/util.py", line 4, in <module>
    import OpenSSL
  File "/usr/lib/python3.9/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python3.9/site-packages/OpenSSL/crypto.py", line 17, in <module>
    from OpenSSL._util import (
  File "/usr/lib/python3.9/site-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/usr/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /usr/lib/python3.9/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: undefined symbol: FIPS_mode_set
Comment 1 Thomas Bettler 2021-09-25 07:49:09 UTC
$ python -m OpenSSL

Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/usr/lib/python3.9/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python3.9/site-packages/OpenSSL/crypto.py", line 17, in <module>
    from OpenSSL._util import (
  File "/usr/lib/python3.9/site-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/usr/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /usr/lib/python3.9/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: undefined symbol: FIPS_mode_set
Comment 2 Perfect Gentleman 2021-10-09 08:30:24 UTC
Created attachment 743943 [details, diff]
cryptography-3.4.x-py310_openssl30.patch
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-09 08:55:32 UTC
(In reply to Perfect Gentleman from comment #2)
> Created attachment 743943 [details, diff] [details, diff]
> cryptography-3.4.x-py310_openssl30.patch

Please link to where patches are from. Note that there's no need to just repost/attach ones which are already linked.
Comment 4 Perfect Gentleman 2021-10-09 09:16:43 UTC
https://github.com/pyca/cryptography/pull/6000 - from here, but it's needed to be modified a little.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-16 12:04:04 UTC
*** Bug 823852 has been marked as a duplicate of this bug. ***
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-06 02:03:23 UTC
Bump to 37.x sorted this: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00718fc85ce502b2fce3df4b453b104c04649b63.

Need to see about doing the backport though for 3.4.x for non-Rust arches.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-06 02:04:00 UTC
(In reply to Sam James from comment #6)
> Bump to 37.x sorted this:
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=00718fc85ce502b2fce3df4b453b104c04649b63.
> 
> Need to see about doing the backport though for 3.4.x for non-Rust arches.

(Perfect Gentleman has posted it, just need to check it over)
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-06 08:09:07 UTC
FTR, I'd prefer if someone forked cryptography and tagged the updated version rather than keeping large patches in FILESDIR.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-18 18:10:12 UTC
This version is no longer in tree.

See also: https://archives.gentoo.org/gentoo-dev/message/19bd6c2f413cf21cb25b67aaf3aa8107