From e408745beb588e354441da49dc52da5d137e5909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 7 Feb 2019 00:32:38 +0100 Subject: [PATCH] [CI] Correct the name of the Archlinux container on Dockerhub - Arch migrated their container from the base account to the archlinux account - The container got severely stripped down: there is no awk, diff, which, grep => we need to preinstall these, otherwise the distro detection function fails (cherry picked from commit 73739735eb636fc9db9dab2606588c7a930e2e8b) --- .gitlab-ci.yml | 2 +- ci/install_dependencies.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e801322d..0fdd45c8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,7 @@ Debian: <<: *distro_build Archlinux: - image: base/archlinux + image: archlinux/base <<: *default_config <<: *distro_build diff --git a/ci/install_dependencies.sh b/ci/install_dependencies.sh index 66acbdd9..d414a419 100755 --- a/ci/install_dependencies.sh +++ b/ci/install_dependencies.sh @@ -1,6 +1,4 @@ -#!/bin/sh - -set -e +#!/bin/sh -e # Debian & derivatives don't provide binary packages of googletest # => have to build them ourselves @@ -16,6 +14,12 @@ debian_build_gtest() { cd .. } +# workaround for really bare-bones Archlinux containers: +if [ -x "$(command -v pacman)" ]; then + pacman --noconfirm -Sy + pacman --noconfirm -S grep gawk sed +fi + distro_id=$(grep '^ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g') case "$distro_id" in @@ -31,7 +35,7 @@ case "$distro_id" in 'arch') pacman --noconfirm -Sy - pacman --noconfirm -S gcc clang cmake make ccache expat zlib libssh curl gtest python dos2unix + pacman --noconfirm -S gcc clang cmake make ccache expat zlib libssh curl gtest python dos2unix which diffutils ;; 'ubuntu')