diff --git a/.ci/commons.sh b/.ci/commons.sh index ef43c8c024de65588e3f94c48b09662cea96e02d..3c88a96af51c3b2d70becfdd1f90009a83600273 100755 --- a/.ci/commons.sh +++ b/.ci/commons.sh @@ -203,6 +203,13 @@ get_pinned_deps() { # the version of dev tools we want in our view SPEC_VIEW_VISIONARY_DEV_TOOLS="visionary-dev-tools ^${DEPENDENCY_PYTHON3} $(get_pinned_deps dev) %${VISIONARY_GCC}" +# used in VIEWS section below but needs to be defined before sourcing +# associative array: spec to add -> view names seperated by spaces +declare -A spack_add_to_view +# associative array: spec to add -> "yes" for when dependencies should be added +# "no" otherwise +declare -A spack_add_to_view_with_dependencies + source "${SOURCE_DIR}/${CONTAINER_STYLE}_spack_collection.sh" # Control verbosity etc of commands @@ -232,36 +239,6 @@ spack_bootstrap_dependencies=( # Views are put under /opt/spack_views/visionary-xy # The app names are then just xy for smaller terminal lines. -# associative array: spec to add -> view names seperated by spaces -declare -A spack_add_to_view -# associative array: spec to add -> "yes" for when dependencies should be added -# "no" otherwise -declare -A spack_add_to_view_with_dependencies - -# Add gccxml to those views that still depend on it -spack_add_to_view_with_dependencies["gccxml"]="no" -spack_add_to_view["gccxml"]="$( -for view in visionary-wafer{,-nodev}; do - echo ${view} -done | tr '\n' ' ' -)" - -# all views get the default gcc except those in spack_views_no_default_gcc -# (defined above) -spack_add_to_view_with_dependencies["${VISIONARY_GCC}"]="no" -spack_add_to_view["${VISIONARY_GCC}"]="$( - for viewname in "${spack_views[@]+"${spack_views[@]}"}"; do - # check if the current view matches any view that does not get the - # default gcc - # Note: Currently this allow partial matches - if printf "%s\n" "${spack_views_no_default_gcc[@]+"${spack_views_no_default_gcc[@]}"}" \ - | grep -qF "${viewname}"; then - continue - fi - echo ${viewname} - done | tr '\n' ' ' -)" - # prevent readarray from being executed in pipe subshell reset_lastpipe=0 if ! shopt -q lastpipe; then diff --git a/.ci/install_gocryptfs_as_root.sh b/.ci/install_gocryptfs_as_root.sh index ef8d87fedb65556105dbfeaca19960381bba2338..d14dfc2c42864bba7b81fe01552d46b9b638859a 100755 --- a/.ci/install_gocryptfs_as_root.sh +++ b/.ci/install_gocryptfs_as_root.sh @@ -26,5 +26,6 @@ git clone "${GOCRYPTFS_REPO}" "${GOCRYPTFS_INSTALL_PATH}" pushd "${GOCRYPTFS_INSTALL_PATH}" # build and install -./build.bash +#./build.bash +./build-without-openssl.bash popd diff --git a/.ci/install_spack.sh b/.ci/install_spack.sh index daf8a7de0b631633ebc8b96229e18e1f47fe6d45..ac555e0cb9c2317690e9a21157f7fe84b24b9986 100755 --- a/.ci/install_spack.sh +++ b/.ci/install_spack.sh @@ -55,11 +55,14 @@ source ${SPACK_INSTALL_SCRIPTS}/${CONTAINER_STYLE}_spack_custom_view.sh populate_views # Hide python3 in ancient (python2-based) views: -# The host system provides a python3 binary which spack prefers over the -# view-provided python2 binary. Since we set PYTHONHOME this leads to +# The host system might provide a python3 binary which spack will prefer over +# the view-provided python2 binary. Since we set PYTHONHOME this leads to # incompatible python libraries search paths. for pyf in ${MY_SPACK_VIEW_PREFIX}/visionary-*/bin/python2; do - ln -fs ${pyf} "$(dirname ${pyf})/python3" + # ignore views w/o python2 + if [ -f ${pyf} ]; then + ln -fs ${pyf} "$(dirname ${pyf})/python3" + fi done umask ${OLD_UMASK} @@ -69,4 +72,6 @@ umask ${OLD_UMASK} # $ singularity shell -s /opt/shell/${SHELL} /containers/stable/latest # which is independent of any app. Especially, this allows custom loading of # modules within the container. -ln -s "$(${MY_SPACK_BIN} location -i zsh)/bin/zsh" /opt/shell/zsh +if ${MY_SPACK_BIN} location -i zsh; then + ln -s "$(${MY_SPACK_BIN} location -i zsh)/bin/zsh" /opt/shell/zsh +fi diff --git a/.ci/visionary_spack_collection.sh b/.ci/visionary_spack_collection.sh index 3204aae87c1f8b772231ced253697494ef2c04c7..7eab14af2b085d6f3e66b7eac11185157561fcae 100644 --- a/.ci/visionary_spack_collection.sh +++ b/.ci/visionary_spack_collection.sh @@ -41,3 +41,29 @@ spack_gid="nogroup" spack_create_user_cmd() { adduser spack --uid 888 --no-create-home --home /opt/spack --disabled-password --system --shell /bin/bash } + +# gccxml is added without dependencies to avoid introducing a second gcc +spack_add_to_view_with_dependencies["gccxml"]="no" + +# all views get the default gcc except those in spack_views_no_default_gcc +# (defined above) +spack_add_to_view_with_dependencies["${VISIONARY_GCC}"]="no" +spack_add_to_view["${VISIONARY_GCC}"]="$( + for viewname in "${spack_views[@]+"${spack_views[@]}"}"; do + # check if the current view matches any view that does not get the + # default gcc + # Note: Currently this allow partial matches + if printf "%s\n" "${spack_views_no_default_gcc[@]+"${spack_views_no_default_gcc[@]}"}" \ + | grep -qF "${viewname}"; then + continue + fi + echo ${viewname} + done | tr '\n' ' ' +)" + +# Add gccxml to those views that still depend on it +spack_add_to_view["gccxml"]="$( +for view in visionary-wafer{,-nodev}; do + echo ${view} +done | tr '\n' ' ' +)"