X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2Finstall_dependencies.sh;h=40437804c45d8e2f67e5969918be55ab823393a9;hb=HEAD;hp=3fe1e725b6b99d82fe9164157533af94bf8b577a;hpb=ac6f78b6c88ed8975f6555fd85492ec59d3278d0;p=barometer.git diff --git a/ci/install_dependencies.sh b/ci/install_dependencies.sh index 3fe1e725..40437804 100755 --- a/ci/install_dependencies.sh +++ b/ci/install_dependencies.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2017 Intel Corporation +# Copyright 2017-21 Anuket, Intel Corporation and others # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,21 +16,18 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source $DIR/utility/package-list.sh -# For collectd -sudo yum install -y yum-utils -sudo yum install -y epel-release -sudo yum-builddep -y collectd +# Reuse build_base_machine.sh for this distro, to install the required packages +# Detect OS name and version from systemd based os-release file +. /etc/os-release +distro_dir="$DIR/../systems/$ID/$VERSION_ID" -sudo yum -y install autoconf automake flex bison libtool pkg-config - -sudo yum -y install git - -sudo yum -y install rpm-build \ - libcap-devel xfsprogs-devel iptables-devel \ - libmemcached-devel gtk2-devel libvirt-devel - -# For intel-cmt-cat -sudo yum -y install wget +# build base system using OS specific scripts +if [ -d "$distro_dir" ] && [ -e "$distro_dir/build_base_machine.sh" ]; then + sudo $distro_dir/build_base_machine.sh || ( echo "$distro_dir/build_base_machine.sh failed" && exit 1 ) +else + "$distro_dir is not supported" + exit 1 +fi # For RPM build mkdir -p $RPM_WORKDIR/{BUILD,RPMS,SOURCES,SPECS,SRPMS}