summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.expeditor/release.omnibus.yml12
-rw-r--r--.expeditor/verify.pipeline.yml3
-rw-r--r--CHANGELOG.md13
-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--docs/dev/how_to/releasing_chef_infra.md4
-rw-r--r--knife/Gemfile.lock4
-rw-r--r--knife/lib/chef/knife/version.rb2
-rw-r--r--lib/chef/version.rb2
-rw-r--r--lib/chef/win32/handle.rb13
-rw-r--r--omnibus/Gemfile.lock4
-rw-r--r--spec/functional/resource/group_spec.rb12
-rw-r--r--spec/functional/resource/link_spec.rb16
-rw-r--r--spec/functional/shell_spec.rb7
-rw-r--r--spec/unit/daemon_spec.rb6
-rw-r--r--spec/unit/platform/query_helpers_spec.rb4
19 files changed, 73 insertions, 59 deletions
diff --git a/.expeditor/release.omnibus.yml b/.expeditor/release.omnibus.yml
index 5007f6567e..bb44478a33 100644
--- a/.expeditor/release.omnibus.yml
+++ b/.expeditor/release.omnibus.yml
@@ -15,7 +15,7 @@ builder-to-testers-map:
aix-7.1-powerpc:
- aix-7.1-powerpc
- aix-7.2-powerpc
- # - aix-7.3-powerpc
+ - aix-7.3-powerpc
# amazon-2022-aarch64:
# - amazon-2022-aarch64
# amazon-2022-x86_64:
@@ -68,10 +68,10 @@ builder-to-testers-map:
- sles-15-x86_64
sles-15-aarch64:
- sles-15-aarch64
- # solaris2-5.11-i386:
- # - solaris2-5.11-i386
- # solaris2-5.11-sparc:
- # - solaris2-5.11-sparc
+ solaris2-5.11-i386:
+ - solaris2-5.11-i386
+ solaris2-5.11-sparc:
+ - solaris2-5.11-sparc
ubuntu-18.04-aarch64:
- ubuntu-18.04-aarch64
- ubuntu-20.04-aarch64
@@ -82,7 +82,7 @@ builder-to-testers-map:
- ubuntu-20.04-x86_64
- ubuntu-22.04-x86_64
windows-2012r2-x86_64:
- # - windows-2012-x86_64
+ - windows-2012-x86_64
- windows-2012r2-x86_64
- windows-2016-x86_64
- windows-2019-x86_64
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
index e8833be063..214bc3afdb 100644
--- a/.expeditor/verify.pipeline.yml
+++ b/.expeditor/verify.pipeline.yml
@@ -146,6 +146,7 @@ steps:
- label: "Integration openSUSE 15 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
+ - zypper addrepo --check --priority 50 --refresh --name "Chefzypper-repo" "https://mirror.fcix.net/opensuse/distribution/leap/15.3/repo/oss/" "chefzypper"
- zypper install -y cron insserv-compat
- cd /workdir; bundle config set --local without omnibus_package
- bundle config set --local path 'vendor/bundle'
@@ -160,6 +161,7 @@ steps:
- label: "Functional openSUSE 15 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
+ - zypper addrepo --check --priority 50 --refresh --name "Chefzypper-repo" "https://mirror.fcix.net/opensuse/distribution/leap/15.3/repo/oss/" "chefzypper"
- zypper install -y cronie insserv-compat
- zypper install -y libarchive-devel
- cd /workdir; bundle config set --local without omnibus_package
@@ -175,6 +177,7 @@ steps:
- label: "Unit openSUSE 15 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
+ - zypper addrepo --check --priority 50 --refresh --name "Chefzypper-repo" "https://mirror.fcix.net/opensuse/distribution/leap/15.3/repo/oss/" "chefzypper"
- zypper install -y cron insserv-compat libarchive-devel
- bundle config set --local without omnibus_package
- bundle config set --local path 'vendor/bundle'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4e39a4022e..ec872021eb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,17 +1,24 @@
<!-- 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 18.0.155 -->
-## [v18.0.155](https://github.com/chef/chef/tree/v18.0.155) (2022-09-28)
+<!-- latest_release 18.0.162 -->
+## [v18.0.162](https://github.com/chef/chef/tree/v18.0.162) (2022-10-13)
#### Merged Pull Requests
-- Disable platforms still under development [#13218](https://github.com/chef/chef/pull/13218) ([marcparadise](https://github.com/marcparadise))
+- Updated release notes to consider cookstyle verification point [#13225](https://github.com/chef/chef/pull/13225) ([blabade](https://github.com/blabade))
<!-- latest_release -->
<!-- release_rollup since=17.9.26 -->
### Changes not yet released to stable
#### Merged Pull Requests
+- Updated release notes to consider cookstyle verification point [#13225](https://github.com/chef/chef/pull/13225) ([blabade](https://github.com/blabade)) <!-- 18.0.162 -->
+- Adding a new repository to ensure images match the cache [#13237](https://github.com/chef/chef/pull/13237) ([johnmccrae](https://github.com/johnmccrae)) <!-- 18.0.161 -->
+- updating builders to add server 2012 back in [#13235](https://github.com/chef/chef/pull/13235) ([johnmccrae](https://github.com/johnmccrae)) <!-- 18.0.160 -->
+- Reenable Solaris build/release [#13232](https://github.com/chef/chef/pull/13232) ([tpowell-progress](https://github.com/tpowell-progress)) <!-- 18.0.159 -->
+- Do not raise if we can&#39;t close win resource handle [#13229](https://github.com/chef/chef/pull/13229) ([marcparadise](https://github.com/marcparadise)) <!-- 18.0.158 -->
+- Fix term and privilege related broken tests in Solaris build [#13230](https://github.com/chef/chef/pull/13230) ([tpowell-progress](https://github.com/tpowell-progress)) <!-- 18.0.157 -->
+- On AIX, add delay to ensure members added to group are visible to tests [#13220](https://github.com/chef/chef/pull/13220) ([neha-p6](https://github.com/neha-p6)) <!-- 18.0.156 -->
- Disable platforms still under development [#13218](https://github.com/chef/chef/pull/13218) ([marcparadise](https://github.com/marcparadise)) <!-- 18.0.155 -->
- Update to latest omnibus [#13216](https://github.com/chef/chef/pull/13216) ([marcparadise](https://github.com/marcparadise)) <!-- 18.0.154 -->
- Allow user providers to declare no support for ruby-shadow [#13213](https://github.com/chef/chef/pull/13213) ([marcparadise](https://github.com/marcparadise)) <!-- 18.0.153 -->
diff --git a/Gemfile.lock b/Gemfile.lock
index 7585dd20ec..c4240c0a60 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -51,12 +51,12 @@ GIT
PATH
remote: .
specs:
- chef (18.0.155)
+ chef (18.0.162)
addressable
aws-sdk-s3 (~> 1.91)
aws-sdk-secretsmanager (~> 1.46)
- chef-config (= 18.0.155)
- chef-utils (= 18.0.155)
+ chef-config (= 18.0.162)
+ chef-utils (= 18.0.162)
chef-vault
chef-zero (>= 14.0.11)
corefoundation (~> 0.3.4)
@@ -85,13 +85,13 @@ PATH
unf_ext (>= 0.0.8.2)
uuidtools (>= 2.1.5, < 3.0)
vault (~> 0.16)
- chef (18.0.155-x64-mingw-ucrt)
+ chef (18.0.162-x64-mingw-ucrt)
addressable
aws-sdk-s3 (~> 1.91)
aws-sdk-secretsmanager (~> 1.46)
- chef-config (= 18.0.155)
+ chef-config (= 18.0.162)
chef-powershell (~> 1.0.12)
- chef-utils (= 18.0.155)
+ chef-utils (= 18.0.162)
chef-vault
chef-zero (>= 14.0.11)
corefoundation (~> 0.3.4)
@@ -135,15 +135,15 @@ PATH
PATH
remote: chef-bin
specs:
- chef-bin (18.0.155)
- chef (= 18.0.155)
+ chef-bin (18.0.162)
+ chef (= 18.0.162)
PATH
remote: chef-config
specs:
- chef-config (18.0.155)
+ chef-config (18.0.162)
addressable
- chef-utils (= 18.0.155)
+ chef-utils (= 18.0.162)
fuzzyurl
mixlib-config (>= 2.2.12, < 4.0)
mixlib-shellout (>= 2.0, < 4.0)
@@ -152,7 +152,7 @@ PATH
PATH
remote: chef-utils
specs:
- chef-utils (18.0.155)
+ chef-utils (18.0.162)
concurrent-ruby
GEM
diff --git a/VERSION b/VERSION
index ab05306b85..6a0fad64d6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-18.0.155 \ No newline at end of file
+18.0.162 \ 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 f62078a5de..633e35e72e 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.155".freeze
+ VERSION = "18.0.162".freeze
end
#
diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb
index cbeb1ed1c3..3132e05a7b 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.155".freeze
+ VERSION = "18.0.162".freeze
end
diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb
index af9ebf6a47..962eb673fd 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.155"
+ VERSION = "18.0.162"
end
diff --git a/docs/dev/how_to/releasing_chef_infra.md b/docs/dev/how_to/releasing_chef_infra.md
index d6318880eb..f3fad5656b 100644
--- a/docs/dev/how_to/releasing_chef_infra.md
+++ b/docs/dev/how_to/releasing_chef_infra.md
@@ -62,6 +62,10 @@ Once this is updated, you'll need to build / push the artifact to the Chocolatey
Note: In order to push the artifact, you will need to be added as a maintainer on [Chocolatey.org](https://chocolatey.org/).
+### Cookstyle Verification
+Please make sure cookstyle is working properly & auto correcting detected offenses for any of the cookbooks you are trying to test against the newer version of Chef Infra Client
+Reference doc - https://github.com/chef/cookstyle#usage
+
### Relax
You're done. You have a month to relax.
diff --git a/knife/Gemfile.lock b/knife/Gemfile.lock
index a0114c1048..abb6ce8497 100644
--- a/knife/Gemfile.lock
+++ b/knife/Gemfile.lock
@@ -1,8 +1,8 @@
PATH
remote: ..
specs:
- chef (18.0.155)
- chef (18.0.155-x64-mingw-ucrt)
+ chef (18.0.162)
+ chef (18.0.162-x64-mingw-ucrt)
PLATFORMS
ruby
diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb
index 2c9363bf90..5820054f74 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.155".freeze
+ VERSION = "18.0.162".freeze
end
end
diff --git a/lib/chef/version.rb b/lib/chef/version.rb
index 70592d4051..d101dab323 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.155")
+ VERSION = Chef::VersionString.new("18.0.162")
end
#
diff --git a/lib/chef/win32/handle.rb b/lib/chef/win32/handle.rb
index 1b0257ed68..a677b4021e 100644
--- a/lib/chef/win32/handle.rb
+++ b/lib/chef/win32/handle.rb
@@ -26,10 +26,6 @@ class Chef
class Handle
extend Chef::ReservedNames::Win32::API::Process
- # See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683179(v=vs.85).aspx
- # The handle value returned by the GetCurrentProcess function is the pseudo handle (HANDLE)-1 (which is 0xFFFFFFFF)
- CURRENT_PROCESS_HANDLE = 4294967295
-
def initialize(handle)
@handle = handle
ObjectSpace.define_finalizer(self, Handle.close_handle_finalizer(handle))
@@ -38,13 +34,16 @@ class Chef
attr_reader :handle
def self.close_handle_finalizer(handle)
+ proc { close_handle(handle) }
+ end
+
+ def self.close_handle(handle)
# According to http://msdn.microsoft.com/en-us/library/windows/desktop/ms683179(v=vs.85).aspx, it is not necessary
# to close the pseudo handle returned by the GetCurrentProcess function. The docs also say that it doesn't hurt to call
# CloseHandle on it. However, doing so from inside of Ruby always seems to produce an invalid handle error.
- proc { close_handle(handle) unless handle == CURRENT_PROCESS_HANDLE }
- end
+ # The recommendation is to use GetCurrentProcess instead of the const (HANDLE)-1, to ensure we're making the correct comparison.
+ return if handle == GetCurrentProcess()
- def self.close_handle(handle)
unless CloseHandle(handle)
Chef::ReservedNames::Win32::Error.raise!
end
diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock
index b203af8050..698421a942 100644
--- a/omnibus/Gemfile.lock
+++ b/omnibus/Gemfile.lock
@@ -8,10 +8,10 @@ GIT
GIT
remote: https://github.com/chef/omnibus.git
- revision: 4b6901cf891474291368468b73301057ce9fadde
+ revision: 5bc091ab3ed4ab002ef85dad3923914c25bb3dcd
branch: main
specs:
- omnibus (9.0.7)
+ omnibus (9.0.8)
aws-sdk-s3 (~> 1)
chef-cleanroom (~> 1.0)
chef-utils (>= 15.4)
diff --git a/spec/functional/resource/group_spec.rb b/spec/functional/resource/group_spec.rb
index 9360020537..6e074a3e44 100644
--- a/spec/functional/resource/group_spec.rb
+++ b/spec/functional/resource/group_spec.rb
@@ -44,10 +44,10 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do
members.shift # Get rid of GroupMembership: string
members.include?(user)
else
- # TODO For some reason our temporary AIX 7.2 system does not correctly report group membership immediately after changes have been made.
- # Adding a 2 second delay for this platform is enough to get correct results.
- # We hope to remove this delay after we get more permanent AIX 7.2 systems in our CI pipeline. reference: https://github.com/chef/release-engineering/issues/1617
- sleep 2 if aix? && (ohai[:platform_version] == "7.2")
+ # NOTE: For some reason our temporary AIX 7.x systems do not correctly report group membership immediately after changes have been made.
+ # Adding a delay for this platform is enough to get correct results.
+ # reference: https://github.com/chef/release-engineering/issues/1617
+ sleep 3 if aix?
Etc.getgrnam(group_name).mem.include?(user)
end
end
@@ -133,6 +133,10 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do
temp_resource.append(true)
temp_resource.run_action(:modify)
members.each do |member|
+ # NOTE For some reason our temporary AIX 7.x systems do not correctly report group membership immediately after changes have been made.
+ # Adding a delay for this platform is enough to get correct results.
+ # reference: https://github.com/chef/release-engineering/issues/1617
+ sleep 3 if aix?
expect(user_exist_in_group?(member)).to eq(true)
end
end
diff --git a/spec/functional/resource/link_spec.rb b/spec/functional/resource/link_spec.rb
index 4637896fd7..480c2df92f 100644
--- a/spec/functional/resource/link_spec.rb
+++ b/spec/functional/resource/link_spec.rb
@@ -345,17 +345,17 @@ describe Chef::Resource::Link do
let(:test_user) { "test-link-user" }
before do
user(test_user).run_action(:create)
- # TODO For some reason our temporary AIX 7.2 system does not correctly report user existence immediately after changes have been made.
- # Adding a 2 second delay for this platform is enough to get correct results.
- # We hope to remove this delay after we get more permanent AIX 7.2 systems in our CI pipeline. reference: https://github.com/chef/release-engineering/issues/1617
- sleep 2 if aix? && (ohai[:platform_version] == "7.2")
+ # NOTE: For some reason our temporary AIX 7.x systems do not correctly report user existence immediately after changes have been made.
+ # Adding a delay for this platform is enough to get correct results.
+ # reference: https://github.com/chef/release-engineering/issues/1617
+ sleep 3 if aix?
end
after do
user(test_user).run_action(:remove)
- # TODO For some reason our temporary AIX 7.2 system does not correctly report user existence immediately after changes have been made.
- # Adding a 2 second delay for this platform is enough to get correct results.
- # We hope to remove this delay after we get more permanent AIX 7.2 systems in our CI pipeline. reference: https://github.com/chef/release-engineering/issues/1617
- sleep 2 if aix? && (ohai[:platform_version] == "7.2")
+ # TODO For some reason our temporary AIX 7.x systems do not correctly report user existence immediately after changes have been made.
+ # Adding a delay for this platform is enough to get correct results.
+ # reference: https://github.com/chef/release-engineering/issues/1617
+ sleep 3 if aix?
end
before(:each) do
resource.owner(test_user)
diff --git a/spec/functional/shell_spec.rb b/spec/functional/shell_spec.rb
index 203b6346b2..9430970552 100644
--- a/spec/functional/shell_spec.rb
+++ b/spec/functional/shell_spec.rb
@@ -78,8 +78,13 @@ describe Shell do
def run_chef_shell_with(options)
# Windows ruby installs don't (always?) have PTY,
# so hide the require here
-
require "pty"
+
+ # FIXME this is temporary... Solaris envs have TERM set to unknown
+ # and the value isn't propagating from the build environment TERM
+ # variable
+ ENV["TERM"] = "vt100" if ["", "unknown"].include?(ENV["TERM"].to_s)
+
config = File.expand_path("shef-config.rb", CHEF_SPEC_DATA)
reader, writer, pid = PTY.spawn("bundle exec #{ChefUtils::Dist::Infra::SHELL} --no-multiline --no-singleline --no-colorize -c #{config} #{options}")
read_until(reader, "chef (#{Chef::VERSION})>")
diff --git a/spec/unit/daemon_spec.rb b/spec/unit/daemon_spec.rb
index f91210277b..05a09a5857 100644
--- a/spec/unit/daemon_spec.rb
+++ b/spec/unit/daemon_spec.rb
@@ -170,11 +170,7 @@ describe Chef::Daemon do
it "should log an appropriate error message and fail miserably" do
allow(Process).to receive(:initgroups).and_raise(Errno::EPERM)
- error = "Operation not permitted"
- if RUBY_PLATFORM.match("solaris2") || RUBY_PLATFORM.match("aix")
- error = "Not owner"
- end
- expect(Chef::Application).to receive(:fatal!).with("Permission denied when trying to change 999:999 to 501:20. #{error}")
+ expect(Chef::Application).to receive(:fatal!).with(/Permission denied when trying to change 999:999 to 501:20/)
Chef::Daemon._change_privilege(testuser)
end
end
diff --git a/spec/unit/platform/query_helpers_spec.rb b/spec/unit/platform/query_helpers_spec.rb
index 424bd6348b..0671d98476 100644
--- a/spec/unit/platform/query_helpers_spec.rb
+++ b/spec/unit/platform/query_helpers_spec.rb
@@ -41,12 +41,8 @@ end
describe "Chef::Platform#dsc_refresh_mode_disabled?", :windows_only do
let(:node) { instance_double("Chef::Node") }
- let(:powershell) { Class.new { include ChefPowerShell::ChefPowerShellModule::PowerShellExec } }
- subject(:object) { powershell.new }
it "returns true when RefreshMode is Disabled" do
- execution = object.powershell_exec("Get-DscLocalConfigurationManager", :powershell, timeout: -1)
- expect(execution.result["RefreshMode"]).to eq "PUSH"
expect(Chef::Platform.dsc_refresh_mode_disabled?(node)).to be false
end
end