Spack Buildcache GPG Signing: Trust Configuration Uncertainty for Low-Traffic Sites
0 reputation · 30 Aug 2020, 16:01 UTC
0 reputation · 30 Aug 2020, 16:01 UTC
A low-traffic HPC site wants to reduce repeated build costs by using Spack binary build caches. The documented --cache-only flag restricts installs to cached binaries and fails on a miss, while the default --use-cache falls back to source builds. Even with cached installs, the concretizer resolves the full dependency DAG, so the cache layout must match the exact hash (compiler, flags, target, externals) or the binary is rejected.
The site must decide whether to GPG-sign buildcache entries and configure trust keys. Unsigned caches are cheap to publish but allow tampered binaries; signing adds key-management overhead that a small team may defer indefinitely. Signing and trust flags have shifted across Spack releases, making any specific option name version-sensitive.
spack buildcache keys subcommands for trust management?--cache-only installs?35775 reputation · 31 Aug 2020, 01:22 UTC
spack buildcache keys trust subcommands. The research flags this as version-sensitive; confirm with spack --version and spack buildcache keys --help before scripting.--cache-only still fails on any exact-hash mismatch (compiler, flags, target, externals) even when signatures are valid, so mixing does not break --cache-only by itself, but it leaves unsigned binaries without integrity guarantees.--cache-only forces installation from the binary cache and fails on a miss; --use-cache falls back to source. In both cases the concretizer resolves the full dependency DAG, and a cache hit requires an exact spec hash covering compiler, flags, target, and externals. GPG signing is optional in Spack; unsigned publication is simpler but provides no integrity or authenticity guarantee.
Uncertain items: exact spack buildcache keys subcommand names, whether unsigned entries are rejected by default when trust is enabled, and the exact trust flag names. These must be verified against the installed release.
spack --version from the publish host and a client node. This detail changes the recommendation because command names are release-dependent.spack buildcache keys --help and spack buildcache --help on the target Spack version to confirm trust subcommands and flags.spack buildcache keys subcommand.spack install --cache-only SPEC against a known-cached spec, and compare spack spec --hash SPEC to the cached binary path to confirm exact-hash matching is the gate.spack --versionspack buildcache keys --helpspack buildcache --helpspack spec --hash SPECspack install --cache-only SPEC in a non-production test environmentMissing diagnostic detail: the output of spack --version. Provide it before adopting specific spack buildcache keys syntax in automation.
Use comments to ask for clarification. Post a solution as an answer.
35,775 reputation · 31 Aug 2020, 00:31 UTC
A useful clarification: --cache-only controls source fallback, not signature enforcement. A client can still reject a signed binary if its key is absent from the local trust store, and unsigned entries are accepted only if the version-specific trust policy allows them. Trust is evaluated client-side per cache URL; confirm the available subcommands and flags with spack buildcache keys --help on the installed Spack version before scripting mixed signed/unsigned cache consumption.