1#!/usr/bin/env bash 2# SPDX-License-Identifier: BSD-3-Clause 3# Copyright (C) 2020 Intel Corporation 4# All rights reserved. 5# 6# Install main dependencies 7pacman -Sy --needed --noconfirm gcc make cunit libaio openssl \ 8 libutil-linux libiscsi python ncurses json-c cmocka ninja meson fuse3 9# Additional dependencies for SPDK CLI 10pacman -Sy --needed --noconfirm python-pexpect python-pip libffi 11pip install configshell_fb 12pip install pyelftools 13pip install ijson 14pip install python-magic 15pip install grpcio 16pip install grpcio-tools 17pip install pyyaml 18pip install Jinja2 19pip install tabulate 20# Additional dependencies for DPDK 21pacman -Sy --needed --noconfirm numactl nasm 22# Additional dependencies for ISA-L used in compression 23pacman -Sy --needed --noconfirm autoconf automake libtool help2man 24if [[ $INSTALL_DEV_TOOLS == "true" ]]; then 25 # Tools for developers 26 pacman -Sy --needed --noconfirm git astyle autopep8 \ 27 clang sg3_utils pciutils shellcheck bash-completion 28 #fakeroot needed to install via makepkg 29 pacman -Sy --needed --noconfirm fakeroot 30 su - $SUDO_USER -c "pushd /tmp; 31 git clone https://aur.archlinux.org/perl-perlio-gzip.git; 32 cd perl-perlio-gzip; 33 yes y | makepkg -si --needed; 34 cd ..; rm -rf perl-perlio-gzip 35 popd" 36 # sed is to modify sources section in PKGBUILD 37 # By default it uses git:// which will fail behind proxy, so 38 # redirect it to http:// source instead 39 su - $SUDO_USER -c "pushd /tmp; 40 git clone https://aur.archlinux.org/lcov-git.git; 41 cd lcov-git; 42 sed -i 's/git:/git+http:/' PKGBUILD; 43 makepkg -si --needed --noconfirm; 44 cd .. && rm -rf lcov-git; 45 popd" 46fi 47if [[ $INSTALL_PMEM == "true" ]]; then 48 # Additional dependencies for building pmem based backends 49 pacman -Sy --needed --noconfirm ndctl pkg-config 50 git clone https://github.com/pmem/pmdk.git /tmp/pmdk -b 1.6.1 51 make -C /tmp/pmdk -j$(nproc) 52 make install prefix=/usr -C /tmp/pmdk 53 echo "/usr/local/lib" > /etc/ld.so.conf.d/pmdk.conf 54 ldconfig 55 rm -rf /tmp/pmdk 56fi 57if [[ $INSTALL_RBD == "true" ]]; then 58 echo "Arch Linux does not have librados-devel and librbd-devel in mainline repositories." 59 echo "You can install them manually" 60fi 61if [[ $INSTALL_RDMA == "true" ]]; then 62 # Additional dependencies for RDMA transport in NVMe over Fabrics 63 if [[ -n "$http_proxy" ]]; then 64 gpg_options=" --keyserver hkp://pgp.mit.edu:11371 --keyserver-options \"http-proxy=$http_proxy\"" 65 fi 66 su - $SUDO_USER -c "gpg $gpg_options --recv-keys 29F0D86B9C1019B1" 67 su - $SUDO_USER -c "pushd /tmp; 68 git clone https://aur.archlinux.org/rdma-core.git; 69 cd rdma-core; 70 makepkg -si --needed --noconfirm; 71 cd .. && rm -rf rdma-core; 72 popd" 73fi 74if [[ $INSTALL_DOCS == "true" ]]; then 75 # Additional dependencies for building docs 76 pacman -Sy --needed --noconfirm doxygen graphviz 77 pacman -S --noconfirm --needed gd ttf-font 78 su - $SUDO_USER -c "pushd /tmp; 79 git clone https://aur.archlinux.org/mscgen.git; 80 cd mscgen; 81 makepkg -si --needed --noconfirm; 82 cd .. && rm -rf mscgen; 83 popd" 84fi 85