aboutcode-org / aboutcode-org/scancode-toolkit
scancode generates malformed Debian copyright file
- Linguagem predominante
- Python
- Estrelas
- 2.6k
- Forks
- 791
- Merge médio
- 1d 12h
- PRs com merge (30d)
- 5
Descrição
### Description
With https://github.com/nexB/scancode-toolkit/pull/2417 scancode is able to generate Debian copyright file output, but the generated file doesn't allow follow the specification.
When the copyright or license is not detected then the `Copyright` and `License` fields are missing whereas they are mandatory as described in the [specification](https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#files-stanza):
```
The following fields may be present in a Files stanza.
Files: required.
Copyright: required.
License: required.
Comment: optional.
```
Instead of skipping these fields, scancode should fill them with `UNKNOWN` (for `License`) or `no-info-found` (for `Copyright`) as done by `scan-copyrights`. Any other value should be fine as well if we want to make it consistent.
### How To Reproduce
```
git clone https://gitlab.apertis.org/pkg/pipewire
cd pipewire
docker run -v $PWD/:/project scancode-toolkit \
--copyright --license --license-text --strip-root \
--ignore */debian/copyright --ignore */debian/apertis/copyright \
-n 8 --debian /project/debian/apertis/scancode-copyright \
/project/.
```
The generated `debian/apertis/scancode-copyright` will have files stanza with missing mandatory fields.
### System configuration
Docker image used was generated with:
```
git clone https://github.com/nexB/scancode-toolkit
cd scancode-toolkit
LATEST_VER=v32.0.8
git checkout $LATEST_VER
docker build --tag scancode-toolkit --tag scancode-toolkit:$LATEST_VER .
```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.