1#!/usr/bin/env bash 2 3# SPDX-License-Identifier: BSD-3-Clause 4# All rights reserved. 5 6additional_dependencies() { 7 # Additional dependencies for SPDK CLI 8 tdnf install -y python3-pexpect 9 # Additional dependencies for ISA-L used in compression 10 tdnf install -y help2man 11 # Additional dependencies for DPDK 12 if [[ "$(uname -m)" != "aarch64" ]]; then 13 tdnf install -y nasm 14 fi 15 tdnf install -y libnuma-devel 16 # Additional dependencies for USDT 17 tdnf install -y systemtap-sdt-devel 18 if [[ $INSTALL_DEV_TOOLS == "true" ]]; then 19 # Tools for developers 20 devtool_pkgs=(git sg3_utils pciutils bash-completion ruby-devel) 21 devtool_pkgs+=(gcovr python3-pycodestyle) 22 tdnf install -y "${devtool_pkgs[@]}" 23 fi 24 if [[ $INSTALL_PMEM == "true" ]]; then 25 # Additional dependencies for building pmem based backends 26 tdnf install -y libpmemobj-devel || true 27 fi 28 if [[ $INSTALL_FUSE == "true" ]]; then 29 # Additional dependencies for FUSE and NVMe-CUSE 30 tdnf install -y fuse3-devel 31 fi 32 if [[ $INSTALL_RBD == "true" ]]; then 33 # Additional dependencies for RBD bdev in NVMe over Fabrics 34 tdnf install -y librados-devel librbd-devel 35 fi 36 if [[ $INSTALL_RDMA == "true" ]]; then 37 # Additional dependencies for RDMA transport in NVMe over Fabrics 38 tdnf install -y libibverbs librdmacm 39 fi 40 if [[ $INSTALL_DOCS == "true" ]]; then 41 # Additional dependencies for building docs 42 tdnf install -y mscgen || echo "Warning: couldn't install mscgen via tdnf. Please install mscgen manually." 43 tdnf install -y doxygen graphviz 44 fi 45 if [[ $INSTALL_DAOS == "true" ]]; then 46 echo "Unsupported. Skipping installation of DAOS bdev dependencies." 47 fi 48 # Additional dependencies for Avahi 49 if [[ $INSTALL_AVAHI == "true" ]]; then 50 # Additional dependencies for Avahi 51 tdnf install -y avahi-devel 52 fi 53} 54 55tdnf install -y ca-certificates build-essential 56tdnf install -y CUnit-devel \ 57 clang \ 58 clang-devel \ 59 cmake \ 60 json-c-devel \ 61 libaio-devel \ 62 libcmocka-devel \ 63 libiscsi-devel \ 64 libuuid-devel \ 65 ncurses-devel \ 66 openssl-devel \ 67 procps-ng \ 68 python \ 69 python3-devel \ 70 python3-pip \ 71 tar \ 72 unzip 73 74if [[ ! -e /usr/bin/python ]]; then 75 ln -s /usr/bin/python3 /usr/bin/python 76fi 77 78pips=( 79 meson 80 ninja 81 pyelftools 82 ijson 83 python-magic 84 pyyaml 85 grpcio 86 grpcio-tools 87 Jinja2 88 tabulate 89) 90 91if ((EUID == 0)); then 92 cat <<- WARNING 93 Warning: Running as root. You may want to install the pip packages 94 as a non-root user if you wish to build SPDK as a non-root user. 95 96 Required packages: 97 $(printf ' %s\n' "${pips[@]}") 98 99 WARNING 100fi 101 102pip3 install "${pips[@]}" 103 104additional_dependencies 105