mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
formula_auditor: generalize relicensed formula audit
Signed-off-by: Patrick Linnane <patrick@linnane.io>
This commit is contained in:
parent
216c79cebd
commit
df84883f12
@ -484,53 +484,32 @@ module Homebrew
|
|||||||
"which allows them to use our Linux bottles, which were compiled against system glibc on CI."
|
"which allows them to use our Linux bottles, which were compiled against system glibc on CI."
|
||||||
end
|
end
|
||||||
|
|
||||||
ELASTICSEARCH_KIBANA_RELICENSED_VERSION = "7.11"
|
RELICENSED_FORMULAE_VERSIONS = {
|
||||||
|
"boundary" => "0.14",
|
||||||
def audit_elasticsearch_kibana
|
"consul" => "1.17",
|
||||||
return if formula.name != "elasticsearch" && formula.name != "kibana"
|
"elasticsearch" => "7.11",
|
||||||
return unless @core_tap
|
"kibana" => "7.11",
|
||||||
return if formula.version < Version.new(ELASTICSEARCH_KIBANA_RELICENSED_VERSION)
|
"nomad" => "1.7",
|
||||||
|
"packer" => "1.10",
|
||||||
problem "Elasticsearch and Kibana were relicensed to a non-open-source license from version 7.11. " \
|
"redis" => "7.4",
|
||||||
"They must not be upgraded to version 7.11 or newer."
|
"terraform" => "1.6",
|
||||||
end
|
"vagrant" => "2.4",
|
||||||
|
"vagrant-completion" => "2.4",
|
||||||
# https://www.hashicorp.com/license-faq#products-covered-by-bsl
|
"vault" => "1.15",
|
||||||
HASHICORP_RELICENSED_FORMULAE_VERSIONS = {
|
"waypoint" => "0.12",
|
||||||
"terraform" => "1.6",
|
|
||||||
"packer" => "1.10",
|
|
||||||
"vault" => "1.15",
|
|
||||||
"boundary" => "0.14",
|
|
||||||
"consul" => "1.17",
|
|
||||||
"nomad" => "1.7",
|
|
||||||
"waypoint" => "0.12",
|
|
||||||
"vagrant" => "2.4",
|
|
||||||
"vagrant-compleion" => "2.4",
|
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
def audit_hashicorp_formulae
|
def audit_relicensed_formulae
|
||||||
return unless HASHICORP_RELICENSED_FORMULAE_VERSIONS.key? formula.name
|
return unless RELICENSED_FORMULAE_VERSIONS.key? formula.name
|
||||||
return unless @core_tap
|
return unless @core_tap
|
||||||
|
|
||||||
relicensed_version = Version.new(HASHICORP_RELICENSED_FORMULAE_VERSIONS[formula.name])
|
relicensed_version = Version.new(RELICENSED_FORMULAE_VERSIONS[formula.name])
|
||||||
return if formula.version < relicensed_version
|
return if formula.version < relicensed_version
|
||||||
|
|
||||||
problem "#{formula.name} was relicensed to a non-open-source license from version #{relicensed_version}. " \
|
problem "#{formula.name} was relicensed to a non-open-source license from version #{relicensed_version}. " \
|
||||||
"It must not be upgraded to version #{relicensed_version} or newer."
|
"It must not be upgraded to version #{relicensed_version} or newer."
|
||||||
end
|
end
|
||||||
|
|
||||||
# https://redis.com/blog/redis-adopts-dual-source-available-licensing
|
|
||||||
REDIS_RELICENSED_VERSION = "7.4"
|
|
||||||
|
|
||||||
def audit_redis
|
|
||||||
return if formula.name != "redis"
|
|
||||||
return unless @core_tap
|
|
||||||
return if formula.version < Version.new(REDIS_RELICENSED_VERSION)
|
|
||||||
|
|
||||||
problem "Redis was relicensed to a non-open-source license from version 7.4. " \
|
|
||||||
"It must not be upgraded to version 7.4 or newer."
|
|
||||||
end
|
|
||||||
|
|
||||||
def audit_keg_only_reason
|
def audit_keg_only_reason
|
||||||
return unless @core_tap
|
return unless @core_tap
|
||||||
return unless formula.keg_only?
|
return unless formula.keg_only?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user