Accepting request 1158547 from home:eeich:branches:network:cluster

- Add libgfortran, libfl2 and libzip5 to the Spack runtime
  container as the Spack build container has the corresponding
  devel packages but these libraries are not installed in a
  BCI-style base container by default (bsc#1221503).

OBS-URL: https://build.opensuse.org/request/show/1158547
OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=98
This commit is contained in:
Egbert Eich 2024-03-16 17:10:02 +00:00 committed by Git OBS Bridge
parent cdd5ad9a25
commit c726ba98cf
2 changed files with 18 additions and 2 deletions

View File

@ -20,6 +20,10 @@ Fri Mar 15 13:35:51 UTC 2024 - Egbert Eich <eich@suse.com>
+ `rust`: add v1.75, rework a few variants.
+ `py-transformers`: add v4.35.2.
- Fix path to setup-env.sh in the Apptainer template (bsc#1221471).
- Add libgfortran, libfl2 and libzip5 to the Spack runtime
container as the Spack build container has the corresponding
devel packages but these libraries are not installed in a
BCI-style base container by default (bsc#1221503).
-------------------------------------------------------------------
Fri Feb 2 14:41:14 UTC 2024 - Egbert Eich <eich@suse.com>

View File

@ -29,6 +29,16 @@ ExclusiveArch: do_not_build
%define spack_dir %_prefix/lib/spack/
%define spack_group spack
# These packages are missing from a BCI-style base container but may
# be used by Spack for building. To avoid unresolved libraries, make
# sure these are installed in the runtime container.
%if 0%{suse_version} == 1500
%define spack_container_packages libgfortran4 libfl2 libzip5
%else
%if 0%{suse_version} > 1600
%define spack_container_packages libgfortran5 libfl2 libzip5
%endif
%endif
# These packages are found and can be used by spack, %{_sysconfdir}/spack/packages-yaml
# needs to be updated when one of these packages is updated or uninstalled.
@ -324,8 +334,10 @@ chmod 0755 %{buildroot}%{_bindir}/%{basename:%{S:6}}
cp etc/spack/defaults/config.yaml %{buildroot}%{_sysconfdir}/skel/.spack/
install -m 755 %{S:3} %{buildroot}/%{spack_dir}/run-find-external.sh
sed -i -e 's#@@_sysconfdir@@#%{_sysconfdir}#' %{buildroot}/%{spack_dir}/run-find-external.sh
sed -i -e '/. \/opt/s#/opt/spack/#/usr/share/#' %{buildroot}/%{_datarootdir}/spack/templates/container/singularity.def
sed -i -e '/. \/opt/s#/opt/spack/#/usr/#' %{buildroot}/%{_datarootdir}/spack/templates/container/singularity.def
%{?spack_container_packages:
sed -i -e 's/\(zypper update -y\)/\1 \&\& zypper -n in -y %{spack_container_packages}/' \
%{buildroot}%{spack_dir}/spack/container/images.json}
# 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