Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into new_make_spack
Browse files Browse the repository at this point in the history
  • Loading branch information
knoepfel committed Aug 22, 2024
2 parents 4623541 + 7d50a6a commit c817d1d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 30 deletions.
6 changes: 2 additions & 4 deletions bin/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ usage: bootstrap [options] [dest_dir]
EOF
}
# note, other scripts pull these values for defaults
#default_fermi_spack_tools_version=main
#default_spack_version=fnal-develop
default_fermi_spack_tools_version=new_make_spack
default_spack_version=v0.22.0-fermi
default_fermi_spack_tools_version=main
default_spack_version=fnal-develop
default_spack_repo=https://github.com/FNALssi/spack.git
default_fermi_spack_tools_repo=https://github.com/FNALssi/fermi-spack-tools.git

Expand Down
2 changes: 1 addition & 1 deletion bin/build-spack-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ if ! [ -f "$spack_env_top_dir/setup-env.sh" ]; then
--minimal
$ups_opt
)
(( VERBOSITY < DEBUG_1 )) || make_spack_cmd+=(--verbose)
(( VERBOSITY < DEBUG_1 )) || make_spack_cmd+=(-v)
(( query_packages )) && make_spack_cmd+=(--query-packages)
(( with_padding )) && make_spack_cmd+=(--with_padding)
make_spack_cmd+=("$spack_env_top_dir")
Expand Down
3 changes: 1 addition & 2 deletions bin/declare_simple
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def make_recipe( namespace, name, version, tarfile, pathvar='IGNORE'):
print("unlinking")
os.unlink( "%s/packages/%s/package.py" % (rd, name))

f = os.popen("unset VISUAL; EDITOR=/bin/ed spack create -N %s --template generic --name %s" % (namespace, name), "w")
f = os.popen("unset VISUAL; unset SPACK_EDITOR; EDITOR=/bin/ed spack create -N %s --template generic --name %s" % (namespace, name), "w")
dict = {
'name': name,
'NAME': name.upper().replace('-','_'),
Expand Down Expand Up @@ -110,5 +110,4 @@ def make_instance(name, version):
make_recipe(namespace, name, version, tfn, 'PATH')
os.system("spack install --no-checksum %s@%s" % (name, version))


make_instance(sys.argv[1], sys.argv[2])
36 changes: 18 additions & 18 deletions bin/make_spack
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# Script to make a Fermi-ized spack repository
# Script to make a Fermi-ized spack repository
#
find_ourselves() {
spackbindir=`echo $0 | sed -e 's;make_spack$;;' `
Expand All @@ -14,20 +14,20 @@ find_ourselves() {
clone_repos() {

while read ddir branch repo
do
do
git clone -b $branch --depth $depth $repo $ddir
done <<EOF
done <<EOF
$dir $spack_release $spack_repo
$dir/etc/spack/linux main https://github.com/marcmengel/fermi-etc-spack-linux.git
$dir/var/spack/extensions/spack-freeze main https://github.com/marcmengel/spack-freeze.git
$dir/var/spack/extensions/spack-installdir main https://github.com/marcmengel/spack-installdir.git
$dir/etc/spack/linux main https://github.com/marcmengel/fermi-etc-spack-linux.git
$dir/var/spack/extensions/spack-freeze main https://github.com/marcmengel/spack-freeze.git
$dir/var/spack/extensions/spack-installdir main https://github.com/marcmengel/spack-installdir.git
$dir/var/spack/extensions/spack-linuxexternals main https://github.com/marcmengel/spack-linuxexternals.git
$dir/var/spack/extensions/spack-localbuildcache main https://github.com/marcmengel/spack-localbuildcache.git
$dir/var/spack/extensions/spack-subspack main https://github.com/marcmengel/spack-subspack.git
$dir/var/spack/extensions/spack-mpd main https://github.com/knoepfel/spack-mpd.git
$dir/var/spack/extensions/spack-mpd main https://github.com/knoepfel/spack-mpd.git
$dir/var/spack/extensions/spack-subspack main https://github.com/marcmengel/spack-subspack.git
$dir/var/spack/repos/fnal_art develop https://github.com/FNALssi/fnal_art.git
$dir/var/spack/repos/scd_recipes master https://github.com/marcmengel/scd_recipes.git
$dir/var/spack/repos/fnal_art develop https://github.com/FNALssi/fnal_art.git
$dir/var/spack/repos/scd_recipes master https://github.com/marcmengel/scd_recipes.git
$dir/var/spack/repos/nusofthep-spack-recipes main https://github.com/NuSoftHEP/nusofthep-spack-recipes.git
$dir/var/spack/repos/larsoft-spack-recipes main https://github.com/LArSoft/larsoft-spack-recipes.git
$dir/var/spack/repos/artdaq-spack develop https://github.com/art-daq/artdaq-spack.git
Expand All @@ -38,12 +38,12 @@ EOF
add_fermi_setups() {

#
# * symlink setup-env.{csh,sh} to $SPACK_ROOT
# * symlink setup-env.{csh,sh} to $SPACK_ROOT
# * set SPACK environment variables we want
#

echo source $dir/share/spack/setup-env.sh > $dir/setup-env.sh
echo source $dir/share/spack/setup-env.csh > $dir/setup-env.csh
echo source $dir/share/spack/setup-env.sh > $dir/setup-env.sh
echo source $dir/share/spack/setup-env.csh > $dir/setup-env.csh

while read var val
do
Expand All @@ -68,7 +68,7 @@ do_padding() {

query_packages() {
if $query_packages; then
osstr=$(spack arch -o)
osstr=$(spack arch -o)
spack linuxexternals --scope=site/linux/$osstr
fi
}
Expand All @@ -86,7 +86,7 @@ usage() {
echo " --verbose"
echo " -u fermi 'unified' layout (deprecated)"
echo " -t fermi 'traditional' layout (deprecated)"
echo " -p plain spack default layout (default)"
echo " -p plain spack default layout (deprecated)"
echo " -m minimal setup"
echo " -v verbose flag"
echo ""
Expand All @@ -111,7 +111,7 @@ parse_args() {
query_packages=false
repovers=""
verbose=false
depth=1
depth=1

origargs="$*"
if x=$(getopt --longoptions help,depth,with_padding,upgrade,spack_release:,minimal,no_buildcache,repover,spack_repo:,query-packages,verbose --options mptuv -- "$@")
Expand All @@ -138,7 +138,7 @@ parse_args() {
x-v|x--verbose) verbose=true; shift;;
x-u) echo "Deprecated option -u ignored"; shift;;
x-t) echo "Deprecated option -t ignored"; shift;;
x-p) echo "Deprecated option -p is now default" ; shift;;
x-p) echo "Deprecated option -p ignored (-p is already the default behavior)" ; shift;;
x-m) echo "Deprecated option -m ignored"; shift;;
x--) shift; break;;
esac
Expand All @@ -153,12 +153,12 @@ parse_args() {
if $verbose
then
echo "$(date --iso-8601=seconds) Starting make_spack $origargs"
set -x
set -x
fi
}

do_spack_bootstrap() {
osstr=$(spack arch -o)
osstr=$(spack arch -o)
spack bootstrap root $dir/.bootstrap.$osstr
spack bootstrap now
spack buildcache keys --install --force --trust
Expand Down
5 changes: 0 additions & 5 deletions templates/modules.yaml.unified
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
modules:
default:
roots:
ups_table: $spack/../../..
ups_version: $spack/../../..
enable:
- tcl
- ups_table
- ups_version

0 comments on commit c817d1d

Please sign in to comment.