]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: install-deps.sh install EPEL and RHEL Optional 3871/head
authorLoic Dachary <ldachary@redhat.com>
Wed, 4 Mar 2015 12:47:37 +0000 (13:47 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 10 Mar 2015 10:39:52 +0000 (11:39 +0100)
On CentOS and RHEL, some dependencies come from EPEL.

Always enable RHEL Optional repository for RHEL as packages such as
packages such as libatomic_ops-devel or libedit-devel are only found
there in RHEL 6.5.

http://tracker.ceph.com/issues/11061 Refs: #11061

Signed-off-by: Loic Dachary <ldachary@redhat.com>
install-deps.sh

index cb050d692ad5288c274862afc7d90d3c537fc305..2db425146e1af67f53ca35bca2402653a551f20c 100755 (executable)
@@ -52,9 +52,21 @@ CentOS|Fedora|SUSE*|RedHatEnterpriseServer)
             SUSE*)
                 $SUDO zypper -y yum-utils
                 ;;
-            *)
+            Fedora)
                 $SUDO yum install -y yum-utils
                 ;;
+            CentOS|RedHatEnterpriseServer)
+                $SUDO yum install -y yum-utils
+                MAJOR_VERSION=$(lsb_release -rs | cut -f1 -d.)
+                if test $(lsb_release -si) == RedHatEnterpriseServer ; then
+                    $SUDO yum install subscription-manager
+                    $SUDO subscription-manager repos --enable=rhel-$MAJOR_VERSION-server-optional-rpms
+                fi
+                $SUDO yum-config-manager --add-repo https://dl.fedoraproject.org/pub/epel/$MAJOR_VERSION/x86_64/ 
+                $SUDO yum install --nogpgcheck -y epel-release
+                $SUDO rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$MAJOR_VERSION
+                $SUDO rm -f /etc/yum.repos.d/dl.fedoraproject.org*
+                ;;
         esac
         sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
         $SUDO yum-builddep -y $DIR/ceph.spec