formula_auditor: disallow SSPL.

The SSPL is not an open-source license, but it is recognised by SPDX.

See Homebrew/homebrew-core#109801.
This commit is contained in:
Carlo Cabrera 2022-09-13 19:22:11 +08:00
parent 427f6465e9
commit dfd5895970
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -196,6 +196,13 @@ module Homebrew
if formula.license.present?
licenses, exceptions = SPDX.parse_license_expression formula.license
sspl_licensed = licenses.any? { |license| license.start_with?("SSPL") }
if sspl_licensed && @core_tap
problem <<~EOS
Formula #{formula.name} is SSPL-licensed. Software under the SSPL must not be packaged in homebrew/core.
EOS
end
non_standard_licenses = licenses.reject { |license| SPDX.valid_license? license }
if non_standard_licenses.present?
problem <<~EOS