From fb016af5f4843cc0e44ca37abf13e29cd0659674 Mon Sep 17 00:00:00 2001 From: Neha Pansare Date: Mon, 4 Jul 2022 17:43:28 +0530 Subject: Add how to doc with details about documentation for infra client resources Signed-off-by: Neha Pansare --- .../adding_documentation_to_infra_resources.md | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docs/dev/how_to/adding_documentation_to_infra_resources.md diff --git a/docs/dev/how_to/adding_documentation_to_infra_resources.md b/docs/dev/how_to/adding_documentation_to_infra_resources.md new file mode 100644 index 0000000000..76052bea9a --- /dev/null +++ b/docs/dev/how_to/adding_documentation_to_infra_resources.md @@ -0,0 +1,29 @@ +# Adding documentation to resources: +The documentation for Infra Client resources resides at [chef-wed-docs reporsitory](https://github.com/chef/chef-web-docs/). +Currently in order to reflect the documentation added to Infra Client resources on the [website](https://docs.chef.io/) we need to follow some manual steps. + +# Prerequisite: +Clone [chef-wed-docs reporsitory](https://github.com/chef/chef-web-docs/). Install Hugo, npm, go. + +`brew tap go-swagger/go-swagger && brew install go-swagger hugo node go jq` + +# Generating YAML files: +The YAML data is generated using a [rake](https://github.com/chef/chef/blob/main/tasks/docs.rb) task in the `chef/chef` repository. + +`rake docs_site:resources` + +The YAML files will be created under `docs_site` directory. Copy the corresponding file(s) for the resource(s) for which documentation is updated to [chef-web-docs/data/infra/resources](https://github.com/chef/chef-web-docs/tree/main/data/infra/resources). +(NOTE: The data file(.yaml) should be verified and edited manually to remove any inaccuracies.) + +# Generating mark down(.md) files: +Go to the [chef-web-docs](https://github.com/chef/chef-web-docs/) repository, where we copied the YAML file(s). +Using the YAML file(s) create correspondown markdown(.md) file(s). + +`hugo new -k resource content/resources/RESOURCE_NAME.md` + +# Verifying changes locally: +Run server locally and verify the changes in your browser at http://localhost:1313 + +`make serve` + +Once changes are verified, create a PR at [chef-web-docs](https://github.com/chef/chef-web-docs/) repository. \ No newline at end of file -- cgit v1.2.1 From 2b433ba2197a4ca80a8e6900056ac748d924f583 Mon Sep 17 00:00:00 2001 From: Neha Pansare Date: Mon, 4 Jul 2022 18:09:24 +0530 Subject: Fix linting issues Signed-off-by: Neha Pansare --- docs/dev/how_to/adding_documentation_to_infra_resources.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/dev/how_to/adding_documentation_to_infra_resources.md b/docs/dev/how_to/adding_documentation_to_infra_resources.md index 76052bea9a..7a333fa35f 100644 --- a/docs/dev/how_to/adding_documentation_to_infra_resources.md +++ b/docs/dev/how_to/adding_documentation_to_infra_resources.md @@ -1,9 +1,9 @@ # Adding documentation to resources: -The documentation for Infra Client resources resides at [chef-wed-docs reporsitory](https://github.com/chef/chef-web-docs/). +The documentation for Infra Client resources resides at [chef-wed-docs repository](https://github.com/chef/chef-web-docs/). Currently in order to reflect the documentation added to Infra Client resources on the [website](https://docs.chef.io/) we need to follow some manual steps. # Prerequisite: -Clone [chef-wed-docs reporsitory](https://github.com/chef/chef-web-docs/). Install Hugo, npm, go. +Clone [chef-wed-docs repository](https://github.com/chef/chef-web-docs/). Install Hugo, npm, go. `brew tap go-swagger/go-swagger && brew install go-swagger hugo node go jq` @@ -17,7 +17,7 @@ The YAML files will be created under `docs_site` directory. Copy the correspondi # Generating mark down(.md) files: Go to the [chef-web-docs](https://github.com/chef/chef-web-docs/) repository, where we copied the YAML file(s). -Using the YAML file(s) create correspondown markdown(.md) file(s). +Using the YAML file(s) create corresponding markdown(.md) file(s). `hugo new -k resource content/resources/RESOURCE_NAME.md` -- cgit v1.2.1 From f92e35f779a6b340468c792eccb9d496cef23c7b Mon Sep 17 00:00:00 2001 From: Terry Date: Thu, 7 Jul 2022 10:30:11 -0700 Subject: Wording Change Providing better explanation of somewhat confusing error message, which, if misunderstood, could cause issues. --- lib/chef/run_context.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb index ce4d545aa4..be7b787fcc 100644 --- a/lib/chef/run_context.rb +++ b/lib/chef/run_context.rb @@ -413,9 +413,9 @@ class Chef logger.warn(<<~ERROR_MESSAGE) MissingCookbookDependency: Recipe `#{recipe_name}` is not in the run_list, and cookbook '#{cookbook_name}' - is not a dependency of any cookbook in the run_list. To load this recipe, - first add a dependency on cookbook '#{cookbook_name}' in the cookbook you're - including it from in that cookbook's metadata. + is not a dependency of any cookbook in the run_list. To load this recipe, + first add a dependency of the cookbook '#{cookbook_name}' into the metadata + of the cookbook which depends on '#{cookbook_name}'. ERROR_MESSAGE end -- cgit v1.2.1 From 8435ace749c3129c64cb5938da6b91c7d1d45be3 Mon Sep 17 00:00:00 2001 From: Jordan Curzon Date: Mon, 11 Jul 2022 08:17:47 -0600 Subject: Require etc library Obvious fix. --- chef-config/lib/chef-config/workstation_config_loader.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/chef-config/lib/chef-config/workstation_config_loader.rb b/chef-config/lib/chef-config/workstation_config_loader.rb index ea42211120..a77670ddb2 100644 --- a/chef-config/lib/chef-config/workstation_config_loader.rb +++ b/chef-config/lib/chef-config/workstation_config_loader.rb @@ -17,6 +17,7 @@ # require "chef-utils" unless defined?(ChefUtils::CANARY) +require "etc" unless defined?(Etc) require_relative "config" require_relative "exceptions" require_relative "logger" -- cgit v1.2.1 From 328460fde6d5277f866844b8ea2604b5fc3326fa Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 21 Jul 2022 11:27:35 -0500 Subject: fix chef_client_scheduled_task splay to accept 0 The description says that it accepts 0-x but code only allowed greater than 0 --- lib/chef/resource/chef_client_scheduled_task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/resource/chef_client_scheduled_task.rb b/lib/chef/resource/chef_client_scheduled_task.rb index 422881deb8..f04598cdc6 100644 --- a/lib/chef/resource/chef_client_scheduled_task.rb +++ b/lib/chef/resource/chef_client_scheduled_task.rb @@ -107,7 +107,7 @@ class Chef property :splay, [Integer, String], coerce: proc { |x| Integer(x) }, - callbacks: { "should be a positive number" => proc { |v| v > 0 } }, + callbacks: { "should be a positive number" => proc { |v| v >= 0 } }, description: "A random number of seconds between 0 and X to add to interval so that all #{ChefUtils::Dist::Infra::CLIENT} commands don't execute at the same time.", default: 300 -- cgit v1.2.1 From ce8e6412c44228758b66432f0f11f3c4deee183a Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 21 Jul 2022 13:37:56 -0500 Subject: allow greaterthan or equal to 0 for splays Signed-off-by: Corey Hemminger --- lib/chef/resource/chef_client_cron.rb | 2 +- lib/chef/resource/chef_client_launchd.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chef/resource/chef_client_cron.rb b/lib/chef/resource/chef_client_cron.rb index 26894c5ae3..b5014a368d 100644 --- a/lib/chef/resource/chef_client_cron.rb +++ b/lib/chef/resource/chef_client_cron.rb @@ -98,7 +98,7 @@ class Chef property :splay, [Integer, String], default: 300, coerce: proc { |x| Integer(x) }, - callbacks: { "should be a positive number" => proc { |v| v > 0 } }, + callbacks: { "should be a positive number" => proc { |v| v >= 0 } }, description: "A random number of seconds between 0 and X to add to interval so that all #{ChefUtils::Dist::Infra::CLIENT} commands don't execute at the same time." property :mailto, String, diff --git a/lib/chef/resource/chef_client_launchd.rb b/lib/chef/resource/chef_client_launchd.rb index 1016ea4d49..035f2353b7 100644 --- a/lib/chef/resource/chef_client_launchd.rb +++ b/lib/chef/resource/chef_client_launchd.rb @@ -60,7 +60,7 @@ class Chef property :splay, [Integer, String], default: 300, coerce: proc { |x| Integer(x) }, - callbacks: { "should be a positive number" => proc { |v| v > 0 } }, + callbacks: { "should be a positive number" => proc { |v| v >= 0 } }, description: "A random number of seconds between 0 and X to add to interval so that all #{ChefUtils::Dist::Infra::CLIENT} commands don't execute at the same time." property :accept_chef_license, [true, false], -- cgit v1.2.1 From 84378c3995b8e60695ea32ba16cf6cc1c0b20e87 Mon Sep 17 00:00:00 2001 From: Chef Expeditor Date: Tue, 26 Jul 2022 19:22:50 +0000 Subject: Bump version to 18.0.136 by Chef Expeditor Obvious fix; these changes are the result of automation not creative thinking. --- CHANGELOG.md | 7 ++++--- Gemfile.lock | 24 ++++++++++++------------ VERSION | 2 +- chef-bin/lib/chef-bin/version.rb | 2 +- chef-config/lib/chef-config/version.rb | 2 +- chef-utils/lib/chef-utils/version.rb | 2 +- knife/lib/chef/knife/version.rb | 2 +- lib/chef/version.rb | 2 +- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f308f321fa..1679b05ba8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,18 @@ 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/). - -## [v18.0.135](https://github.com/chef/chef/tree/v18.0.135) (2022-07-22) + +## [v18.0.136](https://github.com/chef/chef/tree/v18.0.136) (2022-07-26) #### Merged Pull Requests -- Bump omnibus-software from `a9b13a0` to `1d540dc` in /omnibus [#13089](https://github.com/chef/chef/pull/13089) ([dependabot[bot]](https://github.com/dependabot[bot])) +- Require etc library [#13068](https://github.com/chef/chef/pull/13068) ([curzonj](https://github.com/curzonj)) ### Changes not yet released to stable #### Merged Pull Requests +- Require etc library [#13068](https://github.com/chef/chef/pull/13068) ([curzonj](https://github.com/curzonj)) - Bump omnibus-software from `a9b13a0` to `1d540dc` in /omnibus [#13089](https://github.com/chef/chef/pull/13089) ([dependabot[bot]](https://github.com/dependabot[bot])) - Re add: Use new msys2 based devkit for windows"" [#13097](https://github.com/chef/chef/pull/13097) ([neha-p6](https://github.com/neha-p6)) - Skip tests on FreeBSD-13 [#13079](https://github.com/chef/chef/pull/13079) ([poorndm](https://github.com/poorndm)) diff --git a/Gemfile.lock b/Gemfile.lock index 46a6092e66..cd1e8ffee6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,12 +42,12 @@ GIT PATH remote: . specs: - chef (18.0.135) + chef (18.0.136) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.135) - chef-utils (= 18.0.135) + chef-config (= 18.0.136) + chef-utils (= 18.0.136) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -76,13 +76,13 @@ PATH unf_ext (< 0.0.8.1) uuidtools (>= 2.1.5, < 3.0) vault (~> 0.16) - chef (18.0.135-universal-mingw32) + chef (18.0.136-universal-mingw32) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.135) + chef-config (= 18.0.136) chef-powershell (~> 1.0.12) - chef-utils (= 18.0.135) + chef-utils (= 18.0.136) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -126,15 +126,15 @@ PATH PATH remote: chef-bin specs: - chef-bin (18.0.135) - chef (= 18.0.135) + chef-bin (18.0.136) + chef (= 18.0.136) PATH remote: chef-config specs: - chef-config (18.0.135) + chef-config (18.0.136) addressable - chef-utils (= 18.0.135) + chef-utils (= 18.0.136) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) @@ -143,7 +143,7 @@ PATH PATH remote: chef-utils specs: - chef-utils (18.0.135) + chef-utils (18.0.136) concurrent-ruby GEM @@ -156,7 +156,7 @@ GEM mixlib-shellout (>= 2.0, < 4.0) ast (2.4.2) aws-eventstream (1.2.0) - aws-partitions (1.609.0) + aws-partitions (1.610.0) aws-sdk-core (3.131.3) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) diff --git a/VERSION b/VERSION index 751512b60a..75cfdf3d8c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -18.0.135 \ No newline at end of file +18.0.136 \ 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 4969fce44f..7ceb31e306 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 = "18.0.135".freeze + VERSION = "18.0.136".freeze end # diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 6f4b5d1a13..a62c860485 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 = "18.0.135".freeze + VERSION = "18.0.136".freeze end diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb index 15dd917a1d..0c380ec18f 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 = "18.0.135" + VERSION = "18.0.136" end diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb index 95ae68cdad..19ae0078a4 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 = "18.0.135".freeze + VERSION = "18.0.136".freeze end end diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 724b801442..83891d81be 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("18.0.135") + VERSION = Chef::VersionString.new("18.0.136") end # -- cgit v1.2.1 From 9432f69675fb76799168920c8ce774cbd532691c Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Tue, 26 Jul 2022 14:25:35 -0500 Subject: add tests for splay 0 Signed-off-by: Corey Hemminger --- spec/unit/resource/chef_client_cron_spec.rb | 5 +++++ spec/unit/resource/chef_client_launchd_spec.rb | 5 +++++ spec/unit/resource/chef_client_systemd_timer_spec.rb | 16 +++++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/spec/unit/resource/chef_client_cron_spec.rb b/spec/unit/resource/chef_client_cron_spec.rb index b738a20a3a..cc72c38a39 100644 --- a/spec/unit/resource/chef_client_cron_spec.rb +++ b/spec/unit/resource/chef_client_cron_spec.rb @@ -43,6 +43,11 @@ describe Chef::Resource::ChefClientCron do expect { resource.splay("-10") }.to raise_error(Chef::Exceptions::ValidationFailed) end + it "set splay to 0" do + resource.splay "0" + expect(resource.splay).to eql(0) + end + it "builds a default value for chef_binary_path dist values" do expect(resource.chef_binary_path).to eql("/opt/chef/bin/chef-client") end diff --git a/spec/unit/resource/chef_client_launchd_spec.rb b/spec/unit/resource/chef_client_launchd_spec.rb index 1d0015cb0d..93d56a784e 100644 --- a/spec/unit/resource/chef_client_launchd_spec.rb +++ b/spec/unit/resource/chef_client_launchd_spec.rb @@ -43,6 +43,11 @@ describe Chef::Resource::ChefClientLaunchd do expect { resource.splay("-10") }.to raise_error(Chef::Exceptions::ValidationFailed) end + it "set splay to 0" do + resource.splay "0" + expect(resource.splay).to eql(0) + end + it "builds a default value for chef_binary_path dist values" do expect(resource.chef_binary_path).to eql("/opt/chef/bin/chef-client") end diff --git a/spec/unit/resource/chef_client_systemd_timer_spec.rb b/spec/unit/resource/chef_client_systemd_timer_spec.rb index dfe01973fb..bb118ea3f3 100644 --- a/spec/unit/resource/chef_client_systemd_timer_spec.rb +++ b/spec/unit/resource/chef_client_systemd_timer_spec.rb @@ -48,6 +48,20 @@ describe Chef::Resource::ChefClientSystemdTimer do expect { resource.action :remove }.not_to raise_error end + it "coerces splay to an Integer" do + resource.splay "10" + expect(resource.splay).to eql(10) + end + + it "raises an error if splay is not a positive number" do + expect { resource.splay("-10") }.to raise_error(Chef::Exceptions::ValidationFailed) + end + + it "set splay to 0" do + resource.splay "0" + expect(resource.splay).to eql(0) + end + describe "#chef_client_cmd" do let(:root_path) { windows? ? "C:\\chef/client.rb" : "/etc/chef/client.rb" } @@ -105,4 +119,4 @@ describe Chef::Resource::ChefClientSystemdTimer do expect(provider.service_content["Service"]["CPUQuota"]).to eq(50) end end -end \ No newline at end of file +end -- cgit v1.2.1 From 9e11d38592a53ff62bcd462f55c6c76a214a484f Mon Sep 17 00:00:00 2001 From: Chef Expeditor Date: Thu, 28 Jul 2022 17:44:23 +0000 Subject: Bump version to 18.0.137 by Chef Expeditor Obvious fix; these changes are the result of automation not creative thinking. --- CHANGELOG.md | 7 ++++--- Gemfile.lock | 26 +++++++++++++------------- VERSION | 2 +- chef-bin/lib/chef-bin/version.rb | 2 +- chef-config/lib/chef-config/version.rb | 2 +- chef-utils/lib/chef-utils/version.rb | 2 +- knife/lib/chef/knife/version.rb | 2 +- lib/chef/version.rb | 2 +- 8 files changed, 23 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1679b05ba8..5d7042faf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,18 @@ 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/). - -## [v18.0.136](https://github.com/chef/chef/tree/v18.0.136) (2022-07-26) + +## [v18.0.137](https://github.com/chef/chef/tree/v18.0.137) (2022-07-28) #### Merged Pull Requests -- Require etc library [#13068](https://github.com/chef/chef/pull/13068) ([curzonj](https://github.com/curzonj)) +- Wording change in error for missing recipe dependency ("Obvious Fix") [#13061](https://github.com/chef/chef/pull/13061) ([c-drive](https://github.com/c-drive)) ### Changes not yet released to stable #### Merged Pull Requests +- Wording change in error for missing recipe dependency ("Obvious Fix") [#13061](https://github.com/chef/chef/pull/13061) ([c-drive](https://github.com/c-drive)) - Require etc library [#13068](https://github.com/chef/chef/pull/13068) ([curzonj](https://github.com/curzonj)) - Bump omnibus-software from `a9b13a0` to `1d540dc` in /omnibus [#13089](https://github.com/chef/chef/pull/13089) ([dependabot[bot]](https://github.com/dependabot[bot])) - Re add: Use new msys2 based devkit for windows"" [#13097](https://github.com/chef/chef/pull/13097) ([neha-p6](https://github.com/neha-p6)) diff --git a/Gemfile.lock b/Gemfile.lock index cd1e8ffee6..37194aa1bb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,12 +42,12 @@ GIT PATH remote: . specs: - chef (18.0.136) + chef (18.0.137) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.136) - chef-utils (= 18.0.136) + chef-config (= 18.0.137) + chef-utils (= 18.0.137) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -76,13 +76,13 @@ PATH unf_ext (< 0.0.8.1) uuidtools (>= 2.1.5, < 3.0) vault (~> 0.16) - chef (18.0.136-universal-mingw32) + chef (18.0.137-universal-mingw32) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.136) + chef-config (= 18.0.137) chef-powershell (~> 1.0.12) - chef-utils (= 18.0.136) + chef-utils (= 18.0.137) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -126,15 +126,15 @@ PATH PATH remote: chef-bin specs: - chef-bin (18.0.136) - chef (= 18.0.136) + chef-bin (18.0.137) + chef (= 18.0.137) PATH remote: chef-config specs: - chef-config (18.0.136) + chef-config (18.0.137) addressable - chef-utils (= 18.0.136) + chef-utils (= 18.0.137) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) @@ -143,7 +143,7 @@ PATH PATH remote: chef-utils specs: - chef-utils (18.0.136) + chef-utils (18.0.137) concurrent-ruby GEM @@ -156,8 +156,8 @@ GEM mixlib-shellout (>= 2.0, < 4.0) ast (2.4.2) aws-eventstream (1.2.0) - aws-partitions (1.610.0) - aws-sdk-core (3.131.3) + aws-partitions (1.611.0) + aws-sdk-core (3.131.4) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) diff --git a/VERSION b/VERSION index 75cfdf3d8c..39799743a1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -18.0.136 \ No newline at end of file +18.0.137 \ 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 7ceb31e306..e102ff35ec 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 = "18.0.136".freeze + VERSION = "18.0.137".freeze end # diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index a62c860485..2d31b78d17 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 = "18.0.136".freeze + VERSION = "18.0.137".freeze end diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb index 0c380ec18f..8e49737efb 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 = "18.0.136" + VERSION = "18.0.137" end diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb index 19ae0078a4..6b156757fb 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 = "18.0.136".freeze + VERSION = "18.0.137".freeze end end diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 83891d81be..437b99fae5 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("18.0.136") + VERSION = Chef::VersionString.new("18.0.137") end # -- cgit v1.2.1 From 624e75000681fef0e6441a3d922e9a08e918a983 Mon Sep 17 00:00:00 2001 From: Chef Expeditor Date: Thu, 28 Jul 2022 17:47:43 +0000 Subject: Bump version to 18.0.138 by Chef Expeditor Obvious fix; these changes are the result of automation not creative thinking. --- CHANGELOG.md | 7 ++++--- Gemfile.lock | 22 +++++++++++----------- VERSION | 2 +- chef-bin/lib/chef-bin/version.rb | 2 +- chef-config/lib/chef-config/version.rb | 2 +- chef-utils/lib/chef-utils/version.rb | 2 +- knife/lib/chef/knife/version.rb | 2 +- lib/chef/version.rb | 2 +- 8 files changed, 21 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d7042faf7..6b20597787 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,18 @@ 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/). - -## [v18.0.137](https://github.com/chef/chef/tree/v18.0.137) (2022-07-28) + +## [v18.0.138](https://github.com/chef/chef/tree/v18.0.138) (2022-07-28) #### Merged Pull Requests -- Wording change in error for missing recipe dependency ("Obvious Fix") [#13061](https://github.com/chef/chef/pull/13061) ([c-drive](https://github.com/c-drive)) +- Added how to doc with details about documentation for infra client resources [#13046](https://github.com/chef/chef/pull/13046) ([neha-p6](https://github.com/neha-p6)) ### Changes not yet released to stable #### Merged Pull Requests +- Added how to doc with details about documentation for infra client resources [#13046](https://github.com/chef/chef/pull/13046) ([neha-p6](https://github.com/neha-p6)) - Wording change in error for missing recipe dependency ("Obvious Fix") [#13061](https://github.com/chef/chef/pull/13061) ([c-drive](https://github.com/c-drive)) - Require etc library [#13068](https://github.com/chef/chef/pull/13068) ([curzonj](https://github.com/curzonj)) - Bump omnibus-software from `a9b13a0` to `1d540dc` in /omnibus [#13089](https://github.com/chef/chef/pull/13089) ([dependabot[bot]](https://github.com/dependabot[bot])) diff --git a/Gemfile.lock b/Gemfile.lock index 37194aa1bb..0c7cd1ce46 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,12 +42,12 @@ GIT PATH remote: . specs: - chef (18.0.137) + chef (18.0.138) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.137) - chef-utils (= 18.0.137) + chef-config (= 18.0.138) + chef-utils (= 18.0.138) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -76,13 +76,13 @@ PATH unf_ext (< 0.0.8.1) uuidtools (>= 2.1.5, < 3.0) vault (~> 0.16) - chef (18.0.137-universal-mingw32) + chef (18.0.138-universal-mingw32) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.137) + chef-config (= 18.0.138) chef-powershell (~> 1.0.12) - chef-utils (= 18.0.137) + chef-utils (= 18.0.138) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -126,15 +126,15 @@ PATH PATH remote: chef-bin specs: - chef-bin (18.0.137) - chef (= 18.0.137) + chef-bin (18.0.138) + chef (= 18.0.138) PATH remote: chef-config specs: - chef-config (18.0.137) + chef-config (18.0.138) addressable - chef-utils (= 18.0.137) + chef-utils (= 18.0.138) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) @@ -143,7 +143,7 @@ PATH PATH remote: chef-utils specs: - chef-utils (18.0.137) + chef-utils (18.0.138) concurrent-ruby GEM diff --git a/VERSION b/VERSION index 39799743a1..2ef34fe007 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -18.0.137 \ No newline at end of file +18.0.138 \ 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 e102ff35ec..5f930a13b5 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 = "18.0.137".freeze + VERSION = "18.0.138".freeze end # diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 2d31b78d17..9aa84b9b7f 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 = "18.0.137".freeze + VERSION = "18.0.138".freeze end diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb index 8e49737efb..e68cd50654 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 = "18.0.137" + VERSION = "18.0.138" end diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb index 6b156757fb..2e30f3cc73 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 = "18.0.137".freeze + VERSION = "18.0.138".freeze end end diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 437b99fae5..7d456422ab 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("18.0.137") + VERSION = Chef::VersionString.new("18.0.138") end # -- cgit v1.2.1 From d3f61253df9abb181036a9fbb1efad378cdb8761 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Fri, 29 Jul 2022 14:14:24 -0500 Subject: add list of principal names --- lib/chef/resource/windows_user_privilege.rb | 43 +++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/lib/chef/resource/windows_user_privilege.rb b/lib/chef/resource/windows_user_privilege.rb index e4679f50b9..2672ad8675 100644 --- a/lib/chef/resource/windows_user_privilege.rb +++ b/lib/chef/resource/windows_user_privilege.rb @@ -23,7 +23,7 @@ class Chef class WindowsUserPrivilege < Chef::Resource provides :windows_user_privilege - description "The windows_user_privilege resource allows to add and set principal (User/Group) to the specified privilege.\n Ref: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-rights-assignment" + description "The windows_user_privilege resource allows to add and set principal (User/Group) to the specified privilege.\n Ref: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-rights-assignment\n For litt of principals Ref: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/special-identities" introduced "16.0" @@ -123,10 +123,49 @@ class Chef SeTrustedCredManAccessPrivilege SeUndockPrivilege }.freeze + + PRINCIPAL_OPTS = [ 'Anonymous Logon' + 'Attested Key Property' + 'Authenticated Users' + 'Authentication Authority Asserted Identity' + 'Batch' + 'Console Logon' + 'Creator Group' + 'Creator Owner' + 'Dialup' + 'Digest Authentication' + 'Enterprise Domain Controllers' + 'Everyone' + 'Fresh Public Key Identity' + 'Interactive' + 'IUSR' + 'Key Trust' + 'Local Service' + 'LocalSystem' + 'MFA Key Property' + 'Network' + 'Network Service' + 'NTLM Authentication' + 'Other Organization' + 'Owner Rights' + 'Principal Self' + 'Proxy' + 'Remote Interactive Logon' + 'Restricted' + 'SChannel Authentication' + 'Service' + 'Service Asserted Identity' + 'Terminal Server User' + 'This Organization' + 'Window Manager\Window Manager Group' + ].freeze property :principal, String, description: "An optional property to add the user to the given privilege. Use only with add and remove action.", - name_property: true + name_property: true, + callbacks: { + "Principal property restricted to the following values: #{PRINCIPLE_OPTS}" => lambda { |n| (n - PRINCIPAL_OPTS).empty? }, + }, identity: true property :users, [Array, String], description: "An optional property to set the privilege for given users. Use only with set action.", -- cgit v1.2.1 From c6a04e4a0ef9190ca50903f4051b7717211da6e5 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Fri, 29 Jul 2022 15:13:53 -0500 Subject: add reference to :add action for new url Signed-off-by: Corey Hemminger --- lib/chef/resource/windows_user_privilege.rb | 43 ++--------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/lib/chef/resource/windows_user_privilege.rb b/lib/chef/resource/windows_user_privilege.rb index 2672ad8675..251382e46f 100644 --- a/lib/chef/resource/windows_user_privilege.rb +++ b/lib/chef/resource/windows_user_privilege.rb @@ -23,7 +23,7 @@ class Chef class WindowsUserPrivilege < Chef::Resource provides :windows_user_privilege - description "The windows_user_privilege resource allows to add and set principal (User/Group) to the specified privilege.\n Ref: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-rights-assignment\n For litt of principals Ref: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/special-identities" + description "The windows_user_privilege resource allows to add and set principal (User/Group) to the specified privilege.\n Ref: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-rights-assignment\n For list of principals to use with :add action Ref: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/special-identities" introduced "16.0" @@ -123,49 +123,10 @@ class Chef SeTrustedCredManAccessPrivilege SeUndockPrivilege }.freeze - - PRINCIPAL_OPTS = [ 'Anonymous Logon' - 'Attested Key Property' - 'Authenticated Users' - 'Authentication Authority Asserted Identity' - 'Batch' - 'Console Logon' - 'Creator Group' - 'Creator Owner' - 'Dialup' - 'Digest Authentication' - 'Enterprise Domain Controllers' - 'Everyone' - 'Fresh Public Key Identity' - 'Interactive' - 'IUSR' - 'Key Trust' - 'Local Service' - 'LocalSystem' - 'MFA Key Property' - 'Network' - 'Network Service' - 'NTLM Authentication' - 'Other Organization' - 'Owner Rights' - 'Principal Self' - 'Proxy' - 'Remote Interactive Logon' - 'Restricted' - 'SChannel Authentication' - 'Service' - 'Service Asserted Identity' - 'Terminal Server User' - 'This Organization' - 'Window Manager\Window Manager Group' - ].freeze property :principal, String, description: "An optional property to add the user to the given privilege. Use only with add and remove action.", - name_property: true, - callbacks: { - "Principal property restricted to the following values: #{PRINCIPLE_OPTS}" => lambda { |n| (n - PRINCIPAL_OPTS).empty? }, - }, identity: true + name_property: true property :users, [Array, String], description: "An optional property to set the privilege for given users. Use only with set action.", -- cgit v1.2.1 From 042a25badeca5e4a87f157b6bdbd6a32499d1c7b Mon Sep 17 00:00:00 2001 From: Chef Expeditor Date: Tue, 2 Aug 2022 19:12:03 +0000 Subject: Bump version to 18.0.139 by Chef Expeditor Obvious fix; these changes are the result of automation not creative thinking. --- CHANGELOG.md | 7 ++++--- Gemfile.lock | 28 ++++++++++++++-------------- VERSION | 2 +- chef-bin/lib/chef-bin/version.rb | 2 +- chef-config/lib/chef-config/version.rb | 2 +- chef-utils/lib/chef-utils/version.rb | 2 +- knife/lib/chef/knife/version.rb | 2 +- lib/chef/version.rb | 2 +- 8 files changed, 24 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b20597787..f2dd2358c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,18 @@ 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/). - -## [v18.0.138](https://github.com/chef/chef/tree/v18.0.138) (2022-07-28) + +## [v18.0.139](https://github.com/chef/chef/tree/v18.0.139) (2022-08-02) #### Merged Pull Requests -- Added how to doc with details about documentation for infra client resources [#13046](https://github.com/chef/chef/pull/13046) ([neha-p6](https://github.com/neha-p6)) +- add url for principal names [#13104](https://github.com/chef/chef/pull/13104) ([Stromweld](https://github.com/Stromweld)) ### Changes not yet released to stable #### Merged Pull Requests +- add url for principal names [#13104](https://github.com/chef/chef/pull/13104) ([Stromweld](https://github.com/Stromweld)) - Added how to doc with details about documentation for infra client resources [#13046](https://github.com/chef/chef/pull/13046) ([neha-p6](https://github.com/neha-p6)) - Wording change in error for missing recipe dependency ("Obvious Fix") [#13061](https://github.com/chef/chef/pull/13061) ([c-drive](https://github.com/c-drive)) - Require etc library [#13068](https://github.com/chef/chef/pull/13068) ([curzonj](https://github.com/curzonj)) diff --git a/Gemfile.lock b/Gemfile.lock index 0c7cd1ce46..cfd5df7f9a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,12 +42,12 @@ GIT PATH remote: . specs: - chef (18.0.138) + chef (18.0.139) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.138) - chef-utils (= 18.0.138) + chef-config (= 18.0.139) + chef-utils (= 18.0.139) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -76,13 +76,13 @@ PATH unf_ext (< 0.0.8.1) uuidtools (>= 2.1.5, < 3.0) vault (~> 0.16) - chef (18.0.138-universal-mingw32) + chef (18.0.139-universal-mingw32) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.138) + chef-config (= 18.0.139) chef-powershell (~> 1.0.12) - chef-utils (= 18.0.138) + chef-utils (= 18.0.139) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -126,15 +126,15 @@ PATH PATH remote: chef-bin specs: - chef-bin (18.0.138) - chef (= 18.0.138) + chef-bin (18.0.139) + chef (= 18.0.139) PATH remote: chef-config specs: - chef-config (18.0.138) + chef-config (18.0.139) addressable - chef-utils (= 18.0.138) + chef-utils (= 18.0.139) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) @@ -143,7 +143,7 @@ PATH PATH remote: chef-utils specs: - chef-utils (18.0.138) + chef-utils (18.0.139) concurrent-ruby GEM @@ -156,8 +156,8 @@ GEM mixlib-shellout (>= 2.0, < 4.0) ast (2.4.2) aws-eventstream (1.2.0) - aws-partitions (1.611.0) - aws-sdk-core (3.131.4) + aws-partitions (1.613.0) + aws-sdk-core (3.131.5) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) @@ -208,7 +208,7 @@ GEM domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) ed25519 (1.3.0) - erubi (1.10.0) + erubi (1.11.0) erubis (2.7.0) faraday (1.4.3) faraday-em_http (~> 1.0) diff --git a/VERSION b/VERSION index 2ef34fe007..62b9f40619 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -18.0.138 \ No newline at end of file +18.0.139 \ 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 5f930a13b5..c64f94d547 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 = "18.0.138".freeze + VERSION = "18.0.139".freeze end # diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 9aa84b9b7f..924c3f36ab 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 = "18.0.138".freeze + VERSION = "18.0.139".freeze end diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb index e68cd50654..3b95a5a99e 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 = "18.0.138" + VERSION = "18.0.139" end diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb index 2e30f3cc73..d94e413e96 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 = "18.0.138".freeze + VERSION = "18.0.139".freeze end end diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 7d456422ab..579772365f 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("18.0.138") + VERSION = Chef::VersionString.new("18.0.139") end # -- cgit v1.2.1 From 8369275edb7f1dc22828e837b149f7c6e9092db7 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Tue, 2 Aug 2022 14:23:15 -0500 Subject: test Signed-off-by: Corey Hemminger --- spec/unit/resource/chef_client_systemd_timer_spec.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/spec/unit/resource/chef_client_systemd_timer_spec.rb b/spec/unit/resource/chef_client_systemd_timer_spec.rb index bb118ea3f3..bd6dd512c4 100644 --- a/spec/unit/resource/chef_client_systemd_timer_spec.rb +++ b/spec/unit/resource/chef_client_systemd_timer_spec.rb @@ -48,17 +48,8 @@ describe Chef::Resource::ChefClientSystemdTimer do expect { resource.action :remove }.not_to raise_error end - it "coerces splay to an Integer" do - resource.splay "10" - expect(resource.splay).to eql(10) - end - - it "raises an error if splay is not a positive number" do - expect { resource.splay("-10") }.to raise_error(Chef::Exceptions::ValidationFailed) - end - it "set splay to 0" do - resource.splay "0" + resource.splay 0 expect(resource.splay).to eql(0) end -- cgit v1.2.1 From 2af2c0188f47882563037f11a6f93c6f3710b532 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Tue, 2 Aug 2022 14:45:26 -0500 Subject: Update chef_client_systemd_timer_spec.rb --- spec/unit/resource/chef_client_systemd_timer_spec.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/spec/unit/resource/chef_client_systemd_timer_spec.rb b/spec/unit/resource/chef_client_systemd_timer_spec.rb index bd6dd512c4..5fe4e80146 100644 --- a/spec/unit/resource/chef_client_systemd_timer_spec.rb +++ b/spec/unit/resource/chef_client_systemd_timer_spec.rb @@ -48,11 +48,6 @@ describe Chef::Resource::ChefClientSystemdTimer do expect { resource.action :remove }.not_to raise_error end - it "set splay to 0" do - resource.splay 0 - expect(resource.splay).to eql(0) - end - describe "#chef_client_cmd" do let(:root_path) { windows? ? "C:\\chef/client.rb" : "/etc/chef/client.rb" } -- cgit v1.2.1 From 547d2cf771284685535f748df5e5868dce3fa4ba Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Tue, 2 Aug 2022 14:50:17 -0500 Subject: add splay 0 test to chef_client_scheduled_task Signed-off-by: Corey Hemminger --- spec/unit/resource/chef_client_scheduled_task_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/unit/resource/chef_client_scheduled_task_spec.rb b/spec/unit/resource/chef_client_scheduled_task_spec.rb index bf165d4b70..45ed8c0602 100644 --- a/spec/unit/resource/chef_client_scheduled_task_spec.rb +++ b/spec/unit/resource/chef_client_scheduled_task_spec.rb @@ -43,6 +43,11 @@ describe Chef::Resource::ChefClientScheduledTask do expect { resource.splay("-10") }.to raise_error(Chef::Exceptions::ValidationFailed) end + it "set splay to 0" do + resource.splay "0" + expect(resource.splay).to eql(0) + end + it "coerces frequency_modifier to an Integer" do resource.frequency_modifier "10" expect(resource.frequency_modifier).to eql(10) -- cgit v1.2.1 From c370e12b76d92ad48a6f751ec5e95a574c344ba6 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Tue, 2 Aug 2022 15:21:58 -0500 Subject: fix linting error Signed-off-by: Corey Hemminger --- lib/chef/run_context.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb index be7b787fcc..11bfc6e3c6 100644 --- a/lib/chef/run_context.rb +++ b/lib/chef/run_context.rb @@ -414,7 +414,7 @@ class Chef MissingCookbookDependency: Recipe `#{recipe_name}` is not in the run_list, and cookbook '#{cookbook_name}' is not a dependency of any cookbook in the run_list. To load this recipe, - first add a dependency of the cookbook '#{cookbook_name}' into the metadata + first add a dependency of the cookbook '#{cookbook_name}' into the metadata of the cookbook which depends on '#{cookbook_name}'. ERROR_MESSAGE end -- cgit v1.2.1 From ab1b49d7b0529bcd9be1a434915007e74a6c447d Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Fri, 5 Aug 2022 10:27:17 -0600 Subject: Add newline to end of sysctl files If the sysctl file doesn't end with a newline, then Ubuntu's CIS audit won't correctly detect the sysctl configuration. Also, it is UNIX best practice to include a newline at the end of the last line of text files. Obvious fix. Signed-off-by: Thayne McCombs --- lib/chef/resource/sysctl.rb | 2 +- spec/unit/resource/sysctl_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/chef/resource/sysctl.rb b/lib/chef/resource/sysctl.rb index 97f919fbc9..61f3686ccc 100644 --- a/lib/chef/resource/sysctl.rb +++ b/lib/chef/resource/sysctl.rb @@ -187,7 +187,7 @@ class Chef sysctl_lines << "#{new_resource.key} = #{new_resource.value}" - sysctl_lines.join("\n") + sysctl_lines.join("\n") + "\n" end end diff --git a/spec/unit/resource/sysctl_spec.rb b/spec/unit/resource/sysctl_spec.rb index 47556f5ee8..42b0c77d83 100644 --- a/spec/unit/resource/sysctl_spec.rb +++ b/spec/unit/resource/sysctl_spec.rb @@ -62,14 +62,14 @@ describe Chef::Resource::Sysctl do context "when comment is a String" do it "Returns content for use with a file resource" do resource.comment("This sets foo / bar on our system") - expect(provider.contruct_sysctl_content).to eql("# This sets foo / bar on our system\nfoo = bar") + expect(provider.contruct_sysctl_content).to eql("# This sets foo / bar on our system\nfoo = bar\n") end end context "when comment is an Array" do it "Returns content for use with a file resource" do resource.comment(["This sets foo / bar on our system", "We need for baz"]) - expect(provider.contruct_sysctl_content).to eql("# This sets foo / bar on our system\n# We need for baz\nfoo = bar") + expect(provider.contruct_sysctl_content).to eql("# This sets foo / bar on our system\n# We need for baz\nfoo = bar\n") end end end -- cgit v1.2.1 From 805df23576c2ff7c6468933ebc7c90d286672d16 Mon Sep 17 00:00:00 2001 From: Chef Expeditor Date: Tue, 9 Aug 2022 19:20:35 +0000 Subject: Bump version to 18.0.140 by Chef Expeditor Obvious fix; these changes are the result of automation not creative thinking. --- CHANGELOG.md | 7 ++++--- Gemfile.lock | 26 +++++++++++++------------- VERSION | 2 +- chef-bin/lib/chef-bin/version.rb | 2 +- chef-config/lib/chef-config/version.rb | 2 +- chef-utils/lib/chef-utils/version.rb | 2 +- knife/lib/chef/knife/version.rb | 2 +- lib/chef/version.rb | 2 +- 8 files changed, 23 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2dd2358c6..ca915cebcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,18 @@ 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/). - -## [v18.0.139](https://github.com/chef/chef/tree/v18.0.139) (2022-08-02) + +## [v18.0.140](https://github.com/chef/chef/tree/v18.0.140) (2022-08-09) #### Merged Pull Requests -- add url for principal names [#13104](https://github.com/chef/chef/pull/13104) ([Stromweld](https://github.com/Stromweld)) +- fix chef_client_scheduled_task splay to accept 0 [#13095](https://github.com/chef/chef/pull/13095) ([Stromweld](https://github.com/Stromweld)) ### Changes not yet released to stable #### Merged Pull Requests +- fix chef_client_scheduled_task splay to accept 0 [#13095](https://github.com/chef/chef/pull/13095) ([Stromweld](https://github.com/Stromweld)) - add url for principal names [#13104](https://github.com/chef/chef/pull/13104) ([Stromweld](https://github.com/Stromweld)) - Added how to doc with details about documentation for infra client resources [#13046](https://github.com/chef/chef/pull/13046) ([neha-p6](https://github.com/neha-p6)) - Wording change in error for missing recipe dependency ("Obvious Fix") [#13061](https://github.com/chef/chef/pull/13061) ([c-drive](https://github.com/c-drive)) diff --git a/Gemfile.lock b/Gemfile.lock index cfd5df7f9a..df549972b1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,12 +42,12 @@ GIT PATH remote: . specs: - chef (18.0.139) + chef (18.0.140) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.139) - chef-utils (= 18.0.139) + chef-config (= 18.0.140) + chef-utils (= 18.0.140) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -76,13 +76,13 @@ PATH unf_ext (< 0.0.8.1) uuidtools (>= 2.1.5, < 3.0) vault (~> 0.16) - chef (18.0.139-universal-mingw32) + chef (18.0.140-universal-mingw32) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.139) + chef-config (= 18.0.140) chef-powershell (~> 1.0.12) - chef-utils (= 18.0.139) + chef-utils (= 18.0.140) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -126,15 +126,15 @@ PATH PATH remote: chef-bin specs: - chef-bin (18.0.139) - chef (= 18.0.139) + chef-bin (18.0.140) + chef (= 18.0.140) PATH remote: chef-config specs: - chef-config (18.0.139) + chef-config (18.0.140) addressable - chef-utils (= 18.0.139) + chef-utils (= 18.0.140) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) @@ -143,7 +143,7 @@ PATH PATH remote: chef-utils specs: - chef-utils (18.0.139) + chef-utils (18.0.140) concurrent-ruby GEM @@ -156,8 +156,8 @@ GEM mixlib-shellout (>= 2.0, < 4.0) ast (2.4.2) aws-eventstream (1.2.0) - aws-partitions (1.613.0) - aws-sdk-core (3.131.5) + aws-partitions (1.616.0) + aws-sdk-core (3.132.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) diff --git a/VERSION b/VERSION index 62b9f40619..8434a7099e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -18.0.139 \ No newline at end of file +18.0.140 \ 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 c64f94d547..97a13dca98 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 = "18.0.139".freeze + VERSION = "18.0.140".freeze end # diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 924c3f36ab..f80b9b9780 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 = "18.0.139".freeze + VERSION = "18.0.140".freeze end diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb index 3b95a5a99e..50a0f38eca 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 = "18.0.139" + VERSION = "18.0.140" end diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb index d94e413e96..5c471d865f 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 = "18.0.139".freeze + VERSION = "18.0.140".freeze end end diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 579772365f..63c1c2c8f6 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("18.0.139") + VERSION = Chef::VersionString.new("18.0.140") end # -- cgit v1.2.1 From 612749ee73e4f15b6edd1123d07d231d9b2fbf87 Mon Sep 17 00:00:00 2001 From: Chef Expeditor Date: Tue, 16 Aug 2022 19:19:58 +0000 Subject: Bump version to 18.0.141 by Chef Expeditor Obvious fix; these changes are the result of automation not creative thinking. --- CHANGELOG.md | 7 ++++--- Gemfile.lock | 24 ++++++++++++------------ VERSION | 2 +- chef-bin/lib/chef-bin/version.rb | 2 +- chef-config/lib/chef-config/version.rb | 2 +- chef-utils/lib/chef-utils/version.rb | 2 +- knife/lib/chef/knife/version.rb | 2 +- lib/chef/version.rb | 2 +- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca915cebcc..167498bb0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,18 @@ 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/). - -## [v18.0.140](https://github.com/chef/chef/tree/v18.0.140) (2022-08-09) + +## [v18.0.141](https://github.com/chef/chef/tree/v18.0.141) (2022-08-16) #### Merged Pull Requests -- fix chef_client_scheduled_task splay to accept 0 [#13095](https://github.com/chef/chef/pull/13095) ([Stromweld](https://github.com/Stromweld)) +- Add newline to end of sysctl files [#13118](https://github.com/chef/chef/pull/13118) ([tmccombs](https://github.com/tmccombs)) ### Changes not yet released to stable #### Merged Pull Requests +- Add newline to end of sysctl files [#13118](https://github.com/chef/chef/pull/13118) ([tmccombs](https://github.com/tmccombs)) - fix chef_client_scheduled_task splay to accept 0 [#13095](https://github.com/chef/chef/pull/13095) ([Stromweld](https://github.com/Stromweld)) - add url for principal names [#13104](https://github.com/chef/chef/pull/13104) ([Stromweld](https://github.com/Stromweld)) - Added how to doc with details about documentation for infra client resources [#13046](https://github.com/chef/chef/pull/13046) ([neha-p6](https://github.com/neha-p6)) diff --git a/Gemfile.lock b/Gemfile.lock index df549972b1..e96b11286f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,12 +42,12 @@ GIT PATH remote: . specs: - chef (18.0.140) + chef (18.0.141) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.140) - chef-utils (= 18.0.140) + chef-config (= 18.0.141) + chef-utils (= 18.0.141) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -76,13 +76,13 @@ PATH unf_ext (< 0.0.8.1) uuidtools (>= 2.1.5, < 3.0) vault (~> 0.16) - chef (18.0.140-universal-mingw32) + chef (18.0.141-universal-mingw32) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.140) + chef-config (= 18.0.141) chef-powershell (~> 1.0.12) - chef-utils (= 18.0.140) + chef-utils (= 18.0.141) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -126,15 +126,15 @@ PATH PATH remote: chef-bin specs: - chef-bin (18.0.140) - chef (= 18.0.140) + chef-bin (18.0.141) + chef (= 18.0.141) PATH remote: chef-config specs: - chef-config (18.0.140) + chef-config (18.0.141) addressable - chef-utils (= 18.0.140) + chef-utils (= 18.0.141) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) @@ -143,7 +143,7 @@ PATH PATH remote: chef-utils specs: - chef-utils (18.0.140) + chef-utils (18.0.141) concurrent-ruby GEM @@ -156,7 +156,7 @@ GEM mixlib-shellout (>= 2.0, < 4.0) ast (2.4.2) aws-eventstream (1.2.0) - aws-partitions (1.616.0) + aws-partitions (1.619.0) aws-sdk-core (3.132.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) diff --git a/VERSION b/VERSION index 8434a7099e..5865806b91 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -18.0.140 \ No newline at end of file +18.0.141 \ 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 97a13dca98..4832995802 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 = "18.0.140".freeze + VERSION = "18.0.141".freeze end # diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index f80b9b9780..3eb6379bd5 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 = "18.0.140".freeze + VERSION = "18.0.141".freeze end diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb index 50a0f38eca..92f9234bbf 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 = "18.0.140" + VERSION = "18.0.141" end diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb index 5c471d865f..41828ba094 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 = "18.0.140".freeze + VERSION = "18.0.141".freeze end end diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 63c1c2c8f6..8bae4c3fa8 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("18.0.140") + VERSION = Chef::VersionString.new("18.0.141") end # -- cgit v1.2.1 From 68c1b9b4d48df8dba26a93c199160229a74b5fbd Mon Sep 17 00:00:00 2001 From: Thomas Powell Date: Wed, 17 Aug 2022 15:18:54 -0400 Subject: Fix SSL, git error, disable resolv conf test Signed-off-by: Thomas Powell --- cspell.json | 4 ++ .../recipes/_chef_client_trusted_certificate.rb | 16 +++---- .../cookbooks/end_to_end/recipes/linux.rb | 11 +++-- .../cookbooks/end_to_end/recipes/windows.rb | 53 ++++++++++++++++++++++ 4 files changed, 72 insertions(+), 12 deletions(-) diff --git a/cspell.json b/cspell.json index 5d62456013..5216cdb1d6 100644 --- a/cspell.json +++ b/cspell.json @@ -394,6 +394,7 @@ "fmri", "fname", "foorb", + "FORCECLOSEAPPLICATIONS", "FORCEMINIMIZE", "FORCEOFFFEEDBACK", "FORCEONFEEDBACK", @@ -991,6 +992,7 @@ "PRINTPROCESSOR", "PRINTQ", "PROCNUM", + "processname", "procs", "progname", "PROMPTSTRUCT", @@ -1214,6 +1216,7 @@ "signedheaderauth", "SIGQUIT", "SIGUSR", + "silentlycontinue", "SINGLELINE", "singleline", "Singleuser", @@ -1371,6 +1374,7 @@ "unformatter", "unhold", "unignored", + "unins", "uninst", "unintuitive", "unixy", diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_chef_client_trusted_certificate.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_chef_client_trusted_certificate.rb index e719a01837..e085519c4a 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/_chef_client_trusted_certificate.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_chef_client_trusted_certificate.rb @@ -1,10 +1,10 @@ chef_client_trusted_certificate "self-signed.badssl.com" do certificate <<~CERT -----BEGIN CERTIFICATE----- -MIIDeTCCAmGgAwIBAgIJALvxdCPEMG1VMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNV +MIIDeTCCAmGgAwIBAgIJAMtEwC/G1C5xMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNV BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNp c2NvMQ8wDQYDVQQKDAZCYWRTU0wxFTATBgNVBAMMDCouYmFkc3NsLmNvbTAeFw0y -MjA1MTcyMTE1MjVaFw0yNDA1MTYyMTE1MjVaMGIxCzAJBgNVBAYTAlVTMRMwEQYD +MjA4MTIxNTU5MTBaFw0yNDA4MTExNTU5MTBaMGIxCzAJBgNVBAYTAlVTMRMwEQYD VQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMQ8wDQYDVQQK DAZCYWRTU0wxFTATBgNVBAMMDCouYmFkc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEB BQADggEPADCCAQoCggEBAMIE7PiM7gTCs9hQ1XBYzJMY61yoaEmwIrX5lZ6xKyx2 @@ -14,12 +14,12 @@ xPxTuW1CrbV8/q71FdIzSOciccfCFHpsKOo3St/qbLVytH5aohbcabFXRNsKEqve ww9HdFxBIuGa+RuT5q0iBikusbpJHAwnnqP7i/dAcgCskgjZjFeEU4EFy+b+a1SY QCeFxxC7c3DvaRhBB0VVfPlkPz0sw6l865MaTIbRyoUCAwEAAaMyMDAwCQYDVR0T BAIwADAjBgNVHREEHDAaggwqLmJhZHNzbC5jb22CCmJhZHNzbC5jb20wDQYJKoZI -hvcNAQELBQADggEBAI8cPgdGNaXwomKxzksJPMCHQC3zkTKQBqGAk4yWp3w7/WHV -1dTz/ezCH1UpxRUqTIZ/jS7OwrERRJCw6wr84WrKj0TKgZI00LEoRg3eK+U5QJj1 -4HZ8UTVkYL7OhPBanGgACw0eOvFtLdwizBTAw+B79Uzx0j84babX8HFq8UJR997H -FN+Fo9w4+ObXiA6BB9+fsqhRKPcIvt4HI6eQ4S/5lBkZbhHIPSR5oy4y7AsnZeb8 -hFNhP/WPdRvk4za0cAkuhoY5/3A/U4eFrXYL4N8mhqiRWvqbSaBT2YnlbSVxEDQM -CJWRCL+Lq4ZHGYgXSi1T0/LJHSlOa1F5qhZpk9A= +hvcNAQELBQADggEBAKgnD+Ak7ttVfKvriYAsf4ttTYfOuyLfAr4hTTSXLN2u1ySD +fIpqSyeOkiEwfD5Bt7C/muEXEIyG/y6/C/ozb5JBvdd8c7zicLmaHtZtZbj4+H1b +/gqaBHuvWxiRR91bbgNaKsPMGCWiAvUt4/+y8z6xefUS+aKeFNhYjdwyFIr17j3Q +gxGpgCbYLLIoewP+Oj6xvZgGl6vj0xW9a4144xjFo1o1vqWkj+3IZGmnZ/jyznWd +5XzZCUaM9z6nn7NVxQZEelk885Q3oUxY96rRO+IUA8Vnk3iEtOdZPbNBaZwvgkfz +4vhvM8gKbdeeWoOAJDLzDZiDrUpKtIkBcLuJ7Cw= -----END CERTIFICATE----- CERT end diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb index 079f66f511..01268d320f 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb @@ -44,10 +44,13 @@ include_recipe "::_chef_gem" include_recipe "ntp" unless fedora? # fedora 34+ doesn't have NTP -resolver_config "/etc/resolv.conf" do - nameservers [ "8.8.8.8", "8.8.4.4" ] - search [ "chef.io" ] -end +# FIXME linux docker images seem to produce +# EBUSY errors on moving or writing to /etc/resolv.conf +# +# resolver_config "/etc/resolv.conf" do +# nameservers [ "8.8.8.8", "8.8.4.4" ] +# search [ "chef.io" ] +# end users_from_databag = search("users", "*:*") diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb index d37174edd2..0c60bf1b0f 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb @@ -13,6 +13,59 @@ chef_sleep "2" execute "dir" +execute "Print git version" do + command "git --version & git --exec-path" + live_stream true +end + +# FIXME Uninstall git using powershell +# this is a temporary band-aid due to the fallback git version in +# https://github.com/sous-chefs/git defaulting to an older version of git +# than will be installed on the current image this runs in for GitHub Actions +powershell_script "uninstall_git" do + code <<-EOH + $possibleInstalledPaths = @("C:/Program Files/Git/", "C:/Program Files (x64)/Git/", "c:/git/") + $foundAnInstallation = $false + ### For all places where Git "could" be. + foreach ($installPath in $possibleInstalledPaths) + { + ### If the path where Git could exist + if (Test-Path($installPath)) + { + ## Some Git stuff might be running.. kill them. + Stop-Process -processname Bash -erroraction 'silentlycontinue' + Stop-Process -processname Putty* -erroraction 'silentlycontinue' + + $foundAnInstallation = $true + Write-Host "Removing Git from " $installPath + + ### Find if there's an uninstaller in the folder. + $uninstallers = Get-ChildItem $installPath"unins*.exe" + + ### In reality, there should only be just one that matches. + foreach ($uninstaller in $uninstallers) + { + ### Invoke the uninstaller. + $uninstallerCommandLineOptions = "/SP- /VERYSILENT /SUPPRESSMSGBOXES /FORCECLOSEAPPLICATIONS" + Start-Process -Wait -FilePath $uninstaller -ArgumentList $uninstallerCommandLineOptions + } + + ### Remove the folder if it didn't clean up properly. + if (Test-Path($installPath)) + { + Remove-Item -Recurse -Force $installPath + } + } + } + + if (!($foundAnInstallation)) + { + Write-Host "No git installation found. Nothing to uninstall" + } + EOH + live_stream true +end + powershell_script "sleep 1 second" do code "Start-Sleep -s 1" live_stream true -- cgit v1.2.1 From 731f804d7c0452ae8bb0a005b2179f9c0d9647a4 Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Fri, 26 Aug 2022 14:11:09 +0530 Subject: Add pipeline for macos universal pkg. Initial commit, version hardcoded. Signed-off-by: Vikram Karve --- .expeditor/config.yml | 4 +++ .expeditor/macos_universal_package.pipeline.yml | 18 ++++++++++++ .expeditor/scripts/create_mac_universal_pkg.sh | 37 +++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 .expeditor/macos_universal_package.pipeline.yml create mode 100755 .expeditor/scripts/create_mac_universal_pkg.sh diff --git a/.expeditor/config.yml b/.expeditor/config.yml index d249264afa..fbbd1393c9 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -54,6 +54,9 @@ pipelines: definition: .expeditor/adhoc-canary.omnibus.yml env: - ADHOC: true + - macos_universal_package: + description: Builds universal macos package using arch specific packages + definition: .expeditor/macos_universal_package.pipeline.yml github: # This deletes the GitHub PR branch after successfully merged into the release branch @@ -86,6 +89,7 @@ subscriptions: - workload: artifact_published:unstable:chef:{{version_constraint}} actions: - trigger_pipeline:docker/build + - trigger_pipelie:macos_universal_package - workload: artifact_published:current:chef:{{version_constraint}} actions: - bash:.expeditor/promote-docker-images.sh diff --git a/.expeditor/macos_universal_package.pipeline.yml b/.expeditor/macos_universal_package.pipeline.yml new file mode 100644 index 0000000000..8617d418c1 --- /dev/null +++ b/.expeditor/macos_universal_package.pipeline.yml @@ -0,0 +1,18 @@ +--- +expeditor: + defaults: + buildkite: + timeout_in_minutes: 60 + retry: + automatic: + limit: 1 + +steps: + +- label: ":mac: Create universal macos package" + commands: + - ./.expeditor/scripts/create_mac_universal_pkg.sh + expeditor: + executor: + macos: + os-version: "11" diff --git a/.expeditor/scripts/create_mac_universal_pkg.sh b/.expeditor/scripts/create_mac_universal_pkg.sh new file mode 100755 index 0000000000..3b9b846470 --- /dev/null +++ b/.expeditor/scripts/create_mac_universal_pkg.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +mkdir -p ./stage/pkg/tmp/chef-pkgs +mkdir -p ./stage/script + +pushd ./stage/pkg/tmp/chef-pkgs + +curl -O https://packages.chef.io/files/current/chef/18.0.92/mac_os_x/11/chef-18.0.92-1.x86_64.dmg +hdiutil attach chef-18.0.92-1.x86_64.dmg +cp /Volumes/Chef\ Infra\ Client/chef-18.0.92-1.x86_64.pkg ./ +hdiutil detach /Volumes/Chef\ Infra\ Client +rm chef-18.0.92-1.x86_64.dmg + +curl -O https://packages.chef.io/files/current/chef/18.0.92/mac_os_x/11/chef-18.0.92-1.arm64.dmg +hdiutil attach chef-18.0.92-1.arm64.dmg +cp /Volumes/Chef\ Infra\ Client/chef-18.0.92-1.arm64.pkg ./ +hdiutil detach /Volumes/Chef\ Infra\ Client +rm chef-18.0.92-1.arm64.dmg + +popd + +cat << EOF > ./stage/script/postinstall +#!/bin/sh + +if [ `uname -m` == 'x86_64' ] +then + installer -pkg /tmp/chef-pkgs/chef-18.0.92-1.x86_64.pkg -target LocalSystem -verbose +elif [ `uname -m` == 'arm64' ] +then + installer -pkg /tmp/chef-pkgs/chef-18.0.92-1.arm64.pkg -target LocalSystem -verbose +fi +EOF + +chmod +x ./stage/script/postinstall + +pkgbuild --root stage/pkg --scripts stage/script --identifier "io.chef.infra-client.wrapper" \ + --version "18.0.92" --install-location / --min-os-version 10.15 stage/pkg/chef-18.0.92-1.universal.pkg -- cgit v1.2.1 From 619f60c8020d06251ade7c050ea454294ec48bea Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Fri, 26 Aug 2022 15:17:46 +0530 Subject: fix typo in expeditor config Signed-off-by: Vikram Karve --- .expeditor/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/config.yml b/.expeditor/config.yml index fbbd1393c9..18f4d859df 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -89,7 +89,7 @@ subscriptions: - workload: artifact_published:unstable:chef:{{version_constraint}} actions: - trigger_pipeline:docker/build - - trigger_pipelie:macos_universal_package + - trigger_pipeline:macos_universal_package - workload: artifact_published:current:chef:{{version_constraint}} actions: - bash:.expeditor/promote-docker-images.sh -- cgit v1.2.1 From 77222295e80d94063319ddc2f0089017f7e806db Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Fri, 26 Aug 2022 16:37:16 +0530 Subject: update macos version per expeditor conformance Signed-off-by: Vikram Karve --- .expeditor/macos_universal_package.pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/macos_universal_package.pipeline.yml b/.expeditor/macos_universal_package.pipeline.yml index 8617d418c1..85641e9f19 100644 --- a/.expeditor/macos_universal_package.pipeline.yml +++ b/.expeditor/macos_universal_package.pipeline.yml @@ -15,4 +15,4 @@ steps: expeditor: executor: macos: - os-version: "11" + os-version: "10.15" -- cgit v1.2.1 From b8c94a402063e1db02b9fa851045da281dab94cf Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Fri, 26 Aug 2022 17:08:39 +0530 Subject: start with empty pipeline as recommended Signed-off-by: Vikram Karve --- .expeditor/macos_universal_package.pipeline.yml | 19 +------------ .expeditor/scripts/create_mac_universal_pkg.sh | 37 ------------------------- 2 files changed, 1 insertion(+), 55 deletions(-) delete mode 100755 .expeditor/scripts/create_mac_universal_pkg.sh diff --git a/.expeditor/macos_universal_package.pipeline.yml b/.expeditor/macos_universal_package.pipeline.yml index 85641e9f19..6fddb90a89 100644 --- a/.expeditor/macos_universal_package.pipeline.yml +++ b/.expeditor/macos_universal_package.pipeline.yml @@ -1,18 +1 @@ ---- -expeditor: - defaults: - buildkite: - timeout_in_minutes: 60 - retry: - automatic: - limit: 1 - -steps: - -- label: ":mac: Create universal macos package" - commands: - - ./.expeditor/scripts/create_mac_universal_pkg.sh - expeditor: - executor: - macos: - os-version: "10.15" +# This pipeline is currently under development. diff --git a/.expeditor/scripts/create_mac_universal_pkg.sh b/.expeditor/scripts/create_mac_universal_pkg.sh deleted file mode 100755 index 3b9b846470..0000000000 --- a/.expeditor/scripts/create_mac_universal_pkg.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -mkdir -p ./stage/pkg/tmp/chef-pkgs -mkdir -p ./stage/script - -pushd ./stage/pkg/tmp/chef-pkgs - -curl -O https://packages.chef.io/files/current/chef/18.0.92/mac_os_x/11/chef-18.0.92-1.x86_64.dmg -hdiutil attach chef-18.0.92-1.x86_64.dmg -cp /Volumes/Chef\ Infra\ Client/chef-18.0.92-1.x86_64.pkg ./ -hdiutil detach /Volumes/Chef\ Infra\ Client -rm chef-18.0.92-1.x86_64.dmg - -curl -O https://packages.chef.io/files/current/chef/18.0.92/mac_os_x/11/chef-18.0.92-1.arm64.dmg -hdiutil attach chef-18.0.92-1.arm64.dmg -cp /Volumes/Chef\ Infra\ Client/chef-18.0.92-1.arm64.pkg ./ -hdiutil detach /Volumes/Chef\ Infra\ Client -rm chef-18.0.92-1.arm64.dmg - -popd - -cat << EOF > ./stage/script/postinstall -#!/bin/sh - -if [ `uname -m` == 'x86_64' ] -then - installer -pkg /tmp/chef-pkgs/chef-18.0.92-1.x86_64.pkg -target LocalSystem -verbose -elif [ `uname -m` == 'arm64' ] -then - installer -pkg /tmp/chef-pkgs/chef-18.0.92-1.arm64.pkg -target LocalSystem -verbose -fi -EOF - -chmod +x ./stage/script/postinstall - -pkgbuild --root stage/pkg --scripts stage/script --identifier "io.chef.infra-client.wrapper" \ - --version "18.0.92" --install-location / --min-os-version 10.15 stage/pkg/chef-18.0.92-1.universal.pkg -- cgit v1.2.1 From 65e2d57afd116b8e0dc34d617c1ed276b569a597 Mon Sep 17 00:00:00 2001 From: Chef Expeditor Date: Tue, 30 Aug 2022 19:12:22 +0000 Subject: Bump version to 18.0.142 by Chef Expeditor Obvious fix; these changes are the result of automation not creative thinking. --- CHANGELOG.md | 7 ++++--- Gemfile.lock | 28 ++++++++++++++-------------- VERSION | 2 +- chef-bin/lib/chef-bin/version.rb | 2 +- chef-config/lib/chef-config/version.rb | 2 +- chef-utils/lib/chef-utils/version.rb | 2 +- knife/lib/chef/knife/version.rb | 2 +- lib/chef/version.rb | 2 +- 8 files changed, 24 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 167498bb0a..01be44c259 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,18 @@ 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/). - -## [v18.0.141](https://github.com/chef/chef/tree/v18.0.141) (2022-08-16) + +## [v18.0.142](https://github.com/chef/chef/tree/v18.0.142) (2022-08-30) #### Merged Pull Requests -- Add newline to end of sysctl files [#13118](https://github.com/chef/chef/pull/13118) ([tmccombs](https://github.com/tmccombs)) +- Add empty pipeline for macos universal package [#13152](https://github.com/chef/chef/pull/13152) ([vkarve-chef](https://github.com/vkarve-chef)) ### Changes not yet released to stable #### Merged Pull Requests +- Add empty pipeline for macos universal package [#13152](https://github.com/chef/chef/pull/13152) ([vkarve-chef](https://github.com/vkarve-chef)) - Add newline to end of sysctl files [#13118](https://github.com/chef/chef/pull/13118) ([tmccombs](https://github.com/tmccombs)) - fix chef_client_scheduled_task splay to accept 0 [#13095](https://github.com/chef/chef/pull/13095) ([Stromweld](https://github.com/Stromweld)) - add url for principal names [#13104](https://github.com/chef/chef/pull/13104) ([Stromweld](https://github.com/Stromweld)) diff --git a/Gemfile.lock b/Gemfile.lock index e96b11286f..36302c47a3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,12 +42,12 @@ GIT PATH remote: . specs: - chef (18.0.141) + chef (18.0.142) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.141) - chef-utils (= 18.0.141) + chef-config (= 18.0.142) + chef-utils (= 18.0.142) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -76,13 +76,13 @@ PATH unf_ext (< 0.0.8.1) uuidtools (>= 2.1.5, < 3.0) vault (~> 0.16) - chef (18.0.141-universal-mingw32) + chef (18.0.142-universal-mingw32) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.0.141) + chef-config (= 18.0.142) chef-powershell (~> 1.0.12) - chef-utils (= 18.0.141) + chef-utils (= 18.0.142) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -126,15 +126,15 @@ PATH PATH remote: chef-bin specs: - chef-bin (18.0.141) - chef (= 18.0.141) + chef-bin (18.0.142) + chef (= 18.0.142) PATH remote: chef-config specs: - chef-config (18.0.141) + chef-config (18.0.142) addressable - chef-utils (= 18.0.141) + chef-utils (= 18.0.142) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) @@ -143,7 +143,7 @@ PATH PATH remote: chef-utils specs: - chef-utils (18.0.141) + chef-utils (18.0.142) concurrent-ruby GEM @@ -156,8 +156,8 @@ GEM mixlib-shellout (>= 2.0, < 4.0) ast (2.4.2) aws-eventstream (1.2.0) - aws-partitions (1.619.0) - aws-sdk-core (3.132.0) + aws-partitions (1.623.0) + aws-sdk-core (3.136.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) @@ -169,7 +169,7 @@ GEM aws-sdk-core (~> 3, >= 3.127.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) - aws-sdk-secretsmanager (1.64.0) + aws-sdk-secretsmanager (1.65.0) aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) aws-sigv4 (1.5.1) diff --git a/VERSION b/VERSION index 5865806b91..e756675b00 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -18.0.141 \ No newline at end of file +18.0.142 \ 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 4832995802..5f1a2e3211 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 = "18.0.141".freeze + VERSION = "18.0.142".freeze end # diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 3eb6379bd5..7799607e56 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 = "18.0.141".freeze + VERSION = "18.0.142".freeze end diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb index 92f9234bbf..8c867bd068 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 = "18.0.141" + VERSION = "18.0.142" end diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb index 41828ba094..3b53b1177e 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 = "18.0.141".freeze + VERSION = "18.0.142".freeze end end diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 8bae4c3fa8..a95964f938 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("18.0.141") + VERSION = Chef::VersionString.new("18.0.142") end # -- cgit v1.2.1