summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2020-03-16Warn only if link target is not relative and outside of the install prefix ↵Patrick Gartung1-9/+8
(#15512)
2020-03-16When replacing path text in ELF binaries do not include null byte padding in ↵Patrick Gartung1-1/+1
search string (#15508)
2020-03-16CMakePackage: convert variants to CMake arguments (#14376)Seth R. Johnson3-16/+153
Add a 'define_from_variant` helper function to CMake-based Spack packages to convert package variants into CMake arguments. For example: args.append('-DFOO=%s' % ('ON' if '+foo' in self.spec else 'OFF')) can be replaced with: args.append(self.define_from_variant('foo')) The following conversions are handled automatically: * Flag variants will be converted to CMake booleans * Multivalued variants will be converted to semicolon-separated strings * Other variant values are converted to CMake string arguments This also adds a 'define' helper method to convert any variable to a CMake argument. It has the same conversion rules as 'define_from_variant' (but operates directly on values rather than requiring the user to supply the name of a package variant).
2020-03-16Buildcache: Install into non-default directory layouts (#13797)Patrick Gartung4-585/+896
* Buildcache: Install into non-default directory layouts Store a dictionary mapping of original dependency prefixes to dependency hashes Use the loaded spec to grab the new dependency prefixes in the new directory layout. Map the original dependency prefixes to the new dependency prefixes using the dependency hashes. Use the dependency prefixes map to replace original rpaths with new rpaths preserving the order. For mach-o binaries, use the dependency prefixes map to replace the dependency library entires for libraries and executables and the replace the library id for libraries. On Linux, patchelf is used to replace the rpaths of elf binaries. On macOS, install_name_tool is used to replace the rpaths and dependency libraries of mach-o binaries and the id of mach-o libraries. On Linux, macholib is used to replace the dependency libraries of mach-o binaries and the id of mach-o libraries. Binary text with padding replacement is attempted for all binaries for the following paths: spack layout root spack prefix sbang script location dependency prefixes package prefix Text replacement is attempted for all text files using the paths above. Symbolic links to the absolute path of the package install prefix are replaced, all others produce warnings.
2020-03-13package: Add fetch_options variable (#15317)Michael Kuhn4-7/+49
PR #15212 added a new connect_timeout option that can be overridden using fetch_options but had to specified per-version. This adds a new per-package variable that can be used to override fetch_options for all versions in the package. This includes connect_timeout as well as 'cookie' (e.g. for the jdk package). Packages can combine package-level fetch_options with per-version fetch_options, in which case the version fetch_options completely override the package-level fetch_options. This commit includes tests for the added behavior.
2020-03-12testing: increase installer coverage (#15237)Tamara Dahlgren3-109/+280
2020-03-12Creating versions from urls doesn't modify class attributes (#15452)Massimiliano Culpo3-3/+3
fixes #15449 Before this PR a call to pkg.url_for_version was modifying class attributes determining different results for subsequents calls and an error when the urls was empty.
2020-03-11bugfix: resolve undefined source_pkg_dir failure (#15339)Tamara Dahlgren2-8/+74
2020-03-11fetch_strategy: remove vestigial code (#15431)Greg Becker1-18/+0
2020-03-10bugfix: fix install_missing_compilers option bug from v0.14.0 (#15416)Greg Becker1-0/+18
* bugfix: ensure bootstrapped compilers built before packages using the compiler
2020-03-10decompressor: add support for bz2 (#15424)Christoph Junghans1-0/+3
2020-03-09Revert to gzip as the default buildcache compression as bzip2 is not always ↵Patrick Gartung1-6/+6
available. (#15412) * Revert to gzip as the default buildcache compression as bzip2 is not always available. * Flake8
2020-03-07bugfix: installer.py shouldn't be executable (#15386)Todd Gamblin1-0/+0
This is a minor permission fix on the new installer.py introduced in #13100.
2020-03-07ArchSpec: fix semantics of satisfies when not concrete and strict is true ↵Massimiliano Culpo2-0/+17
(#15319)
2020-03-07Only use stable versions for public mirror (#15100)Peter Scheibel9-32/+75
* 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-06Fix for being able to 'spack load' packages that have been renamed. (#14348)Andrew W Elble2-1/+36
* Fix for being able to 'spack load' packages that have been renamed. * tests: add test for 'spack load' of a installed, but renamed/deleted package
2020-03-05Allow overrides for spack.config set() and override(). (#14432)Chris Green2-17/+141
Allows spack.config InternalConfigScope and Configuration.set() to handle keys with trailing ':' to indicate replacement vs merge behavior with respect to lower priority scopes. Lists may now be replaced rather than merged (this behavior was previously only available for dictionaries). This commit adds tests for the new behavior.
2020-03-05Recover coverage from subprocesses during unit tests (#15354)Tamara Dahlgren4-19/+13
* Recover coverage from subprocesses during unit tests
2020-03-05Allow buildcaches keys to find public keys on the e4s mirror (#15361)Patrick Gartung1-3/+6
2020-03-05Correct pytest.raises matches to match (#15346)Massimiliano Culpo3-10/+10
2020-03-05Bugfix: resolve StopIteration message attribute failure (#15341)Massimiliano Culpo2-1/+22
Testing the install StopIteration exception resulted in an attribute error: AttributeError: 'StopIteration' object has no attribute 'message' This PR adds a unit test and resolves that error.
2020-03-04Add function replace_prefix_nullterm for use on mach-o rpaths. (#15347)Patrick Gartung1-4/+35
This recovers the old behavior of replace_prefix_bin that was modified to work with elf binaries by prefixing os.sep to new prefix until length is the same as old prefix.
2020-03-04Remove DB conversion of old index.yaml (#15298)Peter Scheibel1-84/+45
Removed the code that was converting the old index.yaml format into index.json. Since the change happened in #2189 it should be considered safe to drop this (untested) code.
2020-03-04use os.sep instead of null byte to pad replacement paths in binaries (#15338)Patrick Gartung1-1/+2
* use os.sep instead of null byte to pad replacement paths in binaries * Prefix the pading os.sep's
2020-03-03Fix FCFLAGS handling for Autotools packages (#14788)Sergey Kosukhin2-1/+7
Spack's fflags are meant for both f77 and fc. Therefore, they must be passed as FFLAGS and FCFLAGS to the configure scripts of Autotools-based packages.
2020-03-02bugfix: ensure proper dependency handling for package-only installs (#15197)Tamara Dahlgren3-17/+149
The distributed build PR (#13100) -- did not check the install status of dependencies when using the `--only package` option so would refuse to install a package with the claim that it had uninstalled dependencies whether that was the case or not. - [x] add install status checks for the `--only package` case. - [x] add initial set of tests
2020-02-28Fix detection of redhat enterprise compute node (#15253)Adam J. Stewart1-0/+1
* Fix detection of redhat enterprise compute node * Add comma * Remove space
2020-02-27Add new timeout fetch_optionMichael Kuhn1-6/+10
This allows packages to override the global connect_timeout.
2020-02-27Generalize curl_options into fetch_optionsMichael Kuhn1-2/+7
This allows us to support higher-level concepts such as 'cookie' and 'timeout' without users having to specify curl options.
2020-02-27config: Add a new option connect_timeoutMichael Kuhn3-2/+8
connect_timeout can be used to increase the time Spack waits for the server to answer. This can be used to work around slow connections or servers. Fixes #14700
2020-02-27CudaPackage: add support for Tesla K80 and older CUDA (#15031)Adam J. Stewart1-30/+46
* CudaPackage: add support for Tesla K80 and older CUDA * Flake8 fixes * Fix cuda_arch when no arch is set * Fine-tune cuda_arch=37,50 supported CUDA versions * CUDA 6.5+ supports SM_37 * Add @svenevs as a maintainer
2020-02-27Docs: "spack env" is in the meantime called "spack build-env" (#15233)TZ1-10/+10
2020-02-26bugfix: Add dependents when initializing spec from yaml (#15220)Tamara Dahlgren2-11/+17
The new build process, introduced in #13100 , relies on a spec's dependents in addition to their dependencies. Loading a spec from a yaml file was not initializing the dependents. - [x] populate dependents when loading from yaml
2020-02-26Uniquify suffixes added to module names (#14920)Seth R. Johnson3-1/+4
2020-02-26A few edits for the Basic Usage Doc page (#15215)Glenn Johnson1-8/+16
This PR corrects a few minor things and adds a note about colorized output.
2020-02-25buildcache cmd: add explicit message with default output dir for ↵Patrick Gartung2-12/+63
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 Padron2-12/+31
* add --only option to buildcache create cmd replaces the --no-deps option
2020-02-25remove catch-all exception handling in buildcache command (#15185)Omar Padron3-7/+20
* remove catch-all exception handling in buildcache command * fix test
2020-02-25Buildcache cmd: add install -o/--otherarch option for installing macOS ↵Patrick Gartung1-3/+9
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-24docs: Fix tiny typo (#15181)Michael Kuhn1-1/+1
2020-02-24cmd/load: Fix usage output (#15180)Michael Kuhn1-2/+3
args.specs is a list, which results in output like this: ``` eval `spack load --sh ['libxml2', 'xz']` ``` We want this instead: ``` eval `spack load --sh libxml2 xz` ```
2020-02-24modules: store configure args during build (#11084)Michael Kuhn4-11/+41
This change stores packages' configure arguments during build and makes use of them while refreshing module files. This fixes problems such as in #10716.
2020-02-23Merge branch 'releases/v0.14' into developTodd Gamblin4-1/+11713
2020-02-23version bump: 0.14.0Todd Gamblin4-1/+11713
2020-02-23create: Mention that python dependency does not have to be added (#15173)Michael Kuhn1-1/+3
A generic python dependency is already added implicitly by the PythonPackage class.
2020-02-21Emit a sensible error message if compiler's target is overly specific (#14888)Massimiliano Culpo2-0/+33
* Emit a sensible error message if compiler's target is overly specific fixes #14798 fixes #13733 Compiler specifications require a generic architecture family as their target. This commit improves the error message that is displayed to users if they edit compilers.yaml and use an overly specific name.
2020-02-20Updated installer module copyright (#15138)Tamara Dahlgren1-1/+1
Update the copyright for `installer.py`.
2020-02-20Restore package-related unsigned binary changes from PR 11107 (#15134)Tamara Dahlgren2-12/+21
Restore package-related unsigned binary changes from PR 11107
2020-02-20Package hashing: fix detection of directives (#14763)Peter Scheibel2-0/+19
The hashing logic looks for function calls that are Spack directives. It expects that when a Spack directive is used that it is referenced directly by name, and that the directive function is not itself retrieved by calling another function. When the hashing logic encountered a function call where the function was determined dynamically, it would fail (attempting to access a name attribute that does not happen to exist in this case). This updates the hashing logic to filter out function calls where the function is determined dynamically when looking for uses of Spack directives.
2020-02-20Use get_spec in relocated _try_install_from_binary_cache (#15131)Patrick Gartung1-1/+1
* Use get_spec in relocated _try_install_from_binary_cache