File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ bootstrapping.
171171 To register the mirror on the platform where it's supposed to be used run the following command(s):
172172 % spack bootstrap add --trust local-sources /opt/bootstrap/metadata/sources
173173 % spack bootstrap add --trust local-binaries /opt/bootstrap/metadata/binaries
174+ % spack buildcache update-index /opt/bootstrap/bootstrap_cache
174175
175176
176177 This command needs to be run on a machine with internet access and the resulting folder
Original file line number Diff line number Diff line change @@ -90,8 +90,12 @@ def __init__(self, conf: ConfigDictionary) -> None:
9090 self .name = conf ["name" ]
9191 self .metadata_dir = spack .util .path .canonicalize_path (conf ["metadata" ])
9292
93- # Promote (relative) paths to file urls
94- self .url = spack .mirror .Mirror (conf ["info" ]["url" ]).fetch_url
93+ # Check for relative paths, and turn them into absolute paths
94+ # root is the metadata_dir
95+ maybe_url = conf ["info" ]["url" ]
96+ if spack .util .url .is_path_instead_of_url (maybe_url ) and not os .path .isabs (maybe_url ):
97+ maybe_url = os .path .join (self .metadata_dir , maybe_url )
98+ self .url = spack .mirror .Mirror (maybe_url ).fetch_url
9599
96100 @property
97101 def mirror_scope (self ) -> spack .config .InternalConfigScope :
Original file line number Diff line number Diff line change 2929
3030
3131# Tarball to be downloaded if binary packages are requested in a local mirror
32- BINARY_TARBALL = "https://github.com/spack/spack-bootstrap-mirrors/releases/download/v0.4 /bootstrap-buildcache.tar.gz"
32+ BINARY_TARBALL = "https://github.com/spack/spack-bootstrap-mirrors/releases/download/v0.5 /bootstrap-buildcache.tar.gz"
3333
3434#: Subdirectory where to create the mirror
3535LOCAL_MIRROR_DIR = "bootstrap_cache"
5151 },
5252}
5353
54- CLINGO_JSON = "$spack/share/spack/bootstrap/github-actions-v0.4 /clingo.json"
55- GNUPG_JSON = "$spack/share/spack/bootstrap/github-actions-v0.4 /gnupg.json"
56- PATCHELF_JSON = "$spack/share/spack/bootstrap/github-actions-v0.4 /patchelf.json"
54+ CLINGO_JSON = "$spack/share/spack/bootstrap/github-actions-v0.5 /clingo.json"
55+ GNUPG_JSON = "$spack/share/spack/bootstrap/github-actions-v0.5 /gnupg.json"
56+ PATCHELF_JSON = "$spack/share/spack/bootstrap/github-actions-v0.5 /patchelf.json"
5757
5858# Metadata for a generated source mirror
5959SOURCE_METADATA = {
@@ -437,6 +437,7 @@ def write_metadata(subdir, metadata):
437437 shutil .copy (spack .util .path .canonicalize_path (GNUPG_JSON ), abs_directory )
438438 shutil .copy (spack .util .path .canonicalize_path (PATCHELF_JSON ), abs_directory )
439439 instructions += cmd .format ("local-binaries" , rel_directory )
440+ instructions += " % spack buildcache update-index <final-path>/bootstrap_cache\n "
440441 print (instructions )
441442
442443
You can’t perform that action at this time.
0 commit comments