openssl-devel needed for CentOS 6.3

Bug #1091972 reported by Ryota Hashimoto
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Low
Ryota Hashimoto

Bug Description

In tools/install-venv.py, pip install pyOpenSSL doesn't work until installing openssl-devel package.

git diff
diff --git a/tools/install_venv.py b/tools/install_venv.py
index 42ed32c..0481013 100644
--- a/tools/install_venv.py
+++ b/tools/install_venv.py
@@ -95,9 +95,9 @@ class Distro(object):

 class Fedora(Distro):
- """This covers all Fedora-based distributions.
+ """This covers all Fedora-based distributions except CentOS.

- Includes: Fedora, RHEL, CentOS, Scientific Linux"""
+ Includes: Fedora, RHEL, Scientific Linux"""

     def check_pkg(self, pkg):
         return run_command_with_code(['rpm', '-q', pkg],
@@ -141,10 +141,21 @@ class Fedora(Distro):
                          'contrib/redhat-eventlet.patch')

+class CentOS(Fedora):
+ """This covers CentOS. """
+
+ def post_process(self):
+ if not self.check_pkg('openssl-devel'):
+ self.yum_install('openssl-devel', check_exit_code=False)
+
+
 def get_distro():
     if (os.path.exists('/etc/fedora-release') or
         os.path.exists('/etc/redhat-release')):
- return Fedora()
+ if os.path.exists('/etc/redhat-release') and run_command_with_code(['grep', 'CentOS', '/etc/redhat-release']) == 0:
+ return CentOS()
+ else:
+ return Fedora()
     else:
         return Distro()

Revision history for this message
Matthew Treinish (treinish) wrote :

Nice catch. Your patch looks like it works, can you push this patch to gerrit for review.

See: http://wiki.openstack.org/HowToContribute

Changed in tempest:
assignee: nobody → Ryota Hashimoto (hashimotor)
status: New → Confirmed
Changed in tempest:
importance: Undecided → Low
status: Confirmed → Triaged
Changed in tempest:
status: Triaged → In Progress
Revision history for this message
Matthew Treinish (treinish) wrote :
Changed in tempest:
status: In Progress → Fix Committed
Changed in tempest:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.