install-dependencies 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash -ex
  2. COMMON="meson curl git make file bzip2 jose tang cryptsetup keyutils jq socat ${CC}"
  3. case "${DISTRO}" in
  4. debian:*|ubuntu:*)
  5. apt-get clean
  6. while ! apt-get update; do
  7. sleep 5
  8. done
  9. while ! apt-get -y \
  10. -o Dpkg::Options::="--force-confdef" \
  11. -o Dpkg::Options::="--force-confnew" \
  12. dist-upgrade; do
  13. sleep 5
  14. done
  15. export DEBIAN_FRONTEND=noninteractive
  16. apt-get install -y keyboard-configuration console-setup
  17. while ! apt-get -y install ${COMMON} \
  18. build-essential pkg-config libssl-dev libjansson-dev libjose-dev \
  19. luksmeta libluksmeta-dev libpwquality-tools libglib2.0-dev \
  20. libudisks2-dev libaudit-dev systemd; do
  21. sleep 5
  22. done
  23. ;;
  24. fedora:*)
  25. printf 'max_parallel_downloads=10\nfastestmirror=1\n' >> /etc/dnf/dnf.conf
  26. dnf -y clean all
  27. dnf -y --setopt=deltarpm=0 update
  28. dnf -y install dnf-utils jq socat cryptsetup keyutils
  29. dnf -y builddep clevis
  30. ;;
  31. *centos:*)
  32. yum -y clean all
  33. yum -y --setopt=deltarpm=0 update
  34. yum install -y yum-utils
  35. yum config-manager -y --set-enabled crb || yum config-manager \
  36. -y --set-enabled powertools || :
  37. yum -y install epel-release
  38. yum -y --allowerasing install ${COMMON}
  39. yum -y install pkgconfig openssl-devel openssl zlib-devel \
  40. jansson-devel findutils gcc libjose-devel luksmeta libluksmeta-devel \
  41. audit-libs-devel tpm2-tools desktop-file-utils cracklib-dicts
  42. sed -i 's|>=1\.0\.2|>=1\.0\.1|' meson.build
  43. ;;
  44. esac
  45. # vim: set ts=8 shiftwidth=4 softtabstop=4 expandtab smarttab colorcolumn=80: