From 141edc8506ef72f5b8700d59c72615517964a0b7 Mon Sep 17 00:00:00 2001 From: Nanda H Krishna Date: Thu, 3 Jun 2021 00:33:27 +0530 Subject: [PATCH] formula_auditor: add audit for elasticsearch and kibana Prevent upgrading them to version 7.11 or newer, as they were relicensed to an incompatible license. --- Library/Homebrew/formula_auditor.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index 5a69bc751c..06b54db3c0 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -353,6 +353,17 @@ module Homebrew "which allows them to use our Linux bottles, which were compiled against system Glibc on CI." end + ELASTICSEARCH_KIBANA_RELICENSED_VERSION = "7.11" + + def audit_elasticsearch_kibana + return if formula.name != "elasticsearch" && formula.name != "kibana" + return unless @core_tap + return if formula.version < Version.new(ELASTICSEARCH_KIBANA_RELICENSED_VERSION) + + problem "Elasticsearch and Kibana were relicensed to a non-open-source license from version 7.11. " \ + "They must not be upgraded to version 7.11 or newer." + end + def audit_versioned_keg_only return unless @versioned_formula return unless @core_tap