From e49b6d7a0616b3a517f3710c3b141badb20a9c338ea7845246f880466cc4a047 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Wed, 12 Jan 2022 16:44:43 +0000 Subject: [PATCH] Accepting request 945893 from home:mslacken:sp OBS-URL: https://build.opensuse.org/request/show/945893 OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=42 --- ...-building-using-a-SLE-base-container.patch | 35 +++++++++++++++++++ ...ind-external.sh => run-find-external.sh.in | 2 +- spack.changes | 10 ++++++ spack.spec | 7 ++-- 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 Add-support-for-container-building-using-a-SLE-base-container.patch rename run-find-external.sh => run-find-external.sh.in (96%) diff --git a/Add-support-for-container-building-using-a-SLE-base-container.patch b/Add-support-for-container-building-using-a-SLE-base-container.patch new file mode 100644 index 0000000..286aede --- /dev/null +++ b/Add-support-for-container-building-using-a-SLE-base-container.patch @@ -0,0 +1,35 @@ +From: Egbert Eich +Date: Wed Jan 12 13:51:57 2022 +0100 +Subject: Add support for container building using a SLE base container +Patch-mainline: Not yet +Git-commit: 9fa0183f8bcff032d20ce3ae4f8e5e5b1e3dea9b +References: + +Signed-off-by: Egbert Eich +--- + lib/spack/spack/container/images.json | 13 +++++++++++++ + 1 file changed, 13 insertions(+) +diff --git a/lib/spack/spack/container/images.json b/lib/spack/spack/container/images.json +index b82596f2..64ac94a5 100644 +--- a/lib/spack/spack/container/images.json ++++ b/lib/spack/spack/container/images.json +@@ -41,6 +41,19 @@ + "image": "opensuse/leap:latest" + } + }, ++ "suse/sle:15": { ++ "bootstrap": { ++ "template": "container/sle15.dockerfile" ++ }, ++ "os_package_manager": "zypper", ++ "build": "spack/leap15", ++ "build_tags": { ++ "develop": "latest" ++ }, ++ "final": { ++ "image": "registry.suse.com/suse/sle15:latest" ++ } ++ }, + "nvidia/cuda:11.2.1": { + "bootstrap": { + "template": "container/cuda_11_2_1.dockerfile", diff --git a/run-find-external.sh b/run-find-external.sh.in similarity index 96% rename from run-find-external.sh rename to run-find-external.sh.in index bdbac4d..3ae44b3 100644 --- a/run-find-external.sh +++ b/run-find-external.sh.in @@ -1,5 +1,5 @@ #!/bin/bash -if [ -e %{_sysconfdir}/spack/no_rpm_trigger ] ; then +if [ -e @@_sysconfdir@@/spack/no_rpm_trigger ] ; then exit 0 fi if [ "x$(id -u)" != "x0" ] ; then diff --git a/spack.changes b/spack.changes index 6a60749..4dd562b 100644 --- a/spack.changes +++ b/spack.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Jan 12 09:50:56 UTC 2022 - Egbert Eich + +- Fix run-find-external.sh script: RPM macros are not expanded + in external scripts. + * Rename: run-find-external.sh to run-find-external.sh.in +- Fix list of recommended packages. +- Add support for container building using a SLE base container. + * Add-support-for-container-building-using-a-SLE-base-container.patch + ------------------------------------------------------------------- Mon Jan 10 12:45:19 UTC 2022 - Christian Goll diff --git a/spack.spec b/spack.spec index cf629dd..f2c6f97 100644 --- a/spack.spec +++ b/spack.spec @@ -30,7 +30,7 @@ ExclusiveArch: do_not_build # These packages are found and can be used by spack, /etc/spack/packages-yaml # needs to be updated when one of these packages is updated or uninstalled. # Distinguish between packages we recommend and packages which -%define spack_trigger_recommended autoconf bash bison bzip2 cmake-full ccache cpio diffutils findutils flex gcc gcc-c++ gcc-fortran git-lfs make m4 ncurses-devel libtool openssl perl-base pkgconf pkgconf-pkg-config python3-basetar info xz +%define spack_trigger_recommended autoconf bash bison bzip2 cmake-full ccache cpio diffutils findutils flex gcc gcc-c++ gcc-fortran git-lfs make m4 ncurses-devel libtool openssl perl-base pkgconf pkg-config python3-base tar info xz # packages recognized by spack, but not recommended %define spack_trigger_packages ghostscript go fish fzf hugo java-11-openjdk-devel java-14-openjdk-devel java-15-openjdk-devel java-16-openjdk-devel java-1_8_0-openjdk-devel ruby openmpi1-devel openmpi2-devel openmpi3-devel openmpi4-devel openmpi1-gnu-hpc-devel openmpi2-gnu-hpc-devel openmpi3-gnu-hpc-devel openmpi4-gnu-hpc-devel mvapich2-devel mpich-devel gcc7 gcc8 gcc9 gcc10 gcc11 gcc7-c++ gcc8-c++ gcc9-c++ gcc10-c++ gcc11-c++ gcc7-fortran gcc8-fortran gcc9-fortran gcc10-fortran gcc11-fortran # non oss packages @@ -44,7 +44,7 @@ URL: https://spack.io Source0: https://github.com/spack/spack/archive/v%{version}.tar.gz#/spack-%{version}.tar.gz Source1: README.SUSE Source2: spack-rpmlintrc -Source3: run-find-external.sh +Source3: run-find-external.sh.in Source4: https://en.opensuse.org/index.php?title=Spack&action=raw&ref=157522#/README-oo-wiki # Source5 is from https://docs.python.org/3/objects.inv, but has permanent changes so using a static version Source5: objects.inv @@ -55,6 +55,7 @@ Patch5: Make-spack-paths-compliant-to-distro-installation.patch Patch6: Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch Patch7: Fix-Spinx-configuration-to-avoid-throwing-errors.patch Patch8: Set-modules-default-to-lmod.patch +Patch9: Add-support-for-container-building-using-a-SLE-base-container.patch %if %{without doc} BuildRequires: fdupes BuildRequires: lua-lmod @@ -289,6 +290,7 @@ cp -r bin/sbang %{buildroot}/%{_bindir} 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 +sed -i -e 's#@@_sysconfdir@@#%{_sysconfdir}#' %{buildroot}/%{spack_dir}/run-find-external.sh # 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 @@ -411,6 +413,7 @@ install -D -m 644 system-group-%{name}.conf %{buildroot}%{_sysusersdir}/system-g %fdupes %{buildroot}%{spack_dir} %fdupes %{buildroot}%{_datarootdir}/spack %fdupes %{buildroot}%{_localstatedir}/lib/spack +%{?_distconfdir:%fdupes %{buildroot}/%{_distconfdir}/spack} %else mkdir -p %{buildroot}%{_infodir} mkdir -p %{buildroot}%{_mandir}/man1