From cb6905601739d6f3437a29777a861eefc90ac96c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 1 Mar 2024 17:43:32 +0100 Subject: [PATCH 1/3] add workaround for 404 error when installing packages in CI workflow for testing Apptainer integration --- .github/workflows/container_tests_apptainer.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/container_tests_apptainer.yml b/.github/workflows/container_tests_apptainer.yml index 35c26c26c9..137b297379 100644 --- a/.github/workflows/container_tests_apptainer.yml +++ b/.github/workflows/container_tests_apptainer.yml @@ -29,10 +29,18 @@ jobs: - name: install OS & Python packages run: | # for building CentOS 7 container images - sudo apt-get install rpm - sudo apt-get install dnf + APT_PKGS="rpm dnf" # for modules tool - sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev + APT_PKGS="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" + + # Avoid apt-get update, as we don't really need it, + # and it does more harm than good (it's fairly expensive, and it results in flaky test runs) + if ! sudo apt-get install $APT_PKGS; then + # Try to update cache, then try again to resolve 404s of old packages + sudo apt-get update -yqq || true + sudo apt-get install $APT_PKGS + fi + # fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082 # needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then From 2266b7166ccffd5826396955ca2b485657cca663 Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:04:16 +0000 Subject: [PATCH 2/3] append to `APT_PKGS` instead of overwriting it --- .github/workflows/container_tests_apptainer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container_tests_apptainer.yml b/.github/workflows/container_tests_apptainer.yml index 137b297379..b7fc2a8418 100644 --- a/.github/workflows/container_tests_apptainer.yml +++ b/.github/workflows/container_tests_apptainer.yml @@ -31,7 +31,7 @@ jobs: # for building CentOS 7 container images APT_PKGS="rpm dnf" # for modules tool - APT_PKGS="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" + APT_PKGS+="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" # Avoid apt-get update, as we don't really need it, # and it does more harm than good (it's fairly expensive, and it results in flaky test runs) From 05ab883213870c7cf86d97d2be2fa05792063aba Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:06:45 +0000 Subject: [PATCH 3/3] missing space --- .github/workflows/container_tests_apptainer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container_tests_apptainer.yml b/.github/workflows/container_tests_apptainer.yml index b7fc2a8418..77d2a4a395 100644 --- a/.github/workflows/container_tests_apptainer.yml +++ b/.github/workflows/container_tests_apptainer.yml @@ -31,7 +31,7 @@ jobs: # for building CentOS 7 container images APT_PKGS="rpm dnf" # for modules tool - APT_PKGS+="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" + APT_PKGS+=" lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" # Avoid apt-get update, as we don't really need it, # and it does more harm than good (it's fairly expensive, and it results in flaky test runs)