summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-05-24 23:33:52 +0200
committerGitHub <noreply@github.com>2022-05-24 21:33:52 +0000
commitba907defcae98d965fc8dec4b83eb528838d4959 (patch)
treeb9b0732dd8f8d0aa7a94b6f491308ae718c4e143 /etc
parent87b078d1f32158339081b66201484c40a54b1ce2 (diff)
downloadspack-ba907defcae98d965fc8dec4b83eb528838d4959.tar.gz
spack-ba907defcae98d965fc8dec4b83eb528838d4959.tar.bz2
spack-ba907defcae98d965fc8dec4b83eb528838d4959.tar.xz
spack-ba907defcae98d965fc8dec4b83eb528838d4959.zip
Add a command to generate a local mirror for bootstrapping (#28556)
This PR builds on #28392 by adding a convenience command to create a local mirror that can be used to bootstrap Spack. This is to overcome the inconvenience in setting up this mirror manually, which has been reported when trying to setup Spack on air-gapped systems. Using this PR the user can create a bootstrapping mirror, on a machine with internet access, by: % spack bootstrap mirror --binary-packages /opt/bootstrap ==> Adding "clingo-bootstrap@spack+python %apple-clang target=x86_64" and dependencies to the mirror at /opt/bootstrap/local-mirror ==> Adding "gnupg@2.3: %apple-clang target=x86_64" and dependencies to the mirror at /opt/bootstrap/local-mirror ==> Adding "patchelf@0.13.1:0.13.99 %apple-clang target=x86_64" and dependencies to the mirror at /opt/bootstrap/local-mirror ==> Adding binary packages from "https://github.com/alalazo/spack-bootstrap-mirrors/releases/download/v0.1-rc.2/bootstrap-buildcache.tar.gz" to the mirror at /opt/bootstrap/local-mirror To register the mirror on the platform where it's supposed to be used run the following command(s): % spack bootstrap add --trust local-sources /opt/bootstrap/metadata/sources % spack bootstrap add --trust local-binaries /opt/bootstrap/metadata/binaries The mirror has to be moved over to the air-gapped system, and registered using the commands shown at prompt. The command has options to: 1. Add pre-built binaries downloaded from Github (default is not to add them) 2. Add development dependencies for Spack (currently the Python packages needed to use spack style) * bootstrap: refactor bootstrap.yaml to move sources metadata out * bootstrap: allow adding/removing custom bootstrapping sources This operation can be performed from the command line since new subcommands have been added to `spack bootstrap` * Add --trust argument to spack bootstrap add * Add a command to generate a local mirror for bootstrapping * Add a unit test for mirror creation
Diffstat (limited to 'etc')
-rw-r--r--etc/spack/defaults/bootstrap.yaml29
1 files changed, 5 insertions, 24 deletions
diff --git a/etc/spack/defaults/bootstrap.yaml b/etc/spack/defaults/bootstrap.yaml
index 8c1592055e..b3ab1c99df 100644
--- a/etc/spack/defaults/bootstrap.yaml
+++ b/etc/spack/defaults/bootstrap.yaml
@@ -6,34 +6,15 @@ bootstrap:
# by Spack is installed in a "store" subfolder of this root directory
root: $user_cache_path/bootstrap
# Methods that can be used to bootstrap software. Each method may or
- # may not be able to bootstrap all of the software that Spack needs,
+ # may not be able to bootstrap all the software that Spack needs,
# depending on its type.
sources:
- name: 'github-actions-v0.2'
- type: buildcache
- description: |
- Buildcache generated from a public workflow using Github Actions.
- The sha256 checksum of binaries is checked before installation.
- info:
- url: https://mirror.spack.io/bootstrap/github-actions/v0.2
- homepage: https://github.com/spack/spack-bootstrap-mirrors
- releases: https://github.com/spack/spack-bootstrap-mirrors/releases
+ metadata: $spack/share/spack/bootstrap/github-actions-v0.2
- name: 'github-actions-v0.1'
- type: buildcache
- description: |
- Buildcache generated from a public workflow using Github Actions.
- The sha256 checksum of binaries is checked before installation.
- info:
- url: https://mirror.spack.io/bootstrap/github-actions/v0.1
- homepage: https://github.com/spack/spack-bootstrap-mirrors
- releases: https://github.com/spack/spack-bootstrap-mirrors/releases
- # This method is just Spack bootstrapping the software it needs from sources.
- # It has been added here so that users can selectively disable bootstrapping
- # from sources by "untrusting" it.
- - name: spack-install
- type: install
- description: |
- Specs built from sources by Spack. May take a long time.
+ metadata: $spack/share/spack/bootstrap/github-actions-v0.1
+ - name: 'spack-install'
+ metadata: $spack/share/spack/bootstrap/spack-install
trusted:
# By default we trust bootstrapping from sources and from binaries
# produced on Github via the workflow