diff --git a/spack.changes b/spack.changes index d5f6a25..2466f03 100644 --- a/spack.changes +++ b/spack.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 14 11:13:37 UTC 2021 - Christian Goll + +- fixed the configuration files /etc/skel/.spack/{config|modules}.yaml + so that spack writes to $HOME if started as user + ------------------------------------------------------------------- Mon Dec 13 08:19:33 UTC 2021 - Christian Goll diff --git a/spack.spec b/spack.spec index 53c98db..52752d4 100644 --- a/spack.spec +++ b/spack.spec @@ -291,15 +291,21 @@ cp -r bin/spack* %{buildroot}%{_bindir}/ cp etc/spack/defaults/config.yaml %{buildroot}%{_sysconfdir}/skel/.spack/ install -m 755 %{S:3} %{buildroot}/%{spack_dir}/run-find-external.sh -# Fix more paths -sed -i 's@\(\sroot:\) $spack/opt/spack@\1 ~/spack/packages@' %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml +# Make spack only to write to home dir of user, if run as user +sed -i 's@\(\sroot:\) /opt/spack@\1 ~/spack/packages@' %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml sed -i 's@\(\ssource_cache:\).*@\1 /var/tmp/$user/spack-cache@' %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml -sed -i 's@\(\stcl:\).*@\1 ~/spack/modules@' %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml -sed -i 's@\(\slmod:\).*@\1 ~/spack/lmod@' %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml cat >> %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml <> %{buildroot}%{_sysconfdir}/skel/.spack/modules.yaml < %{buildroot}%{spack_dir}/etc/spack/modules.yaml < %{buildroot}%{spack_dir}/etc/spack/modules.yaml <