diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2024-04-24 09:41:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-24 09:41:03 -0700 |
commit | 02cc3ea005c7bda9478d0358a9fdf23873235d5e (patch) | |
tree | eae0f69db7d8a1562cba44686a37dab3c64ec5d5 /.mailmap | |
parent | 641ab95a317b03ce252dc480cdc5d594450dd8ef (diff) | |
download | spack-02cc3ea005c7bda9478d0358a9fdf23873235d5e.tar.gz spack-02cc3ea005c7bda9478d0358a9fdf23873235d5e.tar.bz2 spack-02cc3ea005c7bda9478d0358a9fdf23873235d5e.tar.xz spack-02cc3ea005c7bda9478d0358a9fdf23873235d5e.zip |
Add new `redistribute()` directive (#20185)
Some packages can't be redistributed in source or binary form. We need an explicit way to say that in a package.
This adds a `redistribute()` directive so that package authors can write, e.g.:
```python
redistribute(source=False, binary=False)
```
You can also do this conditionally with `when=`, as with other directives, e.g.:
```python
# 12.0 and higher are proprietary
redistribute(source=False, binary=False, when="@12.0:")
# can't redistribute when we depend on some proprietary dependency
redistribute(source=False, binary=False, when="^proprietary-dependency")
```
To prevent Spack from adding either their sources or binaries to public mirrors and build caches. You can still unconditionally add things *if* you run either:
* `spack mirror create --private`
* `spack buildcache push --private`
But the default behavior for build caches is not to include non-redistributable packages in either mirrors or build caches. We have previously done this manually for our public buildcache, but with this we can start maintaining redistributability directly in packages.
Caveats: currently the default for `redistribute()` is `True` for both `source` and `binary`, and you can only set either of them to `False` via this directive.
- [x] add `redistribute()` directive
- [x] add `redistribute_source` and `redistribute_binary` class methods to `PackageBase`
- [x] add `--private` option to `spack mirror`
- [x] add `--private` option to `spack buildcache push`
- [x] test exclusion of packages from source mirror (both as a root and as a dependency)
- [x] test exclusion of packages from binary mirror (both as a root and as a dependency)
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions