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 libcunit1-dev libaio-dev libssl-dev \ 7 uuid-dev libiscsi-dev python libncurses5-dev libncursesw5-dev python3-pip 8pip3 install ninja 9pip3 install meson 10# Additional dependencies for SPDK CLI - not available on older Ubuntus 11apt-get install -y python3-configshell-fb python3-pexpect || echo \ 12 "Note: Some SPDK CLI dependencies could not be installed." 13 14# Additional dependencies for DPDK 15if [[ $NAME == "Ubuntu" ]] && [[ $VERSION_ID_NUM -lt 1900 ]]; then 16 echo "Ubuntu $VERSION_ID needs NASM version 2.14 for DPDK but is not in the mainline repository." 17 echo "You can install it manually" 18else 19 apt-get install -y nasm 20fi 21apt-get install -y libnuma-dev 22# Additional dependencies for ISA-L used in compression 23apt-get install -y autoconf automake libtool help2man 24if [[ $INSTALL_DEV_TOOLS == "true" ]]; then 25 # Tools for developers 26 apt-get install -y git astyle pep8 lcov clang sg3-utils pciutils shellcheck abigail-tools 27 # Additional python style checker not available on ubuntu 16.04 or earlier. 28 apt-get install -y pycodestyle || true 29 # Additional dependecies for nvmf performance test script 30 apt-get install -y python3-paramiko 31fi 32if [[ $INSTALL_PMEM == "true" ]]; then 33 # Additional dependencies for building pmem based backends 34 if [[ $NAME == "Ubuntu" ]] && [[ $VERSION_ID_NUM -gt 1800 ]]; then 35 apt-get install -y libpmem-dev 36 apt-get install -y libpmemblk-dev 37 fi 38fi 39if [[ $INSTALL_FUSE == "true" ]]; then 40 # Additional dependencies for FUSE and NVMe-CUSE 41 if [[ $NAME == "Ubuntu" ]] && ((VERSION_ID_NUM > 1400 && VERSION_ID_NUM < 1900)); then 42 echo "Ubuntu $VERSION_ID does not have libfuse3-dev in mainline repository." 43 echo "You can install it manually" 44 else 45 apt-get install -y libfuse3-dev 46 fi 47fi 48if [[ $INSTALL_RDMA == "true" ]]; then 49 # Additional dependencies for RDMA transport in NVMe over Fabrics 50 apt-get install -y libibverbs-dev librdmacm-dev 51fi 52if [[ $INSTALL_DOCS == "true" ]]; then 53 # Additional dependencies for building docs 54 apt-get install -y doxygen mscgen graphviz 55fi 56