summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.expeditor/release.omnibus.yml1
-rw-r--r--CHANGELOG.md10
-rw-r--r--Gemfile.lock22
-rw-r--r--VERSION2
-rw-r--r--chef-bin/lib/chef-bin/version.rb2
-rw-r--r--chef-config/lib/chef-config/version.rb2
-rw-r--r--chef-utils/lib/chef-utils/version.rb2
-rw-r--r--knife/Gemfile.lock16
-rw-r--r--knife/lib/chef/knife/version.rb2
-rw-r--r--lib/chef/compliance/reporter/json_file.rb2
-rw-r--r--lib/chef/compliance/runner.rb21
-rw-r--r--lib/chef/version.rb2
-rw-r--r--lib/chef/win32/registry.rb4
-rw-r--r--spec/unit/chef_fs/diff_spec.rb2
-rw-r--r--spec/unit/chef_fs/file_system_spec.rb2
15 files changed, 52 insertions, 40 deletions
diff --git a/.expeditor/release.omnibus.yml b/.expeditor/release.omnibus.yml
index 3b91a22ce5..853b751148 100644
--- a/.expeditor/release.omnibus.yml
+++ b/.expeditor/release.omnibus.yml
@@ -37,6 +37,7 @@ builder-to-testers-map:
freebsd-11-amd64:
- freebsd-11-amd64
- freebsd-12-amd64
+# - freebsd-13-amd64
mac_os_x-10.14-x86_64:
- mac_os_x-10.14-x86_64
- mac_os_x-10.15-x86_64
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 365f5b01cb..9bf98cb4aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,17 +1,21 @@
<!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
This changelog lists individual merged pull requests to Chef Infra Client and geared towards developers. For a list of significant changes per release see the [Chef Infra Client Release Notes](https://docs.chef.io/release_notes_client/).
-<!-- latest_release 17.0.221 -->
-## [v17.0.221](https://github.com/chef/chef/tree/v17.0.221) (2021-04-22)
+<!-- latest_release 17.0.226 -->
+## [v17.0.226](https://github.com/chef/chef/tree/v17.0.226) (2021-04-22)
#### Merged Pull Requests
-- Lock cheffish to 17 [#11420](https://github.com/chef/chef/pull/11420) ([lamont-granquist](https://github.com/lamont-granquist))
+- Disable FreeBSD builds for now [#11435](https://github.com/chef/chef/pull/11435) ([tas50](https://github.com/tas50))
<!-- latest_release -->
<!-- release_rollup since=16.8.14 -->
### Changes not yet released to stable
#### Merged Pull Requests
+- Disable FreeBSD builds for now [#11435](https://github.com/chef/chef/pull/11435) ([tas50](https://github.com/tas50)) <!-- 17.0.226 -->
+- Compliance Phase preflight validation updates [#11404](https://github.com/chef/chef/pull/11404) ([marcparadise](https://github.com/marcparadise)) <!-- 17.0.225 -->
+- fix uninitialized Win32 constant [#11430](https://github.com/chef/chef/pull/11430) ([mwrock](https://github.com/mwrock)) <!-- 17.0.224 -->
+- Produce packages for FreeBSD 13 [#11424](https://github.com/chef/chef/pull/11424) ([tas50](https://github.com/tas50)) <!-- 17.0.222 -->
- Lock cheffish to 17 [#11420](https://github.com/chef/chef/pull/11420) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 17.0.221 -->
- Replace the ChefFS parallelizer with parallel_map helper [#11397](https://github.com/chef/chef/pull/11397) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 17.0.220 -->
- Bump omnibus-software from `0dcaeb1` to `3ac1dbe` in /omnibus [#11408](https://github.com/chef/chef/pull/11408) ([dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) <!-- 17.0.219 -->
diff --git a/Gemfile.lock b/Gemfile.lock
index 2fc3e5f58f..709086eb86 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -35,11 +35,11 @@ GIT
PATH
remote: .
specs:
- chef (17.0.221)
+ chef (17.0.226)
addressable
bcrypt_pbkdf (~> 1.1)
- chef-config (= 17.0.221)
- chef-utils (= 17.0.221)
+ chef-config (= 17.0.226)
+ chef-utils (= 17.0.226)
chef-vault
chef-zero (>= 14.0.11)
diff-lcs (>= 1.2.4, < 1.4.0)
@@ -71,11 +71,11 @@ PATH
tty-screen (~> 0.6)
tty-table (~> 0.11)
uuidtools (>= 2.1.5, < 3.0)
- chef (17.0.221-universal-mingw32)
+ chef (17.0.226-universal-mingw32)
addressable
bcrypt_pbkdf (~> 1.1)
- chef-config (= 17.0.221)
- chef-utils (= 17.0.221)
+ chef-config (= 17.0.226)
+ chef-utils (= 17.0.226)
chef-vault
chef-zero (>= 14.0.11)
diff-lcs (>= 1.2.4, < 1.4.0)
@@ -122,15 +122,15 @@ PATH
PATH
remote: chef-bin
specs:
- chef-bin (17.0.221)
- chef (= 17.0.221)
+ chef-bin (17.0.226)
+ chef (= 17.0.226)
PATH
remote: chef-config
specs:
- chef-config (17.0.221)
+ chef-config (17.0.226)
addressable
- chef-utils (= 17.0.221)
+ chef-utils (= 17.0.226)
fuzzyurl
mixlib-config (>= 2.2.12, < 4.0)
mixlib-shellout (>= 2.0, < 4.0)
@@ -139,7 +139,7 @@ PATH
PATH
remote: chef-utils
specs:
- chef-utils (17.0.221)
+ chef-utils (17.0.226)
concurrent-ruby
GEM
diff --git a/VERSION b/VERSION
index 62e9701dda..36a25fd968 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-17.0.221 \ No newline at end of file
+17.0.226 \ No newline at end of file
diff --git a/chef-bin/lib/chef-bin/version.rb b/chef-bin/lib/chef-bin/version.rb
index c98321ab43..861d960fce 100644
--- a/chef-bin/lib/chef-bin/version.rb
+++ b/chef-bin/lib/chef-bin/version.rb
@@ -21,7 +21,7 @@
module ChefBin
CHEFBIN_ROOT = File.expand_path("..", __dir__)
- VERSION = "17.0.221".freeze
+ VERSION = "17.0.226".freeze
end
#
diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb
index fdf0a6b047..6289ee8aef 100644
--- a/chef-config/lib/chef-config/version.rb
+++ b/chef-config/lib/chef-config/version.rb
@@ -15,5 +15,5 @@
module ChefConfig
CHEFCONFIG_ROOT = File.expand_path("..", __dir__)
- VERSION = "17.0.221".freeze
+ VERSION = "17.0.226".freeze
end
diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb
index 5bee44abbb..727ad59e98 100644
--- a/chef-utils/lib/chef-utils/version.rb
+++ b/chef-utils/lib/chef-utils/version.rb
@@ -16,5 +16,5 @@
module ChefUtils
CHEFUTILS_ROOT = File.expand_path("..", __dir__)
- VERSION = "17.0.221"
+ VERSION = "17.0.226"
end
diff --git a/knife/Gemfile.lock b/knife/Gemfile.lock
index fe0e916a13..0e442e3036 100644
--- a/knife/Gemfile.lock
+++ b/knife/Gemfile.lock
@@ -28,17 +28,17 @@ GIT
PATH
remote: ../chef-bin
specs:
- chef-bin (17.0.221)
- chef (= 17.0.221)
+ chef-bin (17.0.226)
+ chef (= 17.0.226)
PATH
remote: ..
specs:
- chef (17.0.221)
+ chef (17.0.226)
addressable
bcrypt_pbkdf (~> 1.1)
- chef-config (= 17.0.221)
- chef-utils (= 17.0.221)
+ chef-config (= 17.0.226)
+ chef-utils (= 17.0.226)
chef-vault
chef-zero (>= 14.0.11)
diff-lcs (>= 1.2.4, < 1.4.0)
@@ -74,9 +74,9 @@ PATH
PATH
remote: /workspace/chef-chef-master/chef-config
specs:
- chef-config (17.0.221)
+ chef-config (17.0.226)
addressable
- chef-utils (= 17.0.221)
+ chef-utils (= 17.0.226)
fuzzyurl
mixlib-config (>= 2.2.12, < 4.0)
mixlib-shellout (>= 2.0, < 4.0)
@@ -85,7 +85,7 @@ PATH
PATH
remote: /workspace/chef-chef-master/chef-utils
specs:
- chef-utils (17.0.221)
+ chef-utils (17.0.226)
concurrent-ruby
GEM
diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb
index 413298a539..f28066907d 100644
--- a/knife/lib/chef/knife/version.rb
+++ b/knife/lib/chef/knife/version.rb
@@ -17,7 +17,7 @@
class Chef
class Knife
KNIFE_ROOT = File.expand_path("../..", __dir__)
- VERSION = "17.0.221".freeze
+ VERSION = "17.0.226".freeze
end
end
diff --git a/lib/chef/compliance/reporter/json_file.rb b/lib/chef/compliance/reporter/json_file.rb
index 4d074242ca..ecd2e77b55 100644
--- a/lib/chef/compliance/reporter/json_file.rb
+++ b/lib/chef/compliance/reporter/json_file.rb
@@ -16,7 +16,7 @@ class Chef
def validate_config!
if @path.nil? || @path.class != String || @path.empty?
- raise "CMPL007: json_file reporter: node['audit']['json_file']['location'] must contain a file path"
+ raise "CMPL009: json_file reporter: node['audit']['json_file']['location'] must contain a file path"
end
end
end
diff --git a/lib/chef/compliance/runner.rb b/lib/chef/compliance/runner.rb
index 16cdf780ed..68b40ce35b 100644
--- a/lib/chef/compliance/runner.rb
+++ b/lib/chef/compliance/runner.rb
@@ -63,7 +63,10 @@ class Chef
end
def run_failed(_exception, _run_status)
- return unless enabled?
+ # If the run has failed because our own validation of compliance
+ # phase configuration has failed, we don't want to submit a report
+ # because we're still not configured correctly.
+ return unless enabled? && @validation_passed
logger.info("#{self.class}##{__method__}: enabling Compliance Phase")
@@ -219,7 +222,7 @@ class Chef
end
def reporter(reporter_type)
- case reporter_type.downcase
+ case reporter_type
when "chef-automate"
require_relative "reporter/automate"
opts = {
@@ -245,7 +248,7 @@ class Chef
Chef::Compliance::Reporter::ChefServerAutomate.new(opts)
when "json-file"
require_relative "reporter/json_file"
- path = node["audit"]["json_file"]["location"]
+ path = node.dig("audit", "json_file", "location")
logger.info "Writing compliance report to #{path}"
Chef::Compliance::Reporter::JsonFile.new(file: path)
when "audit-enforcer"
@@ -279,10 +282,11 @@ class Chef
return unless enabled?
@reporters = {}
- Array(node["audit"]["reporter"]).each do |reporter_type|
- type = reporter_type.downcase
+ # Note that the docs don't say you can use an array, but our implementation
+ # supports it.
+ Array(node["audit"]["reporter"]).each do |type|
unless SUPPORTED_REPORTERS.include? type
- raise "CMPL003: '#{reporter_type}' found in node['audit']['reporter'] is not a supported reporter for Compliance Phase. Supported reporters are: #{SUPPORTED_REPORTERS.join(",")}. For more information, see the documentation at https://docs.chef.io/chef_compliance_phase/chef_compliance_runners/#reporters"
+ raise "CMPL003: '#{type}' found in node['audit']['reporter'] is not a supported reporter for Compliance Phase. Supported reporters are: #{SUPPORTED_REPORTERS.join(", ")}. For more information, see the documentation at https://docs.chef.io/chef_compliance_phase/chef_compliance_runners/#reporters"
end
@reporters[type] = reporter(type)
@@ -290,10 +294,11 @@ class Chef
end
unless (fetcher = node["audit"]["fetcher"]).nil?
- unless SUPPORTED_FETCHERS.include? fetcher.downcase
- raise "CMPL002: Unrecognized Compliance Phase fetcher (node['audit']['fetcher'] is #{fetcher}. Supported fetchers are: or #{SUPPORTED_FETCHERS.join(",")}, or nil. For more information, see the documentation at https://docs.chef.io/chef_compliance_phase/chef_compliance_runners/#fetchers"
+ unless SUPPORTED_FETCHERS.include? fetcher
+ raise "CMPL002: Unrecognized Compliance Phase fetcher (node['audit']['fetcher'] = #{fetcher}). Supported fetchers are: #{SUPPORTED_FETCHERS.join(", ")}, or nil. For more information, see the documentation at https://docs.chef.io/chef_compliance_phase/chef_compliance_runners/#fetchers"
end
end
+ @validation_passed = true
end
end
end
diff --git a/lib/chef/version.rb b/lib/chef/version.rb
index f58e37c5f7..dddb0f748d 100644
--- a/lib/chef/version.rb
+++ b/lib/chef/version.rb
@@ -23,7 +23,7 @@ require_relative "version_string"
class Chef
CHEF_ROOT = File.expand_path("..", __dir__)
- VERSION = Chef::VersionString.new("17.0.221")
+ VERSION = Chef::VersionString.new("17.0.226")
end
#
diff --git a/lib/chef/win32/registry.rb b/lib/chef/win32/registry.rb
index 50243172b0..4f7f2b2d52 100644
--- a/lib/chef/win32/registry.rb
+++ b/lib/chef/win32/registry.rb
@@ -22,7 +22,9 @@ require_relative "../mixin/wide_string"
if RUBY_PLATFORM.match?(/mswin|mingw32|windows/)
require "win32/api"
- Win32.autoload :Registry, File.expand_path("../monkey_patches/win32/registry", __dir__)
+ module Win32
+ autoload :Registry, File.expand_path("../monkey_patches/win32/registry", __dir__)
+ end
require_relative "api/registry"
end
diff --git a/spec/unit/chef_fs/diff_spec.rb b/spec/unit/chef_fs/diff_spec.rb
index 726adf8e50..98ab41ca61 100644
--- a/spec/unit/chef_fs/diff_spec.rb
+++ b/spec/unit/chef_fs/diff_spec.rb
@@ -20,7 +20,7 @@ require "spec_helper"
require "chef/chef_fs/file_pattern"
require "chef/chef_fs/command_line"
-describe "diff", uses_diff: true do
+describe "diff", uses_diff: true, ruby: ">= 3.0" do
include FileSystemSupport
# Removes the date stamp from the diff and replaces it with ' DATE'
diff --git a/spec/unit/chef_fs/file_system_spec.rb b/spec/unit/chef_fs/file_system_spec.rb
index 99ea6049ff..0d4ae6aa05 100644
--- a/spec/unit/chef_fs/file_system_spec.rb
+++ b/spec/unit/chef_fs/file_system_spec.rb
@@ -20,7 +20,7 @@ require "spec_helper"
require "chef/chef_fs/file_system"
require "chef/chef_fs/file_pattern"
-describe Chef::ChefFS::FileSystem do
+describe Chef::ChefFS::FileSystem, ruby: ">= 3.0" do
include FileSystemSupport
context "with empty filesystem" do