install 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash -ex
  2. COMMON="meson curl git make file bzip2 jose tang cryptsetup jq ${CC}"
  3. case "${DISTRO}" in
  4. debian:*|ubuntu:*)
  5. # This solves an intermittant error when fetching packages on debian
  6. sed -i 's|httpredir.debian.org|ftp.us.debian.org|g' /etc/apt/sources.list
  7. sed -i 's|\/archive.ubuntu|\/us.archive.ubuntu|g' /etc/apt/sources.list
  8. apt-get clean
  9. while ! apt-get update; do
  10. sleep 5
  11. done
  12. while ! apt-get -y \
  13. -o Dpkg::Options::="--force-confdef" \
  14. -o Dpkg::Options::="--force-confnew" \
  15. dist-upgrade; do
  16. sleep 5
  17. done
  18. export DEBIAN_FRONTEND=noninteractive
  19. apt-get install -y keyboard-configuration console-setup
  20. while ! apt-get -y install ${COMMON} \
  21. build-essential pkg-config libssl-dev libjansson-dev libjose-dev \
  22. luksmeta libluksmeta-dev libpwquality-tools libglib2.0-dev \
  23. libudisks2-dev libaudit-dev; do
  24. sleep 5
  25. done
  26. ;;
  27. fedora:*)
  28. dnf -y clean all
  29. dnf -y --setopt=deltarpm=0 update
  30. dnf -y install dnf-utils jq
  31. dnf -y builddep clevis
  32. ;;
  33. centos:*)
  34. yum -y clean all
  35. yum -y --setopt=deltarpm=0 update
  36. yum install -y yum-utils
  37. yum config-manager -y --set-enabled PowerTools || true
  38. yum -y install epel-release
  39. yum -y install ${COMMON} 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: