Skip to content

Commit

Permalink
Merge pull request EESSI#318 from trz42/semi_automatic_rebuild_and_gcc
Browse files Browse the repository at this point in the history
{2023.06}[foss/2023a,foss/2023b] ignore fakeroot and do not remove packages & rebuild GCCcore 12.3.0 / 13.2.0
  • Loading branch information
poksumdo authored Apr 12, 2024
2 parents 82cfe67 + 9dd7a4e commit d82cf8a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 8 deletions.
21 changes: 15 additions & 6 deletions EESSI-remove-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ fi
pr_diff=$(ls [0-9]*.diff | head -1)

# if this script is run as root, use PR patch file to determine if software needs to be removed first
if [ $EUID -eq 0 ]; then
# if [ $EUID -eq 0 ]; then
# working around lacking support for `--fakeroot` and/or user namespaces
# we only run as non-root
if [ $EUID -ne 0 ]; then
changed_easystacks_rebuilds=$(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep '^easystacks/.*yml$' | egrep -v 'known-issues|missing' | grep "/rebuilds/")
if [ -z ${changed_easystacks_rebuilds} ]; then
echo "No software needs to be removed."
Expand All @@ -107,19 +110,25 @@ if [ $EUID -eq 0 ]; then
# we need to remove existing installation directories first,
# so let's figure out which modules have to be rebuilt by doing a dry-run and grepping "someapp/someversion" for the relevant lines (with [R])
# * [R] $CFGS/s/someapp/someapp-someversion.eb (module: someapp/someversion)
rebuild_apps=$(eb --allow-use-as-root-and-accept-consequences --dry-run-short --rebuild --easystack ${easystack_file} | grep "^ \* \[R\]" | grep -o "module: .*[^)]" | awk '{print $2}')
# rebuild_apps=$(eb --allow-use-as-root-and-accept-consequences --dry-run-short --rebuild --easystack ${easystack_file} | grep "^ \* \[R\]" | grep -o "module: .*[^)]" | awk '{print $2}')
# we cannot run as root so we removed `--allow-use-as-root...`
rebuild_apps=$(eb --dry-run-short --rebuild --easystack ${easystack_file} | grep "^ \* \[R\]" | grep -o "module: .*[^)]" | awk '{print $2}')
for app in ${rebuild_apps}; do
app_dir=${EASYBUILD_INSTALLPATH}/software/${app}
app_module=${EASYBUILD_INSTALLPATH}/modules/all/${app}.lua
echo_yellow "Removing ${app_dir} and ${app_module}..."
rm -rf ${app_dir}
rm -rf ${app_module}
echo_yellow "Removing ${app_dir} and ${app_module}... (just reporting what would have been done)"
# echo_yellow "Removing ${app_dir} and ${app_module}..."
# rm -rf ${app_dir}
# rm -rf ${app_module}
done
else
fatal_error "Easystack file ${easystack_file} not found!"
fi
done
fi
else
fatal_error "This script can only be run by root!"
fatal_error "This script can NOT be run by root! (lacking support for `--fakeroot` and/or user namespaces)"
fi
# else
# fatal_error "This script can only be run by root!"
# fi
4 changes: 3 additions & 1 deletion bot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ else
REMOVAL_STEP_ARGS+=("--storage" "${STORAGE}")
# add fakeroot option in order to be able to remove software, see:
# https://github.com/EESSI/software-layer/issues/312
REMOVAL_STEP_ARGS+=("--fakeroot")
# CURRENTLY NOT SUPPORTED; software packages need to be removed from
# CernVM-FS repository first
# REMOVAL_STEP_ARGS+=("--fakeroot")

# create tmp file for output of removal step
removal_outerr=$(mktemp remove.outerr.XXXX)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 2024-04-12
# Rebuild GCCcore to fix a compiler bug in the tree-vectorizer
# We encountered it in https://github.com/EESSI/software-layer/pull/479#issuecomment-1957091774
# and https://github.com/EESSI/software-layer/pull/507#issuecomment-2011724613
# Upstream issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111478
# Upstream fix: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=e5f1956498251a4973d52c8aad3faf34d0443169
# Fix in EasyBuild https://github.com/easybuilders/easybuild-easyconfigs/pull/19974
# https://github.com/easybuilders/easybuild-easyconfigs/pull/20218
# Both should be included with EB 4.9.1
easyconfigs:
- GCCcore-12.3.0.eb:
- GCCcore-13.2.0.eb:
5 changes: 4 additions & 1 deletion eessi_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ display_help() {
echo " -c | --container IMG - image file or URL defining the container to use"
echo " [default: docker://ghcr.io/eessi/build-node:debian11]"
echo " -f | --fakeroot - run the container with --fakeroot [default: false]"
echo " Note, currently this option is ignored."
echo " -g | --storage DIR - directory space on host machine (used for"
echo " temporary data) [default: 1. TMPDIR, 2. /tmp]"
echo " -h | --help - display this usage information [default: false]"
Expand Down Expand Up @@ -143,7 +144,9 @@ while [[ $# -gt 0 ]]; do
# shift 1
# ;;
-f|--fakeroot)
FAKEROOT=1
# Currently this argument is being ignored
echo "NOTE, '-f' and '--fakeroot' are currently being ignored."
# FAKEROOT=1
shift 1
;;
-g|--storage)
Expand Down

0 comments on commit d82cf8a

Please sign in to comment.