Compare commits
248 Commits
packages/p
...
wdconinc-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12ec16a43b | ||
|
|
89663c1fdb | ||
|
|
8b4be739af | ||
|
|
81e7601a79 | ||
|
|
f54055279b | ||
|
|
85378307f8 | ||
|
|
ec1016a0fc | ||
|
|
88b2db6f56 | ||
|
|
463a19eb5c | ||
|
|
db3bd7a053 | ||
|
|
369928200a | ||
|
|
81ed0f8d87 | ||
|
|
194b6311e9 | ||
|
|
8420898f79 | ||
|
|
f556ba46d9 | ||
|
|
ddaa9d5d81 | ||
|
|
b878fe5555 | ||
|
|
b600bfc779 | ||
|
|
612c289c41 | ||
|
|
e42c76cccf | ||
|
|
25013bacf2 | ||
|
|
3d554db198 | ||
|
|
b6def50dcb | ||
|
|
bf591c96bd | ||
|
|
edf1d2ec40 | ||
|
|
07f607ec9f | ||
|
|
93747c5e24 | ||
|
|
b746d4596a | ||
|
|
8814705936 | ||
|
|
c989541ebc | ||
|
|
1759ce05dd | ||
|
|
c0c1a4aea1 | ||
|
|
53353ae64e | ||
|
|
62f7a4c9b1 | ||
|
|
39679d0882 | ||
|
|
50e6bf9979 | ||
|
|
b874c31cc8 | ||
|
|
04baad90f5 | ||
|
|
1022527923 | ||
|
|
7ef19ec1d8 | ||
|
|
6e45b51f27 | ||
|
|
5f9cd0991b | ||
|
|
98c44fc351 | ||
|
|
b99f850c8e | ||
|
|
cbbd68d16b | ||
|
|
e4fbf99497 | ||
|
|
6a225d5405 | ||
|
|
af9fd82476 | ||
|
|
29c1152484 | ||
|
|
d6a8af6a1d | ||
|
|
3c3dad0a7a | ||
|
|
109efdff88 | ||
|
|
fa318e2c92 | ||
|
|
064e70990d | ||
|
|
c40139b7d6 | ||
|
|
c302e1a768 | ||
|
|
7171015f1c | ||
|
|
8ab6f33eb6 | ||
|
|
a66ab9cc6c | ||
|
|
70534ac9d4 | ||
|
|
b369d8b250 | ||
|
|
4d2319a785 | ||
|
|
d6a9511f39 | ||
|
|
dd69b646ad | ||
|
|
b670205e54 | ||
|
|
d6d8800466 | ||
|
|
7a32954f7f | ||
|
|
92564ecd42 | ||
|
|
c1258a1431 | ||
|
|
d46ac9b1e4 | ||
|
|
2e472a13e5 | ||
|
|
7edb525599 | ||
|
|
93cd216603 | ||
|
|
c1d385ada2 | ||
|
|
464390962f | ||
|
|
16734cd8c6 | ||
|
|
1dd9eeb0c6 | ||
|
|
f4ef0aec28 | ||
|
|
ea2c70a21a | ||
|
|
72ddc03da9 | ||
|
|
32de71b0b6 | ||
|
|
e94d5b935f | ||
|
|
85649be232 | ||
|
|
c23d2cdb2b | ||
|
|
dc5dd896a2 | ||
|
|
43f23589ef | ||
|
|
5085f635dd | ||
|
|
46da7952d3 | ||
|
|
72783bcb0a | ||
|
|
f4d2ff0068 | ||
|
|
a2b7fee3fe | ||
|
|
2ebf2df421 | ||
|
|
e725aa527e | ||
|
|
7455c8d173 | ||
|
|
99e2bce99f | ||
|
|
4204d16fd3 | ||
|
|
e76677cbd5 | ||
|
|
57357a540f | ||
|
|
97e0b39b32 | ||
|
|
247da9ea7a | ||
|
|
07f89a73d1 | ||
|
|
60cfdcb6cc | ||
|
|
1c9b042d3a | ||
|
|
c424611010 | ||
|
|
35963d7d7d | ||
|
|
7e62ca864a | ||
|
|
fa9ef0ac89 | ||
|
|
55d9fe20e5 | ||
|
|
434a8d54d4 | ||
|
|
7328c64fc7 | ||
|
|
4be7b98fd2 | ||
|
|
25ce6cce47 | ||
|
|
418a9194e7 | ||
|
|
d16a578242 | ||
|
|
aee2f5cf41 | ||
|
|
ca8ea63796 | ||
|
|
3b21ff109f | ||
|
|
d503f03473 | ||
|
|
770d2fe4d7 | ||
|
|
fcc35b70bb | ||
|
|
074387b29c | ||
|
|
4d26b93070 | ||
|
|
9d15a006f8 | ||
|
|
7e69650806 | ||
|
|
142469f92e | ||
|
|
cb6cb023d2 | ||
|
|
920614a799 | ||
|
|
5be40f1a5a | ||
|
|
aa0ab3b38b | ||
|
|
85c125a0f5 | ||
|
|
2842c6d191 | ||
|
|
e8309b16fc | ||
|
|
4dd55e1b67 | ||
|
|
227fa1a482 | ||
|
|
ee47d877ff | ||
|
|
4b4be2e2c2 | ||
|
|
0e6e61b32f | ||
|
|
79027884c7 | ||
|
|
beadf06caa | ||
|
|
fc24be5c2b | ||
|
|
8d5ece07d1 | ||
|
|
cf06b395b7 | ||
|
|
fd51f1ce65 | ||
|
|
0576ef081a | ||
|
|
20a8ba77b0 | ||
|
|
9b4c5d1c55 | ||
|
|
6622f7a89c | ||
|
|
d463b172a6 | ||
|
|
ab6fa2680f | ||
|
|
d7559c8caf | ||
|
|
bd1fedcc18 | ||
|
|
9254ef5b3f | ||
|
|
39ad98a359 | ||
|
|
9d07efa0dc | ||
|
|
de2caf956d | ||
|
|
6b296fe8ad | ||
|
|
9cccdc5424 | ||
|
|
b4f048cc14 | ||
|
|
5fd15dc541 | ||
|
|
0471af4c16 | ||
|
|
fb1a509964 | ||
|
|
4f00d7cc9b | ||
|
|
91726147ae | ||
|
|
7998d8ed52 | ||
|
|
1061db7c8c | ||
|
|
39f38d3f28 | ||
|
|
173dcd6be8 | ||
|
|
de2be4d999 | ||
|
|
619a0a8d81 | ||
|
|
598abf0bef | ||
|
|
99a63fdff2 | ||
|
|
64773932b2 | ||
|
|
bc4b5dd62e | ||
|
|
0652b01eca | ||
|
|
6053fc9b6e | ||
|
|
7c9582a172 | ||
|
|
2ffa63470c | ||
|
|
7bf7292a87 | ||
|
|
ef55fe7f4b | ||
|
|
6e8fe490e0 | ||
|
|
450e56f207 | ||
|
|
d33616c291 | ||
|
|
4a37bb38ce | ||
|
|
6f2d07e99a | ||
|
|
8f415cd2b5 | ||
|
|
e3d3e79037 | ||
|
|
dbd290d1ac | ||
|
|
e6bb795bcc | ||
|
|
ab6fa2f6d3 | ||
|
|
8fe3fe4918 | ||
|
|
cb770eb8e3 | ||
|
|
0a03a92e78 | ||
|
|
7f9019c1ca | ||
|
|
1b9d001f6a | ||
|
|
a52d817fa0 | ||
|
|
ec286e857f | ||
|
|
690a6045a9 | ||
|
|
0a070512e6 | ||
|
|
cb37f973d9 | ||
|
|
33740c8d24 | ||
|
|
e374f8fb66 | ||
|
|
0394def68b | ||
|
|
0782097775 | ||
|
|
460bc82632 | ||
|
|
880eb36a1f | ||
|
|
1f3b4e116f | ||
|
|
9b8835ba79 | ||
|
|
fb1d4f8907 | ||
|
|
f635337af8 | ||
|
|
8f145f5e8e | ||
|
|
022ae8503a | ||
|
|
3c64821c64 | ||
|
|
866785bd74 | ||
|
|
60d321012e | ||
|
|
8ee5cf4b31 | ||
|
|
d2a2ae3699 | ||
|
|
547e324ee5 | ||
|
|
693c74324a | ||
|
|
dcf710a32d | ||
|
|
38276d13c2 | ||
|
|
611b0f19b3 | ||
|
|
337d9bebf8 | ||
|
|
71512f5682 | ||
|
|
a7373b8a31 | ||
|
|
05de2b1ba1 | ||
|
|
f57d7fb952 | ||
|
|
e76f8fda2d | ||
|
|
66a00fe103 | ||
|
|
15124d7c73 | ||
|
|
a14f10e882 | ||
|
|
16d3de4540 | ||
|
|
78bd905fe0 | ||
|
|
e9cdcc4af0 | ||
|
|
aca469b329 | ||
|
|
c65a0e03c4 | ||
|
|
b02340724d | ||
|
|
250de0cdf2 | ||
|
|
da97e9eaa7 | ||
|
|
a3322459fe | ||
|
|
88d5393570 | ||
|
|
d1d61820f4 | ||
|
|
858c7ca1a2 | ||
|
|
5b1394f1cf | ||
|
|
9554f8802b | ||
|
|
b78c517582 | ||
|
|
aaf0319731 | ||
|
|
21d5fd6ec1 | ||
|
|
d6f71a2afd |
2
.github/workflows/bin/setup_git.ps1
vendored
2
.github/workflows/bin/setup_git.ps1
vendored
@@ -1,5 +1,3 @@
|
|||||||
# (c) 2022 Lawrence Livermore National Laboratory
|
|
||||||
|
|
||||||
git config --global user.email "spack@example.com"
|
git config --global user.email "spack@example.com"
|
||||||
git config --global user.name "Test User"
|
git config --global user.name "Test User"
|
||||||
git config --global core.longpaths true
|
git config --global core.longpaths true
|
||||||
|
|||||||
12
.github/workflows/bootstrap.yml
vendored
12
.github/workflows/bootstrap.yml
vendored
@@ -161,11 +161,7 @@ jobs:
|
|||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
spack -d gpg list
|
spack -d gpg list
|
||||||
tree $HOME/.spack/bootstrap/store/
|
tree $HOME/.spack/bootstrap/store/
|
||||||
- name: Bootstrap File
|
|
||||||
run: |
|
|
||||||
source share/spack/setup-env.sh
|
|
||||||
spack -d python share/spack/qa/bootstrap-file.py
|
|
||||||
tree $HOME/.spack/bootstrap/store/
|
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
runs-on: "windows-latest"
|
runs-on: "windows-latest"
|
||||||
@@ -196,9 +192,3 @@ jobs:
|
|||||||
spack -d gpg list
|
spack -d gpg list
|
||||||
./share/spack/qa/validate_last_exit.ps1
|
./share/spack/qa/validate_last_exit.ps1
|
||||||
tree $env:userprofile/.spack/bootstrap/store/
|
tree $env:userprofile/.spack/bootstrap/store/
|
||||||
- name: Bootstrap File
|
|
||||||
run: |
|
|
||||||
./share/spack/setup-env.ps1
|
|
||||||
spack -d python share/spack/qa/bootstrap-file.py
|
|
||||||
./share/spack/qa/validate_last_exit.ps1
|
|
||||||
tree $env:userprofile/.spack/bootstrap/store/
|
|
||||||
|
|||||||
2
.github/workflows/coverage.yml
vendored
2
.github/workflows/coverage.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
- run: coverage xml
|
- run: coverage xml
|
||||||
|
|
||||||
- name: "Upload coverage report to CodeCov"
|
- name: "Upload coverage report to CodeCov"
|
||||||
uses: codecov/codecov-action@05f5a9cfad807516dbbef9929c4a42df3eb78766
|
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303
|
||||||
with:
|
with:
|
||||||
verbose: true
|
verbose: true
|
||||||
fail_ci_if_error: false
|
fail_ci_if_error: false
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ black==24.10.0
|
|||||||
clingo==5.7.1
|
clingo==5.7.1
|
||||||
flake8==7.1.1
|
flake8==7.1.1
|
||||||
isort==5.13.2
|
isort==5.13.2
|
||||||
mypy==1.8.0
|
mypy==1.11.2
|
||||||
types-six==1.17.0.20241205
|
types-six==1.17.0.20241205
|
||||||
vermin==1.6.0
|
vermin==1.6.0
|
||||||
|
|||||||
2
.github/workflows/unit_tests.yaml
vendored
2
.github/workflows/unit_tests.yaml
vendored
@@ -140,7 +140,7 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
dnf install -y \
|
dnf install -y \
|
||||||
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
|
bzip2 curl gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
|
||||||
make patch tcl unzip which xz
|
make patch tcl unzip which xz
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- name: Setup repo and non-root user
|
- name: Setup repo and non-root user
|
||||||
|
|||||||
6
.github/workflows/valid-style.yml
vendored
6
.github/workflows/valid-style.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.13'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
- name: Install Python Packages
|
- name: Install Python Packages
|
||||||
run: |
|
run: |
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.13'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
run: |
|
run: |
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
with_coverage: ${{ inputs.with_coverage }}
|
with_coverage: ${{ inputs.with_coverage }}
|
||||||
python_version: '3.11'
|
python_version: '3.13'
|
||||||
# Check that spack can bootstrap the development environment on Python 3.6 - RHEL8
|
# Check that spack can bootstrap the development environment on Python 3.6 - RHEL8
|
||||||
bootstrap-dev-rhel8:
|
bootstrap-dev-rhel8:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ or http://www.apache.org/licenses/LICENSE-2.0) or the MIT license,
|
|||||||
Copyrights and patents in the Spack project are retained by contributors.
|
Copyrights and patents in the Spack project are retained by contributors.
|
||||||
No copyright assignment is required to contribute to Spack.
|
No copyright assignment is required to contribute to Spack.
|
||||||
|
|
||||||
Spack was originally distributed under the LGPL-2.1 license. Consent from
|
Spack was originally developed in 2013 by Lawrence Livermore National
|
||||||
contributors to relicense to Apache-2.0/MIT is documented at
|
Security, LLC. It was originally distributed under the LGPL-2.1 license.
|
||||||
|
Consent from contributors to relicense to Apache-2.0/MIT is documented at
|
||||||
https://github.com/spack/spack/issues/9137.
|
https://github.com/spack/spack/issues/9137.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2013-2024 LLNS, LLC and other Spack Project Developers.
|
Copyright (c) Spack Project Developers.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright sbang project developers. See COPYRIGHT file for details.
|
||||||
# sbang project developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- python -*-
|
# -*- python -*-
|
||||||
#
|
#
|
||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
:: Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
:: Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
:: Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
::
|
::
|
||||||
:: SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
:: SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
::#######################################################################
|
::#######################################################################
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
# #######################################################################
|
# #######################################################################
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ packages:
|
|||||||
unwind: [libunwind]
|
unwind: [libunwind]
|
||||||
uuid: [util-linux-uuid, libuuid]
|
uuid: [util-linux-uuid, libuuid]
|
||||||
wasi-sdk: [wasi-sdk-prebuilt]
|
wasi-sdk: [wasi-sdk-prebuilt]
|
||||||
|
xkbdata-api: [xkeyboard-config, xkbdata]
|
||||||
xxd: [xxd-standalone, vim]
|
xxd: [xxd-standalone, vim]
|
||||||
yacc: [bison, byacc]
|
yacc: [bison, byacc]
|
||||||
ziglang: [zig]
|
ziglang: [zig]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -26,14 +25,23 @@ These settings can be overridden in ``etc/spack/config.yaml`` or
|
|||||||
The location where Spack will install packages and their dependencies.
|
The location where Spack will install packages and their dependencies.
|
||||||
Default is ``$spack/opt/spack``.
|
Default is ``$spack/opt/spack``.
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------
|
||||||
``install_hash_length`` and ``install_path_scheme``
|
``projections``
|
||||||
---------------------------------------------------
|
---------------
|
||||||
|
|
||||||
The default Spack installation path can be very long and can create problems
|
.. warning::
|
||||||
for scripts with hardcoded shebangs. Additionally, when using the Intel
|
|
||||||
compiler, and if there is also a long list of dependencies, the compiler may
|
Modifying projections of the install tree is strongly discouraged.
|
||||||
segfault. If you see the following:
|
|
||||||
|
By default Spack installs all packages into a unique directory relative to the install
|
||||||
|
tree root with the following layout:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}
|
||||||
|
|
||||||
|
In very rare cases, it may be necessary to reduce the length of this path. For example,
|
||||||
|
very old versions of the Intel compiler are known to segfault when input paths are too long:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
@@ -41,36 +49,25 @@ segfault. If you see the following:
|
|||||||
** Segmentation violation signal raised. **
|
** Segmentation violation signal raised. **
|
||||||
Access violation or stack overflow. Please contact Intel Support for assistance.
|
Access violation or stack overflow. Please contact Intel Support for assistance.
|
||||||
|
|
||||||
it may be because variables containing dependency specs may be too long. There
|
Another case is Python and R packages with many runtime dependencies, which can result
|
||||||
are two parameters to help with long path names. Firstly, the
|
in very large ``PYTHONPATH`` and ``R_LIBS`` environment variables. This can cause the
|
||||||
``install_hash_length`` parameter can set the length of the hash in the
|
``execve`` system call to fail with ``E2BIG``, preventing processes from starting.
|
||||||
installation path from 1 to 32. The default path uses the full 32 characters.
|
|
||||||
|
|
||||||
Secondly, it is also possible to modify the entire installation
|
For this reason, Spack allows users to modify the installation layout through custom
|
||||||
scheme. By default Spack uses
|
projections. For example
|
||||||
``{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}``
|
|
||||||
where the tokens that are available for use in this directive are the
|
|
||||||
same as those understood by the :meth:`~spack.spec.Spec.format`
|
|
||||||
method. Using this parameter it is possible to use a different package
|
|
||||||
layout or reduce the depth of the installation paths. For example
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
config:
|
config:
|
||||||
install_path_scheme: '{name}/{version}/{hash:7}'
|
install_tree:
|
||||||
|
root: $spack/opt/spack
|
||||||
|
projections:
|
||||||
|
all: "{name}/{version}/{hash:16}"
|
||||||
|
|
||||||
would install packages into sub-directories using only the package
|
would install packages into sub-directories using only the package name, version and a
|
||||||
name, version and a hash length of 7 characters.
|
hash length of 16 characters.
|
||||||
|
|
||||||
When using either parameter to set the hash length it only affects the
|
Notice that reducing the hash length increases the likelihood of hash collisions.
|
||||||
representation of the hash in the installation directory. You
|
|
||||||
should be aware that the smaller the hash length the more likely
|
|
||||||
naming conflicts will occur. These parameters are independent of those
|
|
||||||
used to configure module names.
|
|
||||||
|
|
||||||
.. warning:: Modifying the installation hash length or path scheme after
|
|
||||||
packages have been installed will prevent Spack from being
|
|
||||||
able to find the old installation directories.
|
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
``build_stage``
|
``build_stage``
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -35,7 +34,7 @@ A build matrix showing which packages are working on which systems is shown belo
|
|||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
apt update
|
apt update
|
||||||
apt install bzip2 ca-certificates file g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd
|
apt install bzip2 ca-certificates g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd
|
||||||
|
|
||||||
.. tab-item:: RHEL
|
.. tab-item:: RHEL
|
||||||
|
|
||||||
@@ -148,20 +147,22 @@ The first time you concretize a spec, Spack will bootstrap automatically:
|
|||||||
--------------------------------
|
--------------------------------
|
||||||
zlib@1.2.13%gcc@9.4.0+optimize+pic+shared build_system=makefile arch=linux-ubuntu20.04-icelake
|
zlib@1.2.13%gcc@9.4.0+optimize+pic+shared build_system=makefile arch=linux-ubuntu20.04-icelake
|
||||||
|
|
||||||
|
The default bootstrap behavior is to use pre-built binaries. You can verify the
|
||||||
|
active bootstrap repositories with:
|
||||||
|
|
||||||
|
.. command-output:: spack bootstrap list
|
||||||
|
|
||||||
If for security concerns you cannot bootstrap ``clingo`` from pre-built
|
If for security concerns you cannot bootstrap ``clingo`` from pre-built
|
||||||
binaries, you have to disable fetching the binaries we generated with Github Actions.
|
binaries, you have to disable fetching the binaries we generated with Github Actions.
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack bootstrap disable github-actions-v0.4
|
$ spack bootstrap disable github-actions-v0.6
|
||||||
==> "github-actions-v0.4" is now disabled and will not be used for bootstrapping
|
==> "github-actions-v0.6" is now disabled and will not be used for bootstrapping
|
||||||
$ spack bootstrap disable github-actions-v0.3
|
$ spack bootstrap disable github-actions-v0.5
|
||||||
==> "github-actions-v0.3" is now disabled and will not be used for bootstrapping
|
==> "github-actions-v0.5" is now disabled and will not be used for bootstrapping
|
||||||
|
|
||||||
You can verify that the new settings are effective with:
|
|
||||||
|
|
||||||
.. command-output:: spack bootstrap list
|
|
||||||
|
|
||||||
|
You can verify that the new settings are effective with ``spack bootstrap list``.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -237,8 +236,7 @@ for details):
|
|||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -4900,15 +4898,15 @@ If your package has a virtual dependency like ``mpi``, then referring to
|
|||||||
``spec["mpi"]`` within ``install()`` will get you the concrete ``mpi``
|
``spec["mpi"]`` within ``install()`` will get you the concrete ``mpi``
|
||||||
implementation in your dependency DAG. That is a spec object just like
|
implementation in your dependency DAG. That is a spec object just like
|
||||||
the one passed to install, only the MPI implementations all set some
|
the one passed to install, only the MPI implementations all set some
|
||||||
additional properties on it to help you out. E.g., in mvapich2, you'll
|
additional properties on it to help you out. E.g., in openmpi, you'll
|
||||||
find this:
|
find this:
|
||||||
|
|
||||||
.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/mvapich2/package.py
|
.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/openmpi/package.py
|
||||||
:pyobject: Mvapich2.setup_dependent_package
|
:pyobject: Openmpi.setup_dependent_package
|
||||||
|
|
||||||
That code allows the mvapich2 package to associate an ``mpicc`` property
|
That code allows the ``openmpi`` package to associate an ``mpicc`` property
|
||||||
with the ``mvapich2`` node in the DAG, so that dependents can access it.
|
with the ``openmpi`` node in the DAG, so that dependents can access it.
|
||||||
``openmpi`` and ``mpich`` do similar things. So, no matter what MPI
|
``mvapich2`` and ``mpich`` do similar things. So, no matter what MPI
|
||||||
you're using, spec["mpi"].mpicc gets you the location of the MPI
|
you're using, spec["mpi"].mpicc gets you the location of the MPI
|
||||||
compilers. This allows us to have a fairly simple polymorphic interface
|
compilers. This allows us to have a fairly simple polymorphic interface
|
||||||
for information about virtual dependencies like MPI.
|
for information about virtual dependencies like MPI.
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ sphinx_design==0.6.1
|
|||||||
sphinx-rtd-theme==3.0.2
|
sphinx-rtd-theme==3.0.2
|
||||||
python-levenshtein==0.26.1
|
python-levenshtein==0.26.1
|
||||||
docutils==0.21.2
|
docutils==0.21.2
|
||||||
pygments==2.18.0
|
pygments==2.19.1
|
||||||
urllib3==2.2.3
|
urllib3==2.3.0
|
||||||
pytest==8.3.4
|
pytest==8.3.4
|
||||||
isort==5.13.2
|
isort==5.13.2
|
||||||
black==24.10.0
|
black==24.10.0
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ unzip, , , Compress/Decompress archives
|
|||||||
bzip2, , , Compress/Decompress archives
|
bzip2, , , Compress/Decompress archives
|
||||||
xz, , , Compress/Decompress archives
|
xz, , , Compress/Decompress archives
|
||||||
zstd, , Optional, Compress/Decompress archives
|
zstd, , Optional, Compress/Decompress archives
|
||||||
file, , , Create/Use Buildcaches
|
|
||||||
lsb-release, , , Linux: identify operating system version
|
lsb-release, , , Linux: identify operating system version
|
||||||
gnupg2, , , Sign/Verify Buildcaches
|
gnupg2, , , Sign/Verify Buildcaches
|
||||||
git, , , Manage Software Repositories
|
git, , , Manage Software Repositories
|
||||||
|
|||||||
|
3
lib/spack/env/cc
vendored
3
lib/spack/env/cc
vendored
@@ -1,8 +1,7 @@
|
|||||||
#!/bin/sh -f
|
#!/bin/sh -f
|
||||||
# shellcheck disable=SC2034 # evals in this script fool shellcheck
|
# shellcheck disable=SC2034 # evals in this script fool shellcheck
|
||||||
#
|
#
|
||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
3
lib/spack/external/__init__.py
vendored
3
lib/spack/external/__init__.py
vendored
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""Path primitives that just require Python standard library."""
|
"""Path primitives that just require Python standard library."""
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""String manipulation functions that do not have other dependencies than Python
|
"""String manipulation functions that do not have other dependencies than Python
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""URL primitives that just require Python standard library."""
|
"""URL primitives that just require Python standard library."""
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
import collections
|
import collections
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -863,8 +862,10 @@ def elide_list(line_list: List[str], max_num: int = 10) -> List[str]:
|
|||||||
|
|
||||||
if sys.version_info >= (3, 9):
|
if sys.version_info >= (3, 9):
|
||||||
PatternStr = re.Pattern[str]
|
PatternStr = re.Pattern[str]
|
||||||
|
PatternBytes = re.Pattern[bytes]
|
||||||
else:
|
else:
|
||||||
PatternStr = typing.Pattern[str]
|
PatternStr = typing.Pattern[str]
|
||||||
|
PatternBytes = typing.Pattern[bytes]
|
||||||
|
|
||||||
|
|
||||||
def fnmatch_translate_multiple(named_patterns: Dict[str, str]) -> str:
|
def fnmatch_translate_multiple(named_patterns: Dict[str, str]) -> str:
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""Classes and functions to register audit checks for various parts of
|
"""Classes and functions to register audit checks for various parts of
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -24,13 +23,12 @@
|
|||||||
import urllib.request
|
import urllib.request
|
||||||
import warnings
|
import warnings
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple, Union
|
from typing import IO, Dict, Iterable, List, NamedTuple, Optional, Set, Tuple, Union
|
||||||
|
|
||||||
import llnl.util.filesystem as fsys
|
import llnl.util.filesystem as fsys
|
||||||
import llnl.util.lang
|
import llnl.util.lang
|
||||||
import llnl.util.tty as tty
|
import llnl.util.tty as tty
|
||||||
from llnl.util.filesystem import BaseDirectoryVisitor, mkdirp, visit_directory_tree
|
from llnl.util.filesystem import mkdirp
|
||||||
from llnl.util.symlink import readlink
|
|
||||||
|
|
||||||
import spack.caches
|
import spack.caches
|
||||||
import spack.config as config
|
import spack.config as config
|
||||||
@@ -54,7 +52,6 @@
|
|||||||
import spack.util.archive
|
import spack.util.archive
|
||||||
import spack.util.crypto
|
import spack.util.crypto
|
||||||
import spack.util.file_cache as file_cache
|
import spack.util.file_cache as file_cache
|
||||||
import spack.util.filesystem as ssys
|
|
||||||
import spack.util.gpg
|
import spack.util.gpg
|
||||||
import spack.util.parallel
|
import spack.util.parallel
|
||||||
import spack.util.path
|
import spack.util.path
|
||||||
@@ -587,173 +584,39 @@ def read_buildinfo_file(prefix):
|
|||||||
return syaml.load(f)
|
return syaml.load(f)
|
||||||
|
|
||||||
|
|
||||||
class BuildManifestVisitor(BaseDirectoryVisitor):
|
def file_matches(f: IO[bytes], regex: llnl.util.lang.PatternBytes) -> bool:
|
||||||
"""Visitor that collects a list of files and symlinks
|
try:
|
||||||
that can be checked for need of relocation. It knows how
|
return bool(regex.search(f.read()))
|
||||||
to dedupe hardlinks and deal with symlinks to files and
|
finally:
|
||||||
directories."""
|
f.seek(0)
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
# Save unique identifiers of hardlinks to avoid relocating them multiple times
|
|
||||||
self.visited = set()
|
|
||||||
|
|
||||||
# Lists of files we will check
|
|
||||||
self.files = []
|
|
||||||
self.symlinks = []
|
|
||||||
|
|
||||||
def seen_before(self, root, rel_path):
|
|
||||||
stat_result = os.lstat(os.path.join(root, rel_path))
|
|
||||||
if stat_result.st_nlink == 1:
|
|
||||||
return False
|
|
||||||
identifier = (stat_result.st_dev, stat_result.st_ino)
|
|
||||||
if identifier in self.visited:
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
self.visited.add(identifier)
|
|
||||||
return False
|
|
||||||
|
|
||||||
def visit_file(self, root, rel_path, depth):
|
|
||||||
if self.seen_before(root, rel_path):
|
|
||||||
return
|
|
||||||
self.files.append(rel_path)
|
|
||||||
|
|
||||||
def visit_symlinked_file(self, root, rel_path, depth):
|
|
||||||
# Note: symlinks *can* be hardlinked, but it is unclear if
|
|
||||||
# symlinks can be relinked in-place (preserving inode).
|
|
||||||
# Therefore, we do *not* de-dupe hardlinked symlinks.
|
|
||||||
self.symlinks.append(rel_path)
|
|
||||||
|
|
||||||
def before_visit_dir(self, root, rel_path, depth):
|
|
||||||
return os.path.basename(rel_path) not in (".spack", "man")
|
|
||||||
|
|
||||||
def before_visit_symlinked_dir(self, root, rel_path, depth):
|
|
||||||
# Treat symlinked directories simply as symlinks.
|
|
||||||
self.visit_symlinked_file(root, rel_path, depth)
|
|
||||||
# Never recurse into symlinked directories.
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def file_matches(path, regex):
|
def specs_to_relocate(spec: spack.spec.Spec) -> List[spack.spec.Spec]:
|
||||||
with open(path, "rb") as f:
|
"""Return the set of specs that may be referenced in the install prefix of the provided spec.
|
||||||
contents = f.read()
|
We currently include non-external transitive link and direct run dependencies."""
|
||||||
return bool(regex.search(contents))
|
specs = [
|
||||||
|
|
||||||
|
|
||||||
def get_buildfile_manifest(spec):
|
|
||||||
"""
|
|
||||||
Return a data structure with information about a build, including
|
|
||||||
text_to_relocate, binary_to_relocate, binary_to_relocate_fullpath
|
|
||||||
link_to_relocate, and other, which means it doesn't fit any of previous
|
|
||||||
checks (and should not be relocated). We exclude docs (man) and
|
|
||||||
metadata (.spack). This can be used to find a particular kind of file
|
|
||||||
in spack, or to generate the build metadata.
|
|
||||||
"""
|
|
||||||
data = {
|
|
||||||
"text_to_relocate": [],
|
|
||||||
"binary_to_relocate": [],
|
|
||||||
"link_to_relocate": [],
|
|
||||||
"other": [],
|
|
||||||
"binary_to_relocate_fullpath": [],
|
|
||||||
"hardlinks_deduped": True,
|
|
||||||
}
|
|
||||||
|
|
||||||
# Guard against filesystem footguns of hardlinks and symlinks by using
|
|
||||||
# a visitor to retrieve a list of files and symlinks, so we don't have
|
|
||||||
# to worry about hardlinks of symlinked dirs and what not.
|
|
||||||
visitor = BuildManifestVisitor()
|
|
||||||
root = spec.prefix
|
|
||||||
visit_directory_tree(root, visitor)
|
|
||||||
|
|
||||||
# Collect a list of prefixes for this package and it's dependencies, Spack will
|
|
||||||
# look for them to decide if text file needs to be relocated or not
|
|
||||||
prefixes = [d.prefix for d in spec.traverse(root=True, deptype="all") if not d.external]
|
|
||||||
prefixes.append(spack.hooks.sbang.sbang_install_path())
|
|
||||||
prefixes.append(str(spack.store.STORE.layout.root))
|
|
||||||
|
|
||||||
# Create a giant regex that matches all prefixes
|
|
||||||
regex = utf8_paths_to_single_binary_regex(prefixes)
|
|
||||||
|
|
||||||
# Symlinks.
|
|
||||||
|
|
||||||
# Obvious bugs:
|
|
||||||
# 1. relative links are not relocated.
|
|
||||||
# 2. paths are used as strings.
|
|
||||||
for rel_path in visitor.symlinks:
|
|
||||||
abs_path = os.path.join(root, rel_path)
|
|
||||||
link = readlink(abs_path)
|
|
||||||
if os.path.isabs(link) and link.startswith(spack.store.STORE.layout.root):
|
|
||||||
data["link_to_relocate"].append(rel_path)
|
|
||||||
|
|
||||||
# Non-symlinks.
|
|
||||||
for rel_path in visitor.files:
|
|
||||||
abs_path = os.path.join(root, rel_path)
|
|
||||||
m_type, m_subtype = ssys.mime_type(abs_path)
|
|
||||||
|
|
||||||
if relocate.needs_binary_relocation(m_type, m_subtype):
|
|
||||||
# Why is this branch not part of needs_binary_relocation? :(
|
|
||||||
if (
|
|
||||||
(
|
|
||||||
m_subtype in ("x-executable", "x-sharedlib", "x-pie-executable")
|
|
||||||
and sys.platform != "darwin"
|
|
||||||
)
|
|
||||||
or (m_subtype in ("x-mach-binary") and sys.platform == "darwin")
|
|
||||||
or (not rel_path.endswith(".o"))
|
|
||||||
):
|
|
||||||
data["binary_to_relocate"].append(rel_path)
|
|
||||||
data["binary_to_relocate_fullpath"].append(abs_path)
|
|
||||||
continue
|
|
||||||
|
|
||||||
elif relocate.needs_text_relocation(m_type, m_subtype) and file_matches(abs_path, regex):
|
|
||||||
data["text_to_relocate"].append(rel_path)
|
|
||||||
continue
|
|
||||||
|
|
||||||
data["other"].append(abs_path)
|
|
||||||
|
|
||||||
return data
|
|
||||||
|
|
||||||
|
|
||||||
def deps_to_relocate(spec):
|
|
||||||
"""Return the transitive link and direct run dependencies of the spec.
|
|
||||||
|
|
||||||
This is a special traversal for dependencies we need to consider when relocating a package.
|
|
||||||
|
|
||||||
Package binaries, scripts, and other files may refer to the prefixes of dependencies, so
|
|
||||||
we need to rewrite those locations when dependencies are in a different place at install time
|
|
||||||
than they were at build time.
|
|
||||||
|
|
||||||
This traversal covers transitive link dependencies and direct run dependencies because:
|
|
||||||
|
|
||||||
1. Spack adds RPATHs for transitive link dependencies so that packages can find needed
|
|
||||||
dependency libraries.
|
|
||||||
2. Packages may call any of their *direct* run dependencies (and may bake their paths into
|
|
||||||
binaries or scripts), so we also need to search for run dependency prefixes when relocating.
|
|
||||||
|
|
||||||
This returns a deduplicated list of transitive link dependencies and direct run dependencies.
|
|
||||||
"""
|
|
||||||
deps = [
|
|
||||||
s
|
s
|
||||||
for s in itertools.chain(
|
for s in itertools.chain(
|
||||||
spec.traverse(root=True, deptype="link"), spec.dependencies(deptype="run")
|
spec.traverse(root=True, deptype="link", order="breadth", key=traverse.by_dag_hash),
|
||||||
|
spec.dependencies(deptype="run"),
|
||||||
)
|
)
|
||||||
if not s.external
|
if not s.external
|
||||||
]
|
]
|
||||||
return llnl.util.lang.dedupe(deps, key=lambda s: s.dag_hash())
|
return list(llnl.util.lang.dedupe(specs, key=lambda s: s.dag_hash()))
|
||||||
|
|
||||||
|
|
||||||
def get_buildinfo_dict(spec):
|
def get_buildinfo_dict(spec):
|
||||||
"""Create metadata for a tarball"""
|
"""Create metadata for a tarball"""
|
||||||
manifest = get_buildfile_manifest(spec)
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"sbang_install_path": spack.hooks.sbang.sbang_install_path(),
|
"sbang_install_path": spack.hooks.sbang.sbang_install_path(),
|
||||||
"buildpath": spack.store.STORE.layout.root,
|
"buildpath": spack.store.STORE.layout.root,
|
||||||
"spackprefix": spack.paths.prefix,
|
"spackprefix": spack.paths.prefix,
|
||||||
"relative_prefix": os.path.relpath(spec.prefix, spack.store.STORE.layout.root),
|
"relative_prefix": os.path.relpath(spec.prefix, spack.store.STORE.layout.root),
|
||||||
"relocate_textfiles": manifest["text_to_relocate"],
|
# "relocate_textfiles": [],
|
||||||
"relocate_binaries": manifest["binary_to_relocate"],
|
# "relocate_binaries": [],
|
||||||
"relocate_links": manifest["link_to_relocate"],
|
# "relocate_links": [],
|
||||||
"hardlinks_deduped": manifest["hardlinks_deduped"],
|
"hardlinks_deduped": True,
|
||||||
"hash_to_prefix": {d.dag_hash(): str(d.prefix) for d in deps_to_relocate(spec)},
|
"hash_to_prefix": {d.dag_hash(): str(d.prefix) for d in specs_to_relocate(spec)},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1042,7 +905,55 @@ def generate_key_index(key_prefix: str, tmpdir: str) -> None:
|
|||||||
) from e
|
) from e
|
||||||
|
|
||||||
|
|
||||||
def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None:
|
class FileTypes:
|
||||||
|
BINARY = 0
|
||||||
|
TEXT = 1
|
||||||
|
UNKNOWN = 2
|
||||||
|
|
||||||
|
|
||||||
|
NOT_ISO8859_1_TEXT = re.compile(b"[\x00\x7F-\x9F]")
|
||||||
|
|
||||||
|
|
||||||
|
def file_type(f: IO[bytes]) -> int:
|
||||||
|
try:
|
||||||
|
# first check if this is an ELF or mach-o binary.
|
||||||
|
magic = f.read(8)
|
||||||
|
if len(magic) < 8:
|
||||||
|
return FileTypes.UNKNOWN
|
||||||
|
elif relocate.is_elf_magic(magic) or relocate.is_macho_magic(magic):
|
||||||
|
return FileTypes.BINARY
|
||||||
|
|
||||||
|
f.seek(0)
|
||||||
|
|
||||||
|
# Then try utf-8, which has a fast exponential decay in false positive rate with file size.
|
||||||
|
# Use chunked reads for fast early exit.
|
||||||
|
f_txt = io.TextIOWrapper(f, encoding="utf-8", errors="strict")
|
||||||
|
try:
|
||||||
|
while f_txt.read(1024):
|
||||||
|
pass
|
||||||
|
return FileTypes.TEXT
|
||||||
|
except UnicodeError:
|
||||||
|
f_txt.seek(0)
|
||||||
|
pass
|
||||||
|
finally:
|
||||||
|
f_txt.detach()
|
||||||
|
# Finally try iso-8859-1 heuristically. In Python, all possible 256 byte values are valid.
|
||||||
|
# We classify it as text if it does not contain any control characters / null bytes.
|
||||||
|
data = f.read(1024)
|
||||||
|
while data:
|
||||||
|
if NOT_ISO8859_1_TEXT.search(data):
|
||||||
|
break
|
||||||
|
data = f.read(1024)
|
||||||
|
else:
|
||||||
|
return FileTypes.TEXT
|
||||||
|
return FileTypes.UNKNOWN
|
||||||
|
finally:
|
||||||
|
f.seek(0)
|
||||||
|
|
||||||
|
|
||||||
|
def tarfile_of_spec_prefix(
|
||||||
|
tar: tarfile.TarFile, prefix: str, prefixes_to_relocate: List[str]
|
||||||
|
) -> dict:
|
||||||
"""Create a tarfile of an install prefix of a spec. Skips existing buildinfo file.
|
"""Create a tarfile of an install prefix of a spec. Skips existing buildinfo file.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@@ -1058,6 +969,33 @@ def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None:
|
|||||||
except OSError:
|
except OSError:
|
||||||
skip = lambda entry: False
|
skip = lambda entry: False
|
||||||
|
|
||||||
|
binary_regex = utf8_paths_to_single_binary_regex(prefixes_to_relocate)
|
||||||
|
|
||||||
|
relocate_binaries = []
|
||||||
|
relocate_links = []
|
||||||
|
relocate_textfiles = []
|
||||||
|
|
||||||
|
# use callbacks to add files and symlinks, so we can register which files need relocation upon
|
||||||
|
# extraction.
|
||||||
|
def add_file(tar: tarfile.TarFile, info: tarfile.TarInfo, path: str):
|
||||||
|
with open(path, "rb") as f:
|
||||||
|
relpath = os.path.relpath(path, prefix)
|
||||||
|
# no need to relocate anything in the .spack directory
|
||||||
|
if relpath.split(os.sep, 1)[0] == ".spack":
|
||||||
|
tar.addfile(info, f)
|
||||||
|
return
|
||||||
|
f_type = file_type(f)
|
||||||
|
if f_type == FileTypes.BINARY:
|
||||||
|
relocate_binaries.append(os.path.relpath(path, prefix))
|
||||||
|
elif f_type == FileTypes.TEXT and file_matches(f, binary_regex):
|
||||||
|
relocate_textfiles.append(os.path.relpath(path, prefix))
|
||||||
|
tar.addfile(info, f)
|
||||||
|
|
||||||
|
def add_symlink(tar: tarfile.TarFile, info: tarfile.TarInfo, path: str):
|
||||||
|
if os.path.isabs(info.linkname) and binary_regex.match(info.linkname.encode("utf-8")):
|
||||||
|
relocate_links.append(os.path.relpath(path, prefix))
|
||||||
|
tar.addfile(info)
|
||||||
|
|
||||||
spack.util.archive.reproducible_tarfile_from_prefix(
|
spack.util.archive.reproducible_tarfile_from_prefix(
|
||||||
tar,
|
tar,
|
||||||
prefix,
|
prefix,
|
||||||
@@ -1065,29 +1003,51 @@ def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None:
|
|||||||
# used in runtimes like AWS lambda.
|
# used in runtimes like AWS lambda.
|
||||||
include_parent_directories=True,
|
include_parent_directories=True,
|
||||||
skip=skip,
|
skip=skip,
|
||||||
|
add_file=add_file,
|
||||||
|
add_symlink=add_symlink,
|
||||||
|
)
|
||||||
|
|
||||||
|
return {
|
||||||
|
"relocate_binaries": relocate_binaries,
|
||||||
|
"relocate_links": relocate_links,
|
||||||
|
"relocate_textfiles": relocate_textfiles,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def create_tarball(spec: spack.spec.Spec, tarfile_path: str) -> Tuple[str, str]:
|
||||||
|
"""Create a tarball of a spec and return the checksums of the compressed tarfile and the
|
||||||
|
uncompressed tarfile."""
|
||||||
|
return _do_create_tarball(
|
||||||
|
tarfile_path,
|
||||||
|
spec.prefix,
|
||||||
|
buildinfo=get_buildinfo_dict(spec),
|
||||||
|
prefixes_to_relocate=prefixes_to_relocate(spec),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _do_create_tarball(tarfile_path: str, binaries_dir: str, buildinfo: dict):
|
def _do_create_tarball(
|
||||||
|
tarfile_path: str, prefix: str, buildinfo: dict, prefixes_to_relocate: List[str]
|
||||||
|
) -> Tuple[str, str]:
|
||||||
with spack.util.archive.gzip_compressed_tarfile(tarfile_path) as (
|
with spack.util.archive.gzip_compressed_tarfile(tarfile_path) as (
|
||||||
tar,
|
tar,
|
||||||
inner_checksum,
|
tar_gz_checksum,
|
||||||
outer_checksum,
|
tar_checksum,
|
||||||
):
|
):
|
||||||
# Tarball the install prefix
|
# Tarball the install prefix
|
||||||
tarfile_of_spec_prefix(tar, binaries_dir)
|
files_to_relocate = tarfile_of_spec_prefix(tar, prefix, prefixes_to_relocate)
|
||||||
|
buildinfo.update(files_to_relocate)
|
||||||
|
|
||||||
# Serialize buildinfo for the tarball
|
# Serialize buildinfo for the tarball
|
||||||
bstring = syaml.dump(buildinfo, default_flow_style=True).encode("utf-8")
|
bstring = syaml.dump(buildinfo, default_flow_style=True).encode("utf-8")
|
||||||
tarinfo = tarfile.TarInfo(
|
tarinfo = tarfile.TarInfo(
|
||||||
name=spack.util.archive.default_path_to_name(buildinfo_file_name(binaries_dir))
|
name=spack.util.archive.default_path_to_name(buildinfo_file_name(prefix))
|
||||||
)
|
)
|
||||||
tarinfo.type = tarfile.REGTYPE
|
tarinfo.type = tarfile.REGTYPE
|
||||||
tarinfo.size = len(bstring)
|
tarinfo.size = len(bstring)
|
||||||
tarinfo.mode = 0o644
|
tarinfo.mode = 0o644
|
||||||
tar.addfile(tarinfo, io.BytesIO(bstring))
|
tar.addfile(tarinfo, io.BytesIO(bstring))
|
||||||
|
|
||||||
return inner_checksum.hexdigest(), outer_checksum.hexdigest()
|
return tar_gz_checksum.hexdigest(), tar_checksum.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
class ExistsInBuildcache(NamedTuple):
|
class ExistsInBuildcache(NamedTuple):
|
||||||
@@ -1137,6 +1097,13 @@ def _exists_in_buildcache(spec: spack.spec.Spec, tmpdir: str, out_url: str) -> E
|
|||||||
return ExistsInBuildcache(signed, unsigned, tarball)
|
return ExistsInBuildcache(signed, unsigned, tarball)
|
||||||
|
|
||||||
|
|
||||||
|
def prefixes_to_relocate(spec):
|
||||||
|
prefixes = [s.prefix for s in specs_to_relocate(spec)]
|
||||||
|
prefixes.append(spack.hooks.sbang.sbang_install_path())
|
||||||
|
prefixes.append(str(spack.store.STORE.layout.root))
|
||||||
|
return prefixes
|
||||||
|
|
||||||
|
|
||||||
def _url_upload_tarball_and_specfile(
|
def _url_upload_tarball_and_specfile(
|
||||||
spec: spack.spec.Spec,
|
spec: spack.spec.Spec,
|
||||||
tmpdir: str,
|
tmpdir: str,
|
||||||
@@ -1146,7 +1113,7 @@ def _url_upload_tarball_and_specfile(
|
|||||||
):
|
):
|
||||||
files = BuildcacheFiles(spec, tmpdir, out_url)
|
files = BuildcacheFiles(spec, tmpdir, out_url)
|
||||||
tarball = files.local_tarball()
|
tarball = files.local_tarball()
|
||||||
checksum, _ = _do_create_tarball(tarball, spec.prefix, get_buildinfo_dict(spec))
|
checksum, _ = create_tarball(spec, tarball)
|
||||||
spec_dict = spec.to_dict(hash=ht.dag_hash)
|
spec_dict = spec.to_dict(hash=ht.dag_hash)
|
||||||
spec_dict["buildcache_layout_version"] = CURRENT_BUILD_CACHE_LAYOUT_VERSION
|
spec_dict["buildcache_layout_version"] = CURRENT_BUILD_CACHE_LAYOUT_VERSION
|
||||||
spec_dict["binary_cache_checksum"] = {"hash_algorithm": "sha256", "hash": checksum}
|
spec_dict["binary_cache_checksum"] = {"hash_algorithm": "sha256", "hash": checksum}
|
||||||
@@ -1470,13 +1437,11 @@ def _oci_push_pkg_blob(
|
|||||||
filename = os.path.join(tmpdir, f"{spec.dag_hash()}.tar.gz")
|
filename = os.path.join(tmpdir, f"{spec.dag_hash()}.tar.gz")
|
||||||
|
|
||||||
# Create an oci.image.layer aka tarball of the package
|
# Create an oci.image.layer aka tarball of the package
|
||||||
compressed_tarfile_checksum, tarfile_checksum = _do_create_tarball(
|
tar_gz_checksum, tar_checksum = create_tarball(spec, filename)
|
||||||
filename, spec.prefix, get_buildinfo_dict(spec)
|
|
||||||
)
|
|
||||||
|
|
||||||
blob = spack.oci.oci.Blob(
|
blob = spack.oci.oci.Blob(
|
||||||
Digest.from_sha256(compressed_tarfile_checksum),
|
Digest.from_sha256(tar_gz_checksum),
|
||||||
Digest.from_sha256(tarfile_checksum),
|
Digest.from_sha256(tar_checksum),
|
||||||
os.path.getsize(filename),
|
os.path.getsize(filename),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2160,10 +2125,9 @@ def fetch_url_to_mirror(url):
|
|||||||
|
|
||||||
|
|
||||||
def dedupe_hardlinks_if_necessary(root, buildinfo):
|
def dedupe_hardlinks_if_necessary(root, buildinfo):
|
||||||
"""Updates a buildinfo dict for old archives that did
|
"""Updates a buildinfo dict for old archives that did not dedupe hardlinks. De-duping hardlinks
|
||||||
not dedupe hardlinks. De-duping hardlinks is necessary
|
is necessary when relocating files in parallel and in-place. This means we must preserve inodes
|
||||||
when relocating files in parallel and in-place. This
|
when relocating."""
|
||||||
means we must preserve inodes when relocating."""
|
|
||||||
|
|
||||||
# New archives don't need this.
|
# New archives don't need this.
|
||||||
if buildinfo.get("hardlinks_deduped", False):
|
if buildinfo.get("hardlinks_deduped", False):
|
||||||
@@ -2192,65 +2156,47 @@ def dedupe_hardlinks_if_necessary(root, buildinfo):
|
|||||||
buildinfo[key] = new_list
|
buildinfo[key] = new_list
|
||||||
|
|
||||||
|
|
||||||
def relocate_package(spec):
|
def relocate_package(spec: spack.spec.Spec) -> None:
|
||||||
"""
|
"""Relocate binaries and text files in the given spec prefix, based on its buildinfo file."""
|
||||||
Relocate the given package
|
buildinfo = read_buildinfo_file(spec.prefix)
|
||||||
"""
|
|
||||||
workdir = str(spec.prefix)
|
|
||||||
buildinfo = read_buildinfo_file(workdir)
|
|
||||||
new_layout_root = str(spack.store.STORE.layout.root)
|
|
||||||
new_prefix = str(spec.prefix)
|
|
||||||
new_rel_prefix = str(os.path.relpath(new_prefix, new_layout_root))
|
|
||||||
new_spack_prefix = str(spack.paths.prefix)
|
|
||||||
|
|
||||||
old_sbang_install_path = None
|
|
||||||
if "sbang_install_path" in buildinfo:
|
|
||||||
old_sbang_install_path = str(buildinfo["sbang_install_path"])
|
|
||||||
old_layout_root = str(buildinfo["buildpath"])
|
old_layout_root = str(buildinfo["buildpath"])
|
||||||
old_spack_prefix = str(buildinfo.get("spackprefix"))
|
|
||||||
old_rel_prefix = buildinfo.get("relative_prefix")
|
|
||||||
old_prefix = os.path.join(old_layout_root, old_rel_prefix)
|
|
||||||
rel = buildinfo.get("relative_rpaths", False)
|
|
||||||
|
|
||||||
# In the past prefix_to_hash was the default and externals were not dropped, so prefixes
|
# Warn about old style tarballs created with the --rel flag (removed in Spack v0.20)
|
||||||
# were not unique.
|
if buildinfo.get("relative_rpaths", False):
|
||||||
|
tty.warn(
|
||||||
|
f"Tarball for {spec} uses relative rpaths, which can cause library loading issues."
|
||||||
|
)
|
||||||
|
|
||||||
|
# In Spack 0.19 and older prefix_to_hash was the default and externals were not dropped, so
|
||||||
|
# prefixes were not unique.
|
||||||
if "hash_to_prefix" in buildinfo:
|
if "hash_to_prefix" in buildinfo:
|
||||||
hash_to_old_prefix = buildinfo["hash_to_prefix"]
|
hash_to_old_prefix = buildinfo["hash_to_prefix"]
|
||||||
elif "prefix_to_hash" in buildinfo:
|
elif "prefix_to_hash" in buildinfo:
|
||||||
hash_to_old_prefix = dict((v, k) for (k, v) in buildinfo["prefix_to_hash"].items())
|
hash_to_old_prefix = {v: k for (k, v) in buildinfo["prefix_to_hash"].items()}
|
||||||
else:
|
else:
|
||||||
hash_to_old_prefix = dict()
|
raise NewLayoutException(
|
||||||
|
"Package tarball was created from an install prefix with a different directory layout "
|
||||||
|
"and an older buildcache create implementation. It cannot be relocated."
|
||||||
|
)
|
||||||
|
|
||||||
if old_rel_prefix != new_rel_prefix and not hash_to_old_prefix:
|
prefix_to_prefix = {}
|
||||||
msg = "Package tarball was created from an install "
|
|
||||||
msg += "prefix with a different directory layout and an older "
|
|
||||||
msg += "buildcache create implementation. It cannot be relocated."
|
|
||||||
raise NewLayoutException(msg)
|
|
||||||
|
|
||||||
# Spurious replacements (e.g. sbang) will cause issues with binaries
|
if "sbang_install_path" in buildinfo:
|
||||||
# For example, the new sbang can be longer than the old one.
|
old_sbang_install_path = str(buildinfo["sbang_install_path"])
|
||||||
# Hence 2 dictionaries are maintained here.
|
prefix_to_prefix[old_sbang_install_path] = spack.hooks.sbang.sbang_install_path()
|
||||||
prefix_to_prefix_text = collections.OrderedDict()
|
|
||||||
prefix_to_prefix_bin = collections.OrderedDict()
|
|
||||||
|
|
||||||
if old_sbang_install_path:
|
# First match specific prefix paths. Possibly the *local* install prefix of some dependency is
|
||||||
install_path = spack.hooks.sbang.sbang_install_path()
|
# in an upstream, so we cannot assume the original spack store root can be mapped uniformly to
|
||||||
prefix_to_prefix_text[old_sbang_install_path] = install_path
|
# the new spack store root.
|
||||||
|
|
||||||
# First match specific prefix paths. Possibly the *local* install prefix
|
# If the spec is spliced, we need to handle the simultaneous mapping from the old install_tree
|
||||||
# of some dependency is in an upstream, so we cannot assume the original
|
# to the new install_tree and from the build_spec to the spliced spec. Because foo.build_spec
|
||||||
# spack store root can be mapped uniformly to the new spack store root.
|
# is foo for any non-spliced spec, we can simplify by checking for spliced-in nodes by checking
|
||||||
#
|
# for nodes not in the build_spec without any explicit check for whether the spec is spliced.
|
||||||
# If the spec is spliced, we need to handle the simultaneous mapping
|
# An analog in this algorithm is any spec that shares a name or provides the same virtuals in
|
||||||
# from the old install_tree to the new install_tree and from the build_spec
|
# the context of the relevant root spec. This ensures that the analog for a spec s is the spec
|
||||||
# to the spliced spec.
|
# that s replaced when we spliced.
|
||||||
# Because foo.build_spec is foo for any non-spliced spec, we can simplify
|
relocation_specs = specs_to_relocate(spec)
|
||||||
# by checking for spliced-in nodes by checking for nodes not in the build_spec
|
|
||||||
# without any explicit check for whether the spec is spliced.
|
|
||||||
# An analog in this algorithm is any spec that shares a name or provides the same virtuals
|
|
||||||
# in the context of the relevant root spec. This ensures that the analog for a spec s
|
|
||||||
# is the spec that s replaced when we spliced.
|
|
||||||
relocation_specs = deps_to_relocate(spec)
|
|
||||||
build_spec_ids = set(id(s) for s in spec.build_spec.traverse(deptype=dt.ALL & ~dt.BUILD))
|
build_spec_ids = set(id(s) for s in spec.build_spec.traverse(deptype=dt.ALL & ~dt.BUILD))
|
||||||
for s in relocation_specs:
|
for s in relocation_specs:
|
||||||
analog = s
|
analog = s
|
||||||
@@ -2269,82 +2215,38 @@ def relocate_package(spec):
|
|||||||
lookup_dag_hash = analog.dag_hash()
|
lookup_dag_hash = analog.dag_hash()
|
||||||
if lookup_dag_hash in hash_to_old_prefix:
|
if lookup_dag_hash in hash_to_old_prefix:
|
||||||
old_dep_prefix = hash_to_old_prefix[lookup_dag_hash]
|
old_dep_prefix = hash_to_old_prefix[lookup_dag_hash]
|
||||||
prefix_to_prefix_bin[old_dep_prefix] = str(s.prefix)
|
prefix_to_prefix[old_dep_prefix] = str(s.prefix)
|
||||||
prefix_to_prefix_text[old_dep_prefix] = str(s.prefix)
|
|
||||||
|
|
||||||
# Only then add the generic fallback of install prefix -> install prefix.
|
# Only then add the generic fallback of install prefix -> install prefix.
|
||||||
prefix_to_prefix_text[old_prefix] = new_prefix
|
prefix_to_prefix[old_layout_root] = str(spack.store.STORE.layout.root)
|
||||||
prefix_to_prefix_bin[old_prefix] = new_prefix
|
|
||||||
prefix_to_prefix_text[old_layout_root] = new_layout_root
|
|
||||||
prefix_to_prefix_bin[old_layout_root] = new_layout_root
|
|
||||||
|
|
||||||
# This is vestigial code for the *old* location of sbang. Previously,
|
# Delete identity mappings from prefix_to_prefix
|
||||||
# sbang was a bash script, and it lived in the spack prefix. It is
|
prefix_to_prefix = {k: v for k, v in prefix_to_prefix.items() if k != v}
|
||||||
# now a POSIX script that lives in the install prefix. Old packages
|
|
||||||
# will have the old sbang location in their shebangs.
|
|
||||||
orig_sbang = "#!/bin/bash {0}/bin/sbang".format(old_spack_prefix)
|
|
||||||
new_sbang = spack.hooks.sbang.sbang_shebang_line()
|
|
||||||
prefix_to_prefix_text[orig_sbang] = new_sbang
|
|
||||||
|
|
||||||
tty.debug("Relocating package from", "%s to %s." % (old_layout_root, new_layout_root))
|
# If there's nothing to relocate, we're done.
|
||||||
|
if not prefix_to_prefix:
|
||||||
|
return
|
||||||
|
|
||||||
# Old archives maybe have hardlinks repeated.
|
for old, new in prefix_to_prefix.items():
|
||||||
dedupe_hardlinks_if_necessary(workdir, buildinfo)
|
tty.debug(f"Relocating: {old} => {new}.")
|
||||||
|
|
||||||
def is_backup_file(file):
|
# Old archives may have hardlinks repeated.
|
||||||
return file.endswith("~")
|
dedupe_hardlinks_if_necessary(spec.prefix, buildinfo)
|
||||||
|
|
||||||
# Text files containing the prefix text
|
# Text files containing the prefix text
|
||||||
text_names = list()
|
textfiles = [os.path.join(spec.prefix, f) for f in buildinfo["relocate_textfiles"]]
|
||||||
for filename in buildinfo["relocate_textfiles"]:
|
binaries = [os.path.join(spec.prefix, f) for f in buildinfo.get("relocate_binaries")]
|
||||||
text_name = os.path.join(workdir, filename)
|
links = [os.path.join(spec.prefix, f) for f in buildinfo.get("relocate_links", [])]
|
||||||
# Don't add backup files generated by filter_file during install step.
|
|
||||||
if not is_backup_file(text_name):
|
|
||||||
text_names.append(text_name)
|
|
||||||
|
|
||||||
# If we are not installing back to the same install tree do the relocation
|
|
||||||
if old_prefix != new_prefix:
|
|
||||||
files_to_relocate = [
|
|
||||||
os.path.join(workdir, filename) for filename in buildinfo.get("relocate_binaries")
|
|
||||||
]
|
|
||||||
# If the buildcache was not created with relativized rpaths
|
|
||||||
# do the relocation of path in binaries
|
|
||||||
platform = spack.platforms.by_name(spec.platform)
|
platform = spack.platforms.by_name(spec.platform)
|
||||||
if "macho" in platform.binary_formats:
|
if "macho" in platform.binary_formats:
|
||||||
relocate.relocate_macho_binaries(
|
relocate.relocate_macho_binaries(binaries, prefix_to_prefix)
|
||||||
files_to_relocate,
|
elif "elf" in platform.binary_formats:
|
||||||
old_layout_root,
|
relocate.relocate_elf_binaries(binaries, prefix_to_prefix)
|
||||||
new_layout_root,
|
|
||||||
prefix_to_prefix_bin,
|
|
||||||
rel,
|
|
||||||
old_prefix,
|
|
||||||
new_prefix,
|
|
||||||
)
|
|
||||||
elif "elf" in platform.binary_formats and not rel:
|
|
||||||
# The new ELF dynamic section relocation logic only handles absolute to
|
|
||||||
# absolute relocation.
|
|
||||||
relocate.new_relocate_elf_binaries(files_to_relocate, prefix_to_prefix_bin)
|
|
||||||
elif "elf" in platform.binary_formats and rel:
|
|
||||||
relocate.relocate_elf_binaries(
|
|
||||||
files_to_relocate,
|
|
||||||
old_layout_root,
|
|
||||||
new_layout_root,
|
|
||||||
prefix_to_prefix_bin,
|
|
||||||
rel,
|
|
||||||
old_prefix,
|
|
||||||
new_prefix,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Relocate links to the new install prefix
|
relocate.relocate_links(links, prefix_to_prefix)
|
||||||
links = [os.path.join(workdir, f) for f in buildinfo.get("relocate_links", [])]
|
relocate.relocate_text(textfiles, prefix_to_prefix)
|
||||||
relocate.relocate_links(links, prefix_to_prefix_bin)
|
changed_files = relocate.relocate_text_bin(binaries, prefix_to_prefix)
|
||||||
|
|
||||||
# For all buildcaches
|
|
||||||
# relocate the install prefixes in text files including dependencies
|
|
||||||
relocate.relocate_text(text_names, prefix_to_prefix_text)
|
|
||||||
|
|
||||||
# relocate the install prefixes in binary files including dependencies
|
|
||||||
changed_files = relocate.relocate_text_bin(files_to_relocate, prefix_to_prefix_bin)
|
|
||||||
|
|
||||||
# Add ad-hoc signatures to patched macho files when on macOS.
|
# Add ad-hoc signatures to patched macho files when on macOS.
|
||||||
if "macho" in platform.binary_formats and sys.platform == "darwin":
|
if "macho" in platform.binary_formats and sys.platform == "darwin":
|
||||||
@@ -2356,12 +2258,6 @@ def is_backup_file(file):
|
|||||||
with fsys.edit_in_place_through_temporary_file(binary) as tmp_binary:
|
with fsys.edit_in_place_through_temporary_file(binary) as tmp_binary:
|
||||||
codesign("-fs-", tmp_binary)
|
codesign("-fs-", tmp_binary)
|
||||||
|
|
||||||
# If we are installing back to the same location
|
|
||||||
# relocate the sbang location if the spack directory changed
|
|
||||||
else:
|
|
||||||
if old_spack_prefix != new_spack_prefix:
|
|
||||||
relocate.relocate_text(text_names, prefix_to_prefix_text)
|
|
||||||
|
|
||||||
|
|
||||||
def _extract_inner_tarball(spec, filename, extract_to, signature_required: bool, remote_checksum):
|
def _extract_inner_tarball(spec, filename, extract_to, signature_required: bool, remote_checksum):
|
||||||
stagepath = os.path.dirname(filename)
|
stagepath = os.path.dirname(filename)
|
||||||
@@ -2435,6 +2331,14 @@ def _tar_strip_component(tar: tarfile.TarFile, prefix: str):
|
|||||||
yield m
|
yield m
|
||||||
|
|
||||||
|
|
||||||
|
def extract_buildcache_tarball(tarfile_path: str, destination: str) -> None:
|
||||||
|
with closing(tarfile.open(tarfile_path, "r")) as tar:
|
||||||
|
# Remove common prefix from tarball entries and directly extract them to the install dir.
|
||||||
|
tar.extractall(
|
||||||
|
path=destination, members=_tar_strip_component(tar, prefix=_ensure_common_prefix(tar))
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def extract_tarball(spec, download_result, force=False, timer=timer.NULL_TIMER):
|
def extract_tarball(spec, download_result, force=False, timer=timer.NULL_TIMER):
|
||||||
"""
|
"""
|
||||||
extract binary tarball for given package into install area
|
extract binary tarball for given package into install area
|
||||||
@@ -2504,12 +2408,7 @@ def extract_tarball(spec, download_result, force=False, timer=timer.NULL_TIMER):
|
|||||||
tarfile_path, size, contents, "sha256", expected, local_checksum
|
tarfile_path, size, contents, "sha256", expected, local_checksum
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
with closing(tarfile.open(tarfile_path, "r")) as tar:
|
extract_buildcache_tarball(tarfile_path, destination=spec.prefix)
|
||||||
# Remove install prefix from tarfil to extract directly into spec.prefix
|
|
||||||
tar.extractall(
|
|
||||||
path=spec.prefix,
|
|
||||||
members=_tar_strip_component(tar, prefix=_ensure_common_prefix(tar)),
|
|
||||||
)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
shutil.rmtree(spec.prefix, ignore_errors=True)
|
shutil.rmtree(spec.prefix, ignore_errors=True)
|
||||||
_delete_staged_downloads(download_result)
|
_delete_staged_downloads(download_result)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""Function and classes needed to bootstrap Spack itself."""
|
"""Function and classes needed to bootstrap Spack itself."""
|
||||||
@@ -9,7 +8,6 @@
|
|||||||
all_core_root_specs,
|
all_core_root_specs,
|
||||||
ensure_clingo_importable_or_raise,
|
ensure_clingo_importable_or_raise,
|
||||||
ensure_core_dependencies,
|
ensure_core_dependencies,
|
||||||
ensure_file_in_path_or_raise,
|
|
||||||
ensure_gpg_in_path_or_raise,
|
ensure_gpg_in_path_or_raise,
|
||||||
ensure_patchelf_in_path_or_raise,
|
ensure_patchelf_in_path_or_raise,
|
||||||
)
|
)
|
||||||
@@ -20,7 +18,6 @@
|
|||||||
"is_bootstrapping",
|
"is_bootstrapping",
|
||||||
"ensure_bootstrap_configuration",
|
"ensure_bootstrap_configuration",
|
||||||
"ensure_core_dependencies",
|
"ensure_core_dependencies",
|
||||||
"ensure_file_in_path_or_raise",
|
|
||||||
"ensure_gpg_in_path_or_raise",
|
"ensure_gpg_in_path_or_raise",
|
||||||
"ensure_clingo_importable_or_raise",
|
"ensure_clingo_importable_or_raise",
|
||||||
"ensure_patchelf_in_path_or_raise",
|
"ensure_patchelf_in_path_or_raise",
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""Common basic functions used through the spack.bootstrap package"""
|
"""Common basic functions used through the spack.bootstrap package"""
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""Bootstrap concrete specs for clingo
|
"""Bootstrap concrete specs for clingo
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""Manage configuration swapping for bootstrapping purposes"""
|
"""Manage configuration swapping for bootstrapping purposes"""
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""Bootstrap Spack core dependencies from binaries.
|
"""Bootstrap Spack core dependencies from binaries.
|
||||||
@@ -481,19 +480,6 @@ def ensure_gpg_in_path_or_raise() -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def file_root_spec() -> str:
|
|
||||||
"""Return the root spec used to bootstrap file"""
|
|
||||||
root_spec_name = "win-file" if IS_WINDOWS else "file"
|
|
||||||
return _root_spec(root_spec_name)
|
|
||||||
|
|
||||||
|
|
||||||
def ensure_file_in_path_or_raise() -> None:
|
|
||||||
"""Ensure file is in the PATH or raise"""
|
|
||||||
return ensure_executables_in_path_or_raise(
|
|
||||||
executables=["file"], abstract_spec=file_root_spec()
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def patchelf_root_spec() -> str:
|
def patchelf_root_spec() -> str:
|
||||||
"""Return the root spec used to bootstrap patchelf"""
|
"""Return the root spec used to bootstrap patchelf"""
|
||||||
# 0.13.1 is the last version not to require C++17.
|
# 0.13.1 is the last version not to require C++17.
|
||||||
@@ -562,10 +548,9 @@ def ensure_winsdk_external_or_raise() -> None:
|
|||||||
missing_packages_lst.append("win-sdk")
|
missing_packages_lst.append("win-sdk")
|
||||||
missing_packages = " & ".join(missing_packages_lst)
|
missing_packages = " & ".join(missing_packages_lst)
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
f"Unable to find the {missing_packages}, please install these packages \
|
f"Unable to find the {missing_packages}, please install these packages via the Visual "
|
||||||
via the Visual Studio installer \
|
"Studio installer before proceeding with Spack or provide the path to a non standard "
|
||||||
before proceeding with Spack or provide the path to a non standard install with \
|
"install with 'spack external find --path'"
|
||||||
'spack external find --path'"
|
|
||||||
)
|
)
|
||||||
# wgl/sdk are not required for bootstrapping Spack, but
|
# wgl/sdk are not required for bootstrapping Spack, but
|
||||||
# are required for building anything non trivial
|
# are required for building anything non trivial
|
||||||
@@ -577,15 +562,13 @@ def ensure_core_dependencies() -> None:
|
|||||||
"""Ensure the presence of all the core dependencies."""
|
"""Ensure the presence of all the core dependencies."""
|
||||||
if sys.platform.lower() == "linux":
|
if sys.platform.lower() == "linux":
|
||||||
ensure_patchelf_in_path_or_raise()
|
ensure_patchelf_in_path_or_raise()
|
||||||
elif sys.platform == "win32":
|
|
||||||
ensure_file_in_path_or_raise()
|
|
||||||
ensure_gpg_in_path_or_raise()
|
ensure_gpg_in_path_or_raise()
|
||||||
ensure_clingo_importable_or_raise()
|
ensure_clingo_importable_or_raise()
|
||||||
|
|
||||||
|
|
||||||
def all_core_root_specs() -> List[str]:
|
def all_core_root_specs() -> List[str]:
|
||||||
"""Return a list of all the core root specs that may be used to bootstrap Spack"""
|
"""Return a list of all the core root specs that may be used to bootstrap Spack"""
|
||||||
return [clingo_root_spec(), gnupg_root_spec(), patchelf_root_spec(), file_root_spec()]
|
return [clingo_root_spec(), gnupg_root_spec(), patchelf_root_spec()]
|
||||||
|
|
||||||
|
|
||||||
def bootstrapping_sources(scope: Optional[str] = None):
|
def bootstrapping_sources(scope: Optional[str] = None):
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""Bootstrap non-core Spack dependencies from an environment."""
|
"""Bootstrap non-core Spack dependencies from an environment."""
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
"""Query the status of bootstrapping on this machine"""
|
"""Query the status of bootstrapping on this machine"""
|
||||||
import platform
|
import sys
|
||||||
from typing import List, Optional, Sequence, Tuple, Union
|
from typing import Dict, List, Optional, Sequence, Tuple, Union
|
||||||
|
|
||||||
import spack.util.executable
|
import spack.util.executable
|
||||||
|
|
||||||
@@ -72,7 +71,7 @@ def _core_requirements() -> List[RequiredResponseType]:
|
|||||||
"bzip2": _missing("bzip2", "required to compress/decompress code archives"),
|
"bzip2": _missing("bzip2", "required to compress/decompress code archives"),
|
||||||
"git": _missing("git", "required to fetch/manage git repositories"),
|
"git": _missing("git", "required to fetch/manage git repositories"),
|
||||||
}
|
}
|
||||||
if platform.system().lower() == "linux":
|
if sys.platform == "linux":
|
||||||
_core_system_exes["xz"] = _missing("xz", "required to compress/decompress code archives")
|
_core_system_exes["xz"] = _missing("xz", "required to compress/decompress code archives")
|
||||||
|
|
||||||
# Executables that are not bootstrapped yet
|
# Executables that are not bootstrapped yet
|
||||||
@@ -87,17 +86,16 @@ def _core_requirements() -> List[RequiredResponseType]:
|
|||||||
|
|
||||||
|
|
||||||
def _buildcache_requirements() -> List[RequiredResponseType]:
|
def _buildcache_requirements() -> List[RequiredResponseType]:
|
||||||
_buildcache_exes = {
|
_buildcache_exes: Dict[ExecutablesType, str] = {
|
||||||
"file": _missing("file", "required to analyze files for buildcaches", system_only=False),
|
("gpg2", "gpg"): _missing("gpg2", "required to sign/verify buildcaches", False)
|
||||||
("gpg2", "gpg"): _missing("gpg2", "required to sign/verify buildcaches", False),
|
|
||||||
}
|
}
|
||||||
if platform.system().lower() == "darwin":
|
if sys.platform == "darwin":
|
||||||
_buildcache_exes["otool"] = _missing("otool", "required to relocate binaries")
|
_buildcache_exes["otool"] = _missing("otool", "required to relocate binaries")
|
||||||
|
|
||||||
# Executables that are not bootstrapped yet
|
# Executables that are not bootstrapped yet
|
||||||
result = [_required_system_executable(exe, msg) for exe, msg in _buildcache_exes.items()]
|
result = [_required_system_executable(exe, msg) for exe, msg in _buildcache_exes.items()]
|
||||||
|
|
||||||
if platform.system().lower() == "linux":
|
if sys.platform == "linux":
|
||||||
result.append(
|
result.append(
|
||||||
_required_executable(
|
_required_executable(
|
||||||
"patchelf",
|
"patchelf",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user