1#!/usr/bin/env bash 2 3VERSION_ID_NUM=$(sed 's/\.//g' <<< $VERSION_ID) 4# Includes Ubuntu, Debian 5# Minimal install 6apt-get install -y gcc g++ make cmake libcunit1-dev libaio-dev libssl-dev libjson-c-dev libcmocka-dev \ 7 uuid-dev libiscsi-dev python libncurses5-dev libncursesw5-dev python3-pip 8pip3 install ninja 9if ! pip3 install meson; then 10 # After recent updates pip3 on ubuntu1604 provides meson version which requires python >= 3.6. 11 # Unfortunately, the latest available version of python3 there is 3.5.2. In case pip3 fails to 12 # install meson fallback to packaged version of it ubuntu1604's repos may provide. 13 apt-get install -y meson 14fi 15pip3 install pyelftools 16# Additional dependencies for SPDK CLI - not available on older Ubuntus 17apt-get install -y python3-configshell-fb python3-pexpect || echo \ 18 "Note: Some SPDK CLI dependencies could not be installed." 19 20# Additional dependencies for DPDK 21if [[ $NAME == "Ubuntu" ]] && [[ $VERSION_ID_NUM -lt 1900 ]]; then 22 echo "Ubuntu $VERSION_ID needs NASM version 2.14 for DPDK but is not in the mainline repository." 23 echo "You can install it manually" 24else 25 apt-get install -y nasm 26fi 27apt-get install -y libnuma-dev 28# Additional dependencies for ISA-L used in compression 29apt-get install -y autoconf automake libtool help2man 30if [[ $INSTALL_DEV_TOOLS == "true" ]]; then 31 # Tools for developers 32 apt-get install -y git astyle pep8 lcov clang sg3-utils pciutils shellcheck abigail-tools bash-completion 33 # Additional python style checker not available on ubuntu 16.04 or earlier. 34 apt-get install -y pycodestyle || true 35 # Additional dependecies for nvmf performance test script 36 apt-get install -y python3-paramiko 37fi 38if [[ $INSTALL_PMEM == "true" ]]; then 39 # Additional dependencies for building pmem based backends 40 if [[ $NAME == "Ubuntu" ]] && [[ $VERSION_ID_NUM -gt 1800 ]]; then 41 apt-get install -y libpmem-dev 42 apt-get install -y libpmemblk-dev 43 fi 44fi 45if [[ $INSTALL_FUSE == "true" ]]; then 46 # Additional dependencies for FUSE and NVMe-CUSE 47 if [[ $NAME == "Ubuntu" ]] && ((VERSION_ID_NUM > 1400 && VERSION_ID_NUM < 1900)); then 48 echo "Ubuntu $VERSION_ID does not have libfuse3-dev in mainline repository." 49 echo "You can install it manually" 50 else 51 apt-get install -y libfuse3-dev 52 fi 53fi 54if [[ $INSTALL_RDMA == "true" ]]; then 55 # Additional dependencies for RDMA transport in NVMe over Fabrics 56 apt-get install -y libibverbs-dev librdmacm-dev 57fi 58if [[ $INSTALL_DOCS == "true" ]]; then 59 # Additional dependencies for building docs 60 apt-get install -y doxygen mscgen graphviz 61fi 62