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