diff --git a/.gitattributes b/.gitattributes index 9b03811..adf869f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,3 +21,5 @@ *.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/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 index 66000cb..4926a10 100644 --- 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 @@ -1,18 +1,20 @@ -From fbbddf93f0715830a6ae9842c91f89ae40973619 Mon Sep 17 00:00:00 2001 From: Egbert Eich -Date: Sat, 21 Nov 2020 21:46:02 +0100 -Subject: [PATCH 4/4] Adapt shell scripts that set up the environment for - different shells +Date: Wed Nov 10 13:01:17 2021 +0100 +Subject: Adapt shell scripts that set up the environment for different shells +Patch-mainline: Not yet +Git-repo: https://github.com/spack/spack +Git-commit: 565c91f4e3a40495fc470a8887df7dee9ced8c09 +References: 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 | 57 +++----------------------------------- - 3 files changed, 9 insertions(+), 68 deletions(-) - + 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 b70036456..ab3d941ef 100755 +index 4ac0503947..67fad7516c 100755 --- a/share/spack/setup-env.csh +++ b/share/spack/setup-env.csh @@ -12,6 +12,10 @@ @@ -26,8 +28,8 @@ index b70036456..ab3d941ef 100755 if ($?_sp_initializing) then exit 0 endif -@@ -59,7 +63,6 @@ alias spacktivate 'spack env activate' - alias _spack_pathadd 'set _pa_args = (\!*) && source $_spack_share_dir/csh/pathadd.csh' +@@ -71,7 +75,6 @@ foreach cmd ("$SPACK_PYTHON" python3 python python2) + end # Set variables needed by this script -_spack_pathadd PATH "$SPACK_ROOT/bin" @@ -35,10 +37,10 @@ index b70036456..ab3d941ef 100755 # Set up module search paths in the user environment diff --git a/share/spack/setup-env.fish b/share/spack/setup-env.fish -index b74eae34d..decb718e1 100755 +index d16ee617df..84e3a9e044 100755 --- a/share/spack/setup-env.fish +++ b/share/spack/setup-env.fish -@@ -660,20 +660,7 @@ end +@@ -671,12 +671,6 @@ end @@ -48,7 +50,13 @@ index b74eae34d..decb718e1 100755 -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. -# @@ -56,15 +64,16 @@ index b74eae34d..decb718e1 100755 -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 5761d1636..768866abe 100755 +index 5136e8a58a..6aef191129 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh -@@ -246,58 +246,6 @@ _sp_shell=$(_spack_determine_shell) +@@ -249,64 +249,6 @@ _sp_shell=$(_spack_determine_shell) alias spacktivate="spack env activate" @@ -98,8 +107,13 @@ index 5761d1636..768866abe 100755 -# -# 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. --_sp_share_dir="$(cd "$(dirname $_sp_source_file)" > /dev/null && pwd)" --_sp_prefix="$(cd "$(dirname $(dirname $_sp_share_dir))" > /dev/null && pwd)" +-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 @@ -120,24 +134,21 @@ index 5761d1636..768866abe 100755 - fi -fi -_spack_pathadd PATH "${_sp_prefix%/}/bin" - +- # # Check whether a function of the given name is defined -@@ -369,10 +317,13 @@ _sp_multi_pathadd() { - } - _sp_multi_pathadd MODULEPATH "$_sp_tcl_roots" - + # +@@ -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 [ "$_sp_shell" = bash ]; then + 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 ++ source $SPACK_ROOT/share/spack/spack-completion.bash fi # done: unset sentinel variable as we're no longer initializing --- -2.26.2 - 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..88e0e8d --- /dev/null +++ b/Fix-Spinx-configuration-to-avoid-throwing-errors.patch @@ -0,0 +1,56 @@ +From: Egbert Eich +Date: Wed Nov 10 16:30:14 2021 +0100 +Subject: Fix Spinx configuration to avoid throwing errors +Patch-mainline: Not yet +Git-repo: https://github.com/spack/spack +Git-commit: f8be4e346441f8d33b760ddfdc5fad360edf055d +References: + +- Ignore certain variables +- Don't attempt downloading ntersphinx inventory + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + lib/spack/docs/conf.py | 24 +++++++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) +diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py +index 2b58223e1d..95888cf5d4 100644 +--- a/lib/spack/docs/conf.py ++++ b/lib/spack/docs/conf.py +@@ -179,6 +179,28 @@ def setup(sphinx): + ('py:class', '_frozen_importlib_external.SourceFileLoader'), + # Spack classes that are private and we don't want to expose + ('py:class', 'spack.provider_index._IndexBase'), ++ ('py:class', 'datetime.datetime'), ++ ('py:class', 'argparse.ArgumentParser'), ++ ('py:class', 'argparse.RawTextHelpFormatter'), ++ ('py:class', 'argparse.Namespace'), ++ ('py:class', 'argparse.Action'), ++ ('py:class', 'ast.NodeVisitor'), ++ ('py:class', 'ast.NodeTransformer'), ++ ('py:class', 'ast.AST'), ++ ('py:class', 'collections.abc.MutableMapping'), ++ ('py:class', 'collections.abc.Sequence'), ++ ('py:class', 'collections.abc.Mapping'), ++ ('py:class', 'html.parser.HTMLParser'), ++ ('py:class', 'typing.IO'), ++ ('py:class', 'urllib.request.HTTPSHandler'), ++ ('py:obj', 'typing.Callable'), ++ ('py:obj', 'typing.IO'), ++ ('py:obj', 'bool'), ++ ('py:obj', 'dict'), ++ ('py:obj', 'int'), ++ ('py:obj', 'list'), ++ ('py:obj', 're'), ++ ('py:obj', 'str') + ] + + # The reST default role (used for this markup: `text`) to use for all documents. +@@ -381,5 +403,5 @@ class SpackStyle(DefaultStyle): + + # sphinx.ext.intersphinx + intersphinx_mapping = { +- "python": ("https://docs.python.org/3", None), ++ "python": ("https://docs.python.org/3", "objects.inv"), + } diff --git a/Fix-documentation-so-that-parser-doesn-t-stumble.patch b/Fix-documentation-so-that-parser-doesn-t-stumble.patch deleted file mode 100644 index b77ce99..0000000 --- a/Fix-documentation-so-that-parser-doesn-t-stumble.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Egbert Eich -Date: Thu Feb 4 07:51:10 2021 +0100 -Subject: Fix documentation so that parser doesn't stumble -Patch-mainline: Not yet -Git-commit: 7e787fef5e2c87c53166ee71670f1787300cced3 -References: - -Add argument to code-block:: - -Signed-off-by: Egbert Eich ---- - lib/spack/docs/build_systems/autotoolspackage.rst | 2 +- - lib/spack/docs/build_systems/pythonpackage.rst | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/lib/spack/docs/build_systems/autotoolspackage.rst b/lib/spack/docs/build_systems/autotoolspackage.rst -index a4c15e5..21913a6 100644 ---- a/lib/spack/docs/build_systems/autotoolspackage.rst -+++ b/lib/spack/docs/build_systems/autotoolspackage.rst -@@ -348,7 +348,7 @@ Defining ``with_or_without_verbs`` overrides the behavior of a - ``--with-openib`` for older versions of the package and specifying an - alternative dependency name: - --.. code-block:: -+.. code-block:: console - - --with-openib= - -diff --git a/lib/spack/docs/build_systems/pythonpackage.rst b/lib/spack/docs/build_systems/pythonpackage.rst -index c2da028..695b446 100644 ---- a/lib/spack/docs/build_systems/pythonpackage.rst -+++ b/lib/spack/docs/build_systems/pythonpackage.rst -@@ -90,7 +90,7 @@ Instead of using the ``PythonPackage`` base class, you should extend - the ``Package`` base class and implement the following custom installation - procedure: - --.. code-block:: -+.. code-block:: python - - def install(self, spec, prefix): - pip = which('pip') 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 index c98abf0..5ed5ee8 100644 --- a/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch +++ b/Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch @@ -1,70 +1,72 @@ From: Egbert Eich -Date: Thu Feb 4 09:17:55 2021 +0100 +Date: Wed Nov 10 09:40:47 2021 +0100 Subject: Fix error during documentation build due to recursive module inclusion Patch-mainline: Not yet -Git-commit: 0239763866f506f34357b30e9d882d1e8a87211e +Git-repo: https://github.com/spack/spack +Git-commit: ffc7c32398d3aad53a2f5700b6d6ddee9f0d8ef2 References: Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich --- - lib/spack/spack/build_environment.py | 3 ++- - lib/spack/spack/environment.py | 3 ++- - lib/spack/spack/main.py | 3 ++- - lib/spack/spack/user_environment.py | 3 ++- + lib/spack/spack/build_environment.py | 3 ++- + lib/spack/spack/environment/environment.py | 3 ++- + lib/spack/spack/main.py | 3 ++- + lib/spack/spack/user_environment.py | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py -index 3cf02dc..afd34c0 100644 +index 83aa634276..3f32ed39cf 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py -@@ -51,7 +51,8 @@ - import spack.build_systems.cmake +@@ -53,7 +53,8 @@ import spack.build_systems.meson import spack.config + import spack.install_test -import spack.main +if not ( "spack.main" in sys.modules ): + import spack.main - import spack.paths import spack.package - import spack.repo -diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py -index 7f7625f..e48929e 100644 ---- a/lib/spack/spack/environment.py -+++ b/lib/spack/spack/environment.py -@@ -30,7 +30,8 @@ - import spack.util.spack_json as sjson - import spack.util.spack_yaml as syaml - import spack.config + import spack.paths + import spack.platforms +diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py +index a6be5d1c50..a8d1008c46 100644 +--- a/lib/spack/spack/environment/environment.py ++++ b/lib/spack/spack/environment/environment.py +@@ -32,7 +32,8 @@ + import spack.stage + import spack.store + import spack.subprocess_context -import spack.user_environment as uenv +if not ( "spack.user_environment" in sys.modules ): + import spack.user_environment as uenv - from spack.filesystem_view import YamlFilesystemView + import spack.util.cpus import spack.util.environment - import spack.architecture as architecture + import spack.util.hash diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py -index f4265a5..494a9ce 100644 +index 31a4bfe4ed..dfb2078d4f 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py -@@ -31,7 +31,8 @@ - import spack.architecture - import spack.config +@@ -36,7 +36,8 @@ + import spack import spack.cmd + import spack.config -import spack.environment as ev +if not ( "spack.environment" in sys.modules ): + import spack.environment as ev + import spack.modules import spack.paths - import spack.repo - import spack.store + import spack.platforms diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py -index f08f21e..8925246 100644 +index 55f516b732..824583d2ef 100644 --- a/lib/spack/spack/user_environment.py +++ b/lib/spack/spack/user_environment.py -@@ -8,7 +8,8 @@ - import spack.config - import spack.util.prefix as prefix - import spack.util.environment as environment --import spack.build_environment as build_env -+if not ( "spack.build_environment" in sys.modules ): -+ import spack.build_environment as build_env +@@ -5,7 +5,8 @@ + import os + import sys - #: Environment variable name Spack uses to track individually loaded packages - spack_loaded_hashes_var = 'SPACK_LOADED_HASHES' +-import spack.build_environment ++if not ( "spack.build_environment" in sys.modules ): ++ import spack.build_environment + import spack.config + import spack.util.environment as environment + import spack.util.prefix as prefix diff --git a/Make-spack-paths-compliant-to-distro-installation.patch b/Make-spack-paths-compliant-to-distro-installation.patch index f357d50..1b60ed6 100644 --- a/Make-spack-paths-compliant-to-distro-installation.patch +++ b/Make-spack-paths-compliant-to-distro-installation.patch @@ -1,68 +1,42 @@ -From f0ccc0fee51e272776af8b4f85f4b4d2d2854bf7 Mon Sep 17 00:00:00 2001 From: Egbert Eich -Date: Tue, 22 Sep 2020 09:42:40 +0200 -Subject: [PATCH 2/4] Make spack paths compliant to distro installation +Date: Wed Nov 10 09:40:07 2021 +0100 +Subject: Make spack paths compliant to distro installation +Patch-mainline: Not yet +Git-repo: https://github.com/spack/spack +Git-commit: f91da8159ac285f41d215f0bf7d3a15461e63324 +References: + +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 Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich --- - etc/spack/defaults/config.yaml | 8 ++++---- - etc/spack/defaults/repos.yaml | 2 +- - lib/spack/spack/paths.py | 2 +- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml -index d1a7f35a6..4813a8a0a 100644 ---- a/etc/spack/defaults/config.yaml -+++ b/etc/spack/defaults/config.yaml -@@ -31,13 +31,13 @@ config: - - # Locations where templates should be found - template_dirs: -- - $spack/share/spack/templates -+ - /usr/share/spack/templates - - - # Locations where different types of modules should be installed. - module_roots: -- tcl: $spack/share/spack/modules -- lmod: $spack/share/spack/lmod -+ tcl: /usr/share/spack/modules -+ lmod: /usr/share/spack/lmod - - - # Temporary locations Spack can try to use for builds. -@@ -77,7 +77,7 @@ config: - - # Cache directory for already downloaded source tarballs and archived - # repositories. This can be purged with `spack clean --downloads`. -- source_cache: $spack/var/spack/cache -+ source_cache: /var/spack/cache - - - # Cache directory for miscellaneous files, like the package index. -diff --git a/etc/spack/defaults/repos.yaml b/etc/spack/defaults/repos.yaml -index f3e00653e..246919425 100644 ---- a/etc/spack/defaults/repos.yaml -+++ b/etc/spack/defaults/repos.yaml -@@ -11,4 +11,4 @@ - # ~/.spack/repos.yaml - # ------------------------------------------------------------------------- - repos: -- - $spack/var/spack/repos/builtin -+ - /var/lib/spack/repos/builtin + lib/spack/spack/paths.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/paths.py b/lib/spack/spack/paths.py -index 9c803cba7..f16e8ca54 100644 +index 6b3543406b..bb16e14145 100644 --- a/lib/spack/spack/paths.py +++ b/lib/spack/spack/paths.py -@@ -39,7 +39,7 @@ +@@ -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") + +@@ -49,7 +49,7 @@ + # + # 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") - tests_path = os.path.join(var_path, "tests") - share_path = os.path.join(prefix, "share", "spack") --- -2.26.2 - diff --git a/Set-modules-default-to-lmod.patch b/Set-modules-default-to-lmod.patch new file mode 100644 index 0000000..eff6608 --- /dev/null +++ b/Set-modules-default-to-lmod.patch @@ -0,0 +1,26 @@ +From: Egbert Eich +Date: Wed Nov 10 20:28:29 2021 +0100 +Subject: Set modules default to lmod +Patch-mainline: Not yet +Git-repo: https://github.com/spack/spack +Git-commit: fc190d74554d93e1907a6d56aeaeb35d328c4e22 +References: + +Signed-off-by: Egbert Eich +Signed-off-by: Egbert Eich +--- + etc/spack/defaults/modules.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/etc/spack/defaults/modules.yaml b/etc/spack/defaults/modules.yaml +index 27b7c45f66..09e572067b 100644 +--- a/etc/spack/defaults/modules.yaml ++++ b/etc/spack/defaults/modules.yaml +@@ -44,7 +44,7 @@ modules: + # lmod: $spack/share/spack/lmod + # What type of modules to use + enable: +- - tcl ++ - lmod + + # Default configurations if lmod is enabled + lmod: 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/added-dockerfile-for-opensuse-leap-15.patch b/added-dockerfile-for-opensuse-leap-15.patch deleted file mode 100644 index aace121..0000000 --- a/added-dockerfile-for-opensuse-leap-15.patch +++ /dev/null @@ -1,77 +0,0 @@ -From d9b88381189ca860cd63c48a53d2298fd8d206db Mon Sep 17 00:00:00 2001 -From: Christian Goll -Date: Tue, 24 Nov 2020 16:35:32 +0100 -Subject: [PATCH 1/2] added dockerfile for opensuse leap 15 - ---- - share/spack/docker/leap-15.dockerfile | 58 +++++++++++++++++++++++++++ - 1 file changed, 58 insertions(+) - create mode 100644 share/spack/docker/leap-15.dockerfile - -diff --git a/share/spack/docker/leap-15.dockerfile b/share/spack/docker/leap-15.dockerfile -new file mode 100644 -index 000000000..36054cd44 ---- /dev/null -+++ b/share/spack/docker/leap-15.dockerfile -@@ -0,0 +1,58 @@ -+FROM opensuse/leap:15.2 -+MAINTAINER SUSE HPC -+ -+ENV DOCKERFILE_BASE=opensuse \ -+ DOCKERFILE_DISTRO=opensuse_leap \ -+ DOCKERFILE_DISTRO_VERSION=15.2 \ -+ SPACK_ROOT_DOCKER=/opt/spack \ -+ DEBIAN_FRONTEND=noninteractive \ -+ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ -+ container=docker -+ -+COPY bin $SPACK_ROOT/bin -+COPY etc $SPACK_ROOT/etc -+COPY lib $SPACK_ROOT/lib -+COPY share $SPACK_ROOT/share -+COPY var $SPACK_ROOT/var -+ -+ -+RUN mkdir -p $SPACK_ROOT/opt/spack -+ -+RUN zypper ref && \ -+ zypper up -y && \ -+ zypper in -y python3-base \ -+ xz gzip tar bzip2 curl patch \ -+ gcc-c++ make cmake automake&&\ -+ zypper clean -+ -+# clean up manpages -+RUN rm -rf /var/cache/zypp/* \ -+ rm -rf /usr/share/doc/packages/* \ -+ rm -rf /usr/share/doc/manual/* -+ -+ -+RUN mkdir -p /root/.spack \ -+ && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ -+ /root/.spack/modules.yaml \ -+ && rm -rf /root/*.* /run/nologin $SPACK_ROOT/.git -+ -+# [WORKAROUND] -+# https://superuser.com/questions/1241548/ -+# xubuntu-16-04-ttyname-failed-inappropriate-ioctl-for-device#1253889 -+RUN [ -f ~/.profile ] \ -+ && sed -i 's/mesg n/( tty -s \\&\\& mesg n || true )/g' ~/.profile \ -+ || true -+ -+WORKDIR /root -+SHELL ["docker-shell"] -+ -+# Find tools which are in distro -+RUN spack external find --scope system -+ -+# TODO: add a command to Spack that (re)creates the package cache -+RUN spack spec hdf5+mpi -+ -+ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"] -+CMD ["interactive-shell"] -+ -+ --- -2.26.2 - diff --git a/basic-exclude-pattern-for-external-find.patch b/basic-exclude-pattern-for-external-find.patch deleted file mode 100644 index 82c5d99..0000000 --- a/basic-exclude-pattern-for-external-find.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 03bf4e89802b626278a4b14b4349ee94aa722965 Mon Sep 17 00:00:00 2001 -From: Christian Goll -Date: Fri, 26 Feb 2021 14:21:04 +0100 -Subject: [PATCH] basic exclude pattern for external find - ---- - lib/spack/spack/cmd/external.py | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py -index 52af72ed8f..ff583d9e87 100644 ---- a/lib/spack/spack/cmd/external.py -+++ b/lib/spack/spack/cmd/external.py -@@ -42,6 +42,9 @@ def setup_parser(subparser): - '--scope', choices=scopes, metavar=scopes_metavar, - default=spack.config.default_modify_scope('packages'), - help="configuration scope to modify") -+ find_parser.add_argument( -+ '--exclude', -+ help="do not call binaries with this regular pattern for the search") - find_parser.add_argument('packages', nargs=argparse.REMAINDER) - - sp.add_parser( -@@ -153,7 +156,7 @@ def external_find(args): - else: - packages_to_check = spack.repo.path.all_packages() - -- pkg_to_entries = _get_external_packages(packages_to_check) -+ pkg_to_entries = _get_external_packages(packages_to_check,args.exclude) - new_entries = _update_pkg_config( - args.scope, pkg_to_entries, args.not_buildable - ) -@@ -236,7 +239,7 @@ def _update_pkg_config(scope, pkg_to_entries, not_buildable): - return all_new_specs - - --def _get_external_packages(packages_to_check, system_path_to_exe=None): -+def _get_external_packages(packages_to_check,exclude_binaries=None, system_path_to_exe=None): - if not system_path_to_exe: - system_path_to_exe = _get_system_executables() - -@@ -247,12 +250,17 @@ def _get_external_packages(packages_to_check, system_path_to_exe=None): - exe_pattern_to_pkgs[exe].append(pkg) - - pkg_to_found_exes = defaultdict(set) -+ if exclude_binaries: -+ compiled_exclude = re.compile(exclude_binaries) -+ else: -+ compiled_exclude = None - for exe_pattern, pkgs in exe_pattern_to_pkgs.items(): - compiled_re = re.compile(exe_pattern) - for path, exe in system_path_to_exe.items(): -- if compiled_re.search(exe): -- for pkg in pkgs: -- pkg_to_found_exes[pkg].add(path) -+ if not compiled_exclude or not compiled_exclude.search(exe): -+ if compiled_re.search(exe): -+ for pkg in pkgs: -+ pkg_to_found_exes[pkg].add(path) - - pkg_to_entries = defaultdict(list) - resolved_specs = {} # spec -> exe found for the spec --- -2.26.2 - diff --git a/objects.inv b/objects.inv new file mode 100644 index 0000000..aa68198 --- /dev/null +++ b/objects.inv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9494d0f318cc65c0871829455a4a4c08948b557a585ac26d83216ac8a93f7bc1 +size 112656 diff --git a/run-find-external.sh b/run-find-external.sh index 8f40e7e..bdbac4d 100644 --- a/run-find-external.sh +++ b/run-find-external.sh @@ -19,11 +19,18 @@ mypath=/usr/lib64/mpi/gcc/openmpi2/bin:${mypath} mypath=/usr/lib64/mpi/gcc/openmpi1/bin:${mypath} mypath=/usr/lib64/mpi/gcc/mvapich2/bin:${mypath} mypath=/usr/lib64/mpi/gcc/mpich/bin:${mypath} +mypath=/usr/lib/hpc/gnu?/mpi/openmpi/4.*/bin:${mypath} +mypath=/usr/lib/hpc/gnu?/mpi/openmpi/3.*/bin:${mypath} +mypath=/usr/lib/hpc/gnu?/mpi/openmpi/2.*/bin:${mypath} +mypath=/usr/lib/hpc/gnu?/mpi/mpich/3.*/bin:${mypath} +mypath=/usr/lib/hpc/gnu?/mpi/mvapich2/2.*/bin:${mypath} + + # test if we can run as nobody getent passwd nobody &> /dev/null if [ "x$?" == "x0" ] ; then # drop all root rights, when calling external find - sudo -u nobody PATH=${mypath}:${PATH} spack external find --scope user --exclude 'installdbgsymbols' + sudo -u nobody PATH=${mypath}:${PATH} spack external find --scope user #--exclude 'installdbgsymbols' if [ -e /var/lib/nobody/.spack/packages.yaml ] ; then mv -v /var/lib/nobody/.spack/packages.yaml /etc/spack/packages.yaml chown root:root /etc/spack/packages.yaml @@ -31,5 +38,5 @@ if [ "x$?" == "x0" ] ; then fi else # May run in a container... - PATH=${mypath}:${PATH} spack external find --scope system --exclude 'installdbgsymbols' + PATH=${mypath}:${PATH} spack external find --scope system #--exclude 'installdbgsymbols' fi diff --git a/spack-0.16.3.tar.gz b/spack-0.16.3.tar.gz deleted file mode 100644 index 36675ed..0000000 --- a/spack-0.16.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:26636a2e2cc066184f12651ac6949f978fc041990dba73934960a4c9c1ea383d -size 5543891 diff --git a/spack-0.17.0.tar.gz b/spack-0.17.0.tar.gz new file mode 100644 index 0000000..2c55918 --- /dev/null +++ b/spack-0.17.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:93df99256a892ceefb153d48e2080c01d18e58e27773da2c2a469063d67cb582 +size 6747773 diff --git a/spack.changes b/spack.changes index afa52aa..72e8017 100644 --- a/spack.changes +++ b/spack.changes @@ -1,3 +1,97 @@ +------------------------------------------------------------------- +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 diff --git a/spack.spec b/spack.spec index f1b0fe4..1f0a893 100644 --- a/spack.spec +++ b/spack.spec @@ -36,7 +36,7 @@ ExclusiveArch: do_not_build # non oss packages %define spack_trigger_external cuda-nvcc Name: spack -Version: 0.16.3 +Version: 0.17.0 Release: 0 Summary: Package manager for HPC systems License: Apache-2.0 AND MIT AND Python-2.0 AND BSD-3-Clause @@ -46,16 +46,14 @@ Source1: README.SUSE Source2: spack-rpmlintrc Source3: run-find-external.sh Source4: https://en.opensuse.org/index.php?title=Spack&action=raw&ref=157522#/README-oo-wiki -Patch0: Make-spack-paths-compliant-to-distro-installation.patch +Source5: https://docs.python.org/3/objects.inv Patch1: fix-tumbleweed-naming.patch Patch2: Adapt-shell-scripts-that-set-up-the-environment-for-different-shells.patch -Patch3: added-dockerfile-for-opensuse-leap-15.patch Patch4: added-target-and-os-calls-to-output-of-spack-spec-co.patch -Patch5: Fix-documentation-so-that-parser-doesn-t-stumble.patch +Patch5: Make-spack-paths-compliant-to-distro-installation.patch Patch6: Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch -Patch7: basic-exclude-pattern-for-external-find.patch -# upstream patch removes also problemtatic binaries -#Patch4: spack-test-15702.patch +Patch7: Fix-Spinx-configuration-to-avoid-throwing-errors.patch +Patch8: Set-modules-default-to-lmod.patch %if %{without doc} BuildRequires: fdupes BuildRequires: lua-lmod @@ -66,6 +64,7 @@ BuildRequires: sudo BuildRequires: sysuser-tools Requires: %{name}-recipes = %{version} Requires: bzip2 +Requires: coreutils Requires: curl Requires: gcc-c++ Requires: gcc-fortran @@ -75,16 +74,18 @@ Requires: lua-lmod Requires: make Requires: patch Requires: polkit +Requires: python3-clingo Requires: sudo Requires: tar Requires: xz Recommends: %spack_trigger_recommended Recommends: spack-recipes = %version %else -BuildRequires: %{python_module Sphinx >= 1.8} -BuildRequires: %{python_module sphinxcontrib-programoutput} BuildRequires: git BuildRequires: makeinfo +# Hardcode this - there is no python2 version of this around any more. +BuildRequires: python3-Sphinx >= 3.4 +BuildRequires: python3-sphinxcontrib-programoutput BuildRequires: spack # html BuildRequires: graphviz @@ -164,12 +165,48 @@ This package contains the info page. 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 +for file in $(find . -type f); do + sed -e 's@$spack/opt@/opt@g' \ + -e 's@$spack/share/spack/modules@/opt/spack/modules@g' \ + -e 's@$spack/share/spack/lmod@/opt/spack/modules@g' \ + -e 's@$spack/var@/var/lib@g' \ + -i $file +done + %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 @@ -194,7 +231,9 @@ compilers: unset: [] extra_rpaths: [] EOF -make man info #text dirhtml +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 %endif @@ -393,6 +432,9 @@ fi sed -i "s@HOSTTYPE@$HOSTTYPE@" %{spack_dir}/etc/spack/compilers.yaml # find installed programms /usr/lib/spack/run-find-external.sh +mkdir -p /opt/spack +chgrp spack /opt/spack +chmod 0775 /opt/spack %triggerin -- %{?spack_trigger_recommended} %{?spack_trigger_packages} %{?spack_trigger_external} /usr/lib/spack/run-find-external.sh