Isaac Wilcove | cfd9a03 | 2017-01-15 00:08:58 +0000 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -e |
| 4 | set -u |
| 5 | |
| 6 | export DEBIAN_FRONTEND=noninteractive |
| 7 | |
| 8 | readonly PKGS=( |
| 9 | bazel |
| 10 | clang-3.6 |
| 11 | clang-format-3.5 |
| 12 | gfortran |
| 13 | git |
| 14 | libblas-dev |
| 15 | liblapack-dev |
| 16 | libpython3-dev |
| 17 | libpython-dev |
| 18 | python3 |
| 19 | python3-matplotlib |
| 20 | python3-numpy |
| 21 | python3-scipy |
| 22 | python-matplotlib |
| 23 | python-scipy |
| 24 | resolvconf |
| 25 | ruby |
| 26 | ) |
| 27 | |
| 28 | # Set up the backports repo. |
| 29 | cat > /etc/apt/sources.list.d/backports.list <<EOT |
| 30 | deb http://http.debian.net/debian jessie-backports main |
| 31 | EOT |
| 32 | |
| 33 | # Set up the LLVM repo. |
| 34 | cat > /etc/apt/sources.list.d/llvm-3.6.list <<EOT |
| 35 | deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.6 main |
| 36 | deb-src http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.6 main |
| 37 | EOT |
| 38 | |
| 39 | # Set up the 971-managed bazel repo. |
| 40 | cat > /etc/apt/sources.list.d/bazel-971.list <<EOT |
| 41 | deb http://robotics.mvla.net/files/frc971/packages jessie main |
| 42 | EOT |
| 43 | |
| 44 | # Enable user namespace for sandboxing. |
| 45 | cat > /etc/sysctl.d/99-enable-user-namespaces.conf <<EOT |
| 46 | kernel.unprivileged_userns_clone = 1 |
| 47 | EOT |
| 48 | |
Philipp Schrader | 0b6ee85 | 2017-07-23 14:28:03 -0700 | [diff] [blame] | 49 | # We need to explicitly pull in the java certificates from backports. Otherwise |
| 50 | # bazel won't install properly. |
| 51 | cat > /etc/apt/preferences.d/java_certificates <<EOT |
| 52 | Package: ca-certificates-java |
| 53 | Pin: release a=jessie-backports |
| 54 | Pin-Priority: 900 |
| 55 | EOT |
| 56 | |
Isaac Wilcove | cfd9a03 | 2017-01-15 00:08:58 +0000 | [diff] [blame] | 57 | # Accept the LLVM GPG key so we can install their packages. |
| 58 | wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add - |
| 59 | |
| 60 | # Install all the packages that we need/want. |
| 61 | apt-get update |
| 62 | for pkg in "${PKGS[@]}"; do |
| 63 | apt-get install -y -f --force-yes "$pkg" |
| 64 | done |