This commit is contained in:
psakiev 2025-05-09 09:54:46 -06:00
parent b0541cb5d5
commit d99a71193b
2 changed files with 22 additions and 1 deletions

View File

@ -1222,6 +1222,23 @@ A version specifier can also be a list of ranges and specific versions,
separated by commas. For example, ``@1.0:1.5,=1.7.1`` matches any version
in the range ``1.0:1.5`` and the specific version ``1.7.1``.
^^^^^^^^^^^^^^^^^
Binary Provenance
^^^^^^^^^^^^^^^^^
Spack versions are paired to attributes that determine the source code Spack
will use to build. Checksummed assets are preferred but there are a few
notable exceptions such as git branches and tags i.e ``pkg@develop``.
These versions do not naturally have source provenance because they refer to a range
of commits (branches) or can be changed outside the spack packaging infrastructure
(tags). Without source provenace we can not have binary provenance.
Spack has a reserved variant to allow users to complete source and binary provenance
for these cases: ``pkg@develop commit=<SHA>``. The ``commit`` variant must be supplied
the full 40 character commit SHA. Using a partial commit SHA or assigning
the ``commit`` variant to a version that is not using a branch or tag reference will
lead to an error during concretization.
^^^^^^^^^^^^
Git versions
^^^^^^^^^^^^

View File

@ -1267,7 +1267,11 @@ Git fetching supports the following parameters to ``version``:
If paths provided are directories then all the subdirectories and associated files
will also be cloned.
Only one of ``tag``, ``branch``, or ``commit`` can be used at a time.
``tag`` and ``branch`` should not be combined in the version parameters. We strongly
recommend that all ``tag`` entries be paired with ``commit``. Providing the full
``commit`` SHA hash allows for Spack to preserve binary provenance for all binaries.
This is due to the fact that git tags and branches are mutable references to commits,
but git commits are guaranteed to be unique points in the git history.
The destination directory for the clone is the standard stage source path.