summaryrefslogtreecommitdiff
path: root/share/spack/spack-completion.bash
AgeCommit message (Collapse)AuthorFilesLines
2020-05-14Pipelines: Support DAG scheduling and dynamic child pipelinesScott Wittenburg1-9/+1
This change also adds a code path through the spack ci pipelines infrastructure which supports PR testing on the Spack repository. Gitlab pipelines run as a result of a PR (either creation or pushing to a PR branch) will only verify that the packages in the environment build without error. When the PR branch is merged to develop, another pipeline will run which results in the generated binaries getting pushed to the binary mirror.
2020-05-13Added alias and bash completion for spacktivate (#16472)Ben Bergen1-0/+7
2020-05-11Remove 'spack bootstrap' and associated docs (#15179)Massimiliano Culpo1-5/+1
fixes #15145 This commit removes the outdated `spack bootstrap` command and any reference to it in the documentation and unit tests.
2020-05-07"spack checksum" QoL (#14311)iarspider1-1/+1
* Non-interactive mode for spack checksum; allow passing 'package@version' to spack checksum * Flake8 fixes * Update checksum.py Fix typo * Update spack-completion script * Automatically set non-interactive mode if more than one version passed * Update lib/spack/spack/cmd/checksum.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Add documentation and update spack-completion * Flake8 * Rename option * Update spack-completion * Update lib/spack/spack/cmd/checksum.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update checksum.py * Update stage.py * Update create.py Use batch mode when adding a new package Co-authored-by: Ivan Razumov <ivan.razumov@cern.ch> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2020-05-05Automatically find externals (#15158)Peter Scheibel1-1/+19
Add a `spack external find` command that tries to populate `packages.yaml` with external packages from the user's `$PATH`. This focuses on finding build dependencies. Currently, support has only been added for `cmake`. For a package to be discoverable with `spack external find`, it must define: * an `executables` class attribute containing a list of regular expressions that match executable names. * a `determine_spec_details(prefix, specs_in_prefix)` method Spack will call `determine_spec_details()` once for each prefix where executables are found, passing in the path to the prefix and the path to all found executables. The package is responsible for invoking the executables and figuring out what type of installation(s) are in the prefix, and returning one or more specs (each with version, variants or whatever else the user decides to include in the spec). The found specs and prefixes will be added to the user's `packages.yaml` file. Providing the `--not-buildable` option will mark all generated entries in `packages.yaml` as `buildable: False`
2020-05-01dev-build: --drop-in <shell> (#14887)Axel Huebl1-2/+2
* dev-build: --drop-in <shell> Add a `--drop-in <shell>` option to `spack dev-build`. This option will automatically run a `spack build-env <spec> -- <shell>` at the end of a `dev-build`, e.g. to quickly drop-and-devel into a build phase of a package. Example usage: ``` spack dev-build --before cmake --drop-in bash openpmd-api@develop ``` * build_env: drop in unit test Co-authored-by: Greg Becker <becker33@llnl.gov>
2020-04-28dev-build: stop before phase (#14699)Axel Huebl1-2/+2
Add `-b,--before` option to dev-build command to stop before the phase in question.
2020-04-03Add option "--first" for "spack load" (#15622)G-Ragghianti1-1/+1
* Implemented --first option for "spack load" * added test for "spack load --first" Co-authored-by: gragghia <gragghia@localhost.localdomain>
2020-04-02Add commands to facilitate Spack/Python/OS reporting (#15834)Adam J. Stewart1-2/+6
* Add --version arg to spack python command * Add `spack debug report` command
2020-03-07Only use stable versions for public mirror (#15100)Peter Scheibel1-1/+1
* add --skip-unstable-versions option to 'spack mirror create' which skips sources/resource for packages if their version is not stable (i.e. if they are the head of a git branch rather than a fixed commit) * '--skip-unstable-versions' should skip all VCS sources/resources, not just those which are not cachable
2020-02-25buildcache cmd: add explicit message with default output dir for ↵Patrick Gartung1-1/+1
buildcaches. (#15090) * Make -d directory a required option. Print messages about where buildcaches will be written. * Add mutually exclusive required options * spack commands --update-completion * Apply @opadron's patch * Update share/spack/spack-completion.bash * Incorporate @opadron's suggestions
2020-02-25add --only option to buildcache create cmd (#14921)Omar Padron1-1/+1
* add --only option to buildcache create cmd replaces the --no-deps option
2020-02-25Buildcache cmd: add install -o/--otherarch option for installing macOS ↵Patrick Gartung1-1/+1
buildcaches on linux (#15192) * Buildcache command: add install option -o/--otherarch This will allow matching specs from other archs, for example installing macOS buildcaches on linux hosts. * spack commands --update-completion
2020-02-17spack extensions prints list of extendable packages (#14473)Adam J. Stewart1-1/+1
* spack extensions prints list of extendable packages * Update tab completion scripts
2020-02-12spack python: add -m option to run modules as scriptsTodd Gamblin1-1/+1
It's often useful to run a module with `python -m`, e.g.: python -m pyinstrument script.py Running a python script this way was hard, though, as `spack python` did not have a similar `-m` option. This PR adds a `-m` option to `spack python` so that we can do things like this: spack python -m pyinstrument ./test.py This makes it easy to write a script that uses a small part of Spack and then profile it. Previously thee easiest way to do this was to write a custom Spack command, which is often overkill.
2020-02-06Allow installing unsigned binary packages (#11107)Oliver Breitwieser1-1/+1
This commit introduces a `--no-check-signature` option for `spack install` so that unsigned packages can be installed. It is off by default (signatures required).
2020-02-03buildcache list: restore original behavior of allowing constraints like ↵Patrick Gartung1-1/+1
@version. (#14732)
2020-01-30`spack containerize` generates containers from envs (#14202)Massimiliano Culpo1-1/+5
This PR adds a new command to Spack: ```console $ spack containerize -h usage: spack containerize [-h] [--config CONFIG] creates recipes to build images for different container runtimes optional arguments: -h, --help show this help message and exit --config CONFIG configuration for the container recipe that will be generated ``` which takes an environment with an additional `container` section: ```yaml spack: specs: - gromacs build_type=Release - mpich - fftw precision=float packages: all: target: [broadwell] container: # Select the format of the recipe e.g. docker, # singularity or anything else that is currently supported format: docker # Select from a valid list of images base: image: "ubuntu:18.04" spack: prerelease # Additional system packages that are needed at runtime os_packages: - libgomp1 ``` and turns it into a `Dockerfile` or a Singularity definition file, for instance: ```Dockerfile # Build stage with Spack pre-installed and ready to be used FROM spack/ubuntu-bionic:prerelease as builder # What we want to install and how we want to install it # is specified in a manifest file (spack.yaml) RUN mkdir /opt/spack-environment \ && (echo "spack:" \ && echo " specs:" \ && echo " - gromacs build_type=Release" \ && echo " - mpich" \ && echo " - fftw precision=float" \ && echo " packages:" \ && echo " all:" \ && echo " target:" \ && echo " - broadwell" \ && echo " config:" \ && echo " install_tree: /opt/software" \ && echo " concretization: together" \ && echo " view: /opt/view") > /opt/spack-environment/spack.yaml # Install the software, remove unecessary deps and strip executables RUN cd /opt/spack-environment && spack install && spack autoremove -y RUN find -L /opt/view/* -type f -exec readlink -f '{}' \; | \ xargs file -i | \ grep 'charset=binary' | \ grep 'x-executable\|x-archive\|x-sharedlib' | \ awk -F: '{print $1}' | xargs strip -s # Modifications to the environment that are necessary to run RUN cd /opt/spack-environment && \ spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh # Bare OS image to run the installed executables FROM ubuntu:18.04 COPY --from=builder /opt/spack-environment /opt/spack-environment COPY --from=builder /opt/software /opt/software COPY --from=builder /opt/view /opt/view COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh RUN apt-get -yqq update && apt-get -yqq upgrade \ && apt-get -yqq install libgomp1 \ && rm -rf /var/lib/apt/lists/* ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l"] ```
2020-01-30Limit the number of spec files downloaded to find matches for buildcaches ↵Patrick Gartung1-1/+1
(#14659) * Limit the number of spec flies downloaded to find matches
2020-01-24Add spack config list command for tab completion (#14474)Adam J. Stewart1-2/+6
* Add spack config list command for tab completion * Update tab completion scripts
2020-01-23commands: add simple `spack commands --update-completion` argument (#14607)Todd Gamblin1-1/+1
Instead of another script, this adds a simple argument to `spack commands` that updates the completion script. Developers can now just run: spack commands --update-completion This should make it simpler for developers to remember to run this *before* the tests fail. Also, this version tab-completes.
2020-01-22shell support: `spack load` no longer needs modules (#14062)Greg Becker1-3/+3
Previously the `spack load` command was a wrapper around `module load`. This required some bootstrapping of modules to make `spack load` work properly. With this PR, the `spack` shell function handles the environment modifications necessary to add packages to your user environment. This removes the dependence on environment modules or lmod and removes the requirement to bootstrap spack (beyond using the setup-env scripts). Included in this PR is support for MacOS when using Apple's System Integrity Protection (SIP), which is enabled by default in modern MacOS versions. SIP clears the `LD_LIBRARY_PATH` and `DYLD_LIBRARY_PATH` variables on process startup for executables that live in `/usr` (but not '/usr/local', `/System`, `/bin`, and `/sbin` among other system locations. Spack cannot know the `LD_LIBRARY_PATH` of the calling process when executed using `/bin/sh` and `/usr/bin/python`. The `spack` shell function now manually forwards these two variables, if they are present, as `SPACK_<VAR>` and recovers those values on startup. - [x] spack load/unload no longer delegate to modules - [x] refactor user_environment modification calculations - [x] update documentation for spack load/unload Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2020-01-22Use `spack commands --format=bash` to generate shell completion (#14393)Adam J. Stewart1-519/+765
This PR adds a `--format=bash` option to `spack commands` to auto-generate the Bash programmable tab completion script. It can be extended to work for other shells. Progress: - [x] Fix bug in superclass initialization in `ArgparseWriter` - [x] Refactor `ArgparseWriter` (see below) - [x] Ensure that output of old `--format` options remains the same - [x] Add `ArgparseCompletionWriter` and `BashCompletionWriter` - [x] Add `--aliases` option to add command aliases - [x] Standardize positional argument names - [x] Tests for `spack commands --format=bash` coverage - [x] Tests to make sure `spack-completion.bash` stays up-to-date - [x] Tests for `spack-completion.bash` coverage - [x] Speed up `spack-completion.bash` by caching subroutine calls This PR also necessitates a significant refactoring of `ArgparseWriter`. Previously, `ArgparseWriter` was mostly a single `_write` method which handled everything from extracting the information we care about from the parser to formatting the output. Now, `_write` only handles recursion, while the information extraction is split into a separate `parse` method, and the formatting is handled by `format`. This allows subclasses to completely redefine how the format will appear without overriding all of `_write`. Co-Authored-by: Todd Gamblin <tgamblin@llnl.gov>
2020-01-10Reformat Bash tab completion script (#14456)Adam J. Stewart1-306/+224
2020-01-06Fix outdated bash tab completion (#14392)Adam J. Stewart1-201/+321
2020-01-01tests: improved `spack test` command line optionsTodd Gamblin1-1/+2
Previously, `spack test` automatically passed all of its arguments to `pytest -k` if no options were provided, and to `pytest` if they were. `spack test -l` also provided a list of test filenames, but they didn't really let you completely narrow down which tests you wanted to run. Instead of trying to do our own weird thing, this passes `spack test` args directly to `pytest`, and omits the implicit `-k`. This means we can now run, e.g.: ```console $ spack test spec_syntax.py::TestSpecSyntax::test_ambiguous ``` This wasn't possible before, because we'd pass the fully qualified name to `pytest -k` and get an error. Because `pytest` doesn't have the greatest ability to list tests, I've tweaked the `-l`/`--list`, `-L`/`--list-long`, and `-N`/`--list-names` options to `spack test` so that they help you understand the names better. you can combine these options with `-k` or other arguments to do pretty powerful searches. This one makes it easy to get a list of names so you can run tests in different orders (something I find useful for debugging `pytest` issues): ```console $ spack test --list-names -k "spec and concretize" cmd/env.py::test_concretize_user_specs_together concretize.py::TestConcretize::test_conflicts_in_spec concretize.py::TestConcretize::test_find_spec_children concretize.py::TestConcretize::test_find_spec_none concretize.py::TestConcretize::test_find_spec_parents concretize.py::TestConcretize::test_find_spec_self concretize.py::TestConcretize::test_find_spec_sibling concretize.py::TestConcretize::test_no_matching_compiler_specs concretize.py::TestConcretize::test_simultaneous_concretization_of_specs spec_dag.py::TestSpecDag::test_concretize_deptypes spec_dag.py::TestSpecDag::test_copy_concretized ``` You can combine any list option with keywords: ```console $ spack test --list -k microarchitecture llnl/util/cpu.py modules/lmod.py ``` ```console $ spack test --list-long -k microarchitecture llnl/util/cpu.py:: test_generic_microarchitecture modules/lmod.py::TestLmod:: test_only_generic_microarchitectures_in_root ``` Or just list specific files: ```console $ spack test --list-long cmd/test.py cmd/test.py:: test_list test_list_names_with_pytest_arg test_list_long test_list_with_keywords test_list_long_with_pytest_arg test_list_with_pytest_arg test_list_names ``` Hopefully this stuff will help with debugging test issues. - [x] make `spack test` send args directly to `pytest` instead of trying to do fancy things. - [x] rework `--list`, `--list-long`, and add `--list-names` to make searching for tests easier. - [x] make it possible to mix Spack's list args with `pytest` args (they're just fancy parsing around `pytest --collect-only`) - [x] add docs - [x] add tests - [x] update spack completion
2019-12-30copyright: update copyright dates for 2020 (#14328)Todd Gamblin1-1/+1
2019-12-13Split out CDash options to a separate help document (#13704)Zack Galbreath1-1/+1
Prevent `spack help install` from getting too cluttered with CDash-specific documentation.
2019-11-22cmd/install: remove unused install_status option (#13751)Greg Becker1-6/+7
* cmd/install: remove unused install_status option * update bash completions for spack install
2019-10-25completion: add bash completion for `spack spec --json` (#13433)Todd Gamblin1-1/+2
2019-10-02Remove support for generating dotkit files (#11986)Massimiliano Culpo1-48/+1
Dotkit is being used only at a few sites and has been deprecated on new machines. This commit removes all the code that provide support for the generation of dotkit module files. A new validator named "deprecatedProperties" has been added to the jsonschema validators. It permits to prompt a warning message or exit with an error if a property that has been marked as deprecated is encountered. * Removed references to dotkit in the docs * Removed references to dotkit in setup-env-test.sh * Added a unit test for the 'deprecatedProperties' schema validator
2019-09-20Add --known-targets to bash completion for arch command (#12887)Glenn Johnson1-1/+1
This PR adds the new --known-targets flag to the `spack arch` command.
2019-09-02tests and completions for `spack find --json` and `spack find --format`Todd Gamblin1-2/+3
2019-07-24new command: `spack maintainers` queries package maintainersTodd Gamblin1-0/+10
- We don't currently make enough use of the maintainers field on packages, though we could use it to assign reviews. - add a command that allows maintainers to be queried - can ask who is maintaining a package or packages - can ask what packages users are maintaining - can list all maintained or unmaintained packages - add tests for the command
2019-07-17feature: Allow developers to use Spack for partial builds (#12006)Greg Becker1-1/+1
Added new diy option.
2019-07-12Copy --{use,no}-cache from install to bootstrap (#11786)Oliver Breitwieser1-1/+2
2019-07-12Add template creation test, --skip-editor option (#11970)Tamara Dahlgren1-1/+1
* Add template creation test * Added --skip-editor option to "spack create": normally "spack create" opens an editor for the user after generating a package file; when the --skip-editor option is used, "spack create" only generates the package file and does not open an editor * Added --skip-editor option to bash completion
2019-05-27commands: completion for new --update and --header options (#11566)Todd Gamblin1-2/+2
2019-01-10spack versions: only list safe versions (#10004)Adam J. Stewart1-1/+1
* spack versions: only list safe versions * Add unit tests for spack versions -s
2019-01-01copyright: update license headers for 2013-2019 copyright.Todd Gamblin1-1/+1
2018-12-30commands: add `spack resource` command to inspect downloadable filesTodd Gamblin1-0/+26
- currently just looks at patches - allows you to find out which package applied a patch to a spec - intended to work with tarballs and resources in the future. - add tab completion for `spack resource` and subcommands
2018-12-17Update Spack's Bash completion script (#10114)Adam J. Stewart1-35/+171
* Update Spack's Bash completion script * spack mirror create options changed
2018-10-17relicense: replace LGPL headers with Apache-2.0/MIT SPDX headersTodd Gamblin1-23/+4
- remove the old LGPL license headers from all files in Spack - add SPDX headers to all files - core and most packages are (Apache-2.0 OR MIT) - a very small number of remaining packages are LGPL-2.1-only
2018-08-03Update bash completion with new spack arch flagsAdam J. Stewart1-1/+2
2018-07-24The auto-completion file is now consistent with `spack module`Massimiliano Culpo1-10/+124
2018-04-17Autocomplete spack providers (#7783)Adam J. Stewart1-2/+5
2018-03-25Various updates to Spack's Bash completion (#7590)Adam J. Stewart1-52/+175
* Various updates to Spack's Bash completion * Equals sign messes up tab completion
2018-03-24Update copyright on LLNL files for 2018. (#7592)Todd Gamblin1-1/+1
2018-01-10Fix bash tab completion for spack install (#6868)Adam J. Stewart1-3/+5
2017-11-04Replace github.com/llnl/spack with github.com/spack/spack (#6142)Todd Gamblin1-2/+2
We moved to a new GitHub org! Now make the code and docs reflect that.