From 24bd69af2bc5755189a02d62c335bdc30cc2dc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 21 Jan 2025 09:12:29 +0100 Subject: [PATCH 1/9] rebuild SciPy-bundle with additional patches --- ...121-eb-4.9.4-SciPy-bundle-2023.07-bug-fixes.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 easystacks/software.eessi.io/2023.06/rebuilds/20250121-eb-4.9.4-SciPy-bundle-2023.07-bug-fixes.yml diff --git a/easystacks/software.eessi.io/2023.06/rebuilds/20250121-eb-4.9.4-SciPy-bundle-2023.07-bug-fixes.yml b/easystacks/software.eessi.io/2023.06/rebuilds/20250121-eb-4.9.4-SciPy-bundle-2023.07-bug-fixes.yml new file mode 100644 index 0000000000..96a334cc3c --- /dev/null +++ b/easystacks/software.eessi.io/2023.06/rebuilds/20250121-eb-4.9.4-SciPy-bundle-2023.07-bug-fixes.yml @@ -0,0 +1,14 @@ +# 2025.01.21 +# While adding support for Intel Sapphire Rapids, additional patches applied to the +# original easyconfig were required to successfully build SciPy-bundle 2023.07. +# In order to keep the stack consistent across the different CPUs, +# a rebuild is done for all CPU targets with this updated easyconfig. +# See: +# - https://github.com/easybuilders/easybuild-easyconfigs/pull/19419 +# - https://github.com/easybuilders/easybuild-easyconfigs/pull/20817 +# - https://github.com/easybuilders/easybuild-easyconfigs/pull/21693 +easyconfigs: + - SciPy-bundle-2023.07-gfbf-2023a.eb + options: + # see https://github.com/easybuilders/easybuild-easyconfigs/pull/21693 + from-commit: 7c5144d2c1a061cd9f08b5901970b7f6ec5eb5c0 From 27978a9e9364a6d8ee9e876dd7e6d33be44d1f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 21 Jan 2025 09:39:23 +0100 Subject: [PATCH 2/9] add missing colon --- .../20250121-eb-4.9.4-SciPy-bundle-2023.07-bug-fixes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easystacks/software.eessi.io/2023.06/rebuilds/20250121-eb-4.9.4-SciPy-bundle-2023.07-bug-fixes.yml b/easystacks/software.eessi.io/2023.06/rebuilds/20250121-eb-4.9.4-SciPy-bundle-2023.07-bug-fixes.yml index 96a334cc3c..f7db7a994c 100644 --- a/easystacks/software.eessi.io/2023.06/rebuilds/20250121-eb-4.9.4-SciPy-bundle-2023.07-bug-fixes.yml +++ b/easystacks/software.eessi.io/2023.06/rebuilds/20250121-eb-4.9.4-SciPy-bundle-2023.07-bug-fixes.yml @@ -8,7 +8,7 @@ # - https://github.com/easybuilders/easybuild-easyconfigs/pull/20817 # - https://github.com/easybuilders/easybuild-easyconfigs/pull/21693 easyconfigs: - - SciPy-bundle-2023.07-gfbf-2023a.eb + - SciPy-bundle-2023.07-gfbf-2023a.eb: options: # see https://github.com/easybuilders/easybuild-easyconfigs/pull/21693 from-commit: 7c5144d2c1a061cd9f08b5901970b7f6ec5eb5c0 From 5abe39ebbb24d064a8544debfc513e4e22088b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 21 Jan 2025 12:26:39 +0100 Subject: [PATCH 3/9] try workaround for permission issues with rebuilds --- EESSI-install-software.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 2f05953158..bd289e7f91 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -336,7 +336,11 @@ else if [ -f ${easystack_file} ]; then echo_green "Feeding easystack file ${easystack_file} to EasyBuild..." - ${EB} --easystack ${easystack_file} --robot + if [[ $stack == *"/rebuilds/"* ]]; then + ${EB} --easystack ${easystack_file} --robot --try-amend=keeppreviousinstall=True + else + ${EB} --easystack ${easystack_file} --robot + fi ec=$? # copy EasyBuild log file if EasyBuild exited with an error From 2c31511e0cbbbcc96fcd8d69635890a66514c845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 21 Jan 2025 13:37:12 +0100 Subject: [PATCH 4/9] ls on the new dir --- EESSI-remove-software.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index 1a03a7af98..f512fb61d6 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -131,7 +131,10 @@ if [ $EUID -eq 0 ]; then rm -rf ${app_module} # recreate some directory to work around permission denied # issues when rebuilding the package + mkdir -p ${app_dir} + ls ${app_dir} mkdir -p ${app_dir}/easybuild + ls ${app_dir}/easybuild done else fatal_error "Easystack file ${easystack_file} not found!" From b8313337c9cc708ae14cf34a650c21b9abe857ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 21 Jan 2025 13:51:48 +0100 Subject: [PATCH 5/9] add echo command for debugging --- EESSI-remove-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index f512fb61d6..98b25c394d 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -132,8 +132,8 @@ if [ $EUID -eq 0 ]; then # recreate some directory to work around permission denied # issues when rebuilding the package mkdir -p ${app_dir} - ls ${app_dir} mkdir -p ${app_dir}/easybuild + echo "Running ls ${app_dir}/easybuild" ls ${app_dir}/easybuild done else From 5fefebc7a76047024fdcd5532f7dcde28bcbea27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 21 Jan 2025 14:08:54 +0100 Subject: [PATCH 6/9] recreate all subdirs of removed app --- EESSI-remove-software.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index 98b25c394d..b2b0e59f7f 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -127,14 +127,17 @@ if [ $EUID -eq 0 ]; then app_dir=${app_installprefix}/software/${app} app_module=${app_installprefix}/modules/all/${app}.lua echo_yellow "Removing ${app_dir} and ${app_module}..." + app_subdirs=$(find ${app_dir} -mindepth 1 -maxdepth 1 -type d) rm -rf ${app_dir} rm -rf ${app_module} # recreate some directory to work around permission denied # issues when rebuilding the package mkdir -p ${app_dir} - mkdir -p ${app_dir}/easybuild - echo "Running ls ${app_dir}/easybuild" - ls ${app_dir}/easybuild + for app_subdir in ${app_subdirs}; do + echo "Recreating ${app_subdir}..." + mkdir -p ${app_subdir} + ls ${app_subdir} + done done else fatal_error "Easystack file ${easystack_file} not found!" From 1219b3438acda853f2d9c7cf662dc4893d985d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 21 Jan 2025 14:22:25 +0100 Subject: [PATCH 7/9] fix check for rebuilds easystacks --- EESSI-install-software.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index bd289e7f91..aa7e5dd729 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -336,7 +336,8 @@ else if [ -f ${easystack_file} ]; then echo_green "Feeding easystack file ${easystack_file} to EasyBuild..." - if [[ $stack == *"/rebuilds/"* ]]; then + if [[ ${easystack_file} == *"/rebuilds/"* ]]; then + echo_yellow "This is a rebuild, so using --try-amend=keeppreviousinstall=True to reuse the already created directory" ${EB} --easystack ${easystack_file} --robot --try-amend=keeppreviousinstall=True else ${EB} --easystack ${easystack_file} --robot From ab82e6d84c514176fc2e9cf1afc978139f2da65e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 21 Jan 2025 15:42:11 +0100 Subject: [PATCH 8/9] reuse existing directory for rebuilds --- EESSI-install-software.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 2f05953158..3a9ba175c9 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -336,7 +336,15 @@ else if [ -f ${easystack_file} ]; then echo_green "Feeding easystack file ${easystack_file} to EasyBuild..." - ${EB} --easystack ${easystack_file} --robot + if [[ ${easystack_file} == *"/rebuilds/"* ]]; then + # the removal script should have removed the original directory and created a new and empty one + # to work around permission issues: + # https://github.com/EESSI/software-layer/issues/556 + echo_yellow "This is a rebuild, so using --try-amend=keeppreviousinstall=True to reuse the already created directory" + ${EB} --easystack ${easystack_file} --robot --try-amend=keeppreviousinstall=True + else + ${EB} --easystack ${easystack_file} --robot + fi ec=$? # copy EasyBuild log file if EasyBuild exited with an error From 0a85fd21eb0fa37605e8976d928edc19ab3a6008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 21 Jan 2025 15:45:21 +0100 Subject: [PATCH 9/9] recreate installation dir and first-level subdirs after it has been removed --- EESSI-remove-software.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index 1a03a7af98..e4b377fd16 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -125,13 +125,18 @@ if [ $EUID -eq 0 ]; then # Two dirname invocations, so returns e.g. /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen2 app_installprefix=$(dirname $(dirname ${app_modulepath})) app_dir=${app_installprefix}/software/${app} + app_subdirs=$(find ${app_dir} -mindepth 1 -maxdepth 1 -type d) app_module=${app_installprefix}/modules/all/${app}.lua echo_yellow "Removing ${app_dir} and ${app_module}..." rm -rf ${app_dir} rm -rf ${app_module} - # recreate some directory to work around permission denied - # issues when rebuilding the package - mkdir -p ${app_dir}/easybuild + # recreate the installation directories and first-level subdirectories to work around permission denied + # issues when rebuilding the package (see https://github.com/EESSI/software-layer/issues/556) + echo_yellow "Recreating an empty ${app_dir}..." + mkdir -p ${app_dir} + for app_subdir in ${app_subdirs}; do + mkdir -p ${app_subdir} + done done else fatal_error "Easystack file ${easystack_file} not found!"