From e56fde65843cbc0083f64aacc97b0dc5d6b0eebd Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Sat, 13 Jul 2024 16:02:12 -0400 Subject: [PATCH 1/2] formula_installer: skip attestations on local_bottle_path Signed-off-by: William Woodruff --- Library/Homebrew/formula_installer.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index f2faedbe2951b..ec9f77a61a2e4 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1258,7 +1258,12 @@ def downloader def pour # We skip `gh` to avoid a bootstrapping cycle, in the off-chance a user attempts # to explicitly `brew install gh` without already having a version for bootstrapping. - if Homebrew::Attestation.enabled? && formula.tap&.core_tap? && formula.name != "gh" + # We also skip bottle installs from local bottle paths, as these are done in CI + # as part of the build lifecycle before attestations are produced. + if Homebrew::Attestation.enabled? \ + && formula.tap&.core_tap? \ + && formula.name != "gh" \ + && formula.local_bottle_path.blank? ohai "Verifying attestation for #{formula.name}" begin Homebrew::Attestation.check_core_attestation formula.bottle From 06daff1621dd683a4c3be2948cc71c3d501ab08f Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 13 Jul 2024 16:05:35 -0400 Subject: [PATCH 2/2] formula_installer: tweak style. --- Library/Homebrew/formula_installer.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index ec9f77a61a2e4..94249a6e499ef 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1260,10 +1260,10 @@ def pour # to explicitly `brew install gh` without already having a version for bootstrapping. # We also skip bottle installs from local bottle paths, as these are done in CI # as part of the build lifecycle before attestations are produced. - if Homebrew::Attestation.enabled? \ - && formula.tap&.core_tap? \ - && formula.name != "gh" \ - && formula.local_bottle_path.blank? + if Homebrew::Attestation.enabled? && + formula.tap&.core_tap? && + formula.name != "gh" && + formula.local_bottle_path.blank? ohai "Verifying attestation for #{formula.name}" begin Homebrew::Attestation.check_core_attestation formula.bottle