aboutcode-org / aboutcode-org/scancode-toolkit

scancode generates malformed Debian copyright file

オープン
#3,714 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
2.6k
フォーク
791
平均マージ
1日 12時間
マージ済み PR(30日)
5

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。