spack/run-find-external.sh.in

97 lines
3.2 KiB
Bash
Raw Normal View History

#!/bin/bash
scope=system
what=$1
addpath() {
path=$1
shift
while [ -n "$1" ]; do
eval "${path}"=${1}:${!path}
shift
done
}
find_packages() {
if [ $scope = user ]; then
Accepting request 1174817 from home:eeich:branches:network:cluster - Give 'site' scope a lower precedence than 'system' scope. The 'site wide' config scope was meant to be per Spack installation. A single system may have multiple Spack installations, so was is meant for overriding the 'system' wide setting per installation. The Spack package is OS-vendor provided. The vendor provides pr generates a configuration which a local admin may want to override. This can now be done from within the 'system' scope. Previously the vendor-supplied configuration was mixed with the 'system' scope - local modifications collided with vendor autoconfiguration. - Add a build-dependency package which will cause build tools and libraries used frequently by Spack to be installed. All these packages are recommended by the main Spack package already. This package may be used in environments where the installation of recommended packages is disabled by default. - Update Spack to version 0.22.0 * New features: - Compiler dependencies: Spack is in the process of making compilers proper dependencies. For this, compiler dependencies are moving from `compilers.yaml` to `packages.yaml` to make this consistent with other externals. For this, dependency graphs will not show the compiler runtime libraries like `gcc-runtime` or `libgfortran`. To minimize disruption, an existing `compilers.yaml` file will continue to work, however, users are encourage to migrate before v0.23. + Packages compiled with `%gcc` now depend on a new package `gcc-runtime`, which contains a copy of the shared compiler OBS-URL: https://build.opensuse.org/request/show/1174817 OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=104
2024-06-11 09:38:05 +02:00
# In case a packages.yaml is left in the system scope
# from an old installation get it out of the way.
if [ ! -e /usr/etc/spack/packages.yaml ]; then
test -e /etc/spack/packages.yaml -a ! -e /etc/packages.yaml.rpmsave && \
mv /etc/spack/packages.yaml /etc/spack/packages.yaml.rpmsave
rm -f /etc/spack/packages.yaml
fi
test -e /usr/etc/spack/packages.yaml -a ! -e /usr/etc/packages.yaml.rpmsave && \
mv /usr/etc/spack/packages.yaml /usr/etc/spack/packages.yaml.rpmsave
# drop all root rights, when calling external find
sudo -u nobody PATH=${mypath}:${PATH} spack external find --scope user --all #--exclude 'installdbgsymbols'
if [ -e /var/lib/nobody/.spack/packages.yaml ] ; then
Accepting request 1174817 from home:eeich:branches:network:cluster - Give 'site' scope a lower precedence than 'system' scope. The 'site wide' config scope was meant to be per Spack installation. A single system may have multiple Spack installations, so was is meant for overriding the 'system' wide setting per installation. The Spack package is OS-vendor provided. The vendor provides pr generates a configuration which a local admin may want to override. This can now be done from within the 'system' scope. Previously the vendor-supplied configuration was mixed with the 'system' scope - local modifications collided with vendor autoconfiguration. - Add a build-dependency package which will cause build tools and libraries used frequently by Spack to be installed. All these packages are recommended by the main Spack package already. This package may be used in environments where the installation of recommended packages is disabled by default. - Update Spack to version 0.22.0 * New features: - Compiler dependencies: Spack is in the process of making compilers proper dependencies. For this, compiler dependencies are moving from `compilers.yaml` to `packages.yaml` to make this consistent with other externals. For this, dependency graphs will not show the compiler runtime libraries like `gcc-runtime` or `libgfortran`. To minimize disruption, an existing `compilers.yaml` file will continue to work, however, users are encourage to migrate before v0.23. + Packages compiled with `%gcc` now depend on a new package `gcc-runtime`, which contains a copy of the shared compiler OBS-URL: https://build.opensuse.org/request/show/1174817 OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=104
2024-06-11 09:38:05 +02:00
chown root:root /var/lib/nobody/.spack/packages.yaml
mv -v /var/lib/nobody/.spack/packages.yaml /usr/etc/spack/packages.yaml
rm -rf /var/lib/nobody/.spack
fi
else
# May run in a container...
PATH=${mypath}:${PATH} spack external find --scope system --all #--exclude 'installdbgsymbols'
fi
Accepting request 1174817 from home:eeich:branches:network:cluster - Give 'site' scope a lower precedence than 'system' scope. The 'site wide' config scope was meant to be per Spack installation. A single system may have multiple Spack installations, so was is meant for overriding the 'system' wide setting per installation. The Spack package is OS-vendor provided. The vendor provides pr generates a configuration which a local admin may want to override. This can now be done from within the 'system' scope. Previously the vendor-supplied configuration was mixed with the 'system' scope - local modifications collided with vendor autoconfiguration. - Add a build-dependency package which will cause build tools and libraries used frequently by Spack to be installed. All these packages are recommended by the main Spack package already. This package may be used in environments where the installation of recommended packages is disabled by default. - Update Spack to version 0.22.0 * New features: - Compiler dependencies: Spack is in the process of making compilers proper dependencies. For this, compiler dependencies are moving from `compilers.yaml` to `packages.yaml` to make this consistent with other externals. For this, dependency graphs will not show the compiler runtime libraries like `gcc-runtime` or `libgfortran`. To minimize disruption, an existing `compilers.yaml` file will continue to work, however, users are encourage to migrate before v0.23. + Packages compiled with `%gcc` now depend on a new package `gcc-runtime`, which contains a copy of the shared compiler OBS-URL: https://build.opensuse.org/request/show/1174817 OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=104
2024-06-11 09:38:05 +02:00
test -e /usr/etc/spack/packages.yaml.rpmsave && \
{ diff -q /usr/etc/spack/packages.yaml.rpmsave /usr/etc/spack/packages.yaml &> /dev/null && \
rm /usr/etc/spack/packages.yaml.rpmsave; } || true
}
find_compilers() {
if [ $scope = user ]; then
Accepting request 1174817 from home:eeich:branches:network:cluster - Give 'site' scope a lower precedence than 'system' scope. The 'site wide' config scope was meant to be per Spack installation. A single system may have multiple Spack installations, so was is meant for overriding the 'system' wide setting per installation. The Spack package is OS-vendor provided. The vendor provides pr generates a configuration which a local admin may want to override. This can now be done from within the 'system' scope. Previously the vendor-supplied configuration was mixed with the 'system' scope - local modifications collided with vendor autoconfiguration. - Add a build-dependency package which will cause build tools and libraries used frequently by Spack to be installed. All these packages are recommended by the main Spack package already. This package may be used in environments where the installation of recommended packages is disabled by default. - Update Spack to version 0.22.0 * New features: - Compiler dependencies: Spack is in the process of making compilers proper dependencies. For this, compiler dependencies are moving from `compilers.yaml` to `packages.yaml` to make this consistent with other externals. For this, dependency graphs will not show the compiler runtime libraries like `gcc-runtime` or `libgfortran`. To minimize disruption, an existing `compilers.yaml` file will continue to work, however, users are encourage to migrate before v0.23. + Packages compiled with `%gcc` now depend on a new package `gcc-runtime`, which contains a copy of the shared compiler OBS-URL: https://build.opensuse.org/request/show/1174817 OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=104
2024-06-11 09:38:05 +02:00
test -e /etc/spack/compilers.yaml \
-a ! -e /etc/spack/compilers.yaml.rpmsave && \
mv /etc/spack/compilers.yaml /etc/spack/compilers.yaml.rpmsave
rm -f /etc/spack/compilers.yaml
fi
Accepting request 1174817 from home:eeich:branches:network:cluster - Give 'site' scope a lower precedence than 'system' scope. The 'site wide' config scope was meant to be per Spack installation. A single system may have multiple Spack installations, so was is meant for overriding the 'system' wide setting per installation. The Spack package is OS-vendor provided. The vendor provides pr generates a configuration which a local admin may want to override. This can now be done from within the 'system' scope. Previously the vendor-supplied configuration was mixed with the 'system' scope - local modifications collided with vendor autoconfiguration. - Add a build-dependency package which will cause build tools and libraries used frequently by Spack to be installed. All these packages are recommended by the main Spack package already. This package may be used in environments where the installation of recommended packages is disabled by default. - Update Spack to version 0.22.0 * New features: - Compiler dependencies: Spack is in the process of making compilers proper dependencies. For this, compiler dependencies are moving from `compilers.yaml` to `packages.yaml` to make this consistent with other externals. For this, dependency graphs will not show the compiler runtime libraries like `gcc-runtime` or `libgfortran`. To minimize disruption, an existing `compilers.yaml` file will continue to work, however, users are encourage to migrate before v0.23. + Packages compiled with `%gcc` now depend on a new package `gcc-runtime`, which contains a copy of the shared compiler OBS-URL: https://build.opensuse.org/request/show/1174817 OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=104
2024-06-11 09:38:05 +02:00
diff -q /etc/spack/compilers.yaml.rpmsave /etc/spack/compilers.yaml &> /dev/null \
&& rm /etc/spack/compilers.yaml.rpmsave
test -e /etc/spack/compilers.yaml.rpmsave && \
echo -e "/etc/spack/compilers.yaml.rpmsave exists,\n"\
" compilers are handled in /etc/spack/packages.yaml, now.\n"\
" Please check files for compilers you may have added manually" || true
}
if [ -e /etc/spack/no_rpm_trigger ] ; then
exit 0
fi
if [ "x$(id -u)" != "x0" ] ; then
echo "Must run as root, in order to copy back the configuration files and use sudo"
exit 0
fi
echo "Create /etc/spack/no_rpm_trigger to stop spack to search for new packages after a rpm install"
# save old packages.yml, it has to be removed as when not
# the new and old packages.yaml files would have to be
# combined
Accepting request 931785 from home:mslacken:sp - updated to version 0.17.0 (Upstream feature/bug references (<ID>) are relative to https://github.com/spack/spack/issues/<ID>). * New concretizer is now default The new concretizer introduced as an experimental feature in v0.16.0 is now the default (#25502). The new concretizer is based on the clingo logic programming system, and it enables us to do much higher quality and faster dependency solving The old concretizer is still available via the concretizer: original setting, but it is deprecated and will be removed in v0.18.0. * Binary Bootstrapping To make it easier to use the new concretizer and binary packages, Spack now bootstraps clingo and GnuPG from public binaries. If it is not able to bootstrap them from binaries, it installs them from source code. With these changes, you should still be able to clone Spack and start using it almost immediately. * Reuse existing packages (experimental) The most wanted feature from our 2020 user survey and the most wanted Spack feature of all time (#25310). spack install, spack spec, and spack concretize now have a --reuse option, which causes Spack to minimize the number of rebuilds it does. The --reuse option will try to find existing installations and binary packages locally and in registered mirrors, and will prefer to use them over building new versions. This will allow users to build from source far less than in prior versions of Spack. This feature will continue to be improved, with configuration options and better CLI expected in v0.17.1. It will become the default concretization mode in v0.18.0. * Better error messages We have improved the error messages generated by the new concretizer by OBS-URL: https://build.opensuse.org/request/show/931785 OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=35
2021-11-16 15:32:55 +01:00
# prepare the path
shopt -s nullglob
addpath mypath /usr/lib64/mpi/gcc/openmpi4/bin
addpath mypath /usr/lib64/mpi/gcc/openmpi3/bin
addpath mypath /usr/lib64/mpi/gcc/openmpi2/bin
addpath mypath /usr/lib64/mpi/gcc/openmpi1/bin
addpath mypath /usr/lib64/mpi/gcc/mvapich2/bin
addpath mypath /usr/lib64/mpi/gcc/mpich/bin
addpath mypath /usr/lib/hpc/gnu*/mpi/openmpi/[2-9].*/bin
addpath mypath /usr/lib/hpc/gnu*/mpi/mpich/[3-9].*/bin
addpath mypath /usr/lib/hpc/gnu*/mpi/mvapich2/[2-9].*/bin
addpath cpath /usr/lib/hpc/compiler/gnu/*/bin
# test if we can run as nobody
getent passwd nobody &> /dev/null
if [ "x$?" == "x0" ] ; then
scope=user
fi
case $what in
packages) find_packages $scope ;;
compilers) find_compilers $scope ;;
'') find_packages $scope
find_compilers $scope ;;
*) exit 1 ;;
esac