From af694c3de8bfec23ccbd19b4041566d1759876f4 Mon Sep 17 00:00:00 2001 From: Maciej Wawryk Date: Fri, 17 Jan 2020 13:42:11 +0100 Subject: [PATCH] scripts/pkgdep.sh: Add dependencies for Centos8 Signed-off-by: Maciej Wawryk Change-Id: I5921d5f7f70f2df634ccd008eb27a02496a47bee Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/603 Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- scripts/pkgdep.sh | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/scripts/pkgdep.sh b/scripts/pkgdep.sh index 7af5c53de..a0d677d00 100755 --- a/scripts/pkgdep.sh +++ b/scripts/pkgdep.sh @@ -72,8 +72,19 @@ rootdir=$(readlink -f $scriptsdir/..) if [ -s /etc/redhat-release ]; then . /etc/os-release # Minimal install + if echo "$ID $VERSION_ID" | grep -E -q 'centos 8'; then + # Add PowerTools needed for install CUnit-devel in Centos8 + yum config-manager --set-enabled PowerTools + fi yum install -y gcc gcc-c++ make CUnit-devel libaio-devel openssl-devel \ - libuuid-devel libiscsi-devel python + libuuid-devel libiscsi-devel + if echo "$ID $VERSION_ID" | grep -E -q 'centos 8'; then + yum install -y python36 + #Create hard link to use in SPDK as python + ln /etc/alternatives/python3 /usr/bin/python + else + yum install -y python + fi # Additional dependencies for SPDK CLI - not available in rhel and centos if ! echo "$ID $VERSION_ID" | grep -E -q 'rhel 7|centos 7'; then yum install -y python3-configshell python3-pexpect @@ -86,7 +97,7 @@ if [ -s /etc/redhat-release ]; then # Tools for developers # Includes Fedora, CentOS 7, RHEL 7 # Add EPEL repository for CUnit-devel and libunwind-devel - if echo "$ID $VERSION_ID" | grep -E -q 'rhel 7|centos 7'; then + if echo "$ID $VERSION_ID" | grep -E -q 'rhel 7|centos 7|centos 8'; then if ! rpm --quiet -q epel-release; then yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm fi @@ -97,8 +108,13 @@ if [ -s /etc/redhat-release ]; then yum --enablerepo=extras install -y epel-release fi fi - yum install -y git astyle python-pycodestyle lcov \ - sg3_utils pciutils ShellCheck + if echo "$ID $VERSION_ID" | grep -E -q 'centos 8'; then + yum install -y python3-pycodestyle + echo "Centos 8 does not have lcov and ShellCheck dependencies" + else + yum install -y python-pycodestyle lcov ShellCheck + fi + yum install -y git astyle sg3_utils pciutils # Additional (optional) dependencies for showing backtrace in logs yum install -y libunwind-devel || true fi @@ -116,7 +132,8 @@ if [ -s /etc/redhat-release ]; then fi if [[ $INSTALL_DOCS == "true" ]]; then # Additional dependencies for building docs - yum install -y doxygen mscgen graphviz + yum install -y mscgen || echo "Warning: couldn't install mscgen via yum. Please install mscgen manually." + yum install -y doxygen graphviz fi elif [ -f /etc/debian_version ]; then . /etc/os-release