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

Update license expressions to new syntax #65442

Closed

Conversation

waldyrious
Copy link
Contributor

@waldyrious waldyrious commented Nov 22, 2020

Updating formulae license expressions in the context of #58225, now that richer license syntax has been made available in #7953 and #8260.

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

@BrewTestBot BrewTestBot added the automerge-skip `brew pr-automerge` will skip this pull request label Nov 22, 2020
@waldyrious
Copy link
Contributor Author

waldyrious commented Nov 22, 2020

Note: audit fails for two formulae:

$ brew audit $(git show --name-only | sed '1,2d')
mongoose:
  * Formula mongoose contains non-standard SPDX licenses: ["Cesanta"].
    For a list of valid licenses check: https://spdx.org/licenses/
ttf2eot:
  * Formula ttf2eot contains non-standard SPDX licenses: ["BSD-*"].
    For a list of valid licenses check: https://spdx.org/licenses/
Error: 2 problems in 2 formulae detected

What should I do with these?

  • Mongoose is be dual-licensed under GNU GPL-2.0 and custom licensing for commercial use. See a79bfeb in #58678 (cc @chenrui333). How is this arrangement typically represented in these license expressions?

  • ttf2eot's license is, according to the README:

    Derived from WebKit, so BSD/LGPL 2/LGPL 2.1.

    The specific BSD is not identified, neither in ttf2eot, nor in WebKit itself. I suppose one might dig it from WebKit's source files, but I'm not confident I'd be able to determine it with sufficient certainty. I'd suggest keeping the license expression pointing to LGPL-2.1 alone as it's the only thing we can be certain of at this point, and maybe leaving the comment with the explanation. See also cdba946 from #59030.

Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @waldyrious!

A few comments:

Formula/ipfs.rb Outdated
@@ -4,8 +4,7 @@ class Ipfs < Formula
url "https://github.com/ipfs/go-ipfs.git",
tag: "v0.7.0",
revision: "ea77213e31ef2b3cad81d40bf82bb9baef3ea7b6"
# license ["Apache-2.0", "MIT"] - pending https://github.com/Homebrew/brew/pull/7953
license "Apache-2.0"
license any_of: ["Apache-2.0", "MIT"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to handle this exactly. According to the license file:

This project is transitioning from an MIT-only license to a dual MIT/Apache-2.0 license.
Unless otherwise noted, all code contributed prior to 2019-05-06 and not contributed by
a user listed in this signoff issue is
licensed under MIT-only. All new contributions (and past contributions since 2019-05-06)
are licensed under a dual MIT/Apache-2.0 license.

I don't think we can use :any_of because that implies that the MIT doesn't have to apply. In reality, it seems to be MIT and the option of Apache-2.0 as well. It feels like maybe it should be:

  license all_of: [
    "MIT",
    any_of: ["MIT", "Apache-2.0"],
  ]

Probably good to get another maintainer opinion on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable to me. I'll make the change you're proposing, but will be happy to update to follow whatever consensus emerges.

Formula/libical.rb Outdated Show resolved Hide resolved
Formula/libfreenect.rb Outdated Show resolved Hide resolved
Formula/libiodbc.rb Outdated Show resolved Hide resolved
Formula/libnice.rb Outdated Show resolved Hide resolved
Formula/peg-markdown.rb Outdated Show resolved Hide resolved
Formula/plenv.rb Outdated Show resolved Hide resolved
Formula/rainbarf.rb Outdated Show resolved Hide resolved
Formula/transmission-cli.rb Outdated Show resolved Hide resolved
@@ -4,8 +4,7 @@ class Ttf2eot < Formula
url "https://github.com/wget/ttf2eot/archive/v0.0.3.tar.gz"
sha256 "f363c4f2841b6d0b0545b30462e3c202c687d002da3d5dec7e2b827a032a3a65"
# License: Derived from WebKit, so BSD/LGPL 2/LGPL 2.1.
# license ["LGPL-2.0", "BSD-*"] - pending https://github.com/Homebrew/brew/pull/7953
license "LGPL-2.0"
license any_of: ["LGPL-2.0", "BSD-*"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
license any_of: ["LGPL-2.0", "BSD-*"]
license any_of: ["LGPL-2.0-only", "BSD-2-Clause"]

Based on: https://webkit.org/licensing-webkit/. Didn't see any indication of -only or -or-later so went with -only. Maybe another maintainer can find some more info?

If we're not sure about that, we should probably:

Suggested change
license any_of: ["LGPL-2.0", "BSD-*"]
license :cannot_represent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do see at the end of that page this note:

WebKit open source web browser engine.
Copyright (C) 2015 Apple, Inc.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

Doesn't that make it clear the -or-later versioning is intended?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that's part of the standard -or-later and -only license.

See the SPDX entries for LGPL-2.0-only and LGPL-2.0-or-later. They both contain the above lines in the "How to Apply These Terms to Your New Libraries" section.

We really need to see the source files to see which header is used. That will be able to tell us whether -only or -or-later is more approriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. Well, that's confusing 🙃 I'll look into WebKit's source files, then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I cloned the repo (from this mirror) and ran a search in the source files. It seems pretty clear that the -or-later variant is the intended one:

$ rg -l 'the Free Software Foundation; either' | wc -l
2982

$ rg -l 'the Free Software Foundation; version' | wc -l
0

See also this commit for an example of the typical license headers they use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(That said, it seems that in this case we'd need to use all_of rather than any_of, since each file is only licensed under one of the two licenses; WDYT?)

@waldyrious
Copy link
Contributor Author

waldyrious commented Nov 22, 2020

Thanks for the thorough review @Rylan12! I'll make the obvious changes right away, and will leave the unclear ones to when others have a chance to chime in.

@BrewTestBot BrewTestBot removed the automerge-skip `brew pr-automerge` will skip this pull request label Nov 22, 2020
@Rylan12 Rylan12 added the CI-syntax-only Change only affects brew syntax, not the install. Only run syntax CI. label Nov 23, 2020
@@ -3,7 +3,7 @@ class Mongoose < Formula
homepage "https://github.com/cesanta/mongoose"
url "https://github.com/cesanta/mongoose/archive/6.17.tar.gz"
sha256 "5bff3cc70bb2248cf87d06a3543f120f3b29b9368d25a7715443cb10612987cc"
license any_of: ["GPL-2.0", "Cesanta"]
license any_of: ["GPL-2.0-only"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, maybe I wasn't clear enough here. No quotes or brackets needed:

Suggested change
license any_of: ["GPL-2.0-only"]
license "GPL-2.0-only"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! That was definitely an overlook on my side — it was late here 😅 I'll update.

@Rylan12
Copy link
Member

Rylan12 commented Nov 23, 2020

Additionally, next time you update the PR, can you separate the changes to one-commit-per-formula with the message formula: update license expression to new syntax (or similar) for each?

Thanks, again!

@waldyrious waldyrious force-pushed the update-license-expressions branch from 7c50247 to 9ac365f Compare November 23, 2020 23:00
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@Rylan12
Copy link
Member

Rylan12 commented Nov 24, 2020

Thanks, @waldyrious!

@waldyrious waldyrious deleted the update-license-expressions branch November 24, 2020 18:57
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 25, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 25, 2020
@chenrui333 chenrui333 added the license License PRs label Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI-syntax-only Change only affects brew syntax, not the install. Only run syntax CI. license License PRs outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants