diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 7167c14426e7e6..310e635735d15e 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -154,26 +154,27 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 with: - python-version: '3.11' + python-version: '3.13' - name: Install System packages run: | sudo apt-get -y update - sudo apt-get -y install coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build kcov + sudo apt-get -y install coreutils gfortran graphviz gnupg2 - name: Install Python packages run: | - pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo pytest-xdist + pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo pip install --upgrade flake8 "isort>=4.3.5" "mypy>=0.900" "click" "black" - - name: Setup git configuration - run: | - # Need this for the git tests to succeed. - git --version - . .github/workflows/bin/setup_git.sh - name: Run unit tests (full suite with coverage) env: COVERAGE: true COVERAGE_FILE: coverage/.coverage-clingo-cffi run: | - share/spack/qa/run-unit-tests + . share/spack/setup-env.sh + spack bootstrap disable spack-install + spack bootstrap disable github-actions-v0.4 + spack bootstrap disable github-actions-v0.5 + spack bootstrap status + spack solve zlib + spack unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml lib/spack/spack/test/concretize.py - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: name: coverage-clingo-cffi diff --git a/lib/spack/docs/developer_guide.rst b/lib/spack/docs/developer_guide.rst index 134f0f540f63c8..f538f75206644c 100644 --- a/lib/spack/docs/developer_guide.rst +++ b/lib/spack/docs/developer_guide.rst @@ -712,27 +712,27 @@ Release branches ^^^^^^^^^^^^^^^^ There are currently two types of Spack releases: :ref:`major releases -` (``0.17.0``, ``0.18.0``, etc.) and :ref:`point releases -` (``0.17.1``, ``0.17.2``, ``0.17.3``, etc.). Here is a +` (``0.21.0``, ``0.22.0``, etc.) and :ref:`patch releases +` (``0.22.1``, ``0.22.2``, ``0.22.3``, etc.). Here is a diagram of how Spack release branches work:: - o branch: develop (latest version, v0.19.0.dev0) + o branch: develop (latest version, v0.23.0.dev0) | o - | o branch: releases/v0.18, tag: v0.18.1 + | o branch: releases/v0.22, tag: v0.22.1 o | - | o tag: v0.18.0 + | o tag: v0.22.0 o | | o |/ o | o - | o branch: releases/v0.17, tag: v0.17.2 + | o branch: releases/v0.21, tag: v0.21.2 o | - | o tag: v0.17.1 + | o tag: v0.21.1 o | - | o tag: v0.17.0 + | o tag: v0.21.0 o | | o |/ @@ -743,8 +743,8 @@ requests target ``develop``. The ``develop`` branch will report that its version is that of the next **major** release with a ``.dev0`` suffix. Each Spack release series also has a corresponding branch, e.g. -``releases/v0.18`` has ``0.18.x`` versions of Spack, and -``releases/v0.17`` has ``0.17.x`` versions. A major release is the first +``releases/v0.22`` has ``v0.22.x`` versions of Spack, and +``releases/v0.21`` has ``v0.21.x`` versions. A major release is the first tagged version on a release branch. Minor releases are back-ported from develop onto release branches. This is typically done by cherry-picking bugfix commits off of ``develop``. @@ -774,27 +774,40 @@ for more details. Scheduling work for releases ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -We schedule work for releases by creating `GitHub projects -`_. At any time, there may be -several open release projects. For example, below are two releases (from -some past version of the page linked above): +We schedule work for **major releases** through `milestones +`_ and `GitHub Projects +`_, while **patch releases** use `labels +`_. -.. image:: images/projects.png +There is only one milestone open at a time. Its name corresponds to the next major version, for +example ``v0.23``. Important issues and pull requests should be assigned to this milestone by +core developers, so that they are not forgotten at the time of release. The milestone is closed +when the release is made, and a new milestone is created for the next major release. -This image shows one release in progress for ``0.15.1`` and another for -``0.16.0``. Each of these releases has a project board containing issues -and pull requests. GitHub shows a status bar with completed work in -green, work in progress in purple, and work not started yet in gray, so -it's fairly easy to see progress. +Bug reports in GitHub issues are automatically labelled ``bug`` and ``triage``. Spack developers +assign one of the labels ``impact-low``, ``impact-medium`` or ``impact-high``. This will make the +issue appear in the `Triaged bugs `_ project board. +Important issues should be assigned to the next milestone as well, so they appear at the top of +the project board. -Spack's project boards are not firm commitments so we move work between -releases frequently. If we need to make a release and some tasks are not -yet done, we will simply move them to the next minor or major release, rather -than delaying the release to complete them. +Spack's milestones are not firm commitments so we move work between releases frequently. If we +need to make a release and some tasks are not yet done, we will simply move them to the next major +release milestone, rather than delaying the release to complete them. -For more on using GitHub project boards, see `GitHub's documentation -`_. +^^^^^^^^^^^^^^^^^^^^^ +Backporting bug fixes +^^^^^^^^^^^^^^^^^^^^^ +When a bug is fixed in the ``develop`` branch, it is often necessary to backport the fix to one +(or more) of the ``release/vX.Y`` branches. Only the release manager is responsible for doing +backports, but Spack maintainers are responsible for labelling pull requests (and issues if no bug +fix is available yet) with ``vX.Y.Z`` labels. The label should correspond to the next patch version +that the bug fix should be backported to. + +Backports are done publicly by the release manager using a pull request named ``Backports vX.Y.Z``. +This pull request is opened from the ``backports/vX.Y.Z`` branch, targets the ``releases/vX.Y`` +branch and contains a (growing) list of cherry-picked commits from the ``develop`` branch. +Typically there are one or two backport pull requests open at any given time. .. _major-releases: @@ -802,25 +815,21 @@ For more on using GitHub project boards, see `GitHub's documentation Making major releases ^^^^^^^^^^^^^^^^^^^^^ -Assuming a project board has already been created and all required work -completed, the steps to make the major release are: - -#. Create two new project boards: +Assuming all required work from the milestone is completed, the steps to make the major release +are: - * One for the next major release - * One for the next point release +#. `Create a new milestone `_ for the next major + release. -#. Move any optional tasks that are not done to one of the new project boards. +#. `Create a new label `_ for the next patch release. - In general, small bugfixes should go to the next point release. Major - features, refactors, and changes that could affect concretization should - go in the next major release. +#. Move any optional tasks that are not done to the next milestone. #. Create a branch for the release, based on ``develop``: .. code-block:: console - $ git checkout -b releases/v0.15 develop + $ git checkout -b releases/v0.23 develop For a version ``vX.Y.Z``, the branch's name should be ``releases/vX.Y``. That is, you should create a ``releases/vX.Y`` @@ -856,8 +865,8 @@ completed, the steps to make the major release are: Create a pull request targeting the ``develop`` branch, bumping the major version in ``lib/spack/spack/__init__.py`` with a ``dev0`` release segment. - For instance when you have just released ``v0.15.0``, set the version - to ``(0, 16, 0, 'dev0')`` on ``develop``. + For instance when you have just released ``v0.23.0``, set the version + to ``(0, 24, 0, 'dev0')`` on ``develop``. #. Follow the steps in :ref:`publishing-releases`. @@ -866,82 +875,52 @@ completed, the steps to make the major release are: #. Follow the steps in :ref:`announcing-releases`. -.. _point-releases: +.. _patch-releases: ^^^^^^^^^^^^^^^^^^^^^ -Making point releases +Making patch releases ^^^^^^^^^^^^^^^^^^^^^ -Assuming a project board has already been created and all required work -completed, the steps to make the point release are: - -#. Create a new project board for the next point release. - -#. Move any optional tasks that are not done to the next project board. - -#. Check out the release branch (it should already exist). - - For the ``X.Y.Z`` release, the release branch is called ``releases/vX.Y``. - For ``v0.15.1``, you would check out ``releases/v0.15``: - - .. code-block:: console - - $ git checkout releases/v0.15 - -#. If a pull request to the release branch named ``Backports vX.Y.Z`` is not already - in the project, create it. This pull request ought to be created as early as - possible when working on a release project, so that we can build the release - commits incrementally, and identify potential conflicts at an early stage. - -#. Cherry-pick each pull request in the ``Done`` column of the release - project board onto the ``Backports vX.Y.Z`` pull request. - - This is **usually** fairly simple since we squash the commits from the - vast majority of pull requests. That means there is only one commit - per pull request to cherry-pick. For example, `this pull request - `_ has three commits, but - they were squashed into a single commit on merge. You can see the - commit that was created here: - - .. image:: images/pr-commit.png - - You can easily cherry pick it like this (assuming you already have the - release branch checked out): +To make the patch release process both efficient and transparent, we use a *backports pull request* +which contains cherry-picked commits from the ``develop`` branch. The majority of the work is to +cherry-pick the bug fixes, which ideally should be done as soon as they land on ``develop``: +this ensures cherry-picking happens in order, and makes conflicts easier to resolve since the +changes are fresh in the mind of the developer. - .. code-block:: console +The backports pull request is always titled ``Backports vX.Y.Z`` and is labelled ``backports``. It +is opened from a branch named ``backports/vX.Y.Z`` and targets the ``releases/vX.Y`` branch. - $ git cherry-pick 7e46da7 +Whenever a pull request labelled ``vX.Y.Z`` is merged, cherry-pick the associated squashed commit +on ``develop`` to the ``backports/vX.Y.Z`` branch. For pull requests that were rebased (or not +squashed), cherry-pick each associated commit individually. Never force push to the +``backports/vX.Y.Z`` branch. - For pull requests that were rebased (or not squashed), you'll need to - cherry-pick each associated commit individually. +.. warning:: - .. warning:: + Sometimes you may **still** get merge conflicts even if you have + cherry-picked all the commits in order. This generally means there + is some other intervening pull request that the one you're trying + to pick depends on. In these cases, you'll need to make a judgment + call regarding those pull requests. Consider the number of affected + files and/or the resulting differences. - It is important to cherry-pick commits in the order they happened, - otherwise you can get conflicts while cherry-picking. When - cherry-picking look at the merge date, - **not** the number of the pull request or the date it was opened. + 1. If the changes are small, you might just cherry-pick it. - Sometimes you may **still** get merge conflicts even if you have - cherry-picked all the commits in order. This generally means there - is some other intervening pull request that the one you're trying - to pick depends on. In these cases, you'll need to make a judgment - call regarding those pull requests. Consider the number of affected - files and or the resulting differences. + 2. If the changes are large, then you may decide that this fix is not + worth including in a patch release, in which case you should remove + the label from the pull request. Remember that large, manual backports + are seldom the right choice for a patch release. - 1. If the dependency changes are small, you might just cherry-pick it, - too. If you do this, add the task to the release board. +When all commits are cherry-picked in the ``backports/vX.Y.Z`` branch, make the patch +release as follows: - 2. If the changes are large, then you may decide that this fix is not - worth including in a point release, in which case you should remove - the task from the release project. +#. `Create a new label `_ ``vX.Y.{Z+1}`` for the next patch + release. - 3. You can always decide to manually back-port the fix to the release - branch if neither of the above options makes sense, but this can - require a lot of work. It's seldom the right choice. +#. Replace the label ``vX.Y.Z`` with ``vX.Y.{Z+1}`` for all PRs and issues that are not done. -#. When all the commits from the project board are cherry-picked into - the ``Backports vX.Y.Z`` pull request, you can push a commit to: +#. Manually push a single commit with commit message ``Set version to vX.Y.Z`` to the + ``backports/vX.Y.Z`` branch, that both bumps the Spack version number and updates the changelog: 1. Bump the version in ``lib/spack/spack/__init__.py``. 2. Update ``CHANGELOG.md`` with a list of the changes. @@ -950,20 +929,22 @@ completed, the steps to make the point release are: release branch. See `the changelog from 0.14.1 `_. -#. Merge the ``Backports vX.Y.Z`` PR with the **Rebase and merge** strategy. This - is needed to keep track in the release branch of all the commits that were - cherry-picked. - -#. Make sure CI passes on the release branch, including: +#. Make sure CI passes on the **backports pull request**, including: * Regular unit tests * Build tests * The E4S pipeline at `gitlab.spack.io `_ - If CI does not pass, you'll need to figure out why, and make changes - to the release branch until it does. You can make more commits, modify - or remove cherry-picked commits, or cherry-pick **more** from - ``develop`` to make this happen. +#. Merge the ``Backports vX.Y.Z`` PR with the **Rebase and merge** strategy. This + is needed to keep track in the release branch of all the commits that were + cherry-picked. + +#. Make sure CI passes on the last commit of the **release branch**. + +#. In the rare case you need to include additional commits in the patch release after the backports + PR is merged, it is best to delete the last commit ``Set version to vX.Y.Z`` from the release + branch with a single force push, open a new backports PR named ``Backports vX.Y.Z (2)``, and + repeat the process. Avoid repeated force pushes to the release branch. #. Follow the steps in :ref:`publishing-releases`. @@ -1038,25 +1019,31 @@ Updating `releases/latest` If the new release is the **highest** Spack release yet, you should also tag it as ``releases/latest``. For example, suppose the highest -release is currently ``0.15.3``: +release is currently ``0.22.3``: -* If you are releasing ``0.15.4`` or ``0.16.0``, then you should tag - it with ``releases/latest``, as these are higher than ``0.15.3``. +* If you are releasing ``0.22.4`` or ``0.23.0``, then you should tag + it with ``releases/latest``, as these are higher than ``0.22.3``. * If you are making a new release of an **older** major version of - Spack, e.g. ``0.14.4``, then you should not tag it as + Spack, e.g. ``0.21.4``, then you should not tag it as ``releases/latest`` (as there are newer major versions). -To tag ``releases/latest``, do this: +To do so, first fetch the latest tag created on GitHub, since you may not have it locally: + +.. code-block:: console + + $ git fetch --force git@github.com:spack/spack vX.Y.Z + +Then tag ``vX.Y.Z`` as ``releases/latest`` and push the individual tag to GitHub. .. code-block:: console - $ git checkout releases/vX.Y # vX.Y is the new release's branch - $ git tag --force releases/latest - $ git push --force --tags + $ git tag --force releases/latest vX.Y.Z + $ git push --force git@github.com:spack/spack releases/latest -The ``--force`` argument to ``git tag`` makes ``git`` overwrite the existing -``releases/latest`` tag with the new one. +The ``--force`` argument to ``git tag`` makes ``git`` overwrite the existing ``releases/latest`` +tag with the new one. Do **not** use the ``--tags`` flag when pushing, since this will push *all* +local tags. .. _announcing-releases: diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst index f2eb0fa9a0466a..eec185eab89e20 100644 --- a/lib/spack/docs/environments.rst +++ b/lib/spack/docs/environments.rst @@ -425,9 +425,13 @@ Developing Packages in a Spack Environment The ``spack develop`` command allows one to develop Spack packages in an environment. It requires a spec containing a concrete version, and -will configure Spack to install the package from local source. By -default, it will also clone the package to a subdirectory in the -environment. This package will have a special variant ``dev_path`` +will configure Spack to install the package from local source. +If a version is not provided from the command line interface then spack +will automatically pick the highest version the package has defined. +This means any infinity versions (``develop``, ``main``, ``stable``) will be +preferred in this selection process. +By default, ``spack develop`` will also clone the package to a subdirectory in the +environment for the local source. This package will have a special variant ``dev_path`` set, and Spack will ensure the package and its dependents are rebuilt any time the environment is installed if the package's local source code has been modified. Spack's native implementation to check for modifications diff --git a/lib/spack/docs/images/pr-commit.png b/lib/spack/docs/images/pr-commit.png deleted file mode 100644 index a87c800ef5d282..00000000000000 Binary files a/lib/spack/docs/images/pr-commit.png and /dev/null differ diff --git a/lib/spack/docs/images/projects.png b/lib/spack/docs/images/projects.png deleted file mode 100644 index bd2971ff625ddb..00000000000000 Binary files a/lib/spack/docs/images/projects.png and /dev/null differ diff --git a/lib/spack/spack/cmd/develop.py b/lib/spack/spack/cmd/develop.py index 0a9b7d13875ad3..1025b1bb691550 100644 --- a/lib/spack/spack/cmd/develop.py +++ b/lib/spack/spack/cmd/develop.py @@ -85,8 +85,14 @@ def _retrieve_develop_source(spec: spack.spec.Spec, abspath: str) -> None: def develop(parser, args): + # Note: we could put develop specs in any scope, but I assume + # users would only ever want to do this for either (a) an active + # env or (b) a specified config file (e.g. that is included by + # an environment) + # TODO: when https://github.com/spack/spack/pull/35307 is merged, + # an active env is not required if a scope is specified + env = spack.cmd.require_active_env(cmd_name="develop") if not args.spec: - env = spack.cmd.require_active_env(cmd_name="develop") if args.clone is False: raise SpackError("No spec provided to spack develop command") @@ -116,16 +122,18 @@ def develop(parser, args): raise SpackError("spack develop requires at most one named spec") spec = specs[0] + version = spec.versions.concrete_range_as_version if not version: - raise SpackError("Packages to develop must have a concrete version") + # look up the maximum version so infintiy versions are preferred for develop + version = max(spec.package_class.versions.keys()) + tty.msg(f"Defaulting to highest version: {spec.name}@{version}") spec.versions = spack.version.VersionList([version]) # If user does not specify --path, we choose to create a directory in the # active environment's directory, named after the spec path = args.path or spec.name if not os.path.isabs(path): - env = spack.cmd.require_active_env(cmd_name="develop") abspath = spack.util.path.canonicalize_path(path, default_wd=env.path) else: abspath = path @@ -149,13 +157,6 @@ def develop(parser, args): _retrieve_develop_source(spec, abspath) - # Note: we could put develop specs in any scope, but I assume - # users would only ever want to do this for either (a) an active - # env or (b) a specified config file (e.g. that is included by - # an environment) - # TODO: when https://github.com/spack/spack/pull/35307 is merged, - # an active env is not required if a scope is specified - env = spack.cmd.require_active_env(cmd_name="develop") tty.debug("Updating develop config for {0} transactionally".format(env.name)) with env.write_transaction(): if args.build_directory is not None: diff --git a/lib/spack/spack/environment/depfile.py b/lib/spack/spack/environment/depfile.py index 06dc8f157d05ec..38d673192be591 100644 --- a/lib/spack/spack/environment/depfile.py +++ b/lib/spack/spack/environment/depfile.py @@ -9,11 +9,13 @@ import os import re +import shlex from enum import Enum from typing import List, Optional import spack.deptypes as dt import spack.environment.environment as ev +import spack.paths import spack.spec import spack.traverse as traverse @@ -226,6 +228,7 @@ def to_dict(self): "install_deps_target": self._target("install-deps"), "any_hash_target": self._target("%"), "jobserver_support": self.jobserver_support, + "spack_script": shlex.quote(spack.paths.spack_script), "adjacency_list": self.make_adjacency_list, "phony_convenience_targets": " ".join(self.phony_convenience_targets), "pkg_ids_variable": self.pkg_identifier_variable, diff --git a/lib/spack/spack/test/cmd/develop.py b/lib/spack/spack/test/cmd/develop.py index 202e165165c4c4..c0cbb003ec1e2e 100644 --- a/lib/spack/spack/test/cmd/develop.py +++ b/lib/spack/spack/test/cmd/develop.py @@ -65,6 +65,12 @@ def test_develop_no_clone(self, tmpdir): develop("--no-clone", "-p", str(tmpdir), "mpich@1.0") self.check_develop(e, spack.spec.Spec("mpich@=1.0"), str(tmpdir)) + def test_develop_no_version(self, tmpdir): + env("create", "test") + with ev.read("test") as e: + develop("--no-clone", "-p", str(tmpdir), "mpich") + self.check_develop(e, spack.spec.Spec("mpich@=main"), str(tmpdir)) + def test_develop(self): env("create", "test") with ev.read("test") as e: diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 70e2c56e412603..d1d35e6f5e0cb4 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -3953,7 +3953,7 @@ def test_environment_depfile_makefile(depfile_flags, expected_installs, tmpdir, ) # Do make dry run. - out = make("-n", "-f", makefile, output=str) + out = make("-n", "-f", makefile, "SPACK=spack", output=str) specs_that_make_would_install = _parse_dry_run_package_installs(out) @@ -3991,7 +3991,7 @@ def test_depfile_works_with_gitversions(tmpdir, mock_packages, monkeypatch): env("depfile", "-o", makefile, "--make-disable-jobserver", "--make-prefix=prefix") # Do a dry run on the generated depfile - out = make("-n", "-f", makefile, output=str) + out = make("-n", "-f", makefile, "SPACK=spack", output=str) # Check that all specs are there (without duplicates) specs_that_make_would_install = _parse_dry_run_package_installs(out) @@ -4053,7 +4053,12 @@ def test_depfile_phony_convenience_targets( # Phony install/* target should install picked package and all its deps specs_that_make_would_install = _parse_dry_run_package_installs( - make("-n", picked_spec.format("install/{name}-{version}-{hash}"), output=str) + make( + "-n", + picked_spec.format("install/{name}-{version}-{hash}"), + "SPACK=spack", + output=str, + ) ) assert set(specs_that_make_would_install) == set(expected_installs) @@ -4061,7 +4066,12 @@ def test_depfile_phony_convenience_targets( # Phony install-deps/* target shouldn't install picked package specs_that_make_would_install = _parse_dry_run_package_installs( - make("-n", picked_spec.format("install-deps/{name}-{version}-{hash}"), output=str) + make( + "-n", + picked_spec.format("install-deps/{name}-{version}-{hash}"), + "SPACK=spack", + output=str, + ) ) assert set(specs_that_make_would_install) == set(expected_installs) - {picked_package} @@ -4121,7 +4131,7 @@ def test_spack_package_ids_variable(tmpdir, mock_packages): make = Executable("make") # Do dry run. - out = make("-n", "-C", str(tmpdir), output=str) + out = make("-n", "-C", str(tmpdir), "SPACK=spack", output=str) # post-install: should've been executed with ev.read("test") as test: diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py index efaa7cc17171b6..bcbe45bf3e5e40 100644 --- a/lib/spack/spack/test/install.py +++ b/lib/spack/spack/test/install.py @@ -353,21 +353,21 @@ def test_install_prefix_collision_fails(config, mock_fetch, mock_packages, tmpdi Test that different specs with coinciding install prefixes will fail to install. """ - projections = {"projections": {"all": "all-specs-project-to-this-prefix"}} + projections = {"projections": {"all": "one-prefix-per-package-{name}"}} with spack.store.use_store(str(tmpdir), extra_data=projections): with spack.config.override("config:checksum", False): pkg_a = Spec("libelf@0.8.13").concretized().package pkg_b = Spec("libelf@0.8.12").concretized().package - PackageInstaller([pkg_a], explicit=True).install() + PackageInstaller([pkg_a], explicit=True, fake=True).install() with pytest.raises(InstallError, match="Install prefix collision"): - PackageInstaller([pkg_b], explicit=True).install() + PackageInstaller([pkg_b], explicit=True, fake=True).install() def test_store(install_mockery, mock_fetch): spec = Spec("cmake-client").concretized() pkg = spec.package - PackageInstaller([pkg], explicit=True).install() + PackageInstaller([pkg], fake=True, explicit=True).install() @pytest.mark.disable_clean_stage_check diff --git a/lib/spack/spack/test/oci/integration_test.py b/lib/spack/spack/test/oci/integration_test.py index 85673e953aa148..98c1258cd2c8c1 100644 --- a/lib/spack/spack/test/oci/integration_test.py +++ b/lib/spack/spack/test/oci/integration_test.py @@ -69,8 +69,8 @@ def test_buildcache_tag(install_mockery, mock_fetch, mutable_mock_env_path): """Tests whether we can create an OCI image from a full environment with multiple roots.""" env("create", "test") with ev.read("test"): - install("--add", "libelf") - install("--add", "trivial-install-test-package") + install("--fake", "--add", "libelf") + install("--fake", "--add", "trivial-install-test-package") registry = InMemoryOCIRegistry("example.com") @@ -83,7 +83,7 @@ def test_buildcache_tag(install_mockery, mock_fetch, mutable_mock_env_path): name = ImageReference.from_string("example.com/image:full_env") with ev.read("test") as e: - specs = e.all_specs() + specs = [x for x in e.all_specs() if not x.external] manifest, config = get_manifest_and_config(name) @@ -100,7 +100,7 @@ def test_buildcache_tag(install_mockery, mock_fetch, mutable_mock_env_path): name = ImageReference.from_string("example.com/image:single_spec") manifest, config = get_manifest_and_config(name) - assert len(manifest["layers"]) == 1 + assert len(manifest["layers"]) == len([x for x in libelf.traverse() if not x.external]) def test_buildcache_push_with_base_image_command(mutable_database, tmpdir): @@ -347,6 +347,10 @@ def put_manifest(base_images, checksums, image_ref, tmpdir, extra_config, annota for s in mpileaks.traverse(): if s.name in without_manifest: continue + + if s.external: + continue + # This should not raise a 404. manifest, _ = get_manifest_and_config(image.with_tag(default_tag(s))) @@ -358,6 +362,10 @@ def put_manifest(base_images, checksums, image_ref, tmpdir, extra_config, annota for s in mpileaks.traverse(): if s.name in without_manifest: continue + + if s.external: + continue + expected_digests = { pkg_to_own_digest[t.name] for t in s.traverse(deptype=("link", "run"), root=True) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index dee82226cde6e3..bdd87a974410b9 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -308,7 +308,7 @@ default: e4s-generate: extends: [ ".e4s", ".generate-x86_64"] - image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4:2024.03.01 + image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-gcc-11.4:2024.03.01 e4s-build: extends: [ ".e4s", ".build" ] @@ -331,7 +331,7 @@ e4s-build: e4s-neoverse-v2-generate: extends: [ ".e4s-neoverse-v2", ".generate-neoverse-v2" ] - image: ecpe4s/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 + image: ghcr.io/spack/spack/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 e4s-neoverse-v2-build: extends: [ ".e4s-neoverse-v2", ".build" ] @@ -354,7 +354,7 @@ e4s-neoverse-v2-build: e4s-neoverse_v1-generate: extends: [ ".e4s-neoverse_v1", ".generate-neoverse_v1" ] - image: ecpe4s/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 + image: ghcr.io/spack/spack/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 e4s-neoverse_v1-build: extends: [ ".e4s-neoverse_v1", ".build" ] @@ -377,7 +377,7 @@ e4s-neoverse_v1-build: e4s-rocm-external-generate: extends: [ ".e4s-rocm-external", ".generate-x86_64"] - image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.2.0:2024.09.11 + image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.2.0:2024.09.11 e4s-rocm-external-build: extends: [ ".e4s-rocm-external", ".build" ] @@ -423,7 +423,7 @@ e4s-rocm-external-build: e4s-oneapi-generate: extends: [ ".e4s-oneapi", ".generate-x86_64"] - image: ecpe4s/ubuntu22.04-runner-amd64-oneapi-2024.2:2024.09.06 + image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-oneapi-2024.2:2024.09.06 e4s-oneapi-build: extends: [ ".e4s-oneapi", ".build" ] @@ -495,7 +495,7 @@ build_systems-build: developer-tools-manylinux2014-generate: extends: [ ".developer-tools-manylinux2014", ".generate-x86_64"] - image: ecpe4s/manylinux2014:2024.03.28 + image: ghcr.io/spack/spack/manylinux2014:2024.03.28 developer-tools-manylinux2014-build: extends: [ ".developer-tools-manylinux2014", ".build" ] diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml index 5ad2b7cd9894fb..10eb7459a71b00 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml @@ -111,8 +111,8 @@ ci: CI_OIDC_REQUIRED: 0 GIT_STRATEGY: "none" CI_JOB_SIZE: "small" - KUBERNETES_CPU_REQUEST: "500m" - KUBERNETES_MEMORY_REQUEST: "500M" + KUBERNETES_CPU_REQUEST: "100m" + KUBERNETES_MEMORY_REQUEST: "5M" before_script:: [] after_script:: [] diff --git a/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-manylinux2014/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-manylinux2014/spack.yaml index 863f4a339582e8..97f408080fe7b9 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-manylinux2014/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-manylinux2014/spack.yaml @@ -93,7 +93,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/manylinux2014:2024.03.28 + image: ghcr.io/spack/spack/manylinux2014:2024.03.28 cdash: build-group: Developer Tools Manylinux2014 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml index a0b5cec5b6966b..531b02663d474c 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml @@ -241,7 +241,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 + image: ghcr.io/spack/spack/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 cdash: build-group: E4S ARM Neoverse V2 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml index 0b5de6cf163d65..bc47085c8dd7ba 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml @@ -362,7 +362,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 + image: ghcr.io/spack/spack/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01 cdash: build-group: E4S ARM Neoverse V1 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 112afaaff46db6..4cc86363881b0b 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -242,7 +242,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu22.04-runner-amd64-oneapi-2024.2:2024.09.06 + image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-oneapi-2024.2:2024.09.06 cdash: build-group: E4S OneAPI diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index f3391b7337ad72..43e792d52d6601 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -302,7 +302,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.2.0:2024.09.11 + image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.2.0:2024.09.11 cdash: build-group: E4S ROCm External diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index c4b870758ebbd8..8928db97ab9a84 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -376,7 +376,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu22.04-runner-amd64-gcc-11.4:2024.03.01 + image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-gcc-11.4:2024.03.01 cdash: build-group: E4S diff --git a/share/spack/templates/depfile/Makefile b/share/spack/templates/depfile/Makefile index 4b764752678c0f..cd9df1491c7eb3 100644 --- a/share/spack/templates/depfile/Makefile +++ b/share/spack/templates/depfile/Makefile @@ -1,4 +1,4 @@ -SPACK ?= spack -c config:install_status:false +SPACK ?= {{ spack_script }} -c config:install_status:false SPACK_INSTALL_FLAGS ?= # This variable can be used to add post install hooks diff --git a/var/spack/repos/builtin.mock/packages/mpich/package.py b/var/spack/repos/builtin.mock/packages/mpich/package.py index 08338033a9847c..4c87d6932fa8cc 100644 --- a/var/spack/repos/builtin.mock/packages/mpich/package.py +++ b/var/spack/repos/builtin.mock/packages/mpich/package.py @@ -16,6 +16,7 @@ class Mpich(Package): variant("debug", default=False, description="Compile MPICH with debug flags.") + version("main", branch="main", git="https://github.com/pmodels/mpich") version("3.0.4", md5="9c5d5d4fe1e17dd12153f40bc5b6dbc0") version("3.0.3", md5="0123456789abcdef0123456789abcdef") version("3.0.2", md5="0123456789abcdef0123456789abcdef") diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py index 6b4e8dee2588c5..b93ab7798f5014 100644 --- a/var/spack/repos/builtin/packages/abinit/package.py +++ b/var/spack/repos/builtin/packages/abinit/package.py @@ -24,11 +24,12 @@ class Abinit(AutotoolsPackage): programs are provided. """ - homepage = "https://www.abinit.org/" - url = "https://www.abinit.org/sites/default/files/packages/abinit-10.0.7.tar.gz" + homepage = "https://abinit.github.io/abinit_web/" + url = "https://forge.abinit.org/abinit-10.0.9.tar.gz" license("Apache-2.0") maintainers("downloadico") + version("10.0.9", sha256="17650580295e07895f6c3c4b1f3f0fe0e0f3fea9bab5fd8ce7035b16a62f8e5e") version("10.0.7", sha256="a9fc044b33861b7defd50fafd19a73eb6f225e18ae30b23bc731d9c8009c881c") version("9.10.5", sha256="a9e0f0e058baa6088ea93d26ada369ccf0fe52dc9d4a865b1c38c20620148cd5") version("9.10.3", sha256="3f2a9aebbf1fee9855a09dd687f88d2317b8b8e04f97b2628ab96fb898dce49b") @@ -41,8 +42,6 @@ class Abinit(AutotoolsPackage): version("8.8.2", sha256="15216703bd56a799a249a112b336d07d733627d3756487a4b1cb48ebb625c3e7") version("8.6.3", sha256="82e8d071088ab8dc1b3a24380e30b68c544685678314df1213180b449c84ca65") version("8.2.2", sha256="e43544a178d758b0deff3011c51ef7c957d7f2df2ce8543366d68016af9f3ea1") - # Versions before 8.0.8b are not supported. - version("8.0.8b", sha256="37ad5f0f215d2a36e596383cb6e54de3313842a0390ce8d6b48a423d3ee25af2") depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated @@ -210,14 +209,23 @@ def configure_args(self): # BLAS/LAPACK/SCALAPACK-ELPA linalg = spec["lapack"].libs + spec["blas"].libs + + # linalg_flavor is selected using the virtual lapack provider is_using_intel_libraries = spec["lapack"].name in INTEL_MATH_LIBRARIES + + # These *must* be elifs, otherwise spack's lapack provider is ignored + # linalg_flavor ends up as "custom", which is not supported by abinit@9.10.3: if is_using_intel_libraries: linalg_flavor = "mkl" - elif spec.satisfies("@9:") and spec.satisfies("^openblas"): - linalg_flavor = "openblas" - elif spec.satisfies("@9:") and spec.satisfies("^fujitsu-ssl2"): + # Else, if spack's virtual "lapack" provider is openblas, use it: + elif spec.satisfies("@9:") and ( + spec["lapack"].name == "openblas" or spec.satisfies("^fujitsu-ssl2") + ): linalg_flavor = "openblas" else: + # If you need to force custom (and not have it as fallback, like now) + # you should likely implement a variant to force it, but it seems that + # newer versions do not have it, so it should likely be a fallback: linalg_flavor = "custom" if spec.satisfies("+scalapack"): diff --git a/var/spack/repos/builtin/packages/amr-wind/package.py b/var/spack/repos/builtin/packages/amr-wind/package.py index 5c11e17c465be6..a9657f4db7c271 100644 --- a/var/spack/repos/builtin/packages/amr-wind/package.py +++ b/var/spack/repos/builtin/packages/amr-wind/package.py @@ -22,7 +22,67 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage): version("main", branch="main", submodules=True) version( - "2.1.0", tag="v2.1.0", commit="bc787f21deca9239928182e27400133934c62658", submodules=True + "3.1.5", tag="v3.1.5", commit="554f8aa1ac36c2bae17565c64d5bc33333cee396", submodules=True + ) + version( + "3.1.4", tag="v3.1.4", commit="e10f5ebd3141b9990a65ebe9f1bdca8554b59472", submodules=True + ) + version( + "3.1.3", tag="v3.1.3", commit="af8231ace69119133c4c8a906e98946ec5aa79c8", submodules=True + ) + version( + "3.1.2", tag="v3.1.2", commit="5edcac4496e30e450c0f21e7fa74f8b590dc3860", submodules=True + ) + version( + "3.1.1", tag="v3.1.1", commit="8ae06194fa47bf473615988f97a7b423d467b023", submodules=True + ) + version( + "3.1.0", tag="v3.1.0", commit="3e23581b132532bf70b09c38217ff9c46204f047", submodules=True + ) + version( + "3.0.2", tag="v3.0.2", commit="f867288dffecc6404189afa965189c2558cf9922", submodules=True + ) + version( + "3.0.1", tag="v3.0.1", commit="65aa85db5cb3bbabc767d5dde4b106b7022a0f90", submodules=True + ) + version( + "3.0.0", tag="v3.0.0", commit="2fbd345cfa7cb7277c1cb6a1323247579e1bbc32", submodules=True + ) + version( + "2.6.0", tag="v2.6.0", commit="31ef1137b00b304b62b84edaa5b819c0bf0b7436", submodules=True + ) + version( + "2.5.0", tag="v2.5.0", commit="f9f499b6926339f96b3ff260495b8782c045555c", submodules=True + ) + version( + "2.4.3", tag="v2.4.3", commit="4be85f376d4939f8e5534b7985917e4cfccedfaf", submodules=True + ) + version( + "2.4.2", tag="v2.4.2", commit="5ebb2abf2df9c87e6086d8f55a4d929ff0cdb37b", submodules=True + ) + version( + "2.4.1", tag="v2.4.1", commit="40accd372f850e10fcbeee6ddecc4d15fd6364c6", submodules=True + ) + version( + "2.4.0", tag="v2.4.0", commit="b8ab898b7e9e8e78455b61e303940b80d00d18ca", submodules=True + ) + version( + "2.3.2", tag="v2.3.2", commit="61cbb21e8dfdeea47a0add772cd52abac33c4901", submodules=True + ) + version( + "2.3.1", tag="v2.3.1", commit="cc51dadb34de9f333605a5bfb83b72c9310f676a", submodules=True + ) + version( + "2.3.0", tag="v2.3.0", commit="6ba000b628aa3178545cdbbea508cc2cb2e5c76c", submodules=True + ) + version( + "2.2.1", tag="v2.2.1", commit="e131a79f8e68be181390a2656f54268f90a9e78a", submodules=True + ) + version( + "2.2.0", tag="v2.2.0", commit="bc787f21deca9239928182e27400133934c62658", submodules=True + ) + version( + "2.1.0", tag="v2.1.0", commit="13e15b52f4a1651a3d72324a71ba1e18255663e7", submodules=True ) version( "2.0.0", tag="v2.0.0", commit="ea448365033fc6bc9ee0febeb369b377f4fd8240", submodules=True diff --git a/var/spack/repos/builtin/packages/babl/package.py b/var/spack/repos/builtin/packages/babl/package.py index d100f204d4a385..f4ce9d3be4105e 100644 --- a/var/spack/repos/builtin/packages/babl/package.py +++ b/var/spack/repos/builtin/packages/babl/package.py @@ -15,12 +15,13 @@ class Babl(MesonPackage): component permutations.""" homepage = "https://gegl.org/babl" - url = "https://download.gimp.org/babl/0.1/babl-0.1.98.tar.xz" + url = "https://download.gimp.org/babl/0.1/babl-0.1.108.tar.xz" maintainers("benkirk") license("LGPL-3.0-or-later") + version("0.1.108", sha256="26defe9deaab7ac4d0e076cab49c2a0d6ebd0df0c31fd209925a5f07edee1475") version("0.1.106", sha256="d325135d3304f088c134cc620013acf035de2e5d125a50a2d91054e7377c415f") version("0.1.102", sha256="a88bb28506575f95158c8c89df6e23686e50c8b9fea412bf49fe8b80002d84f0") version("0.1.98", sha256="f3b222f84e462735de63fa9c3651942f2b78fd314c73a22e05ff7c73afd23af1") @@ -29,9 +30,10 @@ class Babl(MesonPackage): version("0.1.92", sha256="f667735028944b6375ad18f160a64ceb93f5c7dccaa9d8751de359777488a2c1") version("0.1.90", sha256="6e2ebb636f37581588e3d02499b3d2f69f9ac73e34a262f42911d7f5906a9243") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("cmake@3.4:", type="build") + depends_on("pkgconfig", type="build") depends_on("lcms") depends_on("gobject-introspection") diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 306cb55813ea0f..0a590013b1b373 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -188,9 +188,10 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): with when("+libint"): depends_on("pkgconfig", type="build", when="@7.0:") for lmax in HFX_LMAX_RANGE: + depends_on(f"libint@2.6.0:+fortran tune=cp2k-lmax-{lmax}", when=f"@7.0: lmax={lmax}") + # AOCC only works with libint@2.6.0 depends_on( - "libint@2.6.0:+fortran tune=cp2k-lmax-{0}".format(lmax), - when="@7.0: lmax={0}".format(lmax), + f"libint@=2.6.0+fortran tune=cp2k-lmax-{lmax}", when=f"@7.0: lmax={lmax} %aocc" ) with when("+libxc"): @@ -305,6 +306,9 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage): depends_on("hipblas") depends_on("hipfft") + # The CMake build system and AOCC are not compatible as of AOCC 5 + requires("build_system=makefile", when="%aocc") + # CP2K needs compiler specific compilation flags, e.g. optflags conflicts("%apple-clang") conflicts("%clang") @@ -827,6 +831,12 @@ def fflags(var, lst): if spec.satisfies("%intel"): mkf.write(fflags("LDFLAGS_C", ldflags + ["-nofor-main"])) + if spec.satisfies("%aocc@5:"): + # ensure C based applications can be build properly + mkf.write(fflags("LDFLAGS_C", ldflags + ["-fno-fortran-main"])) + # This flag is required for the correct runtime behaviour of the code with aocc@5.0 + mkf.write(fflags("FCFLAGS", fcflags + ["-mllvm -enable-newgvn=true"])) + mkf.write("# CP2K-specific flags\n\n") mkf.write("GPUVER = {0}\n".format(gpuver)) mkf.write("DATA_DIR = {0}\n".format(prefix.share.data)) diff --git a/var/spack/repos/builtin/packages/dmtcp/package.py b/var/spack/repos/builtin/packages/dmtcp/package.py index 1b063a8e407ad9..4e890bbf85ce82 100644 --- a/var/spack/repos/builtin/packages/dmtcp/package.py +++ b/var/spack/repos/builtin/packages/dmtcp/package.py @@ -18,7 +18,7 @@ class Dmtcp(AutotoolsPackage): license("LGPL-3.0-only") maintainers("karya0") - version("master", branch="master") + version("main", branch="main") version("3.0.0", sha256="2c7e95e1dbc55db33433bfee48a65f274298e98f246a36ab6dad1e0694750d37") version("2.6.0", sha256="3ed62a86dd0cb9c828b93ee8c7c852d6f9c96a0efa48bcfe867521adf7bced68") version("2.5.2", sha256="0e3e5e15bd401b7b6937f2b678cd7d6a252eab0a143d5740b89cc3bebb4282be") diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py index 299f58621431a5..c5e10097d4c8fd 100644 --- a/var/spack/repos/builtin/packages/extrae/package.py +++ b/var/spack/repos/builtin/packages/extrae/package.py @@ -92,6 +92,12 @@ class Extrae(AutotoolsPackage): depends_on("cuda", when="+cupti") conflicts("+cupti", when="~cuda", msg="CUPTI requires CUDA") + variant( + "single-mpi-lib", + default=False, + description="Enable single MPI instrumentation library that supports both Fortran and C", + ) + def configure_args(self): spec = self.spec if spec.satisfies("^[virtuals=mpi] intel-oneapi-mpi"): @@ -137,6 +143,8 @@ def configure_args(self): make.add_default_arg("CXXFLAGS=%s" % self.compiler.cxx11_flag) args.append("CXXFLAGS=%s" % self.compiler.cxx11_flag) + args.extend(self.enable_or_disable("single-mpi-lib")) + return args def flag_handler(self, name, flags): diff --git a/var/spack/repos/builtin/packages/fenics-dolfinx/package.py b/var/spack/repos/builtin/packages/fenics-dolfinx/package.py index ba871cd731b1db..b252d5a9c90152 100644 --- a/var/spack/repos/builtin/packages/fenics-dolfinx/package.py +++ b/var/spack/repos/builtin/packages/fenics-dolfinx/package.py @@ -17,6 +17,7 @@ class FenicsDolfinx(CMakePackage): license("LGPL-3.0-or-later") version("main", branch="main") + version("0.9.0", sha256="b266c74360c2590c5745d74768c04568c965b44739becca4cd6b5aa58cdbbbd1") version("0.8.0", sha256="acf3104d9ecc0380677a6faf69eabfafc58d0cce43f7777e1307b95701c7cad9") version("0.7.2", sha256="7d9ce1338ce66580593b376327f23ac464a4ce89ef63c105efc1a38e5eae5c0b") version("0.6.0", sha256="eb8ac2bb2f032b0d393977993e1ab6b4101a84d54023a67206e3eac1a8d79b80") @@ -40,7 +41,8 @@ class FenicsDolfinx(CMakePackage): variant("slepc", default=False, description="slepc support") variant("adios2", default=False, description="adios2 support") - depends_on("cmake@3.19:", type="build") + depends_on("cmake@3.21:", when="@0.9:", type="build") + depends_on("cmake@3.19:", when="@:0.8", type="build") depends_on("pkgconfig", type="build") depends_on("mpi") depends_on("hdf5+mpi") @@ -49,16 +51,19 @@ class FenicsDolfinx(CMakePackage): depends_on("spdlog", when="@0.9:") depends_on("petsc+mpi+shared") - depends_on("slepc", when="+slepc") + + depends_on("adios2@2.8.1:+mpi", when="@0.9: +adios2") depends_on("adios2+mpi", when="+adios2") depends_on("fenics-ufcx@main", when="@main") + depends_on("fenics-ufcx@0.9", when="@0.9") depends_on("fenics-ufcx@0.8", when="@0.8") depends_on("fenics-ufcx@0.7", when="@0.7") depends_on("fenics-ufcx@0.6", when="@0.6") depends_on("fenics-basix@main", when="@main") + depends_on("fenics-basix@0.9", when="@0.9") depends_on("fenics-basix@0.8", when="@0.8") depends_on("fenics-basix@0.7", when="@0.7") depends_on("fenics-basix@0.6", when="@0.6") diff --git a/var/spack/repos/builtin/packages/ftgl/package.py b/var/spack/repos/builtin/packages/ftgl/package.py index c98656d37aa1f2..a5f4a9c51f8874 100644 --- a/var/spack/repos/builtin/packages/ftgl/package.py +++ b/var/spack/repos/builtin/packages/ftgl/package.py @@ -29,15 +29,12 @@ class Ftgl(CMakePackage): description="C++ standard", ) - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") - # FIXME: Doc generation is broken in upstream build system - # variant('doc', default=False, description='Build the documentation') variant("shared", default=True, description="Build as a shared library") depends_on("cmake@2.8:", type="build") - # depends_on('doxygen', type='build', when='+doc') -- FIXME, see above depends_on("pkgconfig", type="build") depends_on("gl") depends_on("glu") @@ -45,11 +42,14 @@ class Ftgl(CMakePackage): # Fix oversight in CMakeLists patch("remove-ftlibrary-from-sources.diff", when="@:2.4.0") - # Fix gcc14 compilation error due to type mismatch in FTContour + + # As reported by Khem Raj in + # https://github.com/kraj/ftgl/commit/37ed7d606a0dfecdcb4ab0c26d1b0132cd96d5fa + # freetype 2.13.3 changed the type of many external chars to unsigned char! patch( "https://patch-diff.githubusercontent.com/raw/frankheckenbach/ftgl/pull/20.patch?full_index=1", sha256="e2a0810fbf68403931bef4fbfda22e010e01421c92eeaa45f62e4e47f2381ebd", - when="@2.4.0 %gcc@14:", + when="^freetype@2.13.3:", ) # ftgl (at least up to 2.4.0) uses `cmake_minimum_version(2.8)`, @@ -63,11 +63,18 @@ def flag_handler(self, name, flags): flags.append(eval(flag_func_name, {}, {"self": self})) return (None, None, flags) - def cmake_flags(self): - flags = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")] - if "darwin" in self.spec.architecture: - flags.append(self.define("CMAKE_MACOSX_RPATH", True)) - return flags + def cmake_args(self): + spec = self.spec + args = ["-DBUILD_SHARED_LIBS={0}".format(spec.satisfies("+shared"))] + + # To not fail the build for 'char/unsigned char' conversion errors, + # downgrade them to warnings in general to not fail the build: + args.append("-DCMAKE_CXX_FLAGS=-fpermissive") + + if "darwin" in spec.architecture: + args.append(self.define("CMAKE_MACOSX_RPATH", True)) + + return args # FIXME: See doc variant comment # @run_after('build') diff --git a/var/spack/repos/builtin/packages/gimp/package.py b/var/spack/repos/builtin/packages/gimp/package.py index 5634be93063352..8519d2a71c12ba 100644 --- a/var/spack/repos/builtin/packages/gimp/package.py +++ b/var/spack/repos/builtin/packages/gimp/package.py @@ -26,14 +26,25 @@ class Gimp(AutotoolsPackage): license("GPL-3.0-or-later") version("2.10.38", sha256="50a845eec11c8831fe8661707950f5b8446e35f30edfb9acf98f85c1133f856e") - version("2.10.32", sha256="3f15c70554af5dcc1b46e6dc68f3d8f0a6cc9fe56b6d78ac08c0fd859ab89a25") - version("2.10.30", sha256="88815daa76ed7d4277eeb353358bafa116cd2fcd2c861d95b95135c1d52b67dc") - version("2.10.28", sha256="4f4dc22cff1ab5f026feaa2ab55e05775b3a11e198186b47bdab79cbfa078826") - version("2.10.26", sha256="5ddbccf1db462a41df9a26197fcb0d24c7152753a36b3c8b8a9506b4136395f7") - version("2.10.24", sha256="bd1bb762368c0dd3175cf05006812dd676949c3707e21f4e6857435cb435989e") + with default_args(deprecated=True): + version( + "2.10.32", sha256="3f15c70554af5dcc1b46e6dc68f3d8f0a6cc9fe56b6d78ac08c0fd859ab89a25" + ) + version( + "2.10.30", sha256="88815daa76ed7d4277eeb353358bafa116cd2fcd2c861d95b95135c1d52b67dc" + ) + version( + "2.10.28", sha256="4f4dc22cff1ab5f026feaa2ab55e05775b3a11e198186b47bdab79cbfa078826" + ) + version( + "2.10.26", sha256="5ddbccf1db462a41df9a26197fcb0d24c7152753a36b3c8b8a9506b4136395f7" + ) + version( + "2.10.24", sha256="bd1bb762368c0dd3175cf05006812dd676949c3707e21f4e6857435cb435989e" + ) - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated + depends_on("c", type="build") + depends_on("cxx", type="build") variant("doc", default=True, description="Build documentation with gtk-doc") variant("ghostscript", default=True, description="Build with ghostscript support") @@ -56,6 +67,7 @@ class Gimp(AutotoolsPackage): # variant("python", default=False, description="Build with Python bindings") # ref. https://www.gimp.org/source/ + depends_on("gettext", type="build") depends_on("pkgconfig", type="build") depends_on("babl") depends_on("fontconfig@2.12.4:") @@ -71,6 +83,7 @@ class Gimp(AutotoolsPackage): depends_on("libexif") # depends_on("libheif+libde265", when="+libheif") depends_on("libjxl", when="+jpegxl") + depends_on("libjxl@:0.7", when="+jpegxl@:2.10.32") depends_on("libmng", when="+libmng") depends_on("libmypaint@1.4") depends_on("libpng") @@ -94,6 +107,10 @@ def url_for_version(self, version): url = "https://download.gimp.org/gimp/v{0}/gimp-{1}.tar.bz2" return url.format(version.up_to(2), version) + @when("@:2.10.32") + def patch(self): + filter_file("babl ", "babl-0.1 ", "configure") + def configure_args(self): args = [ "--disable-python", diff --git a/var/spack/repos/builtin/packages/glib-networking/package.py b/var/spack/repos/builtin/packages/glib-networking/package.py index 0d08df0c3b5bf4..d44f39fd5eb80d 100644 --- a/var/spack/repos/builtin/packages/glib-networking/package.py +++ b/var/spack/repos/builtin/packages/glib-networking/package.py @@ -18,9 +18,10 @@ class GlibNetworking(MesonPackage): version("2.65.90", sha256="91b35c5d7472d10229b0b01c0631ac171903e96f84a6fb22c4126a40528c09e2") version("2.65.1", sha256="d06311004f7dda4561c210f286a3678b631fb7187cb3b90616c5ba39307cc91f") - depends_on("c", type="build") # generated + depends_on("c", type="build") depends_on("gettext", type="build") + depends_on("pkgconfig", type="build") depends_on("glib") depends_on("gnutls") depends_on("gsettings-desktop-schemas") diff --git a/var/spack/repos/builtin/packages/gsettings-desktop-schemas/package.py b/var/spack/repos/builtin/packages/gsettings-desktop-schemas/package.py index 53844022699f83..29b6288ecc8246 100644 --- a/var/spack/repos/builtin/packages/gsettings-desktop-schemas/package.py +++ b/var/spack/repos/builtin/packages/gsettings-desktop-schemas/package.py @@ -24,6 +24,7 @@ class GsettingsDesktopSchemas(MesonPackage): depends_on("glib") depends_on("gobject-introspection", type="build") depends_on("gettext", type="build") + depends_on("pkgconfig", type="build") def setup_dependent_build_environment(self, env, dependent_spec): env.prepend_path("XDG_DATA_DIRS", self.prefix.share) diff --git a/var/spack/repos/builtin/packages/hive/package.py b/var/spack/repos/builtin/packages/hive/package.py index 8a26d742e453b9..89dc7de044ed0d 100644 --- a/var/spack/repos/builtin/packages/hive/package.py +++ b/var/spack/repos/builtin/packages/hive/package.py @@ -19,10 +19,13 @@ class Hive(Package): license("Apache-2.0", checked_by="wdconinc") - version("3.1.3", sha256="0c9b6a6359a7341b6029cc9347435ee7b379f93846f779d710b13f795b54bb16") - version("3.1.2", sha256="d75dcf36908b4e7b9b0ec9aec57a46a6628b97b276c233cb2c2f1a3e89b13462") - version("2.3.6", sha256="0b3736edc8d15f01ed649bfce7d74346c35fd57567411e9d0c3f48578f76610d") - version("1.2.2", sha256="763b246a1a1ceeb815493d1e5e1d71836b0c5b9be1c4cd9c8d685565113771d1") + version("4.0.1", sha256="2bf988a1ed17437b1103e367939c25a13f64d36cf6d1c3bef8c3f319f0067619") + with default_args(deprecated=True): + # https://nvd.nist.gov/vuln/detail/CVE-2020-13949 + version("3.1.3", sha256="0c9b6a6359a7341b6029cc9347435ee7b379f93846f779d710b13f795b54bb16") + version("3.1.2", sha256="d75dcf36908b4e7b9b0ec9aec57a46a6628b97b276c233cb2c2f1a3e89b13462") + version("2.3.6", sha256="0b3736edc8d15f01ed649bfce7d74346c35fd57567411e9d0c3f48578f76610d") + version("1.2.2", sha256="763b246a1a1ceeb815493d1e5e1d71836b0c5b9be1c4cd9c8d685565113771d1") depends_on("hadoop", type="run") diff --git a/var/spack/repos/builtin/packages/krb5/package.py b/var/spack/repos/builtin/packages/krb5/package.py index 4bcad9701a173a..cbe034fcae0ecc 100644 --- a/var/spack/repos/builtin/packages/krb5/package.py +++ b/var/spack/repos/builtin/packages/krb5/package.py @@ -16,22 +16,46 @@ class Krb5(AutotoolsPackage): list_url = "https://kerberos.org/dist/krb5/" list_depth = 1 - license("MIT") - - version("1.21.2", sha256="9560941a9d843c0243a71b17a7ac6fe31c7cebb5bce3983db79e52ae7e850491") - version("1.20.1", sha256="704aed49b19eb5a7178b34b2873620ec299db08752d6a8574f95d41879ab8851") - version("1.20", sha256="7e022bdd3c851830173f9faaa006a230a0e0fdad4c953e85bff4bf0da036e12f") - version("1.19.4", sha256="41f5981c5a4de0a26b3937e679a116cd5b3739641fd253124aac91f7179b54eb") - version("1.19.3", sha256="56d04863cfddc9d9eb7af17556e043e3537d41c6e545610778676cf551b9dcd0") - version("1.19.2", sha256="10453fee4e3a8f8ce6129059e5c050b8a65dab1c257df68b99b3112eaa0cdf6a") - version("1.18.2", sha256="c6e4c9ec1a98141c3f5d66ddf1a135549050c9fab4e9a4620ee9b22085873ae0") - version("1.18.1", sha256="02a4e700f10936f937cd1a4c303cab8687a11abecc6107bd4b706b9329cd5400") - version("1.18", sha256="73913934d711dcf9d5f5605803578edb44b9a11786df3c1b2711f4e1752f2c88") - version("1.17.1", sha256="3706d7ec2eaa773e0e32d3a87bf742ebaecae7d064e190443a3acddfd8afb181") - version("1.17", sha256="5a6e2284a53de5702d3dc2be3b9339c963f9b5397d3fbbc53beb249380a781f5") - version("1.16.3", sha256="e40499df7c6dbef0cf9b11870a0e167cde827737d8b2c06a9436334f08ab9b0d") - version("1.16.2", sha256="9f721e1fe593c219174740c71de514c7228a97d23eb7be7597b2ae14e487f027") - version("1.16.1", sha256="214ffe394e3ad0c730564074ec44f1da119159d94281bbec541dc29168d21117") + license("MIT", checked_by="wdconinc") + + version("1.21.3", sha256="b7a4cd5ead67fb08b980b21abd150ff7217e85ea320c9ed0c6dadd304840ad35") + with default_args(deprecated=True): + # https://nvd.nist.gov/vuln/detail/CVE-2024-37371 + version( + "1.21.2", sha256="9560941a9d843c0243a71b17a7ac6fe31c7cebb5bce3983db79e52ae7e850491" + ) + version( + "1.20.1", sha256="704aed49b19eb5a7178b34b2873620ec299db08752d6a8574f95d41879ab8851" + ) + version( + "1.19.4", sha256="41f5981c5a4de0a26b3937e679a116cd5b3739641fd253124aac91f7179b54eb" + ) + version( + "1.19.3", sha256="56d04863cfddc9d9eb7af17556e043e3537d41c6e545610778676cf551b9dcd0" + ) + version( + "1.19.2", sha256="10453fee4e3a8f8ce6129059e5c050b8a65dab1c257df68b99b3112eaa0cdf6a" + ) + version( + "1.18.2", sha256="c6e4c9ec1a98141c3f5d66ddf1a135549050c9fab4e9a4620ee9b22085873ae0" + ) + version( + "1.18.1", sha256="02a4e700f10936f937cd1a4c303cab8687a11abecc6107bd4b706b9329cd5400" + ) + version("1.18", sha256="73913934d711dcf9d5f5605803578edb44b9a11786df3c1b2711f4e1752f2c88") + version( + "1.17.1", sha256="3706d7ec2eaa773e0e32d3a87bf742ebaecae7d064e190443a3acddfd8afb181" + ) + version("1.17", sha256="5a6e2284a53de5702d3dc2be3b9339c963f9b5397d3fbbc53beb249380a781f5") + version( + "1.16.3", sha256="e40499df7c6dbef0cf9b11870a0e167cde827737d8b2c06a9436334f08ab9b0d" + ) + version( + "1.16.2", sha256="9f721e1fe593c219174740c71de514c7228a97d23eb7be7597b2ae14e487f027" + ) + version( + "1.16.1", sha256="214ffe394e3ad0c730564074ec44f1da119159d94281bbec541dc29168d21117" + ) depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated @@ -43,7 +67,7 @@ class Krb5(AutotoolsPackage): depends_on("gettext") depends_on("perl", type="build") depends_on("findutils", type="build") - depends_on("pkgconfig", type="build", when="^openssl~shared") + depends_on("pkgconfig", type="build") variant( "shared", default=True, description="install shared libraries if True, static if false" diff --git a/var/spack/repos/builtin/packages/libjxl/package.py b/var/spack/repos/builtin/packages/libjxl/package.py index 68fd6d65d0dabe..5117fc3c92b73a 100644 --- a/var/spack/repos/builtin/packages/libjxl/package.py +++ b/var/spack/repos/builtin/packages/libjxl/package.py @@ -30,6 +30,7 @@ class Libjxl(CMakePackage): depends_on("cxx", type="build") # generated depends_on("cmake@3.10:", type="build") + depends_on("pkgconfig", type="build") depends_on("brotli") depends_on("highway") diff --git a/var/spack/repos/builtin/packages/libmypaint/package.py b/var/spack/repos/builtin/packages/libmypaint/package.py index 4ae0a1fb6c5bf6..2726201553fa6f 100644 --- a/var/spack/repos/builtin/packages/libmypaint/package.py +++ b/var/spack/repos/builtin/packages/libmypaint/package.py @@ -24,7 +24,9 @@ class Libmypaint(AutotoolsPackage): version("1.4.0", sha256="59d13b14c6aca0497095f29ee7228ca2499a923ba8e1dd718a2f2ecb45a9cbff") version("1.3.0", sha256="6a07d9d57fea60f68d218a953ce91b168975a003db24de6ac01ad69dcc94a671") - depends_on("c", type="build") # generated + depends_on("c", type="build") + depends_on("gettext", type="build") + depends_on("pkgconfig", type="build") variant("gegl", default=False, description="Enable GEGL based code in build") variant("introspection", default=True, description="Enable introspection for this build") diff --git a/var/spack/repos/builtin/packages/libtiff/package.py b/var/spack/repos/builtin/packages/libtiff/package.py index 2b1778292653e0..f1f337bbcf5bb4 100644 --- a/var/spack/repos/builtin/packages/libtiff/package.py +++ b/var/spack/repos/builtin/packages/libtiff/package.py @@ -40,21 +40,26 @@ class Libtiff(CMakePackage, AutotoolsPackage): license("libtiff") - version("4.6.0", sha256="88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a") - version("4.5.1", sha256="d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b") - version("4.5.0", sha256="c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464") - version("4.4.0", sha256="917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed") - version("4.3.0", sha256="0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8") - version("4.2.0", sha256="eb0484e568ead8fa23b513e9b0041df7e327f4ee2d22db5a533929dfc19633cb") - version("4.1.0", sha256="5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634") - version("4.0.10", sha256="2c52d11ccaf767457db0c46795d9c7d1a8d8f76f68b0b800a3dfe45786b996e4") - version("4.0.9", sha256="6e7bdeec2c310734e734d19aae3a71ebe37a4d842e0e23dbb1b8921c0026cfcd") - version("4.0.8", sha256="59d7a5a8ccd92059913f246877db95a2918e6c04fb9d43fd74e5c3390dac2910") - version("4.0.7", sha256="9f43a2cfb9589e5cecaa66e16bf87f814c945f22df7ba600d63aac4632c4f019") - version("4.0.6", sha256="4d57a50907b510e3049a4bba0d7888930fdfc16ce49f1bf693e5b6247370d68c") - version("4.0.5", sha256="e25eaa83ed7fab43ddd278b9b14d91a406a4b674cedc776adb95535f897f309c") - version("4.0.4", sha256="8cb1d90c96f61cdfc0bcf036acc251c9dbe6320334da941c7a83cfe1576ef890") - version("3.9.7", sha256="f5d64dd4ce61c55f5e9f6dc3920fbe5a41e02c2e607da7117a35eb5c320cef6a") + version("4.7.0", sha256="67160e3457365ab96c5b3286a0903aa6e78bdc44c4bc737d2e486bcecb6ba976") + with default_args(deprecated=True): + # https://nvd.nist.gov/vuln/detail/CVE-2024-7006 + version("4.6.0", sha256="88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a") + version("4.5.1", sha256="d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b") + version("4.5.0", sha256="c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464") + version("4.4.0", sha256="917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed") + version("4.3.0", sha256="0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8") + version("4.2.0", sha256="eb0484e568ead8fa23b513e9b0041df7e327f4ee2d22db5a533929dfc19633cb") + version("4.1.0", sha256="5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634") + version( + "4.0.10", sha256="2c52d11ccaf767457db0c46795d9c7d1a8d8f76f68b0b800a3dfe45786b996e4" + ) + version("4.0.9", sha256="6e7bdeec2c310734e734d19aae3a71ebe37a4d842e0e23dbb1b8921c0026cfcd") + version("4.0.8", sha256="59d7a5a8ccd92059913f246877db95a2918e6c04fb9d43fd74e5c3390dac2910") + version("4.0.7", sha256="9f43a2cfb9589e5cecaa66e16bf87f814c945f22df7ba600d63aac4632c4f019") + version("4.0.6", sha256="4d57a50907b510e3049a4bba0d7888930fdfc16ce49f1bf693e5b6247370d68c") + version("4.0.5", sha256="e25eaa83ed7fab43ddd278b9b14d91a406a4b674cedc776adb95535f897f309c") + version("4.0.4", sha256="8cb1d90c96f61cdfc0bcf036acc251c9dbe6320334da941c7a83cfe1576ef890") + version("3.9.7", sha256="f5d64dd4ce61c55f5e9f6dc3920fbe5a41e02c2e607da7117a35eb5c320cef6a") depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated diff --git a/var/spack/repos/builtin/packages/lua-lpeg/package.py b/var/spack/repos/builtin/packages/lua-lpeg/package.py index c15539ae83f2d6..2615c4a9c8b5bf 100644 --- a/var/spack/repos/builtin/packages/lua-lpeg/package.py +++ b/var/spack/repos/builtin/packages/lua-lpeg/package.py @@ -4,6 +4,9 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + +import spack.build_systems.lua from spack.package import * @@ -32,3 +35,36 @@ class LuaLpeg(LuaPackage): ) depends_on("lua-lang@:5.1.9", when="@:0.12.1 ^[virtuals=lua-lang] lua") + + +class LuaBuilder(spack.build_systems.lua.LuaBuilder): + # without this, the resulting library cannot be linked by a normal link phase, the + # way neovim expects to link it, works fine with lua loads though, + # * replaces `-bundle` from the default flags with `-shared` + @when("platform=darwin") + def generate_luarocks_config(self, pkg, spec, prefix): + path = super().generate_luarocks_config(pkg, spec, prefix) + + with open(path, "a") as cfg: + cfg.write( + """ + + variables = { + LIBFLAG = "-shared -fPIC -undefined dynamic_lookup -all_load" + } + """ + ) + + return path + + # Builds searching for lpeg with darwin conventions can't find it without a dylib + # symlink, neovim is an example + @run_after("install", when="platform=darwin") + def create_dylib_link_and_fix_id(self): + lpeg_so = find(self.prefix, "lpeg.so") + assert len(lpeg_so) >= 1 + dylib_path = os.path.join(self.prefix.lib, "liblpeg.dylib") + symlink(lpeg_so[0], dylib_path) + # can't use spack.filesystem.fix_darwin_install_name for this, doesn't work + install_name_tool = which("install_name_tool", required=True) + install_name_tool("-id", dylib_path, dylib_path) diff --git a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py index 7d39c701578336..1f8356270f2820 100644 --- a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py +++ b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py @@ -18,13 +18,13 @@ class LuaLuajitOpenresty(LuaImplPackage): license("MIT") version( - "2.1-20230410", sha256="77bbcbb24c3c78f51560017288f3118d995fe71240aa379f5818ff6b166712ff" + "2.1-20240626", sha256="1e53822a1105df216b9657ccb0293a152ac5afd875abc848453bfa353ca8181b" ) version( - "2.1-20220111", sha256="1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" + "2.1-20230410", sha256="77bbcbb24c3c78f51560017288f3118d995fe71240aa379f5818ff6b166712ff" ) version( - "2.1-20230410", sha256="77bbcbb24c3c78f51560017288f3118d995fe71240aa379f5818ff6b166712ff" + "2.1-20220111", sha256="1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" ) depends_on("c", type="build") # generated @@ -64,3 +64,11 @@ def edit(self, spec, prefix): # that unwinding symbols are not included by libc, this is necessary # on some platforms for the final link stage to work src_makefile.filter("^TARGET_LD = .*", f"TARGET_LD = {spack_cxx}") + + def setup_run_environment(self, env): + env.prepend_path( + "LUA_PATH", + os.path.join(self.spec.prefix, "share", f"luajit-{self.version[0:2]}", "?.lua"), + separator=";", + ) + super().setup_run_environment(env) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index d27e6dafa9b2c2..683657882359f0 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -64,8 +64,8 @@ def lua_share_dir(self): resource( name="luarocks", - url="https://luarocks.github.io/luarocks/releases/" "luarocks-3.8.0.tar.gz", - sha256="56ab9b90f5acbc42eb7a94cf482e6c058a63e8a1effdf572b8b2a6323a06d923", + url="https://luarocks.github.io/luarocks/releases/luarocks-3.11.1.tar.gz", + sha256="c3fb3d960dffb2b2fe9de7e3cb004dc4d0b34bb3d342578af84f84325c669102", destination="luarocks", placement="luarocks", ) diff --git a/var/spack/repos/builtin/packages/miniconda3/package.py b/var/spack/repos/builtin/packages/miniconda3/package.py index 4fdbf90436ad65..d620ce47c83c5a 100644 --- a/var/spack/repos/builtin/packages/miniconda3/package.py +++ b/var/spack/repos/builtin/packages/miniconda3/package.py @@ -10,6 +10,24 @@ from spack.util.environment import EnvironmentModifications _versions = { + "24.7.1": { + "Linux-x86_64": ( + "33442cd3813df33dcbb4a932b938ee95398be98344dff4c30f7e757cd2110e4f", + "https://repo.anaconda.com/miniconda/Miniconda3-py312_24.7.1-0-Linux-x86_64.sh", + ) + }, + "24.5.0": { + "Linux-x86_64": ( + "4b3b3b1b99215e85fd73fb2c2d7ebf318ac942a457072de62d885056556eb83e", + "https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-x86_64.sh", + ) + }, + "24.4.0": { + "Linux-x86_64": ( + "b6597785e6b071f1ca69cf7be6d0161015b96340b9a9e132215d5713408c3a7c", + "https://repo.anaconda.com/miniconda/Miniconda3-py312_24.4.0-0-Linux-x86_64.sh", + ) + }, "24.3.0": { "Linux-x86_64": ( "96a44849ff17e960eeb8877ecd9055246381c4d4f2d031263b63fa7e2e930af1", diff --git a/var/spack/repos/builtin/packages/purify/package.py b/var/spack/repos/builtin/packages/purify/package.py new file mode 100644 index 00000000000000..3a2fdc7c7548ad --- /dev/null +++ b/var/spack/repos/builtin/packages/purify/package.py @@ -0,0 +1,73 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class Purify(CMakePackage): + """PURIFY is an open-source collection of routines written in C++ available under the + license below. It implements different tools and high-level to perform radio interferometric + imaging, i.e. to recover images from the Fourier measurements taken by radio interferometric + telescopes. + """ + + homepage = "https://astro-informatics.github.io/purify/" + url = "https://github.com/astro-informatics/purify/archive/refs/tags/v4.2.0.tar.gz" + git = "https://github.com/astro-informatics/purify" + + maintainers("tkoskela", "mmcleod89", "20DM") + license("GPL-2.0") + + version("4.2.0", sha256="4d674007efc727628839fb6c8864e74f22adb39ee6405d3dab273f65b31b37e6") + + variant("tests", default=True, description="Build tests") + variant("openmp", default=True, description="Enable multithreading with OpenMP") + variant("mpi", default=True, description="Enable parallelisation with MPI") + variant("benchmarks", default=False, description="Build benchmarks") + variant("docs", default=False, description="Enable multithreading with OpenMP") + variant("coverage", default=False, description="Enable code coverage") + + depends_on("cmake@3") + depends_on("eigen@3.4:3") + depends_on("libtiff@4.7:") + depends_on("fftw-api") + depends_on("yaml-cpp@0.7:") + depends_on("boost@1.82+system+filesystem") + depends_on("cfitsio@4") + depends_on("cubature@1") + depends_on("sopt~mpi", when="~mpi") + depends_on("sopt+mpi", when="+mpi") + depends_on("sopt~openmp", when="~openmp") + depends_on("sopt+openmp", when="+openmp") + depends_on("catch2@3.4:3", when="+tests") + depends_on("mpi", when="+mpi") + depends_on("benchmark@1.8~performance_counters", when="+benchmarks") + depends_on("doxygen@1.9:1.12+graphviz", when="+docs") + + def cmake_args(self): + args = [ + self.define_from_variant("docs", "docs"), + self.define_from_variant("tests", "tests"), + self.define_from_variant("benchmarks", "benchmarks"), + self.define_from_variant("openmp", "openmp"), + self.define_from_variant("dompi", "mpi"), + self.define_from_variant("coverage", "coverage"), + ] + return args + + def setup_run_environment(self, env): + if "+tests" in self.spec: + env.prepend_path("PATH", self.spec.prefix.tests) + if "+benchmarks" in self.spec: + env.prepend_path("PATH", join_path(self.spec.prefix, "benchmarks")) + + def install(self, spec, prefix): + with working_dir(self.build_directory): + make("install") + if "+tests" in spec: + install_tree("cpp/tests", spec.prefix.tests) + install_tree("data", join_path(spec.prefix, "data")) + if "+benchmarks" in spec: + install_tree("cpp/benchmarks", join_path(spec.prefix, "benchmarks")) diff --git a/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py b/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py index 97ce274173cd5d..7ccfd32ddbad62 100644 --- a/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py @@ -18,13 +18,15 @@ class PyFenicsDolfinx(PythonPackage): license("LGPL-3.0-only") version("main", branch="main") + version("0.9.0", sha256="b266c74360c2590c5745d74768c04568c965b44739becca4cd6b5aa58cdbbbd1") version("0.8.0", sha256="acf3104d9ecc0380677a6faf69eabfafc58d0cce43f7777e1307b95701c7cad9") version("0.7.2", sha256="7d9ce1338ce66580593b376327f23ac464a4ce89ef63c105efc1a38e5eae5c0b") version("0.6.0", sha256="eb8ac2bb2f032b0d393977993e1ab6b4101a84d54023a67206e3eac1a8d79b80") depends_on("cxx", type="build") # generated - depends_on("cmake@3.19:", type="build") + depends_on("cmake@3.21:", when="@0.9:", type="build") + depends_on("cmake@3.19:", when="@:0.8", type="build") depends_on("hdf5", type="build") depends_on("pkgconfig", type="build") @@ -33,24 +35,29 @@ class PyFenicsDolfinx(PythonPackage): depends_on("python@3.8:3.10", when="@0.6.0", type=("build", "run")) depends_on("fenics-dolfinx@main", when="@main") + depends_on("fenics-dolfinx@0.9.0", when="@0.9.0") depends_on("fenics-dolfinx@0.8.0", when="@0.8.0") depends_on("fenics-dolfinx@0.7.2", when="@0.7.2") depends_on("fenics-dolfinx@0.6.0", when="@0.6.0") depends_on("py-fenics-basix@main", type=("build", "run"), when="@main") + depends_on("py-fenics-basix@0.9", type=("build", "link"), when="@0.9") depends_on("py-fenics-basix@0.8", type=("build", "link"), when="@0.8") depends_on("fenics-basix@main", type=("build", "link"), when="@main") + depends_on("fenics-basix@0.9", type=("build", "link"), when="@0.9") depends_on("fenics-basix@0.8", type=("build", "link"), when="@0.8") depends_on("fenics-basix@0.7", type=("build", "link"), when="@0.7") depends_on("fenics-basix@0.6", type=("build", "link"), when="@0.6") depends_on("py-fenics-ffcx@main", type=("build", "run"), when="@main") + depends_on("py-fenics-ffcx@0.9", type=("build", "run"), when="@0.9") depends_on("py-fenics-ffcx@0.8", type=("build", "run"), when="@0.8") depends_on("py-fenics-ffcx@0.7", type=("build", "run"), when="@0.7") depends_on("py-fenics-ffcx@0.6", type=("build", "run"), when="@0.6") depends_on("py-fenics-ufl@main", type=("build", "run"), when="@main") + depends_on("py-fenics-ufl@2024.2", type=("build", "run"), when="@0.9") depends_on("py-fenics-ufl@2024.1", type=("build", "run"), when="@0.8") depends_on("py-fenics-ufl@2023.2", type=("build", "run"), when="@0.7") depends_on("py-fenics-ufl@2023.1", type=("build", "run"), when="@0.6") @@ -58,11 +65,12 @@ class PyFenicsDolfinx(PythonPackage): depends_on("py-numpy@1.21:", type=("build", "run")) depends_on("py-mpi4py", type=("build", "run")) depends_on("py-petsc4py", type=("build", "run")) - depends_on("py-cffi", type=("build", "run")) + depends_on("py-cffi@:1.16", type=("build", "run")) depends_on("py-nanobind@2:", when="@0.9:", type="build") depends_on("py-nanobind@1.8:1.9", when="@0.8", type="build") - depends_on("py-scikit-build-core+pyproject@0.5:", when="@0.8:", type="build") + depends_on("py-scikit-build-core+pyproject@0.10:", when="@0.10:", type="build") + depends_on("py-scikit-build-core+pyproject@0.5:", when="@0.8:0.9", type="build") depends_on("py-pybind11@2.7.0:", when="@:0.7", type=("build", "run")) depends_on("py-setuptools@42:", when="@:0.7", type="build") diff --git a/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py b/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py index 950351e578ca41..fd243f6332e275 100644 --- a/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py +++ b/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py @@ -18,10 +18,19 @@ class PyFlaskSqlalchemy(PythonPackage): license("BSD-3-Clause") + # If py-slqalchemy@1.4.18: is too restrictive, consider downgrading py-flask-sqlalchemy to @2. version("3.0.2", sha256="16199f5b3ddfb69e0df2f52ae4c76aedbfec823462349dabb21a1b2e0a2b65e9") - - # https://github.com/pallets-eco/flask-sqlalchemy/blob/3.0.2/pyproject.toml - depends_on("python@3.7:", type=("build", "run")) - depends_on("py-flask@2.2:", type=("build", "run")) - depends_on("py-sqlalchemy@1.4.18:", type=("build", "run")) - depends_on("py-pdm-pep517@1:", type="build") + version("2.5.1", sha256="2bda44b43e7cacb15d4e05ff3cc1f8bc97936cc464623424102bfc2c35e95912") + + with when("@3"): + # https://github.com/pallets-eco/flask-sqlalchemy/blob/3.0.2/pyproject.toml + depends_on("python@3.7:", type=("build", "run")) + depends_on("py-flask@2.2:", type=("build", "run")) + depends_on("py-sqlalchemy@1.4.18:", type=("build", "run")) + depends_on("py-pdm-pep517@1:", type="build") + + with when("@2"): + # https://github.com/pallets-eco/flask-sqlalchemy/blob/2.5.1/setup.py + depends_on("py-flask@0.10:", type=("build", "run")) + depends_on("py-sqlalchemy@0.8.0:", type=("build", "run")) + depends_on("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-jupyter-events/package.py b/var/spack/repos/builtin/packages/py-jupyter-events/package.py index e87818492b324d..f1bd940b9d79fb 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-events/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-events/package.py @@ -12,10 +12,13 @@ class PyJupyterEvents(PythonPackage): homepage = "https://github.com/jupyter/jupyter_events" pypi = "jupyter_events/jupyter_events-0.6.3.tar.gz" + version("0.10.0", sha256="670b8229d3cc882ec782144ed22e0d29e1c2d639263f92ca8383e66682845e22") version("0.6.3", sha256="9a6e9995f75d1b7146b436ea24d696ce3a35bfa8bfe45e0c33c334c79464d0b3") depends_on("py-hatchling@1.5:", type="build") + depends_on("py-referencing", type=("build", "run"), when="@0.7:") + depends_on("py-jsonschema+format-nongpl@4.18:", type=("build", "run"), when="@0.7:") depends_on("py-jsonschema+format-nongpl@3.2:", type=("build", "run")) depends_on("py-python-json-logger@2.0.4:", type=("build", "run")) depends_on("py-pyyaml@5.3:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-jupyter-server/package.py b/var/spack/repos/builtin/packages/py-jupyter-server/package.py index 669ef586d1e291..c8a4c422e19565 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-server/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-server/package.py @@ -16,17 +16,32 @@ class PyJupyterServer(PythonPackage): license("BSD-3-Clause") + version("2.14.2", sha256="66095021aa9638ced276c248b1d81862e4c50f292d575920bbe960de1c56b12b") version("2.6.0", sha256="ae4af349f030ed08dd78cb7ac1a03a92d886000380c9ea6283f3c542a81f4b06") version("1.21.0", sha256="d0adca19913a3763359be7f0b8c2ea8bfde356f4b8edd8e3149d7d0fbfaa248b") version("1.18.1", sha256="2b72fc595bccae292260aad8157a0ead8da2c703ec6ae1bb7b36dbad0e267ea7") - version("1.17.0", sha256="7b3aa524790ab0da64f06dfe0b2af149d0a3f59aad71fdedcf1d8bae6508018c") - version("1.13.5", sha256="9e3e9717eea3bffab8cfb2ff330011be6c8bbd9cdae5b71cef169fcece2f19d3") - version("1.11.2", sha256="c1f32e0c1807ab2de37bf70af97a36b4436db0bc8af3124632b1f4441038bf95") - version("1.11.1", sha256="ab7ab1cc38512f15026cbcbb96300fb46ec8b24aa162263d9edd00e0a749b1e8") - version("1.11.0", sha256="8ab4f484a4a2698f757cff0769d27b5d991e0232a666d54f4d6ada4e6a61330b") - version("1.10.2", sha256="d3a3b68ebc6d7bfee1097f1712cf7709ee39c92379da2cc08724515bb85e72bf") - version("1.9.0", sha256="7d19006380f6217458a9db309b54e3dab87ced6c06329c61823907bef2a6f51b") - version("1.6.1", sha256="242ddd0b644f10e030f917019b47c381e0f2d2b950164af45cbd791d572198ac") + with default_args(deprecated=True): + # https://nvd.nist.gov/vuln/detail/CVE-2022-29241 + version( + "1.17.0", sha256="7b3aa524790ab0da64f06dfe0b2af149d0a3f59aad71fdedcf1d8bae6508018c" + ) + version( + "1.13.5", sha256="9e3e9717eea3bffab8cfb2ff330011be6c8bbd9cdae5b71cef169fcece2f19d3" + ) + version( + "1.11.2", sha256="c1f32e0c1807ab2de37bf70af97a36b4436db0bc8af3124632b1f4441038bf95" + ) + version( + "1.11.1", sha256="ab7ab1cc38512f15026cbcbb96300fb46ec8b24aa162263d9edd00e0a749b1e8" + ) + version( + "1.11.0", sha256="8ab4f484a4a2698f757cff0769d27b5d991e0232a666d54f4d6ada4e6a61330b" + ) + version( + "1.10.2", sha256="d3a3b68ebc6d7bfee1097f1712cf7709ee39c92379da2cc08724515bb85e72bf" + ) + version("1.9.0", sha256="7d19006380f6217458a9db309b54e3dab87ced6c06329c61823907bef2a6f51b") + version("1.6.1", sha256="242ddd0b644f10e030f917019b47c381e0f2d2b950164af45cbd791d572198ac") variant("typescript", default=False, description="Build the typescript code", when="@1.10.2:1") @@ -46,7 +61,9 @@ class PyJupyterServer(PythonPackage): depends_on("npm", type="build", when="+typescript") depends_on("py-anyio@3.1.0:", when="@2.2.1:", type=("build", "run")) depends_on("py-anyio@3.1.0:3", when="@:2.2.0", type=("build", "run")) + depends_on("py-argon2-cffi@21.1:", when="@2.14:", type=("build", "run")) depends_on("py-argon2-cffi", type=("build", "run")) + depends_on("py-jinja2@3.0.3:", when="@2.14:", type=("build", "run")) depends_on("py-jinja2", type=("build", "run")) depends_on("py-jupyter-client@7.4.4:", when="@2:", type=("build", "run")) depends_on("py-jupyter-client@6.1.12:", when="@1.16:", type=("build", "run")) @@ -54,18 +71,23 @@ class PyJupyterServer(PythonPackage): depends_on("py-jupyter-core@4.12:4,5.1:", when="@1.23.5:", type=("build", "run")) depends_on("py-jupyter-core@4.7:", when="@1.16:", type=("build", "run")) depends_on("py-jupyter-core@4.6:", type=("build", "run")) + depends_on("py-jupyter-server-terminals@0.4.4:", when="@2.14:", type=("build", "run")) depends_on("py-jupyter-server-terminals", when="@2:", type=("build", "run")) depends_on("py-nbconvert@6.4.4:", when="@1.16:", type=("build", "run")) depends_on("py-nbconvert", type=("build", "run")) depends_on("py-nbformat@5.3:", when="@2:", type=("build", "run")) depends_on("py-nbformat@5.2:", when="@1.15:", type=("build", "run")) depends_on("py-nbformat", type=("build", "run")) + depends_on("py-packaging@22.0:", when="@2.14:", type=("build", "run")) depends_on("py-packaging", when="@1.13.2:", type=("build", "run")) + depends_on("py-prometheus-client@0.9:", when="@2.14:", type=("build", "run")) depends_on("py-prometheus-client", type=("build", "run")) + # for windows depends_on pywinpty@2.0.1:, when='@2.14:' # for windows depends_on pywinpty, when='@1.13.2:' # py-pywinpty is not in spack and requires the build system maturin depends_on("py-pyzmq@24:", when="@2:", type=("build", "run")) depends_on("py-pyzmq@17:", type=("build", "run")) + depends_on("py-send2trash@1.8.2:", when="@2.7.1:", type=("build", "run")) depends_on("py-send2trash", type=("build", "run")) depends_on("py-terminado@0.8.3:", type=("build", "run")) depends_on("py-tornado@6.2:", when="@2:", type=("build", "run")) @@ -74,8 +96,11 @@ class PyJupyterServer(PythonPackage): depends_on("py-traitlets@5.1:", when="@1.16:", type=("build", "run")) depends_on("py-traitlets@5:", when="@1.13.3:", type=("build", "run")) depends_on("py-traitlets@4.2.1:", type=("build", "run")) + depends_on("py-websocket-client@1.7:", when="@2.14:", type=("build", "run")) depends_on("py-websocket-client", type=("build", "run")) + depends_on("py-jupyter-events@0.9:", when="@2.10.1:", type=("build", "run")) depends_on("py-jupyter-events@0.6:", when="@2.6:", type=("build", "run")) + depends_on("py-overrides@5.0:", when="@2.14:", type=("build", "run")) depends_on("py-overrides", when="@2.6:", type=("build", "run")) # old diff --git a/var/spack/repos/builtin/packages/py-metpy/package.py b/var/spack/repos/builtin/packages/py-metpy/package.py index 3be38a414c857b..59ab20a012b95f 100644 --- a/var/spack/repos/builtin/packages/py-metpy/package.py +++ b/var/spack/repos/builtin/packages/py-metpy/package.py @@ -20,20 +20,47 @@ class PyMetpy(PythonPackage): license("BSD-3-Clause") + version("1.6.2", sha256="eb065bac0d7818587fa38fa6c96dfe720d9d15b59af4e4866541894e267476bb") version("1.0.1", sha256="16fa9806facc24f31f454b898741ec5639a72ba9d4ff8a19ad0e94629d93cb95") - depends_on("python@3.6:", type=("build", "run")) - depends_on("py-setuptools", type="build") - depends_on("py-setuptools-scm", type="build") - depends_on("py-importlib-metadata@1.0.0:", when="^python@:3.7", type=("build", "run")) - depends_on("py-importlib-resources@1.3.0:", when="^python@:3.8", type=("build", "run")) - depends_on("py-matplotlib@2.1.0:", type=("build", "run")) - depends_on("py-numpy@1.16.0:", type=("build", "run")) - depends_on("py-pandas@0.24.0:", type=("build", "run")) - # Unable to Find "pint.unit" -- Module Not Found Error with py-pint@0.20: - depends_on("py-pint@0.10.1:0.19", type=("build", "run")) - depends_on("py-pooch@0.1:", type=("build", "run")) - depends_on("py-pyproj@2.3.0:", type=("build", "run")) - depends_on("py-scipy@1.0:", type=("build", "run")) - depends_on("py-traitlets@4.3.0:", type=("build", "run")) - depends_on("py-xarray@0.14.1:", type=("build", "run")) + variant( + "extras", + default=False, + when="@1.6.2:", + description="Enable xarray lazy-loading and advanced plotting", + ) + + with when("@1.6.2"): + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-setuptools@61:", type="build") + depends_on("py-setuptools-scm@3.4:", type="build") + depends_on("py-matplotlib@3.5.0:", type=("build", "run")) + depends_on("py-numpy@1.20.0:", type=("build", "run")) + depends_on("py-pandas@1.4.0:", type=("build", "run")) + depends_on("py-pint@0.17:", type=("build", "run")) + depends_on("py-pooch@1.2.0:", type=("build", "run")) + depends_on("py-pyproj@3.0.0:", type=("build", "run")) + depends_on("py-scipy@1.8.0:", type=("build", "run")) + depends_on("py-traitlets@5.0.5:", type=("build", "run")) + depends_on("py-xarray@0.21.0:", type=("build", "run")) + + depends_on("py-cartopy@0.12.0:", when="+extras") + depends_on("py-dask@2020.12.0:", when="+extras") + depends_on("py-shapely@1.6.4:", when="+extras") + + with when("@1.0.1"): + depends_on("python@3.6:", type=("build", "run")) + depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm", type="build") + depends_on("py-importlib-metadata@1.0.0:", when="^python@:3.7", type=("build", "run")) + depends_on("py-importlib-resources@1.3.0:", when="^python@:3.8", type=("build", "run")) + depends_on("py-matplotlib@2.1.0:", type=("build", "run")) + depends_on("py-numpy@1.16.0:", type=("build", "run")) + depends_on("py-pandas@0.24.0:", type=("build", "run")) + # Unable to Find "pint.unit" -- Module Not Found Error with py-pint@0.20: + depends_on("py-pint@0.10.1:0.19", type=("build", "run")) + depends_on("py-pooch@0.1:", type=("build", "run")) + depends_on("py-pyproj@2.3.0:", type=("build", "run")) + depends_on("py-scipy@1.0:", type=("build", "run")) + depends_on("py-traitlets@4.3.0:", type=("build", "run")) + depends_on("py-xarray@0.14.1:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py index 7eff0630dba655..1e0e5374200cfd 100644 --- a/var/spack/repos/builtin/packages/py-pillow/package.py +++ b/var/spack/repos/builtin/packages/py-pillow/package.py @@ -9,17 +9,18 @@ class PyPillowBase(PythonPackage): """Base class for Pillow and its fork Pillow-SIMD.""" - maintainers("adamjstewart") license("HPND") + maintainers("adamjstewart") provides("pil") # These defaults correspond to Pillow defaults # https://pillow.readthedocs.io/en/stable/installation/building-from-source.html - VARIANTS_IN_SETUP_CFG = ( + VARIANTS = ( "zlib", "jpeg", "tiff", "freetype", + "raqm", "lcms", "webp", "webpmux", @@ -31,18 +32,19 @@ class PyPillowBase(PythonPackage): variant("jpeg", default=True, description="JPEG functionality") variant("tiff", default=False, description="Compressed TIFF functionality") variant("freetype", default=False, description="Type related services") + variant("raqm", when="@8.2:+freetype", default=False, description="RAQM support") variant("lcms", default=False, description="Color management") variant("webp", default=False, description="WebP format") - variant("webpmux", when="+webp", default=False, description="WebP metadata") + variant("webpmux", when="@:10+webp", default=False, description="WebP metadata") variant("jpeg2000", default=False, description="JPEG 2000 functionality") variant("imagequant", when="@3.3:", default=False, description="Improved color quantization") variant("xcb", when="@7.1:", default=False, description="X11 screengrab support") - variant("raqm", when="@8.2:", default=False, description="RAQM support") # Required dependencies # https://pillow.readthedocs.io/en/stable/installation/python-support.html with default_args(type=("build", "link", "run")): - depends_on("python@3.8:3.13", when="@10.4:") + depends_on("python@3.9:3.13", when="@11:") + depends_on("python@3.8:3.13", when="@10.4") depends_on("python@3.8:3.12", when="@10.1:10.3") depends_on("python@3.8:3.11", when="@10.0") depends_on("python@3.7:3.11", when="@9.3:9.5") @@ -54,6 +56,7 @@ class PyPillowBase(PythonPackage): # pyproject.toml with default_args(type="build"): + depends_on("py-pip@22.1:", when="@10:") depends_on("py-setuptools@67.8:", when="@10:") depends_on("py-setuptools") @@ -63,21 +66,28 @@ class PyPillowBase(PythonPackage): depends_on("jpeg", when="+jpeg") depends_on("libtiff", when="+tiff") depends_on("freetype", when="+freetype") + depends_on("libraqm", when="+raqm") depends_on("lcms@2:", when="+lcms") depends_on("libwebp", when="+webp") depends_on("libwebp+libwebpmux+libwebpdemux", when="+webpmux") depends_on("openjpeg", when="+jpeg2000") depends_on("libimagequant", when="+imagequant") depends_on("libxcb", when="+xcb") - depends_on("libraqm", when="+raqm") - # Conflicting options - conflicts("+raqm", when="~freetype") + @when("@10:") + def config_settings(self, spec, prefix): + settings = {"parallel": make_jobs} - def patch(self): - """Patch setup.py to provide library and include directories - for dependencies.""" + for variant in self.VARIANTS: + if spec.satisfies(f"+{variant}"): + settings[variant] = "enable" + elif spec.satisfies(f"~{variant}"): + settings[variant] = "disable" + return settings + + def patch(self): + """Patch setup.py to provide library and include directories for dependencies.""" library_dirs = [] include_dirs = [] for dep in self.spec.dependencies(deptype="link"): @@ -86,21 +96,40 @@ def patch(self): include_dirs.extend(query.headers.directories) setup = FileFilter("setup.py") - setup.filter("library_dirs = []", "library_dirs = {0}".format(library_dirs), string=True) - setup.filter("include_dirs = []", "include_dirs = {0}".format(include_dirs), string=True) + if self.version >= Version("11"): + setup.filter( + "library_dirs: list[str] = []", + "library_dirs = {0}".format(library_dirs), + string=True, + ) + setup.filter( + "include_dirs: list[str] = []", + "include_dirs = {0}".format(include_dirs), + string=True, + ) + else: + setup.filter( + "library_dirs = []", "library_dirs = {0}".format(library_dirs), string=True + ) + setup.filter( + "include_dirs = []", "include_dirs = {0}".format(include_dirs), string=True + ) + + if self.spec.satisfies("@:9"): - def variant_to_cfg(variant): - able = "enable" if "+" + variant in self.spec else "disable" - return "{0}_{1}=1\n".format(able, variant) + def variant_to_cfg(variant): + able = "enable" if "+" + variant in self.spec else "disable" + return "{0}_{1}=1\n".format(able, variant) - with open("setup.cfg", "a") as setup: - setup.write("[build_ext]\n") - for variant in self.VARIANTS_IN_SETUP_CFG: - setup.write(variant_to_cfg(variant)) + with open("setup.cfg", "a") as setup: + setup.write("[build_ext]\n") + for variant in self.VARIANTS: + setup.write(variant_to_cfg(variant)) - setup.write("rpath={0}\n".format(":".join(self.rpath))) - setup.write("[install]\n") + setup.write("rpath={0}\n".format(":".join(self.rpath))) + setup.write("[install]\n") + @when("@:9") def setup_build_environment(self, env): env.set("MAX_CONCURRENCY", make_jobs) @@ -114,6 +143,7 @@ class PyPillow(PyPillowBase): homepage = "https://python-pillow.org/" pypi = "pillow/pillow-10.2.0.tar.gz" + version("11.0.0", sha256="72bacbaf24ac003fea9bff9837d1eedb6088758d41e100c1552930151f677739") version("10.4.0", sha256="166c1cd4d24309b30d61f79f4a9114b7b2313d7450912277855ff5dfd7cd4a06") version("10.3.0", sha256="9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d") version("10.2.0", sha256="e87f0b2c78157e12d7686b27d63c070fd65d994e8ddae6f328e0dcf4a0cd007e") @@ -135,9 +165,10 @@ class PyPillow(PyPillowBase): version("6.2.2", sha256="db9ff0c251ed066d367f53b64827cc9e18ccea001b986d08c265e53625dab950") version("6.2.1", sha256="bf4e972a88f8841d8fdc6db1a75e0f8d763e66e3754b03006cbc3854d89f1cb1") - depends_on("c", type="build") # generated + depends_on("c", type="build") for ver in [ + "11.0.0", "10.4.0", "10.3.0", "10.2.0", diff --git a/var/spack/repos/builtin/packages/py-send2trash/package.py b/var/spack/repos/builtin/packages/py-send2trash/package.py index 6c90fecee8bad4..fdd13fbd650403 100644 --- a/var/spack/repos/builtin/packages/py-send2trash/package.py +++ b/var/spack/repos/builtin/packages/py-send2trash/package.py @@ -14,6 +14,7 @@ class PySend2trash(PythonPackage): license("BSD-3-Clause") + version("1.8.3", sha256="90bcdf2ed2a18b687040c0f58bfccd6ad2e1b7ec495a9903119dc3c47c615052") version("1.8.0", sha256="937b038abd9f1e7b8c5d7a116be5dc4663beb71df74dcccffe56cacf992c7a9c") version("1.5.0", sha256="7cebc0ffc8b6d6e553bce9c6bb915614610ba2dec17c2f0643b1b97251da2a41") diff --git a/var/spack/repos/builtin/packages/py-websocket-client/package.py b/var/spack/repos/builtin/packages/py-websocket-client/package.py index b82bc1572984d8..eb5ddafbb6b9fc 100644 --- a/var/spack/repos/builtin/packages/py-websocket-client/package.py +++ b/var/spack/repos/builtin/packages/py-websocket-client/package.py @@ -15,6 +15,9 @@ class PyWebsocketClient(PythonPackage): license("Apache-2.0") + version("1.8.0", sha256="3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da") + version("1.7.0", sha256="10e511ea3a8c744631d3bd77e61eb17ed09304c413ad42cf6ddfa4c7787e8fe6") + version("1.6.4", sha256="b3324019b3c28572086c4a319f91d1dcd44e6e11cd340232978c684a7650d0df") version("1.6.3", sha256="3aad25d31284266bcfcfd1fd8a743f63282305a364b8d0948a43bd606acc652f") version("1.5.1", sha256="3f09e6d8230892547132177f575a4e3e73cfdf06526e20cc02aa1c3b47184d40") version("1.4.1", sha256="f9611eb65c8241a67fb373bef040b3cf8ad377a9f6546a12b620b6511e8ea9ef") @@ -31,7 +34,7 @@ class PyWebsocketClient(PythonPackage): def url_for_version(self, version): url = "https://files.pythonhosted.org/packages/source/w/{0}/{0}-{1}.tar.gz" - if version >= Version("0.59.0"): + if self.spec.satisfies("@0.59.0:1.7"): letter = "websocket-client" else: letter = "websocket_client" diff --git a/var/spack/repos/builtin/packages/sopt/package.py b/var/spack/repos/builtin/packages/sopt/package.py index a71731212f430f..754cf8b0a32b84 100644 --- a/var/spack/repos/builtin/packages/sopt/package.py +++ b/var/spack/repos/builtin/packages/sopt/package.py @@ -33,11 +33,12 @@ class Sopt(CMakePackage): depends_on("cmake@3") depends_on("eigen@3.4") - depends_on("libtiff@4") + depends_on("libtiff@4.7:") depends_on("mpi", when="+mpi") depends_on("catch2@3.4:3", when="+tests") depends_on("benchmark@1.8~performance_counters", when="+benchmarks") depends_on("onnx@1.16:", when="+onnxrt") + depends_on("py-onnxruntime@1.17.1:", when="+onnxrt") depends_on("doxygen@1.8:1.12+graphviz", when="+docs") patch( diff --git a/var/spack/repos/builtin/packages/sqlcipher/package.py b/var/spack/repos/builtin/packages/sqlcipher/package.py index 64de6d7367e477..221393e1b6e259 100644 --- a/var/spack/repos/builtin/packages/sqlcipher/package.py +++ b/var/spack/repos/builtin/packages/sqlcipher/package.py @@ -18,14 +18,18 @@ class Sqlcipher(AutotoolsPackage): license("BSD-3-Clause") - version("4.4.1", sha256="a36ed7c879a5e9af1054942201c75fc56f1db22e46bf6c2bbae3975dfeb6782d") - version("4.4.0", sha256="0924b2ae1079717954498bda78a30de20ce2a6083076b16214a711567821d148") - version("4.3.0", sha256="fccb37e440ada898902b294d02cde7af9e8706b185d77ed9f6f4d5b18b4c305f") - version("4.2.0", sha256="105c1b813f848da038c03647a8bfc9d42fb46865e6aaf4edfd46ff3b18cdccfc") - version("4.1.0", sha256="65144ca3ba4c0f9cd4bae8c20bb42f2b84424bf29d1ebcf04c44a728903b1faa") - version("4.0.1", sha256="2f803017378c7479cb791be59b7bad8392a15acddbcc094e4433581fe421f4ca") - version("4.0.0", sha256="c8f5fc6d800aae6107bf23900144804db5510c2676c93fbb269e4a0700837d68") - version("3.4.2", sha256="69897a5167f34e8a84c7069f1b283aba88cdfa8ec183165c4a5da2c816cfaadb") + version("4.6.1", sha256="d8f9afcbc2f4b55e316ca4ada4425daf3d0b4aab25f45e11a802ae422b9f53a3") + with default_args(deprecated=True): + # https://nvd.nist.gov/vuln/detail/CVE-2021-3119 + version("4.4.1", sha256="a36ed7c879a5e9af1054942201c75fc56f1db22e46bf6c2bbae3975dfeb6782d") + version("4.4.0", sha256="0924b2ae1079717954498bda78a30de20ce2a6083076b16214a711567821d148") + version("4.3.0", sha256="fccb37e440ada898902b294d02cde7af9e8706b185d77ed9f6f4d5b18b4c305f") + version("4.2.0", sha256="105c1b813f848da038c03647a8bfc9d42fb46865e6aaf4edfd46ff3b18cdccfc") + version("4.1.0", sha256="65144ca3ba4c0f9cd4bae8c20bb42f2b84424bf29d1ebcf04c44a728903b1faa") + version("4.0.1", sha256="2f803017378c7479cb791be59b7bad8392a15acddbcc094e4433581fe421f4ca") + version("4.0.0", sha256="c8f5fc6d800aae6107bf23900144804db5510c2676c93fbb269e4a0700837d68") + # strictly, 3.4.2 is not affected by any CVEs + version("3.4.2", sha256="69897a5167f34e8a84c7069f1b283aba88cdfa8ec183165c4a5da2c816cfaadb") depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated diff --git a/var/spack/repos/builtin/packages/yara/package.py b/var/spack/repos/builtin/packages/yara/package.py index 7b2da9e1e8767d..cce0191a10413e 100644 --- a/var/spack/repos/builtin/packages/yara/package.py +++ b/var/spack/repos/builtin/packages/yara/package.py @@ -15,7 +15,10 @@ class Yara(AutotoolsPackage): license("BSD-3-Clause") - version("3.9.0", sha256="ebe7fab0abadb90449a62afbd24e196e18b177efe71ffd8bf22df95c5386f64d") + version("4.5.2", sha256="1f87056fcb10ee361936ee7b0548444f7974612ebb0e681734d8de7df055d1ec") + with default_args(deprecated=True): + # https://nvd.nist.gov/vuln/detail/CVE-2021-3402 + version("3.9.0", sha256="ebe7fab0abadb90449a62afbd24e196e18b177efe71ffd8bf22df95c5386f64d") depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated @@ -24,3 +27,4 @@ class Yara(AutotoolsPackage): depends_on("automake", type="build") depends_on("libtool", type="build") depends_on("m4", type="build") + depends_on("pkgconfig", type="build", when="@4:")