From fa3d77623ecb25dde6b5f4be11626ed16966eb29 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 17 Dec 2019 15:22:41 -0500 Subject: [PATCH] ci: Use debian to avoid apt install 404 errors The default ubuntu mirror does not have s390x or armhf packages: Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:6 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [19.2 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [6781 B] Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Get:9 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [761 kB] Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Get:12 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB] Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB] Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Get:17 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [795 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB] Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Err:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages 404 Not Found [IP: 91.189.88.174 80] Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1057 kB] Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Get:23 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [10.5 kB] Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1322 kB] Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [32.7 kB] Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Get:30 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4244 B] Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Get:32 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B] Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Err:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Err:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Err:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Fetched 17.4 MB in 2s (7076 kB/s) Reading package lists... E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/multiverse/binary-armhf/Packages 404 Not Found [IP: 91.189.88.174 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/restricted/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Some index files failed to download. They have been ignored, or old ones used instead. --- .travis.yml | 4 ++-- ci/test/00_setup_env.sh | 2 +- ci/test/00_setup_env_arm.sh | 2 ++ ci/test/00_setup_env_s390x.sh | 2 ++ ci/test/04_install.sh | 20 ++++++++++---------- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 38ad79af29..7bb349f36a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,14 +82,14 @@ jobs: - set -o errexit; source ./ci/lint/06_script.sh - stage: test - name: 'ARM [GOAL: install] [bionic] [unit tests, functional tests]' + name: 'ARM [GOAL: install] [buster] [unit tests, functional tests]' arch: arm64 env: >- FILE_ENV="./ci/test/00_setup_env_arm.sh" QEMU_USER_CMD="" # Can run the tests natively without qemu - stage: test - name: 'S390x [GOAL: install] [bionic] [unit tests, functional tests]' + name: 'S390x [GOAL: install] [buster] [unit tests, functional tests]' arch: s390x env: >- FILE_ENV="./ci/test/00_setup_env_s390x.sh" diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index 1f485fbec4..a008d51523 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -51,7 +51,7 @@ export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends} export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out/$HOST} export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks} export WINEDEBUG=${WINEDEBUG:-fixme-all} -export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git} +export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps} export GOAL=${GOAL:-install} export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets} export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH diff --git a/ci/test/00_setup_env_arm.sh b/ci/test/00_setup_env_arm.sh index b98b39a83a..2a522f5a8f 100644 --- a/ci/test/00_setup_env_arm.sh +++ b/ci/test/00_setup_env_arm.sh @@ -16,6 +16,8 @@ if [ -n "$QEMU_USER_CMD" ]; then # Likely cross-compiling, so install the needed gcc and qemu-user export PACKAGES="$PACKAGES qemu-user" fi +# Use debian to avoid 404 apt errors when cross compiling +export DOCKER_NAME_TAG="debian:buster" export USE_BUSY_BOX=true export RUN_UNIT_TESTS=true export RUN_FUNCTIONAL_TESTS=true diff --git a/ci/test/00_setup_env_s390x.sh b/ci/test/00_setup_env_s390x.sh index c049994944..6452feb5f2 100644 --- a/ci/test/00_setup_env_s390x.sh +++ b/ci/test/00_setup_env_s390x.sh @@ -16,6 +16,8 @@ if [ -n "$QEMU_USER_CMD" ]; then export DPKG_ADD_ARCH="s390x" export PACKAGES="$PACKAGES g++-s390x-linux-gnu qemu-user libc6:s390x libstdc++6:s390x libfontconfig1:s390x libxcb1:s390x" fi +# Use debian to avoid 404 apt errors +export DOCKER_NAME_TAG="debian:buster" export RUN_UNIT_TESTS=true export RUN_FUNCTIONAL_TESTS=true export GOAL="install" diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index cf2b39c68d..68fd98302f 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -72,16 +72,6 @@ else } fi -if [ "$TRAVIS_OS_NAME" == "osx" ]; then - top -l 1 -s 0 | awk ' /PhysMem/ {print}' - echo "Number of CPUs: $(sysctl -n hw.logicalcpu)" -else - DOCKER_EXEC free -m -h - DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\) - DOCKER_EXEC echo "Free disk space:" - DOCKER_EXEC df -h -fi - if [ -n "$DPKG_ADD_ARCH" ]; then DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH" fi @@ -94,6 +84,16 @@ elif [ "$TRAVIS_OS_NAME" != "osx" ]; then ${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES fi +if [ "$TRAVIS_OS_NAME" == "osx" ]; then + top -l 1 -s 0 | awk ' /PhysMem/ {print}' + echo "Number of CPUs: $(sysctl -n hw.logicalcpu)" +else + DOCKER_EXEC free -m -h + DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\) + DOCKER_EXEC echo "Free disk space:" + DOCKER_EXEC df -h +fi + if [ ! -d ${DIR_QA_ASSETS} ]; then DOCKER_EXEC git clone https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS} fi