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