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

REUSE compliance check fails on all PRs #773

Closed
marikaner opened this issue Jun 21, 2023 · 9 comments
Closed

REUSE compliance check fails on all PRs #773

marikaner opened this issue Jun 21, 2023 · 9 comments

Comments

@marikaner
Copy link

marikaner commented Jun 21, 2023

Since today our REUSE compliance check fails for no apparent reason an all PRs. Please take a look at this PR, where I just changed something in the README.md and the REUSE check complains about almost 1000 files not being licensed. This check worked before.
=> .dep5 file

I also realized that there are many warnings in the following format (I assume one for each missing file):

reuse.project - WARNING - Copyright and licensing information for '/github/workspace/<FILENAME>' have been found in '/github/workspace/<FILENAME>' and the DEP5 file located at '/github/workspace/.reuse/dep5'. The information in the DEP5 file has been overridden. Please ensure that this is correct.
# MISSING COPYRIGHT AND LICENSING INFORMATION

The following files have no licensing information:
* /github/workspace/<FILENAME>

The messages are confusing as the warning states that there are 2 sources of information, while the second message states that there is no source of information.

This seems related to #771.

@mrdrogdrog
Copy link

mrdrogdrog commented Jun 21, 2023

We had the same problem.
The reuse github action uses the latest docker image.

fsfe/reuse-action#21

I've linked a commit in the issue where we replaced the action with the docker image. This is our workaround for now to have consistent behaviour in the CI.

@mrdrogdrog
Copy link

mrdrogdrog commented Jun 21, 2023

I solved the license detection problem by placing .license files for files who can't have a SPDX header.

#771 (comment)

@linozen
Copy link
Contributor

linozen commented Jun 21, 2023

Hi @marikaner and thanks @mrdrogdrog for bringing up a potential solution here.

Since today our REUSE compliance check fails for no apparent reason an all PRs. Please take a look at this PR, where I just changed something in the README.md and the REUSE check complains about almost 1000 files not being licensed. This check worked before. => .dep5 file

Yes, we released a new major version today that defines and enforces an order of precedence for the sources of licensing and copyright information.

I also realized that there are many warnings in the following format (I assume one for each missing file):

reuse.project - WARNING - Copyright and licensing information for '/github/workspace/<FILENAME>' have been found in '/github/workspace/<FILENAME>' and the DEP5 file located at '/github/workspace/.reuse/dep5'. The information in the DEP5 file has been overridden. Please ensure that this is correct.
# MISSING COPYRIGHT AND LICENSING INFORMATION

The following files have no licensing information:
* /github/workspace/<FILENAME>

The messages are confusing as the warning states that there are 2 sources of information, while the second message states that there is no source of information.

What's confusing you about the message? It tells you first that there are multiple sources of copyright/licensing information. Then it tells you where they are (in your case the DEP5 file and the file contents). Then it tells you that it's going to use the file contents (override DEP5) as the file content has higher precedence.

This seems related to #771.

yes. And the way it can be fixed is the same.

@stephanlachnit
Copy link

Relevant part of the spec is https://reuse.software/spec/#order-of-precedence

But who thought this was a good idea? We have the case where we just dump an entire folder in the repo. I don't want to write 100 license files. Can we please have an option to let dep5 overwrite?

@mxmehl
Copy link
Member

mxmehl commented Jun 21, 2023

Relevant part of the spec is https://reuse.software/spec/#order-of-precedence

But who thought this was a good idea? We have the case where we just dump an entire folder in the repo. I don't want to write 100 license files. Can we please have an option to let dep5 overwrite?

Do the files in this folder already contain copyright and licensing information? If not, the information in dep5 is the one that "wins". If yes, what's the reason why 100 files are wrongly labelled?

@stephanlachnit
Copy link

stephanlachnit commented Jun 21, 2023

Do the files in this folder already contain copyright and licensing information? If not, the information in dep5 is the one that "wins". If yes, what's the reason why 100 files are wrongly labelled?

The REUSE spec specifies:

Instead of the SPDX-FileCopyrightText tag, the symbol ©, or the word Copyright MAY be used, in which case a colon is not needed.

So, just the word "copyright" is enough to ignore everything in the reuse/.dep5 file. This is so common that it is basically every copied code file. The two proposed "solutions" are both not really sustainable

  • Create a .license file: if you import many files in a subfolder, you just clutter this with .license files. And especially if you embed a folder, you might need to redo this process if there are files removed/added.
  • Change the header of the embedded files: this is also not sustainable, since this is work you need to do every time you import a new version.

It's not really related to the tool, but I think the spec should be adjusted in one of the following ways:

  • Remove the compatibility with the word copyright. This ensure that the information of the file is only taken if it actually follows the reuse spec
  • Add an "overwrite" option to specify exactly which information takes preference. This is not really suitable in DEP-5, so this should only be done when the new REUSE.yaml spec is ready (cc @mxmehl)
  • Add an option to use .license files also with entire folders.

Anyway, in the meantime we'll stick with 1.1.2 and I suspect we will not be the only ones :/

@carmenbianca
Copy link
Member

So, just the word "copyright" is enough to ignore everything in the reuse/.dep5 file. This is so common that it is basically every copied code file. The two proposed "solutions" are both not really sustainable

  • Create a .license file: if you import many files in a subfolder, you just clutter this with .license files. And especially if you embed a folder, you might need to redo this process if there are files removed/added.
  • Change the header of the embedded files: this is also not sustainable, since this is work you need to do every time you import a new version.

This makes a lot of sense, and is not a use-case we had considered.

We'll be yanking the release later today, and re-tinker at the problem until we have a workable solution for this use-case. This may take a while, because most of us are volunteers.

Thank you for taking the time to explain your use-case so clearly!

@stephanlachnit
Copy link

Thanks for the fast response! If you need an example repo, here is ours: https://github.com/allpix-squared/allpix-squared

mnonnenmacher added a commit to oss-review-toolkit/ort that referenced this issue Jun 21, 2023
The recently published version 2.0.0 of the reuse tool [1] reports
several issues which require updating the configuration. As it is not
clear yet how much effort this requires, fix the version to the previous
release 1.1.2. Note that other projects are having issues with the new
release as well [2], so it might make sense to wait a bit before upgrading.

[1]: https://github.com/fsfe/reuse-tool/releases/tag/v2.0.0
[2]: fsfe/reuse-tool#773

Signed-off-by: Martin Nonnenmacher <[email protected]>
@carmenbianca
Copy link
Member

carmenbianca commented Jun 21, 2023

I'm going to close this PR and refer further discussion to #779.

Thank you for your swift feedback, and sincere apologies for breaking your workflow for a few hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants