From c71427e917478c441eda8bb36ac016ad86feac2f Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Fri, 3 Apr 2026 20:16:39 +0200 Subject: [PATCH 01/14] fix {EESSI/...} prefix for complex prompts --- init/modules/EESSI/2023.06.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 3847502e..5ce3706d 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -222,7 +222,13 @@ local quiet_load = false if os.getenv("EESSI_MODULE_UPDATE_PS1") then local prompt = os.getenv("PS1") if prompt then - pushenv("PS1", "{EESSI/" .. eessi_version .. "} " .. prompt) + if mode() == "load" then + -- Prepend prefix to PS1 without evaluating its contents + execute{cmd="PS1='" .. prefix .. "'\"$PS1\"", modeA={"load"}} + elseif mode() == "unload" then + -- Strip the prefix from beginning of PS1 + execute{cmd="PS1=\"${PS1#'" .. prefix .. "'}\"", modeA={"unload"}} + end end end From aa8a19c7b41a31b47d276331437518bd984e67c7 Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Fri, 3 Apr 2026 20:30:03 +0200 Subject: [PATCH 02/14] define prefix --- init/modules/EESSI/2023.06.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 5ce3706d..4a959fb6 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -222,6 +222,7 @@ local quiet_load = false if os.getenv("EESSI_MODULE_UPDATE_PS1") then local prompt = os.getenv("PS1") if prompt then + local prefix = "{EESSI/" .. eessi_version .. "} " if mode() == "load" then -- Prepend prefix to PS1 without evaluating its contents execute{cmd="PS1='" .. prefix .. "'\"$PS1\"", modeA={"load"}} From 648ac50f965c45797a7b8a9bdc8d8f1a4de9e290 Mon Sep 17 00:00:00 2001 From: laraPPr Date: Wed, 8 Apr 2026 14:24:48 +0200 Subject: [PATCH 03/14] Fix copying of the buildlogs broken by the introduction of pre-run-shell-cmd --- EESSI-install-software.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index e4834545..671f6532 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -412,12 +412,14 @@ else # copy EasyBuild log file if EasyBuild exited with an error if [ ${ec} -ne 0 ]; then - eb_last_log=$(unset EB_VERBOSE; eb --last-log) + eb_hooks=$EASYBUILD_HOOKS + eb_last_log=$(unset EB_VERBOSE; unset EASYBUILD_HOOKS; eb --last-log) # copy to current working directory cp -a ${eb_last_log} . echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}" # copy to build logs dir (with context added) copy_build_log "${eb_last_log}" "${build_logs_dir}" + export EASYBUILD_HOOKS=$eb_hooks fi $TOPDIR/check_missing_installations.sh ${easystack_file} ${pr_diff} From ffc9f0ffaa826bea99d6108245d7f4d6320be011 Mon Sep 17 00:00:00 2001 From: laraPPr Date: Wed, 8 Apr 2026 14:34:38 +0200 Subject: [PATCH 04/14] Fix copying of the buildlogs broken by the introduction of pre-run-shell-cmd --- EESSI-install-software.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 671f6532..56030bf7 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -412,14 +412,12 @@ else # copy EasyBuild log file if EasyBuild exited with an error if [ ${ec} -ne 0 ]; then - eb_hooks=$EASYBUILD_HOOKS - eb_last_log=$(unset EB_VERBOSE; unset EASYBUILD_HOOKS; eb --last-log) + eb_last_log=$(eb --last-log | grep | grep -vE "==|>>") # copy to current working directory cp -a ${eb_last_log} . echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}" # copy to build logs dir (with context added) copy_build_log "${eb_last_log}" "${build_logs_dir}" - export EASYBUILD_HOOKS=$eb_hooks fi $TOPDIR/check_missing_installations.sh ${easystack_file} ${pr_diff} From 4fd7205d8230001f9b9381fc79df701cc5fc0734 Mon Sep 17 00:00:00 2001 From: laraPPr Date: Wed, 8 Apr 2026 14:36:01 +0200 Subject: [PATCH 05/14] fix typo --- EESSI-install-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 56030bf7..e8cee893 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -412,7 +412,7 @@ else # copy EasyBuild log file if EasyBuild exited with an error if [ ${ec} -ne 0 ]; then - eb_last_log=$(eb --last-log | grep | grep -vE "==|>>") + eb_last_log=$(eb --last-log | grep -vE "==|>>") # copy to current working directory cp -a ${eb_last_log} . echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}" From c2d96efa612bfde42a07fc8193e7a9d505d6c8c9 Mon Sep 17 00:00:00 2001 From: laraPPr Date: Wed, 8 Apr 2026 14:54:46 +0200 Subject: [PATCH 06/14] use match instead of reverse match --- EESSI-install-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index e8cee893..c1ce4a79 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -412,7 +412,7 @@ else # copy EasyBuild log file if EasyBuild exited with an error if [ ${ec} -ne 0 ]; then - eb_last_log=$(eb --last-log | grep -vE "==|>>") + eb_last_log=$(eb --last-log | grep ^/.*\.log) # copy to current working directory cp -a ${eb_last_log} . echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}" From 3d7d8a6709d98675df603070bf05cf7b18913715 Mon Sep 17 00:00:00 2001 From: laraPPr Date: Wed, 8 Apr 2026 15:02:13 +0200 Subject: [PATCH 07/14] add check if file exhists --- EESSI-install-software.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index c1ce4a79..46865a2e 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -413,11 +413,15 @@ else # copy EasyBuild log file if EasyBuild exited with an error if [ ${ec} -ne 0 ]; then eb_last_log=$(eb --last-log | grep ^/.*\.log) - # copy to current working directory - cp -a ${eb_last_log} . - echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}" - # copy to build logs dir (with context added) - copy_build_log "${eb_last_log}" "${build_logs_dir}" + # copy to current working directory if file exhists + if [ -e ${eb_last_log} ]; then + cp -a ${eb_last_log} . + echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}" + # copy to build logs dir (with context added) + copy_build_log "${eb_last_log}" "${build_logs_dir}" + else + fatal_error "Could not copy EasyBuild log file because ${eb_last_log} does not exhist" + fi fi $TOPDIR/check_missing_installations.sh ${easystack_file} ${pr_diff} From 73997413c7a819b2a1b98155ea93ecf567547d8b Mon Sep 17 00:00:00 2001 From: laraPPr Date: Wed, 8 Apr 2026 15:03:13 +0200 Subject: [PATCH 08/14] fix identation --- EESSI-install-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 46865a2e..ceac23d2 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -414,7 +414,7 @@ else if [ ${ec} -ne 0 ]; then eb_last_log=$(eb --last-log | grep ^/.*\.log) # copy to current working directory if file exhists - if [ -e ${eb_last_log} ]; then + if [ -e ${eb_last_log} ]; then cp -a ${eb_last_log} . echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}" # copy to build logs dir (with context added) From 3112284eaa8de5131e47bcd95cbe82048507d3bd Mon Sep 17 00:00:00 2001 From: Lara Ramona Peeters <49882639+laraPPr@users.noreply.github.com> Date: Wed, 8 Apr 2026 15:07:49 +0200 Subject: [PATCH 09/14] Update EESSI-install-software.sh Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com> --- EESSI-install-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index ceac23d2..3b310728 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -414,7 +414,7 @@ else if [ ${ec} -ne 0 ]; then eb_last_log=$(eb --last-log | grep ^/.*\.log) # copy to current working directory if file exhists - if [ -e ${eb_last_log} ]; then + if [ -f ${eb_last_log} ]; then cp -a ${eb_last_log} . echo "Last EasyBuild log file copied from ${eb_last_log} to ${PWD}" # copy to build logs dir (with context added) From c2515fff1c7a0af580edc7d8cec4a4c290c5e49b Mon Sep 17 00:00:00 2001 From: ocaisa Date: Wed, 8 Apr 2026 15:08:17 +0200 Subject: [PATCH 10/14] Apply suggestion from @ocaisa --- EESSI-install-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 3b310728..2c674ae8 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -420,7 +420,7 @@ else # copy to build logs dir (with context added) copy_build_log "${eb_last_log}" "${build_logs_dir}" else - fatal_error "Could not copy EasyBuild log file because ${eb_last_log} does not exhist" + fatal_error "Could not copy EasyBuild log file because ${eb_last_log} does not exist" fi fi From 022cac9c165fe3b6879e47af766165dd7bf73813 Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 10 Apr 2026 15:53:15 +0200 Subject: [PATCH 11/14] Also set REQUESTS_CA_BUNDLE,SSL_CERT_FILE on RHEL-like systems --- init/modules/EESSI/2023.06.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 4a959fb6..232caefd 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -240,11 +240,13 @@ if os.getenv("EESSI_MODULE_STICKY") then load_message = load_message .. " (requires '--force' option to unload or purge)" end --- set CURL_CA_BUNDLE on RHEL-based systems +-- set CURL_CA_BUNDLE and friends on RHEL-based systems ca_bundle_file_rhel = "/etc/pki/tls/certs/ca-bundle.crt" if isFile(ca_bundle_file_rhel) then pushenv("CURL_CA_BUNDLE", ca_bundle_file_rhel) - eessiDebug("Setting CURL_CA_BUNDLE to " .. ca_bundle_file_rhel) + pushenv("REQUESTS_CA_BUNDLE", ca_bundle_file_rhel) + pushenv("SSL_CERT_FILE", ca_bundle_file_rhel) + eessiDebug("Setting CURL_CA_BUNDLE,REQUESTS_CA_BUNDLE,SSL_CERT_FILE to " .. ca_bundle_file_rhel) end if mode() == "load" then From 3240ad7531699d9922b7796934e27cf3685ae177 Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Mon, 13 Apr 2026 19:56:05 +0200 Subject: [PATCH 12/14] add tests --- .github/workflows/scripts/test_init_scripts.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/scripts/test_init_scripts.sh b/.github/workflows/scripts/test_init_scripts.sh index 843e8d26..415248de 100755 --- a/.github/workflows/scripts/test_init_scripts.sh +++ b/.github/workflows/scripts/test_init_scripts.sh @@ -165,6 +165,13 @@ for shell in ${SHELLS[@]}; do TEST_EESSI_EXPLICIT_NO_PS1_UPDATE_CALLED_TWICE=$($shell -c "unset PS1 ; PS1='$ ' ; export EESSI_MODULE_UPDATE_PS1=0 ; . init/lmod/$shell 2>/dev/null ; . init/lmod/$shell 2>/dev/null ; echo \"\$PS1\"") assert_raises 'echo "$TEST_EESSI_EXPLICIT_NO_PS1_UPDATE" | grep "$pattern"' 1 assert_raises 'echo "$TEST_EESSI_EXPLICIT_NO_PS1_UPDATE_CALLED_TWICE" | grep "$pattern"' 1 + # Also check complex prompts, and unloading/purging the EESSI module + prompt="\$(echo '\['✘) $ " + updated_prompt="{EESSI/${EESSI_VERSION}} \[✘ $ " + TEST_EESSI_PS1_UPDATE=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; . init/lmod/$shell >/dev/null 2>&1 ; echo \"\$PS1\"") + TEST_EESSI_NO_PS1_UPDATE=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; . init/lmod/$shell >/dev/null 2>&1 ; module purge; echo \"\$PS1\"") + assert "$TEST_EESSI_PS1_UPDATE" "$updated_prompt" + assert "$TEST_EESSI_NO_PS1_UPDATE" "$prompt" fi # End Test Suite From 344b4a3cdcc2deb76b5209aa7da45c5dad95cfb9 Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Mon, 13 Apr 2026 20:37:20 +0200 Subject: [PATCH 13/14] fix --- .github/workflows/scripts/test_init_scripts.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scripts/test_init_scripts.sh b/.github/workflows/scripts/test_init_scripts.sh index 415248de..c3120683 100755 --- a/.github/workflows/scripts/test_init_scripts.sh +++ b/.github/workflows/scripts/test_init_scripts.sh @@ -167,11 +167,12 @@ for shell in ${SHELLS[@]}; do assert_raises 'echo "$TEST_EESSI_EXPLICIT_NO_PS1_UPDATE_CALLED_TWICE" | grep "$pattern"' 1 # Also check complex prompts, and unloading/purging the EESSI module prompt="\$(echo '\['✘) $ " - updated_prompt="{EESSI/${EESSI_VERSION}} \[✘ $ " + promptstr="\[✘ $ " + updated_promptstr="{EESSI/${EESSI_VERSION}} \[✘ $ " TEST_EESSI_PS1_UPDATE=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; . init/lmod/$shell >/dev/null 2>&1 ; echo \"\$PS1\"") - TEST_EESSI_NO_PS1_UPDATE=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; . init/lmod/$shell >/dev/null 2>&1 ; module purge; echo \"\$PS1\"") - assert "$TEST_EESSI_PS1_UPDATE" "$updated_prompt" - assert "$TEST_EESSI_NO_PS1_UPDATE" "$prompt" + TEST_EESSI_PS1_REVERT=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; . init/lmod/$shell >/dev/null 2>&1 ; module purge; echo \"\$PS1\"") + assert "$TEST_EESSI_PS1_UPDATE" "$updated_promptstr" + assert "$TEST_EESSI_PS1_REVERT" "$promptstr" fi # End Test Suite From 13da61694bfbafb8fc66d3ee2c605badb58d7628 Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Mon, 13 Apr 2026 20:53:46 +0200 Subject: [PATCH 14/14] fix --- .github/workflows/scripts/test_init_scripts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/test_init_scripts.sh b/.github/workflows/scripts/test_init_scripts.sh index c3120683..8fa958be 100755 --- a/.github/workflows/scripts/test_init_scripts.sh +++ b/.github/workflows/scripts/test_init_scripts.sh @@ -171,8 +171,8 @@ for shell in ${SHELLS[@]}; do updated_promptstr="{EESSI/${EESSI_VERSION}} \[✘ $ " TEST_EESSI_PS1_UPDATE=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; . init/lmod/$shell >/dev/null 2>&1 ; echo \"\$PS1\"") TEST_EESSI_PS1_REVERT=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; . init/lmod/$shell >/dev/null 2>&1 ; module purge; echo \"\$PS1\"") - assert "$TEST_EESSI_PS1_UPDATE" "$updated_promptstr" - assert "$TEST_EESSI_PS1_REVERT" "$promptstr" + assert 'echo "$TEST_EESSI_PS1_UPDATE"' "$updated_promptstr" + assert 'echo "$TEST_EESSI_PS1_REVERT"' "$promptstr" fi # End Test Suite