New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create, install and relocate tarballs of installed packages. #4854
Changes from 39 commits
2211a4c
3557fcb
c01923b
713a3e3
1fc1e0f
44482ca
0b2d3ba
724c27d
052b7cb
64e24cc
d253646
514af1e
698d6ab
fd40e52
138206f
26c5c84
27b942d
29e50b6
d781eb7
ae360f0
6abd14e
cb9928c
25dafa6
e48c63e
85a1a4c
9ecf3f8
bba77a2
f0f3b4e
f004608
13b7d09
c7f1810
bec0e52
73fdb2c
b79a47a
cb4d87c
9889d0e
e764767
4006f40
a7f7153
fe99867
f02d2ba
b11372c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
.. _binary_caches: | ||
|
||
Build caches | ||
============ | ||
|
||
Some sites may encourage users to set up their own test environments | ||
before carrying out central installations, or some users prefer to set | ||
up these environments on their own motivation. To reduce the load of | ||
recompiling otherwise identical package specs in different installations, | ||
created build artifacts can be put into build cache tarballs, uploaded to | ||
your spack mirror and then downloaded and installed by others. | ||
|
||
|
||
Creating build cache files | ||
-------------------------- | ||
|
||
A compressed tarball of an installed package is created. Tarballs are created | ||
for all of its link and run dependency packages as well. Compressed tarballs are | ||
signed with gpg and signature and tarball and put in a ".spack" file. Optionally | ||
, the rpaths ( and ids and deps on macOS ) can be changed to paths relative to | ||
the spack install tree before the tarball is created. | ||
|
||
Build caches are created via: | ||
|
||
.. code-block:: sh | ||
|
||
$ spack buildcache create | ||
|
||
|
||
Finding or installing build cache files | ||
--------------------------------------- | ||
|
||
To find build caches or install build caches, a spack mirror must be configured | ||
with | ||
|
||
``spack mirror add <name> <url>``. | ||
|
||
Build caches are found via: | ||
|
||
.. code-block:: sh | ||
|
||
$ spack buildcache list | ||
|
||
Build caches are installed via: | ||
|
||
.. code-block:: sh | ||
|
||
$ spack buildcache install | ||
|
||
|
||
Relocation | ||
---------- | ||
|
||
Initial build and later installation do not necessarily happen at the same | ||
location. Spack provides a relocation capability and corrects for RPATHs and | ||
non-relocatable scripts. However, many packages compile paths into binary | ||
artificats directly. In such cases, the build instructions of this package would | ||
need to be adjusted for better re-locatability. | ||
|
||
|
||
Usage | ||
----- | ||
spack buildcache create <> | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Create tarball of installed spack package, checksum tarball and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
... and all dependencies. Places them in a directory. You can place the directory in a mirror and commands like "spack buildcache install" will search it for pre-compiled packages. |
||
sign tarball if gpg2 is available. | ||
|
||
options: | ||
|
||
-d <path> : directory in which "build_cache" direcory is created, defaults to "." | ||
-f : overwrite ".spack" file in "build_cache" directory if it exists | ||
-k <key> : the key to sign package with. In the case where multiple keys exist, the package will be unsigned unless -k is used. | ||
-r : make paths in binaries relative before creating tarball | ||
-y : answer yes to all create unsigned "build_cache" questions | ||
<> : list of package specs or package hashes with leading / | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is how this has been specified elsewhere in the docs. |
||
|
||
spack buildcache list <> | ||
^^^^^^^^^^^^^^^^^^^^^^^^ | ||
options: | ||
|
||
<> string to be matched to matched to begining of listed concretized short | ||
specs, eg. "spack buildcache list gcc" with print only commands to install gcc | ||
package(s) | ||
|
||
spack buildcache install <> | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Install "build_cache" available on spack mirror. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer: "retrieve specs available from each mirror's build cache and installs all specs which match the input spec" |
||
|
||
options: | ||
|
||
-f : remove install directory if it exists before unpacking tarball | ||
-y : answer yes to all to don't verify package with gpg questions | ||
<> : list of package specs or package hashes with leading / | ||
|
||
spack buildcache keys | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO it's worthwhile mentioning that this retrieves keys from mirrors configured in mirrors.yaml. It is also worth mentioning that this makes use of |
||
^^^^^^^^^^^^^^^^^^^^^ | ||
List public keys available on spack mirror. | ||
|
||
options: | ||
|
||
-i : trust the keys downloaded with prompt for each | ||
-y : answer yes to all trust all keys downloaded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> "artifacts"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jenkins speak for binaries.