Compare commits
3 commits
6e8cdb6c39
...
39e57ffc46
Author | SHA1 | Date | |
---|---|---|---|
39e57ffc46 | |||
daca52ed6c | |||
bd273c7564 |
5 changed files with 26 additions and 53 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
# need HLRS_OPT_PREFIX
|
||||
if [ -z "${HLRS_OPT_PREFIX}" ]; then
|
||||
echo "ERROR: need environment variable HLRS_OPT_DIR"
|
||||
echo "ERROR: need environment variable HLRS_OPT_PREFIX"
|
||||
else
|
||||
|
||||
HLRS_SOFTWARE_STACK_PREFIX=${HLRS_OPT_PREFIX}/release
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
# this file is meant to be source'd
|
||||
#
|
||||
|
||||
# need HLRS_OPT_PREFIX
|
||||
if [ -z "${HLRS_OPT_PREFIX}" ]; then
|
||||
echo "ERROR: need environment variable HLRS_OPT_DIR"
|
||||
else
|
||||
|
||||
HLRS_SOFTWARE_STACK_PREFIX=${HLRS_OPT_PREFIX}/spack/release
|
||||
|
||||
HLRS_SOFTWARE_STACK_RELEASE_VERSION=23.1.0
|
||||
HLRS_SOFTWARE_STACK_RELEASE_ROOT=${HLRS_SOFTWARE_STACK_PREFIX}/${HLRS_SOFTWARE_STACK_RELEASE_VERSION}
|
||||
|
||||
unset HLRS_SOFTWARE_STACK_PREFIX
|
||||
|
||||
export HLRS_SOFTWARE_STACK_RELEASE_VERSION HLRS_SOFTWARE_STACK_RELEASE_ROOT
|
||||
|
||||
fi
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# this file is meant to be source'd
|
||||
#
|
||||
|
||||
# need HLRS_SOFTWARE_STACK_RELEASE_ROOT
|
||||
if [ -z "${HLRS_SOFTWARE_STACK_RELEASE_ROOT}" ]; then
|
||||
echo "ERROR: need environment variable HLRS_SOFTWARE_STACK_RELEASE_ROOT"
|
||||
else
|
||||
|
||||
HLRS_SOFTWARE_STACK_HLRS_SPACK_ROOT=${HLRS_SOFTWARE_STACK_RELEASE_ROOT}
|
||||
# the following must be a directory containing a subdir named .spack-db/
|
||||
HLRS_SOFTWARE_STACK_SPACK_INSTALL_TREE=${HLRS_SOFTWARE_STACK_RELEASE_ROOT}/optional
|
||||
|
||||
export HLRS_SOFTWARE_STACK_HLRS_SPACK_ROOT HLRS_SOFTWARE_STACK_SPACK_INSTALL_TREE
|
||||
|
||||
fi
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# this file is meant to be source'd
|
||||
#
|
||||
# this loads environemt for a fake HLRS spack release, in /localscratch
|
||||
#
|
||||
|
||||
source 00_base_prefix.env
|
||||
source 01_release_root_23.1.0.env
|
||||
source 02_hlrs_spack_root_23.1.0.env
|
||||
|
|
@ -6,7 +6,10 @@
|
|||
# - release_tag: tag/branch/commit in repo
|
||||
# - base_prefix: prefix to base directory for softweare installation; e.g. /opt/hlrs
|
||||
#
|
||||
# Environment variables: $TMPDIR must be set
|
||||
# Environment variables:
|
||||
# - $TMPDIR must be set
|
||||
# - $HLRS_REPO_LOCATION, if given, will override the location of various repositories.
|
||||
# If not given, it defaults to "https://code.hlr.de/hlrs-software-stack"
|
||||
#
|
||||
#
|
||||
# Release directory structure:
|
||||
|
@ -59,6 +62,20 @@ create_dir () {
|
|||
echo $rc
|
||||
}
|
||||
|
||||
checkout_repo_inplace () {
|
||||
local repo=$1
|
||||
local tag=$2
|
||||
local dir=$3
|
||||
local err
|
||||
|
||||
pushd $dir > /dev/null
|
||||
git clone --depth=1 --single-branch --branch=$tag -c feature.manyFiles=true $repo .
|
||||
err=$?
|
||||
popd > /dev/null
|
||||
|
||||
return $err
|
||||
}
|
||||
|
||||
|
||||
_VERBOSITY=1
|
||||
|
||||
|
@ -76,22 +93,22 @@ arg_tag=$(canonize_tag $1)
|
|||
arg_prefix=$2
|
||||
|
||||
# Define various repo locations
|
||||
_HLRS_SPACK_REPO=file://$HOME/spack-test/dummy_repo/spack.git
|
||||
_HLRS_SPACK_PLUMBING_REPO=file://$HOME/spack-test/dummy_repo/release_root.git
|
||||
_HLRS_SPACK_CONFIG_REPO=file://$HOME/spack-test/dummy_repo/hlrs-spack.git
|
||||
HLRS_REPO_LOCATION=${HLRS_REPO_LOCATION:-https://code.hlrs.de/hlrs-software-stack}
|
||||
_HLRS_SPACK_REPO=${HLRS_REPO_LOCATION}/spack
|
||||
_HLRS_SPACK_PLUMBING_REPO=${HLRS_REPO_LOCATION}/release_root
|
||||
_HLRS_SPACK_CONFIG_REPO=${HLRS_REPO_LOCATION}/hlrs-spack
|
||||
|
||||
|
||||
# bootstrap staging area
|
||||
log "setup staging area at:"
|
||||
tmp_dir=$(mktemp -d)
|
||||
staging_dir=$tmp_dir/staging
|
||||
staging_dir=$tmp_dir/staging
|
||||
mkdir -p $staging_dir
|
||||
log " $staging_dir"
|
||||
|
||||
# bootstrap plumbing directory
|
||||
log "bootstrap plumbing directory ..."
|
||||
curl -L $_HLRS_SPACK_PLUMBING_REPO/hlrs-plumbing/scripts/xx_checkout_repo.sh | \
|
||||
bash -s -- $_HLRS_SPACK_PLUMBING_REPO \
|
||||
$arg_tag $staging_dir .
|
||||
checkout_repo_inplace $_HLRS_SPACK_PLUMBING_REPO $arg_tag $staging_dir
|
||||
plumbing_dir=$staging_dir/hlrs-plumbing
|
||||
log "... done"
|
||||
|
||||
|
|
Loading…
Reference in a new issue