Commit graph

350 commits

Author SHA1 Message Date
iarspider
08f449ae9a
"spack checksum" QoL (#14311)
* 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-07 18:34:36 -05:00
Peter Scheibel
b030a81a5f
Automatically find externals (#15158)
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-05 17:37:34 -07:00
Axel Huebl
d0dfa1ea4d
dev-build: --drop-in <shell> (#14887)
* 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-05-01 09:37:21 -07:00
Axel Huebl
00d83cd79d
dev-build: stop before phase (#14699)
Add `-b,--before` option to dev-build command to stop before the phase in question.
2020-04-28 09:55:57 -07:00
Massimiliano Culpo
19c5843871
Travis: change the spec we concretize on MacOS (#16256)
Since CMake can't build with GCC on MacOS, choose a
spec that doesn't have CMake in the DAG.
2020-04-23 11:40:23 +02:00
Todd Gamblin
de13ea2284
autotools: remove FORCE_UNSAFE_CONFIGURE from docs, commands, code (#16145)
Since #16132, we've consolidated the setting of FORCE_UNSAFE_CONFIGURE to
`autotools.py`, so we don't need to use it in packages like `coreutils`,
in our commands, or in our container recipes.

- [x] Remove FORCE_UNSAFE_CONFIGURE from packages
- [x] Remove FORCE_UNSAFE_CONFIGURE from container recipes
- [x] Remove FORCE_UNSAFE_CONFIGURE from `spack ci` command
2020-04-20 08:32:03 -07:00
Todd Gamblin
f6d26db939 macos: use DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH
`DYLD_LIBRARY_PATH` can frequently break builtin macOS software when
pointed at Spack libraries.  This is because it takes *higher* precedence
than the default library search paths, which are used by system software.

`DYLD_FALLBACK_LIBRARY_PATH`, on the other hand, takes lower precedence.
At first glance, this might seem bad, because the software installed by
Spack in an environment needs to find *its* libraries, and it should not
use the defaults.  However, Spack's isntallations are always `RPATH`'d,
so they do not have this problem.

`DYLD_FALLBACK_LIBRARY_PATH` is thus useful for things built in an
environment that need to use Spack's libraries, that don't set *their*
RPATHs correctly for whatever reason. We now prefer it to
`DYLD_LIBRARY_PATH` in modules and in environments because it helps a
little bit, and it is much less intrusive.
2020-04-16 17:23:33 -07:00
G-Ragghianti
bae4f91bfe
Add option "--first" for "spack load" (#15622)
* Implemented --first option for "spack load"

* added test for "spack load --first"

Co-authored-by: gragghia <gragghia@localhost.localdomain>
2020-04-03 13:33:20 -07:00
Adam J. Stewart
75a2f8046a
Add commands to facilitate Spack/Python/OS reporting (#15834)
* Add --version arg to spack python command
* Add `spack debug report` command
2020-04-02 23:12:03 -07:00
Adam J. Stewart
a4b3edd68a
Allow Spack Environments with '-h' in the name (#15429)
If a user invoked "spack env activate example-henv", Spack would
mistakenly interpret the "-h" from "example-henv" as the "-h" option.
This commit allows users to create and activate environments with
"-h" in the name.

This issue existed for bash shell support as well as csh support, and
this commit addresses both, along with some other unrelated csh
support issues.
2020-03-31 16:57:14 -07:00
Peter Scheibel
697719c181
Only use stable versions for public mirror (#15100)
* 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-03-07 13:38:08 +01:00
Tamara Dahlgren
b2e7e7edaa
Recover coverage from subprocesses during unit tests (#15354)
* Recover coverage from subprocesses during unit tests
2020-03-05 16:54:29 -08:00
Patrick Gartung
ae87828520
buildcache cmd: add explicit message with default output dir for 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-25 17:49:25 -06:00
Omar Padron
00090f8f97
add --only option to buildcache create cmd (#14921)
* add --only option to buildcache create cmd

replaces the --no-deps option
2020-02-25 17:32:20 -05:00
Patrick Gartung
676eb56ab2
Buildcache cmd: add install -o/--otherarch option for installing macOS 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-25 11:01:59 -06:00
Adam J. Stewart
342200774b
spack extensions prints list of extendable packages (#14473)
* spack extensions prints list of extendable packages

* Update tab completion scripts
2020-02-17 17:41:47 -06:00
Adam J. Stewart
e0dfc3ddbf
Fix shell detection: zsh5 -> zsh (#14858) 2020-02-13 20:07:09 -06:00
Todd Gamblin
a7b43f1015 spack python: add -m option to run modules as scripts
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-12 16:45:41 -08:00
Oliver Breitwieser
22c9f5cbd8
Allow installing unsigned binary packages (#11107)
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-06 18:59:16 -08:00
Patrick Gartung
5ad44477b2
buildcache list: restore original behavior of allowing constraints like @version. (#14732) 2020-02-03 13:40:14 -06:00
Massimiliano Culpo
9635ff3d20
spack containerize generates containers from envs (#14202)
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-30 17:19:55 -08:00
Patrick Gartung
23a7feb917
Limit the number of spec files downloaded to find matches for buildcaches (#14659)
* Limit the number of spec flies downloaded to find matches
2020-01-30 10:56:10 -06:00
Adam J. Stewart
dcd8d7a620 Add spack config list command for tab completion (#14474)
* Add spack config list command for tab completion
* Update tab completion scripts
2020-01-24 17:28:20 -08:00
Todd Gamblin
04a6a55cf8
commands: add simple spack commands --update-completion argument (#14607)
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-23 14:48:06 -08:00
Greg Becker
c9e01ff9d7 shell support: spack load no longer needs modules (#14062)
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-22 22:36:02 -08:00
Adam J. Stewart
11f2b61261 Use spack commands --format=bash to generate shell completion (#14393)
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-22 21:31:12 -08:00
Tom Scogland
df8ee438e5 stop word splitting from leaking out of setup-env (#14472)
The pathadd function was using setopt to configure zsh for word
splitting, which leaks out of the function and breaks default
functionality in a number of external zsh plugins and packages.  This
switches to emulate -L, just as the spack function uses, to keep the
setting local to the function.
2020-01-14 15:32:57 -08:00
Adam J. Stewart
257e71d87a
Reformat Bash tab completion script (#14456) 2020-01-10 11:32:50 -06:00
Adam J. Stewart
eddb42ed43
Fix outdated bash tab completion (#14392) 2020-01-06 23:18:14 -06:00
Todd Gamblin
4beb9fc5d3 tests: improved spack test command line options
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
2020-01-01 21:37:02 -08:00
Todd Gamblin
4af6303086
copyright: update copyright dates for 2020 (#14328) 2019-12-30 22:36:56 -08:00
Johannes Blaschke
c0d5c360d5 setup-env-test: fix pipe redirect (#14306) 2019-12-27 22:37:47 -08:00
Massimiliano Culpo
2aa8132afd Migrate build tests from Travis to Github Actions (#13967)
This PR moves build smoke tests from TravisCI and migrates them to Github Actions. The result is that build tests are performed in parallel with unit tests and they don't hog additional resources on Travis. The workflow will not run if a PR only changes packages in the built-in repository, but will always run on pushes to develop or master.

* Removed build tests from Travis and passed them to Github Actions
* Store ~/.ccache in Github Actions cache
* Add filters on paths and make sure this workflow don't run
* Use paths-ignore and exclude only files in the built-in repo
* Added a badge to README.md
2019-12-25 00:06:48 -08:00
Massimiliano Culpo
9ceec7e219 Harden shell detection when procfs is available (#13950) 2019-12-16 14:51:58 -08:00
Massimiliano Culpo
f80491826b
Travis exits at the first failing test, pin codecov at v4.5.4 (#14179)
Before this commit we used to run the entire unit test suite
in the presence of a failure. Since we currently rely a lot
on the state of the filesystem etc. the end report was most
of the time showing spurious failures that were a consequence
of the first failing test.

This PR makes unit tests exit at the first failing test

Also, pin codecov at v4.5.4 (last one supporting Python 2.6)
2019-12-16 10:56:54 +01:00
Scott Wittenburg
2520806df2 docker: add file, adjust locale, and use python3 for ubuntu (#13508)
* docker: add missing module to ubuntu images
* docker: fix issue with missing locale
* docker: one package per line + rm python2 support
* docker: ubuntu image also needs 'file' for buildcache creation
2019-12-13 10:22:20 -08:00
Zack Galbreath
0f5724e908 Split out CDash options to a separate help document (#13704)
Prevent `spack help install` from getting too cluttered with CDash-specific documentation.
2019-12-13 10:15:22 -08:00
Axel Huebl
7a81c37bde
Package Index: Build in Dockerhub (#13810)
* Package Index: Build in Dockerhub

Prepare to build the package index service, packages.spack.io,
on Dockerhub.

Local build (in spack root dir):
```
docker build -t spack/packages.spack.io:latest -f share/spack/docker/package-index/Dockerfile .
```

Local test:
```
docker run -p 8080:80 spack/packages.spack.io:latest
```

* Travis-CI: Remove Docker

Remove leftover docker stages from Travis-CI.

* Simplify Split Call
2019-11-26 10:11:29 -07:00
Greg Becker
6c55a7c85f
cmd/install: remove unused install_status option (#13751)
* cmd/install: remove unused install_status option

* update bash completions for spack install
2019-11-22 11:17:37 -07:00
Todd Gamblin
e0b94dba14
completion: add bash completion for spack spec --json (#13433) 2019-10-25 11:02:52 -07:00
Massimiliano Culpo
3d77ecd92e Bootstrap environment modules optimizing for generic architectures (#13105)
fixes #13073

Since #3206 was merged bootstrapping environment-modules was using the architecture of the current host or the best match supported by the default compiler. The former case is an issue since shell integration was looking for a spec targeted at the host microarchitecture.

1. Bootstrap an env modules targeted at generic architectures
2. Look for generic targets in shell integration scripts
3. Add a new entry in Travis to test shell integration
2019-10-21 11:20:05 -07:00
Massimiliano Culpo
d33b0ffc50 lmod: module files are written in a root folder named by target family (#13121)
fixes #13005

This commit fixes an issue with the name of the root directory for
module file hierarchies. Since #3206 the root folder was named after
the microarchitecture used for the spec, which is too specific and
not backward compatible for lmod hierarchies. Here we compute the
root folder name using the target family instead of the target name
itself and we add target information in the 'whatis' portion of the
module file.
2019-10-15 11:20:49 -07:00
Massimiliano Culpo
76b9c56110 Remove support for generating dotkit files (#11986)
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-10-02 22:15:01 -07:00
Massimiliano Culpo
1b18ec90ab Add all compatible system types directory to module paths
fixes #12915
closes #12916

Since Spack has support for specific targets it might happen that
software is built for targets that are not exactly the host because
it was either an explicit user request or the compiler being used is
too old to support the host.

Modules for different targets are written into different directories
and by default Spack was adding to MODULEPATH only the directory
corresponding to the current host. This PR modifies this behavior to
add all the directories that are **compatible** with the current host.
2019-10-01 19:18:27 -07:00
Glenn Johnson
5397606b34 Add --known-targets to bash completion for arch command (#12887)
This PR adds the new --known-targets flag to the `spack arch` command.
2019-09-20 20:09:44 +02:00
Scott Wittenburg
fabbb3d58a Refactor release-jobs cmd based on use of environments (no docker either) 2019-09-13 22:57:15 -07:00
Tyler Reddy
25dbc9fb8e BUG: recursively load modules with tcsh (#12664)
* for tcsh and csh, spack load -r package
should now correctly load recursively instead
of only loading the target package without any
dependencies
2019-09-12 11:11:27 -06:00
Axel Huebl
113365744e
packages service: fix docker build again (#12774)
CD is hard.
2019-09-09 18:24:16 -07:00
Axel Huebl
0d270e0d2a
packages service: fix docker build (#12773)
The build instructions I cloned from did not work ;)
2019-09-09 16:41:04 -07:00
Axel Huebl
221acadc7d
packages build: fix path to spack (#12772)
Fix docker build for packages.spack.io
2019-09-09 14:52:36 -07:00
Axel Huebl
8ea358d849
Fix CD: Packages Service First (#12764)
* Fix CD: Packages Service First

Build the packages.spack.io service images first, so they are
guaranteed to be pushed even if further images fail to build.

Fix the query to the `spack` script executed in later builds.

* CD: Remove Spack Images

Now done on Dockerhub.
2019-09-09 13:22:47 -07:00
Axel Huebl
02931a82fd Add CORS for spack.packages.io
Add the HTTP header `Access-Control-Allow-Origin: *` for our NGINX
service that is serving static JSON content on
https://spack.packages.io .
2019-09-08 17:19:37 -07:00
Todd Gamblin
1b877e8e0f tests and completions for spack find --json and spack find --format 2019-09-02 19:24:48 -07:00
Todd Gamblin
b0abbfecb8 new command: spack maintainers queries package maintainers
- 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-24 14:10:08 -07:00
Omar Padron
1d5ab13be8 docker: fix builds, remove extra distros, add ci builds (#11621)
* fix docker builds/remove extra builds/add ci builds
* preinstall vim in CI builder images
* simplify & streamline docker resources
* restore os-container-mapping.yaml file
2019-07-20 14:46:06 -07:00
Todd Gamblin
993ee7f199 environments: add activate/deactivate tests, work wtih set -u
- [x] Add shell tests to ensure that `spack env activate`, `spack env
  deactivate`, and `despacktivate` continue to work.

- [x] Also ensure that activate and deactivate both work with `set -u`
2019-07-20 00:36:56 -07:00
Greg Becker
5cf8878185 feature: Allow developers to use Spack for partial builds (#12006)
Added new diy option.
2019-07-17 11:46:56 -07:00
Todd Gamblin
3f47c5967d
bugfix: fix module() function in setup-env.sh (#12030)
Modify `setup-env.sh` to export fewer variables but to still set the module() function correctly.
2019-07-15 22:43:53 -07:00
Adam J. Stewart
41f5b09a98
Fix typo in module template (#12028) 2019-07-15 20:54:20 -05:00
Oliver Breitwieser
d1af7ae5ab Copy --{use,no}-cache from install to bootstrap (#11786) 2019-07-12 16:30:12 -07:00
Tamara Dahlgren
d615d0a1ec Add template creation test, --skip-editor option (#11970)
* 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-07-12 11:22:09 -07:00
Todd Gamblin
e8e030a518
bugfix: setup-env.sh detects bash even when bash is run as sh (#11994)
- `setup-env.sh` was not properly detecting a bash shell when bash was run
  as /bin/sh.

- Detection routine now always reports bash when bash is run as sh, and
  no longer parses the path to the executable indicated in `$BASH`.
2019-07-12 08:33:23 -07:00
Todd Gamblin
5686c2a544 setup-env.sh: make setup scripts work with set -u
- Add set -u to the setup-env.sh test script

- Refactor lines in setup-env.sh that tested potentially undefined
  variables to use the `[ -z ${var+x} ]` construct
2019-07-05 12:54:17 -07:00
Todd Gamblin
47e9f7aac9 tests: add tests for setup-env.sh
- tests use a shell-script harness and test all Spack commands that
  require special shell support.

- tests work in bash, zsh, and dash

- run setup-env.sh tests on macos and linux builds.
  - we run them on macos and linux
2019-07-05 12:54:17 -07:00
Todd Gamblin
e625ee3ffd setup-env.sh: now compatible with bash, zsh, and dash
- replace use of [[ with [

- replace function foo { .. } with foo() { .. }

- wrap some long lines

- add lsof and /proc/fd magic so that we can find the sourced file even in dash

- only do the complicated shell checks in one place; test $_sp_shell
  elsewhere.
2019-07-05 12:54:17 -07:00
Todd Gamblin
600f3c1104 setup-env.sh: send cd output to /dev/null when it affects Spack
- We've seen this a few times now where users have set up `cd` to echo
  the new directory, and it screws up `setup-env.sh`

- In the past we've said this is user error.

- Here, we just fix it by sending `cd` output to /dev/null where needed.
  - this works in bash, zsh, and dash
2019-06-29 19:01:44 -07:00
Axel Huebl
d4008db75d
CD: Package Index (#11665)
Build the docker image for the new package index REST API on each
merge/push to develop and master.
2019-06-10 18:21:33 +02:00
Todd Gamblin
20e5f81653
tests: restore spack spec mpileaks in test output for Python 2 (#11664)
- also remove coverage calls of these commands
- we JUST want coverage to tell us what is in the test suite.
2019-06-08 13:04:44 -07:00
Todd Gamblin
3bd854f991 travis: disable spack spec for python 2.7 as well as 2.6
- keep this disabled until the `compiler find` fork bomb is fixed.
2019-06-05 22:41:28 -07:00
Todd Gamblin
2a51e07fde
commands: completion for new --update and --header options (#11566) 2019-05-27 14:13:58 -07:00
Matthias Wolf
7fcf534b25 junit: escape remaining inputs. (#11382) 2019-05-16 14:40:07 +02:00
Todd Gamblin
dda90a5666 bugfix: Do not run spack spec in the test environment for Python 2.6
- Trying to get our Python 2.6 tests working again.
- This seems to crash travis in the 2.6 environment, for whatever reason.
2019-05-10 13:13:44 -07:00
Todd Gamblin
3903658bfc coverage: only run coverage for subset of unit tests
- Codecov cannot handle as many coverage reports as we are generating

- as a result, our PR coverage pages have been broken for a while, and
  it's hard to tell people where to enhance their testing in PR reviews.

- Scale back to only running coverage for 3.7 and 2.7 unit tests

- This is *probably* better.  We run the build tests for good measure,
  but we do not need to evaluate them for coverage.  The coverage reports
  are about unit tests.
2019-05-11 02:23:22 +09:00
Massimiliano Culpo
5ffb270714 Added a function that concretizes specs together (#11158)
* Added a function that concretizes specs together

* Specs concretized together are copied instead of being referenced

This makes the specs different objects and removes any reference to the
fake root package that is needed currently for concretization.

* Factored creating a repository for concretization into its own function

* Added a test on overlapping dependencies
2019-05-04 03:04:38 +09:00
Omar Padron
0bbd41c7f7
install spack under /opt/spack in docker images (#10969)
* install spack under /opt/spack
2019-05-02 12:05:42 -04:00
Toyohisa Kameyama
ac7f9ef93d Fix handling of MODULEPATH in setup-env.sh (#11274)
Usage of double quotes was preventing word-splitting when parsing
module roots in setup-env.sh, which lead to an error when multiple
module roots are used (in particular when Spack is pointed to use
an upstream module root in addition to its own).
2019-04-24 11:53:25 +09:00
paulanda
88cc895a70 setup-env.sh: fix zsh compatibility error (#11153)
Still look for BASH_SOURCE[0] first, but if it's not set,
_sp_source_file is initialized to an empty value addressing the
unset parameter error (line 217).
2019-04-16 12:33:02 -07:00
Peter Scheibel
99f35c3338 spack chain (#8772)
* initial work to make use of an 'upstream' spack installation: this uses the DB of the upstream installation to check if a package is installed

* need to query upstream dbs when adding new record to local db

* prevent reindexing upstream DBs

* set prefix on specs read from DB based on path stored in install record

* check that Spack does not install packages that are recorded as installed in an upstream db

* externals do not add their path to install records - need to use 'external_path' to get path of upstream externals

* views need to check for upstream installations when linking metadata

* package and spec now calculate upstream installation properties on-demand themselves rather than depending on concretization to set these properties up-front. The added tests for upstream installations don't work with this new strategy so they need to be updated

* only refresh modules for local specs (not those in upstream packages); optionally generate local module files for packages installed upstream

* when a user tries to locate a module file for a package installed upstream, tell them to use the upstream spack instance to locate it

* support recursive upstream databases (allow upstream databases to use their own upstream databases)

* separate upstream config into separate file with its own schema; each entry now also includes a name

* metadata_dir is no longer customizable on a per-instance basis for YamlDirectoryLayout

* treat metadata_dir as an instance variable but dont set it from kwargs; this follows several other hardcoded variables which must be consistent between upstream and downstream DBs. Also update DirectoryLayout.metadata_path to work entirely with Spec.prefix, since Spec.prefix is set from the DB when available (so metadata_path was duplicating that logic)
2019-03-27 13:06:46 -07:00
Omar Padron
57523c3f0b explicitly install unzip in all docker images (#10891) 2019-03-25 20:10:42 -05:00
Michael Kuhn
617c1a3706 Fix shell integration with environment-modules@4 (#10736) 2019-02-28 13:22:44 +01:00
Scott Wittenburg
a6e8e889b2 release workflow: Add spack command for generating the .gitlab-ci.yml
This spack command adds a new schema for a file which describes the
builder containers available, along with the compilers availabe on
each builder.  The release-jobs command then generates the .gitlab-ci.yml
file by first expanding the release spec set, concretizing each spec
(in an appropriate docker container if --this-machine-only argument is
not provided on command line), and then combining and staging all the
concrete specs as jobs to be run by gitlab.
2019-02-21 15:37:35 -06:00
Scott Wittenburg
05cdb5a0bb docker: Add Dockerfiles for images needed by AWS gitlab-runners
The built images are set up with fairly recent versions of gcc and
clang:

  - centos_7:     [ gcc@5.5.0 (built from src), clang@6.0.0 (spack-built from src) ]
  - ubuntu_18.04: [ gcc@5.5.0 (system), clang@6.0.0-1ubuntu2 (system) ]
2019-02-21 15:37:35 -06:00
Scott Wittenburg
fce1c4133f buildcache: Add sub-commands needed by release workflow
Adds four new sub-commands to the buildcache command:

1. save-yaml: Takes a root spec and a list of dependent spec names,
along with a directory in which to save yaml files, and writes out
the full spec.yaml for each of the dependent specs.  This only needs
to concretize the root spec once, then indexes it with the names of
the dependent specs.

2. check: Checks a spec (via either an abstract spec or via a full
spec.yaml) against remote mirror to see if it needs to be rebuilt.
Comparies full_hash stored on remote mirror with full_hash computed
locally to determine whether spec needs to be rebuilt.  Can also
generate list of specs to check against remote mirror by expanding
the set of release specs expressed in etc/spack/defaults/release.yaml.

3. get-buildcache-name: Makes it possible to attempt to read directly
the spec.yaml file on a remote or local mirror by providing the path
where the file should live based on concretizing the spec.

4. download: Downloads all buildcache files associated with a spec
on a remote mirror, including any .spack, .spec, and .cdashid files
that might exist.  Puts the files into the local path provided on
the command line, and organizes them in the same hierarchy found on
the remote mirror

This commit also refactors lib/spack/spack/util/web.py to expose
functionality allowing other modules to read data from a url.
2019-02-21 15:37:35 -06:00
Omar Padron
67415a1875 [Docker] more base images (#10560)
* Revert "work around an issue with docker/dockerhub (#10547)"

This reverts commit 0ef139ac4d.

* Add more docker base image configurations.

 - Renamed configs

   - "centos" -> "centos-7"
   - "fedora" -> "fedora-24"
   - "opensuse" -> "opensuse-tumbleweed"
   - "scilinux" -> "scilinux-7"
   - "ubuntu" -> "ubuntu-1804"

 - Added configs

   - "centos-6"
   - "fedora-29"
   - "opensuse-leap"
   - "scilinux-6"
   - "ubuntu-1604"

With these changes, our docker hub image
collection will consist of the following:

 - "spack/archlinux"
   - "latest"
 - "spack/centos"
   - "latest", "centos7", "7"
   - "centos6", "6"
 - "spack/fedora"
   - "latest", "29"
   - "24"
 - "spack/opensuse"
   - "latest", "tumbleweed"
   - "leap"
 - "spack/scilinux"
   - "latest", "7"
   - "6"
 - "spack/ubuntu"
   - "latest", "bionic", "18.04"
   - "xenial", "16.04"
2019-02-16 10:20:25 -05:00
Phil Carns
6971f8ae32 make SPACK_SHELL detection more robust (#9712)
Spack shell detection in setup-env.sh was originally based on
examining the executable name of $$ (from "ps"). In some cases this
does not actually give the name of the shell used, for example when
setup-env.sh was invoked from a script using "#!". To make shell
detection more robust, this adds a preliminary check for shell
variables which indicate that the shell is bash or zsh; the
executable name of $$ is retained as a fallback if those variables
are not defined.
2019-02-13 19:52:18 -06:00
Omar Padron
0ef139ac4d work around an issue with docker/dockerhub (#10547)
* try to workaround an issue with docker/dockerhub
* apply workaround only when running in travis
2019-02-08 16:39:40 -08:00
Omar Padron
7d64994cbd fix issue where docker images were being pushed without login (#10379) 2019-01-24 10:08:38 -08:00
Omar Padron
8e71ba8aa0 fix typo in docker test script (#10334) 2019-01-12 17:30:35 -08:00
Omar Padron
c2529358f2 fix archlinux docker build (#10289) 2019-01-12 00:52:50 -08:00
Adam J. Stewart
72a41a4918 spack versions: only list safe versions (#10004)
* spack versions: only list safe versions
* Add unit tests for spack versions -s
2019-01-10 00:32:47 -08:00
Todd Gamblin
6f50cd52ed copyright: update license headers for 2013-2019 copyright. 2019-01-01 00:44:28 -08:00
Todd Gamblin
d763e92141 commands: add spack resource command to inspect downloadable files
- 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-30 00:19:08 -08:00
Todd Gamblin
19b7b15929 coverage: use kcov to get coverage for our cc script 2018-12-29 23:47:29 -08:00
Omar Padron
60298787e4 Fix docker builds (#9805)
* move docker test logic to share/spack/qa
* update Dockerfile for archlinux
2018-12-20 11:17:46 -08:00
Omar Padron
56cb691fcc fix multiple issues with the docker images (#9718)
- fixed an issue where some undesirable parts of
   the spack source tree were being copied into
   the image context.

 - added a workaround for a tty ioctl warning on
   ubuntu

 - adjusted how the main images are built so that
   `RUN spack ...` works automatically for child
   images that base themselves on them.
2018-12-20 11:11:55 -08:00
Zack Galbreath
8d0872083c Report current git commit of Spack to CDash
When using the CDash reporter, upload a Update.xml file that
indicates the hash of Spack's current git commit.
2018-12-20 09:23:08 -08:00
Zack Galbreath
738d2bd77a Allow more customization for CDash reporter
Add new command line arguments to `spack install` that allow users
to set the build name, site name, and track in their CDash report.
2018-12-20 09:23:08 -08:00
Adam J. Stewart
29f26da04d
Update Spack's Bash completion script (#10114)
* Update Spack's Bash completion script

* spack mirror create options changed
2018-12-17 13:02:09 -06:00
Matthias Diener
9f528ccba0 env setup: support --help for cd/env commands (#10069) 2018-12-15 17:47:05 -08:00
Christoph Junghans
71a86bb840 .travis.yml: enable ccache (#6370) 2018-12-15 10:52:31 +01:00
Massimiliano Culpo
488e513e84 Turn on verbose output for MPICH builds in Travis (#10105)
Lately many CI runs for PRs are failing due to the `mpich` build that
times out on Travis (10 mins. without output). As the timeout seems to
happen consistently during the build phase, increasing the verbosity of
that test can help working around the issue.
2018-12-14 08:43:04 -08:00
Matthias Wolf
e3aa36f4cb fix: adapt junit template to escape std{out,err} (#9935) 2018-12-04 14:05:45 +01:00
Todd Gamblin
a1818f971f env: environments can be named or created in directories
- `spack env create <name>` works as before

- `spack env create <path>` now works as well -- environments can be
  created in their own directories outside of Spack.

- `spack install` will look for a `spack.yaml` file in the current
  directory, and will install the entire project from the environment

- The Environment class has been refactored so that it does not depend on
  the internal Spack environment root; it just takes a path and operates
  on an environment in that path (so internal and external envs are
  handled the same)

- The named environment interface has been hoisted to the
  spack.environment module level.

- env.yaml is now spack.yaml in all places.  It was easier to go with one
  name for these files than to try to handle logic for both env.yaml and
  spack.yaml.
2018-11-09 00:31:24 -08:00
Todd Gamblin
d14f7b82bb env: add spack env activate/deactivate and shell support
- `spack env activate foo`: sets SPACK_ENV to the current active env name

- `spack env deactivate`: unsets SPACK_ENV, deactivates the environment

- added support to setup_env.sh and setup_env.csh

- other env commands work properly with SPACK_ENV, as with an environment
  arguments.

- command-line --env arguments take precedence over the active
  environment, if given.
2018-11-09 00:31:24 -08:00
Bert Wesarg
c43689deb0 setup-env: Avoid different output format of ps (#9629)
setup-env includes a call to 'ps' to determine what shell is being
used. 'ps' can be instructed to use a different default output format
via the 'PS_FORMAT' env variable. Thus unset this variable before
calling 'ps'.
2018-10-29 11:16:55 -07:00
Omar Padron
aa1c814c75 docker: unite Dockerfiles; auto-deploy images to DockerHub (#9329)
* Unite Dockerfiles - add build/run/push scripts
* update docker documentation
* update .travis.yml
* switch to using a preprocessor on Dockerfiles
* skip building docker images on pull requests
* update files with copyright info
* tweak when travis builds for docker files are done
2018-10-26 10:15:05 -07:00
Todd Gamblin
e2e0b5df1c relicense: add spack license command
- `spack license list-files`: list all files that should have license headers
- `spack license list-lgpl`:  list files still under LGPL-2.1
- `spack license verify`:     check that license headers are correct

- Added `spack license verify` to style tests
2018-10-17 14:42:06 -07:00
Todd Gamblin
eea786f4e8 relicense: replace LGPL headers with Apache-2.0/MIT SPDX headers
- 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-10-17 14:42:06 -07:00
Todd Gamblin
5aa05b8ef4
travis: require sudo in an attempt to avoid build timeouts (#9327)
- Many container builds are timing out frequently during Spack tests in
  Travis CI.

- Travis recommends to try `sudo: required` to see whether this is an
  infrastructure issue or something else.

- added `sudo: required` to all Linux builds.

- added --verbose to `spack test` invocation so that we can see more
  easily what tests it's timing out on.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2018-09-24 14:55:36 -07:00
Matthias Diener
a1e08f009d Csh: fix load/use commands (#8971) 2018-08-14 09:28:43 +02:00
Micheal Quinn
203bd555a4 Fixing the addition curly brackets to conform to the rest of the templates usage of a literal curly bracket 2018-08-07 19:56:11 +02:00
Micheal Quinn
d163be6a13 Adding logic to the autoload if statement so it only fire if the module is being loaded. 2018-08-07 19:56:11 +02:00
Adam J. Stewart
7e0bd152b7 Generate coverage reports for all unit and build tests 2018-08-04 21:18:49 -07:00
Adam J. Stewart
4de301ebf2 Update bash completion with new spack arch flags 2018-08-03 11:32:08 -05:00
Stephen Herbein
de60e9d582 lmod: fix use of custom separator in prepend_path etc. (#8737)
fixes #8736
2018-08-01 12:58:54 +02:00
Michael Kuhn
53ddefa0df Fix shift warning on zsh (#8805)
When using zsh, trying to shift when there are no arguments left results
in warnings like this: spack:shift:22: shift count must be <= $#
2018-07-27 08:14:01 -05:00
Massimiliano Culpo
5b8b7a5873 The auto-completion file is now consistent with spack module 2018-07-24 11:27:17 -07:00
Massimiliano Culpo
35cef16974 Grouped all the module commands under spack module
As requested in the review all the commands meant to manage module
files have been grouped under the `spack module` command.

Unit tests have been refactored to match the new command structure.
2018-07-24 11:27:17 -07:00
Massimiliano Culpo
7cbe1aedb7 module file tutorial: rebuilt docker image and updated the script 2018-07-24 11:27:17 -07:00
Massimiliano Culpo
443d702971 spack load exits with 1 if module does not exist or is not installed
fixes #2215
fixes #2570
fixes #6676
fixes #7281
closes #3827

This PR reverts the use of `spack module loads` in favor of
`spack module find` when loading module files via Spack. After this PR
`spack load` will accept a single spec at a time, and will be able
to interpret correctly the `--dependencies` option.
2018-07-24 11:27:17 -07:00
Massimiliano Culpo
c0d9de240a Revert "Fix recursive module loading."
This reverts commit 732c24f603.
2018-07-24 11:27:17 -07:00
Patrick Gartung
c9147aad80 Remove extra Scientific Linux docker build left after merge. (#8770) 2018-07-22 16:46:26 -05:00
Adam J. Stewart
af8dde4dda shell: Add spack to PATH before calling spack in setup-env.csh (#8740) 2018-07-18 09:36:22 -07:00
Todd Gamblin
06418a3dcd
add spack --print-shell-vars to speed up setup-env.[c]sh (#8101)
- The setup-env.sh script currently makes two calls to spack, but it
  should only need to make one.

- Add a fast-path shell setup routine in `main.py` to allow the shell
  setup to happen in a single, fast call that doesn't load more than it
  needs to.

- This simplifies setup code, as it has to eval what Spack prints

- TODO: consider eventually making the whole setup script the output of a
  spack command
2018-07-16 15:43:44 -07:00
Omar Padron
911b6d7671 Docker dedupe (#8441)
* Add Dockerfile for Scientific Linux 7 (RHEL7 recompile)

* revert version change

* remove duplicate docker-related files
2018-06-26 07:37:28 -07:00
Patrick Gartung
bdd5aab8be Add Dockerfile for Scientific Linux 7 (RHEL7 recompile) (#8422)
* Add Dockerfile for Scientific Linux 7 (RHEL7 recompile)
2018-06-26 01:10:13 -07:00
Todd Gamblin
c4c1d37fcd refactor: move templates from root to share/spack
- This complies with the unix directory hierarchy standard (which Spack
  attempts to follow)
- Also unclutters the repo root directory.
2018-06-24 16:38:36 -07:00
Todd Gamblin
863ccd5e94 config: simplify configuration API to just get and set
- replace `spack.config.get_configuration()` with `spack.config.config()`

- replace `get_config`/`update_config` with `get`, `set`

- add a path syntax that can be used to refer to specific config options
  without firt getting the entire configuration dict

- update usages of `get_config` and `update_config` to use `get` and `set`
2018-05-17 14:10:30 -07:00
René Widera
caa0c5c687 environment shell: fix spack load (#7747)
Fix `spack load` with extended packe specifications those includes spaces.
Solved by using perfectly parameter forwarding via temporary array.

example:
```
$ spack install zlib
$ spack install zlib cppflags='-O3 -march=native'
$ spack install zlib cppflags='-O2 -march=native'

$ spack find -d -L -f zlib
==> 3 installed packages.
-- linux-linuxmint18-x86_64 / gcc@5.4.0 -------------------------
k5hg4kkxiutkfl6n53ogz5wnlbdrsdtf    zlib@1.2.11%gcc

mse2fyzdxciszdhiqi4b5kl6fxkps3fh    zlib@1.2.11%gcc cppflags="-O2 -march=native"

vrnvj2fikcbxqxrymctnlpmud7wbuahk    zlib@1.2.11%gcc cppflags="-O3 -march=native"

$ spack load zlib cppflags='-O3 -march=native'
==> Error: Unexpected token
['zlib', 'cppflags=-O3', '-march=native']
```
2018-04-24 13:43:32 -07:00
Adam J. Stewart
ef37cdb380
Autocomplete spack providers (#7783) 2018-04-17 09:33:04 -05:00
Massimiliano Culpo
fa07f95a71
Fixes conflicts in OSX nightly tests (#7732)
fixes #7593

Unit tests on OSX are trying to concretize mpileaks, and they fail due
to a conflict in the package:

"%gcc@7.2.0:" conflicts with "elfutils@0.163"

This solves the issue asking explicitly to concretize against
elfutils@1.170
2018-04-12 14:11:36 +02:00
scheibelp
5e758b979e
update tests: concretize mpileaks with gcc (#7635)
Fixes #7593

By default MacOS concretizes using the clang compiler. The unit tests
include a call to "spack spec mpileaks", which has elfutils as a
dependency; #7096 added a conflict in elfutils to avoid building
with clang, which lead to the MacOS unit tests to start failing.
This updates the concretization to force using gcc when concretizing
mpileaks.
2018-03-29 12:24:35 -07:00
Adam J. Stewart
4332e75986
Various updates to Spack's Bash completion (#7590)
* Various updates to Spack's Bash completion

* Equals sign messes up tab completion
2018-03-25 08:03:29 -05:00
Todd Gamblin
54f97d1dec
Update copyright on LLNL files for 2018. (#7592) 2018-03-24 12:13:52 -07:00
Massimiliano Culpo
94c22092a8
Save sources in a mirror and cache it in Travis (#7392) 2018-03-06 06:49:43 +01:00
Omar Padron
3a9cd2614e Docker-Based Developer Resource (#5871)
* add docker-based development resources

* incorporate feedback from @ax3l

* fix docs/improve ssh handling

* experiment with custom prompt

* add arch/fix missing core_compilers key

* add centos/minor tweaks

* make prompt experiment optional

* workaround problem with latest fedora docker image

* add docker documentation page to index toc

* try another documentation fix

* switch arch linux base to base/archlinux

* update the git urls in the Dockerfiles

* add opensuse

* switch CUSTOM_PROMPT variable to simply "PROMPT"
2018-02-27 00:36:14 -08:00
Massimiliano Culpo
621388e5ae
Restore multiprocessing in unit tests (#6949)
* Revert "Travis: use --concurrency=multiprocessing only on build tests (#6872)"

This reverts commit 596d463714.

* Removing 'coverage combine' in test script

According to what was discovered in #6887, one of the problems is
calling 'coverage combine' twice without the '-a' flag. This removes
the first call within our test scripts.
2018-01-20 16:10:25 +01:00
Adam J. Stewart
03ff2a32ae
Reduce verbosity of build tests (#6901) 2018-01-11 16:14:26 -06:00
Massimiliano Culpo
596d463714 Travis: use --concurrency=multiprocessing only on build tests (#6872)
On a local workstation, it seems that tracking multiple processes during
coverage may result in malformed coverage reports for unit tests and not
for build tests.

Given that multiple processes make a difference in coverage mainly for
build tests, try to disable the tracking for unit tests to see if we get
more stable coverage results.
2018-01-10 10:14:17 -06:00
Adam J. Stewart
5f6df40f3b Fix bash tab completion for spack install (#6868) 2018-01-10 13:51:04 +01:00
Massimiliano Culpo
9bffa96754 Reduce the calls to the python interpreter during initialization (#6312)
* Reduce the calls to the python interpreter during initialization

This should reduce the delay the users experience when sourcing the
setup file to activate shell support. It works by generating at once
all the commands that needs to evaluated (they are stored in
a string and later `eval`ed by the shell).

* setup_env.sh: changed `read` with an equivalent magic

For some reason `read` breaks when sourced from a running script.
Change the incantation we use to construct the unique python command
that will be evaluated.

* setup_env.sh: python command now constructed with `printf` for portability

This recovers the support for `zsh` that was broken in previous commits.
2017-11-15 17:38:40 -07:00
Massimiliano Culpo
fe889124eb SC17: reworked module file tutorial section (#5657)
* Reworked module file tutorial section

First draft for the SC17 update. This includes:

 - adding an introduction on module files + Spack's module
   generation blueprints
 - adding a set-up section and provide a docker image for easy set-up
 - updating all the relevant snippets
 - extending a bit some of the concepts that were already touched

* Added reference to #5582 + committed Dockerfiles

Also fixed a couple of typos spotted by Denis.

* module file tutorial: added section on template customization

* module file tutorial: fixed minor typos + rephrased a sentence

* module file tutorial: made explicit that Docker image comes with software

* module file tutorial: improved phrasing and layout.

Thanks Hartzell!

* module file tutorial: added vim and nano to editors

* module file tutorial: fixed typo

* Fixed typos

Thanks Adam!

* module file tutorial: updated Dockerfile + minor changes in introduction
2017-11-12 00:27:20 -08:00
Todd Gamblin
3a0324fe1a
add artisanal handcrafted SVG Spack logo. (#6165)
- This isn't one of those autogenerated SVGs from a drawing program!

- This is a completely re-traced, minimalist SVG file with clearly
  delineated pieces so that your favorite renderer can draw a Spack logo
  at whatever resolution you want.

- Included versions with text, as well.
2017-11-06 22:42:16 -08:00
Todd Gamblin
05fa302655
Replace github.com/llnl/spack with github.com/spack/spack (#6142)
We moved to a new GitHub org! Now make the code and docs reflect that.
2017-11-04 17:08:04 -07:00
Michael Kuhn
f45916fad2 Set LANG= for _spack_fn_exists (#5475)
type's output can be localized, causing the grep to fail.
2017-09-26 12:28:50 -07:00
Matthew Scott Krafczyk
0bd838bd11 Remove echo statements from setup-env.sh
setup-env.sh adds the 'module' command to the user's environment
if it is not defined and if there is a Spack installation of
environment-modules available. This commit updates that logic to
perform these checks and updates quietly.
2017-09-14 18:49:25 -07:00
Christoph Junghans
80ac613391 Shell detection: filter preceding "-"
On OSX, the shell detection code may get a preceding dash, like
"-bash". This adds a filter to remove it.
2017-09-12 12:17:20 -07:00
Matthew Scott Krafczyk
f57559e4e2 Fix two bugs from the bootstrap update (#5312)
These were discovered with bash 4.1.2.

Add quotations around a variable to prevent the destruction of a
newline. Without this fix a conditional doesn't work properly.

Remove square brackets around a conditional meant to be evaluated based
on the return code of a command. This wasn't working properly with an
old bash.

Fix a typo.
2017-09-10 16:54:23 -10:00
Matthew Scott Krafczyk
51828dd982 Bootstrap environment-modules
Renames the existing bootstrap command to 'clone'. Repurposes
'spack bootstrap' to install packages that are useful to the
operation of Spack (for now this is just environment-modules).
For bash and ksh users running setup-env.sh, if a Spack-installed
instance of environment-modules is detected and environment modules
and dotkit are not externally available, Spack will define the 
'module' command in the user's shell to use the environment-modules
built by Spack.
2017-09-08 10:15:06 -07:00
Michael Kuhn
84ae7872d3 Update copyright notices for 2017 (#5295) 2017-09-06 17:44:16 -10:00