summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2020-03-21Buildcache: attempt to build and install buildcaches in test environment ↵Patrick Gartung1-0/+480
(#15577) * Put bindist.py on it's own branch * Working on SL7 with python 3.6 * Flake8 * Put back clearing of compiler cache
2020-03-20Merge branch 'releases/v0.14' into developTodd Gamblin1-1/+1
2020-03-20performance: add a verification file to the database (#14693)Andrew W Elble3-3/+52
Reading the database repeatedly can be quite slow. We need a way to speed up Spack when it reads the DB multiple times, but the DB has not been modified between reads (which is nearly all the time). - [x] Add a file containing a unique uuid that is regenerated at database write time. Use this uuid to suppress re-parsing the database contents if we know a previous uuid and the uuid has not changed. - [x] Fix mutable_database fixture so that it resets the last seen verifier when it resets. - [x] Enable not rereading the database immediately after a write. Make the tests reset the last seen verifier in between tests that use the database fixture. - [x] make presence of uuid module optional
2020-03-20Buildcache: add unit tests for normalized path functions in relocate.py (#15607)Patrick Gartung1-5/+57
2020-03-20fix: change typo dependnecies to dependencies (#15602)Ryan Mast2-2/+2
2020-03-20version bump: 0.14.1Todd Gamblin1-1/+1
2020-03-20multiprocessing: allow Spack to run uninterrupted in background (#14682)Greg Becker1-47/+83
Spack currently cannot run as a background process uninterrupted because some of the logging functions used in the install method (especially to create the dynamic verbosity toggle with the v key) cause the OS to issue a SIGTTOU to Spack when it's backgrounded. This PR puts the necessary gatekeeping in place so that Spack doesn't do anything that will cause a signal to stop the process when operating as a background process.
2020-03-20multiprocessing: allow Spack to run uninterrupted in background (#14682)Greg Becker1-47/+83
Spack currently cannot run as a background process uninterrupted because some of the logging functions used in the install method (especially to create the dynamic verbosity toggle with the v key) cause the OS to issue a SIGTTOU to Spack when it's backgrounded. This PR puts the necessary gatekeeping in place so that Spack doesn't do anything that will cause a signal to stop the process when operating as a background process.
2020-03-20spack checksum: Use package's fetch_options (#15481)Michael Kuhn2-3/+12
This makes sure that a package's fetch_options are used when fetching new versions to checksum. This allows working around problems with slow servers or those requiring a cookie to be set.
2020-03-20Cray bugfix: TERM missing while reading default target (#15381)Greg Becker1-6/+8
Bug: Spack hangs on some Cray machines Reason: The TERM environment variable is necessary to run bash -lc "echo $CRAY_CPU_TARGET", but we run that command within env -i, which wipes the environment. Fix: Manually forward the TERM environment variable to env -i /bin/bash -lc "echo $CRAY_CPU_TARGET"
2020-03-20Upstreams: don't write metadata directory to upstream DB (#15526)Kai Germaschewski1-1/+1
When trying to use an upstream Spack repository, as of f2aca86 Spack was attempting to write to the upstream DB based on a new metadata directory added in that commit. Upstream DBs are read-only, so this should not occur. This adds a check to prevent Spack from writing to the upstream DB
2020-03-20Creating 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-20bugfix: 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-20bugfix: 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-20Add function replace_prefix_nullterm for use on mach-o rpaths. (#15347)Patrick Gartung1-3/+34
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-20ArchSpec: fix semantics of satisfies when not concrete and strict is true ↵Massimiliano Culpo2-0/+17
(#15319)
2020-03-20testing: increase installer coverage (#15237)Tamara Dahlgren3-109/+280
2020-03-20bugfix: resolve undefined source_pkg_dir failure (#15339)Tamara Dahlgren2-8/+74
2020-03-20Bugfix: 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-20Recover coverage from subprocesses during unit tests (#15354)Tamara Dahlgren4-19/+13
* Recover coverage from subprocesses during unit tests
2020-03-20Correct pytest.raises matches to match (#15346)Massimiliano Culpo3-10/+10
2020-03-20bugfix: 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-03-20Uniquify suffixes added to module names (#14920)Seth R. Johnson3-1/+4
2020-03-20bugfix: 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-03-20Fix 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-20modules: 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-03-20fetch_strategy: remove vestigial code (#15431)Greg Becker1-18/+0
2020-03-20Show the packaga name for a missing patch sha256 (#15441)Dr. Christian Tacke1-1/+2
When a patches sha256 is missing, also show the packagename, so that analyzing is easier.
2020-03-19Cray bugfix: TERM missing while reading default target (#15381)Greg Becker1-6/+8
Bug: Spack hangs on some Cray machines Reason: The TERM environment variable is necessary to run bash -lc "echo $CRAY_CPU_TARGET", but we run that command within env -i, which wipes the environment. Fix: Manually forward the TERM environment variable to env -i /bin/bash -lc "echo $CRAY_CPU_TARGET"
2020-03-19refactor: `spack.package.possible_dependencies()` handles virtualsTodd Gamblin4-44/+75
- [x] move some logic for handling virtual packages from the `spack dependencies` command into `spack.package.possible_dependencies()` - [x] rework possible dependencies tests so that expected and actual output are on the left/right respectively
2020-03-19bugfix: `spack.package.possible_dependencies()` should return virtualsTodd Gamblin1-7/+1
`spack.package.possible_dependencies()` was forgetting to pass the `visited` dict to recursive calls; this fixes it
2020-03-18Buildcache: fix relocation of binaries with relative rpaths (#15558)Patrick Gartung1-1/+1
2020-03-18Upstreams: don't write metadata directory to upstream DB (#15526)Kai Germaschewski1-1/+1
When trying to use an upstream Spack repository, as of f2aca86 Spack was attempting to write to the upstream DB based on a new metadata directory added in that commit. Upstream DBs are read-only, so this should not occur. This adds a check to prevent Spack from writing to the upstream DB
2020-03-18Use python extend_path as pyqt sip fix (#15297)Sinan2-36/+24
* try extend path to solve PyQt5.sip not found issue * disable private sip installation in sippackage class * undo manual PyQt5 dir creation in py-sip site-packages dir * fix typo * fix typo * also apply fix to PyQt4 * tidy up * flake8 and tidy up * tidy and undo hardcoding of python_include_dir * replace hardcoded python inc dir * fix minor issues * rethink include dir variable name * improve style * add new versions * implement new sip setup to qsci installation * set sip-incdir correctly for the new setup * setup extend_path thing before qsci python bindings * take care of conflict * flake8 * also extend for PyQt4 * improve style * improve style * SipPackage build sys should depend on py-sip * consolidate extend_path fixes into SipPackage * fix typo * fix bugs * flake8 * revert sip doc to pre-resource setup * import os module * flake8 Co-authored-by: Sinan81 <sbulut@3vgeomatics.com>
2020-03-17Remove PatchelfError and change patchelf error message to a warning. (#15518)Patrick Gartung1-13/+4
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