Skip to content

Commit

Permalink
formula_auditor: make deprecate license check non-strict in core
Browse files Browse the repository at this point in the history
Also add some more incompatible licenses. These are all not allowed by
Fedora and have are classified as not OSI and FSF approved on SPDX.
  • Loading branch information
cho-m committed Sep 4, 2024
1 parent 7683b22 commit a43a6dd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Library/Homebrew/formula_auditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,12 @@ def audit_name

# The following licenses are non-free/open based on multiple sources (e.g. Debian, Fedora, FSF, OSI, ...)
INCOMPATIBLE_LICENSES = [
"JSON", # https://wiki.debian.org/DFSGLicenses#JSON_evil_license
"OPL-1.0", # https://wiki.debian.org/DFSGLicenses#Open_Publication_License_.28OPL.29_v1.0
"Aladdin", # https://www.gnu.org/licenses/license-list.html#Aladdin
"CPOL-1.02", # https://www.gnu.org/licenses/license-list.html#cpol
"gSOAP-1.3b", # https://salsa.debian.org/ellert/gsoap/-/blob/master/debian/copyright
"JSON", # https://wiki.debian.org/DFSGLicenses#JSON_evil_license
"MS-LPL", # https://github.com/spdx/license-list-XML/issues/1432#issuecomment-1077680709
"OPL-1.0", # https://wiki.debian.org/DFSGLicenses#Open_Publication_License_.28OPL.29_v1.0
].freeze
INCOMPATIBLE_LICENSE_PREFIXES = [
"BUSL", # https://spdx.org/licenses/BUSL-1.1.html#notes
Expand All @@ -222,7 +226,7 @@ def audit_license
problem <<~EOS
Formula #{formula.name} contains incompatible licenses: #{incompatible_licenses}.
Formulae in homebrew/core must either use a Debian Free Software Guidelines license
or be released into the public domain. See https://docs.brew.sh/License-Guidelines
or be released into the public domain. See #{Formatter.url("https://docs.brew.sh/License-Guidelines")}
EOS
end

Expand All @@ -234,7 +238,7 @@ def audit_license
EOS
end

if @strict
if @strict || @core_tap
deprecated_licenses = licenses.select do |license|
SPDX.deprecated_license? license
end
Expand Down

0 comments on commit a43a6dd

Please sign in to comment.