chef 16.4.35 → 16.4.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cd173a8bc2e595b0c39776bd219be73951547e20a8ea7ca42e10ab9f4caf301
4
- data.tar.gz: 8868bce6fe0f624417e2b431bdd0bd160b7747f1801ce93a2ab73b9225c210dc
3
+ metadata.gz: f26a1b5c8c9974e5242efbb36f6f73d87f50656a56bc3dc9e85cf79b1a71cf7b
4
+ data.tar.gz: d395068039c3313536214113f21515679de33f64dfe263e7d5d1bc11d3ad700d
5
5
  SHA512:
6
- metadata.gz: 2880171bce3ce18571abc3142417189f5a31f768adfa4654a1d7b3bf7acdee3483032bd0b5da61e895cb3c1613cccbf95edd76788a44bc2290fe0e4c6823534b
7
- data.tar.gz: c1d9c41879c5db64c0d104cc41ceb8c3c97a7188d6d2f11333ef33b06ec4574833e586a507c5f1dbbf3c0da43f6df97e462c1c54983cccabdba98075437425f5
6
+ metadata.gz: 4fc235fc393aecb19c94b09ba0efe6ca409cb2e724db5387fb799148d4e99931042c9134af7fcf8eb09697ec3b0c56696a9308b60e444a6f50e2c843e818e1b2
7
+ data.tar.gz: 5d7aaaf1cf736bdc67d785c75525ff0b77c816c0b1bffee38c9ad026dfed7027dc2f2aac2a701f8dbdbf90c08a3357d6a4dea17e538abbb13371a6d962c4186d
@@ -157,12 +157,12 @@ class Chef
157
157
  end
158
158
 
159
159
  def http_api
160
- options = {}
161
- options[:api_version] = "0"
162
- options[:client_name] = Chef::Config[:validation_client_name]
163
- options[:raw_key] = Chef::Config[:validation_key_contents]
164
- options[:signing_key_filename] = Chef::Config[:validation_key] unless options[:raw_key]
165
- @http_api ||= Chef::ServerAPI.new(Chef::Config[:chef_server_url], options)
160
+ @http_api ||= Chef::ServerAPI.new(Chef::Config[:chef_server_url],
161
+ {
162
+ api_version: "0",
163
+ client_name: Chef::Config[:validation_client_name],
164
+ signing_key_filename: Chef::Config[:validation_key],
165
+ })
166
166
  end
167
167
 
168
168
  # Whether or not to generate keys locally and post the public key to the
@@ -19,7 +19,6 @@
19
19
  require "pp" unless defined?(PP)
20
20
  require "socket" unless defined?(Socket)
21
21
  require_relative "config"
22
- require "chef-config/mixin/chef_cloud"
23
22
  require_relative "exceptions"
24
23
  require_relative "local_mode"
25
24
  require_relative "log"
@@ -137,10 +136,6 @@ class Chef
137
136
 
138
137
  if config[:config_file].nil?
139
138
  logger.warn("No config file found or specified on command line. Using command line options instead.")
140
- elsif ChefConfig::Mixin::ChefCloud.cloud_config?
141
- logger.warn("*****************************************")
142
- logger.warn("Found Chef Cloud configuration. Overriding local values from cloud.")
143
- logger.warn("*****************************************")
144
139
  elsif config_fetcher.config_missing?
145
140
  logger.warn("*****************************************")
146
141
  logger.warn("Did not find config file: #{config[:config_file]}. Using command line options instead.")
@@ -22,7 +22,6 @@ require_relative "../mixin/shell_out"
22
22
  require_relative "../config_fetcher"
23
23
  require_relative "../dist"
24
24
  require_relative "../daemon"
25
- require "chef-config/mixin/chef_cloud"
26
25
  require "chef-config/mixin/dot_d"
27
26
  require "license_acceptance/cli_flags/mixlib_cli"
28
27
  require "mixlib/archive" unless defined?(Mixlib::Archive)
