diff --git a/.expeditor/config.yml b/.expeditor/config.yml index e15af1f3d..5b1081041 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -33,7 +33,7 @@ pipelines: definition: .expeditor/release.omnibus.yml env: - ADHOC: true - - IGNORE_ARTIFACTORY_RUBY_PROXY: true + - IGNORE_ARTIFACTORY_RUBY_PROXY: true - third-party-packages: description: post-release publishing of Workstation packages to third party distribution platforms @@ -122,9 +122,6 @@ subscriptions: - workload: ruby_gem_published:chefspec-* actions: - bash:.expeditor/update_dep.sh - - workload: ruby_gem_published:chefstyle-* - actions: - - bash:.expeditor/update_dep.sh - workload: ruby_gem_published:cookbook-omnifetch-* actions: - bash:.expeditor/update_dep.sh diff --git a/Gemfile b/Gemfile index d2fef698f..6406b6e7f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,8 @@ source "https://rubygems.org" group :development do - gem "chefstyle" + gem "cookstyle", git: "https://github.com/chef/cookstyle", branch: "main" + gem "rubocop-performance" gem "rake" # enable tests for the verification behavior in omnibus/verification gem "chef-cli" @@ -9,4 +10,3 @@ group :development do gem "simplecov", require: false end - diff --git a/Rakefile b/Rakefile index 993b53c02..a0c571cb3 100644 --- a/Rakefile +++ b/Rakefile @@ -1,12 +1,12 @@ begin - require "chefstyle" + require "cookstyle/chefstyle" require "rubocop/rake_task" - desc "Run Chefstyle tests" + desc "Run Cookstyle tests" RuboCop::RakeTask.new(:style) do |task| task.options += ["--display-cop-names", "--no-color"] end rescue LoadError - puts "chefstyle gem is not installed. bundle install first to make sure all dependencies are installed." + puts "cookstyle gem is not installed. bundle install first to make sure all dependencies are installed." end task default: %i{style} diff --git a/components/gems/Gemfile b/components/gems/Gemfile index d126387e1..477ad77c6 100644 --- a/components/gems/Gemfile +++ b/components/gems/Gemfile @@ -25,7 +25,7 @@ group(:omnibus_package, :development, :test) do gem "rake", "= 13.0.1" # prevent double rake as of 12.2020 gem "guard" - gem "cookstyle", ">= 7.8" + gem "cookstyle", git: "https://github.com/chef/cookstyle", branch: "main" gem "ffi-libarchive" # The current version of OpenSSL that we are bundling with chef-workstation is 3.0.11 @@ -132,8 +132,6 @@ group(:ruby_shadow) do gem "ruby-shadow", git: "https://github.com/chef/ruby-shadow", branch: "lcg/ruby-3.0", platforms: :ruby unless RUBY_PLATFORM == "x64-mingw-ucrt" end -gem "chefstyle", group: :test - # Ensure support for push-client on Windows if RUBY_PLATFORM.match?(/mswin|mingw|windows/) gem "rdp-ruby-wmi" diff --git a/components/gems/Gemfile.lock b/components/gems/Gemfile.lock index a816c48bd..034abd4ac 100644 --- a/components/gems/Gemfile.lock +++ b/components/gems/Gemfile.lock @@ -1,3 +1,13 @@ +GIT + remote: https://github.com/chef/cookstyle + revision: 8aeda8c8f9a8d51bc98b3a1fb66f91d7bcdd1fb2 + branch: main + specs: + cookstyle (7.32.14) + base64 + ostruct + rubocop (= 1.25.1) + GIT remote: https://github.com/chef/ruby-shadow revision: 3b8ea40b0e943b5de721d956741308ce805a5c3c @@ -19,9 +29,9 @@ GEM mixlib-cli (>= 1.4, < 3.0) mixlib-shellout (>= 2.0, < 4.0) artifactory (3.0.17) - ast (2.4.2) - aws-eventstream (1.3.0) - aws-partitions (1.1043.0) + ast (2.4.3) + aws-eventstream (1.3.2) + aws-partitions (1.1078.0) aws-sdk-account (1.35.0) aws-sdk-core (~> 3, >= 3.210.0) aws-sigv4 (~> 1.1) @@ -94,11 +104,13 @@ GEM aws-sdk-configservice (1.123.0) aws-sdk-core (~> 3, >= 3.210.0) aws-sigv4 (~> 1.5) - aws-sdk-core (3.217.0) + aws-sdk-core (3.222.1) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) + base64 jmespath (~> 1, >= 1.6.1) + logger aws-sdk-costandusagereportservice (1.68.0) aws-sdk-core (~> 3, >= 3.210.0) aws-sigv4 (~> 1.5) @@ -165,7 +177,7 @@ GEM aws-sdk-kinesis (1.71.0) aws-sdk-core (~> 3, >= 3.210.0) aws-sigv4 (~> 1.5) - aws-sdk-kms (1.97.0) + aws-sdk-kms (1.99.0) aws-sdk-core (~> 3, >= 3.216.0) aws-sigv4 (~> 1.5) aws-sdk-lambda (1.144.0) @@ -201,7 +213,7 @@ GEM aws-sdk-route53resolver (1.74.0) aws-sdk-core (~> 3, >= 3.210.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.179.0) + aws-sdk-s3 (1.183.0) aws-sdk-core (~> 3, >= 3.216.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) @@ -397,11 +409,11 @@ GEM tty-spinner chef-bin (18.6.2) chef (= 18.6.2) - chef-cli (5.6.16) + chef-cli (5.6.18) addressable (>= 2.3.5, < 2.9) chef (~> 18.0) cookbook-omnifetch (~> 0.5) - diff-lcs (>= 1.0, < 1.4) + diff-lcs (>= 1.2.4, < 1.6.0, != 1.4.0) ffi-yajl (>= 1.0, < 3.0) license-acceptance (>= 1.0.11, < 3) minitar (~> 0.6) @@ -432,11 +444,13 @@ GEM chef-utils (18.6.2) concurrent-ruby chef-vault (4.1.11) - chef-zero (15.0.11) + chef-zero (15.0.17) + activesupport (~> 7.0, < 7.1) ffi-yajl (~> 2.2) hashie (>= 2.0, < 5.0) mixlib-log (>= 2.0, < 4.0) - rack (~> 2.0, >= 2.0.6) + rack (~> 3.1, >= 3.1.10) + rackup (~> 2.2, >= 2.2.1) uuidtools (~> 2.1) webrick chef_deprecations (0.2.0) @@ -452,8 +466,6 @@ GEM logger (< 1.6) rspec (~> 3.0) rspec-expectations (<= 3.12.3) - chefstyle (2.2.3) - rubocop (= 1.25.1) citrus (3.0.2) cleanroom (1.0.0) coderay (1.1.3) @@ -463,8 +475,6 @@ GEM connection_pool (2.4.1) cookbook-omnifetch (0.12.2) mixlib-archive (>= 0.4, < 2.0) - cookstyle (7.32.8) - rubocop (= 1.25.1) corefoundation (0.3.13) ffi (>= 1.15.0) date (3.4.1) @@ -476,7 +486,7 @@ GEM ffi (~> 1.9) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - diff-lcs (1.3) + diff-lcs (1.5.1) docker-api (2.4.0) excon (>= 0.64.0) multi_json @@ -633,7 +643,8 @@ GEM http-accept (1.7.0) http-cookie (1.0.8) domain_name (~> 0.5) - httpclient (2.8.3) + httpclient (2.9.0) + mutex_m i18n (1.14.7) concurrent-ruby (~> 1.0) ice_nine (0.11.2) @@ -679,7 +690,7 @@ GEM ipaddress (0.8.3) iso8601 (0.13.0) jmespath (1.6.2) - json (2.9.1) + json (2.10.2) jsonpath (1.1.5) multi_json jwt (2.9.3) @@ -840,14 +851,14 @@ GEM mixlib-shellout memoist (0.16.2) method_source (1.1.0) - mime-types (3.6.0) + mime-types (3.6.2) logger mime-types-data (~> 3.2015) - mime-types-data (3.2025.0107) + mime-types-data (3.2025.0325) mini_mime (1.1.5) mini_portile2 (2.8.8) minitar (0.12.1) - minitest (5.25.4) + minitest (5.25.5) mixlib-archive (1.1.7) mixlib-log mixlib-archive (1.1.7-universal-mingw32) @@ -862,14 +873,14 @@ GEM thor mixlib-log (3.2.0) ffi (~> 1.9, <= 1.17.0) - mixlib-shellout (3.3.6) + mixlib-shellout (3.3.8) chef-utils - mixlib-shellout (3.3.6-universal-mingw32) + mixlib-shellout (3.3.8-universal-mingw32) chef-utils ffi-win32-extensions (~> 1.0.3) win32-process (~> 0.9) wmi-lite (~> 1.0) - mixlib-shellout (3.3.6-x64-mingw-ucrt) + mixlib-shellout (3.3.8-x64-mingw-ucrt) chef-utils ffi-win32-extensions (~> 1.0.3) win32-process (~> 0.9) @@ -898,7 +909,7 @@ GEM ms_rest2 (~> 1.0) multi_json (1.15.0) multipart-post (2.4.1) - mutex_m (0.2.0) + mutex_m (0.3.0) nenv (0.3.0) net-ftp (0.3.8) net-protocol @@ -951,8 +962,9 @@ GEM optimist (3.2.0) options (2.3.2) os (1.1.4) + ostruct (0.6.1) parallel (1.26.3) - parser (3.3.7.0) + parser (3.3.7.4) ast (~> 2.4.1) racc parslet (2.0.0) @@ -960,6 +972,7 @@ GEM pastel (0.8.0) tty-color (~> 0.5) plist (3.7.2) + prism (1.4.0) progress_bar (1.3.4) highline (>= 1.6) options (~> 2.3.0) @@ -984,7 +997,9 @@ GEM r18n-desktop (5.0.1) r18n-core (~> 5.0) racc (1.8.1) - rack (2.2.13) + rack (3.1.12) + rackup (2.2.1) + rack (>= 3) rainbow (3.1.1) rake (13.0.1) rb-fsevent (0.11.2) @@ -1031,7 +1046,7 @@ GEM netrc (~> 0.8) retriable (3.1.2) retryable (3.0.5) - rexml (3.4.0) + rexml (3.4.1) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) @@ -1057,8 +1072,9 @@ GEM rubocop-ast (>= 1.15.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.38.0) - parser (>= 3.3.1.0) + rubocop-ast (1.44.0) + parser (>= 3.3.7.2) + prism (~> 1.4) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubyntlm (0.6.5) @@ -1090,7 +1106,7 @@ GEM strscan (3.1.0) structured_warnings (0.4.0) syslog-logger (1.6.8) - test-kitchen (3.6.0) + test-kitchen (3.7.0) bcrypt_pbkdf (~> 1.0) chef-utils (>= 16.4.35) ed25519 (~> 1.2) @@ -1374,8 +1390,7 @@ DEPENDENCIES chef_deprecations (>= 0.1.2) cheffish (>= 17.0) chefspec (>= 9.3) - chefstyle - cookstyle (>= 7.8) + cookstyle! dep-selector-libgecode dep_selector docker-api (>= 2.0) diff --git a/omnibus/Gemfile b/omnibus/Gemfile index e37ecda00..1bdb74af2 100644 --- a/omnibus/Gemfile +++ b/omnibus/Gemfile @@ -15,7 +15,7 @@ group :development do gem "berkshelf", ">= 8.0" # Use Test Kitchen with Vagrant for converging the build environment - gem "test-kitchen", ">= 2" + gem "test-kitchen", ">= 3.0" gem "kitchen-vagrant" gem "winrm-elevated" end diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index baefbd4d8..6907bc866 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -423,7 +423,7 @@ GEM strings-ansi (0.2.0) structured_warnings (0.4.0) syslog-logger (1.6.8) - test-kitchen (3.6.0) + test-kitchen (3.7.0) bcrypt_pbkdf (~> 1.0) chef-utils (>= 16.4.35) ed25519 (~> 1.2) @@ -545,7 +545,7 @@ DEPENDENCIES omnibus! omnibus-software! pedump - test-kitchen (>= 2) + test-kitchen (>= 3.0) winrm-elevated BUNDLED WITH diff --git a/omnibus/config/projects/chef-workstation.rb b/omnibus/config/projects/chef-workstation.rb index 0f3c89fb0..08ab23957 100644 --- a/omnibus/config/projects/chef-workstation.rb +++ b/omnibus/config/projects/chef-workstation.rb @@ -139,4 +139,4 @@ skip_packager true end -compress :dmg \ No newline at end of file +compress :dmg diff --git a/omnibus/config/software/gems.rb b/omnibus/config/software/gems.rb index 6e88a9678..2f050522a 100644 --- a/omnibus/config/software/gems.rb +++ b/omnibus/config/software/gems.rb @@ -84,7 +84,7 @@ appbundle "chef-run", lockdir: project_dir, gem: "chef-apply", without: %w{development docs debug}, env: env appbundle "chef-cli", lockdir: project_dir, gem: "chef-cli", without: %w{development profile test}, env: env appbundle "berkshelf", lockdir: project_dir, gem: "berkshelf", without: %w{changelog build docs debug development}, env: env - appbundle "mixlib-install", lockdir: project_dir, gem: "mixlib-install", without: %w{test chefstyle debug}, env: env + appbundle "mixlib-install", lockdir: project_dir, gem: "mixlib-install", without: %w{test debug}, env: env appbundle "chef-zero", lockdir: project_dir, gem: "chef-zero", without: %w{pedant development debug}, env: env appbundle "cookstyle", lockdir: project_dir, gem: "cookstyle", without: %w{docs profiling rubocop_gems development debug}, env: env appbundle "fauxhai", lockdir: project_dir, gem: "fauxhai-chef", env: env diff --git a/omnibus/config/software/git-custom-bindir.rb b/omnibus/config/software/git-custom-bindir.rb index d75ff55de..4724d4cf3 100644 --- a/omnibus/config/software/git-custom-bindir.rb +++ b/omnibus/config/software/git-custom-bindir.rb @@ -91,19 +91,19 @@ end erb source: "config.mak.erb", - dest: "#{project_dir}/config.mak", - mode: 0755, - vars: { - cc: env["CC"], - ld: env["LD"], - cflags: env["CFLAGS"], - cppflags: env["CPPFLAGS"], - install: env["INSTALL"], - install_dir: install_dir, - ldflags: env["LDFLAGS"], - shell_path: env["SHELL_PATH"], - config_hash: config_hash, - } + dest: "#{project_dir}/config.mak", + mode: 0755, + vars: { + cc: env["CC"], + ld: env["LD"], + cflags: env["CFLAGS"], + cppflags: env["CPPFLAGS"], + install: env["INSTALL"], + install_dir: install_dir, + ldflags: env["LDFLAGS"], + shell_path: env["SHELL_PATH"], + config_hash: config_hash, + } # NOTE - If you run ./configure the environment variables set above will not be # used and only the command line args will be used. The issue with this is you diff --git a/omnibus/config/software/openssl.rb b/omnibus/config/software/openssl.rb index cf31ea050..865e90bf3 100644 --- a/omnibus/config/software/openssl.rb +++ b/omnibus/config/software/openssl.rb @@ -34,7 +34,7 @@ # Source URL for OpenSSL 3.2.4 source url: "https://www.openssl.org/source/openssl-#{version}.tar.gz", extract: :lax_tar internal_source url: "#{ENV["ARTIFACTORY_REPO_URL"]}/#{name}/#{name}-#{version}.tar.gz", extract: :lax_tar, - authorization: "X-JFrog-Art-Api:#{ENV["ARTIFACTORY_TOKEN"]}" + authorization: "X-JFrog-Art-Api:#{ENV["ARTIFACTORY_TOKEN"]}" version("3.2.4") { source sha256: "b23ad7fd9f73e43ad1767e636040e88ba7c9e5775bfa5618436a0dd2c17c3716" } @@ -147,4 +147,4 @@ end command "#{install_dir}/embedded/bin/openssl list -providers" -end \ No newline at end of file +end diff --git a/omnibus/resources/chef-workstation/rpm/spec.erb b/omnibus/resources/chef-workstation/rpm/spec.erb index fe7968c01..bb07517ad 100644 --- a/omnibus/resources/chef-workstation/rpm/spec.erb +++ b/omnibus/resources/chef-workstation/rpm/spec.erb @@ -9,7 +9,7 @@ %define __spec_clean_pre true # Use md5 -%define _binary_filedigest_algorithm 1 +%define _binary_filedigest_algorithm 8 %define _binary_payload <%= compression %>