chef 17.9.26 → 17.9.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/README.md +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/base_file.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +1 -1
- data/lib/chef/compliance/input_collection.rb +1 -1
- data/lib/chef/compliance/waiver_collection.rb +1 -1
- data/lib/chef/cookbook_uploader.rb +1 -1
- data/lib/chef/resource/lwrp_base.rb +1 -1
- data/lib/chef/util/dsc/configuration_generator.rb +1 -1
- data/lib/chef/version.rb +1 -1
- data/spec/functional/resource/cookbook_file_spec.rb +1 -1
- data/spec/functional/resource/dsc_script_spec.rb +2 -2
- data/spec/functional/resource/template_spec.rb +1 -1
- data/spec/integration/client/client_spec.rb +1 -1
- data/spec/support/shared/functional/file_resource.rb +1 -1
- data/spec/support/shared/functional/http.rb +9 -9
- data/spec/unit/provider/user/solaris_spec.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81905931cf4ca87528c65bb2be19f6656fcbf6754612da872f3c74e9c0e8753f
|
4
|
+
data.tar.gz: 75e630d0ac718daabb1854788c2428b765ea05229a25a21974812b5e4063a30a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db10283eb9a37f5b8dfd7223583eba74dc536277de8c5d424872c66b36102b505b07de211e9cd6022aa03d371339ebbc97846f5d3e534bbdf10896bde43fcb7a
|
7
|
+
data.tar.gz: 5bcaf6a2182e345138d53e67967a5b956c4bcdfd700f8c8b35994a15d71a0e5ed87a8327ccc6a7cb690b52c8c4043db1df65f16509b6268d7bc2a8169ef76875
|
data/Gemfile
CHANGED
@@ -2,7 +2,7 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
gem "chef", path: "."
|
4
4
|
|
5
|
-
gem "ohai", git: "https://github.com/chef/ohai.git", branch: "
|
5
|
+
gem "ohai", git: "https://github.com/chef/ohai.git", branch: "17-stable"
|
6
6
|
|
7
7
|
gem "chef-utils", path: File.expand_path("chef-utils", __dir__) if File.exist?(File.expand_path("chef-utils", __dir__))
|
8
8
|
gem "chef-config", path: File.expand_path("chef-config", __dir__) if File.exist?(File.expand_path("chef-config", __dir__))
|
@@ -15,7 +15,7 @@ else
|
|
15
15
|
gem "chef-bin" # rubocop:disable Bundler/DuplicatedGem
|
16
16
|
end
|
17
17
|
|
18
|
-
gem "cheffish", "
|
18
|
+
gem "cheffish", "~> 17.0"
|
19
19
|
|
20
20
|
group(:omnibus_package) do
|
21
21
|
gem "appbundler"
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Chef Infra
|
2
2
|
[![Code Climate](https://codeclimate.com/github/chef/chef.svg)](https://codeclimate.com/github/chef/chef)
|
3
|
-
[![Build Status](https://badge.buildkite.com/c82093430ceec7d27af05febb9dcafe3aa331fff9d74c0ab9d.svg?branch=
|
3
|
+
[![Build Status](https://badge.buildkite.com/c82093430ceec7d27af05febb9dcafe3aa331fff9d74c0ab9d.svg?branch=chef-17)](https://buildkite.com/chef-oss/chef-chef-chef-17-verify)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/chef.svg)](https://badge.fury.io/rb/chef)
|
5
5
|
[![](https://img.shields.io/badge/Release%20Policy-Cadence%20Release-brightgreen.svg)](https://github.com/chef/chef/blob/master/docs/dev/design_documents/client_release_cadence.md)
|
6
6
|
|
@@ -38,7 +38,7 @@ class Chef
|
|
38
38
|
|
39
39
|
def read
|
40
40
|
tmpfile = rest.streaming_request(file[:url])
|
41
|
-
File.
|
41
|
+
File.binread(tmpfile)
|
42
42
|
rescue Timeout::Error => e
|
43
43
|
raise Chef::ChefFS::FileSystem::OperationFailedError.new(:read, self, e, "Timeout reading #{file[:url]}: #{e}")
|
44
44
|
rescue Net::HTTPClientException => e
|
@@ -57,7 +57,7 @@ class Chef
|
|
57
57
|
# @return [Array<Input>] inspec inputs which are enabled in a form suitable to pass to inspec
|
58
58
|
#
|
59
59
|
def inspec_data
|
60
|
-
select(&:enabled?).each_with_object({}) { |input, hash| hash.merge(input.inspec_data) }
|
60
|
+
select(&:enabled?).each_with_object({}) { |input, hash| hash.merge!(input.inspec_data) }
|
61
61
|
end
|
62
62
|
|
63
63
|
# DSL method to enable input files. This matches on the filename of the input file.
|
@@ -57,7 +57,7 @@ class Chef
|
|
57
57
|
# @return [Array<Waiver>] inspec waivers which are enabled in a form suitable to pass to inspec
|
58
58
|
#
|
59
59
|
def inspec_data
|
60
|
-
select(&:enabled?).each_with_object({}) { |waiver, hash| hash.merge(waiver.inspec_data) }
|
60
|
+
select(&:enabled?).each_with_object({}) { |waiver, hash| hash.merge!(waiver.inspec_data) }
|
61
61
|
end
|
62
62
|
|
63
63
|
# DSL method to enable waiver files. This matches on the filename of the waiver file.
|
@@ -119,7 +119,7 @@ class Chef
|
|
119
119
|
# but we need the base64 encoding for the content-md5
|
120
120
|
# header
|
121
121
|
checksum64 = Base64.encode64([checksum].pack("H*")).strip
|
122
|
-
file_contents = File.
|
122
|
+
file_contents = File.binread(file)
|
123
123
|
|
124
124
|
# Custom headers. 'content-type' disables JSON serialization of the request body.
|
125
125
|
headers = { "content-type" => "application/x-binary", "content-md5" => checksum64, "accept" => "application/json" }
|
@@ -54,7 +54,7 @@ class Chef
|
|
54
54
|
resource_class.run_context = run_context
|
55
55
|
resource_class.class_from_file(filename)
|
56
56
|
|
57
|
-
if !resource_class.unified_mode && !deprecated_class(resource_class)
|
57
|
+
if !resource_class.unified_mode && !deprecated_class(resource_class) && cookbook_name.to_s != "chef_client_updater"
|
58
58
|
Chef.deprecated :unified_mode, "The #{resource_class.resource_name} resource in the #{cookbook_name} cookbook should declare `unified_mode true`", filename
|
59
59
|
end
|
60
60
|
|
data/lib/chef/version.rb
CHANGED
@@ -25,7 +25,7 @@ describe Chef::Resource::CookbookFile do
|
|
25
25
|
let(:source) { "java.response" }
|
26
26
|
let(:cookbook_name) { "java" }
|
27
27
|
let(:expected_content) do
|
28
|
-
content = File.
|
28
|
+
content = File.binread(File.join(CHEF_SPEC_DATA, "cookbooks", "java", "files", "default", "java.response"))
|
29
29
|
content.force_encoding(Encoding::BINARY) if content.respond_to?(:force_encoding)
|
30
30
|
content
|
31
31
|
end
|
@@ -345,7 +345,7 @@ describe Chef::Resource::DscScript, :windows_powershell_dsc_only, :ruby64_only d
|
|
345
345
|
let(:config_param_section) { config_params }
|
346
346
|
let(:config_flags) { { "#{dsc_user_prefix_param_name}": (dsc_user_prefix).to_s, "#{dsc_user_suffix_param_name}": (dsc_user_suffix).to_s } }
|
347
347
|
it "does not directly contain the user name" do
|
348
|
-
configuration_script_content = ::File.
|
348
|
+
configuration_script_content = ::File.read(dsc_test_resource.command)
|
349
349
|
expect(configuration_script_content.include?(dsc_user)).to be(false)
|
350
350
|
end
|
351
351
|
it_behaves_like "a dsc_script with configuration data"
|
@@ -355,7 +355,7 @@ describe Chef::Resource::DscScript, :windows_powershell_dsc_only, :ruby64_only d
|
|
355
355
|
let(:dsc_user_code) { dsc_user_env_code }
|
356
356
|
|
357
357
|
it "does not directly contain the user name" do
|
358
|
-
configuration_script_content = ::File.
|
358
|
+
configuration_script_content = ::File.read(dsc_test_resource.command)
|
359
359
|
expect(configuration_script_content.include?(dsc_user)).to be(false)
|
360
360
|
end
|
361
361
|
it_behaves_like "a dsc_script with configuration data"
|
@@ -391,7 +391,7 @@ shared_examples_for "a configured file resource" do
|
|
391
391
|
end
|
392
392
|
|
393
393
|
def binread(file)
|
394
|
-
content = File.
|
394
|
+
content = File.binread(file)
|
395
395
|
content.force_encoding(Encoding::BINARY) if "".respond_to?(:force_encoding)
|
396
396
|
content
|
397
397
|
end
|
@@ -30,7 +30,7 @@ module ChefHTTPShared
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def binread(file)
|
33
|
-
content = File.
|
33
|
+
content = File.binread(file)
|
34
34
|
content.force_encoding(Encoding::BINARY) if "".respond_to?(:force_encoding)
|
35
35
|
content
|
36
36
|
end
|
@@ -51,19 +51,19 @@ module ChefHTTPShared
|
|
51
51
|
# just a normal file
|
52
52
|
# (expected_content should be uncompressed)
|
53
53
|
@api.get("/nyan_cat.png", 200) do
|
54
|
-
File.
|
54
|
+
File.binread(nyan_uncompressed_filename)
|
55
55
|
end
|
56
56
|
|
57
57
|
# this ends in .gz, we do not uncompress it and drop it on the filesystem as a .gz file (the internet often lies)
|
58
58
|
# (expected_content should be compressed)
|
59
59
|
@api.get("/nyan_cat.png.gz", 200, nil, { "Content-Type" => "application/gzip", "Content-Encoding" => "gzip" } ) do
|
60
|
-
File.
|
60
|
+
File.binread(nyan_compressed_filename)
|
61
61
|
end
|
62
62
|
|
63
63
|
# this is an uncompressed file that was compressed by some mod_gzip-ish webserver thingy, so we will expand it
|
64
64
|
# (expected_content should be uncompressed)
|
65
65
|
@api.get("/nyan_cat_compressed.png", 200, nil, { "Content-Type" => "application/gzip", "Content-Encoding" => "gzip" } ) do
|
66
|
-
File.
|
66
|
+
File.binread(nyan_compressed_filename)
|
67
67
|
end
|
68
68
|
|
69
69
|
#
|
@@ -75,7 +75,7 @@ module ChefHTTPShared
|
|
75
75
|
{
|
76
76
|
"Content-Length" => nyan_uncompressed_size.to_s,
|
77
77
|
}) do
|
78
|
-
File.
|
78
|
+
File.binread(nyan_uncompressed_filename)
|
79
79
|
end
|
80
80
|
|
81
81
|
# (expected_content should be uncompressed)
|
@@ -85,7 +85,7 @@ module ChefHTTPShared
|
|
85
85
|
"Content-Type" => "application/gzip",
|
86
86
|
"Content-Encoding" => "gzip",
|
87
87
|
}) do
|
88
|
-
File.
|
88
|
+
File.binread(nyan_compressed_filename)
|
89
89
|
end
|
90
90
|
|
91
91
|
#
|
@@ -97,7 +97,7 @@ module ChefHTTPShared
|
|
97
97
|
{
|
98
98
|
"Content-Length" => (nyan_uncompressed_size + 1).to_s,
|
99
99
|
}) do
|
100
|
-
File.
|
100
|
+
File.binread(nyan_uncompressed_filename)
|
101
101
|
end
|
102
102
|
|
103
103
|
# (expected_content should be uncompressed)
|
@@ -107,7 +107,7 @@ module ChefHTTPShared
|
|
107
107
|
"Content-Type" => "application/gzip",
|
108
108
|
"Content-Encoding" => "gzip",
|
109
109
|
}) do
|
110
|
-
File.
|
110
|
+
File.binread(nyan_compressed_filename)
|
111
111
|
end
|
112
112
|
|
113
113
|
#
|
@@ -120,7 +120,7 @@ module ChefHTTPShared
|
|
120
120
|
"Content-Length" => (nyan_uncompressed_size + 1).to_s,
|
121
121
|
"Transfer-Encoding" => "anything",
|
122
122
|
}) do
|
123
|
-
File.
|
123
|
+
File.binread(nyan_uncompressed_filename)
|
124
124
|
end
|
125
125
|
|
126
126
|
#
|
@@ -74,7 +74,7 @@ describe Chef::Provider::User::Solaris do
|
|
74
74
|
allow(Tempfile).to receive(:new).with("shadow", "/etc").and_return(temp_file)
|
75
75
|
new_resource.password "verysecurepassword"
|
76
76
|
provider.manage_user
|
77
|
-
expect(::File.
|
77
|
+
expect(::File.read(password_file.path)).to match(/adam:verysecurepassword:/)
|
78
78
|
password_file.unlink
|
79
79
|
end
|
80
80
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 17.9.
|
4
|
+
version: 17.9.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 17.9.
|
19
|
+
version: 17.9.42
|
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: 17.9.
|
26
|
+
version: 17.9.42
|
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: 17.9.
|
33
|
+
version: 17.9.42
|
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: 17.9.
|
40
|
+
version: 17.9.42
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|