diff options
author | Adin Scannell <ascannell@google.com> | 2020-11-30 13:38:31 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-30 13:40:23 -0800 |
commit | 3a60bc47a082d5e9ef4903d48ef3bdb505eb8b6e (patch) | |
tree | 8e259620aed54595926a4b60705781fed52c6bed /tools/installers/containerd.sh | |
parent | 4fd71a7b20d53ba070bd2d937bb980991305b19d (diff) |
Ensure containerd is used from installed location.
Currently, if containerd is installed locally via tools/installers/containerd,
then it will not necessarily be used if containerd is installed in the system
path. This means that the existing containerd tests are all likely broken.
Also, use libbtrfs-dev instead of btrfs-tools, which is not actually required.
PiperOrigin-RevId: 344879109
Diffstat (limited to 'tools/installers/containerd.sh')
-rwxr-xr-x | tools/installers/containerd.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/installers/containerd.sh b/tools/installers/containerd.sh index 6b7bb261c..4bbbffeee 100755 --- a/tools/installers/containerd.sh +++ b/tools/installers/containerd.sh @@ -43,10 +43,23 @@ install_helper() { make install) } +# Figure out were btrfs headers are. +# +# Ubuntu 16.04 has only btrfs-tools, while 18.04 has a transitional package, +# and later versions no longer have the transitional package. +source /etc/os-release +declare BTRFS_DEV +if [[ "${ID}" == "ubuntu" ]] && [[ "${VERSION_ID%.*}" -le "18" ]]; then + BTRFS_DEV="btrfs-tools" +else + BTRFS_DEV="btrfs-dev" +fi +readonly BTRFS_DEV + # Install dependencies for the crictl tests. while true; do if (apt-get update && apt-get install -y \ - btrfs-tools \ + "${BTRFS_DEV}" \ libseccomp-dev); then break fi |