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