chef 16.1.0-universal-mingw32 → 16.1.16-universal-mingw32
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 +4 -4
- data/Rakefile +15 -1
- data/distro/powershell/chef/chef.psm1 +3 -3
- data/distro/templates/powershell/chef/chef.psm1.erb +3 -3
- data/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/directory.rb +1 -1
- data/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +1 -1
- data/lib/chef/chef_fs/path_utils.rb +3 -3
- data/lib/chef/cookbook/file_system_file_vendor.rb +1 -1
- data/lib/chef/cookbook/metadata.rb +1 -1
- data/lib/chef/cookbook_loader.rb +1 -1
- data/lib/chef/cookbook_manifest.rb +1 -1
- data/lib/chef/cookbook_site_streaming_uploader.rb +1 -1
- data/lib/chef/cookbook_version.rb +2 -2
- data/lib/chef/data_collector.rb +1 -1
- data/lib/chef/data_collector/error_handlers.rb +1 -1
- data/lib/chef/decorator/lazy_array.rb +2 -2
- data/lib/chef/digester.rb +4 -4
- data/lib/chef/dsl/declare_resource.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/decryptor.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/encryptor.rb +1 -1
- data/lib/chef/formatters/base.rb +1 -1
- data/lib/chef/http.rb +1 -1
- data/lib/chef/http/decompressor.rb +1 -1
- data/lib/chef/json_compat.rb +1 -1
- data/lib/chef/key.rb +1 -1
- data/lib/chef/knife.rb +1 -1
- data/lib/chef/knife/bootstrap.rb +5 -5
- data/lib/chef/knife/bootstrap/chef_vault_handler.rb +1 -1
- data/lib/chef/knife/bootstrap/client_builder.rb +1 -1
- data/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb +3 -1
- data/lib/chef/knife/core/hashed_command_loader.rb +1 -1
- data/lib/chef/knife/core/node_presenter.rb +1 -1
- data/lib/chef/knife/core/status_presenter.rb +1 -1
- data/lib/chef/knife/core/subcommand_loader.rb +1 -1
- data/lib/chef/knife/core/windows_bootstrap_context.rb +18 -3
- data/lib/chef/knife/key_create_base.rb +1 -1
- data/lib/chef/knife/key_edit_base.rb +1 -1
- data/lib/chef/knife/ssh.rb +1 -1
- data/lib/chef/mixin/api_version_request_handling.rb +1 -1
- data/lib/chef/mixin/checksum.rb +0 -1
- data/lib/chef/mixin/openssl_helper.rb +4 -4
- data/lib/chef/mixin/properties.rb +2 -2
- data/lib/chef/mixin/shell_out.rb +1 -1
- data/lib/chef/node/attribute.rb +2 -2
- data/lib/chef/node/immutable_collections.rb +1 -1
- data/lib/chef/policy_builder/policyfile.rb +1 -1
- data/lib/chef/property.rb +2 -2
- data/lib/chef/provider.rb +3 -3
- data/lib/chef/provider/directory.rb +1 -1
- data/lib/chef/provider/file.rb +1 -1
- data/lib/chef/provider/package/chocolatey.rb +1 -1
- data/lib/chef/provider/package/dpkg.rb +1 -1
- data/lib/chef/provider/package/portage.rb +1 -0
- data/lib/chef/provider/package/rubygems.rb +1 -1
- data/lib/chef/provider/package/windows.rb +2 -2
- data/lib/chef/provider/package/yum.rb +1 -1
- data/lib/chef/provider/package/yum/yum_cache.rb +1 -1
- data/lib/chef/provider/remote_directory.rb +2 -2
- data/lib/chef/provider/service/arch.rb +1 -1
- data/lib/chef/provider/service/upstart.rb +1 -1
- data/lib/chef/provider/user/aix.rb +1 -1
- data/lib/chef/provider/user/dscl.rb +2 -2
- data/lib/chef/provider/user/mac.rb +10 -6
- data/lib/chef/provider/windows_task.rb +4 -2
- data/lib/chef/resource.rb +3 -3
- data/lib/chef/resource/chef_handler.rb +2 -2
- data/lib/chef/resource/chef_vault_secret.rb +1 -1
- data/lib/chef/resource/cron.rb +1 -1
- data/lib/chef/resource/cron_d.rb +1 -1
- data/lib/chef/resource/execute.rb +1 -1
- data/lib/chef/resource/file.rb +10 -8
- data/lib/chef/resource/hostname.rb +1 -1
- data/lib/chef/resource/locale.rb +3 -3
- data/lib/chef/resource/macos_userdefaults.rb +11 -6
- data/lib/chef/resource/scm/git.rb +1 -1
- data/lib/chef/resource/windows_certificate.rb +1 -1
- data/lib/chef/resource/windows_dfs_server.rb +1 -1
- data/lib/chef/resource/windows_pagefile.rb +1 -1
- data/lib/chef/resource/windows_task.rb +6 -6
- data/lib/chef/resource/windows_user_privilege.rb +3 -3
- data/lib/chef/resource_inspector.rb +4 -3
- data/lib/chef/run_context/cookbook_compiler.rb +1 -1
- data/lib/chef/shell/ext.rb +1 -1
- data/lib/chef/version.rb +1 -1
- data/lib/chef/win32/api.rb +2 -2
- data/lib/chef/win32/api/error.rb +3 -1
- data/lib/chef/win32/api/file.rb +1 -1
- data/lib/chef/win32/api/net.rb +1 -0
- data/lib/chef/win32/mutex.rb +1 -1
- data/lib/chef/win32/net.rb +1 -0
- data/lib/chef/win32/security/sid.rb +4 -4
- data/spec/functional/resource/dnf_package_spec.rb +2 -2
- data/spec/functional/resource/git_spec.rb +6 -6
- data/spec/functional/resource/windows_task_spec.rb +4 -4
- data/spec/support/chef_helpers.rb +1 -1
- data/spec/support/shared/functional/windows_script.rb +1 -1
- data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +4 -4
- data/spec/unit/knife/core/windows_bootstrap_context_spec.rb +7 -1
- data/spec/unit/mixin/openssl_helper_spec.rb +4 -4
- data/spec/unit/node/attribute_spec.rb +1 -1
- data/spec/unit/provider/group/groupadd_spec.rb +1 -1
- data/spec/unit/provider/package/portage_spec.rb +2 -2
- data/spec/unit/provider/package/powershell_spec.rb +1 -1
- data/spec/unit/win32/registry_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: 16446752a5b3310a65316f551db71838f811ebd759c901742ce9bc181ab7a896
|
4
|
+
data.tar.gz: 4556d20c75650ec32194e4c9f8ac2c0d11b19166251ad50f4e3d189f48f2437b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b4fd7b272ac8a7ebd8c461c5e53d0878af6bea12a1cb4323aba9bd5920e3b24d2b114b6bdcd196267124eb0825c23593d06d61ed6a84c6cbd2566aab8cce739
|
7
|
+
data.tar.gz: 628d1a87ed7ba0d2cd83d6374ee97258e83444f0f12e3bf55c442c122ddc40250f3002cfd6d6d3aa9e5b125a8c06ac4f5a7fb8b1b98f6e72b697582a9ab7da84
|
data/Rakefile
CHANGED
@@ -58,7 +58,7 @@ namespace :pre_install do
|
|
58
58
|
task all: ["pre_install:install_gems_from_dirs", "pre_install:render_powershell_extension"]
|
59
59
|
end
|
60
60
|
|
61
|
-
# hack in all the preinstall tasks to occur before the
|
61
|
+
# hack in all the preinstall tasks to occur before the traditional install task
|
62
62
|
task install: "pre_install:all"
|
63
63
|
|
64
64
|
# make sure we build the correct gemspec on windows
|
@@ -108,3 +108,17 @@ begin
|
|
108
108
|
rescue LoadError
|
109
109
|
puts "yard is not available. bundle install first to make sure all dependencies are installed."
|
110
110
|
end
|
111
|
+
|
112
|
+
namespace :spellcheck do
|
113
|
+
task :run do
|
114
|
+
sh 'cspell "**/*" "*.md"'
|
115
|
+
end
|
116
|
+
|
117
|
+
desc "List the unique unrecognized words in the project."
|
118
|
+
task :unknown_words do
|
119
|
+
sh 'cspell "**/*" "*.md" --wordsOnly --no-summary | sort | uniq'
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
desc "Run spellcheck on the project."
|
124
|
+
task spellcheck: "spellcheck:run"
|
@@ -358,7 +358,7 @@ function Run-RubyCommand($command, $argList) {
|
|
358
358
|
# When arguments come into this method, the standard PS rules for interpreting cmdlet arguments
|
359
359
|
# apply. When using & (call operator) and providing an array of arguments, powershell (verified
|
360
360
|
# on PS 4.0 on Windows Server 2012R2) will not evaluate them but (contrary to documentation),
|
361
|
-
# it will still marginally interpret them. The
|
361
|
+
# it will still marginally interpret them. The behavior of PS 5.0 seems to be different but
|
362
362
|
# ignore that for now. If any of the provided arguments has a space in it, powershell checks
|
363
363
|
# the first and last character to ensure that they are " characters (and that's all it checks).
|
364
364
|
# If they are not, it will blindly surround that argument with " characters. It won't do this
|
@@ -381,10 +381,10 @@ function Run-RubyCommand($command, $argList) {
|
|
381
381
|
# Command line:
|
382
382
|
# "C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx\Apps\EchoArgs.exe" "foo '' bar "baz"" "foo '' bar "baz""
|
383
383
|
#
|
384
|
-
# $x = "abc'123'nospace`"
|
384
|
+
# $x = "abc'123'nospace`"lol`"!!!"
|
385
385
|
# & EchoArgs @($x, $x)
|
386
386
|
# Command line:
|
387
|
-
# "C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx\Apps\EchoArgs.exe" abc'123'nospace"
|
387
|
+
# "C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx\Apps\EchoArgs.exe" abc'123'nospace"lol"!!! abc'123'nospace"lol"!!!
|
388
388
|
#
|
389
389
|
# $x = "`"`"Look ma! Tonnes of spaces! 'foo' 'bar'`"`""
|
390
390
|
# & EchoArgs @($x, $x)
|
@@ -358,7 +358,7 @@ function Run-RubyCommand($command, $argList) {
|
|
358
358
|
# When arguments come into this method, the standard PS rules for interpreting cmdlet arguments
|
359
359
|
# apply. When using & (call operator) and providing an array of arguments, powershell (verified
|
360
360
|
# on PS 4.0 on Windows Server 2012R2) will not evaluate them but (contrary to documentation),
|
361
|
-
# it will still marginally interpret them. The
|
361
|
+
# it will still marginally interpret them. The behavior of PS 5.0 seems to be different but
|
362
362
|
# ignore that for now. If any of the provided arguments has a space in it, powershell checks
|
363
363
|
# the first and last character to ensure that they are " characters (and that's all it checks).
|
364
364
|
# If they are not, it will blindly surround that argument with " characters. It won't do this
|
@@ -381,10 +381,10 @@ function Run-RubyCommand($command, $argList) {
|
|
381
381
|
# Command line:
|
382
382
|
# "C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx\Apps\EchoArgs.exe" "foo '' bar "baz"" "foo '' bar "baz""
|
383
383
|
#
|
384
|
-
# $x = "abc'123'nospace`"
|
384
|
+
# $x = "abc'123'nospace`"lol`"!!!"
|
385
385
|
# & EchoArgs @($x, $x)
|
386
386
|
# Command line:
|
387
|
-
# "C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx\Apps\EchoArgs.exe" abc'123'nospace"
|
387
|
+
# "C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx\Apps\EchoArgs.exe" abc'123'nospace"lol"!!! abc'123'nospace"lol"!!!
|
388
388
|
#
|
389
389
|
# $x = "`"`"Look ma! Tonnes of spaces! 'foo' 'bar'`"`""
|
390
390
|
# & EchoArgs @($x, $x)
|
@@ -60,7 +60,7 @@ class Chef
|
|
60
60
|
AclDir.new(entity_type, self)
|
61
61
|
end
|
62
62
|
end
|
63
|
-
@children << AclEntry.new("organization.json", self, true) # the org acl is retrieved as GET /organizations/ORGNAME/
|
63
|
+
@children << AclEntry.new("organization.json", self, true) # the org acl is retrieved as GET /organizations/ORGNAME/ANYTHING/_acl
|
64
64
|
end
|
65
65
|
@children
|
66
66
|
end
|
@@ -235,7 +235,7 @@ class Chef
|
|
235
235
|
# The order of these checks is important, as well, to be thread safe.
|
236
236
|
# 1. If @unconsumed_input.empty? is true, then we will never have any more
|
237
237
|
# work legitimately picked up.
|
238
|
-
# 2. If @in_process == 0, then there is no work in process, and because
|
238
|
+
# 2. If @in_process == 0, then there is no work in process, and because of when unconsumed_input is empty, it will never go back up, because
|
239
239
|
# this is called after the input enumerator is finished. Note that switching #2 and #1
|
240
240
|
# could cause a race, because in_process is incremented *before* consuming input.
|
241
241
|
# 3. If @unconsumed_output.empty? is true, then we are done with outputs.
|
@@ -71,9 +71,9 @@ class Chef
|
|
71
71
|
# part that actually exists. The paths operated on here are not Chef-FS paths.
|
72
72
|
# These are OS paths that may contain symlinks but may not also fully exist.
|
73
73
|
#
|
74
|
-
# If /x is a symlink to /
|
75
|
-
# PathUtils.realest_path('/x/y/z') == '/
|
76
|
-
# PathUtils.realest_path('/x/*/z') == '/
|
74
|
+
# If /x is a symlink to /foo_bar, and has no subdirectories, then:
|
75
|
+
# PathUtils.realest_path('/x/y/z') == '/foo_bar/y/z'
|
76
|
+
# PathUtils.realest_path('/x/*/z') == '/foo_bar/*/z'
|
77
77
|
# PathUtils.realest_path('/*/y/z') == '/*/y/z'
|
78
78
|
#
|
79
79
|
# TODO: Move this to wherever util/path_helper is these days.
|
@@ -27,7 +27,7 @@ class Chef
|
|
27
27
|
# and throws the rest away then re-builds the list of files on the
|
28
28
|
# disk. This is due to the manifest not having the on-disk file
|
29
29
|
# locations, since in the chef-client case, that information is
|
30
|
-
#
|
30
|
+
# nonsensical.
|
31
31
|
class FileSystemFileVendor < FileVendor
|
32
32
|
|
33
33
|
attr_reader :cookbook_name
|
@@ -357,7 +357,7 @@ class Chef
|
|
357
357
|
# Array<String> - array of files or globs to eagerly load, otherwise it is treated like `false`
|
358
358
|
#
|
359
359
|
# @params arg [Array,String,TrueClass,FalseClass]
|
360
|
-
# @params [Array,TrueClass,
|
360
|
+
# @params [Array,TrueClass,FalseClass]
|
361
361
|
def eager_load_libraries(arg = nil)
|
362
362
|
set_or_return(
|
363
363
|
:eager_load_libraries,
|
data/lib/chef/cookbook_loader.rb
CHANGED
@@ -138,7 +138,7 @@ class Chef
|
|
138
138
|
cookbooks_by_name.values
|
139
139
|
end
|
140
140
|
|
141
|
-
# This method creates tmp directory and copies all cookbooks into it and creates cookbook
|
141
|
+
# This method creates tmp directory and copies all cookbooks into it and creates cookbook loader object which points to tmp directory
|
142
142
|
def self.copy_to_tmp_dir_from_array(cookbooks)
|
143
143
|
tmp_cookbook_file = Tempfile.new("tmp_working_dir_path")
|
144
144
|
tmp_cookbook_file.close
|
@@ -44,7 +44,7 @@ class Chef
|
|
44
44
|
# cookbook_version in the "manifest" format, or #to_json to get a JSON
|
45
45
|
# representation of the cookbook_version.
|
46
46
|
#
|
47
|
-
# The
|
47
|
+
# The interface for this behavior is expected to change as we implement new
|
48
48
|
# manifest formats. The entire class should be considered a private API for
|
49
49
|
# now.
|
50
50
|
#
|
@@ -147,7 +147,7 @@ class Chef
|
|
147
147
|
class << res
|
148
148
|
alias :to_s :body
|
149
149
|
|
150
|
-
#
|
150
|
+
# BUG this makes the response compatible with what response_steps expects to test headers (response.headers[] -> response[])
|
151
151
|
def headers # rubocop:disable Lint/NestedMethodDefinition
|
152
152
|
self
|
153
153
|
end
|
@@ -358,7 +358,7 @@ class Chef
|
|
358
358
|
|
359
359
|
# extract the preference part from the path.
|
360
360
|
if manifest_record_path =~ %r{(#{Regexp.escape(segment.to_s)}/[^/]+/#{Regexp.escape(dirname)})/.+$}
|
361
|
-
# Note the
|
361
|
+
# Note the specificity_dirname includes the segment and
|
362
362
|
# dirname argument as above, which is what
|
363
363
|
# preferences_for_path returns. It could be
|
364
364
|
# "files/ubuntu-9.10/dirname", for example.
|
@@ -566,7 +566,7 @@ class Chef
|
|
566
566
|
def find_preferred_manifest_record(node, segment, filename)
|
567
567
|
preferences = preferences_for_path(node, segment, filename)
|
568
568
|
|
569
|
-
# in order of
|
569
|
+
# in order of preference, look for the filename in the manifest
|
570
570
|
preferences.find { |preferred_filename| manifest_records_by_path[preferred_filename] }
|
571
571
|
end
|
572
572
|
|
data/lib/chef/data_collector.rb
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
class Chef
|
19
19
|
class DataCollector
|
20
20
|
|
21
|
-
# This module isolates the handling of collecting error descriptions to insert into the
|
21
|
+
# This module isolates the handling of collecting error descriptions to insert into the data_collector
|
22
22
|
# report output. For very early errors it is responsible for collecting the node_name for the report
|
23
23
|
# to use. For all failure conditions that have an ErrorMapper it collects the output.
|
24
24
|
#
|
@@ -21,8 +21,8 @@ class Chef
|
|
21
21
|
class Decorator
|
22
22
|
# Lazy Array around Lazy Objects
|
23
23
|
#
|
24
|
-
# This
|
25
|
-
# know how many items we have and what their indexes are, so we'd have to
|
24
|
+
# This makes access lazy through `#[]`. In order to implement #each we need to
|
25
|
+
# know how many items we have and what their indexes are, so we'd have to evaluate
|
26
26
|
# the proc which makes that impossible. You can call methods like #each and the
|
27
27
|
# decorator will forward the method, but item access will not be lazy.
|
28
28
|
#
|
data/lib/chef/digester.rb
CHANGED
@@ -39,9 +39,9 @@ class Chef
|
|
39
39
|
|
40
40
|
def generate_checksum(file)
|
41
41
|
if file.is_a?(StringIO)
|
42
|
-
checksum_io(file, OpenSSL::Digest
|
42
|
+
checksum_io(file, OpenSSL::Digest.new("SHA256"))
|
43
43
|
else
|
44
|
-
checksum_file(file, OpenSSL::Digest
|
44
|
+
checksum_file(file, OpenSSL::Digest.new("SHA256"))
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -50,11 +50,11 @@ class Chef
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def generate_md5_checksum_for_file(file)
|
53
|
-
checksum_file(file, OpenSSL::Digest
|
53
|
+
checksum_file(file, OpenSSL::Digest.new("MD5"))
|
54
54
|
end
|
55
55
|
|
56
56
|
def generate_md5_checksum(io)
|
57
|
-
checksum_io(io, OpenSSL::Digest
|
57
|
+
checksum_io(io, OpenSSL::Digest.new("MD5"))
|
58
58
|
end
|
59
59
|
|
60
60
|
private
|
@@ -151,7 +151,7 @@ class Chef
|
|
151
151
|
# source "y.txt.erb"
|
152
152
|
# variables {}
|
153
153
|
# end
|
154
|
-
# resource.variables.merge!({ home: "/home/
|
154
|
+
# resource.variables.merge!({ home: "/home/clowns" })
|
155
155
|
#
|
156
156
|
def edit_resource(type, name, created_at: nil, run_context: self.run_context, &resource_attrs_block)
|
157
157
|
edit_resource!(type, name, created_at: created_at, run_context: run_context, &resource_attrs_block)
|
@@ -158,7 +158,7 @@ class Chef::EncryptedDataBagItem
|
|
158
158
|
d = OpenSSL::Cipher.new(algorithm)
|
159
159
|
d.decrypt
|
160
160
|
# We must set key before iv: https://bugs.ruby-lang.org/issues/8221
|
161
|
-
d.key = OpenSSL::Digest
|
161
|
+
d.key = OpenSSL::Digest.digest("SHA256", key)
|
162
162
|
d.iv = iv
|
163
163
|
d
|
164
164
|
end
|
@@ -102,7 +102,7 @@ class Chef::EncryptedDataBagItem
|
|
102
102
|
encryptor = OpenSSL::Cipher.new(algorithm)
|
103
103
|
encryptor.encrypt
|
104
104
|
# We must set key before iv: https://bugs.ruby-lang.org/issues/8221
|
105
|
-
encryptor.key = OpenSSL::Digest
|
105
|
+
encryptor.key = OpenSSL::Digest.digest("SHA256", key)
|
106
106
|
@iv ||= encryptor.random_iv
|
107
107
|
encryptor.iv = @iv
|
108
108
|
encryptor
|
data/lib/chef/formatters/base.rb
CHANGED
@@ -142,7 +142,7 @@ class Chef
|
|
142
142
|
|
143
143
|
# Generic callback for any attribute/library/lwrp/recipe file in a
|
144
144
|
# cookbook getting loaded. The per-filetype callbacks for file load are
|
145
|
-
#
|
145
|
+
# overridden so that they call this instead. This means that a subclass of
|
146
146
|
# Formatters::Base can implement #file_loaded to do the same thing for
|
147
147
|
# every kind of file that Chef loads from a recipe instead of
|
148
148
|
# implementing all the per-filetype callbacks.
|
data/lib/chef/http.rb
CHANGED
@@ -269,7 +269,7 @@ class Chef
|
|
269
269
|
if keepalives && !base_url.nil?
|
270
270
|
# only reuse the http_client if we want keepalives and have a base_url
|
271
271
|
@http_client ||= {}
|
272
|
-
# the per-host per-port cache here gets
|
272
|
+
# the per-host per-port cache here gets persistent connections correct when
|
273
273
|
# redirecting to different servers
|
274
274
|
if base_url.is_a?(String) # sigh, this kind of abuse can't happen with strongly typed languages
|
275
275
|
@http_client[base_url] ||= build_http_client(base_url)
|
@@ -22,7 +22,7 @@ require_relative "http_request"
|
|
22
22
|
class Chef
|
23
23
|
class HTTP
|
24
24
|
|
25
|
-
# Middleware-
|
25
|
+
# Middleware-ish class for handling compression in HTTP responses.
|
26
26
|
class Decompressor
|
27
27
|
class NoopInflater
|
28
28
|
def inflate(chunk)
|
data/lib/chef/json_compat.rb
CHANGED
data/lib/chef/key.rb
CHANGED
@@ -252,7 +252,7 @@ class Chef
|
|
252
252
|
OpenSSL::ASN1::Integer.new(openssl_key_object.public_key.n),
|
253
253
|
OpenSSL::ASN1::Integer.new(openssl_key_object.public_key.e),
|
254
254
|
])
|
255
|
-
OpenSSL::Digest
|
255
|
+
OpenSSL::Digest.hexdigest("SHA1", data_string.to_der).scan(/../).join(":")
|
256
256
|
end
|
257
257
|
|
258
258
|
def list(keys, actor, load_method_symbol, inflate)
|
data/lib/chef/knife.rb
CHANGED
@@ -327,7 +327,7 @@ class Chef
|
|
327
327
|
end
|
328
328
|
|
329
329
|
# Grab a copy before config merge occurs, so that we can later identify
|
330
|
-
#
|
330
|
+
# where a given config value is sourced from.
|
331
331
|
@original_config = config.dup
|
332
332
|
|
333
333
|
# copy Mixlib::CLI over so that it can be configured in config.rb/knife.rb
|
data/lib/chef/knife/bootstrap.rb
CHANGED
@@ -94,7 +94,7 @@ class Chef
|
|
94
94
|
boolean: true
|
95
95
|
|
96
96
|
# This option was provided in knife bootstrap windows winrm,
|
97
|
-
# but it is ignored in knife-windows/WinrmSession, and so remains
|
97
|
+
# but it is ignored in knife-windows/WinrmSession, and so remains unimplemented here.
|
98
98
|
# option :kerberos_keytab_file,
|
99
99
|
# :short => "-T KEYTAB_FILE",
|
100
100
|
# :long => "--keytab-file KEYTAB_FILE",
|
@@ -275,7 +275,7 @@ class Chef
|
|
275
275
|
accumulator
|
276
276
|
}
|
277
277
|
|
278
|
-
# bootstrap override: url of a an installer shell script
|
278
|
+
# bootstrap override: url of a an installer shell script to use in place of omnitruck
|
279
279
|
# Note that the bootstrap template _only_ references this out of Chef::Config, and not from
|
280
280
|
# the provided options to knife bootstrap, so we set the Chef::Config option here.
|
281
281
|
option :bootstrap_url,
|
@@ -713,7 +713,7 @@ class Chef
|
|
713
713
|
# Fail if using plaintext auth without ssl because
|
714
714
|
# this can expose keys in plaintext on the wire.
|
715
715
|
# TODO test for this method
|
716
|
-
# TODO check that the
|
716
|
+
# TODO check that the protocol is valid.
|
717
717
|
def validate_winrm_transport_opts!
|
718
718
|
return true unless winrm?
|
719
719
|
|
@@ -967,7 +967,7 @@ class Chef
|
|
967
967
|
gw_host = split[1]
|
968
968
|
end
|
969
969
|
gw_host, gw_port = gw_host.split(":", 2)
|
970
|
-
# TODO - validate
|
970
|
+
# TODO - validate convertible port in config validation?
|
971
971
|
gw_port = Integer(gw_port) rescue nil
|
972
972
|
opts[:bastion_host] = gw_host
|
973
973
|
opts[:bastion_user] = gw_user
|
@@ -1073,7 +1073,7 @@ class Chef
|
|
1073
1073
|
remote_path
|
1074
1074
|
end
|
1075
1075
|
|
1076
|
-
# build the command string for
|
1076
|
+
# build the command string for bootstrapping
|
1077
1077
|
# @return String
|
1078
1078
|
def bootstrap_command(remote_path)
|
1079
1079
|
if connection.windows?
|
@@ -102,7 +102,7 @@ class Chef
|
|
102
102
|
config[:bootstrap_vault_item]
|
103
103
|
end
|
104
104
|
|
105
|
-
# Helper to return a ruby object
|
105
|
+
# Helper to return a ruby object representing all the data bags and items
|
106
106
|
# to update via chef-vault.
|
107
107
|
#
|
108
108
|
# @return [Hash] deserialized ruby hash with all the vault items
|
@@ -202,10 +202,12 @@ If !ERRORLEVEL!==0 (
|
|
202
202
|
) else (
|
203
203
|
@echo Installation completed successfully
|
204
204
|
del /f /q "%CHEF_CLIENT_MSI_LOG_PATH%"
|
205
|
-
|
205
|
+
)
|
206
206
|
|
207
207
|
<% end %>
|
208
208
|
|
209
|
+
@rem This line is required to separate the key_create label from the "block boundary"
|
210
|
+
@rem Removing these lines will cause the error "The system cannot find the batch label specified - key_create"
|
209
211
|
:key_create
|
210
212
|
@endlocal
|
211
213
|
|
@@ -44,7 +44,7 @@ class Chef
|
|
44
44
|
else
|
45
45
|
commands = manifest[KEY]["plugins_by_category"]
|
46
46
|
end
|
47
|
-
# If any of the specified plugins in the manifest
|
47
|
+
# If any of the specified plugins in the manifest don't have a valid path we will
|
48
48
|
# eventually get an error and the user will need to rehash - instead, lets just
|
49
49
|
# print out 1 error here telling them to rehash
|
50
50
|
errors = {}
|
@@ -94,7 +94,7 @@ class Chef
|
|
94
94
|
def summarize(data)
|
95
95
|
if data.is_a?(Chef::Node)
|
96
96
|
node = data
|
97
|
-
# special case clouds with their split horizon
|
97
|
+
# special case clouds with their split horizon thing.
|
98
98
|
ip = (node[:cloud] && node[:cloud][:public_ipv4_addrs] && node[:cloud][:public_ipv4_addrs].first) || node[:ipaddress]
|
99
99
|
|
100
100
|
summarized = <<~SUMMARY
|