From 56ffc9a15e98385c1dfcf231d1c0e3bc7728edc90e0bccb61a3ed86d5d523edf Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Fri, 3 Jan 2025 18:43:58 +0000 Subject: [PATCH] - Update to version v0.23.0. This is a major release. * Features in this Release + Spec splicing To make binary installation more seamless in Spack, `v0.23` introduces "splicing", which allows users to deploy binaries using local, optimized versions of a binary interface, even if they were not built with that interface. For example, this would allow you to build binaries in the cloud using `mpich` and install them on a system using a local, optimized version of `mvapich2` *without rebuilding*. Spack preserves full provenance for the installed packages and knows that they were built one way but deployed another. The intent is to leverage this across many key HPC binary packages, e.g. MPI, CUDA, ROCm, and libfabric. Fundamentally, splicing allows Spack to redeploy an existing spec with different dependencies than how it was built. There are two interfaces to splicing. a. Explicit Splicing In the concretizer config, you can specify a target spec and a replacement by hash. ```yaml concretizer: splice: explicit: - target: mpi replacement: mpich/abcdef ``` Here, every installation that would normally use the target spec will instead use its replacement. Above, any spec using *any* `mpi` will be spliced to depend on the specific `mpich` OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=111 --- .gitattributes | 25 + .gitignore | 1 + ...the-environment-for-different-shells.patch | 156 ++ ...-building-using-a-SLE-base-container.patch | 37 + ...nfiguration-to-avoid-throwing-errors.patch | 35 + ...ld-due-to-recursive-module-inclusion.patch | 27 + ...ths-compliant-to-distro-installation.patch | 48 + ...ite-config-scope-before-system-scope.patch | 46 + README-oo-wiki | 116 ++ README.SUSE | 21 + Set-modules-default-to-lmod.patch | 28 + _constraints | 11 + _multibuild | 3 + ...-os-calls-to-output-of-spack-spec-co.patch | 69 + objects.inv | 3 + run-find-external.sh.in | 96 ++ spack-0.22.0.tar.gz | 3 + spack-0.22.1.tar.gz | 3 + spack-0.22.2.tar.gz | 3 + spack-0.23.0.tar.gz | 3 + spack-rpmlintrc | 27 + spack.changes | 1362 +++++++++++++++++ spack.spec | 544 +++++++ spack_get_libs.sh | 126 ++ 24 files changed, 2793 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Adapt-shell-scripts-that-set-up-the-environment-for-different-shells.patch create mode 100644 Add-support-for-container-building-using-a-SLE-base-container.patch create mode 100644 Fix-Spinx-configuration-to-avoid-throwing-errors.patch create mode 100644 Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch create mode 100644 Make-spack-paths-compliant-to-distro-installation.patch create mode 100644 Move-site-config-scope-before-system-scope.patch create mode 100644 README-oo-wiki create mode 100644 README.SUSE create mode 100644 Set-modules-default-to-lmod.patch create mode 100644 _constraints create mode 100644 _multibuild create mode 100644 added-target-and-os-calls-to-output-of-spack-spec-co.patch create mode 100644 objects.inv create mode 100644 run-find-external.sh.in create mode 100644 spack-0.22.0.tar.gz create mode 100644 spack-0.22.1.tar.gz create mode 100644 spack-0.22.2.tar.gz create mode 100644 spack-0.23.0.tar.gz create mode 100644 spack-rpmlintrc create mode 100644 spack.changes create mode 100644 spack.spec create mode 100644 spack_get_libs.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..adf869f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,25 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +## Specific LFS patterns +objects.inv filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Adapt-shell-scripts-that-set-up-the-environment-for-different-shells.patch b/Adapt-shell-scripts-that-set-up-the-environment-for-different-shells.patch new file mode 100644 index 0000000..9d18106 --- /dev/null +++ b/Adapt-shell-scripts-that-set-up-the-environment-for-different-shells.patch @@ -0,0 +1,156 @@ +From 360dd5abda2e7f14c87ace831ff4c9756c9d0444 Mon Sep 17 00:00:00 2001 +From: Egbert Eich +Date: Wed, 10 Nov 2021 13:01:17 +0100 +Subject: [PATCH] Adapt shell scripts that set up the environment for different + shells + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + share/spack/setup-env.csh | 5 +++- + share/spack/setup-env.fish | 15 +--------- + share/spack/setup-env.sh | 61 ++------------------------------------ + 3 files changed, 7 insertions(+), 74 deletions(-) + +diff --git a/share/spack/setup-env.csh b/share/spack/setup-env.csh +index ad20d346d1..91c48ecae9 100755 +--- a/share/spack/setup-env.csh ++++ b/share/spack/setup-env.csh +@@ -12,6 +12,10 @@ + # + + # prevent infinite recursion when spack shells out (e.g., on cray for modules) ++if ($?SPACK_ROOT == 0) then ++ setenv SPACK_ROOT = @@_prefix@@ ++endif ++ + if ($?_sp_initializing) then + exit 0 + endif +@@ -71,7 +75,6 @@ foreach cmd ("$SPACK_PYTHON" python3 python python2) + end + + # Set variables needed by this script +-_spack_pathadd PATH "$SPACK_ROOT/bin" + eval `spack --print-shell-vars csh` + + # Set up module search paths in the user environment +diff --git a/share/spack/setup-env.fish b/share/spack/setup-env.fish +index e00d8e76bb..961ec39015 100755 +--- a/share/spack/setup-env.fish ++++ b/share/spack/setup-env.fish +@@ -671,12 +671,6 @@ end + + + +-# +-# Figure out where this file is. Below code only needs to work in fish +-# +-set -l sp_source_file (status -f) # name of current file +- +- + + # + # Identify and lock the python interpreter +@@ -691,14 +685,7 @@ end + + + +-# +-# Find root directory and add bin to path. +-# +-set -l sp_share_dir (realpath (dirname $sp_source_file)) +-set -l sp_prefix (realpath (dirname (dirname $sp_share_dir))) +-spack_pathadd PATH "$sp_prefix/bin" +-set -xg SPACK_ROOT $sp_prefix +- ++set -xg SPACK_ROOT @@_prefix@@ + + + # +diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh +index d3a97d9af6..45195fb36f 100755 +--- a/share/spack/setup-env.sh ++++ b/share/spack/setup-env.sh +@@ -249,64 +249,6 @@ _sp_shell=$(_spack_determine_shell) + + alias spacktivate="spack env activate" + +-# +-# Figure out where this file is. +-# +-if [ "$_sp_shell" = bash ]; then +- _sp_source_file="${BASH_SOURCE[0]:-}" +-elif [ "$_sp_shell" = zsh ]; then +- _sp_source_file="${(%):-%N}" +-else +- # Try to read the /proc filesystem (works on linux without lsof) +- # In dash, the sourced file is the last one opened (and it's kept open) +- _sp_source_file_fd="$(\ls /proc/$$/fd 2>/dev/null | sort -n | tail -1)" +- if ! _sp_source_file="$(readlink /proc/$$/fd/$_sp_source_file_fd)"; then +- # Last resort: try lsof. This works in dash on macos -- same reason. +- # macos has lsof installed by default; some linux containers don't. +- _sp_lsof_output="$(lsof -p $$ -Fn0 | tail -1)" +- _sp_source_file="${_sp_lsof_output#*n}" +- fi +- +- # If we can't find this script's path after all that, bail out with +- # plain old $0, which WILL NOT work if this is sourced indirectly. +- if [ ! -f "$_sp_source_file" ]; then +- _sp_source_file="$0" +- fi +-fi +- +-# +-# Find root directory and add bin to path. +-# +-# We send cd output to /dev/null to avoid because a lot of users set up +-# their shell so that cd prints things out to the tty. +-if [ "$_sp_shell" = zsh ]; then +- _sp_share_dir="${_sp_source_file:A:h}" +- _sp_prefix="${_sp_share_dir:h:h}" +-else +- _sp_share_dir="$(cd "$(dirname $_sp_source_file)" > /dev/null && pwd)" +- _sp_prefix="$(cd "$(dirname $(dirname $_sp_share_dir))" > /dev/null && pwd)" +-fi +-if [ -x "$_sp_prefix/bin/spack" ]; then +- export SPACK_ROOT="${_sp_prefix}" +-else +- # If the shell couldn't find the sourced script, fall back to +- # whatever the user set SPACK_ROOT to. +- if [ -n "$SPACK_ROOT" ]; then +- _sp_prefix="$SPACK_ROOT" +- _sp_share_dir="$_sp_prefix/share/spack" +- fi +- +- # If SPACK_ROOT didn't work, fail. We should need this rarely, as +- # the tricks above for finding the sourced file are pretty robust. +- if [ ! -x "$_sp_prefix/bin/spack" ]; then +- echo "==> Error: SPACK_ROOT must point to spack's prefix when using $_sp_shell" +- echo "Run this with the correct prefix before sourcing setup-env.sh:" +- echo " export SPACK_ROOT=" +- return 1 +- fi +-fi +-_spack_pathadd PATH "${_sp_prefix%/}/bin" +- + # + # Check whether a function of the given name is defined + # +@@ -387,11 +329,12 @@ if [ -z "${SPACK_SKIP_MODULES+x}" ]; then + } + _sp_multi_pathadd MODULEPATH "$_sp_tcl_roots" + fi ++export SPACK_ROOT=@@_prefix@@ + + # Add programmable tab completion for Bash + # + if test "$_sp_shell" = bash || test -n "${ZSH_VERSION:-}"; then +- source $_sp_share_dir/spack-completion.bash ++ source $SPACK_ROOT/share/spack/spack-completion.bash + fi + + # done: unset sentinel variable as we're no longer initializing +-- +2.40.1 + 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..50d7088 --- /dev/null +++ b/Add-support-for-container-building-using-a-SLE-base-container.patch @@ -0,0 +1,37 @@ +From 6bb3cfbfe614556b3a24fb832bf672b5b2352f3b Mon Sep 17 00:00:00 2001 +From: Egbert Eich +Date: Wed, 12 Jan 2022 13:51:57 +0100 +Subject: [PATCH] Add support for container building using a SLE base container + +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 296658fe5e..a8be14610c 100644 +--- a/lib/spack/spack/container/images.json ++++ b/lib/spack/spack/container/images.json +@@ -133,6 +133,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", +-- +2.40.1 + diff --git a/Fix-Spinx-configuration-to-avoid-throwing-errors.patch b/Fix-Spinx-configuration-to-avoid-throwing-errors.patch new file mode 100644 index 0000000..93ad171 --- /dev/null +++ b/Fix-Spinx-configuration-to-avoid-throwing-errors.patch @@ -0,0 +1,35 @@ +From 223f11bab87c9f5915ef7146b26d0935c7ff18e3 Mon Sep 17 00:00:00 2001 +From: Egbert Eich +Date: Wed, 10 Nov 2021 16:30:14 +0100 +Subject: [PATCH] Fix Spinx configuration to avoid throwing errors + +- Ignore certain variables +- Don't attempt downloading ntersphinx inventory + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + lib/spack/docs/conf.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py +index 8ba6717147..521511db2f 100644 +--- a/lib/spack/docs/conf.py ++++ b/lib/spack/docs/conf.py +@@ -133,7 +133,6 @@ def setup(sphinx): + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx.ext.viewcode", +- "sphinx_design", + "sphinxcontrib.programoutput", + ] + +@@ -418,4 +417,4 @@ class SpackStyle(DefaultStyle): + # -- Extension configuration ------------------------------------------------- + + # sphinx.ext.intersphinx +-intersphinx_mapping = {"python": ("https://docs.python.org/3", None)} ++intersphinx_mapping = {"python": ("https://docs.python.org/3", "objects.inv")} +-- +2.40.1 + diff --git a/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch b/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch new file mode 100644 index 0000000..155c927 --- /dev/null +++ b/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch @@ -0,0 +1,27 @@ +From c24349cb54442da8e49fd40a299453e56b404a90 Mon Sep 17 00:00:00 2001 +From: Egbert Eich +Date: Thu, 7 Apr 2022 20:25:46 +0200 +Subject: [PATCH] Fix error during documentation build due to recursive module + inclusion + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + lib/spack/spack/environment/environment.py | 4 ++++ + 1 file changed, 4 insertions(+) + +Index: spack-0.20.3/lib/spack/spack/environment/environment.py +=================================================================== +--- spack-0.20.3.orig/lib/spack/spack/environment/environment.py ++++ spack-0.20.3/lib/spack/spack/environment/environment.py +@@ -40,6 +40,10 @@ import spack.stage + import spack.store + import spack.subprocess_context + import spack.user_environment as uenv ++try: ++ import spack.user_environment as uenv ++except AttributeError: ++ pass + import spack.util.cpus + import spack.util.environment + import spack.util.hash diff --git a/Make-spack-paths-compliant-to-distro-installation.patch b/Make-spack-paths-compliant-to-distro-installation.patch new file mode 100644 index 0000000..0863c0e --- /dev/null +++ b/Make-spack-paths-compliant-to-distro-installation.patch @@ -0,0 +1,48 @@ +From a91079b55fa90142d9de03ffe219812a26937959 Mon Sep 17 00:00:00 2001 +From: Egbert Eich +Date: Wed, 11 Jan 2023 14:30:19 +0100 +Subject: [PATCH] Make spack paths compliant to distro installation + +Spack is particular about the choice of 'prefix' which will +replace $spack. 'prefix' is the 4th ancestor of paths.py, so +it is relative to the spack installation. +This will only change the coded setups of +var_path -> /var/lib/spack +opt_path -> /opt/spack +repo_path -> /usr/share/spack/repos + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + lib/spack/spack/paths.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/spack/spack/paths.py b/lib/spack/spack/paths.py +index 18656b76c2..f0e9cb587c 100644 +--- a/lib/spack/spack/paths.py ++++ b/lib/spack/spack/paths.py +@@ -41,7 +41,7 @@ + operating_system_path = os.path.join(module_path, "operating_systems") + test_path = os.path.join(module_path, "test") + hooks_path = os.path.join(module_path, "hooks") +-opt_path = os.path.join(prefix, "opt") ++opt_path = os.path.join("/", "opt") + share_path = os.path.join(prefix, "share", "spack") + etc_path = os.path.join(prefix, "etc", "spack") + +@@ -53,10 +53,10 @@ + # + # Things in $spack/var/spack + # +-var_path = os.path.join(prefix, "var", "spack") ++var_path = os.path.join("/", "var", "lib", "spack") + + # read-only things in $spack/var/spack +-repos_path = os.path.join(var_path, "repos") ++repos_path = os.path.join(share_path, "repos") + packages_path = os.path.join(repos_path, "builtin") + mock_packages_path = os.path.join(repos_path, "builtin.mock") + +-- +2.40.1 + diff --git a/Move-site-config-scope-before-system-scope.patch b/Move-site-config-scope-before-system-scope.patch new file mode 100644 index 0000000..b7b0148 --- /dev/null +++ b/Move-site-config-scope-before-system-scope.patch @@ -0,0 +1,46 @@ +From: Egbert Eich +Date: Thu May 16 18:34:42 2024 +0200 +Subject: Move 'site' config scope before 'system' scope +Patch-mainline: Not yet +Git-commit: 55febdb317328ac0e60cb486eac27fe1371cf120 +References: + +For spack, the 'site' scope if meant for the Spack installation +which a system may have multiple of. Therefore, it lives in +the Spack installation it is meant for. It should override the +'system-wide' settings from the 'system' scope which is usually +located in /etc/spack. +Our Spack package is meant to be system wide, the site scope +will therefore host vendor provided or generated configs which +a local admin should therefore be able to override. +It must therefore have a lower priority that the system scope. + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + lib/spack/spack/config.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) +diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py +index 2a2f180f..3eac8542 100644 +--- a/lib/spack/spack/config.py ++++ b/lib/spack/spack/config.py +@@ -832,15 +832,15 @@ def create() -> Configuration: + + disable_local_config = "SPACK_DISABLE_LOCAL_CONFIG" in os.environ + ++ # Site configuration is per spack instance, for sites or projects ++ # No site-level configs should be checked into spack by default. ++ configuration_paths.append(("site", os.path.join(spack.paths.etc_path))) ++ + # System configuration is per machine. + # This is disabled if user asks for no local configuration. + if not disable_local_config: + configuration_paths.append(("system", spack.paths.system_config_path)) + +- # Site configuration is per spack instance, for sites or projects +- # No site-level configs should be checked into spack by default. +- configuration_paths.append(("site", os.path.join(spack.paths.etc_path))) +- + # Python package's can register configuration scopes via entry_points + configuration_paths.extend(config_paths_from_entry_points()) + diff --git a/README-oo-wiki b/README-oo-wiki new file mode 100644 index 0000000..73dd9f4 --- /dev/null +++ b/README-oo-wiki @@ -0,0 +1,116 @@ +spack ([https://github.com/spack/spack https://github.com/spack/spack]) is a tool to compile HPC software and its dependencies. +The compiled software is available as environment [[modules]], so that several versions an application can coexist. +Most relevant CPU architectures are detected and the compiled software is automatically optimized to it. + +For openSUSE Leap, Tumbelweed and SLES a [https://build.opensuse.org/package/show/network:cluster/spack system package] is available which has the advantage that it installs all necessary dependencies and makes core tools available for ''spack''. Other system packages which are also relevant for ''spack'' will also be added to the ''spack'' configuration after installation. + +Additionally ''spack'' behaves differently when called as ''root'' as when its called as normal user. All the packages which are build as ''root'' user are available for all users of the system, whereas the packages build as normal user, are only available for this user. + +== Quick Start == +''spack'' can be installed with + + sudo zypper install spack + +In order to load all relevant environment variables one should relogin and source the ''spack'' environment with + + source /usr/share/spack/setup-env.sh + +The installation can be checked with the command + + spack spec netcdf-c + +which shows all the packages which will be installed in order to compile ''netccdf-c'' from its sources. The circumeflex '^' in the output indicates the dependency on a specific package and can be changed on the command line. For example + + spack spec netcdf-c^mpich + +will display all the packages which are needed to build ''netcdf-c'' not with ''openmpi'' which is the default, but with ''mpich''. + +The installation of the package can now be done with + + spack install netcdf-c^mpich + +which builds and installs the package with all its needed dependencies. +The resulting package can be used/loaded with the command + + spack load netcdf-c@4.7.4 + +or by using environment modules with + + module load netcdf-c-4.7.4-gcc-11.1.1-tlfohef + +where the exact name of the module can be displayed with + + module av + +== SUSE package == +There are a few differences between the SUSE package and the standard installation. +# When a user can write to ''/usr/lib/spack'', the packages and generated modules are stored under that location. This holds true if the user is ''root'' or in the ''spack'' group. The generated modules are installed under ''/usr/share/spack/modules/linux--'' +# external packages, like ''M4'' or ''autoconf'' are detected at installtion time of ''spack'', but also when a relevant package is installed, like a new ''gcc'' version +== Package search and information== +The installed packages installed with ''spack'' can be displayed with + + spack find + +and '''all''' available packages with the command + + spack list [regexp] + +Detailed information about a package can be obtained with the command + + spack info + +which will print all versions and options for building the package. + +== Package building == + +Package compilation and installation is done with the 'install' command. But its advisable to list all the dependency of package with command 'spec' beforehand. So the command + + spack install/spec + +will install/list all the packages needed for . +The package version can be set with '@' + + spack install/spec @ + +and the compile can be set with '%' + + spack install/spec @%gcc@7.5.0 + +will build the package with 'gcc7'. +Binary build and install options for a package are enabled with '+' and disabled with '~'. +The build dependencies are set with '^'. + +=== Examples === + hdf5 hdf5 configuration, when used as depdency + hdf5 @1.10.1 hdf5 version 1.10.1 + hdf5 @1.8: hdf5 1.8 or higher + hdf5 @1.8: %gcc hdf5 1.8 or higher built with gcc + hdf5 +mpi hdf5 with mpi enabled + hdf5 ~mpi hdf5 with mpi disabled + hdf5 +mpi ^mpich hdf5 with mpi, using mpich + hdf5 +mpi ^openmpi@1.7 hdf5 with mpi, using openmpi 1.7 + boxlib dim=2 boxlib built for 2 dimensions + libdwarf %intel ^libelf%gcc + libdwarf, built with intel compiler, linked to libelf built with gcc + mvapich2 %gcc fabrics=psm,mrail,sock + mvapich2, built with gcc compiler, with support for multiple fabrics, default version + +== Compiler == + +Compilers are not treated as normal dependency, so that one must enforce the use a specific compiler with '%' and not with '^' like a normal dependency. +The compilers which can be use by 'spack' can be listed with + + spack compiler list + +When a new compiler is installed or compiled with spack it has to be made known to ''spack'' with the command + + spack compiler find + +Please not that the compiler must be within ''$PATH'', so when the compiler was build with ''spack'', the module has to be loaded before the ''find'' command + +== External programms == +External programs like ''autoconf'', ''cmake'' can be found by ''spack'' with the command + + spack external find + +The external find is executed by ''rpm'' when ''spack'' is installed or a new relevant package is installed. \ No newline at end of file diff --git a/README.SUSE b/README.SUSE new file mode 100644 index 0000000..989f403 --- /dev/null +++ b/README.SUSE @@ -0,0 +1,21 @@ +openSUSE/SUSE specific Settings ============================================= + +The packages build by a regular user are stored in the home directory and so +only available for this user. When the packages should be available for all +users on a system, the user who builds the packages, must be able to write to +the global spack user directories under /usr/lib/spack/ Packages stored under +this path are available for all user via lmod. + +To add a user to the group spack so that he can write to the global spack +directory, execute (as root): + + # usermod -a -G spack + +and change the setting for 'install_tree:' to the global spack directory in the +configuration '~/.spack/config.yaml' for this user. + + +NOTE: + +As the recipes are contributed by the spack community and rely also on external +packages, a signification part of the recipes may fail to create packages. diff --git a/Set-modules-default-to-lmod.patch b/Set-modules-default-to-lmod.patch new file mode 100644 index 0000000..c41d42f --- /dev/null +++ b/Set-modules-default-to-lmod.patch @@ -0,0 +1,28 @@ +From 1e351fa2c0f93ad119d4e5c61ea4307b9522c22e Mon Sep 17 00:00:00 2001 +From: Egbert Eich +Date: Wed, 10 Nov 2021 20:28:29 +0100 +Subject: [PATCH] Set modules default to lmod + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + etc/spack/defaults/modules.yaml | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/etc/spack/defaults/modules.yaml b/etc/spack/defaults/modules.yaml +index 75ec366117..16212b4e9b 100644 +--- a/etc/spack/defaults/modules.yaml ++++ b/etc/spack/defaults/modules.yaml +@@ -41,7 +41,8 @@ modules: + tcl: $spack/share/spack/modules + lmod: $spack/share/spack/lmod + # What type of modules to use ("tcl" and/or "lmod") +- enable: [] ++ enable: ++ - lmod + + tcl: + all: +-- +2.40.1 + diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..697e508 --- /dev/null +++ b/_constraints @@ -0,0 +1,11 @@ + + + + + 8 + + + 8 + + + diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..58ef5ee --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + doc + diff --git a/added-target-and-os-calls-to-output-of-spack-spec-co.patch b/added-target-and-os-calls-to-output-of-spack-spec-co.patch new file mode 100644 index 0000000..16005e4 --- /dev/null +++ b/added-target-and-os-calls-to-output-of-spack-spec-co.patch @@ -0,0 +1,69 @@ +From 1221c1f6b68cbba3a14592a686aec742b5fd02d2 Mon Sep 17 00:00:00 2001 +From: Christian Goll +Date: Fri, 11 Dec 2020 15:37:48 +0100 +Subject: [PATCH] added target and os calls to output of spack spec commands + +--- + lib/spack/docs/developer_guide.rst | 2 +- + lib/spack/docs/getting_started.rst | 2 +- + lib/spack/docs/packaging_guide.rst | 6 +++--- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/lib/spack/docs/developer_guide.rst b/lib/spack/docs/developer_guide.rst +index 4dc8d1249d..42b67425ab 100644 +--- a/lib/spack/docs/developer_guide.rst ++++ b/lib/spack/docs/developer_guide.rst +@@ -758,7 +758,7 @@ supply ``--profile`` to Spack on the command line, before any subcommands. + + ``spack --profile`` output looks like this: + +-.. command-output:: spack --profile graph hdf5 ++.. command-output:: spack --profile graph hdf5 os=SUSE target=x86_64 + :ellipsis: 25 + + The bottom of the output shows the top most time consuming functions, +diff --git a/lib/spack/docs/getting_started.rst b/lib/spack/docs/getting_started.rst +index 3c077490a2..0a0a0d0913 100644 +--- a/lib/spack/docs/getting_started.rst ++++ b/lib/spack/docs/getting_started.rst +@@ -204,7 +204,7 @@ Check Installation + With Spack installed, you should be able to run some basic Spack + commands. For example: + +-.. command-output:: spack spec netcdf-c ++.. command-output:: spack spec netcdf-c target=x86_64 os=SUSE + + In theory, Spack doesn't need any additional installation; just + download and run! But in real life, additional steps are usually +diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst +index 586fdcec6e..1a7e23c426 100644 +--- a/lib/spack/docs/packaging_guide.rst ++++ b/lib/spack/docs/packaging_guide.rst +@@ -6382,13 +6382,13 @@ Spack provides the ``spack graph`` command for graphing dependencies. + The command by default generates an ASCII rendering of a spec's + dependency graph. For example: + +-.. command-output:: spack graph hdf5 ++.. command-output:: spack graph hdf5 target=x86_64 os=SUSE + + At the top is the root package in the DAG, with dependency edges emerging + from it. On a color terminal, the edges are colored by which dependency + they lead to. + +-.. command-output:: spack graph --deptype=link hdf5 ++.. command-output:: spack graph --deptype=link hdf5 target=x86_64 os=SUSE + + The ``deptype`` argument tells Spack what types of dependencies to graph. + By default it includes link and run dependencies but not build +@@ -6403,7 +6403,7 @@ dependencies. The default is ``--deptype=all``, which is equivalent to + You can also use ``spack graph`` to generate graphs in the widely used + `Dot `_ format. For example: + +-.. command-output:: spack graph --dot hdf5 ++.. command-output:: spack graph --dot hdf5 target=x86_64 os=SUSE + + This graph can be provided as input to other graphing tools, such as + those in `Graphviz `_. If you have graphviz +-- +2.40.1 + diff --git a/objects.inv b/objects.inv new file mode 100644 index 0000000..a33378e --- /dev/null +++ b/objects.inv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b998c03bef7cf55e5250558c76a6c4b4f9d8d1d861ac3e46b34057c4bbda28f +size 112726 diff --git a/run-find-external.sh.in b/run-find-external.sh.in new file mode 100644 index 0000000..dfb570a --- /dev/null +++ b/run-find-external.sh.in @@ -0,0 +1,96 @@ +#!/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 + # 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 + 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 + 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 + 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 + 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 + + +# 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 diff --git a/spack-0.22.0.tar.gz b/spack-0.22.0.tar.gz new file mode 100644 index 0000000..755d6c3 --- /dev/null +++ b/spack-0.22.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81d0d25ba022d5a8b2f4852cefced92743fe0cae8c18a54e82bd0ec67ee96cac +size 11101704 diff --git a/spack-0.22.1.tar.gz b/spack-0.22.1.tar.gz new file mode 100644 index 0000000..8a1be1a --- /dev/null +++ b/spack-0.22.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:374968461ea95fcf22f230aa818cf99cd79af4cd3d28fb0927d5444525b143b3 +size 11108002 diff --git a/spack-0.22.2.tar.gz b/spack-0.22.2.tar.gz new file mode 100644 index 0000000..fccf4da --- /dev/null +++ b/spack-0.22.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aef1a5ce16fe1a8bcced54c40012b19a0f4ade1cd9c5379aca081e96ec5b18ac +size 11117111 diff --git a/spack-0.23.0.tar.gz b/spack-0.23.0.tar.gz new file mode 100644 index 0000000..5282426 --- /dev/null +++ b/spack-0.23.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddb8220c46743e45c9484622370a1e17e193acba6a43230868c2dbc717e88b56 +size 11847230 diff --git a/spack-rpmlintrc b/spack-rpmlintrc new file mode 100644 index 0000000..43477d9 --- /dev/null +++ b/spack-rpmlintrc @@ -0,0 +1,27 @@ +# Fully intentional +addFilter("hidden-file-or-dir /etc/skel/.spack") +# These files are patches and not to be run directly +addFilter("script-without-shebang") +# These files are installed as part of the spack recipes +# and shouldn't be in a devel package +addFilter("devel-file-in-non-devel-package*") +# The spack group needs to be added to the list of known groups +addFilter("non-standard-group Unspecified") +addFilter("non-standard-gid .* spack") +# Spurious self-applying patches from an upstream source. +# These are part of recipes and not intended to run as scripts. +addFilter("non-executable-script /var/lib/spack/repos.*") +# Spack is used for building other software, so when it finds e.g +# the bzip binary it assumes that the devel libraries are also installed. +# So ignore the warnings: +addFilter("devel-dependency libbz2-devel") +addFilter("explicit-lib-dependency libbz2-devel") +# Non executible scripts are expected in recipes. These will be installed +# with the final software that Spack builds. +addFilter("spack-recipes.noarch: .* non-executable-script") +# 3rd party modules - not used stand-alone +addFilter(".* non-executable-script /usr/lib/spack/external/_vendoring") +addFilter(".* non-executable-script /usr/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py") +# We need to test doc builds for SLE in OBS which depend in spack being built: +# for this, we need to defeat the 'backport policy'. +addFilter(".* E: SUSE_Backports_policy-SLE_conflict .*") diff --git a/spack.changes b/spack.changes new file mode 100644 index 0000000..15d7b6c --- /dev/null +++ b/spack.changes @@ -0,0 +1,1362 @@ +------------------------------------------------------------------- +Fri Jan 3 13:40:08 UTC 2025 - Egbert Eich + +- Update to version v0.23.0. This is a major release. + * Features in this Release + + Spec splicing + To make binary installation more seamless in Spack, `v0.23` + introduces "splicing", which allows users to deploy binaries + using local, optimized versions of a binary interface, even + if they were not built with that interface. For example, this + would allow you to build binaries in the cloud using `mpich` + and install them on a system using a local, optimized version + of `mvapich2` *without rebuilding*. Spack preserves full + provenance for the installed packages and knows that they + were built one way but deployed another. + The intent is to leverage this across many key HPC binary + packages, e.g. MPI, CUDA, ROCm, and libfabric. + Fundamentally, splicing allows Spack to redeploy an existing + spec with different dependencies than how it was built. There + are two interfaces to splicing. + a. Explicit Splicing + In the concretizer config, you can specify a target spec + and a replacement by hash. + ```yaml + concretizer: + splice: + explicit: + - target: mpi + replacement: mpich/abcdef + ``` + Here, every installation that would normally use the target + spec will instead use its replacement. Above, any spec using + *any* `mpi` will be spliced to depend on the specific `mpich` + installation requested. This *can* go wrong if you try to + replace something built with, e.g., `openmpi` with `mpich`, + and it is on the user to ensure ABI compatibility between + target and replacement specs. This currently requires some + expertise to use, but it will allow users to reuse the + binaries they create across more machines and environments. + b. Automatic Splicing (experimental) + In the concretizer config, enable automatic splicing: + ```yaml + concretizer: + splice: + automatic: true + ``` + or run: + ```console + spack config add concretizer:splice:automatic:true + ``` + The concretizer will select splices for ABI compatibility + to maximize package reuse. Packages can denote ABI + compatibility using the `can_splice` directive. No packages + in Spack yet use this directive, so if you want to use this + feature you will need to add `can_splice` annotations to + your packages. We are working on ways to add more ABI + compatibility information to the Spack package repository, + and this directive may change in the future. + Further documentation: + * https://spack.readthedocs.io/en/latest/build_settings.html#splicing + * https://spack.readthedocs.io/en/latest/packaging_guide.html#specifying-abi-compatibility + + Broader variant propagation + You can specify propagated variants like + `hdf5 build_type==RelWithDebInfo` or `trilinos ++openmp` to + propagate a variant to all dependencies for which it is + relevant. This is valid *even* if the variant does not exist + on the package or its dependencies. + See https://spack.readthedocs.io/en/latest/basic_usage.html#variants. + + Query specs by namespace + Allow a package's namespace (indicating the repository it came + from) to be treated like a variant. You can request packages + from particular repos like this: + ```console + spack find zlib namespace=builtin + spack find zlib namespace=myrepo + ``` + Previously, the spec syntax only allowed namespaces to be prefixes of spec + names, e.g. `builtin.zlib`. The previous syntax still works. + + `spack spec` respects environment settings and `unify:true` + `spack spec` did not previously respect environment lockfiles + or unification settings, which made it difficult to see + exactly how a spec would concretize within an environment. + Now it does, so the output you get with `spack spec` will + be *the same* as what your environment will concretize to + when you run `spack concretize`. Similarly, if you provide + multiple specs on the command line with `spack spec`, it will + concretize them together if `unify:true` is set. + + Less noisy `spack spec` output + `spack spec` previously showed output like this: + ```console + > spack spec /v5fn6xo + Input spec + -------------------------------- + - /v5fn6xo + + Concretized + -------------------------------- + [+] openssl@3.3.1%apple-clang@16.0.0~docs+shared arch=darwin-sequoia-m1 + ... + ``` + But the input spec is redundant, and we know we run + `spack spec` to concretize the input spec. `spack spec` now + *only* shows the concretized spec. See #47574. + + Better output for `spack find -c` + In an environment, `spack find -c` lets you search the + concretized, but not yet installed, specs, just as you would + the installed ones. As with `spack spec`, this should make + it easier for you to see what *will* be built before building + and installing it. + + `spack -C `: use an environment's configuration without activation + Spack environments allow you to associate: + 1. a set of (possibly concretized) specs, and + 2. configuration + When you activate an environment, you're using both of these. + Previously, we supported: + * `spack -e ` to run spack in the context of a specific + environment, and + * `spack -C ` to run spack using a directory with + configuration files. + You can now also pass an environment to `spack -C` to use + *only* the environment's configuration, but not the specs or + lockfile. + * New commands, options, and directives + + The new `spack env track` command (#41897) takes a non-managed + Spack environment and adds a symlink to Spack's + `$environments_root` directory, so that it will be included + for reference counting for commands like `spack uninstall` + and `spack gc`. If you use free-standing directory environments, + this is useful for preventing Spack from removing things + required by your environments. You can undo this tracking + with the `spack env untrack` command. + + Add `-t` short option for `spack --backtrace` + `spack -d / --debug` enables backtraces on error, but it + can be very verbose, and sometimes you just want the + backtrace. `spack -t / --backtrace` provides that option. + + `gc`: restrict to specific specs (#46790) + If you only want to garbage-collect specific packages, you can + now provide them on the command line. This gives users finer-grained + control over what is uninstalled. + + oci buildcaches now support `--only=package`. You can now push + *just* a package and not its dependencies to an OCI registry. + This allows dependents of non-redistributable specs to be + stored in OCI registries without an error. + * Notable refactors + * Highlighted bugfixes + + Externals no longer override the preferred provider. + External definitions could interfere with package preferences. + Now, if `openmpi` is the preferred `mpi`, and an external + `mpich` is defined, a new `openmpi` *will* be built if + building it is possible. Previously we would prefer `mpich` + despite the preference. + + Composable `cflags`. + This release fixes a longstanding bug that concretization + would fail if there were different `cflags` specified in + `packages.yaml`, `compilers.yaml`, or on `the` CLI. Flags + and their ordering are now tracked in the concretizer and + flags from multiple sources will be merged. + + Fix concretizer Unification for included environments. + * Deprecations, removals, and syntax changes + + The old concretizer has been removed from Spack, along with + the `config:concretizer` config option. Spack will emit a + warning if the option is present in user configuration, + since it now has no effect. Spack now uses a simpler + bootstrapping mechanism, where a JSON prototype is tweaked + slightly to get an initial concrete spec to download. + + Best-effort expansion of spec matrices has been removed. + This feature did not work with the "new" ASP-based concretizer, + and did not work with `unify: True` or `unify: when_possible`. + Use the + [exclude key](https://spack.readthedocs.io/en/latest/environments.html#spec-matrices) + for the environment to exclude invalid components, or use + multiple spec matrices to combine the list of specs for + which the constraint is valid and the list of specs for + which it is not. + + The old Cray `platform` (based on Cray PE modules) has been + removed, and `platform=cray` is no longer supported. Since + `v0.19`, Spack has handled Cray machines like Linux clusters + with extra packages, and we have encouraged using this option + to support Cray. The new approach allows us to correctly handle + Cray machines with non-SLES operating systems, and it is much + more reliable than making assumptions about Cray modules. See + the `v0.19` release notes and #43796 for more details. + + The `config:install_missing_compilers` config option has been + deprecated, and it is a no-op when set in `v0.23`. Our new + compiler dependency model will replace it with a much more + reliable and robust mechanism in `v1.0`. + + Config options that deprecated in `v0.21` have been removed + in `v0.23`. You can now only specify preferences for + `compilers`, `targets`, and `providers` globally via the + `packages:all:` section. Similarly, you can only specify + `versions:` locally for a specific package. + + Spack's old test interface has been removed (#45752), having + been deprecated in `v0.22.0` (#34236). All `builtin` packages + have been updated to use the new interface. See the + [stand-alone test documentation]( + https://spack.readthedocs.io/en/latest/packaging_guide.html#stand-alone-tests) + + The `spack versions --safe-only` option, deprecated since + `v0.21.0`, has been removed. + + The `--dependencies` and `--optimize` arguments to `spack ci` + have been deprecated. + - Binary caches + + Public binary caches now include an ML stack for Linux/aarch64. + We now build an ML stack for Linux/aarch64 for all pull + requests and on develop. The ML stack includes both CPU-only + and CUDA builds for Horovod, Hugging Face, JAX, Keras, PyTorch, + scikit-learn, TensorBoard, and TensorFlow, and related packages. + The CPU-only stack also includes XGBoost. + See https://cache.spack.io/tag/develop/?stack=ml-linux-aarch64-cuda. + - Architecture support + * archspec has been updated to `v0.2.5`, with support for + `zen5`. + * Spack's CUDA package now supports the Grace Hopper `9.0a` + compute capability. + - Other notable changes + + Bugfix: `spack find -x` in environments. + + Spec splices are now robust to duplicate nodes with the + same name in a spec. + + Cache per-compiler libc calculations for performance. + + Fixed a bug in external detection for openmpi. + + Mirror configuration allows username/password as environment + variables. + + Default library search caps maximum depth/ + + Unify interface for `spack spec` and `spack solve` commands. + + Spack no longer RPATHs directories in the default library + search path. + + Improved performance of Spack database. + + Enable package reuse for packages with versions from git refs. + + Improved tracking of task queueing/requeueing in the installer. +- Deleted: Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch + Patch no longer required for target versions. + +------------------------------------------------------------------- +Fri Nov 1 06:32:35 UTC 2024 - Egbert Eich + +- Update to version 0.22.2 + * Bugfixes + - Forward compatibility with Spack 0.23 packages with language + dependencies. + - Forward compatibility with `urllib` from Python 3.12.6+. + - Bump vendored `archspec` for better aarch64 support. + - Fix regression in `{variants.X}` and `{variants.X.value}` + format strings. + - Ensure shell escaping of environment variable values in load + and activate commands. + - Fix an issue where `spec[pkg]` considers specs outside the + current DAG. + - Do not halt concretization on unknown variants in externals. + - Improve validation of `develop` config section/ + - Explicitly disable `ccache` if turned off in config, to + avoid cache pollution. + - Improve backwards compatibility in `include_concrete`. + - Fix issue where package tags were sometimes repeated. + - Make `setup-env.sh` "sourced only" by dropping execution bits. + - Make certain source/binary fetch errors recoverable instead + of a hard error. + - Remove debug statements in package hash computation. + - Remove redundant clingo warnings. + - Remove hard-coded layout version. + - Do not initialize previous store state in `use_store`. + * Package updates + - `chapel` major update/ + +------------------------------------------------------------------- +Wed Jul 10 06:54:31 UTC 2024 - Egbert Eich + +- Update to 0.22.1. + * Bug Fixes: + - Fix reuse of externals on Linux. + - Ensure parent gcc-runtime version >= child. + - Ensure the latest gcc-runtime is rpath'ed when multiple exist + among link deps. + - Improve version detection of glibc. + - Improve heuristics for solver. + - Make strong preferences override reuse. + - Reduce verbosity when C compiler is missing. + - Make missing ccache executable an error when required. + - Make every environment view containing `python` a `venv`. + - Fix external detection for compilers with os but no target. + - Fix version optimization for roots. + - Handle common implementations of pagination of tags in OCI + build caches. + - Apply fetched patches to develop specs. + - Avoid Windows wrappers for filesystem utilities on non-Windows. + - Fix formatting issue in `spack audit`. + * Package updates: + - Require libiconv for iconv. + Notice that glibc/musl also provide iconv, but are not + guaranteed to be complete. Set `packages:iconv:require:[glibc]` + to restore the old behavior. + - protobuf: fix 3.4:3.21 patch checksum. + - protobuf: update hash for patch needed when="@3.4:3.21". + - git: bump v2.39 to 2.45; deprecate unsafe versions. + - gcc: use `-rpath {rpath_dir}` not `-rpath={rpath dir}`. + - Remove mesa18 and libosmesa. + - Enforce consistency of `gl` providers. + - py-matplotlib: qualify when to do a post install. + - rust: fix v1.78.0 instructions. + - suite-sparse: improve setting of the libs property. + - netlib-lapack: provide blas and lapack together. + +------------------------------------------------------------------- +Thu May 16 17:03:50 UTC 2024 - Egbert Eich + +- Move-site-config-scope-before-system-scope.patch: + 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. + +------------------------------------------------------------------- +Mon May 13 13:12:22 UTC 2024 - Egbert Eich + +- 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 + runtime libraries. This enables gcc runtime libraries to be + installed and relocated when using a build cache. + When building minimal Spack-generated container images it + is no longer necessary to install libgfortran, libgomp + etc. using the system package manager. + + Packages compiled with `%oneapi` now depend on a new package + `intel-oneapi-runtime`. This is similar to gcc-runtime. + This allows us to model library soname compatibility and + allows compilers like %oneapi to provide virtuals like sycl + (which can also be provided by standalone libraries). + + Changes to the optimization criteria of the solver improve + the hit-rate of buildcaches by a fair amount. The solver has + more relaxed compatibility rules and will not try to strictly + match compilers or targets of reused specs. Users can still + enforce the previous strict behavior with require: sections + in packages.yaml. + Note that to enforce correct linking, Spack will not reuse + old %gcc and %oneapi specs that do not have the runtime + libraries as a dependency. + + Spack will reuse specs built with compilers that are not + explicitly configured in `compilers.yaml`. Because we can + now keep runtime libraries in build cache, we do not require + you to also have a local configured compiler to use the + runtime libraries. This improves reuse in buildcaches and + avoids conflicts with OS updates that happen underneath + Spack. + + Binary compatibility on `linux` is now based on the `libc` + version, instead of on the OS tag. Spack builds now detect + the host `libc` (`glibc`) and add it as an implicit external + node in the dependency graph. Binaries with a `libc` with + the same name and a version less than or equal to that of + the detected libc can be reused. + + Each package that can provide a compiler is now detectable + using spack external find. External packages defining + compiler paths are effectively used as compilers, and spack + external find -t compiler` can be used as a substitute for + `spack compiler find. More details on this transition are + in [the docs](https://spack.readthedocs.io/en/latest/getting_started.html#manual-compiler-configuration). + - Improved spack find UI for Environments: + `spack find` in environments shows information about + * What are the roots + * Which ones are installed / not installed + * What's been added that still needs to be concretized + much more clearly. An option `--only-roots`/`-r` has been added + to `spack find` that will only show env roots, if you don't want + to look at all the installed specs. + - Improved command-line string quoting + Spack now parses specs in the CLI respecting shell quoting. Instead + of: + ``` + spack install zlib cflags=\"-O2 -g\" + ``` + you should use: + ``` + spack install zlib cflags="-O2 -g" + ``` + The old form will now result in an error. + This allows to include special characters, flags like + ``` + spack intall zlib ldflags='-Wl,-rpath=$ORIGIN/_libs' + ``` + may now be supplied. To reduce ambiguities during paring, quotes + are no longer allowed around `=` and `==`. Commands like: + ``` + spack install zlib cflags = "-O2 -g" + ``` + will result in an error. + - Revert default spack install behavior to `--reuse` + In v0.20 the default concretizer behavior was changed from + `--reuse` to `--reuse-deps`, which meant that *every* `spack + install` invocation would attempt to build a new version of + the requested package / any environment roots. + While this is a common ask for *upgrading* and for *developer + workflows*, it shouldn't be the default for a package manager. + - The `install` command now offers the three options: + * `--reuse` (default): reuse as many existing installations + as possible. + * `--reuse-deps` or `--fresh-roots`: upgrade (freshen) roots + but reuse dependencies if possible. + * --fresh: install fresh versions of requested packages + (roots) and their dependencies. + - More control over reused specs + Spack now provides better control over which packages to reuse + and how. There is a new `concretizer:reuse` config option, + which accepts the following properties: + * `roots`: true to reuse roots, false to reuse just dependencies + * `exclude`: list of constraints used to select which specs + not to reuse. + * `include`: list of constraints used to select which specs + to reuse. + * `from`: list of sources for reused specs (some combination + of `local`, `buildcache`, or `external`). + - New `conflict:` and `prefer:` syntax for package preferences + Instead of having to express conflicts and preferences just + using `require:`, these can now be expressed explicitly. + - `include_concrete` in environments + This directive allows to build on the *cncrete* contents of + another environment without changing this environment by + includeing the concrete specs from this environment's + `spack.lock`: + ``` + spack: + specs: [] + concretizer: + unify: true + include_concrete: + - /path/to/environment1 + - /path/to/environment2 + ``` + When this environment is concretized, it will bring the + already concrete specs from `environment1` and `environment2`, + and build on top of them without changing them. + - `python-venv` isolation + Spack now insert a small `python-venv` package in between + `python` and packages that need to install Python code to + isolate Spack's build environment and shield Spack form + potential issues with an external python. + - Packages can now specify whether they may be distributed in + source or binary form. + * New commands, options and directives + - Allow packages to be pushed to build cache after install from + source. + _ `spack develop`: stage build artifacts in same root as non-dev + builds. + - Don't delete spack develop build artifacts after install. + - `spack find`: add options for local/upstream only. + - `spack logs`: print log files for packages (either partially + built or installed). + - `patch`: support reversing patches. + - `develop`: Add `-b`/`--build-directory` option to set + build_directory package attribute. + - `spack list`: add `--namesapce` / `--repo` option. + - spack gc: add options for environments and build dependencies. + - Add `--create` to `spack env activate`. + * Performance improvements + - environment.py: Fix excessive re-reads. + - ruamel yaml: Fix quadratic complexity bug. + - Refactor to improve `spec format` speed. + - Do not acquire a write lock on the env post install if no views. + - `asp.py`: fewer calls to `spec.copy()` + - `spec.py`: early return in `__str__` + - avoid `jinja2` import at startup unless needed. + * Other new features of note + - `archspec`: update to v0.2.4: bugfixes for `neoverse-v1` and + `neoverse-v2` detection. + - `spack config` get/blame: with no args, show entire config + - `spack env create `: dir if dir-like + - Add handling of custom ssl certs in urllib ops. + - Add ability to rename environments. + - Add config option and compiler support to reuse across OS's. + - Support for prereleases. + - Only reuse externals when configured. + - Environments: Add support for including views. + * Binary caches + Build cache: make signed/unsigned a mirror property. + * Removals, deprecations, and syntax changes + - Remove `dpcpp` compiler and package. + - `spack load`: remove `--only` argument. + * Notable Bugfixes + - repo.py: drop deleted packages from provider cache. + - Allow `+` in module file names. + - `cmd/python`: use runpy to allow multiprocessing in scripts. + - Show extension commands with `spack -h`. + - Support environment variable expansion inside module + projections. + - Alert user to failed concretizations. + - `shell`: fix `zsh` color formatting for PS1 in environments. + - `spack mirror create --all`: include patches. +- Update `run-find-external.sh` script to address the deprecation + of `compilers.yaml`. + +------------------------------------------------------------------- +Thu Apr 18 06:54:54 UTC 2024 - Egbert Eich + +- Add lsb-release and zstd as new requires to match upstream + prerequisites. + +------------------------------------------------------------------- +Thu Apr 4 07:14:54 UTC 2024 - Egbert Eich + +- Make `patchelf` a mandatory dependency on products where it + is always available. + +------------------------------------------------------------------- +Fri Mar 15 13:35:51 UTC 2024 - Egbert Eich + +- Update Spack to version 0.21.2 + * Bugfixes + + Containerize: accommodate nested or pre-existing `spack-env` + paths. + + Fix `setup-env` script, when going back and forth between + instances. + + Fix using fully-qualified namespaces from root specs. + + Fix a bug when a required provider is requested for multiple + virtuals. + + OCI buildcaches: + * only push in parallel when forking. + * use pickleable errors (#42160) + + Fix using sticky variants in externals. + + Fix a rare issue with conditional requirements and + multi-valued variants. + * Package updates + + `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 + +- Make python version used configurable. +- Filter out more rpmlint errors. + +------------------------------------------------------------------- +Thu Jan 25 14:07:19 UTC 2024 - Christian Goll + +- Update Spack to version 0.21.1 + * Add support for reading buildcaches created by Spack v0.22 + * Bugfixes + + `spack graph`: fix coloring with environments + + `spack info`: sort variants in --variants-by-name + + `Spec.format`: error on old style format strings + + ASP-based solver: + - fix infinite recursion when computing concretization + errors, + - don't error for type mismatch on preferences, + - don't emit spurious debug output. + + Improve the error message for deprecated preferences. + + Fix multi-word aliases. + + Add a warning for unconfigured compiler. + + environment: fix an issue with deconcretization/reconcretization + of specs. + + buildcache: don't error if a patch is missing, when + installing from binaries +- From version 0.21.0 + * following new features: + + Better error messages with condition chaining: + In v0.18, we added better error messages that could tell you + what problem happened, but they couldn't tell you why it + happened. 0.21 adds condition chaining to the solver, and + Spack can now trace back through the conditions that led to + an error and build a tree of causes potential causes and + where they came from. + + OCI build caches: + You can now use an arbitrary OCI registry as a build cache: + - For Dockerhub: + `$ spack mirror add my_registry oci://user/image` + - For another registry (GHCR): + `$ spack mirror add my_registry oci://ghcr.io/haampie/spack-test` + Then set the login credentials: + `$ spack mirror set --push --oci-username ... --oci-password ... my_registry` + and push to it: + `$ spack buildcache push my_registry [specs...]` + You can optionally add a base image to get runnable images: + ``` + $ spack buildcache push --base-image leap:15.5 my_registry python` + Pushed ... as [image]:python-3.11.2-65txfcpqbmpawclvtasuog4yzmxwaoia.spack + $ docker run --rm -it [image]:python-3.11.2-65txfcpqbmpawclvtasuog4yzmxwaoia.spack + ``` + This creates a container image from the Spack installations + on the host system, without the need to run `spack install` + from a `Dockerfile` or `sif` file. It also addresses the + inconvenience of losing binaries of dependencies when + `RUN spack install` fails inside `docker build`. Further, the + container image layers and build cache tarballs are the same + files. This means that `spack install` and `docker pull` use the + exact same underlying binaries. If you previously used `spack + install` inside of docker build, this feature helps you save + storage by a factor two. + + Multiple versions of build dependencies: + Increasingly, complex package builds require multiple + versions of some build dependencies. For example, Python + packages frequently require very specific versions of + `setuptools`, `cython`, while different physics packages + require different versions of Python to build. The concretizer + enforced that every solve was unified, i.e., so that there was + only one version of every package. The concretizer now supports + "duplicate" nodes for build dependencies, but enforces unification + through transitive link and run dependencies. This will allow it + to better resolve complex dependency graphs in ecosystems like + Python. + + Cherry-picking virtual dependencies: + You can now select only a subset of virtual dependencies + from a spec that may provide more. For example, to make mpich + your mpi provider, you can be explicit by writing: + `hdf5 ^[virtuals=mpi] mpich`. + Or, to use, e.g., `intel-parallel-studio` for blas along with + an external `lapack` like `openblas`, you could write: + ``` + strumpack ^[virtuals=mpi] intel-parallel-studio+mkl ^[virtuals=lapack] openblas` + ``` + The `virtuals=mpi` is an edge attribute, and dependency edges + in Spack graphs now track which virtuals they satisfied. + + The `spack deconcretize` command gives you control over what + you want to update in an already concrete environment. + As an example, with an environment built with meson, and you + want to update your meson version, you can run: + `$spack deconcretize meson` + and have everything that depends on meson rebuilt the next + time you run spack concretize. In the future, we'll handle + this in a single command, but for now you can use this to + drop bits of your lockfile and resolve your dependencies + again. + + UI Improvements: + The `spack info` received a rework to make the output more + appealing. It is now on par with the rest of Spack's UI. + `spack info` now makes much better use of terminal space and + shows variants, their values, and their descriptions more + clearly. Conditional variants are grouped separately so you + can more easily understand how packages are structured. + `spack checksum` now allows you to filter versions from your + editor, or by version range. It also notifies you about + potential download URL changes. + + Environments can include definitions: + Spack did not previously support using `include:` with The + definitions section of an environment, but now it does. You + can use this to curate lists of specs and more easily reuse + them across environments. + + Aliases: + You can now add aliases to Spack commands in `config.yaml`, + e.g. this might enshrine your favorite args to `spack find` + as `spack f`: + ``` + config: + aliases: + f: find -lv + ``` + + Improved autoloading of modules: + In this release, you can start using `hide_implicits: true` + instead, which exposes only explicitly installed packages to + the user, while still autoloading dependencies. On top of + that, you can safely use `hash_length: 0`, as this config now + only applies to the modules exposed to the user -- you don't + have to worry about file name clashes for hidden + dependencies. + Note: for Tcl this feature requires Modules 4.7 or higher. + * Other new commands and directives: + + `spack env activate` without arguments now loads a default + environment that you do not have to create. + + `spack find -H` / `--hashes`: a new shortcut for piping spack + find output to other commands. + + Add `spack checksum --verify`, fix `--add`. + + New `default_args` context manager factors out common args for + directives. + + `spack compiler find --[no]-mixed-toolchain` lets you easily + mix clang and gfortran on Linux. + * Performance improvements: + + `spack external find execution` is now much faster. + + `spack location -i` is now much faster on success. + + Drop redundant rpaths post install. + + ASP-based solver: avoid cycles in clingo using hidden + directive. + + Fix multiple quadratic complexity issues in environments. + * Other new features of note: + + archspec: update to v0.2.2, support for Sapphire Rapids, + Power10, Neoverse V2. + + Propagate variants across nodes that don't have that variant + + Implement fish shell completion. + + Can now distinguish between source/binary mirror; don't ping + mirror.spack.io as much. + + Improve status reporting on `spack install` + (add [n/total] display...). + +------------------------------------------------------------------- +Mon Nov 6 08:04:55 UTC 2023 - Bernhard Wiedemann + +- Update to version 0.20.3 with the following changes: + * Bug fixes: + + Fix a bug where `spack mirror set-url` would drop configured + connection info. + + Fix a minor issue with package hash computation for Python 3.12. + + Improve escaping in Tcl module files. + + Make repo cache work on repositories with zero mtime. + + Ignore errors for newer, incompatible buildcache version. + + Print an error when git is required, but missing. + + Ensure missing build dependencies get installed when using + `spack install --overwrite`. + + Fix an issue where Spack freezes when the build process + unexpectedly exits. + + Fix a bug where installation failures cause an unrelated + `NameError` to be thrown. + + Fix an issue where Spack package versions would be incorrectly + derived from git tags. + + Fix a bug triggered when file locking fails internally. + + Prevent `spack external find` to error out when a directory + cannot be accessed. + + Fix multiple performance regressions in environments. + + Add more ignored modules to `pyproject.toml` for `mypy`. + * Features: + + Spack now supports Python 3.12. + +------------------------------------------------------------------- +Tue Sep 12 05:32:46 UTC 2023 - Egbert Eich + +- Update to version 0.20.1 with the following changes: + * Bug fixes: + + Fix spec removed from an environment where not actually + removed if `--force` was not given. + + Hotfix for a few recipes that treat CMake as a link + dependency. + + Fix re-running stand-alone test a second time, which was + getting a trailing spurious failure. + + Fix reading JSON manifest on Cray, reporting non-concrete + specs. + + Fix a few bugs when generating Dockerfiles from Spack. + + Fix a few long-standing bugs when generating module files. + + Fix issues with building Python extensions when using an + external Python. + + Fix `spack compiler remove`: remove from command line even + if they appear in different scopes. + * Features: + + Speed-up module file generation. + + Show external status as `[e]`. + + Backport `archspec` fixes. + + Improve a few error messages. + +------------------------------------------------------------------- +Sun Aug 13 12:21:57 UTC 2023 - Egbert Eich + +- Fix SPACK_ROOT setting in /etc/profile.d/spack.[c]sh (bsc#1214222). +- Don't source /etc/os-release directly, use a subshell. + +------------------------------------------------------------------- +Mon Jun 26 12:26:10 UTC 2023 - Egbert Eich + +- Add hwloc-devel and sqlite3 to the packages that trigger a + `spack external find`. +- Change /usr/bin to %{_bindir}. +- Make sure, libhwloc and hwloc are installed together when + spack is installed. + +------------------------------------------------------------------- +Thu Jun 1 11:32:36 UTC 2023 - Egbert Eich + +- Do not attempt to build documentation for 32-bit, s390x and + ppc64*. There are build issues on some build targets. + +------------------------------------------------------------------- +Mon May 22 14:40:17 UTC 2023 - Christian Goll + +- Update to version 0.20.0 with the following features: + * Exact versions: Spack did not previously have a way to distinguish a + version if it was a prefix of some other version. For example, @3.2 would + match 3.2, 3.2.1, 3.2.2, etc. You can now match exactly 3.2 with @=3.2. + This is useful, for example, if you need to patch only the 3.2 version of a + package + * More stable concretization: Now, spack concretize will only concretize the + new portions of the environment and will not change existing parts of an + environment unless you specify --force. This has always been true for + unify:false, but not for unify:true and unify:when_possible environments. + * The concretizer has a new --reuse-deps argument that only reuses dependencies. + That is, it will always treat the roots of your environment as it would with + --fresh. This allows you to upgrade just the roots of your environment while + keeping everything else stable + * Specs in buildcaches can be referenced by hash: Previously, you could run + spack buildcache list and see the hashes in buildcaches, but referring to + them by hash would fail. You can now run commands like spack spec and + spack install and refer to buildcache hashes directly, e.g. spack install + /abc123 + * New package and buildcache index websites + Our public websites for searching packages have been completely revamped + and updated. You can check them out here: + Package Index: https://packages.spack.io + Buildcache Index: https://cache.spack.io + Both are searchable and more interactive than before. Currently major + releases are shown; UI for browsing develop snapshots is coming soon. + * Default CMake and Meson build types are now Release: Spack has historically + defaulted to building with optimization and debugging, but packages like + llvm can be enormous with debug turned on. Our default build type for all + Spack packages is now Release. This has a number of benefits: + much smaller binaries; + higher default optimization level; and + defining NDEBUG disables assertions, which may lead to further speedups. + You can still get the old behavior back through requirements and package + preferences + * spack checksum can automatically add new versions to package + * new command: spack pkg grep to easily search package files + * New maintainers directive + * Add spack buildcache push (alias to buildcache create) + * Allow using -j to control the parallelism of concretization + * Add --exclude option to 'spack external find' + requires() directive and enhanced package requirements We've added some + more enhancements to requirements in Spack. There is a new requires() + directive for packages. requires() is the opposite of conflicts() + +- removed Add-zypper-to-the-valid-container.os_packages-commands.patch + as incoperated upstream + +------------------------------------------------------------------- +Mon Apr 17 06:59:15 UTC 2023 - Egbert Eich + +- Update to version 0.19.2 with the following bug fixes: + * Ignore global variant requirement for packages that do not define it. + * Compiler wrapper: improved parsing of linker arguments. + * Views: fix support for optional Python extensions. + * Views: fix issue where Python executable gets symlinked instead of copied. + * Fix a bug where tests were not added when concretizing together. + * Increase db timeout from 3s to 60s to improve stability of parallel + installs. + * Buildcache: improve error handling in downloads. + * Module files for packages installed from buildcache have long placeholder + paths abbreviated in configure args section. + * Ensure file with build environment variables is truncated when writing + to it. + * spack config update now works on active environments; +- Add: + Add-zypper-to-the-valid-container.os_packages-commands.patch + This adds `zypper` to the valid OS package managers that can + be specified in a slack.yaml container description like: + spack: + ... + container: + .. + os_packages: + command: zypper + .. +- Add: spack_get_libs.sh + This scripts obtains library and include paths for spack-build + libraries and outputs shell commands which set these as + environment variables. + Additionally, it generates a command line to prepend these lib + directories to LD_LIBRARY_PATH. Thus, the variables can be set + in the current shell by running `source $(spack_get_libs.sh foo)`. + When using `bash` this script may also be sourced directly. + The names of the environment variables are the upper-cased library + names with the strings 'LIB_' and 'INC_' prepended. Thus, for a + library 'foo', they would be 'INC_FOO' and 'LIB_FOO'. + These variables may be used at build time to point the compiler + to the include and library files (bsc#1208751). +- Drop: + Make-sure-spack-environment-is-set-up-in-Dockerfile-template.patch + This patch should not be needed. When building using `podman` use: + `podman build --format docker ...` to enable the non-OCI compliant + instructions in a Dockerfile. +- Add info, makeinfo, libcurl-devel, patchelf to the recommended + packages to add. + Fix: openssl-devel -> libopenssl-devel + +------------------------------------------------------------------- +Thu Apr 6 09:30:50 UTC 2023 - Egbert Eich + +- Add 'zypper' as valid command to container.os_packages. This + allows to build SUSE container using non-default registries. +- Add 'awk', 'git', 'gzip' and 'gunzip' to the requires. +- Add 'patchelf' to the recommended packages. + +------------------------------------------------------------------- +Thu Mar 30 09:34:39 UTC 2023 - Egbert Eich + +- Avoid running run-find-external.sh twice during installation/ + update. +- Stop accidental inclusion of %%pre/post/triggerin/un scripts + in doc packages. +- Adpot new info file installation sceme for Factory. + +------------------------------------------------------------------- +Thu Mar 23 09:59:40 UTC 2023 - Egbert Eich + +- run-find-external.sh: Extend the range of versions of MPI + flavors to be searched for when asking Spack to look + for external packages (bsc#1208751). + +------------------------------------------------------------------- +Wed Mar 8 19:54:55 UTC 2023 - Egbert Eich + +- Improve run-find-external.sh: + * Extend to run 'spack compiler find'. + * Separate triggers for packages and compilers. + * Better handle when search patterns match multiple directories. + +------------------------------------------------------------------- +Wed Mar 1 13:13:34 UTC 2023 - Christian Goll + +- Udpate to 0.19.1 with following bug fixes: + * buildcache create: make "file exists" less verbose + * spack mirror create: don't change paths to urls + * Improve error message for requirements + * Fix libtool filter for Fujitsu compilers + * FileCache: delete the new cache file on exception +- using `--all` flag for `spack external find` in the %triggrin + section, as MPI packages were not recognized any more, fixing + (bsc#1208751) + +------------------------------------------------------------------- +Tue Jan 31 08:29:00 UTC 2023 - Egbert Eich + +- Make sure the spack environment is set up correctly in + spack-generated Dockerfiles (boo#1207784): + Make-sure-spack-environment-is-set-up-in-Dockerfile-template.patch + +------------------------------------------------------------------- +Wed Jan 11 13:04:37 UTC 2023 - Egbert Eich + +- Fix var_path: this regression was introduced with the update + to the 0.19.0 release (boo#1207053). +- Move repos to /usr/share/spack: /var is strictly for local data. + +------------------------------------------------------------------- +Tue Nov 22 11:16:26 UTC 2022 - Christian Goll + +- updated to version 0.19.0 with the following changes: + * Spack's traditional package preferences are soft, but we've added hard + requriements to packages.yaml and spack.yaml + * spack install in an environment will no longer add to the specs: list; you'll + need to either use spack add or spack install --add . + * spack uninstall will not remove from your environment's specs: + list; you'll need to use spack remove or spack uninstall --remove. + * concretizer:unify:true is now the default mode for new environments + * include environment configuration from URLs + * An increasing number of packages in the ecosystem need the ability to + support multiple build systems + * package ++variant: + enabled variant that will be propagated to dependencies + * git. prefix to specify git tags or branches as versions. All of these are + valid git versions in + * spack ci generate --tests will generate a .gitlab-ci.yml file that not only + does builds but also runs tests for built packages + * spack test run --explicit will only run tests for packages that are + explicitly installed, instead of all packages. + * You can add a new shared_linking option to config.yaml to make Spack embed absolute paths + to needed shared libraries in ELF executables and shared libraries on Linux + * spack spec prints dependencies more legibly. Dependencies in the output now + appear at the earliest level of indentation possible (#33406) + * You can override package.py attributes like url, directly in packages.yaml + * There are a number of new architecture-related format strings you can use + in Spack configuration files to specify paths +- Improvements from v0.18.0 + * spack install --reuse was introduced in v0.17.0, and --reuse is now the + default concretization mode. Spack will try hard to resolve dependencies + using installed packages or binaries + * Spack hashes now include link, run, and build dependencies, as well as a + canonical hash of package recipes. Previously, hashes only included link + and run dependencies (though build dependencies were stored by + environments). We coarsened the hash to reduce churn in user installations, + but the new default concretizer behavior mitigates this concern and gets us + reuse and provenance. You will be able to see the build dependencies of + new installations + * concretizer:unify:when_possible will try to resolve a fully unified + environment, but if it cannot, it will create multiple configurations of + some packages where it has to. with spack find. + * Spack now has an updated binary format, with improvements for security. The + new format has a detached signature file, and Spack verifies the signature + before untarring or decompressing the binary package. The previous format + embedded the signature in a tar file, which required the client to run tar + before verifying (#30750). Spack can still install from build caches using + the old format, but we encourage users to switch to the new format going + forward. + * The spack bootstrap mirror command can automatically create a mirror for + bootstrapping the concretizer and other needed dependencies in an + air-gapped environment. + * spack env depfile can be used to generate a Makefile from an environment, + which can be used to build packages the environment in parallel on a single + node + * In addition to being conditional themselves, variants can now have + conditional values that are only possible for certain configurations of a + package. +- removed following patches as incorporated upstream: + * fix-tumbleweed-naming.patch + +------------------------------------------------------------------- +Mon Aug 15 19:39:22 UTC 2022 - Dirk Müller + +- avoid bashism in post scripts (bsc#1195391) + +------------------------------------------------------------------- +Thu Apr 7 12:56:45 UTC 2022 - Egbert Eich + +- Fix: Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch + This is needed to prevent an AttributeError during + 'import spack.environment as some_name' + when building Sphinx documentation - due to an outdated + Python on SLE. + The original version caused errors: + 'NameError: name 'uenv' is not defined' + when using 'spack env activate' et.al. (bsc#1198212). + +------------------------------------------------------------------- +Wed Mar 2 12:41:12 UTC 2022 - Egbert Eich + +- Remove unneeded build dependency. +- Make dependencies of spack and spack-recipes symetrical. + +------------------------------------------------------------------- +Thu Feb 10 13:58:04 UTC 2022 - Egbert Eich + +- Add openssl-devel, xz-devel and libzip-devel as recommends + bsc#1195789. + +------------------------------------------------------------------- +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 + +- updated to spack 0.17.1 with following chnages: + * Allow locks to work under high contention (#27846) + * Improve errors messages from clingo (#27707 #27970) + * Respect package permissions for sbang (#25764) + * Fix --enable-locks behavior (#24675) + * Fix log-format reporter ignoring install errors (#25961) + * Fix overloaded argparse keys (#27379) + * Allow style commands to run with targets other than "develop" (#27472) + * Log lock messages to debug level, instead of verbose level (#27408) + * Handle invalid unicode while logging (#21447) + * spack audit: fix API calls to variants (#27713) + * Provide meaningful message for empty environment installs (#28031) + * Added opensuse leap containers to spack containerize (#27837) + * Revert "patches: make re-applied patches idempotent" (#27625) + * MANPATH can use system defaults (#21682) + * Add "setdefault" subcommand to `spack module tcl` (#14686) + * Regenerate views when specs already installed (#28113) +- removed leap-container.patch as incoperated upstream + +------------------------------------------------------------------- +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 + +- made objects.inv (Source5) to be static as the online version is changed + dynamically + +------------------------------------------------------------------- +Tue Dec 7 15:34:12 UTC 2021 - Christian Goll + +- added leap-container.patch which adds leap15 as os to the + spack containerize command. + +------------------------------------------------------------------- +Mon Nov 8 14:55:34 UTC 2021 - Christian Goll + +- updated to version 0.17.0 + (Upstream feature/bug references () are relative to + https://github.com/spack/spack/issues/). + * 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 + using unsatisfiable cores. Spack will now print a summary of the types + of constraints that were violated to make a spec unsatisfiable (#26719). + * Conditional variants + Variants can now have a when="" clause, allowing them to be + conditional based on the version or other attributes of a package (#24858). + * Git commit versions + In an environment and on the command-line, you can now provide a full, + 40-character git commit as a version for any package with a top-level + git URL. e.g., spack install hdf5@45bb27f58240a8da7ebb4efc821a1a964d7712a8. + Spack will compare the commit to tags in the git repository to understand + what versions it is ahead of or behind. + * Override local config and cache directories + You can now set SPACK_DISABLE_LOCAL_CONFIG to disable the ~/.spack and + /etc/spack configuration scopes. SPACK_USER_CACHE_PATH allows you to + move caches out of ~/.spack, as well (#27022, #26735). This addresses + common problems where users could not isolate CI environments from local + configuration. + * Improvements to Spack Containerize + For added reproducibility, you can now pin the Spack version used by + spack containerize (#21910). The container build will only build + with the Spack version pinned at build recipe creation instead of the + latest Spack version. + * New commands for dealing with tags + The spack tags command allows you to list tags on packages (#26136), and you + can list tests and filter tags with spack test list (#26842). + * Copy and relocate environment views as stand-alone installations (#24832) + * spack diff command can diff two installed specs (#22283, #25169) + * spack -c can set one-off config parameters on CLI (#22251) + * spack load --list is an alias for spack find --loaded (#27184) + * spack gpg can export private key with --secret (#22557) + * spack style automatically bootstraps dependencies (#24819) + * spack style --fix automatically invokes isort (#24071) + * build dependencies can be installed from build caches with --include-build-deps (#19955) + * spack audit command for checking package constraints (#23053) + * spack can now fetch from CVS repositories (yep, really) (#23212) + * spack monitor lets you upload analysis about installations to a + * spack monitor server (#23804, #24321, #23777, #25928)) + * spack python --path shows which python Spack is using (#22006) + * spack env activate --temp can create temporary environments (#25388) + * --preferred and --latest options for spack checksum (#25830) + * SPACK_PYTHON environment variable sets which python spack uses (#21222) + * SPACK_SKIP_MODULES lets you source setup-env.sh faster if you don't need modules (#24545) +- removed following patches as incomperated upstream: + * added-dockerfile-for-opensuse-leap-15.patch +- removed as not needed any more: + * basic-exclude-pattern-for-external-find.patch + * Fix-documentation-so-that-parser-doesn-t-stumble.patch +- updated patches: + * Adapt-shell-scripts-that-set-up-the-environment-for-different-shells.patch + * added-target-and-os-calls-to-output-of-spack-spec-co.patch + * Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch + * fix-tumbleweed-naming.patch + * Make-spack-paths-compliant-to-distro-installation.patch +- added: + * Fix-Spinx-configuration-to-avoid-throwing-errors.patch + * Set-modules-default-to-lmod.patch +- updated requires to actual sphinx version, so that the documentation + builds +- Included source: + objects.inv + +------------------------------------------------------------------- +Fri Oct 15 17:00:57 UTC 2021 - Egbert Eich + +- Fix sysuser file name. + +------------------------------------------------------------------- +Fri Oct 1 05:55:10 UTC 2021 - Egbert Eich + +- Utilize sysuser infrastructure to set group spack. + +------------------------------------------------------------------- +Wed Sep 29 20:32:58 UTC 2021 - Antoine Ginies + +- update to version 0.16.3 (JSC#SLE-22137): + * clang/llvm: fix version detection + * Fix use of quotes in Python build system + * Ensure all roots of an installed environment are marked explicit in db + * Fix fetching for Python 3.8 and 3.9 + * locks: only open lockfiles once instead of for every lock held + +------------------------------------------------------------------- +Fri Aug 6 14:28:20 UTC 2021 - Christian Goll + +- added tar and make as requirement + +------------------------------------------------------------------- +Wed Jul 7 16:09:21 UTC 2021 - Christian Goll + +- added README-oo-wiki which is the raw version of the opensuse wiki + +------------------------------------------------------------------- +Tue Jul 6 21:45:21 UTC 2021 - Egbert Eich + +- Fix patch + Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch + to actually work correctly. + The updated version makes sure modules are not called recursively even + if modules are loaded in an out-of-order fashion from python-Sphinx. +- Remove duplicates in spec file. + +------------------------------------------------------------------- +Wed Jun 2 14:04:26 UTC 2021 - Antoine Ginies + +- fix typo to export prefix in patch (bsc#1191395): + Adapt-shell-scripts-that-set-up-the-environment-for-different-shells.patch + +------------------------------------------------------------------- +Tue May 25 08:55:42 UTC 2021 - Christian Goll + +- update to version 0.16.1 + * Major performance improvement for spack load and other commands. + * spack fetch is now environment-aware. (#19166) + * Numerous fixes for the new, clingo-based concretizer. + * Supoprt for automatically bootstrapping clingo from source. + * Python 3.10 support: collections.abc + * Fix import issues by using __import__ instead of Spack package import. + * Bugfixes and --source-dir argument for spack location. + * Better support for externals in shared prefixes. + * spack build-env now prefers specs defined in the active environment. + * Remove erroneous warnings about quotes in from_sourcing_files. + * Fix clearing cache of InternalConfigScope. + * Bugfix for active when pkg is already active error. + * Make SingleFileScope able to repopulate the cache after clearing it. + * Channelflow: Fix the package. + * More descriptive error message for bugs in package.py + * Use package-supplied autogen.sh + * Respect -k/verify-ssl-false in _existing_url method. + + +------------------------------------------------------------------- +Mon May 3 06:34:46 UTC 2021 - Egbert Eich + +- Add gcc-c++ to the required packages (bsc#1185519). +- Add alternative c++ & fortran compilers to the triggers list. + +------------------------------------------------------------------- +Tue Mar 30 14:31:26 UTC 2021 - Christian Goll + +- added run-find-external.sh which calls the command in post + `spack external find` as nobody and not as root + +------------------------------------------------------------------- +Tue Mar 23 08:32:49 UTC 2021 - Christian Goll + +- added libbz2-devel as dependency as spack requires this, as soon + as the bzip2 binary is found and removed warning for this + corner case in rpmlinrc + +------------------------------------------------------------------- +Fri Mar 19 15:04:20 UTC 2021 - Christian Goll + +- set the right MODULEPATH in /etc/profile.d/spack.[cs]h + +------------------------------------------------------------------- +Fri Feb 26 22:06:36 UTC 2021 - Egbert Eich + +- Remove BuildRequires for patterns-base-basesystem and + distribution-release. + +------------------------------------------------------------------- +Fri Feb 26 10:40:00 UTC 2021 - Christian Goll + +- update to version 0.16.1 + * intel-oneapi support through new packages + * HIP/ROCm support (#19715, #20095) + * concretization enhancements + * environment install reporting fix (#20004) + * avoid import in ABI compatibility info (#20236) + * restore ability of dev-build to skip patches (#20351) + * spack find -d spec grouping (#20028) + * spack smoke test support (#19987, #20298) + * abstract spec comparisons (#20341) + * performance improvements for binary relocation (#19690, #20768) + * additional sanity checks for variants in builtin packages (#20373) + * do not pollute auto-generated configuration files with empty lists or + dicts +- added file: basic-exclude-pattern-for-external-find.patch + * adds the functionality to exclude binaries for external search + so that the call 'installdbgsymbols' can be prohibited as this + leads to an endless loop when drkonqui is installed + +------------------------------------------------------------------- +Thu Feb 4 06:54:13 UTC 2021 - Egbert Eich + +- Add + * Fix-documentation-so-that-parser-doesn-t-stumble.patch: + * Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch + Fix documentation building. +- Fix texinfo file installation. + +------------------------------------------------------------------- +Fri Dec 11 15:09:07 UTC 2020 - Christian Goll + +- added patch for more reproduceable output for the doc package + * added file: added-target-and-os-calls-to-output-of-spack-spec-co.patch + +------------------------------------------------------------------- +Tue Dec 8 14:19:00 UTC 2020 - Christian Goll + +- added test for /etc/spack/no_rpm_trigger + +------------------------------------------------------------------- +Wed Dec 2 12:33:44 UTC 2020 - Christian Goll + +- added %triggerin and %triggerpostun for the packages which + can be detected by spack + +------------------------------------------------------------------- +Wed Nov 25 10:58:48 UTC 2020 - Christian Goll + +- updated to 0.16.0 +- added find for external packages +- added dockerfile for leap + * added patchfile added-dockerfile-for-opensuse-leap-15.patch + +------------------------------------------------------------------- +Tue Nov 24 13:45:24 UTC 2020 - Egbert Eich + +- Add documentation (man and info pages, pdf doesn't build + currently). + * Do not ship documentation sources. +- Do not distribute Dockerfiles and other container related + material, yet. This needs to be fixed so that the samples + work with SUSE. +- Fully integrate spack into SUSE directory structure, fix + paths where required. + * Fix setup scripts to work correctly in above environment. + +------------------------------------------------------------------- +Mon Nov 16 14:42:32 UTC 2020 - Christian Goll + +- added profile file for csh +- enabled projections +- updated README.SUSE + +------------------------------------------------------------------- +Wed Nov 11 19:56:11 UTC 2020 - Christian Goll + +- added patches to be more on the traditional file system hierarchy + and avoid explicit version in tumbleweed. + * added file Make-spack-paths-compliant-to-distro-installation.patch + * added file fix-tumbleweed-naming.patch + + +------------------------------------------------------------------- +Fri Sep 11 07:50:30 UTC 2020 - Ana Guerrero Lopez + +- Initial release. Version 0.15.4 + * Make-spack-paths-compliant-to-distro-installation.patch + Make spack paths compliant to distro installation. diff --git a/spack.spec b/spack.spec new file mode 100644 index 0000000..b812bde --- /dev/null +++ b/spack.spec @@ -0,0 +1,544 @@ +# +# spec file for package spack +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{?nil} +%if "%{flavor}" == "doc" +%bcond_without doc +%endif + +ExcludeArch: i586 %arm s390 s390x %power64 ppc + +%if %{with doc} && (0%{?sle_version} > 0) && (150200 >= 0%{?sle_version}) +ExclusiveArch: do_not_build +%endif + +%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. +# Distinguish between packages we recommend and packages which +%define spack_trigger_recommended_packages autoconf bash bison bzip2 libzip-devel cmake-full ccache cpio diffutils findutils flex git-lfs info make makeinfo m4 ncurses-devel libtool libcurl-devel libopenssl-devel perl-base pkgconf pkg-config python3-base tar xz xz-devel + +%define spack_trigger_recommended_compilers gcc gcc-c++ gcc-fortran + +# packages recognized by spack, but not recommended +%define spack_trigger_packages ghostscript go fish fzf hwloc-devel hugo java-11-openjdk-devel java-14-openjdk-devel java-15-openjdk-devel java-16-openjdk-devel java-1_8_0-openjdk-devel ruby sqlite3 openmpi1-devel openmpi2-devel openmpi3-devel openmpi4-devel openmpi1-gnu-hpc-devel openmpi2-gnu-hpc-devel openmpi3-gnu-hpc-devel openmpi4-gnu-hpc-devel mpich-gnu-hpc-devel mvapich2-devel mpich-devel + +%define spack_trigger_compilers gcc7 gcc8 gcc9 gcc10 gcc11 gcc12 gcc13 gcc7-c++ gcc8-c++ gcc9-c++ gcc10-c++ gcc11-c++ gcc12-c++ gcc13-c++ gcc7-fortran gcc8-fortran gcc9-fortran gcc10-fortran gcc11-fortran gcc12-fortran gcc13-fortran + +# non oss packages +%define spack_trigger_external cuda-nvcc + +%if 0%{?sle_version} <= 120500 && !0%{?is_opensuse} +%define __python3 python3 +%endif + +%define mypyver 3 +%define mypython python%{?mypyver} + +Name: spack +Version: 0.23.0 +Release: 0 +Summary: Package manager for HPC systems +License: Apache-2.0 AND MIT AND Python-2.0 AND BSD-3-Clause +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.in +# without `--header "Accept-Language: en" en.opensuse.org returns 406 +#Source4: https://en.opensuse.org/index.php?title=Spack&action=raw&ref=157522#/README-oo-wiki +Source4: 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 +Source6: spack_get_libs.sh +Patch2: Adapt-shell-scripts-that-set-up-the-environment-for-different-shells.patch +Patch4: added-target-and-os-calls-to-output-of-spack-spec-co.patch +Patch5: Make-spack-paths-compliant-to-distro-installation.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 +Patch10: Move-site-config-scope-before-system-scope.patch +%if %{without doc} +BuildRequires: %{mypython}-urllib3 +BuildRequires: fdupes +BuildRequires: lua-lmod +BuildRequires: polkit +BuildRequires: sudo +BuildRequires: sysuser-tools +Requires: %{mypython}-clingo +Requires: %{name}-recipes = %{version} +Requires: awk +Requires: bzip2 +Requires: coreutils +Requires: curl +Requires: gcc-c++ +Requires: gcc-fortran +Requires: git +Requires: gpg2 +Requires: gzip +Requires: libbz2-devel +Requires: lsb-release +Requires: make +Requires: patch +Requires: polkit +Requires: sudo +Requires: system-user-nobody +Requires: tar +Requires: unzip +Requires: xz +Requires: zstd +Requires: (patchelf if (product(SUSE_SLE) >= 15.6 or product(Leap) or product(openSUSE))) +Recommends: %spack_trigger_recommended_packages %spack_trigger_recommended_compilers +Recommends: lua-lmod +Recommends: patchelf +Requires: (hwloc if hwloc-devel) +Requires: (hwloc-devel if hwloc) +%else +BuildRequires: git +BuildRequires: makeinfo +# Hardcode this - there is no python2 version of this around any more. +BuildRequires: %{mypython}-Sphinx >= 3.4 +BuildRequires: %{mypython}-sphinxcontrib-programoutput +BuildRequires: spack +# html +BuildRequires: graphviz +# info +BuildRequires: graphviz-gnome +## pdf +# BuildRequires: %{mypython}-Sphinx-latex +Recommends: spack +%endif +BuildArch: noarch + +%description +Spack is a configurable Python-based HPC package manager, automating +the installation and fine-tuning of simulations and libraries. +It operates on a wide variety of HPC platforms and enables users +to build many code configurations. Software installed by Spack +runs correctly regardless of environment, and file management +is streamlined. Spack can install many variants of the same build +using different compilers, options, and MPI implementations. + +This package provides a module file that must be loaded to use spack. + +%package recipes +Summary: Spack built-in package recipes +Requires: %{name} = %version + +%description recipes +Spack is a configurable Python-based HPC package manager, automating +the installation and fine-tuning of simulations and libraries. +It operates on a wide variety of HPC platforms and enables users +to build many code configurations. Software installed by Spack +runs correctly regardless of environment, and file management +is streamlined. Spack can install many variants of the same build +using different compilers, options, and MPI implementations. + +This package contains the built-in package recipes. + +%package man +Summary: Man Page for Spack - Package manager for HPC systems +Requires: man + +%description man +Spack is a configurable Python-based HPC package manager, automating +the installation and fine-tuning of simulations and libraries. +It operates on a wide variety of HPC platforms and enables users +to build many code configurations. Software installed by Spack +runs correctly regardless of environment, and file management +is streamlined. Spack can install many variants of the same build +using different compilers, options, and MPI implementations. + +This package contains the man page. + +%package info +Summary: Info Page for Spack - Package manager for HPC systems +Requires: info +%if 0%{?suse_version} <= 1500 +Requires(post): %{install_info_prereq} +Requires(pre): %{install_info_prereq} +%endif + +%description info +Spack is a configurable Python-based HPC package manager, automating +the installation and fine-tuning of simulations and libraries. +It operates on a wide variety of HPC platforms and enables users +to build many code configurations. Software installed by Spack +runs correctly regardless of environment, and file management +is streamlined. Spack can install many variants of the same build +using different compilers, options, and MPI implementations. + +This package contains the info page. + +%package build-dependencies +Summary: Spack Build Dependencies +Requires: bison +Requires: cmake-full +Requires: flex +Requires: libcurl-devel +Requires: libopenssl-devel +Requires: libtool +Requires: libzip-devel +Requires: ncurses-devel +Requires: xz-devel +Requires: zip + +%description build-dependencies +This package provides dependencies to packages of some frequently used +build tools. If Spack finds these on the system it will not attempt to +build them. + +%prep +%setup -q +%autopatch -p1 +%if %{without doc} + +# set SPACK_ROOT +for i in share/spack/setup-env.*; do + sed -i -e "s;@@_prefix@@;%_prefix;g" $i +done +%else +cp %{S:5} lib/spack/docs/ +%endif + +%build +# Nothing to build +%if %{with doc} +mkdir -p ${HOME}/.spack +cat > ${HOME}/.spack/config.yaml < $tmpdir/spack +chmod 0755 $tmpdir/spack +PATH=$tmpdir:${PATH} +export PATH +mkdir -p /tmp/spack +cd lib/spack/docs +# fix Makefile of sphinx and ignore warnings due to offline build +sed -i 's/\(^SPHINXOPTS\).*/\1 = --keep-going /' Makefile +# Causes issues building texinfo as a suitable image cannot be found +grep -rl ":target:" | xargs sed -i -e "/:target:/s/^/#/" -e "/figure::/s/^/#/" +# Fix path to var - we install this to the 'real' /var +grep -rl "\$SPACK_ROOT/var" | xargs sed -i -e "s@\(.*\)\$SPACK_ROOT/var\(/spack.*\)@\1/var/lib\2@g" +grep -rl '/var/lib/spack/repos' | grep -v "cmd/list.py" | \ + xargs -i@ sed -i 's|/var/lib/spack/repos|/usr/share/spack/repos|g' @ +# spack cannot run without knowing at least the compiler, so we inject +# a dummy one +mkdir -p ${HOME}/.spack/linux/ +source /usr/share/spack/setup-env.sh +make man info || { cat /tmp/sphinx-err-*.log; exit 1; } #text dirhtml +rm -rf $tmpdir +gzip _build/texinfo/Spack.info _build/man/spack.1 +# with doc +%endif +cd - +grep -rl '#! /usr/bin/env bash' . | xargs -i@ sed -i '1s|#! /usr/bin/env bash|#!%{_bindir}/bash|g' @ +grep -rl '#!/bin/env sh' . | xargs -i@ sed -i '1s|#!/bin/env sh|#!%{_bindir}/sh|g' @ +grep -rl '#!/usr/bin/env bash' . | xargs -i@ sed -i '1s|#!/usr/bin/env bash|#!%{_bindir}/bash|g' @ +grep -rl '#![[:space:]]*/usr/bin/env python' | \ + xargs -i@ sed -i '1s|#![[:space:]]*/usr/bin/env python|#!%{_bindir}/%{mypython}|g' @ +grep -rl '/var/spack/repos' | grep -v "cmd/list.py" | \ + xargs -i@ sed -i 's|/var/spack/repos|/usr/share/spack/repos|g' @ +grep -rl "spack/" . | xargs -i@ sed -i \ + -e 's|$spack/opt|/opt|g' \ + -e 's|$spack/var|/var/lib|g'\ + -e 's|$spack/usr|/usr|g'\ + -e 's|$spack/share/spack/lmod|/opt/spack/modules|g'\ + -e 's|$spack/share/spack/modules|/opt/spack/modules|g'\ + @ + +%install +# combine READMEs +cat %{S:4} >> %{S:1} +%if %{without doc} +cp %{S:1} . +# Fix some rpmlint warnings +## Remove files not required to run spack +rm -rf lib/spack/spack/test +rm -rf share/spack/qa +rm -rf share/spack/logo +rm -rf var/spack/repos/builtin.mock var/spack/gpg.mock var/spack/mock_configs var/spack/repos/duplicates.test +rm -rf lib/spack/external/ruamel/yaml/.ruamel +find . -type f -name .gitignore -delete +find . -type f -name .nojekyll -delete +find . -type f -name .gitlab-ci.yml -delete + +# Fix _spack_root link +rm -f lib/spack/docs/_spack_root +ln -sf ../.. lib/spack/docs/_spack_root +# Do not ship AWS specifics +rm -f share/spack/setup-tutorial-env.sh +# Fix rpmlint warnings +## No need for the standalone scripts +rm -f lib/spack/external/macholib/macho_*.py +## Remove non linux stuff +rm -f bin/spack.bat bin/spack_cmd.bat bin/spack_pwsh.ps1 + +mkdir -p %{buildroot}%{spack_dir} +mkdir -p %{buildroot}%{spack_dir}/opt +mkdir -p %{buildroot}%{_datarootdir}/spack/lib/spack +mkdir -p %{buildroot}%{_datarootdir}/spack/modules +mkdir -p %{buildroot}%{_localstatedir}/lib/spack +mkdir -p %{buildroot}%{_localstatedir}/lib/spack/junit-report +mkdir -p %{buildroot}%{_localstatedir}/cache/spack +mkdir -p %{buildroot}%{_sysconfdir}/skel/.spack/ +mkdir -p %{buildroot}/%{_bindir} +# Link avoids having to fix paths +ln -sf %{buildroot}/%{_localstatedir}/cache/spack %{buildroot}%{_localstatedir}/lib/spack/cache + +# Copy files to corresponding paths +cp -r etc %{buildroot}%{_prefix} +cp -r lib/spack/{env,external,llnl,spack,spack_installable} %{buildroot}%{spack_dir} +cp -r share/spack/* %{buildroot}%{_datarootdir}/spack +cp -r var/spack/* %{buildroot}%{_localstatedir}/lib/spack +# No repos in /var +mv %{buildroot}%{_localstatedir}/lib/spack/repos %{buildroot}%{_datarootdir}/spack +cp -r bin/sbang %{buildroot}/%{_bindir} +cp -r bin/spack* %{buildroot}%{_bindir}/ +cp %{S:6} %{buildroot}%{_bindir}/ +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/#' %{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 +cat >> %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml <> %{buildroot}%{_sysconfdir}/skel/.spack/modules.yaml < %{buildroot}/%{_sysconfdir}/profile.d/spack.sh < /dev/null ; then + test -e ~/.spack || mkdir -p ~/.spack + [ -e ~/.spack/config.yaml ] || \ + cp -r %{_sysconfdir}/skel/.spack/config.yaml ~/.spack/ + [ -e ~/.spack/modules.yaml ] || \ + cp -r %{_sysconfdir}/skel/.spack/modules.yaml ~/.spack/ + fi +fi +EOF +# Same for csh +cat > %{buildroot}/%{_sysconfdir}/profile.d/spack.csh <& /dev/null + if ( \$? == 1 ) then + test -e ~/.spack || mkdir -p ~/.spack + test -e ~/.spack/config.yaml || \ + cp -r %{_sysconfdir}/skel/.spack/config.yaml ~/.spack/ + test -e ~/.spack/modules.yaml || \ + cp -r %{_sysconfdir}/skel/.spack/modules.yaml ~/.spack/ + endif +endif + +EOF +## Create modules.yaml file, so that hierarchy module files are created +#cat > %{buildroot}%{spack_dir}/etc/spack/modules.yaml < system-group-%{name}.conf +%sysusers_generate_pre system-group-%{name}.conf %{name} system-group-%{name}.conf +install -D -m 644 system-group-%{name}.conf %{buildroot}%{_sysusersdir}/system-group-%{name}.conf + +%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 +cd lib/spack/docs/_build +cp man/spack.1.gz %{buildroot}%{_mandir}/man1/ +cp -r texinfo/Spack.info.gz %{buildroot}%{_infodir} +[ -d texinfo/Spack-figures ] && cp -r texinfo/Spack-figures %{buildroot}%{_infodir} +%endif + +%if %{without doc} +# for sysusers +%pre -f %{name}.pre + +%post +if [ -e /etc/os-release ] ; then + source /etc/os-release + if [ "${ID}" = "opensuse-tumbleweed" ] ; then + export SPACK_NAME="${ID/-/}" + else + export SPACK_NAME="${ID/-/_}${VERSION_ID/.*/}" + fi + sed -i "s@SUSE_VERSION@$SPACK_NAME@g" %{_sysconfdir}/profile.d/spack.sh +fi +mkdir -p /opt/spack +chgrp spack /opt/spack +chmod 0775 /opt/spack + +%triggerin -- %{?spack_trigger_recommended_packages} %{?spack_trigger_packages} %{?spack_trigger_external} +/usr/lib/spack/run-find-external.sh packages + +%triggerin -- %{?spack_trigger_recommended_compilers} %{?spack_trigger_compilers} +/usr/lib/spack/run-find-external.sh compilers + +%triggerpostun -- %{?spack_trigger_recommended_packages} %{?spack_trigger_packages} %{?spack_trigger_external} +/usr/lib/spack/run-find-external.sh packages + +%triggerpostun -- %{?spack_trigger_recommended_compilers} %{?spack_trigger_compilers} +/usr/lib/spack/run-find-external.sh compilers + +%files +%license COPYRIGHT LICENSE-APACHE LICENSE-MIT +%doc CHANGELOG.md NOTICE README.md README.SUSE +%dir %{_sysconfdir}/spack/ +%{_bindir}/* +%if 0%{?suse_version} <= 1500 +%dir %{_prefix}/etc +%endif +%{_prefix}/etc/spack +%attr(0775, root, spack) %{_localstatedir}/lib/spack/junit-report +%attr(0775, root, spack) %{spack_dir}/opt +%attr(0775, root, spack) %{_localstatedir}/cache/spack +%attr(0775, root, spack) %{_datarootdir}/spack/modules +%{spack_dir} +%{_localstatedir}/cache/spack +%{_localstatedir}/lib/spack +%{_datarootdir}/spack +%exclude %{_datarootdir}/spack/repos +%config %{_sysconfdir}/profile.d/spack.sh +%ghost %config %{_sysconfdir}/spack/packages.yaml +%config %{_sysconfdir}/profile.d/spack.csh +%dir %{_sysconfdir}/skel/.spack +%config %{_sysconfdir}/skel/.spack/config.yaml +%config %{_sysconfdir}/skel/.spack/modules.yaml +# repos directory is installed in -recipes +%{_sysusersdir}/system-group-%{name}.conf + +%files recipes +%license COPYRIGHT LICENSE-APACHE LICENSE-MIT +%doc CHANGELOG.md NOTICE README.md +%{_datarootdir}/spack/repos + +%files build-dependencies + +#%{without doc} +%else + +%if 0%{?suse_version} <= 1500 +%post info +%install_info --info-dir=%{_infodir} --info-file="%{_infodir}/Spack.info.gz" + +%preun info +%install_info_delete --info-dir=%{_infodir} --info-file="%{_infodir}/Spack.info.gz" +%endif + +%files man +%{_mandir}/man1/* + +%files info +%{_infodir}/* + +%endif + +%changelog diff --git a/spack_get_libs.sh b/spack_get_libs.sh new file mode 100644 index 0000000..677da41 --- /dev/null +++ b/spack_get_libs.sh @@ -0,0 +1,126 @@ +#! /bin/bash +#set -x + +spack_shtyp=bash + +help() { + echo -e "$0 [--help][--csh] lib ... + Print set commands to set or set LD_LIBRARY_PATH to libraries + specified as arguments as well as variables holding each library + directory individually. These are usful when linking applications + against these libraries. + The variable names of the latter begin with 'LIB_' followed by + the upper cased library name." +} + +error() { + echo -e "$1" >&2 +} + +contains() { + local a=$1 + shift + local -a b=($@) + local i + for i in ${b[*]}; do + [ "$i" == "$a" ] && return 0 + done + return 1 +} + +path_contains() { + local a=$1 + local i + [ -n "$2" ] || return 1 + OFS=$IFS + IFS=: + for i in $2; do + IFS=$OFS + [ "$i" == "$a" ] && return 0 + done + return 1 +} + +print_env() { + case $spack_shtyp in + csh) + echo "setenv $1 $2" ;; + bash) + if $spack_srcd; then + eval $1=$2 + export $1 + else + echo -e "$1=$2\nexport $1" + fi ;; + esac +} + +get_paths() +{ + local -A libpaths includepaths + local OFS=$IFS + local ld_exist=$LD_LIBRARY_PATH + IFS=" +" + local package_list="$1" + local format="> {hash:7} {name}{@version}{%compiler}{arch=architecture}" + + local l i + for l in $(spack find --format "{name}" --paths $package_list); do + local lib=${l%% *} + local path=${l##* } + if contains $lib "${!libpaths[@]}"; then + error "$lib matches multiple packages\n Matching packages:" + spack find --format ${format} ${lib} >&2 + error " Use a more specific spec (e.g., prepend '/' to the hash)." + $spack_srcd || exit 1 + fi + for i in lib64 lib; do + if [ -d $path/$i ]; then + libpaths[$lib]="$path/$i" + break + fi + done + if [ -d $path/include ]; then + includepaths[$lib]="$path/include" + fi + done + IFS=$OFS + + local -A libs + local ld_library_path + for i in ${!libpaths[@]}; do + libs[LIB_${i^^*}]="${libpaths[$i]}" + path_contains ${libpaths[$i]} "${ld_exist}" || \ + ld_library_path+="${libpaths[$i]}:" + done + for i in ${!includepaths[@]}; do + eval [ "unset" = "\${INC_${i}:-unset}" ] && + print_env "INC_${i^^*}" "${includepaths[$i]}" + done + for i in ${!libs[@]}; do + eval [ "unset" = "\${${i}:-unset}" ] && print_env $i "${libs[$i]}" + done + [ -n "$ld_library_path" ] && \ + print_env LD_LIBRARY_PATH "${ld_library_path}\$LD_LIBRARY_PATH" +} + +source /usr/share/spack/setup-env.sh + +spack_srcd=false +( + [[ -n $ZSH_VERSION && $ZSH_EVAL_CONTEXT =~ :file$ ]] || + [[ -n $BASH_VERSION ]] && (return 0 2>/dev/null) +) && spack_srcd=true + +while [ -n "$1" ]; do + case $1 in + *-help|*-h) help; $spack_srcd || exit 0 ;; + *-csh|*-tcsh) + spack_shtyp=csh ;; + *) package_list+=" $1" ;; + esac + shift +done + +get_paths "$package_list"