@@ -40,7 +39,6 @@ require "mixlib/archive" unless defined?(Mixlib::Archive)
40
39
  #
41
40
  class Chef::Application::Base < Chef::Application
42
41
  include Chef::Mixin::ShellOut
43
- include ChefConfig::Mixin::ChefCloud
44
42
  include ChefConfig::Mixin::DotD
45
43
  include LicenseAcceptance::CLIFlags::MixlibCLI
46
44
 
@@ -156,9 +156,6 @@ class Chef::Application::Client < Chef::Application::Base
156
156
 
157
157
  # Load all config files in client.d
158
158
  load_dot_d(Chef::Config[:client_d_dir]) if Chef::Config[:client_d_dir]
159
-
160
- # Load cloud config if present
161
- load_cloud_config
162
159
  end
163
160
 
164
161
  def configure_logging
@@ -80,8 +80,8 @@ class Chef
80
80
  end
81
81
 
82
82
  def check_resource_semantics!
83
- if mac? && node["platform_version"] =~ "> 10.15"
84
- raise "The osx_profile resource is not available on macOS Bug Sur or above due to the removal of apple support for CLI installation of profiles"
83
+ if mac? && node["platform_version"] =~ ">= 11.0"
84
+ raise "The osx_profile resource is not available on macOS Big Sur or above due to Apple's removal of support for CLI profile installation"
85
85
  end
86
86
 
87
87
  if action == :remove
@@ -253,7 +253,7 @@ class Chef
253
253
 
254
254
  def query_installed_profiles
255
255
  Tempfile.open("allprofiles.plist") do |tempfile|
256
- shell_out!( "/usr/bin/profiles", "-P", "-o", tempfile.path )
256
+ shell_out( "/usr/bin/profiles", "-P", "-o", tempfile.path )
257
257
  ::Plist.parse_xml(tempfile)
258
258
  end
259
259
  end
@@ -23,7 +23,7 @@ require_relative "version_string"
23
23
 
24
24
  class Chef
25
25
  CHEF_ROOT = File.expand_path("..", __dir__)
26
- VERSION = Chef::VersionString.new("16.4.35")
26
+ VERSION = Chef::VersionString.new("16.4.38")
27
27
  end
28
28
 
29
29
  #
@@ -39,6 +39,12 @@ describe Chef::DataCollector do
39
39
  let(:new_resource) do
40
40
  new_resource = Chef::Resource::File.new("/tmp/a-file.txt")
41
41
  new_resource.checksum nil
42
+ # This next line is a hack to work around the fact that the name property will not have been autovivified yet
43
+ # in these unit tests which breaks some assumptions. Really the Formatters::ErrorMapper.resource_failed and
44
+ # related APIs need to properly walk and get properties on the resource rather than walking through instance
45
+ # variables, but the ErrorMappers probably pre-date the conversion to properties. But this next line is necesary
46
+ # to populate the name_property instance variable (which will happen naturally during the course of running the
47
+ # provider, so I don't think this is a user-visibile bug).
42
48
  new_resource.path
43
49
  new_resource
44
50
  end
@@ -155,7 +155,7 @@ describe Chef::Resource::OsxProfile do
155
155
  resource.profile_name profile_name
156
156
  allow(provider).to receive(:get_installed_profiles).and_call_original
157
157
  allow(provider).to receive(:read_plist).and_return(all_profiles)
158
- expect(provider).to receive(:shell_out_compacted!).with("/usr/bin/profiles", "-P", "-o", kind_of(String))
158
+ expect(provider).to receive(:shell_out_compacted).with("/usr/bin/profiles", "-P", "-o", kind_of(String))
159
159
  provider.load_current_resource
160
160
  end
161
161
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.4.35
4
+ version: 16.4.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 16.4.35
19
+ version: 16.4.38
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 16.4.35
26
+ version: 16.4.38
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: chef-utils
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 16.4.35
33
+ version: 16.4.38
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 16.4.35
40
+ version: 16.4.38
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: train-core
43
43
  requirement: !ruby/object:Gem::Requirement