diff options
-rw-r--r-- | CHANGELOG.md | 103 | ||||
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 50 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | chef-bin/lib/chef-bin/version.rb | 2 | ||||
-rw-r--r-- | chef-config/lib/chef-config/version.rb | 2 | ||||
-rw-r--r-- | chef-universal-mingw-ucrt.gemspec | 4 | ||||
-rw-r--r-- | chef-utils/lib/chef-utils/version.rb | 2 | ||||
-rw-r--r-- | knife/Gemfile.lock | 4 | ||||
-rw-r--r-- | knife/lib/chef/knife/version.rb | 2 | ||||
-rw-r--r-- | lib/chef/platform/query_helpers.rb | 6 | ||||
-rw-r--r-- | lib/chef/powershell.rb | 81 | ||||
-rw-r--r-- | lib/chef/version.rb | 2 |
13 files changed, 92 insertions, 170 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 60e8fcbbaa..86271cf060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,62 +1,62 @@ <!-- 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.2.5 --> -## [v18.2.5](https://github.com/chef/chef/tree/v18.2.5) (2023-03-30) - -#### Merged Pull Requests -- fixing one small missed step [#13661](https://github.com/chef/chef/pull/13661) ([sean-simmons-progress](https://github.com/sean-simmons-progress)) +<!-- latest_release --> <!-- latest_release --> -<!-- release_rollup since=18.1.0 --> -### Changes not yet released to stable - -#### Merged Pull Requests -- fixing one small missed step [#13661](https://github.com/chef/chef/pull/13661) ([sean-simmons-progress](https://github.com/sean-simmons-progress)) <!-- 18.2.5 --> -- Sean simmons progress/bugfix/build docker image [#13657](https://github.com/chef/chef/pull/13657) ([sean-simmons-progress](https://github.com/sean-simmons-progress)) <!-- 18.2.4 --> -- Update ssl cert used in kitchen tests [#13658](https://github.com/chef/chef/pull/13658) ([neha-p6](https://github.com/neha-p6)) <!-- 18.2.3 --> -- Updating cert code to adjust user vs localmachine keys [#13651](https://github.com/chef/chef/pull/13651) ([johnmccrae](https://github.com/johnmccrae)) <!-- 18.2.2 --> -- Fix issues in habitat/test pipeline [#13649](https://github.com/chef/chef/pull/13649) ([neha-p6](https://github.com/neha-p6)) <!-- 18.2.1 --> -- Update bundled dependencies for both chef and chef/omnibus [#13643](https://github.com/chef/chef/pull/13643) ([neha-p6](https://github.com/neha-p6)) <!-- 18.2.0 --> -- Sean simmons progress/bugfix/precommand [#13646](https://github.com/chef/chef/pull/13646) ([sean-simmons-progress](https://github.com/sean-simmons-progress)) <!-- 18.1.36 --> -- FIx kitchen test failures in windows boxes due to dependency issue in proxifier [#13644](https://github.com/chef/chef/pull/13644) ([neha-p6](https://github.com/neha-p6)) <!-- 18.1.35 --> -- Temporarily build 18.2 without AIX and without Windows 10/11 testers [#13642](https://github.com/chef/chef/pull/13642) ([tpowell-progress](https://github.com/tpowell-progress)) <!-- 18.1.34 --> -- Update test certificates [#13625](https://github.com/chef/chef/pull/13625) ([vkarve-chef](https://github.com/vkarve-chef)) <!-- 18.1.33 --> -- Update chef-foundation for proxifier2 [#13623](https://github.com/chef/chef/pull/13623) ([vkarve-chef](https://github.com/vkarve-chef)) <!-- 18.1.32 --> -- set default values for user and host on userdefaults [#12791](https://github.com/chef/chef/pull/12791) ([rishichawda](https://github.com/rishichawda)) <!-- 18.1.31 --> -- Add selinux_user and selinux_login resources [#13511](https://github.com/chef/chef/pull/13511) ([wheatevo](https://github.com/wheatevo)) <!-- 18.1.30 --> -- Correcting cert retrieval issues for multiple user scenarios [#13552](https://github.com/chef/chef/pull/13552) ([johnmccrae](https://github.com/johnmccrae)) <!-- 18.1.29 --> -- Updated the proxifier dependency [#13617](https://github.com/chef/chef/pull/13617) ([nikhil2611](https://github.com/nikhil2611)) <!-- 18.1.28 --> -- chore: Use the `chef_dictionary` directly. [#13467](https://github.com/chef/chef/pull/13467) ([Jason3S](https://github.com/Jason3S)) <!-- 18.1.27 --> -- Force errors after bundler in omnibus_chef_build [#13613](https://github.com/chef/chef/pull/13613) ([tpowell-progress](https://github.com/tpowell-progress)) <!-- 18.1.26 --> -- Bump kitchen-vagrant from 1.14.0 to 1.14.1 in /omnibus [#13599](https://github.com/chef/chef/pull/13599) ([dependabot[bot]](https://github.com/dependabot[bot])) <!-- 18.1.25 --> -- Bump omnibus-software from `6c14e85` to `87f418b` in /omnibus [#13605](https://github.com/chef/chef/pull/13605) ([dependabot[bot]](https://github.com/dependabot[bot])) <!-- 18.1.24 --> -- Tp/infc 437 nightlies [#13604](https://github.com/chef/chef/pull/13604) ([tpowell-progress](https://github.com/tpowell-progress)) <!-- 18.1.23 --> -- Add more details about releasing chocolatey package [#13577](https://github.com/chef/chef/pull/13577) ([neha-p6](https://github.com/neha-p6)) <!-- 18.1.22 --> -- Updating Omnibus [#13590](https://github.com/chef/chef/pull/13590) ([johnmccrae](https://github.com/johnmccrae)) <!-- 18.1.21 --> -- launchd - array instead of a hash for Apple's associated_bundle_ident… [#13477](https://github.com/chef/chef/pull/13477) ([Arequ](https://github.com/Arequ)) <!-- 18.1.20 --> -- Update pre-install cleanup [#13562](https://github.com/chef/chef/pull/13562) ([vkarve-chef](https://github.com/vkarve-chef)) <!-- 18.1.19 --> -- hab debugging doc [#13571](https://github.com/chef/chef/pull/13571) ([tpowell-progress](https://github.com/tpowell-progress)) <!-- 18.1.18 --> -- fixing the path here [#13573](https://github.com/chef/chef/pull/13573) ([sean-simmons-progress](https://github.com/sean-simmons-progress)) <!-- 18.1.17 --> -- Add rest of windows platforms to be tested on; Fixing syntax issue in build-test-omnibus [#13565](https://github.com/chef/chef/pull/13565) ([jesseprieur](https://github.com/jesseprieur)) <!-- 18.1.16 --> -- Bump omnibus-software from `db8acc3` to `b83f579` in /omnibus [#13556](https://github.com/chef/chef/pull/13556) ([dependabot[bot]](https://github.com/dependabot[bot])) <!-- 18.1.15 --> -- fix(apt_repository): Detect changes to expiration in key [#13535](https://github.com/chef/chef/pull/13535) ([tmccombs](https://github.com/tmccombs)) <!-- 18.1.14 --> -- add esoteric platforms to validate adhoc/release pipelines [#13546](https://github.com/chef/chef/pull/13546) ([evanahlberg](https://github.com/evanahlberg)) <!-- 18.1.13 --> -- Updating gems [#13551](https://github.com/chef/chef/pull/13551) ([johnmccrae](https://github.com/johnmccrae)) <!-- 18.1.12 --> -- Fix for missing S3 region if run with EC2 instance profile [#13525](https://github.com/chef/chef/pull/13525) ([tecracer-theinen](https://github.com/tecracer-theinen)) <!-- 18.1.11 --> -- Bumping gems to pull in a valid license_scout version [#13547](https://github.com/chef/chef/pull/13547) ([johnmccrae](https://github.com/johnmccrae)) <!-- 18.1.10 --> -- Run Amazon Linux 2 kitchen tests on ubuntu-20.04 [#13531](https://github.com/chef/chef/pull/13531) ([tpowell-progress](https://github.com/tpowell-progress)) <!-- 18.1.9 --> -- Change to github commit sha. [#13507](https://github.com/chef/chef/pull/13507) ([gcs-devel](https://github.com/gcs-devel)) <!-- 18.1.8 --> -- revert chef-foundation changes in chef omnibus config [#13528](https://github.com/chef/chef/pull/13528) ([evanahlberg](https://github.com/evanahlberg)) <!-- 18.1.7 --> -- Example of bash resource doubled escape characters [#13509](https://github.com/chef/chef/pull/13509) ([sean-horn](https://github.com/sean-horn)) <!-- 18.1.6 --> -- Update expired certificate used in kitchen tests [#13527](https://github.com/chef/chef/pull/13527) ([neha-p6](https://github.com/neha-p6)) <!-- 18.1.5 --> -- update verify pipeline and omnibus build/test to use containers [#13489](https://github.com/chef/chef/pull/13489) ([evanahlberg](https://github.com/evanahlberg)) <!-- 18.1.4 --> -- Docs and release details [#13484](https://github.com/chef/chef/pull/13484) ([tpowell-progress](https://github.com/tpowell-progress)) <!-- 18.1.3 --> -- Rewriting the zypper code to run only on openSUSE 15 [#13490](https://github.com/chef/chef/pull/13490) ([johnmccrae](https://github.com/johnmccrae)) <!-- 18.1.2 --> -- Edit resources description text [#13495](https://github.com/chef/chef/pull/13495) ([IanMadd](https://github.com/IanMadd)) <!-- 18.1.1 --> +<!-- release_rollup --> <!-- release_rollup --> <!-- latest_stable_release --> +## [v18.2.7](https://github.com/chef/chef/tree/v18.2.7) (2023-04-04) + +#### Merged Pull Requests +- Edit resources description text [#13495](https://github.com/chef/chef/pull/13495) ([IanMadd](https://github.com/IanMadd)) +- Rewriting the zypper code to run only on openSUSE 15 [#13490](https://github.com/chef/chef/pull/13490) ([johnmccrae](https://github.com/johnmccrae)) +- Docs and release details [#13484](https://github.com/chef/chef/pull/13484) ([tpowell-progress](https://github.com/tpowell-progress)) +- update verify pipeline and omnibus build/test to use containers [#13489](https://github.com/chef/chef/pull/13489) ([evanahlberg](https://github.com/evanahlberg)) +- Update expired certificate used in kitchen tests [#13527](https://github.com/chef/chef/pull/13527) ([neha-p6](https://github.com/neha-p6)) +- Example of bash resource doubled escape characters [#13509](https://github.com/chef/chef/pull/13509) ([sean-horn](https://github.com/sean-horn)) +- revert chef-foundation changes in chef omnibus config [#13528](https://github.com/chef/chef/pull/13528) ([evanahlberg](https://github.com/evanahlberg)) +- Change to github commit sha. [#13507](https://github.com/chef/chef/pull/13507) ([gcs-devel](https://github.com/gcs-devel)) +- Run Amazon Linux 2 kitchen tests on ubuntu-20.04 [#13531](https://github.com/chef/chef/pull/13531) ([tpowell-progress](https://github.com/tpowell-progress)) +- Bumping gems to pull in a valid license_scout version [#13547](https://github.com/chef/chef/pull/13547) ([johnmccrae](https://github.com/johnmccrae)) +- Fix for missing S3 region if run with EC2 instance profile [#13525](https://github.com/chef/chef/pull/13525) ([tecracer-theinen](https://github.com/tecracer-theinen)) +- Updating gems [#13551](https://github.com/chef/chef/pull/13551) ([johnmccrae](https://github.com/johnmccrae)) +- add esoteric platforms to validate adhoc/release pipelines [#13546](https://github.com/chef/chef/pull/13546) ([evanahlberg](https://github.com/evanahlberg)) +- fix(apt_repository): Detect changes to expiration in key [#13535](https://github.com/chef/chef/pull/13535) ([tmccombs](https://github.com/tmccombs)) +- Bump omnibus-software from `db8acc3` to `b83f579` in /omnibus [#13556](https://github.com/chef/chef/pull/13556) ([dependabot[bot]](https://github.com/dependabot[bot])) +- Add rest of windows platforms to be tested on; Fixing syntax issue in build-test-omnibus [#13565](https://github.com/chef/chef/pull/13565) ([jesseprieur](https://github.com/jesseprieur)) +- fixing the path here [#13573](https://github.com/chef/chef/pull/13573) ([sean-simmons-progress](https://github.com/sean-simmons-progress)) +- hab debugging doc [#13571](https://github.com/chef/chef/pull/13571) ([tpowell-progress](https://github.com/tpowell-progress)) +- Update pre-install cleanup [#13562](https://github.com/chef/chef/pull/13562) ([vkarve-chef](https://github.com/vkarve-chef)) +- launchd - array instead of a hash for Apple's associated_bundle_ident… [#13477](https://github.com/chef/chef/pull/13477) ([Arequ](https://github.com/Arequ)) +- Updating Omnibus [#13590](https://github.com/chef/chef/pull/13590) ([johnmccrae](https://github.com/johnmccrae)) +- Add more details about releasing chocolatey package [#13577](https://github.com/chef/chef/pull/13577) ([neha-p6](https://github.com/neha-p6)) +- Tp/infc 437 nightlies [#13604](https://github.com/chef/chef/pull/13604) ([tpowell-progress](https://github.com/tpowell-progress)) +- Bump omnibus-software from `6c14e85` to `87f418b` in /omnibus [#13605](https://github.com/chef/chef/pull/13605) ([dependabot[bot]](https://github.com/dependabot[bot])) +- Bump kitchen-vagrant from 1.14.0 to 1.14.1 in /omnibus [#13599](https://github.com/chef/chef/pull/13599) ([dependabot[bot]](https://github.com/dependabot[bot])) +- Force errors after bundler in omnibus_chef_build [#13613](https://github.com/chef/chef/pull/13613) ([tpowell-progress](https://github.com/tpowell-progress)) +- chore: Use the `chef_dictionary` directly. [#13467](https://github.com/chef/chef/pull/13467) ([Jason3S](https://github.com/Jason3S)) +- Updated the proxifier dependency [#13617](https://github.com/chef/chef/pull/13617) ([nikhil2611](https://github.com/nikhil2611)) +- Correcting cert retrieval issues for multiple user scenarios [#13552](https://github.com/chef/chef/pull/13552) ([johnmccrae](https://github.com/johnmccrae)) +- Add selinux_user and selinux_login resources [#13511](https://github.com/chef/chef/pull/13511) ([wheatevo](https://github.com/wheatevo)) +- set default values for user and host on userdefaults [#12791](https://github.com/chef/chef/pull/12791) ([rishichawda](https://github.com/rishichawda)) +- Update chef-foundation for proxifier2 [#13623](https://github.com/chef/chef/pull/13623) ([vkarve-chef](https://github.com/vkarve-chef)) +- Update test certificates [#13625](https://github.com/chef/chef/pull/13625) ([vkarve-chef](https://github.com/vkarve-chef)) +- Temporarily build 18.2 without AIX and without Windows 10/11 testers [#13642](https://github.com/chef/chef/pull/13642) ([tpowell-progress](https://github.com/tpowell-progress)) +- FIx kitchen test failures in windows boxes due to dependency issue in proxifier [#13644](https://github.com/chef/chef/pull/13644) ([neha-p6](https://github.com/neha-p6)) +- Sean simmons progress/bugfix/precommand [#13646](https://github.com/chef/chef/pull/13646) ([sean-simmons-progress](https://github.com/sean-simmons-progress)) +- Update bundled dependencies for both chef and chef/omnibus [#13643](https://github.com/chef/chef/pull/13643) ([neha-p6](https://github.com/neha-p6)) +- Fix issues in habitat/test pipeline [#13649](https://github.com/chef/chef/pull/13649) ([neha-p6](https://github.com/neha-p6)) +- Updating cert code to adjust user vs localmachine keys [#13651](https://github.com/chef/chef/pull/13651) ([johnmccrae](https://github.com/johnmccrae)) +- Update ssl cert used in kitchen tests [#13658](https://github.com/chef/chef/pull/13658) ([neha-p6](https://github.com/neha-p6)) +- Sean simmons progress/bugfix/build docker image [#13657](https://github.com/chef/chef/pull/13657) ([sean-simmons-progress](https://github.com/sean-simmons-progress)) +- fixing one small missed step [#13661](https://github.com/chef/chef/pull/13661) ([sean-simmons-progress](https://github.com/sean-simmons-progress)) +- minor gem update to get the version bumped [#13668](https://github.com/chef/chef/pull/13668) ([johnmccrae](https://github.com/johnmccrae)) +- "FFI Yajl" fix [#13662](https://github.com/chef/chef/pull/13662) ([tpowell-progress](https://github.com/tpowell-progress)) +<!-- latest_stable_release --> + ## [v18.1.0](https://github.com/chef/chef/tree/v18.1.0) (2023-01-05) #### Merged Pull Requests @@ -84,7 +84,6 @@ This changelog lists individual merged pull requests to Chef Infra Client and ge - updating file_system to send back the copy status [#13107](https://github.com/chef/chef/pull/13107) ([vinay-satish](https://github.com/vinay-satish)) - Adds 'makecache_fast' property to `yum_repository` minimise cached repodata [#12915](https://github.com/chef/chef/pull/12915) ([lanky](https://github.com/lanky)) - Updating Zypper to overcome repository errors [#13470](https://github.com/chef/chef/pull/13470) ([johnmccrae](https://github.com/johnmccrae)) -<!-- latest_stable_release --> ## [v18.0.185](https://github.com/chef/chef/tree/v18.0.185) (2022-11-17) diff --git a/Dockerfile b/Dockerfile index c92ab21012..9428d80d09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ FROM busybox LABEL maintainer="Chef Software, Inc. <docker@chef.io>" ARG CHANNEL=stable -ARG VERSION=18.2.3 +ARG VERSION=18.2.7 ARG ARCH=x86_64 ARG PKG_VERSION=6 diff --git a/Gemfile.lock b/Gemfile.lock index b3ea85620f..a4d367b2c6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,9 @@ GIT remote: https://github.com/chef/ohai.git - revision: 211aa1b0ec5a09ece718ea10c6c01c46fa47ff54 + revision: c63a8dca74db3fd542a082c7b6626ff497904290 branch: main specs: - ohai (18.1.3) + ohai (18.1.4) chef-config (>= 14.12, < 19) chef-utils (>= 16.0, < 19) ffi (~> 1.9) @@ -44,12 +44,12 @@ GIT PATH remote: . specs: - chef (18.2.5) + chef (18.2.7) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.2.5) - chef-utils (= 18.2.5) + chef-config (= 18.2.7) + chef-utils (= 18.2.7) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -78,13 +78,13 @@ PATH unf_ext (>= 0.0.8.2) uuidtools (>= 2.1.5, < 3.0) vault (~> 0.16) - chef (18.2.5-x64-mingw-ucrt) + chef (18.2.7-x64-mingw-ucrt) addressable aws-sdk-s3 (~> 1.91) aws-sdk-secretsmanager (~> 1.46) - chef-config (= 18.2.5) - chef-powershell (~> 1.0.12) - chef-utils (= 18.2.5) + chef-config (= 18.2.7) + chef-powershell (~> 18.0.0) + chef-utils (= 18.2.7) chef-vault chef-zero (>= 14.0.11) corefoundation (~> 0.3.4) @@ -128,15 +128,15 @@ PATH PATH remote: chef-bin specs: - chef-bin (18.2.5) - chef (= 18.2.5) + chef-bin (18.2.7) + chef (= 18.2.7) PATH remote: chef-config specs: - chef-config (18.2.5) + chef-config (18.2.7) addressable - chef-utils (= 18.2.5) + chef-utils (= 18.2.7) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) @@ -145,21 +145,21 @@ PATH PATH remote: chef-utils specs: - chef-utils (18.2.5) + chef-utils (18.2.7) concurrent-ruby GEM remote: https://rubygems.org/ specs: - addressable (2.8.1) + addressable (2.8.2) public_suffix (>= 2.0.2, < 6.0) appbundler (0.13.4) mixlib-cli (>= 1.4, < 3.0) mixlib-shellout (>= 2.0, < 4.0) ast (2.4.2) aws-eventstream (1.2.0) - aws-partitions (1.731.0) - aws-sdk-core (3.170.1) + aws-partitions (1.739.0) + aws-sdk-core (3.171.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) @@ -167,7 +167,7 @@ GEM aws-sdk-kms (1.63.0) aws-sdk-core (~> 3, >= 3.165.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.119.1) + aws-sdk-s3 (1.120.0) aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) @@ -180,7 +180,7 @@ GEM debug_inspector (>= 0.0.1) builder (3.2.4) byebug (11.1.3) - chef-powershell (1.0.13) + chef-powershell (18.0.1) ffi (~> 1.15) ffi-yajl (~> 2.4) chef-telemetry (1.1.1) @@ -288,6 +288,8 @@ GEM mime-types-data (3.2023.0218.1) mixlib-archive (1.1.7) mixlib-log + mixlib-archive (1.1.7-universal-mingw32) + mixlib-log mixlib-authentication (3.0.10) mixlib-cli (2.1.8) mixlib-config (3.0.27) @@ -315,7 +317,7 @@ GEM netrc (0.11.0) nori (2.6.0) parallel (1.22.1) - parser (3.2.1.1) + parser (3.2.2.0) ast (~> 2.4.1) parslet (1.8.2) pastel (0.8.0) @@ -363,7 +365,7 @@ GEM rubocop-ast (>= 1.15.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.27.0) + rubocop-ast (1.28.0) parser (>= 3.2.1.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) @@ -379,7 +381,7 @@ GEM structured_warnings (0.4.0) syslog-logger (1.6.8) thor (1.2.1) - time (0.2.1) + time (0.2.2) date timeout (0.3.2) tomlrb (1.3.0) @@ -430,7 +432,7 @@ GEM crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) webrick (1.8.1) - win32-api (1.10.1) + win32-api (1.10.1-universal-mingw32) win32-certstore (0.6.15) chef-powershell (>= 1.0.12) ffi @@ -502,4 +504,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.3.18 + 2.3.7 @@ -1 +1 @@ -18.2.5
\ No newline at end of file +18.2.7
\ 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 176dad37e3..550150efde 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.2.5".freeze + VERSION = "18.2.7".freeze end # diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index afbd956059..4460c6b410 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.2.5".freeze + VERSION = "18.2.7".freeze end diff --git a/chef-universal-mingw-ucrt.gemspec b/chef-universal-mingw-ucrt.gemspec index 2edfd751f9..092492e557 100644 --- a/chef-universal-mingw-ucrt.gemspec +++ b/chef-universal-mingw-ucrt.gemspec @@ -15,9 +15,9 @@ gemspec.add_dependency "wmi-lite", "~> 1.0" gemspec.add_dependency "win32-taskscheduler", "~> 2.0" gemspec.add_dependency "iso8601", ">= 0.12.1", "< 0.14" # validate 0.14 when it comes out gemspec.add_dependency "win32-certstore", "~> 0.6.15" # 0.5+ required for specifying user vs. system store -gemspec.add_dependency "chef-powershell", "~> 1.0.12" # The guts of the powershell_exec code have been moved to its own gem, chef-powershell. It's part of the chef-powershell-shim repo. +gemspec.add_dependency "chef-powershell", "~> 18.0.0" # The guts of the powershell_exec code have been moved to its own gem, chef-powershell. It's part of the chef-powershell-shim repo. gemspec.extensions << "ext/win32-eventlog/Rakefile" gemspec.files += Dir.glob("{distro,ext}/**/*") -gemspec
\ No newline at end of file +gemspec diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb index a97d92cdd1..fa0e2d0007 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.2.5" + VERSION = "18.2.7" end diff --git a/knife/Gemfile.lock b/knife/Gemfile.lock index 7e01edc55f..02ffd9c116 100644 --- a/knife/Gemfile.lock +++ b/knife/Gemfile.lock @@ -1,8 +1,8 @@ PATH remote: .. specs: - chef (18.2.5) - chef (18.2.5-x64-mingw-ucrt) + chef (18.2.7) + chef (18.2.7-x64-mingw-ucrt) PLATFORMS ruby diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb index caae6607e8..2e40d3aff5 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.2.5".freeze + VERSION = "18.2.7".freeze end end diff --git a/lib/chef/platform/query_helpers.rb b/lib/chef/platform/query_helpers.rb index bd0703d72a..12d5240c24 100644 --- a/lib/chef/platform/query_helpers.rb +++ b/lib/chef/platform/query_helpers.rb @@ -17,11 +17,14 @@ # require "chef-utils" unless defined?(ChefUtils::CANARY) +require_relative "../mixin/powershell_exec" class Chef class Platform class << self + include Chef::Mixin::PowershellExec + def windows? ChefUtils.windows? end @@ -58,8 +61,7 @@ class Chef end def dsc_refresh_mode_disabled?(node) - require_relative "../powershell" - exec = Chef::PowerShell.new("Get-DscLocalConfigurationManager") + exec = powershell_exec!("Get-DscLocalConfigurationManager") exec.error! exec.result["RefreshMode"] == "Disabled" end diff --git a/lib/chef/powershell.rb b/lib/chef/powershell.rb deleted file mode 100644 index 399b631633..0000000000 --- a/lib/chef/powershell.rb +++ /dev/null @@ -1,81 +0,0 @@ -# -# Author:: Stuart Preston (<stuart@chef.io>) -# Copyright:: Copyright (c) Chef Software Inc. -# License:: Apache License, Version 2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require "ffi" unless defined?(FFI) -require_relative "json_compat" - -class Chef - class PowerShell - extend FFI::Library - - attr_reader :result - attr_reader :errors - attr_reader :verbose - - # Run a command under PowerShell via FFI - # This implementation requires the managed dll and native wrapper to be in the library search - # path on Windows (i.e. c:\windows\system32 or in the same location as ruby.exe). - # - # Requires: .NET Framework 4.0 or higher on the target machine. - # - # @param script [String] script to run - # @param timeout [Integer, nil] timeout in seconds. - # @return [Object] output - def initialize(script, timeout: -1) - # This Powershell DLL source lives here: https://github.com/chef/chef-powershell-shim - # Every merge into that repo triggers a Habitat build and promotion. Running - # the rake :update_chef_exec_dll task in this (chef/chef) repo will pull down - # the built packages and copy the binaries to distro/ruby_bin_folder. Bundle install - # ensures that the correct architecture binaries are installed into the path. - @dll ||= "Chef.PowerShell.Wrapper.dll" - exec(script, timeout: timeout) - end - - # - # Was there an error running the command - # - # @return [Boolean] - # - def error? - return true if errors.count > 0 - - false - end - - class CommandFailed < RuntimeError; end - - # - # @raise [Chef::PowerShell::CommandFailed] raise if the command failed - # - def error! - raise Chef::PowerShell::CommandFailed, "Unexpected exit in PowerShell command: #{@errors}" if error? - end - - private - - def exec(script, timeout: -1) - FFI.ffi_lib @dll - FFI.attach_function :execute_powershell, :ExecuteScript, %i{string int}, :pointer - timeout = -1 if timeout == 0 || timeout.nil? - execution = FFI.execute_powershell(script, timeout).read_utf16string - hashed_outcome = Chef::JSONCompat.parse(execution) - @result = Chef::JSONCompat.parse(hashed_outcome["result"]) - @errors = hashed_outcome["errors"] - @verbose = hashed_outcome["verbose"] - end - end -end diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 5e770c4f94..7d984690ec 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.2.5") + VERSION = Chef::VersionString.new("18.2.7") end # |