aboutcode-org / aboutcode-org/scancode-toolkit

scancode generates malformed Debian copyright file

Abierto
#3,714 1 comentario 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Python
Estrellas
2.6k
Forks
791
Merge medio
1 d 12 h
PR fusionados (30 d)
5

Descripción

### 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 .
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.