Skip to content

Commit

Permalink
script: update dependecy packages for centos7/8
Browse files Browse the repository at this point in the history
Change-Id: Iaa6fbf421bfa859e174a6921fe8284f1e79cc329
Signed-off-by: Jun He <jun.he@arm.com>
Message-Id: <20201023024553.9921-1-jun.he@arm.com>
  • Loading branch information
JunHe77 authored and avikivity committed Oct 25, 2020
1 parent 5c3e4cd commit 627775d
Showing 1 changed file with 48 additions and 26 deletions.
74 changes: 48 additions & 26 deletions install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ redhat_packages=(
make
protobuf-devel
protobuf-compiler
python3
systemtap-sdt-devel
libtool
cmake
Expand All @@ -103,15 +104,27 @@ fedora_packages=(
valgrind-devel
)

centos_packages=(
centos7_packages=(
"${redhat_packages[@]}"
ninja-build
ragel
cmake3
rh-mongodb36-boost-devel
devtoolset-8-gcc-c++
devtoolset-8-libubsan
devtoolset-8-libasan
devtoolset-8-libatomic
devtoolset-9-gcc-c++
devtoolset-9-libubsan
devtoolset-9-libasan
devtoolset-9-libatomic
)

centos8_packages=(
"${redhat_packages[@]}"
ninja-build
ragel
gcc-toolset-9-gcc
gcc-toolset-9-gcc-c++
gcc-toolset-9-libubsan-devel
gcc-toolset-9-libasan-devel
gcc-toolset-9-libatomic-devel
)

# 1) glibc 2.30-3 has sys/sdt.h (systemtap include)
Expand Down Expand Up @@ -185,25 +198,34 @@ opensuse_packages=(
stow
)

if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then
apt-get install -y "${debian_packages[@]}"
elif [ "$ID" = "centos" ] || [ "$ID" = "fedora" ]; then
if [ "$ID" = "fedora" ]; then
case "$ID" in
ubuntu|debian)
apt-get install -y "${debian_packages[@]}"
;;
fedora)
dnf install -y "${fedora_packages[@]}"
else # centos
yum install -y epel-release centos-release-scl scl-utils
yum install -y "${centos_packages[@]}"
fi
elif [ "$ID" = "arch" ]; then
# main
if [ "$EUID" -eq "0" ]; then
pacman -Sy --needed --noconfirm "${arch_packages[@]}"
else
echo "seastar: running without root. Skipping main dependencies (pacman)." 1>&2
fi
elif [ "$ID" = "opensuse-leap" ]; then
zypper install -y "${opensuse_packages[@]}"
else
echo "Your system ($ID) is not supported by this script. Please install dependencies manually."
exit 1
fi
;;
centos)
if [ "$VERSION_ID" = "7" ]; then
yum install -y epel-release centos-release-scl scl-utils
yum install -y "${centos7_packages[@]}"
elif [ "$VERSION_ID" = "8" ]; then
dnf install -y epel-release
dnf install -y "${centos8_packages[@]}"
fi
;;
opensuse-leap)
zypper install -y "${opensuse_packages[@]}"
;;
arch)
if [ "$EUID" -eq "0" ]; then
pacman -Sy --needed --noconfirm "${arch_packages[@]}"
else
echo "seastar: running without root. Skipping main dependencies (pacman)." 1>&2
fi
;;
*)
echo "Your system ($ID) is not supported by this script. Please install dependencies manually."
exit 1
;;
esac

0 comments on commit 627775d

Please sign in to comment.