aboutcode-org / aboutcode-org/scancode-toolkit

scancode generates malformed Debian copyright file

Đang mở
#3,714 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
2.6k
Fork
791
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
5

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.