summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-05-05Add spack buildcache push (alias to buildcache create) (#34861)Harmen Stoppels7-48/+46
`spack buildcache create` is a misnomer cause it's the only way to push to an existing buildcache (and it in fact calls binary_distribution.push). Also we have `spack buildcache update-index` but for create the flag is `--rebuild-index`, which is confusing (and also... why "rebuild" something if the command is "create" in the first place, that implies it wasn't there to begin with). So, after this PR, you can use either ``` spack buildcache create --rebuild-index ``` or ``` spack buildcache push --update-index ``` Also, alias `spack buildcache rebuild-index` to `spack buildcache update-index`.
2023-05-05Relax environment manifest filename requirements and lockfile identification ↵Chris Green6-33/+92
criteria (#37413) * Relax filename requirements and lockfile identification criteria * Tests * Update function docs and help text * Update function documentation * Update Sphinx documentation * Adjustments per https://github.com/spack/spack/pull/37413#pullrequestreview-1413540132 * Further tweaks per https://github.com/spack/spack/pull/37413#pullrequestreview-1413971254 * Doc fixes per https://github.com/spack/spack/pull/37413#issuecomment-1535976068
2023-05-05cc: deal with -Wl,-rpath= without value, deal with NAG (#37215)Harmen Stoppels2-5/+32
Spack never parsed `nagfor` linker arguments put on the compiler line: ``` nagfor -Wl,-Wl,,-rpath,,/path ```` so, let's continue not attempting to parse that.
2023-05-05meson: change default build type to "release" (#37436)Michael Kuhn1-1/+1
The same was done for CMake in #36679.
2023-05-05spack uninstall: reduce verbosity with named environments (#34001)Harmen Stoppels5-192/+96
2023-05-05deprecate buildcache create --rel, buildcache install --allow-root (#37285)Harmen Stoppels4-19/+21
`buildcache create --rel`: deprecate this because there is no point in making things relative before tarballing; on install you need to expand `$ORIGIN` / `@loader_path` / relative symlinks anyways because some dependencies may actually be in an upstream, or have different projections. `buildcache install --allow-root`: this flag was propagated through a lot of functions but was ultimately unused.
2023-05-05Remove "blacklist" and "whitelist" from module configuration (#37432)Massimiliano Culpo6-154/+21
The sections were deprecated in v0.19
2023-05-04Allow choosing the name of the packages subdirectory in repositories (#36643)Greg Becker4-22/+61
Co-authored-by: becker33 <becker33@users.noreply.github.com>
2023-05-04Place an upper bound on urllib3 to build docs (#37433)Massimiliano Culpo1-0/+1
2023-05-04detect ifx 2023.1, add test (#37377)Robert Cohn2-1/+6
2023-05-04cmake build system: change default build type to `Release` (#36679)Massimiliano Culpo1-1/+5
This switches the default Make build type to `build_type=Release`. This offers: - higher optimization level, including loop vectorization on older GCC - adds NDEBUG define, which disables assertions, which could cause speedups if assertions are in loops etc - no `-g` means smaller install size Downsides are: - worse backtraces (though this does NOT strip symbols) - perf reports may be useless - no function arguments / local variables in debugger (could be of course) - no file path / line numbers in debugger The downsides can be mitigated by overriding to `build_type=RelWithDebInfo` in `packages.yaml`, if needed. The upside is that builds will be MUCH smaller (and faster) with this change. --------- Co-authored-by: Gregory Becker <becker33@llnl.gov>
2023-05-04Update vendored ruamel.yaml to v0.17.21 (#37008)Massimiliano Culpo72-8601/+15041
* Vendor ruamel.yaml v0.17.21 * Add unit test for whitespace regression * Add an abstraction layer in Spack to wrap ruamel.yaml All YAML operations are routed through spack.util.spack_yaml The custom classes have been adapted to the new ruamel.yaml class hierarchy. Fixed line annotation issue in "spack config blame"
2023-05-04Remove the old spec format in configuration (#37425)Massimiliano Culpo2-303/+1
The format was deprecated in v0.15
2023-05-04Deprecate `env:` as top level environment key (#37424)Massimiliano Culpo6-61/+68
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)