Skip to content

Add option to pay attention to files named COPYING or LICENSE #881

@Jayman2000

Description

@Jayman2000

The REUSE Tool ignores files whose names start with LICENSE or COPYING. I tried creating a repo like this one that contains a COPYING.md file that just says that the repo is REUSE compliant. When I run reuse lint, it tells me that CC0-1.0 is unused despite the fact that COPYING.md contains SPDX-License-Identifier: CC0-1.0:

$ cd reuse-ignores-copying
$ cat COPYING.md
<!--
SPDX-License-Identifier: CC0-1.0
SPDX-FileCopyrightText: 2023 Jason Yundt <jason@jasonyundt.email>
-->

# Copying Information

This repo is [REUSE](https://reuse.software) compliant.
$ reuse lint
# UNUSED LICENSES

The following licenses are not used:
* CC0-1.0



# SUMMARY

* Bad licenses: 0
* Deprecated licenses: 0
* Licenses without file extension: 0
* Missing licenses: 0
* Unused licenses: CC0-1.0
* Used licenses: 0
* Read errors: 0
* files with copyright information: 0 / 0
* files with license information: 0 / 0

Unfortunately, your project is not compliant with version 3.0 of the REUSE Specification :-(
$ 

As far as I know, this is intentional. According to this comment from @mxmehl,

Ah, I didn't see the LICENSE.md file. Indeed, it's not checked by the tool because it's considered to contain a license text (which per definition is excluded from the obligation to contain copyright and licensing info).

Max is right. The spec says

  • Covered File --- any file in a Project, except for
    • The License Files.
    • […]

and

Each Covered File MUST have Copyright and Licensing Information associated with
it.

If you had a file in your project named COPYING or LICENSE, and that file contained the text of a license, then it would be OK to ignore the contents of that file. After all, the file doesn’t need to have an SPDX-License-Identifier or an SPDX-FileCopyrightText tag because it’s a License File. That being said, reuse lint should still report an error in this case because there should never be a file named COPYING or LICENSE that contains the text of a license. All files that contain the text of licenses need to be in the LICENSES/ directory, and they need to be named something other than COPYING or LICENSE. The spec says:

Each License File MUST be placed in the LICENSES/ directory in the root of
the Project. The name of the License File MUST be the SPDX License Identifier of the
license followed by an appropriate file extension (example:
LICENSES/GPL-3.0-or-later.txt).


Personally, I want an option to make the REUSE Tool not ignore files named COPYING or LICENSE. Another possibility would be to just make the REUSE Tool just never ignore those files.

If we want to keep assuming that those files contain license text, then we could make reuse lint give an error whenever it detects a file named COPYING or LICENSE. I’m personally not in favor of this possibility, but it would be better that what we have at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpending/closeThe issues is marked for closing in the near futurespecRequires specification change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions