summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2024-05-21gitlab ci: fix untouched spec pruning on windows (#44279)Scott Wittenburg1-2/+2
Use correct path separator in get_all_package_diffs for all platforms. Ensures correct package change computation on Windows when pruning unchanged specs in Gitlab CI
2024-05-19audit: disallow github.com/org/repo/pull/n/commits/hash.patch?full_index=1 ↵Wouter Deconinck2-7/+21
(#44212) * audit: disallow github.com/org/repo/pull/n/commits/hash.patch?full_index=1 * [@spackbot] updating style on behalf of wdconinc * audit: fix style * audit: github.com/o/r/pull/n/commits/sha.patch -> sha.patch * [@spackbot] updating style on behalf of wdconinc * Revert "[@spackbot] updating style on behalf of wdconinc" This reverts commit 2ecec9923829c9514f6e09885ee57cda3688b2f4. * Revert "audit: github.com/o/r/pull/n/commits/sha.patch -> sha.patch" This reverts commit 5bd7da2cadee9dae44ce14f35a4fb72323c0b98e. * fix: modify audit message with suggested fix * audit: github.com/o/r/pull/n/commits/sha.patch -> /o/r/commit/sha.patch?full_index=1 --------- Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-05-18oci buildcache: handle pagination of tags (#43136)Scott Wittenburg6-10/+171
This fixes an issue where ghcr, gitlab and possibly other container registries paginate tags by default, which violates the OCI spec v1.0, but is common practice (the spec was broken itself). After this commit, you can create build cache indices of > 100 specs on ghcr. Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-05-17docs: remove warning about repositories and package extension (#44247)Todd Gamblin1-6/+0
Local package repositories are very well supported and we test them extensively, so this warning from 8 years ago can be removed from the docs.
2024-05-17hpcviewer: Update URLs to use GitLab release assets (#44129)Jonathon Anderson2-0/+9
2024-05-17docs: show phase signature for builders (#44067)Chris Marsh1-0/+9
2024-05-17Fix broken link in docs (#44217)Andrew-Dunning-NNL1-1/+1
2024-05-17build_environment.py: deal with rpathing identical packages (#44219)Harmen Stoppels2-7/+42
When multiple gcc-runtime packages exist in the same link sub-dag, only rpath the latest.
2024-05-16Gitlab CI: Windows Configs (#43967)John W. Parent3-6/+43
Add support for Gitlab CI on Windows This PR adds the config changes required to configure and execute Gitlab pipelines running Windows builds on Windows runners using the existing Gitlab CI infrastructure (and newly added Windows infrastructure). * Adds support for generating child pipelines dispatched to Windows runners * Refactors the relevant pre-scripts, scripts, and post scripts to be compatible with Windows * Adds Windows config section describing Windows jobs * Adds VTK as Windows build stack (to be expanded later) * Modifies proj to build on Windows * Refactors Windows rpath symlinking to avoid system libs and externals --------- Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com> Co-authored-by: Mike VanDenburgh <michael.vandenburgh@kitware.com> Co-authored-by: Todd Gamblin <tgamblin@llnl.gov> Co-authored-by: Scott Wittenburg <scott.wittenburg@kitware.com>
2024-05-16Prefer llnl.util.symlink.readlink to os.readlink (#44126)John W. Parent13-25/+33
Symlinks on Windows can use longpath prefixes (\\?\); these are fine in the context of win32 API interactions but break numerous facets of Spack behavior that rely on string parsing/matching (archiving, binary distributions, tarball extraction, view regen, etc). Spack's internal readlink method (llnl.util.symlink.readlink) gracefully handles this by removing the prefix and otherwise behaving exactly as os.readlink does, so we should prefer that in all cases.
2024-05-15bugfix: add arg to `write_line_break()` in `spack_yaml` (#42727)Todd Gamblin1-2/+2
`ruamel`'s `Emitter.write_line_break()` method takes an extra argument that we forgot to implement in our custom emitter.
2024-05-15Cdash reporting timeout (#44213)John W. Parent3-6/+8
* Add timeout to cdash reporter PUT request Add cdash timeout everywhere Correct mock responder api * Style * brief doc
2024-05-13glibc: detect from "Free Software Foundation" not "gnu" (#44154)Harmen Stoppels1-2/+2
which should be more generic
2024-05-13spack uninstall: improve error message for dependent environment (#44149)Greg Becker1-0/+2
2024-05-13spack checksum: do not add expand=False to wheels (#44118)Adam J. Stewart1-11/+1
2024-05-12clang: support cxx20_flag and cxx23_flag (#43438)Wouter Deconinck2-1/+33
* clang: support cxx20_flag and cxx23_flag * clang: coverage test cxx{}_flag and c{}_flag additions
2024-05-11Bump version on `develop` to v0.23dev0 (#44137)Todd Gamblin1-1/+1
2024-05-11oci: improve default_retry (#44132)Harmen Stoppels1-3/+12
Apparently urllib can throw a range of different exceptions: 1. HTTPError 2. URLError with e.reason set to the actual exception 3. TimeoutError from getresponse, which is not wrapped
2024-05-10Buildcache/ensure symlinks proper prefix (#43851)John W. Parent7-13/+29
* archive: relative links only Ensure all links written into tarfiles generated from Spack prefixes do not contain symlinks pointing outside the prefix * binary_distribution: limit extraction to prefix Ensure files extracted from spackballs are not links pointing outside of the prefix * Ensure rpaths are properly set on Windows * hard error on extraction of absolute links * refactor for non link-modifying approach * Restore tarball extraction to original impl * use custom readlink * cleanup symlink module * make lstrip
2024-05-10Windows: Non config changes to support Gitlab CI (#43965)John W. Parent8-115/+102
* Quote python for shlex * Remove python path quoting patch * spack env: Allow `C` "protocol" for config_path When running spack on windows, a path beginning with `C://...` is a valid path. * Remove makefile from ci rebuild * GPG use llnl.util.filesystem.getuid * Cleanup process_command * Remove unused lines * Fix tyop in encode_path * Double quote arguments * Cleanup process_command * Pass cdash args with = * Escape parens in CMD script * escape parens doesn't only apply to paths * Install deps * sfn prefix * use sfn with libxml2 * Add hash to dep install * WIP * REview * Changes missed in prior review commit * Style * Ensure we handle Windows paths with config scopes * clarify docstring * No more MAKE_COMMAND * syntax cleanup * Actually correct is_path_url * Correct call * raise on other errors * url2path behaves differently on unix * Ensure proper quoting * actually prepend slash in slash_hash --------- Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com> Co-authored-by: Mike VanDenburgh <michael.vandenburgh@kitware.com>
2024-05-10PythonExtension: fix issue where package does not extend python (#44109)Harmen Stoppels1-8/+12
2024-05-09Fix filtering external specs (#44093)Massimiliano Culpo3-0/+48
When an include filter on externals is present, implicitly include libcs. Also, do not penalize deprecated versions if they come from externals.
2024-05-08Bump removal version in deprecation messages (#44064)Massimiliano Culpo3-6/+6
2024-05-07Remove dead environment creation code (#44065)Tamara Dahlgren1-8/+0
2024-05-07build(deps): bump pygments from 2.17.2 to 2.18.0 in /lib/spack/docs (#44044)dependabot[bot]1-1/+1
Bumps [pygments](https://github.com/pygments/pygments) from 2.17.2 to 2.18.0. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.17.2...2.18.0) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07Include concrete environments with `include_concrete` (#33768)Richarda Butler8-42/+1104
Add the ability to include any number of (potentially nested) concrete environments, e.g.: ```yaml spack: specs: [] concretizer: unify: true include_concrete: - /path/to/environment1 - /path/to/environment2 ``` or, from the CLI: ```console $ spack env create myenv $ spack -e myenv add python $ spack -e myenv concretize $ spack env create --include-concrete myenv included_env ``` The contents of included concrete environments' spack.lock files are included in the environment's lock file at creation time. Any changes to included concrete environments are only reflected after the environment is re-concretized from the re-concretized included environments. - [x] Concretize included envs - [x] Save concrete specs in memory by hash - [x] Add included envs to combined env's lock file - [x] Add test - [x] Update documentation Co-authored-by: Kayla Butler <<butler59@llnl.gov> Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.co m> Co-authored-by: Todd Gamblin <tgamblin@llnl.gov> Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-05-07Update the tutorial command to point to releases/v0.22 (#44056)Massimiliano Culpo1-1/+1
2024-05-07Remove spurious ASP debug lines (#44051)Massimiliano Culpo1-0/+3
2024-05-07certs: fix interpolation and disallow relative paths (#44030)psakievich5-64/+60
2024-05-07Warn users of the future removal of platform=cray (#43980)Massimiliano Culpo1-0/+6
2024-05-07llnl.util.tty.color._force_color: init in global scope (#44036)Harmen Stoppels2-18/+27
Currently SPACK_COLOR=always is not respected in the build process on macOS, because the global `_force_color` is re-evaluated in global scope during module setup, where it is always `None`. So, move global init bits from main.py to the module itself.
2024-05-07Respect requests when filtering reused specs (#44042)Massimiliano Culpo2-1/+54
Some specs which were excluded from reuse, are currently added back to the solve when we traverse dependencies of other reusable specs. This fixes the issue by keeping track of what we can explicitly reuse.
2024-05-06python: always use a venv (#40773)Harmen Stoppels12-293/+257
This commit adds a layer of indirection to improve build isolation with and without external Python, as well as usability of environment views. It adds `python-venv` as a dependency to all packages that `extends("python")`, which has the following advantages: 1. Build isolation: only `PYTHONPATH` is considered in builds, not user / system packages 2. Stable install layout: fixes the problem on Debian, RHEL and Fedora where external / system python produces `bin/local` subdirs in Spack install prefixes. 3. Environment views are Python virtual environments (and if you add `py-pip` things like `pip list` work) Views work whether they're symlink, hardlink or copy type. This commit additionally makes `spec["python"].command` return `spec["python-venv"].command`. The rationale is that packages in repos we do not own do not pass the underlying python to the build system, which could still result in incorrectly computed install layouts. Other attributes like `libs`, `headers` should be on `python` anyways and need no change.
2024-05-06Remove Fedora 37 and 38, Ubuntu 18 from CI (#44006)Massimiliano Culpo6-45/+7
2024-05-06clingo bootstrap: remove 3.12 patch and concretizer workarounds (#44028)Harmen Stoppels1-4/+0
2024-05-06bootstrap: lazy bootstrapping of clingo and GnuPG (#44026)Harmen Stoppels4-4/+12
Currently bootstrapping from source fails because clingo requires gnupg requires clingo. This commit stops eager bootstrapping. We don't need `patchelf` nor `gnupg` generally. They're bootstrapped when needed.
2024-05-06External package detection for compilers (#43464)Greg Becker6-48/+202
This creates shared infrastructure for compiler packages to implement the detailed search capabilities from the `spack compiler find` command for the `spack external find` command. After this commit, `spack compiler find` can be replaced with `spack external find --tag compiler`, with the exception of mixed toolchains.
2024-05-06Update vendored archspec to v0.2.4 (#44005)Massimiliano Culpo8-17/+77
2024-05-06`spack env create <env>`: dir if dir-like (#44024)Harmen Stoppels3-44/+53
A named env cannot contain `.` and `/`. So when a user runs `spack env create ./here` do not error but treat it as `spack env create -d ./here`. Also fix help string of `spack env create`, which seems to have been copied from `activate` incorrectly.
2024-05-06build(deps): bump black from 24.4.0 to 24.4.2 in /lib/spack/docs (#43878)dependabot[bot]1-1/+1
Bumps [black](https://github.com/psf/black) from 24.4.0 to 24.4.2. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/24.4.0...24.4.2) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-04build(deps): bump mypy from 1.9.0 to 1.10.0 in /lib/spack/docs (#43834)dependabot[bot]1-1/+1
Bumps [mypy](https://github.com/python/mypy) from 1.9.0 to 1.10.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-03concretizer args: --fresh-roots == --reuse-deps (#43988)Harmen Stoppels2-2/+9
Since reuse is the default now, `--reuse-deps` can be confusing, as it technically does not imply roots are fresh. So add `--fresh-roots`, which is also easier to discover when running `spack concretize --fre<tab>`
2024-05-02Spec.satisfies: fix a bug with concrete spec from JSON (#43968)Massimiliano Culpo2-3/+25
Fix a bug triggered by missing a virtual on some transitive edge, in a subdag of a pure build dependency.
2024-05-02docs: re-enable google analytics (#43974)Todd Gamblin1-0/+12
We recently switched to using the new ReadTheDocs with "addons". That includes its own analytics, which is nice, but we also want to continue using our GA4 analytics. Adding GA4 is no longer supported by RTD, so we have to add it manually. - [x] re-add the gtag to all pages, manually Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-05-02libc: detect ARM flavor (#43959)jdomke1-3/+3
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-05-02Ignore external packages when pushing to buildcache automatically ↵Adrien Bernede1-0/+4
(--autopush) (#43930)
2024-05-02Windows: auto-add WGL/SDK as externals (#43752)John W. Parent5-4/+77
Adds a pre-concretization check for the Windows SDK and WGL (Windows GL) packages as non-buildable externals. This is a redo of https://github.com/spack/spack/pull/43459, but makes sure to modify the configuration scope outside of the bootstrap scope: whichever is highest-precedence in the user's environment at the time the concretization runs, which should either be an env scope or the ~ scope. Adds pytest fixture mocking the check for WGL and WSDK as if they were present.
2024-05-01Allow more control over which specs are reused (#42782)Massimiliano Culpo4-54/+357
This PR gives users finer control over which specs are reused during concretization. The value of the `concretizer:reuse` config option now can take an object with the following properties: - `roots`: true if reusing roots, false if reusing just dependencies - `exclude`: list of constraints used to select reusable specs - `include`: list of constraints used to select reusable specs - `from`: allows to select the sources of reused specs ### Examples #### Reuse only specs compiled with GCC ```yaml concretizer: reuse: roots: true include: - "%gcc" ``` #### `openmpi` must be used from externals, and it must be the only external used ```yaml concretizer: reuse: roots: true from: - type: local exclude: - "openmpi" - type: buildcache exclude: - "openmpi" - type: external include: - "openmpi" ```
2024-05-01containers: add ubuntu 24.04 (#43881)Wouter Deconinck2-0/+10
* containers: add ubuntu 24.04 * containers: use python3-boto3 pkg instead of pip install
2024-05-01build(deps): bump pytest from 8.1.1 to 8.2.0 in /lib/spack/docs (#43908)dependabot[bot]1-1/+1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.1 to 8.2.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.1.1...8.2.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>