go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.91k stars 5.48k forks source link

Support for REUSE Specification (License Detection) #28672

Open n0toose opened 10 months ago

n0toose commented 10 months ago

Feature Description

I think it would be great if Gitea was able to detect multiple licenses under a LICENSES folder based on the SPDX identifier included in the filenames of present in that folder, as described by the Free Software Foundation Europe's REUSE Specification. (https://reuse.software)

That way, it would be possible to include multiple licenses easily without looking for the SPDX headers in every file that is present in the repository, while retaining the ability to include licensing information for binary files.

A "lazier" implementation that does not check for full compliance, but just looks at the contents of the LICENSES folder (unlike re-implementing or somehow integrating https://github.com/fsfe/reuse-tool - which does check every file) could work and that repositories using it could reduce some computational overhead (w.r.t. https://github.com/go-gitea/gitea/pull/24872#discussion_r1410524792) at scale.

I believe that the benefits and overall simplicity of supporting such an extension are highlighted in the review process of this pull request: https://github.com/go-gitea/gitea/pull/24872

Screenshots

Not applicable

n0toose commented 10 months ago

My motivation for this issue is also the fact that our project is pivoting towards utilizing that standard for its own projects and wanting to recommend it further to other free and open source developers.

I'd be interested in taking a look, but I already have a few outstanding PRs to circle back to and there is an actively developed PR that changes these very components. (P.S. Happy new year!)