From ca95a7186386bba401b1c22ae3da8b3af156ca5e Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Mon, 18 May 2020 15:14:34 +0200 Subject: [PATCH] pkgdep: Introduce Debian-specific source Change-Id: I71b129b3928f1d5881f42ebfd1510a3fb4055cd3 Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2504 Tested-by: SPDK CI Jenkins Reviewed-by: Karol Latecki Reviewed-by: John Kariuki Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- scripts/pkgdep/debian.sh | 57 ++++++++++++++++++++++++++++++++++++++++ scripts/pkgdep/ubuntu.sh | 1 + 2 files changed, 58 insertions(+) create mode 100755 scripts/pkgdep/debian.sh create mode 120000 scripts/pkgdep/ubuntu.sh diff --git a/scripts/pkgdep/debian.sh b/scripts/pkgdep/debian.sh new file mode 100755 index 000000000..be86edce2 --- /dev/null +++ b/scripts/pkgdep/debian.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +VERSION_ID_NUM=$(sed 's/\.//g' <<< $VERSION_ID) +# Includes Ubuntu, Debian +# Minimal install +apt-get install -y gcc g++ make libcunit1-dev libaio-dev libssl-dev \ + uuid-dev libiscsi-dev python libncurses5-dev libncursesw5-dev python3-pip +pip3 install ninja +pip3 install meson +# Additional dependencies for SPDK CLI - not available on older Ubuntus +apt-get install -y python3-configshell-fb python3-pexpect || echo \ + "Note: Some SPDK CLI dependencies could not be installed." + +# Additional dependencies for DPDK +if [[ $NAME == "Ubuntu" ]] && [[ $VERSION_ID_NUM -lt 1900 ]]; then + echo "Ubuntu $VERSION_ID needs NASM version 2.13.03 for DPDK but is not in the mainline repository." + echo "You can install it manually" +else + apt-get install -y nasm +fi +apt-get install -y libnuma-dev +# Additional dependencies for ISA-L used in compression +apt-get install -y autoconf automake libtool help2man +if [[ $INSTALL_DEV_TOOLS == "true" ]]; then + # Tools for developers + apt-get install -y git astyle pep8 lcov clang sg3-utils pciutils shellcheck + # Additional python style checker not available on ubuntu 16.04 or earlier. + apt-get install -y pycodestyle || true + # Additional (optional) dependencies for showing backtrace in logs + apt-get install -y libunwind-dev || true + # Additional dependecies for nvmf performance test script + apt-get install -y python3-paramiko + install_shfmt +fi +if [[ $INSTALL_PMEM == "true" ]]; then + # Additional dependencies for building pmem based backends + if [[ $NAME == "Ubuntu" ]] && [[ $VERSION_ID_NUM -gt 1800 ]]; then + apt-get install -y libpmem-dev + fi +fi +if [[ $INSTALL_FUSE == "true" ]]; then + # Additional dependencies for FUSE and NVMe-CUSE + if [[ $NAME == "Ubuntu" ]] && ((VERSION_ID_NUM > 1400 && VERSION_ID_NUM < 1900)); then + echo "Ubuntu $VERSION_ID does not have libfuse3-dev in mainline repository." + echo "You can install it manually" + else + apt-get install -y libfuse3-dev + fi +fi +if [[ $INSTALL_RDMA == "true" ]]; then + # Additional dependencies for RDMA transport in NVMe over Fabrics + apt-get install -y libibverbs-dev librdmacm-dev +fi +if [[ $INSTALL_DOCS == "true" ]]; then + # Additional dependencies for building docs + apt-get install -y doxygen mscgen graphviz +fi diff --git a/scripts/pkgdep/ubuntu.sh b/scripts/pkgdep/ubuntu.sh new file mode 120000 index 000000000..0edcb8b83 --- /dev/null +++ b/scripts/pkgdep/ubuntu.sh @@ -0,0 +1 @@ +debian.sh \ No newline at end of file