From dfd5895970b8f520623559ac8fbd43f73ca934fa Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Tue, 13 Sep 2022 19:22:11 +0800 Subject: [PATCH] formula_auditor: disallow SSPL. The SSPL is not an open-source license, but it is recognised by SPDX. See Homebrew/homebrew-core#109801. --- Library/Homebrew/formula_auditor.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index 39bb27a5f8..0b229b50b4 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -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