From 22213bb777a411fb28ddd1e89549aeb7f451855c Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Thu, 22 Oct 2020 01:54:09 +0200 Subject: [PATCH] pkgdep/apt-get: Move ubuntu-dependent checks to os/ubuntu Change-Id: I11b4bb2a0db20e6f86749cd951221a3697a72ed6 Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4815 Tested-by: SPDK CI Jenkins Reviewed-by: Paul Luse Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris --- test/common/config/pkgdep/apt-get | 22 ---------------------- test/common/config/pkgdep/os/debian | 1 + test/common/config/pkgdep/os/ubuntu | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 22 deletions(-) create mode 120000 test/common/config/pkgdep/os/debian create mode 100644 test/common/config/pkgdep/os/ubuntu diff --git a/test/common/config/pkgdep/apt-get b/test/common/config/pkgdep/apt-get index 2b2a8f4e52..ea23d9234a 100644 --- a/test/common/config/pkgdep/apt-get +++ b/test/common/config/pkgdep/apt-get @@ -34,28 +34,6 @@ pre_install() { install libasan2 install libubsan0 fi - if ! install rdma-core; then - echo "Package rdma-core is avaliable at Ubuntu 18 [universe] repositorium" >&2 - fi - if ! install libpmempool1; then - echo "Package libpmempool1 is available at Ubuntu 18 [universe] repositorium" >&2 - fi - if ! install clang-tools; then - echo "Package clang-tools is available at Ubuntu 18 [universe] repositorium" >&2 - fi - if ! install --no-install-suggests --no-install-recommends open-isns-utils; then - echo "Package open-isns-utils is available at Ubuntu 18 [universe] repositorium" >&2 - fi - - # Package name for Ubuntu 18 is targetcli-fb but for Ubuntu 16 it's targetcli - if ! install targetcli-fb; then - install targetcli - fi - - # On Ubuntu 20.04 (focal) btrfs-tools are available under different name - btrfs-progs - if ! install btrfs-tools; then - install btrfs-progs - fi } packages=( diff --git a/test/common/config/pkgdep/os/debian b/test/common/config/pkgdep/os/debian new file mode 120000 index 0000000000..7d13753d73 --- /dev/null +++ b/test/common/config/pkgdep/os/debian @@ -0,0 +1 @@ +ubuntu \ No newline at end of file diff --git a/test/common/config/pkgdep/os/ubuntu b/test/common/config/pkgdep/os/ubuntu new file mode 100644 index 0000000000..eea362860b --- /dev/null +++ b/test/common/config/pkgdep/os/ubuntu @@ -0,0 +1,22 @@ +case "$VERSION_CODENAME" in + xenial) # 16.04 + packages+=(btrfs-tools) + packages+=(targetcli) + ;; + *) + packages+=( + rdma-core + libpmempool1 + clang-tools + targetcli-fb + open-isns-utils + ) + + if [[ $VERSION_CODENAME == bionic ]]; then + packages+=(btrfs-tools) + else + # On Ubuntu 20.04 (focal) btrfs-tools are available under different name - btrfs-progs + packages+=(btrfs-progs) + fi + ;; +esac