Skip to content

Commit d82cf8a

Browse files
authored
Merge pull request #318 from trz42/semi_automatic_rebuild_and_gcc
{2023.06}[foss/2023a,foss/2023b] ignore fakeroot and do not remove packages & rebuild GCCcore 12.3.0 / 13.2.0
2 parents 82cfe67 + 9dd7a4e commit d82cf8a

File tree

4 files changed

+34
-8
lines changed

4 files changed

+34
-8
lines changed

EESSI-remove-software.sh

+15-6
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ fi
9090
pr_diff=$(ls [0-9]*.diff | head -1)
9191

9292
# if this script is run as root, use PR patch file to determine if software needs to be removed first
93-
if [ $EUID -eq 0 ]; then
93+
# if [ $EUID -eq 0 ]; then
94+
# working around lacking support for `--fakeroot` and/or user namespaces
95+
# we only run as non-root
96+
if [ $EUID -ne 0 ]; then
9497
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/")
9598
if [ -z ${changed_easystacks_rebuilds} ]; then
9699
echo "No software needs to be removed."
@@ -107,19 +110,25 @@ if [ $EUID -eq 0 ]; then
107110
# we need to remove existing installation directories first,
108111
# 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])
109112
# * [R] $CFGS/s/someapp/someapp-someversion.eb (module: someapp/someversion)
110-
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}')
113+
# 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}')
114+
# we cannot run as root so we removed `--allow-use-as-root...`
115+
rebuild_apps=$(eb --dry-run-short --rebuild --easystack ${easystack_file} | grep "^ \* \[R\]" | grep -o "module: .*[^)]" | awk '{print $2}')
111116
for app in ${rebuild_apps}; do
112117
app_dir=${EASYBUILD_INSTALLPATH}/software/${app}
113118
app_module=${EASYBUILD_INSTALLPATH}/modules/all/${app}.lua
114-
echo_yellow "Removing ${app_dir} and ${app_module}..."
115-
rm -rf ${app_dir}
116-
rm -rf ${app_module}
119+
echo_yellow "Removing ${app_dir} and ${app_module}... (just reporting what would have been done)"
120+
# echo_yellow "Removing ${app_dir} and ${app_module}..."
121+
# rm -rf ${app_dir}
122+
# rm -rf ${app_module}
117123
done
118124
else
119125
fatal_error "Easystack file ${easystack_file} not found!"
120126
fi
121127
done
122128
fi
123129
else
124-
fatal_error "This script can only be run by root!"
130+
fatal_error "This script can NOT be run by root! (lacking support for `--fakeroot` and/or user namespaces)"
125131
fi
132+
# else
133+
# fatal_error "This script can only be run by root!"
134+
# fi

bot/build.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ else
198198
REMOVAL_STEP_ARGS+=("--storage" "${STORAGE}")
199199
# add fakeroot option in order to be able to remove software, see:
200200
# https://github.com/EESSI/software-layer/issues/312
201-
REMOVAL_STEP_ARGS+=("--fakeroot")
201+
# CURRENTLY NOT SUPPORTED; software packages need to be removed from
202+
# CernVM-FS repository first
203+
# REMOVAL_STEP_ARGS+=("--fakeroot")
202204

203205
# create tmp file for output of removal step
204206
removal_outerr=$(mktemp remove.outerr.XXXX)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 2024-04-12
2+
# Rebuild GCCcore to fix a compiler bug in the tree-vectorizer
3+
# We encountered it in https://github.com/EESSI/software-layer/pull/479#issuecomment-1957091774
4+
# and https://github.com/EESSI/software-layer/pull/507#issuecomment-2011724613
5+
# Upstream issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111478
6+
# Upstream fix: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=e5f1956498251a4973d52c8aad3faf34d0443169
7+
# Fix in EasyBuild https://github.com/easybuilders/easybuild-easyconfigs/pull/19974
8+
# https://github.com/easybuilders/easybuild-easyconfigs/pull/20218
9+
# Both should be included with EB 4.9.1
10+
easyconfigs:
11+
- GCCcore-12.3.0.eb:
12+
- GCCcore-13.2.0.eb:

eessi_container.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ display_help() {
7474
echo " -c | --container IMG - image file or URL defining the container to use"
7575
echo " [default: docker://ghcr.io/eessi/build-node:debian11]"
7676
echo " -f | --fakeroot - run the container with --fakeroot [default: false]"
77+
echo " Note, currently this option is ignored."
7778
echo " -g | --storage DIR - directory space on host machine (used for"
7879
echo " temporary data) [default: 1. TMPDIR, 2. /tmp]"
7980
echo " -h | --help - display this usage information [default: false]"
@@ -143,7 +144,9 @@ while [[ $# -gt 0 ]]; do
143144
# shift 1
144145
# ;;
145146
-f|--fakeroot)
146-
FAKEROOT=1
147+
# Currently this argument is being ignored
148+
echo "NOTE, '-f' and '--fakeroot' are currently being ignored."
149+
# FAKEROOT=1
147150
shift 1
148151
;;
149152
-g|--storage)

0 commit comments

Comments
 (0)