Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to lint files that only contain copyrights (but no license)? #955

Closed
sschuberth opened this issue Apr 10, 2024 · 3 comments
Closed

How to lint files that only contain copyrights (but no license)? #955

sschuberth opened this issue Apr 10, 2024 · 3 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@sschuberth
Copy link

Some files, like a flavor of NOTICE files, deliberately only contain copyright statements, like

Copyright (C) 2022-2023 Bosch.IO GmbH
Copyright (C) 2024 Double Open Oy
Copyright (C) 2024 Robert Bosch GmbH

Now, reuse lint flags this file as

The following files have no licensing information:
* NOTICE

But if I add the following to .reuse/dep5:

Files: NOTICE
Copyright: 2022 The ORT Server Authors (See <https://github.com/eclipse-apoapsis/ort-server/blob/main/NOTICE>)
License: Apache-2.0

then reuse lint complains with

~/.local/lib/python3.12/site-packages/reuse/project.py:286: PendingDeprecationWarning: Copyright and licensing information for 'NOTICE' has been found in both 'NOTICE' and in the DEP5 file located at '.reuse/dep5'. The information for these two sources has been aggregated. In the future this behaviour will change, and you will need to explicitly enable aggregation. See <https://github.com/fsfe/reuse-tool/issues/779>. You need do nothing yet. Run with `--suppress-deprecation` to hide this warning.

So I tried to omit the Copyright: line from the .reuse/dep5 entry, but then I get

usage: reuse [-h] [--debug] [--suppress-deprecation] [--include-submodules] [--include-meson-subprojects] [--no-multiprocessing] [--root PATH] [--version]
             {annotate,download,init,lint,spdx,supported-licenses,supported-licences} ...
reuse: error: '.reuse/dep5' could not be parsed. We received the following error message: Files paragraph missing Copyright field

How am I supposed to solve this without getting any warnings / errors and without suppressing anything when running reuse lint?

@nicorikken
Copy link
Member

Thanks for reporting.

For now you could add a license expression to the notice file. I wouldn't go the dep5 route.

For the future I think we should adjust reuse-tool to not check for license information in the notice file, as is it is already legal metadata. We wouldn't check the copyright and license of the dep5 file either. Let's check what others think of this.

Some relevant documentation on notice files https://www.apache.org/legal/src-headers.html#notice

@nicorikken nicorikken added bug Something isn't working enhancement New feature or request labels Apr 13, 2024
@sschuberth
Copy link
Author

Another simple solution would be to allow .reuse/dep5 entries that just add a license, but no copyright. That would allow to nicely just complements what's not already in the file. Unfortunately, at least to me the dep5 spec is not clear about whether the Copyright: field is mandatory to have or not, but I guess it's not.

@carmenbianca
Copy link
Member

@sschuberth #779 will address this need.

Closing as duplicate. Thanks for the issue. It validates that the many many hours of work put into #863 answer a valid real-world problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants