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

Clarify <project_license> for documentation #312

Closed
pwithnall opened this issue Apr 8, 2021 · 4 comments
Closed

Clarify <project_license> for documentation #312

pwithnall opened this issue Apr 8, 2021 · 4 comments

Comments

@pwithnall
Copy link
Contributor

We’ve come across an issue recently where a project gave its license as

<project_license>GPL-2.0+ and CC-BY-SA-3.0</project_license>

I assume (but am waiting to confirm) that this is intended to convey that the code is under GPL-2.0+ and the documentation is under CC-BY-SA-3.0. However, in SPDX, and means the terms of both licenses must be complied with, which means that the code must also be licensed under CC-BY-SA-3.0 and the documentation must also be licensed under GPL-2.0+.

CC-BY-SA-3.0 is not FSF or OSI approved so this has the end result of as_license_is_free_license() saying that this project is proprietary.

I think the fix here is for the project to simply use:

<project_license>GPL-2.0+</project_license>

since that’s the license for the project as a whole, and CC-BY-SA-3.0 is only used for a portion of it.

That leads to the question of how to avoid this situation in future. My suggestion would be the following, but I’m sure many other solutions are possible and might be better:

  • Clarify in the spec that project_license is for the top-level license of the project (typically the one applied to the code, for a software project)
  • Potentially add a new <documentation_license> element for exposing the license of the project’s documentation independently of <project_license>
pwithnall added a commit to pwithnall/audacity that referenced this issue Apr 8, 2021
The project license is for the project as a whole, and typically refers to the license for the code (which is GPL-2.0).

In SPDX, the `and` operator means that the conditions of both licenses must be adhered to, so the appdata file was previously essentially saying “all code and documentation is subject to a restrictive conjugation of both GPL-2.0 and CC-BY-SA-3.0”. `CC-BY-SA-3.0` is not an FSF or OSI approved license, which resulted in gnome-software interpreting this SPDX phrase as proprietary (see https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1200).

Subject to clarification in the appstream spec (ximion/appstream#312), simplify the project license to reflect the top-level code license only.
@ximion
Copy link
Owner

ximion commented Apr 9, 2021

Interesting! I agree with your issue description and solution suggestion - project_license is a SPDX license expression for the project-as-a-whole / the actual code, so AND is definitely not correct in this case.
That clarification should be added.
I am a bit wary about adding something like documentation_license, unless there's a clear use for it - for Debian, the debian/copyright file for a software package usually contains a full breakdown down to individual file level as to which license they are subjected to. I fear that we'd be replicating something like this eventually once we allow documentation_license, as more projects will then want to further clarify their licenses by adding more subcomponent-licenses to their metainfo files.
The other side of the argument is of course that documentation is usually the thing with a separate license from the actual code, so having that tag would cover most "different license exists" cases, while also being a bit more complete and honest.
Then the question remains whether a project with a non-free documentation license is also "non-free" or not...
Also, should that extra license be shown to the user? If so, how? What's the value for an end-user for having this? A machine can't use it to accurately determine license-compliance, as the accuracy of the three license_* tags would still be too coarse, and a more fine-grained breakdown like a d/copyright file would likely be needed to have the data needed for any legal case.

I think clarifying project_license is a good first step.
I also think that it may make sense to add a helper function to appstreamcli for projects to easily check whether a license(-expression) is considered to be non-free or not, rather than being surprised.

I'm also actually surprised that CC-BY-SA-3.0 is neither OSI nor FSF-approved - that license has been around for a while!

pwithnall added a commit to pwithnall/appstream that referenced this issue Apr 13, 2021
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: ximion#312
@pwithnall
Copy link
Contributor Author

I think clarifying project_license is a good first step.

#313

ximion pushed a commit that referenced this issue Apr 13, 2021
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #312
gnomesysadmins pushed a commit to GNOME/hitori that referenced this issue May 25, 2021
The `<project_license>` element is intended to state the license of the
project as a whole. The SPDX `and` term means that the overall license
is the more restrictive union of both given licenses. That means that
the SPDX expression `GPL-3.0+ and CC-BY-SA-3.0` is not FOSS.

This was causing Hitori to be shown as proprietary software in
gnome-software.

See ximion/appstream#312

Fix that by only giving the license of the code as the
`<project_license>`, ignoring the license of the help manual.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
@pwithnall
Copy link
Contributor Author

Do we want to do anything else here? Reading through this all again, it feels to me like making further changes (like adding a <documentation_license> element) would be premature, given there’s currently no use case for them. I can’t see us showing the documentation license for apps in gnome-software.

Perhaps this can be closed and revisited if a use case arises for exposing additional high-level license data?

@ximion
Copy link
Owner

ximion commented Sep 8, 2021

Agreed, I think with clarifying the intent of project_license in the specification, we addressed the issue for now. If it turns out we need more, and more advanced license notations for some reason in the future, we can always revisit this and make further changes :-)

@ximion ximion closed this as completed Sep 8, 2021
LWinterberg pushed a commit to audacity/audacity that referenced this issue Oct 5, 2021
The project license is for the project as a whole, and typically refers to the license for the code (which is GPL-2.0).

In SPDX, the `and` operator means that the conditions of both licenses must be adhered to, so the appdata file was previously essentially saying “all code and documentation is subject to a restrictive conjugation of both GPL-2.0 and CC-BY-SA-3.0”. `CC-BY-SA-3.0` is not an FSF or OSI approved license, which resulted in gnome-software interpreting this SPDX phrase as proprietary (see https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1200).

Subject to clarification in the appstream spec (ximion/appstream#312), simplify the project license to reflect the top-level code license only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants