diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index d2e3cd1338..cbcffe6385 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -72,7 +72,7 @@ jobs: module load EESSI/${{matrix.EESSI_VERSION}} env | grep -E '^(EESSI_S|EESSI_C)' | sort > "${moduleoutfile}" module unload EESSI/${{matrix.EESSI_VERSION}} - source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash + source ./init/bash env | grep -E '^(EESSI_S|EESSI_C)' | sort > "${sourceoutfile}" cat "${moduleoutfile}" cat "${sourceoutfile}" @@ -80,6 +80,7 @@ jobs: echo "Test for checking env variables PASSED" else echo "Test for checking env variables FAILED" >&2 + diff "${moduleoutfile}" "${sourceoutfile}" exit 1 fi diff --git a/EESSI-extend-2023.06-easybuild.eb b/EESSI-extend-2023.06-easybuild.eb index ba8629c02e..8e328c3ece 100644 --- a/EESSI-extend-2023.06-easybuild.eb +++ b/EESSI-extend-2023.06-easybuild.eb @@ -92,7 +92,7 @@ elseif (os.getenv("EESSI_SITE_INSTALL") ~= nil) then if ((os.getenv("EESSI_PROJECT_INSTALL") ~= nil) or (os.getenv("EESSI_USER_INSTALL") ~= nil)) then LmodError("You cannot use EESSI_SITE_INSTALL in combination with any other EESSI_*_INSTALL environment variables") end - easybuild_installpath = string.gsub(os.getenv("EESSI_SOFTWARE_PATH"), 'versions', 'host_injections') + easybuild_installpath = os.getenv("EESSI_SITE_SOFTWARE_PATH") else -- Deal with user and project installs project_install = os.getenv("EESSI_PROJECT_INSTALL") diff --git a/easystacks/software.eessi.io/2023.06/rebuilds/20241008-eb-4.9.4-EESSI-extend.yml b/easystacks/software.eessi.io/2023.06/rebuilds/20241008-eb-4.9.4-EESSI-extend.yml new file mode 100644 index 0000000000..5491ef8427 --- /dev/null +++ b/easystacks/software.eessi.io/2023.06/rebuilds/20241008-eb-4.9.4-EESSI-extend.yml @@ -0,0 +1,5 @@ +# 2024.10.08 +# EESSI-extend should use EESSI_SITE_INSTALLPATH, instead of recalculating this +easyconfigs: + - EESSI-extend-2023.06-easybuild.eb + diff --git a/init/eessi_environment_variables b/init/eessi_environment_variables index ab4894fb16..d2daf40ace 100644 --- a/init/eessi_environment_variables +++ b/init/eessi_environment_variables @@ -120,15 +120,17 @@ if [ -d $EESSI_PREFIX ]; then if [ ! -z $EESSI_BASIC_ENV ]; then show_msg "Only setting up basic environment, so we're done" elif [ -d $EESSI_SOFTWARE_PATH ]; then + export EESSI_SITE_SOFTWARE_PATH=${EESSI_SOFTWARE_PATH/versions/host_injections} + show_msg "Using ${EESSI_SITE_SOFTWARE_PATH} as the site extension directory for installations." + # Allow for use of alternative module tree shipped with EESSI + if [ -z ${EESSI_MODULE_SUBDIR+x} ]; then + # EESSI_MODULE_SUBDIR not set + EESSI_MODULE_SUBDIR="modules/all" + fi # Allow for the use of a custom MNS if [ -z ${EESSI_CUSTOM_MODULEPATH+x} ]; then # EESSI_CUSTOM_MODULEPATH not set so we use our defaults - # Allow for use of alternative module tree shipped with EESSI - if [ -z ${EESSI_MODULE_SUBDIR+x} ]; then - # EESSI_MODULE_SUBDIR not set - EESSI_MODULE_SUBDIR="modules/all" - fi EESSI_MODULEPATH=$EESSI_SOFTWARE_PATH/$EESSI_MODULE_SUBDIR else show_msg "Using defined environment variable \$EESSI_CUSTOM_MODULEPATH to set EESSI_MODULEPATH." @@ -138,7 +140,7 @@ if [ -d $EESSI_PREFIX ]; then if [ -d $EESSI_MODULEPATH ]; then export EESSI_MODULEPATH=$EESSI_MODULEPATH show_msg "Using ${EESSI_MODULEPATH} as the directory to be added to MODULEPATH." - export EESSI_SITE_MODULEPATH=${EESSI_MODULEPATH/versions/host_injections} + export EESSI_SITE_MODULEPATH=$EESSI_SITE_SOFTWARE_PATH/$EESSI_MODULE_SUBDIR show_msg "Using ${EESSI_SITE_MODULEPATH} as the site extension directory to be added to MODULEPATH." else error "EESSI module path at $EESSI_MODULEPATH not found!" diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 32aaf6c07f..463706ce6c 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -48,9 +48,11 @@ local eessi_software_subdir = archdetect local eessi_eprefix = pathJoin(eessi_prefix, "compat", eessi_os_type, eessi_cpu_family) local eessi_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_software_subdir) local eessi_module_path = pathJoin(eessi_software_path, "modules", "all") -local eessi_site_module_path = string.gsub(eessi_module_path, "versions", "host_injections") +local eessi_site_software_path = string.gsub(eessi_software_path, "versions", "host_injections") +local eessi_site_module_path = pathJoin(eessi_site_software_path, "modules", "all") setenv("EPREFIX", eessi_eprefix) setenv("EESSI_CPU_FAMILY", eessi_cpu_family) +setenv("EESSI_SITE_SOFTWARE_PATH", eessi_site_software_path) setenv("EESSI_SITE_MODULEPATH", eessi_site_module_path) setenv("EESSI_SOFTWARE_SUBDIR", eessi_software_subdir) setenv("EESSI_PREFIX", eessi_prefix)