From c0a3ff09a3a38737af5a922fdf581aa7b2dd6c88 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 13 Jan 2026 13:13:28 +0100 Subject: [PATCH 1/8] Changes needed to make builds use everything from the cloned software-layer-scripts, instead of from the deployed stuff in software.eessi.io --- EESSI-install-software.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index e4834545..a4c3af36 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -327,7 +327,7 @@ echo "Going to install full CUDA SDK and cu* libraries under host_injections if temp_install_storage=${TMPDIR}/temp_install_storage mkdir -p ${temp_install_storage} if [ -z "${skip_cuda_install}" ] || [ ! "${skip_cuda_install}" ]; then - ${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh \ + ${TOPDIR}/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh \ -t ${temp_install_storage} \ --accept-cuda-eula \ --accept-cudnn-eula @@ -338,7 +338,7 @@ fi # Install NVIDIA drivers in host_injections (if they exist) if nvidia_gpu_available; then echo "Installing NVIDIA drivers for use in prefix shell..." - ${EESSI_PREFIX}/scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh + ${TOPDIR}/scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh fi @@ -396,6 +396,10 @@ else # load EasyBuild module (will be installed if it's not available yet) source ${TOPDIR}/load_easybuild_module.sh ${eb_version} + # Set EASYBUILD_HOOKS to use the hooks from the software-layer-scripts, to make it easier to use updated hooks + export EASYBUILD_HOOKS=$TOPDIR/eb_hooks.py + echo "Overwrite EASYBUILD_HOOKS to use the eb_hooks from software-layer-scripts: EASYBUILD_HOOKS=${EASYBUILD_HOOKS}" + ${EB} --show-config echo_green "All set, let's start installing some software with EasyBuild v${eb_version} in ${EASYBUILD_INSTALLPATH}..." From 029523209f859d77de7811be49a7b8815cf988e6 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 10 Aug 2026 15:42:25 +0200 Subject: [PATCH 2/8] Make EESSI-extend respect EESSI_EASYBUILD_HOOKS_OVERRIDE --- EESSI-extend-easybuild.eb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/EESSI-extend-easybuild.eb b/EESSI-extend-easybuild.eb index c8be0660..464a995e 100644 --- a/EESSI-extend-easybuild.eb +++ b/EESSI-extend-easybuild.eb @@ -205,7 +205,12 @@ setenv ("EASYBUILD_SYSROOT", sysroot) setenv ("EASYBUILD_PREFIX", pathJoin(working_dir, "easybuild")) setenv ("EASYBUILD_INSTALLPATH", easybuild_installpath) eessi_init_prefix = os.getenv("EESSI_INIT_PREFIX") or pathJoin(os.getenv("EESSI_PREFIX"), "init") -setenv ("EASYBUILD_HOOKS", pathJoin(eessi_init_prefix, "easybuild", "eb_hooks.py")) +eessi_easybuild_hooks_override = os.getenv("EESSI_EASYBUILD_HOOKS_OVERRIDE") +if eessi_easybuild_hooks_override ~= nil) then + setenv ("EASYBUILD_HOOKS", eessi_easybuild_hooks_override) +else + setenv ("EASYBUILD_HOOKS", pathJoin(eessi_init_prefix, "easybuild", "eb_hooks.py")) +end -- Make sure to use the general umask that allows a global read setenv ("EASYBUILD_UMASK", "022") From b60f0ce5d39dc40b786dc34fb34342c4b447ad95 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 10 Aug 2026 15:59:35 +0200 Subject: [PATCH 3/8] Make sure to leverage EESSI_EASYBUILD_HOOKS_OVERRIDE to override the hooks being used during builds to the eb_hooks.py from the software-layer-scripts clone --- EESSI-install-software.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index ce2266a6..a786a535 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -314,6 +314,9 @@ elif [[ -n "$EESSI_ACCELERATOR_TARGET_OVERRIDE" ]]; then export EESSI_ACCELERATOR_INSTALL=1 fi +# Make sure we use the hooks from the local software-layer-scripts clone: +export EESSI_EASYBUILD_HOOKS_OVERRIDE=$TOPDIR/eb_hooks.py + echo "DEBUG: before loading EESSI-extend // EASYBUILD_INSTALLPATH='${EASYBUILD_INSTALLPATH}'" source $TOPDIR/load_eessi_extend_module.sh ${EESSI_VERSION} echo "DEBUG: after loading EESSI-extend // EASYBUILD_INSTALLPATH='${EASYBUILD_INSTALLPATH}'" From 5b6d1e2a1bf97e3168df892b99cc34f3af80a9b5 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 10 Aug 2026 16:01:55 +0200 Subject: [PATCH 4/8] Remove original override of EB hooks, since that wasn't being applied to e.g. install_cuda_and_libraries.sh. Doing it via EESSI-extend is more robust --- EESSI-install-software.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index a786a535..0729cfa4 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -316,6 +316,7 @@ fi # Make sure we use the hooks from the local software-layer-scripts clone: export EESSI_EASYBUILD_HOOKS_OVERRIDE=$TOPDIR/eb_hooks.py +echo "Set EESSI_EASYBUILD_HOOKS_OVERRIDE to ${EESSI_EASYBUILD_HOOKS_OVERRIDE}" echo "DEBUG: before loading EESSI-extend // EASYBUILD_INSTALLPATH='${EASYBUILD_INSTALLPATH}'" source $TOPDIR/load_eessi_extend_module.sh ${EESSI_VERSION} @@ -428,10 +429,6 @@ else # load EasyBuild module (will be installed if it's not available yet) source ${TOPDIR}/load_easybuild_module.sh ${eb_version} - # Set EASYBUILD_HOOKS to use the hooks from the software-layer-scripts, to make it easier to use updated hooks - export EASYBUILD_HOOKS=$TOPDIR/eb_hooks.py - echo "Overwrite EASYBUILD_HOOKS to use the eb_hooks from software-layer-scripts: EASYBUILD_HOOKS=${EASYBUILD_HOOKS}" - ${EB} --show-config echo_green "All set, let's start installing some software with EasyBuild v${eb_version} in ${EASYBUILD_INSTALLPATH}..." From 169e720fb633a926052d3b07e5d80697d7086d67 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 10 Aug 2026 16:09:02 +0200 Subject: [PATCH 5/8] Fix syntax issue --- EESSI-extend-easybuild.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-extend-easybuild.eb b/EESSI-extend-easybuild.eb index 464a995e..7c4b2c1a 100644 --- a/EESSI-extend-easybuild.eb +++ b/EESSI-extend-easybuild.eb @@ -206,7 +206,7 @@ setenv ("EASYBUILD_PREFIX", pathJoin(working_dir, "easybuild")) setenv ("EASYBUILD_INSTALLPATH", easybuild_installpath) eessi_init_prefix = os.getenv("EESSI_INIT_PREFIX") or pathJoin(os.getenv("EESSI_PREFIX"), "init") eessi_easybuild_hooks_override = os.getenv("EESSI_EASYBUILD_HOOKS_OVERRIDE") -if eessi_easybuild_hooks_override ~= nil) then +if (eessi_easybuild_hooks_override ~= nil) then setenv ("EASYBUILD_HOOKS", eessi_easybuild_hooks_override) else setenv ("EASYBUILD_HOOKS", pathJoin(eessi_init_prefix, "easybuild", "eb_hooks.py")) From 373e9b2bcd233dc2a1450d997a3b1ade98cfb487 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 10 Aug 2026 16:19:15 +0200 Subject: [PATCH 6/8] Add a test easystack file --- .../2025.06/eessi-2025.06-eb-5.3.1-001-system.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.3.1-001-system.yml diff --git a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.3.1-001-system.yml b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.3.1-001-system.yml new file mode 100644 index 00000000..44fe4d92 --- /dev/null +++ b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.3.1-001-system.yml @@ -0,0 +1,2 @@ +easyconfigs: + - cowsay-3.04.eb From 84ab6ea9d96b059b7ad0ff8c55ee6ae1c392bd05 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 10 Aug 2026 17:07:22 +0200 Subject: [PATCH 7/8] Change order of tests, so we can first run tests on any changes made in the GH repo, before we actually deploy these to CVMFS --- .../workflows/tests_eessi_extend_module.yml | 73 ++++++++++++------- 1 file changed, 47 insertions(+), 26 deletions(-) diff --git a/.github/workflows/tests_eessi_extend_module.yml b/.github/workflows/tests_eessi_extend_module.yml index de51b650..153336c8 100644 --- a/.github/workflows/tests_eessi_extend_module.yml +++ b/.github/workflows/tests_eessi_extend_module.yml @@ -28,7 +28,7 @@ jobs: eessi_stack_version: ${{matrix.eessi_version}} use_eessi_module: true - - name: Install the EESSI-extend shipped with the repository and verify it is consistent with the CVMFS repo + - name: Install the EESSI-extend shipped with the repository run: | # Define a function to check the values of environment variables # and another that checks an environment does not contain environment @@ -52,30 +52,6 @@ jobs: eb EESSI-extend-easybuild.eb --rebuild module unload EasyBuild - # Verify that we can pick the installed version up - module use $MY_INSTALLATION_PATH/modules/all - # Verify we can run "module show" on the module - module show EESSI-extend/${{matrix.eessi_version}}-easybuild - # Now load it and run additional checks - module load EESSI-extend/${{matrix.eessi_version}}-easybuild - echo $EBROOTEESSIMINEXTEND | grep $MY_INSTALLATION_PATH || { echo "ERROR: Installed version of EESSI-extend not picked up (loaded $EBROOTEESSIMINEXTEND)" >&2; exit 1; } - # Do a test rebuild (with default and local hooks) - echo "Testing a rebuild using the hooks shipped with EESSI" - eb --rebuild ${{matrix.rebuild_software}} - echo "Testing a rebuild using the hooks in the current branch" - eb --rebuild --hooks=./eb_hooks.py ${{matrix.rebuild_software}} - - # First, check if it differs against what is currently shipped by CVMFS - diff <(grep -v '^local root = ' /cvmfs/software.eessi.io/versions/${{matrix.eessi_version}}/software/linux/$(uname -m)/generic/modules/all/EESSI-extend/${{matrix.eessi_version}}-easybuild.lua) <(grep -v '^local root = ' $MY_INSTALLATION_PATH/modules/all/EESSI-extend/${{matrix.eessi_version}}-easybuild.lua) - # Then do a consistency check in CVMFS for all architectures - .github/workflows/scripts/diff_eessi_extend.sh - - # Proceed with unload and checking the environment variables - module unload EESSI-extend - # That should have unset all EasyBuild envvars (including EASYBUILD_PREFIX) - check_disallowed_env_prefix EASYBUILD_ - module unuse $MY_INSTALLATION_PATH/modules/all - - name: Run tests for EESSI-extend in the various CPU-only scenarios run: | export MY_INSTALLATION_PATH=/tmp/easybuild @@ -170,6 +146,15 @@ jobs: check_disallowed_env_prefix EASYBUILD_ unset EESSI_USER_INSTALL + # Now test overriding the EasyBuild hooks + echo "Checking EESSI-extend EasyBuild hooks override" + export EESSI_EASYBUILD_HOOKS_OVERRIDE="$GITHUB_WORKSPACE/eb_hooks.py" + module load EESSI-extend/${{matrix.eessi_version}}-easybuild + check_env_var "EASYBUILD_HOOKS" "$EESSI_EASYBUILD_HOOKS_OVERRIDE" + module unload EESSI-extend + check_disallowed_env_prefix EASYBUILD_ + unset EESSI_EASYBUILD_HOOKS_OVERRIDE + - name: Run tests for EESSI-extend in the various GPU scenarios run: | export MY_INSTALLATION_PATH=/tmp/easybuild @@ -270,4 +255,40 @@ jobs: module unload EESSI-extend check_disallowed_env_prefix EASYBUILD_ unset EESSI_ACCELERATOR_INSTALL - unset EESSI_USER_INSTALL + unset EESSI_USER_INSTALL + + - name: Verify the EESSI-extend module is consistent with the CVMFS repo + run: | + # Define a function to check the values of environment variables + # and another that checks an environment does not contain environment + # variables matching a certain pattern + source .github/workflows/scripts/test_utils.sh + export MY_INSTALLATION_PATH=/tmp/easybuild + + # Let's start from a clean slate + module --force purge + module load EESSI/${{matrix.eessi_version}} + + # Verify that we can pick the installed version up + module use $MY_INSTALLATION_PATH/modules/all + # Verify we can run "module show" on the module + module show EESSI-extend/${{matrix.eessi_version}}-easybuild + # Now load it and run additional checks + module load EESSI-extend/${{matrix.eessi_version}}-easybuild + echo $EBROOTEESSIMINEXTEND | grep $MY_INSTALLATION_PATH || { echo "ERROR: Installed version of EESSI-extend not picked up (loaded $EBROOTEESSIMINEXTEND)" >&2; exit 1; } + # Do a test rebuild (with default and local hooks) + echo "Testing a rebuild using the hooks shipped with EESSI" + eb --rebuild ${{matrix.rebuild_software}} + echo "Testing a rebuild using the hooks in the current branch" + eb --rebuild --hooks=./eb_hooks.py ${{matrix.rebuild_software}} + + # First, check if it differs against what is currently shipped by CVMFS + diff <(grep -v '^local root = ' /cvmfs/software.eessi.io/versions/${{matrix.eessi_version}}/software/linux/$(uname -m)/generic/modules/all/EESSI-extend/${{matrix.eessi_version}}-easybuild.lua) <(grep -v '^local root = ' $MY_INSTALLATION_PATH/modules/all/EESSI-extend/${{matrix.eessi_version}}-easybuild.lua) + # Then do a consistency check in CVMFS for all architectures + .github/workflows/scripts/diff_eessi_extend.sh + + # Proceed with unload and checking the environment variables + module unload EESSI-extend + # That should have unset all EasyBuild envvars (including EASYBUILD_PREFIX) + check_disallowed_env_prefix EASYBUILD_ + module unuse $MY_INSTALLATION_PATH/modules/all From ed961e82e3f3c504594c5a8dcbe415aea77b4a0e Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 10 Aug 2026 17:35:06 +0200 Subject: [PATCH 8/8] Remove test easystack file --- .../2025.06/eessi-2025.06-eb-5.3.1-001-system.yml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.3.1-001-system.yml diff --git a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.3.1-001-system.yml b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.3.1-001-system.yml deleted file mode 100644 index 44fe4d92..00000000 --- a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.3.1-001-system.yml +++ /dev/null @@ -1,2 +0,0 @@ -easyconfigs: - - cowsay-3.04.eb