diff options
author | John McCrae <jmccrae@chf.io> | 2022-05-08 13:01:24 +0600 |
---|---|---|
committer | Neha Pansare <neha.pansare@progress.com> | 2022-05-09 15:29:03 +0530 |
commit | acc0bcc33b58b0ed063608a0ceb0e36ce1253269 (patch) | |
tree | e81738fd2c7ba48ea1c990671ef82faaba565132 | |
parent | 44c3afb20db7a4d1fbaa464654f6569dacc92b55 (diff) | |
download | chef-16_backport_mac_git_fix.tar.gz |
Updated the recipe to remove Git completely before updating it.16_backport_mac_git_fix
Signed-off-by: John McCrae <jmccrae@chf.io>
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/macos.rb | 33 |
1 files changed, 33 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 730af7305c..c1e2690bbf 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb @@ -54,6 +54,39 @@ 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 %w{tourism.tar.gz tourism.tar.xz tourism.zip}.each do |archive| cookbook_file File.join(Chef::Config[:file_cache_path], archive) do |