1#!/usr/bin/env bash 2# SPDX-License-Identifier: BSD-3-Clause 3# Copyright (C) 2020 Intel Corporation 4# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. 5# All rights reserved. 6# Copyright (c) 2022 Dell Inc, or its subsidiaries. 7# 8 9case "$VERSION_CODENAME" in 10 bookworm | noble) 11 # These ship with pip which enforces PEP668 12 apt-get install -y python3-venv 13 virtdir=${PIP_VIRTDIR:-/var/spdk/dependencies/pip} 14 15 mkdir --p "$virtdir" 16 pkgdep_toolpath pip "$virtdir/bin" 17 18 pip3() ( 19 if [[ ! -e $virtdir/bin/activate ]]; then 20 python3 -m venv --upgrade-deps --system-site-packages "$virtdir" 21 fi 22 source "$virtdir/bin/activate" 23 "$virtdir/bin/pip3" "$@" 24 ) 25 26 apt-get install -y pkgconf 27 ;; 28 *) 29 apt-get install -y pkg-config 30 ;; 31esac 32 33apt-get install -y gcc g++ make libcunit1-dev libaio-dev libssl-dev libjson-c-dev libcmocka-dev uuid-dev libiscsi-dev \ 34 libkeyutils-dev libncurses5-dev libncursesw5-dev python3 python3-pip python3-dev unzip libfuse3-dev patchelf 35 36pip3 install ninja 37pip3 install meson 38pip3 install pyelftools 39pip3 install ijson 40pip3 install python-magic 41pip3 install grpcio 42pip3 install grpcio-tools 43pip3 install pyyaml 44pip3 install Jinja2 45pip3 install tabulate 46# Additional dependencies for SPDK CLI 47apt-get install -y python3-configshell-fb python3-pexpect 48 49# Additional dependencies for DPDK 50apt-get install -y nasm libnuma-dev 51# Additional dependencies for ISA-L used in compression 52apt-get install -y autoconf automake libtool help2man 53# Additional dependencies for USDT 54apt-get install -y systemtap-sdt-dev 55if [[ $INSTALL_DEV_TOOLS == "true" ]]; then 56 # Tools for developers 57 apt-get install -y git astyle lcov clang sg3-utils pciutils shellcheck \ 58 abigail-tools bash-completion ruby-dev pycodestyle bundler rake 59 # Additional dependencies for nvmf performance test script 60 apt-get install -y python3-paramiko 61fi 62if [[ $INSTALL_PMEM == "true" ]]; then 63 # Additional dependencies for building pmem based backends 64 apt-get install -y libpmem-dev libpmemblk-dev libpmemobj-dev 65fi 66if [[ $INSTALL_RBD == "true" ]]; then 67 # Additional dependencies for RBD bdev in NVMe over Fabrics 68 apt-get install -y librados-dev librbd-dev 69fi 70if [[ $INSTALL_RDMA == "true" ]]; then 71 # Additional dependencies for RDMA transport in NVMe over Fabrics 72 apt-get install -y libibverbs-dev librdmacm-dev 73fi 74if [[ $INSTALL_DOCS == "true" ]]; then 75 # Additional dependencies for building docs 76 apt-get install -y doxygen mscgen graphviz 77fi 78# Additional dependencies for Avahi 79if [[ $INSTALL_AVAHI == "true" ]]; then 80 # Additional dependencies for Avahi 81 apt-get install -y libavahi-client-dev 82fi 83if [[ $INSTALL_IDXD == "true" ]]; then 84 # accel-config-devel is required for kernel IDXD implementation used in DSA accel module 85 if [[ $ID == "ubuntu" && ${VERSION_ID:0:2} -ge "23" ]]; then 86 apt-get install -y libaccel-config-dev 87 else 88 echo "libaccel-config is only present on Ubuntu 23.04 or higher." 89 fi 90fi 91if [[ $INSTALL_LZ4 == "true" ]]; then 92 apt-get install -y liblz4-dev 93fi 94