Bug 1526064 - python-cryptography should depend on python-setuptools
Summary: python-cryptography should depend on python-setuptools
Keywords:
Status: CLOSED DUPLICATE of bug 1459947
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-cryptography
Version: 7.4
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Christian Heimes
QA Contact: Kaleem
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-14 17:35 UTC by Alfredo Moralejo
Modified: 2019-02-26 16:47 UTC (History)
2 users (show)

Fixed In Version: python-cryptography-1.7.2-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-26 16:47:16 UTC


Attachments (Terms of Use)

Description Alfredo Moralejo 2017-12-14 17:35:26 UTC
Description of problem:

When running packstack installation in a base Centos7 system, following error appears:

[vadmin@openstackqueen yum.repos.d]$ sudo packstack --allinone
ERROR:root:Failed to load plugin from file ssl_001.py
ERROR:root:Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 923, in loadPlugins
    moduleobj = __import__(moduleToLoad)
  File "/usr/lib/python2.7/site-packages/packstack/plugins/ssl_001.py", line 20, in <module>
    from OpenSSL import crypto
  File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 13, in <module>
    from cryptography.hazmat.primitives.asymmetric import dsa, rsa
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py", line 14, in <module>
    from cryptography.hazmat.backends.interfaces import RSABackend
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
    import pkg_resources
ImportError: No module named pkg_resources

ERROR:root:Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 988, in main
    loadPlugins()
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 931, in loadPlugins
    raise Exception("Failed to load plugin from file %s" % item)
Exception: Failed to load plugin from file ssl_001.py


ERROR : Failed to load plugin from file ssl_001.py



Version-Release number of selected component (if applicable):


How reproducible:

allways

Steps to Reproduce:
1. Enable RDO repositories in a RHEL 7.4 system.

cd /etc/yum.repos.d/
wget http://trunk.rdoproject.org/centos7/delorean-deps.repo
wget http://trunk.rdoproject.org/centos7/current-passed-ci/delorean-repo

2. install packstack

yum install -y openstack-packstack

3. run packstack allinone option

packstack --allinone

Actual results:

Installation fails with error:

  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
    import pkg_resources
ImportError: No module named pkg_resources



Expected results:

packstack command should run fine


Additional info:

File /usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/__init__.py
is importing pkg_resource provided by python-setuptools but it's not included as dependency. I think that's a missing Requires.

Comment 4 Alan Pevec 2018-04-13 23:26:03 UTC
Version-Release number of selected component: python2-cryptography-1.7.2-1.el7_4.1

FWIW pkg_resource was removed since upstream version 1.9
https://github.com/pyca/cryptography/commit/51032351297b9bf7d783b7138ac0c142d8e38918#diff-a2fa29b78aa32458ce597e791c8ac549

Comment 5 Christian Heimes 2019-02-26 16:47:16 UTC
The problem has been resolved in RHEL 7.5 by https://access.redhat.com/errata/RHBA-2018:0720 . python-cryptography now correctly depends on python-setuptools.

*** This bug has been marked as a duplicate of bug 1459947 ***


Note You need to log in before you can comment on or make changes to this bug.