From a24d15d94239d93259eee11f054742343d8ec389 Mon Sep 17 00:00:00 2001 From: Michka Popoff Date: Wed, 6 Sep 2023 21:26:39 +0200 Subject: [PATCH] terraform: add audit for relicensing See also https://github.com/Homebrew/homebrew-core/pull/139538 --- 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 aa579f2ebb909..05bea08423a40 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -497,6 +497,17 @@ def audit_elasticsearch_kibana "They must not be upgraded to version 7.11 or newer." end + TERRAFORM_RELICENSED_VERSION = "1.6" + + def audit_terraform + return if formula.name != "terraform" + return unless @core_tap + return if formula.version < Version.new(TERRAFORM_RELICENSED_VERSION) + + problem "Terraform was relicensed to a non-open-source license from version 1.6. " \ + "It must not be upgraded to version 1.6 or newer." + end + def audit_keg_only_reason return unless @core_tap return unless formula.keg_only?