diff --git a/config/patches/chef-gem/drop-net-http-warning.patch b/config/patches/chef-gem/drop-net-http-warning.patch new file mode 100644 index 0000000000000000000000000000000000000000..78281d582d8ec5fa6f11dd7a4937d05dadbe8ee0_Y29uZmlnL3BhdGNoZXMvY2hlZi1nZW0vZHJvcC1uZXQtaHR0cC13YXJuaW5nLnBhdGNo --- /dev/null +++ b/config/patches/chef-gem/drop-net-http-warning.patch @@ -0,0 +1,11 @@ +diff --git a/lib/chef/monkey_patches/net-http.rb b/lib/chef/monkey_patches/net-http.rb +index 19fb9ab39d..7a34a67a32 100644 +--- a/lib/chef/monkey_patches/net-http.rb ++++ b/lib/chef/monkey_patches/net-http.rb +@@ -122,6 +122,4 @@ if RUBY_VERSION.split(".")[0..1].join(".") == "3.1" + end + end + end +-else +- warn "Not applying net/http monkey patch needed for ruby 3.1" + end diff --git a/config/software/chef-gem.rb b/config/software/chef-gem.rb index aa4a53062827750b7fa51ce6568f1b0b2e0cf97d_Y29uZmlnL3NvZnR3YXJlL2NoZWYtZ2VtLnJi..78281d582d8ec5fa6f11dd7a4937d05dadbe8ee0_Y29uZmlnL3NvZnR3YXJlL2NoZWYtZ2VtLnJi 100644 --- a/config/software/chef-gem.rb +++ b/config/software/chef-gem.rb @@ -48,5 +48,8 @@ patch source: "utf8-locale-support.patch", target: "#{gem_path}/gems/chef-config-#{version}/lib/chef-config/config.rb" + + patch source: "drop-net-http-warning.patch", + target: "#{gem_path}/gems/chef-#{version}/lib/chef/monkey_patches/net-http.rb" end end