From 26640a29eb330c24cc537919014fba20adb7c9b1 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Wed, 19 Dec 2018 11:32:46 -0800 Subject: [PATCH] Install libseccomp2 package based on debian version. Signed-off-by: Lantao Liu --- test/build-utils.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/build-utils.sh b/test/build-utils.sh index 676feb66a..cf1939be3 100755 --- a/test/build-utils.sh +++ b/test/build-utils.sh @@ -29,11 +29,19 @@ fi gcloud auth activate-service-account --key-file "${GOOGLE_APPLICATION_CREDENTIALS}" --project="${PROJECT}" # Install dependent libraries. -sh -c "echo 'deb http://ftp.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/backports.list" apt-get update apt-get install -y btrfs-tools -apt-get install -y libseccomp2/jessie-backports -apt-get install -y libseccomp-dev/jessie-backports + +# Kubernetes test infra uses jessie and stretch. +if cat /etc/os-release | grep jessie; then + sh -c "echo 'deb http://ftp.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/backports.list" + apt-get update + apt-get install -y libseccomp2/jessie-backports + apt-get install -y libseccomp-dev/jessie-backports +else + apt-get install -y libseccomp2 + apt-get install -y libseccomp-dev +fi # PULL_REFS is from prow. if [ ! -z "${PULL_REFS:-""}" ]; then