Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for pilot 2021.06 #109

Merged
merged 7 commits into from
Jun 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: install_packages.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