diff options
author | John McCrae <john.mccrae@progress.com> | 2022-12-20 17:49:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 17:49:16 -0800 |
commit | ce230dfe799f2f37929fa8c05732a2a766d4be92 (patch) | |
tree | 651a0be6a5fdda630d736b8f38489174d27c49cf | |
parent | b9a77383d659bfba014cfd920f515a4e6df02819 (diff) | |
parent | 9d1c8e2e71184a64ad23152e8a27b11e1986b494 (diff) | |
download | chef-ce230dfe799f2f37929fa8c05732a2a766d4be92.tar.gz |
Merge pull request #13447 from chef/dependabot/bundler/omnibus/chef-16/omnibus-software-2be3816
Bump omnibus-software from `f2e9a99` to `2be3816` in /omnibus
-rw-r--r-- | .expeditor/config.yml | 1 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 2 | ||||
-rw-r--r-- | .rubocop.yml | 2 | ||||
-rw-r--r-- | Gemfile | 3 | ||||
-rw-r--r-- | Gemfile.lock | 121 | ||||
-rw-r--r-- | chef-config/chef-config.gemspec | 2 | ||||
-rw-r--r-- | chef-utils/chef-utils.gemspec | 2 | ||||
-rw-r--r-- | chef.gemspec | 2 | ||||
-rw-r--r-- | habitat/plan.ps1 | 30 | ||||
-rw-r--r-- | omnibus/Gemfile.lock | 8 | ||||
-rw-r--r-- | omnibus/omnibus-test.ps1 | 35 |
11 files changed, 134 insertions, 74 deletions
diff --git a/.expeditor/config.yml b/.expeditor/config.yml index 62570f917e..2590a61bf8 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -39,6 +39,7 @@ pipelines: definition: .expeditor/release.omnibus.yml env: - ADHOC: true + - IGNORE_CACHE: true github: # This deletes the GitHub PR branch after successfully merged into the release branch diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2ff15e762b..e5377e001a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 2.7 bundler-cache: true - uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR - run: bundle exec chefstyle -c .rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml index b88ed74196..84bbcc8191 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 2.6 + TargetRubyVersion: 2.7 Exclude: - "spec/data/**/*" - "vendor/**/*" @@ -3,6 +3,9 @@ source "https://rubygems.org" # 1.15+ is required for M1 mac builds gem "ffi", ">=1.15" +# Nwed to file a bug with rest-client. In the meantime, we can use this until they accept the update. +gem "rest-client", ">=2.1.0" + # Note we do not use the gemspec DSL which restricts to the # gemspec for the current platform and filters out other platforms # during a bundle lock operation. We actually want dependencies from diff --git a/Gemfile.lock b/Gemfile.lock index 6fc8939001..0c5c44b156 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -132,8 +132,8 @@ PATH GEM remote: https://rubygems.org/ specs: - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) appbundler (0.13.4) mixlib-cli (>= 1.4, < 3.0) mixlib-shellout (>= 2.0, < 4.0) @@ -170,24 +170,16 @@ GEM rexml debug_inspector (1.1.0) diff-lcs (1.3) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) ed25519 (1.3.0) erubi (1.11.0) erubis (2.7.0) - faraday (1.4.3) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) + faraday (1.3.1) faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) multipart-post (>= 1.2, < 3) ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) faraday-net_http (1.0.1) - faraday-net_http_persistent (1.2.0) - faraday_middleware (1.2.0) - faraday (~> 1.0) fauxhai-ng (9.3.0) net-ssh ffi (1.15.5) @@ -208,22 +200,24 @@ GEM hashdiff (1.0.1) hashie (4.1.0) highline (2.0.3) + http-accept (1.7.0) + http-cookie (1.0.5) + domain_name (~> 0.5) httpclient (2.8.3) iniparse (1.5.0) - inspec-core (4.56.20) + inspec-core (4.24.32) addressable (~> 2.4) - chef-telemetry (~> 1.0, >= 1.0.8) - faraday (>= 0.9.0, < 1.5) - faraday_middleware (~> 1.0) + chef-telemetry (~> 1.0) + faraday (>= 0.9.0, < 1.4) hashie (>= 3.4, < 5.0) license-acceptance (>= 0.2.13, < 3.0) method_source (>= 0.8, < 2.0) mixlib-log (~> 3.0) multipart-post (~> 2.0) parallel (~> 1.9) - parslet (>= 1.5, < 2.0) + parslet (>= 1.5, < 3.0) pry (~> 0.13) - rspec (>= 3.9, <= 3.11) + rspec (~> 3.10) rspec-its (~> 1.2) rubyzip (>= 1.2.2, < 3.0) semverse (~> 3.0) @@ -233,11 +227,11 @@ GEM train-core (~> 3.0) tty-prompt (~> 0.17) tty-table (~> 0.10) - inspec-core-bin (4.56.20) - inspec-core (= 4.56.20) + inspec-core-bin (4.24.32) + inspec-core (= 4.24.32) ipaddress (0.8.3) iso8601 (0.13.0) - json (2.6.1) + json (2.6.3) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -249,13 +243,16 @@ GEM little-plugger (~> 1.1) multi_json (~> 1.14) method_source (1.0.0) + mime-types (3.4.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2022.0105) mixlib-archive (1.1.7) mixlib-log mixlib-archive (1.1.7-universal-mingw32) mixlib-log mixlib-authentication (3.0.10) mixlib-cli (2.1.8) - mixlib-config (3.0.9) + mixlib-config (3.0.27) tomlrb mixlib-log (3.0.9) mixlib-shellout (3.2.7) @@ -266,9 +263,9 @@ GEM win32-process (~> 0.9) wmi-lite (~> 1.0) multi_json (1.15.0) - multipart-post (2.1.1) - net-scp (3.0.0) - net-ssh (>= 2.6.5, < 7.0.0) + multipart-post (2.2.3) + net-scp (4.0.0) + net-ssh (>= 2.6.5, < 8.0.0) net-sftp (3.0.0) net-ssh (>= 5.0.0, < 7.0.0) net-ssh (6.1.0) @@ -277,11 +274,12 @@ GEM net-ssh-multi (1.2.1) net-ssh (>= 2.6.5) net-ssh-gateway (>= 1.2.0) + netrc (0.11.0) nori (2.6.0) parallel (1.22.1) - parser (3.1.2.0) + parser (3.1.3.0) ast (~> 2.4.1) - parslet (1.8.2) + parslet (2.0.0) pastel (0.8.0) tty-color (~> 0.5) plist (3.6.0) @@ -289,35 +287,52 @@ GEM pry (0.13.0) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) + pry-byebug (3.10.1) byebug (~> 11.0) - pry (~> 0.13.0) + pry (>= 0.13, < 0.15) pry-stack_explorer (0.6.1) binding_of_caller (~> 1.0) pry (~> 0.13) - public_suffix (4.0.7) - rack (2.2.3) + public_suffix (5.0.1) + rack (2.2.4) rainbow (3.1.1) rake (13.0.6) rb-readline (0.5.5) - regexp_parser (2.3.1) + regexp_parser (2.6.1) + rest-client (2.1.0) + http-accept (>= 1.7.0, < 2.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 4.0) + netrc (~> 0.8) + rest-client (2.1.0-x64-mingw32) + ffi (~> 1.9) + http-accept (>= 1.7.0, < 2.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 4.0) + netrc (~> 0.8) + rest-client (2.1.0-x86-mingw32) + ffi (~> 1.9) + http-accept (>= 1.7.0, < 2.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 4.0) + netrc (~> 0.8) rexml (3.2.5) - rspec (3.11.0) - rspec-core (~> 3.11.0) - rspec-expectations (~> 3.11.0) - rspec-mocks (~> 3.11.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) + rspec-support (~> 3.12.0) rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.11.1) + rspec-mocks (3.12.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-support (3.11.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.0) rubocop (1.7.0) parallel (~> 1.10) parser (>= 2.7.1.5) @@ -327,7 +342,7 @@ GEM rubocop-ast (>= 1.2.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.17.0) + rubocop-ast (1.24.0) parser (>= 3.1.1.0) ruby-prof (1.2.0) ruby-progressbar (1.11.0) @@ -335,7 +350,7 @@ GEM ruby2_keywords (0.0.5) rubyntlm (0.6.3) rubyzip (2.3.2) - semverse (3.0.0) + semverse (3.0.2) sslshake (1.3.1) strings (0.2.1) strings-ansi (~> 0.2) @@ -346,13 +361,13 @@ GEM syslog-logger (1.6.8) thor (1.2.1) tomlrb (1.3.0) - train-core (3.9.2) + train-core (3.10.7) addressable (~> 2.5) ffi (!= 1.13.0) json (>= 1.8, < 3.0) mixlib-shellout (>= 2.0, < 4.0) - net-scp (>= 1.2, < 4.0) - net-ssh (>= 2.9, < 7.0) + net-scp (>= 1.2, < 5.0) + net-ssh (>= 2.9, < 8.0) train-winrm (0.2.13) winrm (>= 2.3.6, < 3.0) winrm-elevated (~> 1.2.2) @@ -375,10 +390,15 @@ GEM pastel (~> 0.8) strings (~> 0.2.0) tty-screen (~> 0.8) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.2) + unf_ext (0.0.8.2-x64-mingw32) + unf_ext (0.0.8.2-x86-mingw32) unicode-display_width (1.8.0) unicode_utils (1.4.0) uuidtools (2.2.0) - webmock (3.14.0) + webmock (3.18.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -451,6 +471,7 @@ DEPENDENCIES pry-stack_explorer rake rb-readline + rest-client (>= 2.1.0) rspec ruby-prof (< 1.3.0) ruby-shadow diff --git a/chef-config/chef-config.gemspec b/chef-config/chef-config.gemspec index 08086ff25b..878cd75584 100644 --- a/chef-config/chef-config.gemspec +++ b/chef-config/chef-config.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/chef/chef" spec.license = "Apache-2.0" - spec.required_ruby_version = ">= 2.6.0" + spec.required_ruby_version = ">= 2.7" spec.metadata = { "bug_tracker_uri" => "https://github.com/chef/chef/issues", diff --git a/chef-utils/chef-utils.gemspec b/chef-utils/chef-utils.gemspec index 836fef1ff9..4dc7a39513 100644 --- a/chef-utils/chef-utils.gemspec +++ b/chef-utils/chef-utils.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/chef/chef/tree/master/chef-utils" spec.license = "Apache-2.0" - spec.required_ruby_version = ">= 2.6.0" + spec.required_ruby_version = ">= 2.7" spec.metadata = { "bug_tracker_uri" => "https://github.com/chef/chef/issues", diff --git a/chef.gemspec b/chef.gemspec index 0103a6d9e6..4a5cb9d785 100644 --- a/chef.gemspec +++ b/chef.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |s| s.email = "adam@chef.io" s.homepage = "https://www.chef.io" - s.required_ruby_version = ">= 2.6.0" + s.required_ruby_version = ">= 2.7" s.add_dependency "chef-config", "= #{Chef::VERSION}" s.add_dependency "chef-utils", "= #{Chef::VERSION}" diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index 88edb3ac72..262c0613da 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -76,7 +76,7 @@ function Invoke-Build { try { Push-Location "${HAB_CACHE_SRC_PATH}/${pkg_dirname}" - $env:_BUNDER_WINDOWS_DLLS_COPIED = "1" + $env:_BUNDLER_WINDOWS_DLLS_COPIED = "1" Write-BuildLine " ** Using bundler to retrieve the Ruby dependencies" bundle install --jobs=3 --retry=3 @@ -86,19 +86,31 @@ function Invoke-Build { try { Push-Location $git_gem Write-BuildLine " -- installing $git_gem" - rake install # this needs to NOT be 'bundle exec'd else bundler complains about dev deps not being installed - if (-not $?) { throw "unable to install $git_gem as a plain old gem" } + # The rest client doesn't have an 'Install' task so it bombs out when we call Rake Install for it + # Happily, its Rakefile ultimately calls 'gem build' to build itself with. We're doing that here. + if ($git_gem -match "rest-client"){ + $gemspec_path = $git_gem.ToString() + "\rest-client.windows.gemspec" + gem build $gemspec_path + $gem_path = $git_gem.ToString() + "\rest-client*.gem" + gem install $gem_path + } + else { + rake install $git_gem --trace=stdout # this needs to NOT be 'bundle exec'd else bundler complains about dev deps not being installed + } + if (-not $?) { throw "unable to install $($git_gem) as a plain old gem" } } finally { Pop-Location } } Write-BuildLine " ** Running the chef project's 'rake install' to install the path-based gems so they look like any other installed gem." - bundle exec rake install --trace=stdout # this needs to be 'bundle exec'd because a Rakefile makes reference to Bundler - if (-not $?) { - Write-Warning " -- That didn't work. Let's try again." - bundle exec rake install --trace=stdout # this needs to be 'bundle exec'd because a Rakefile makes reference to Bundler - if (-not $?) { throw "unable to install the gems that live in directories within this repo" } - } + $install_attempt = 0 + do { + Start-Sleep -Seconds 5 + $install_attempt++ + Write-BuildLine "Install attempt $install_attempt" + bundle exec rake install:local --trace=stdout + } while ((-not $?) -and ($install_attempt -lt 5)) + } finally { Pop-Location } diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index e5391a2c8a..0c30780502 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -1,9 +1,9 @@ GIT remote: https://github.com/chef/omnibus-software.git - revision: f2e9a996dfd115d8c1261a0d3bf281aaf76d3f8f + revision: 2be38169f587c99e0f18f9adb0387d572594cc90 branch: main specs: - omnibus-software (22.12.253) + omnibus-software (22.12.257) omnibus (>= 9.0.0) GIT @@ -34,8 +34,8 @@ GEM artifactory (3.0.15) awesome_print (1.9.2) aws-eventstream (1.2.0) - aws-partitions (1.673.0) - aws-sdk-core (3.168.3) + aws-partitions (1.680.0) + aws-sdk-core (3.168.4) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) diff --git a/omnibus/omnibus-test.ps1 b/omnibus/omnibus-test.ps1 index 9cb2314876..e7c35cf8f9 100644 --- a/omnibus/omnibus-test.ps1 +++ b/omnibus/omnibus-test.ps1 @@ -1,14 +1,37 @@ # Stop script execution when a non-terminating error occurs $ErrorActionPreference = "Stop" -# install chocolatey -Set-ExecutionPolicy Bypass -Scope Process -Force -[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 -iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) +# install choco as necessary +function installChoco { + + if (!(Test-Path "$($env:ProgramData)\chocolatey\choco.exe")) { + Write-Output "Chocolatey is not installed, proceeding to install" + try { + write-output "installing in 3..2..1.." + Set-ExecutionPolicy Bypass -Scope Process -Force + [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 + iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) + } + + catch { + Write-Error $_.Exception.Message + } + } + else { + Write-Output "Chocolatey is already installed" + } +} + +installChoco # install powershell core -Invoke-WebRequest "https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/PowerShell-7.0.3-win-x64.msi" -UseBasicParsing -OutFile powershell.msi -Start-Process msiexec.exe -Wait -ArgumentList "/package PowerShell.msi /quiet" +if ($PSVersionTable.PSVersion.Major -lt 7) { + $TLS12Protocol = [System.Net.SecurityProtocolType] 'Ssl3 , Tls12' + [System.Net.ServicePointManager]::SecurityProtocol = $TLS12Protocol + Invoke-WebRequest "https://github.com/PowerShell/PowerShell/releases/download/v7.3.0/PowerShell-7.3.0-win-x64.msi" -UseBasicParsing -OutFile powershell.msi + Start-Process msiexec.exe -Wait -ArgumentList "/package PowerShell.msi /quiet" +} + $env:path += ";C:\Program Files\PowerShell\7" # We don't want to add the embedded bin dir to the main PATH as this |