summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2022-06-29 16:00:38 -0700
committerBapu L <bapu.labade@progress.com>2022-08-12 14:41:27 +0530
commit0de02578288a76a3c2a94d0f87a1539e6b86eff8 (patch)
tree90d1a0c9fc8468713bc27734d0400abd53d16264
parent84e958199abfd7e55ba93eebf1c1c7c5e954a064 (diff)
downloadchef-backport_devkit_adhoc.tar.gz
use new msys2 devkit for windowsbackport_devkit_adhoc
Signed-off-by: Matt Wrock <matt@mattwrock.com>
-rw-r--r--omnibus/config/projects/chef.rb6
-rw-r--r--omnibus/omnibus-test.ps14
-rw-r--r--omnibus_overrides.rb2
-rw-r--r--spec/support/shared/functional/windows_script.rb4
4 files changed, 7 insertions, 9 deletions
diff --git a/omnibus/config/projects/chef.rb b/omnibus/config/projects/chef.rb
index dd22f4654c..94c0236841 100644
--- a/omnibus/config/projects/chef.rb
+++ b/omnibus/config/projects/chef.rb
@@ -62,11 +62,7 @@ dependency "version-manifest"
dependency "openssl-customization"
# devkit needs to come dead last these days so we do not use it to compile any gems
-if windows?
- override :"ruby-windows-devkit", version: "4.5.2-20111229-1559" if windows_arch_i386?
- dependency "ruby-windows-devkit"
- dependency "ruby-windows-devkit-bash"
-end
+dependency "ruby-msys2-devkit" if windows?
dependency "ruby-cleanup"
diff --git a/omnibus/omnibus-test.ps1 b/omnibus/omnibus-test.ps1
index 71af497dd1..75d508a69f 100644
--- a/omnibus/omnibus-test.ps1
+++ b/omnibus/omnibus-test.ps1
@@ -69,7 +69,9 @@ If ($lastexitcode -ne 0) { Throw $lastexitcode }
& $embedded_bin_dir\rspec.bat --version
If ($lastexitcode -ne 0) { Throw $lastexitcode }
-$Env:PATH = "C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;$Env:PATH"
+# We add C:\Program Files\Git\bin to the path to ensure the git bash shell is included
+# Omnibus puts C:\Program Files\Git\mingw64\bin which has git.exe but not bash.exe
+$Env:PATH = "C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;C:\Program Files\Git\bin;$Env:PATH"
# Test against the vendored chef gem (cd into the output of "gem which chef")
$chefdir = gem which chef
diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb
index f0862efdaa..2d382b0a4d 100644
--- a/omnibus_overrides.rb
+++ b/omnibus_overrides.rb
@@ -16,7 +16,7 @@ override "nokogiri", version: "1.13.1"
override "openssl", version: mac_os_x? ? "1.1.1m" : "1.0.2zb"
override "pkg-config-lite", version: "0.28-1"
override "ruby", version: "3.0.3"
-override "ruby-windows-devkit-bash", version: "3.1.23-4-msys-1.0.18"
+override "ruby-msys2-devkit", version: "3.0.3-1"
override "util-macros", version: "1.19.0"
override "xproto", version: "7.0.28"
override "zlib", version: "1.2.11"
diff --git a/spec/support/shared/functional/windows_script.rb b/spec/support/shared/functional/windows_script.rb
index 151ad2387c..1db85e35f5 100644
--- a/spec/support/shared/functional/windows_script.rb
+++ b/spec/support/shared/functional/windows_script.rb
@@ -163,7 +163,7 @@ shared_context Chef::Resource::WindowsScript do
describe "when the run action is invoked on Windows" do
it "executes the script code" do
- resource.code("whoami > \"#{script_output_path}\"")
+ resource.code("chcp > \"#{script_output_path}\"")
resource.returns(0)
resource.run_action(:run)
end
@@ -199,7 +199,7 @@ shared_context Chef::Resource::WindowsScript do
end
it "executes the script code" do
- resource.code("whoami > \"#{script_output_path}\"")
+ resource.code("chcp > \"#{script_output_path}\"")
resource.returns(0)
resource.run_action(:run)
end