Accepting request 882557 from home:mslacken:sp

again

OBS-URL: https://build.opensuse.org/request/show/882557
OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=17
This commit is contained in:
Christian Goll 2021-04-01 12:11:29 +00:00 committed by Git OBS Bridge
parent 4a67e53095
commit c070e3f702
2 changed files with 7 additions and 4 deletions

View File

@ -11,7 +11,7 @@ echo "Create /etc/spack/no_rpm_trigger to stop spack to search for new packages
# save old packages.yml, it has to be removed as when not
# the new and old packages.yaml files would have to be
# combined
mv /etc/spack/packages.yaml /etc/spack/packages.yaml.old
test -e /etc/spack/packages.yaml && mv /etc/spack/packages.yaml /etc/spack/packages.yaml.old
# prepare the path
mypath=/usr/lib64/mpi/gcc/openmpi4/bin
mypath=/usr/lib64/mpi/gcc/openmpi3/bin:${mypath}
@ -24,9 +24,11 @@ getent passwd nobody &> /dev/null
if [ "x$?" == "x0" ] ; then
# drop all root rights, when calling external find
sudo -u nobody PATH=${mypath}:${PATH} spack external find --scope user --exclude 'installdbgsymbols'
mv /var/lib/nobody/.spack/packages.yaml /etc/spack/packages.yaml
chown root:root /etc/spack/packages.yaml
rmdir /var/lib/nobody/.spack
if [ -e /var/lib/nobody/.spack/packages.yaml ] ; then
mv -v /var/lib/nobody/.spack/packages.yaml /etc/spack/packages.yaml
chown root:root /etc/spack/packages.yaml
rm -r /var/lib/nobody/.spack
fi
else
# May run in a container...
PATH=${mypath}:${PATH} spack external find --scope system --exclude 'installdbgsymbols'

View File

@ -69,6 +69,7 @@ Requires: gcc-fortran
Requires: gpg2
Requires: libbz2-devel
Requires: lua-lmod
Requires: patch
Requires: polkit
Requires: spack-recipes
Requires: sudo