Browse code

RHEL6 support rpms

Install some rpms required for operation on RHEL6. Additionally,
remove some system packages that interfere with pip installs.

Change-Id: I273ce59d7bf066e73d524f61b8ad048599101dab

Ian Wienand authored on 2013/04/26 10:28:29
Showing 4 changed files
... ...
@@ -1,14 +1,19 @@
1 1
 bridge-utils
2 2
 curl
3
+dbus
3 4
 euca2ools # only for testing client
5
+gcc # dist:rhel6 [2]
4 6
 git-core
5 7
 openssh-server
6 8
 openssl
9
+libxml2-devel # dist:rhel6 [2]
10
+libxslt-devel # dist:rhel6 [2]
7 11
 psmisc
8 12
 pylint
9 13
 python-netaddr
10 14
 python-pep8
11 15
 python-pip
16
+python-prettytable # dist:rhel6 [1]
12 17
 python-unittest2
13 18
 python-virtualenv
14 19
 screen
... ...
@@ -16,3 +21,12 @@ tar
16 16
 tcpdump
17 17
 unzip
18 18
 wget
19
+
20
+# [1] : some of installed tools have unversioned dependencies on this,
21
+# but others have versioned (<=0.7).  So if a later version (0.7.1)
22
+# gets installed in response to an unversioned dependency, it breaks.
23
+# This pre-installs a compatible 0.6(ish) version from RHEL
24
+
25
+# [2] : RHEL6 rpm versions of python-lxml is old, and has to be
26
+# removed.  Several tools rely on it, so we install the dependencies
27
+# pip needs to build it here (see tools/install_prereqs.sh)
19 28
\ No newline at end of file
... ...
@@ -1,3 +1,4 @@
1
+gcc
1 2
 libxml2-devel
2 3
 python-argparse
3 4
 python-devel
... ...
@@ -525,7 +525,6 @@ failed() {
525 525
 # an error.  It is also useful for following along as the install occurs.
526 526
 set -o xtrace
527 527
 
528
-
529 528
 # Install Packages
530 529
 # ================
531 530
 
... ...
@@ -546,6 +545,42 @@ if is_service_enabled q-agt; then
546 546
     install_quantum_agent_packages
547 547
 fi
548 548
 
549
+#
550
+# System-specific preconfigure
551
+# ============================
552
+
553
+if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
554
+    # An old version (2.0.1) of python-crypto is probably installed on
555
+    # a fresh system, via the dependency chain
556
+    # cas->python-paramiko->python-crypto (related to anaconda).
557
+    # Unfortunately, "pip uninstall pycrypto" will remove the
558
+    # .egg-info file for this rpm-installed version, but leave most of
559
+    # the actual library files behind in /usr/lib64/python2.6/Crypto.
560
+    # When later "pip install pycrypto" happens, the built library
561
+    # will be installed over these existing files; the result is a
562
+    # useless mess of old, rpm-packaged files and pip-installed files.
563
+    # Unsurprisingly, the end result is it doesn't work.  Thus we have
564
+    # to get rid of it now so that any packages that pip-install
565
+    # pycrypto get a "clean slate".
566
+    # (note, we have to be careful about other RPM packages specified
567
+    # pulling in python-crypto as well.  That's why RHEL6 doesn't
568
+    # install python-paramiko packages for example...)
569
+    uninstall_package python-crypto
570
+
571
+    # A similar thing happens for python-lxml (a dependency of
572
+    # ipa-client, an auditing thing we don't care about).  We have the
573
+    # build-dependencies the lxml pip-install will need (gcc,
574
+    # libxml2-dev & libxslt-dev) in the "general" rpm lists
575
+    uninstall_package python-lxml
576
+
577
+    # If the dbus rpm was installed by the devstack rpm dependencies
578
+    # then you may hit a bug where the uuid isn't generated because
579
+    # the service was never started (PR#598200), causing issues for
580
+    # Nova stopping later on complaining that
581
+    # '/var/lib/dbus/machine-id' doesn't exist.
582
+    sudo service messagebus restart
583
+fi
584
+
549 585
 TRACK_DEPENDS=${TRACK_DEPENDS:-False}
550 586
 
551 587
 # Install python packages into a virtualenv so that we can track them
... ...
@@ -559,7 +594,6 @@ if [[ $TRACK_DEPENDS = True ]]; then
559 559
     $DEST/.venv/bin/pip freeze > $DEST/requires-pre-pip
560 560
 fi
561 561
 
562
-
563 562
 # Check Out and Install Source
564 563
 # ----------------------------
565 564
 
... ...
@@ -42,7 +42,8 @@ NOW=$(date "+%s")
42 42
 LAST_RUN=$(head -1 $PREREQ_RERUN_MARKER 2>/dev/null || echo "0")
43 43
 DELTA=$(($NOW - $LAST_RUN))
44 44
 if [[ $DELTA -lt $PREREQ_RERUN_SECONDS && -z "$FORCE_PREREQ" ]]; then
45
-    echo "Re-run time has not expired ($(($PREREQ_RERUN_SECONDS - $DELTA)) seconds remaining); exiting..."
45
+    echo "Re-run time has not expired ($(($PREREQ_RERUN_SECONDS - $DELTA)) seconds remaining) "
46
+    echo "and FORCE_PREREQ not set; exiting..."
46 47
     return 0
47 48
 fi
48 49