summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-05-04acfl: add compiler-package mapping and fix version number (#36768)Annop Wongwathanarat3-16/+5
2023-05-04buildcache metadata: store hash -> prefix mapping (#37404)Harmen Stoppels1-18/+22
This ensures that: a) no externals are added to the tarball metadata file b) no externals are added to the prefix to prefix map on install, also for old tarballs that did include externals c) ensure that the prefix -> prefix map is always string to string, and doesn't contain None in case for some reason a hash is missing
2023-05-03docs: update RHEL/CentOS system prerequisites (#36720)Bryce Torcello1-6/+3
2023-05-03Add 'zypper' to the valid container.os_packages options (#36681)Egbert Eich3-2/+27
Signed-off-by: Egbert Eich <eich@suse.com> Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com> Co-authored-by: e4t <e4t@users.noreply.github.com>
2023-05-03Allow adding specs to an environment without the 'specs' attribute (#37378)Massimiliano Culpo2-2/+24
2023-05-03remove unused global in bindist tests (#37358)Harmen Stoppels2-10/+0
* remove unused global in bindist tests * remove unused function
2023-05-03buildcache push: improve printing (#36141)Scott Wittenburg9-224/+284
2023-05-02Disable module file generation by default (#37258)Massimiliano Culpo3-13/+50
* Disable module generation by default (#35564) a) It's used by site administrators, so it's niche b) If it's used by site administrators, they likely need to modify the config anyhow, so the default config only serves as an example to get started c) it's too arbitrary to enable tcl, but disable lmod * Remove leftover from old module file schema * Warn if module file config is detected and generation is disabled --------- Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-05-01Factor YAML manifest manipulation out of the Environment class (#36927)Massimiliano Culpo14-502/+978
Change the signature of the Environment.__init__ method to have a single argument, i.e. the directory where the environment manifest is located. Initializing that directory is now delegated to a function taking care of all the error handling upfront. Environment objects require a "spack.yaml" to be available to be constructed. Add a class to manage the environment manifest file. The environment now delegates to an attribute of that class the responsibility of keeping track of changes modifying the manifest. This allows simplifying the updates of the manifest file, and helps keeping in sync the spec lists in memory with the spack.yaml on disk.
2023-04-28Spec.format: fix bug in dependency hash formatting (#37073)Greg Becker2-60/+58
Co-authored-by: becker33 <becker33@users.noreply.github.com>
2023-04-28Reduce the number of stat calls in "spack verify" (#37251)Harmen Stoppels2-66/+47
Spack comes to a crawl post-install of nvhpc, which is partly thanks to this post install hook which has a lot of redundancy, and isn't correct. 1. There's no need to store "type" because that _is_ "mode". 2. There are more file types than "symlink", "dir", "file". 3. Don't checksum device type things 4. Don't run 3 stat calls (exists, stat, isdir/islink), but one lstat call 5. Don't read entire files into memory I also don't know why `spack.crypto` wasn't used for checksumming, but I guess it's too late for that now. Finally md5 would've been the faster algorithm, which would've been fine given that a non cryptographicall checksum was used anyways.
2023-04-28Add container images supporting RHEL alternatives (#36713)Jonathon Anderson1-0/+84
Add container support for AlmaLinux, Fedora 37 and 38 and Rocky Linux
2023-04-25require: do not allow additional properties (#37174)Harmen Stoppels1-0/+1
2023-04-24Copy more logs to CI artifacts (#36783)Adam J. Stewart1-8/+8
* Copy more logs to CI artifacts * Trigger rebuilds again * Remove test variant
2023-04-21Windows: shell variables are case-insensitive (#36813)John W. Parent2-1/+34
If we modify both Path and PATH, on Windows they will clobber one another. This PR updates the shell modification logic to automatically convert variable names to upper-case on Windows.
2023-04-21Enable verify tests on windows (#36975)markus-ferrell1-5/+0
2023-04-21Enable versions cmd tests on windows (#36974)markus-ferrell1-4/+0
2023-04-21Enable test suite tests on windows (#36966)markus-ferrell1-2/+1
2023-04-21Enable database tests for windows (#36968)markus-ferrell1-6/+0
2023-04-21Enable config values tests on windows (#36969)markus-ferrell1-3/+0
2023-04-21Enable graph tests on windows (#36967)markus-ferrell1-4/+0
2023-04-21Update archspec to latest release (#37070)Massimiliano Culpo4-23/+209
Fix -mcpu flags for gcc on neoverse-v1 Add support for NVHPC flags
2023-04-20Use core API to create a Makefile during bootstrapping (#37023)Massimiliano Culpo1-8/+6
2023-04-19make version(...) kwargs explicit (#36998)Harmen Stoppels4-31/+97
- [x] Replace `version(ver, checksum=None, **kwargs)` signature with `version(ver, checksum=None, *, sha256=..., ...)` explicitly listing all arguments. - [x] Fix various issues in packages: - `tags` instead of `tag` - `default` instead of `preferred` - `sha26` instead of `sha256` - etc Also, use `sha256=...` consistently. Note: setting `sha256` currently doesn't validate the checksum length, so you could do `sha256="a"*32` and it would get checked as `md5`... but that's something for another PR.
2023-04-19Extract depfile logic from cli command into a core module (#36995)Harmen Stoppels3-156/+317
2023-04-19installer.py: drop build edges of installed packages by default (#36707)Alec Scott2-1/+52
This means that `spack install` will now build the minimal set of packages required to install the root(s). To opt out of build edge pruning, use `spack install --include-build-deps`. Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-04-18editing: add higher-precedence `SPACK_EDITOR` environment variableTodd Gamblin4-4/+57
Other tools like git support `GIT_EDITOR` which takes higher precedence than the standard `VISUAL` or `EDITOR` variables. This adds similar support for Spack, in the `SPACK_EDITOR` env var. - [x] consolidate editor code from hooks into `spack.util.editor` - [x] add more editor tests - [x] add support for `SPACK_EDITOR` - [x] add a documentation section for controlling the editor and reference it
2023-04-18refactor: unify use of spack.util.editorTodd Gamblin3-59/+107
Code from `spack.util.editor` was duplicated into our licensing hook in #11968. We really only want one place where editor search logic is implemented. This consolidates the logic into `spack.util.editor`, including a special case to run `gvim` with `-f`. - [x] consolidate editor search logic in spack.util.editor - [x] add tests for licensing case, where `Executable` is used instead of `os.execv` - [x] make `_exec_func` argument of `editor()` into public `exec_fn` arg - [x] add type annotations
2023-04-18Fix compilation on Cray (target: any) (#37011)Massimiliano Culpo2-0/+29
fixes #36628 Fix using compilers that declare "target: any" in their configuration. This should happen only on Cray with the module based programming environment.
2023-04-18spack ci: preserve custom attributes in build jobs (#36651)Jonathon Anderson3-96/+79
* Simplify test/cmd/ci.py::test_ci_generate_with_custom_scripts * Rearrange the build-job logic in generate_gitlab_ci_yaml * Preserve all unknown attributes in build jobs * Slip tests for custom attributes in the tests for other job types * Support custom artifacts * [@spackbot] updating style on behalf of blue42u * Don't bother sorting needs --------- Co-authored-by: blue42u <blue42u@users.noreply.github.com>
2023-04-18Revert addition of SPACK_EDITOR pending review.Todd Gamblin5-160/+62
This reverts commit d8a26905ee0fc9e72a05a87bf7ced7e7fc2d4900. This reverts commit 1ee049ccc3d4d4bf1e8dafad0247f3cef01dda58. These were spuriously pushed to `develop`.
2023-04-18editing: add higher-precedence `SPACK_EDITOR` environment variableTodd Gamblin4-4/+57
Other tools like git support `GIT_EDITOR` which takes higher precedence than the standard `VISUAL` or `EDITOR` variables. This adds similar support for Spack, in the `SPACK_EDITOR` env var. - [x] consolidate editor code from hooks into `spack.util.editor` - [x] add more editor tests - [x] add support for `SPACK_EDITOR` - [x] add a documentation section for controlling the editor and reference it
2023-04-18refactor: unify use of spack.util.editorTodd Gamblin3-59/+104
Code from `spack.util.editor` was duplicated into our licensing hook in #11968. We really only want one place where editor search logic is implemented. This consolidates the logic into `spack.util.editor`, including a special case to run `gvim` with `-f`. - [x] consolidate editor search logic in spack.util.editor - [x] add tests for licensing case, where `Executable` is used instead of `os.execv` - [x] make `_exec_func` argument of `editor()` into public `exec_fn` arg - [x] add type annotations
2023-04-17Allow users to remove items from hierarchy per-path (#31351)Greg Becker4-2/+34
* lmod modules: allow users to remove items from hierarchy per-spec This allows MPI wrappers that depend on MPI to be removed from the MPI portion of the hierarchy and be made available when the appropriate compiler is loaded. module load gcc module load mpi-wrapper # implicitly loads mpi module load hdf5 This allows users to treat an mpi wrapper like an mpi program
2023-04-17Revert "move depfile logic into its own module, separate traversal logic ↵Harmen Stoppels2-264/+147
from model (#36911)" (#36985) This reverts commit a676f706a8783e9d517e95e8cd2b6997e527fc3c.
2023-04-17move depfile logic into its own module, separate traversal logic from model ↵Harmen Stoppels2-147/+264
(#36911)
2023-04-14Change environment modifications to escape with double quotes (#36789)Doug Jacobsen2-3/+42
This commit changes the environment modifications class to escape strings with double quotes instead of single quotes. Single quotes prevent the expansion of enviornment variables that are nested within environment variable definitions.
2023-04-14gitlab ci: Better tagging of "service" jobs (#36846)Scott Wittenburg1-0/+50
- Tag non-rebuild jobs to target a cheaper (and more highly available) subset of runners. - Add missing resource requests to these jobs as well.
2023-04-14netcdf: fix bugs introduced with multiple build systems split (#36825)Massimiliano Culpo2-9/+11
Fixes #36689 - The "base" builder class should be last in the MRO - `filter_compiler_wrappers` needs to be moved to builders - Decorating a function from a mixin class require using the correct metaclass for the mixin
2023-04-13Resolve `<include-fragment>` tags e.g. in github release pages (#36674)Wouter Deconinck4-2/+70
This aims to resolve #34164 by resolving the <include-fragment> tags that GitHub has started using for their release pages, see https://github.github.io/include-fragment-element/. This feels a bit hacky but intended as a starting point for discussion. After reading a page during spidering, it first parses for include-fragments, gets them all, and treats them all as separate pages. Then it looks for href links in both the page itself and the fragments. Co-authored-by: Alec Scott <alec@bcs.sh>
2023-04-13containerize: strip binaries in a less aggressive way (#36683)Massimiliano Culpo2-0/+22
2023-04-11Windows/MSVC: propagate all VCVARS changes to Spack env (#36582)John W. Parent1-4/+5
MSVC compilers rely on vcvars environment setup scripts to establish build environement variables neccesary for all projects to build successfully. Prior to this we were only piping LIB, INCLUDE, and PATH change through. Instead we need to propegate all changes to the env variables made by VCVARs in order to establish robust support for the MSVC compiler. This most significantly impacts projects that need to be build with NMake and MSBuild
2023-04-11Windows testing: reenable tests for "spack dependents" (#36786)markus-ferrell2-6/+0
All the tests worked out of the box. This just removes the skip statements.
2023-04-11Remove a unit-test that monkey-patches os.stat (#36757)Harmen Stoppels1-42/+0
"test_create_stage_root_bad_uid" started failing as pytest updated to v7.3.0
2023-04-10Ci backwards compat (#36045)kwryankrattiger5-25/+266
* CI: Fixup docs for bootstrap. * CI: Add compatibility shim * Add an update method for CI Update requires manually renaming section to `ci`. After this patch, updating and using the deprecated `gitlab-ci` section should be possible. * Fix typos in generate warnings * Fixup CI schema validation * Add unit tests for legacy CI * Add deprecated CI stack for continuous testing * Allow updating gitlab-ci section directly with env update * Make warning give good advice for updating gitlab-ci * Fix typo in CI name * Remove white space * Remove unneeded component of deprected-ci
2023-04-07Fix incorrect reformatting of spack.yaml (#36698)Massimiliano Culpo3-55/+101
* Extract a method to warn when the manifest is not up-to-date * Extract methods to update the repository and ensure dir exists * Simplify further the write method, add failing unit-test * Fix the function computing YAML equivalence between two instances
2023-04-06spack install: fail if --log-file and not --log-format (#36684)Massimiliano Culpo1-0/+4
fixes #34551 "spack install" now fails if a user passed the --logfile option without specifying a log format.
2023-04-05Update archspec to HEAD of develop (#36657)Massimiliano Culpo3-12/+62
2023-04-04Add workflow:rules:always to spack ci output (#36011)Jonathon Anderson1-0/+3
2023-04-04Make spack config update work on environments (#36542)Harmen Stoppels3-21/+46
Previously `spack -e bla config update <section>` would treat the environment config scope as standard config file instead of a single file config scope. This fixes that.