summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <jmccrae@chf.io>2022-05-08 13:01:24 +0600
committerNeha Pansare <neha.pansare@progress.com>2022-05-09 15:21:50 +0530
commitd8e3ed3e3e3e22ee75e15afe2b814b792ccc0e66 (patch)
tree12209281a625b05a4d3c717a9d0fecb739e82a52
parent9d518ac61d6003f675f1860e3861c42895818632 (diff)
downloadchef-17_backport_mac_fix.tar.gz
Updated the recipe to remove Git completely before updating it.17_backport_mac_fix
Signed-off-by: John McCrae <jmccrae@chf.io>
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/macos.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
index 213ef2d516..551bc9dbe8 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
@@ -66,6 +66,36 @@ chef_client_launchd "Every 30 mins Infra Client run" do
action :enable
end
+### Begin MacOS nonsense
+# What you see below here is a pile of crazy.
+# The End-To-End recipe wants to update git on MacOS to the latest version.
+# MacOS doesn't like this. We get back symlink update errors, et al
+# We then have to use this to take control of enough of the OS
+# to update git without actually hurting anything else. UGH
+
+file "/usr/local/var/homebrew/locks/git@2.35.1.formula.lock" do
+ mode "0777"
+ owner "root"
+end
+
+file "/usr/local/Cellar/git@2.35.1/2.35.1/etc/bash_completion.d/git-completion.bash" do
+ mode "0777"
+ owner "root"
+end
+
+execute "changing ownership of the git cask" do
+ command "chmod -R 777 /usr/local/Cellar/git@2.35.1"
+ live_stream true
+end
+
+execute "Sledge Hammer removal of the offending Git version" do
+ command "rm -rf /usr/local/Cellar/git@2.35.1"
+ live_stream true
+end
+
+### End MacOS nonsense
+
+# Now back to your regularly scheduled build, now in progress.
include_recipe "git"
# test various archive formats in the archive_file resource