Skip to content

Commit

Permalink
Merge pull request #109 from bedroge/2021.06
Browse files Browse the repository at this point in the history
Updates for pilot 2021.06
  • Loading branch information
boegel authored Jun 19, 2021
2 parents 17a498c + ecdc20d commit 6c8105c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
8 changes: 3 additions & 5 deletions ansible/playbooks/roles/compatibility_layer/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Defaults file for the compatibility layer role.
---
eessi_version: "2021.03"
eessi_version: "2021.06"

custom_overlays:
- name: eessi
Expand All @@ -17,17 +17,15 @@ gentoo_prefix_path: /cvmfs/{{ cvmfs_repository }}/{{ eessi_version }}/compat/{{

# How to build the prefix
prefix_required_space: 15 GB
prefix_snapshot_url: http://cvmfs-s0.eessi-hpc.org/snapshots
prefix_snapshot_version: 20210322
prefix_python_targets: python3_8
prefix_snapshot_url: https://eessi-gentoo-snapshot.s3-eu-west-1.amazonaws.com
prefix_snapshot_version: 20210607
prefix_user_defined_trusted_dirs:
- "/cvmfs/{{ cvmfs_repository }}/host_injections/{{ eessi_version }}/compat/{{ eessi_host_os }}/{{ eessi_host_arch }}/lib"
prefix_singularity_command: "singularity run -B {{ gentoo_prefix_path }}:{{ gentoo_prefix_path }}"
prefix_source: "docker://eessi/bootstrap-prefix:centos8-{{ eessi_host_arch }}"
prefix_source_options: "{{ gentoo_prefix_path }} noninteractive"
prefix_install: >-
SINGULARITYENV_USE_CPU_CORES={{ ansible_processor_vcpus }}
SINGULARITYENV_PYTHON_TARGETS="{{ prefix_python_targets }}"
SINGULARITYENV_CUSTOM_SNAPSHOT_URL="{{ prefix_snapshot_url }}"
SINGULARITYENV_CUSTOM_SNAPSHOT_VERSION="{{ prefix_snapshot_version }}"
{{ prefix_singularity_command }} {{ prefix_source }} {{ prefix_source_options }}
Expand Down
2 changes: 0 additions & 2 deletions ansible/playbooks/roles/compatibility_layer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
args:
apply:
become: False
environment:
PYTHON_TARGETS: "{{ prefix_python_targets }}"

- include_tasks: set_glibc_trusted_dirs.yml

Expand Down
36 changes: 25 additions & 11 deletions bootstrap-prefix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ configure_toolchain() {
;;
esac

return
return 0
}

bootstrap_setup() {
Expand Down Expand Up @@ -450,6 +450,12 @@ bootstrap_setup() {
ACCEPT_KEYWORDS="~${ARCH}-linux"
EOF

# bug #788613 avoid gcc-11 during stage 2/3 prior sync/emerge -e
is-rap && cat >> "${ROOT}"/etc/portage/make.profile/package.mask <<-EOF
# during bootstrap mask, bug #788613
>=sys-devel/gcc-11
EOF

# Use package.use to disable in the portage tree to be shared between
# stage2 and stage3. The hack will be undone during tree sync in stage3.
cat >> "${ROOT}"/etc/portage/make.profile/package.use <<-EOF
Expand Down Expand Up @@ -1355,8 +1361,8 @@ bootstrap_libressl() {

bootstrap_stage_host_gentoo() {
if ! is-rap ; then
einfo "Shortcut only supports prefix-standalone, but we are bootstrapping"
einfo "prefix-rpath. Do nothing."
einfo "Shortcut only supports prefix-standalone, but we "
einfo "are bootstrapping prefix-rpath. Do nothing."
return 0
fi

Expand Down Expand Up @@ -1447,6 +1453,7 @@ bootstrap_stage1() {
# we're working with now, bug #650284
[[ -x ${ROOT}/tmp/usr/bin/bash ]] \
|| (bootstrap_bash) || return 1

# Some host tools need to be wrapped to be useful for us.
# We put them in tmp/usr/local/bin, to not accidentally
# be identified as stage1-installed like in bug #615410.
Expand Down Expand Up @@ -1475,10 +1482,14 @@ bootstrap_stage1() {
# We need to direct the system gcc to find the system binutils.
cat >> "${ROOT}"/tmp/usr/local/bin/gcc <<-EOF
#! /bin/sh
PATH="${STAGE1_PATH}" export PATH
exec "\${0##*/}" "\$@"
PATH="${ORIGINAL_PATH}" export PATH
exec "$(type -P gcc)" "\$@"
EOF
cat >> "${ROOT}"/tmp/usr/local/bin/g++ <<-EOF
#! /bin/sh
PATH="${ORIGINAL_PATH}" export PATH
exec "$(type -P g++)" "\$@"
EOF
cp "${ROOT}"/tmp/usr/local/bin/g{cc,++}
chmod 755 "${ROOT}"/tmp/usr/local/bin/g{cc,++}
fi
;;
Expand Down Expand Up @@ -1905,7 +1916,11 @@ bootstrap_stage3() {
}

# pre_emerge_pkgs relies on stage 2 portage.
pre_emerge_pkgs() { is-rap && without_stack_emerge_pkgs "$@" || with_stack_emerge_pkgs "$@"; }
pre_emerge_pkgs() {
is-rap \
&& without_stack_emerge_pkgs "$@" \
|| with_stack_emerge_pkgs "$@"
}

# Some packages fail to properly depend on sys-apps/texinfo.
# We don't really need that package, so we fake it instead,
Expand Down Expand Up @@ -2768,7 +2783,6 @@ EOF
# location seems ok
break
done
export STAGE1_PATH=${PATH}
export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:$EPREFIX/tmp/usr/local/bin:${PATH}"

cat << EOF
Expand Down Expand Up @@ -3078,9 +3092,6 @@ case ${CHOST} in
powerpc-*darwin*)
DARWIN_USE_GCC=1 # must use GCC, Clang is impossible
;;
# arm64-*darwin*)
# DARWIN_USE_GCC=0 # cannot use GCC yet (needs silicon support)
# ;;
*-darwin*)
# normalise value of DARWIN_USE_GCC
case ${DARWIN_USE_GCC} in
Expand Down Expand Up @@ -3116,6 +3127,9 @@ case ${CHOST}:${LC_ALL}:${LANG} in
;;
esac

# save original path, need this before interactive, #788334
ORIGINAL_PATH="${PATH}"

# Just guessing a prefix is kind of scary. Hence, to make it a bit less
# scary, we force the user to give the prefix location here. This also
# makes the script a bit less dangerous as it will die when just run to
Expand Down

0 comments on commit 6c8105c

Please sign in to comment.