chef 18.0.169 → 18.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/chef.gemspec +2 -2
- data/lib/chef/chef_fs/file_system.rb +21 -7
- data/lib/chef/mixin/checksum.rb +6 -0
- data/lib/chef/property.rb +8 -3
- data/lib/chef/provider/cron.rb +5 -1
- data/lib/chef/provider/file.rb +2 -2
- data/lib/chef/provider/launchd.rb +1 -0
- data/lib/chef/provider/package/snap.rb +1 -1
- data/lib/chef/provider/package/windows.rb +1 -1
- data/lib/chef/provider/package/yum/yum_helper.py +5 -17
- data/lib/chef/provider/yum_repository.rb +13 -1
- data/lib/chef/resource/apt_package.rb +2 -0
- data/lib/chef/resource/chef_client_config.rb +2 -2
- data/lib/chef/resource/dmg_package.rb +2 -0
- data/lib/chef/resource/freebsd_package.rb +2 -0
- data/lib/chef/resource/gem_package.rb +2 -0
- data/lib/chef/resource/homebrew_package.rb +2 -0
- data/lib/chef/resource/launchd.rb +3 -0
- data/lib/chef/resource/macos_userdefaults.rb +3 -3
- data/lib/chef/resource/macports_package.rb +2 -0
- data/lib/chef/resource/openbsd_package.rb +2 -0
- data/lib/chef/resource/pacman_package.rb +2 -0
- data/lib/chef/resource/portage_package.rb +2 -0
- data/lib/chef/resource/rhsm_register.rb +2 -1
- data/lib/chef/resource/rpm_package.rb +2 -0
- data/lib/chef/resource/smartos_package.rb +2 -0
- data/lib/chef/resource/snap_package.rb +2 -0
- data/lib/chef/resource/solaris_package.rb +2 -0
- data/lib/chef/resource/windows_package.rb +3 -3
- data/lib/chef/resource/yum_package.rb +2 -0
- data/lib/chef/resource/yum_repository.rb +4 -0
- data/lib/chef/resource/zypper_package.rb +2 -0
- data/lib/chef/version.rb +1 -1
- data/spec/data/chef_guid +1 -0
- data/spec/data/nodes/mcwfhpowell.json +3 -0
- data/spec/functional/assets/yumrepo-empty/repodata/01a3b489a465bcac22a43492163df43451dc6ce47d27f66de289756b91635523-filelists.sqlite.bz2 +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93-filelists.xml.gz +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/5dc1e6e73c84803f059bb3065e684e56adfc289a7e398946574d79dac6643945-primary.sqlite.bz2 +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/6bf9672d0862e8ef8b8ff05a2fd0208a922b1f5978e6589d87944c88259cb670-other.xml.gz +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/7c36572015e075add2b38b900837bcdbb8a504130ddff49b2351a7fc0affa3d4-other.sqlite.bz2 +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9-primary.xml.gz +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/repomd.xml +55 -0
- data/spec/functional/resource/yum_package_spec.rb +16 -0
- data/spec/integration/client/fips_spec.rb +20 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/support/platform_helpers.rb +4 -0
- data/spec/unit/chef_fs/file_system_spec.rb +2 -0
- data/spec/unit/mixin/checksum_spec.rb +28 -0
- data/spec/unit/property/validation_spec.rb +30 -0
- data/spec/unit/provider/cron_spec.rb +36 -0
- data/spec/unit/resource/yum_repository_spec.rb +4 -0
- metadata +23 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2116a9a16e93030ed9aa85235426085567d3ef63e0c603bffa3a5a1614bb439e
|
4
|
+
data.tar.gz: cc9dcbc47ddcb72e3fe920f9da13a788a607b66d628331b23a03ea8dbad53c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d14c879526c8da207c572690f7e5c0a066c8ff89d33412053f6eaf3635ae2231d1f0c2c3478b1ebae30219ac0cbf86ee8c2381239eda50b937f853c2b7a77028
|
7
|
+
data.tar.gz: 1bfb25d57117e4cc93655ab55573cebcffd9854402a59606f79e5a6e05bc8660d18c2ccc85d2a09c007789509dd23abee90a1a3d26a07bc6d93ba8fff12d0b58
|
data/chef.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
|
31
31
|
s.add_dependency "chef-config", "= #{Chef::VERSION}"
|
32
32
|
s.add_dependency "chef-utils", "= #{Chef::VERSION}"
|
33
|
-
s.add_dependency "train-core", "~> 3.10"
|
33
|
+
s.add_dependency "train-core", "~> 3.10" # 3.2.28 fixes sudo prompts. See https://github.com/chef/chef/pull/9635
|
34
34
|
s.add_dependency "train-winrm", ">= 0.2.5"
|
35
35
|
s.add_dependency "train-rest", ">= 0.4.1" # target mode with rest APIs
|
36
36
|
|
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
|
|
45
45
|
|
46
46
|
s.add_dependency "ffi", ">= 1.15.5"
|
47
47
|
s.add_dependency "ffi-yajl", "~> 2.2"
|
48
|
-
s.add_dependency "net-sftp", ">= 2.1.2", "<
|
48
|
+
s.add_dependency "net-sftp", ">= 2.1.2", "< 5.0" # remote_file resource
|
49
49
|
s.add_dependency "net-ftp" # remote_file resource
|
50
50
|
s.add_dependency "erubis", "~> 2.7" # template resource / cookbook syntax check
|
51
51
|
s.add_dependency "diff-lcs", ">= 1.2.4", "!= 1.4.0", "< 1.6.0" # 1.4 breaks output. Used in lib/chef/util/diff
|
@@ -140,17 +140,18 @@ class Chef
|
|
140
140
|
def self.copy_to(pattern, src_root, dest_root, recurse_depth, options, ui = nil, format_path = nil)
|
141
141
|
found_result = false
|
142
142
|
error = false
|
143
|
+
result = {}
|
143
144
|
list_pairs(pattern, src_root, dest_root).parallel_each do |src, dest|
|
144
145
|
found_result = true
|
145
146
|
new_dest_parent = get_or_create_parent(dest, options, ui, format_path)
|
146
|
-
child_error = copy_entries(src, dest, new_dest_parent, recurse_depth, options, ui, format_path)
|
147
|
+
child_error, result = copy_entries(src, dest, new_dest_parent, recurse_depth, options, ui, format_path)
|
147
148
|
error ||= child_error
|
148
149
|
end
|
149
150
|
if !found_result && pattern.exact_path
|
150
151
|
ui.error "#{pattern}: No such file or directory on remote or local" if ui
|
151
152
|
error = true
|
152
153
|
end
|
153
|
-
error
|
154
|
+
[error, result]
|
154
155
|
end
|
155
156
|
|
156
157
|
# Yield entries for children that are in either +a_root+ or +b_root+, with
|
@@ -275,6 +276,7 @@ class Chef
|
|
275
276
|
# case we shouldn't waste time trying PUT if we know the file doesn't
|
276
277
|
# exist.
|
277
278
|
# Will need to decide how that works with checksums, though.
|
279
|
+
result = { "total" => 0, "success_count" => 0, "failed" => [] }
|
278
280
|
error = false
|
279
281
|
begin
|
280
282
|
dest_path = format_path.call(dest_entry) if ui
|
@@ -290,6 +292,8 @@ class Chef
|
|
290
292
|
dest_entry.delete(true)
|
291
293
|
ui.output "Deleted extra entry #{dest_path} (purge is on)" if ui
|
292
294
|
rescue Chef::ChefFS::FileSystem::NotFoundError
|
295
|
+
failure = { "src_path" => src_path, "reason" => "Entry #{dest_path} does not exist" }
|
296
|
+
result["failed"].append(failure)
|
293
297
|
ui.output "Entry #{dest_path} does not exist. Nothing to do. (purge is on)" if ui
|
294
298
|
end
|
295
299
|
end
|
@@ -323,7 +327,7 @@ class Chef
|
|
323
327
|
if recurse_depth != 0
|
324
328
|
src_entry.children.parallel_each do |src_child|
|
325
329
|
new_dest_child = new_dest_dir.child(src_child.name)
|
326
|
-
child_error = copy_entries(src_child, new_dest_child, new_dest_dir, recurse_depth ? recurse_depth - 1 : recurse_depth, options, ui, format_path)
|
330
|
+
child_error, result = copy_entries(src_child, new_dest_child, new_dest_dir, recurse_depth ? recurse_depth - 1 : recurse_depth, options, ui, format_path)
|
327
331
|
error ||= child_error
|
328
332
|
end
|
329
333
|
end
|
@@ -339,14 +343,15 @@ class Chef
|
|
339
343
|
|
340
344
|
else
|
341
345
|
# Both exist.
|
342
|
-
|
343
346
|
# If the entry can do a copy directly, do that.
|
344
347
|
if dest_entry.respond_to?(:copy_from)
|
345
348
|
if options[:force] || compare(src_entry, dest_entry)[0] == false
|
346
349
|
if options[:dry_run]
|
347
350
|
ui.output "Would update #{dest_path}" if ui
|
348
351
|
else
|
352
|
+
result["total"] += 1
|
349
353
|
dest_entry.copy_from(src_entry, options)
|
354
|
+
result["success_count"] += 1
|
350
355
|
ui.output "Updated #{dest_path}" if ui
|
351
356
|
end
|
352
357
|
end
|
@@ -359,7 +364,7 @@ class Chef
|
|
359
364
|
# If both are directories, recurse into their children
|
360
365
|
if recurse_depth != 0
|
361
366
|
child_pairs(src_entry, dest_entry).parallel_each do |src_child, dest_child|
|
362
|
-
child_error = copy_entries(src_child, dest_child, dest_entry, recurse_depth ? recurse_depth - 1 : recurse_depth, options, ui, format_path)
|
367
|
+
child_error, result = copy_entries(src_child, dest_child, dest_entry, recurse_depth ? recurse_depth - 1 : recurse_depth, options, ui, format_path)
|
363
368
|
error ||= child_error
|
364
369
|
end
|
365
370
|
end
|
@@ -373,7 +378,6 @@ class Chef
|
|
373
378
|
ui.error("File #{src_path} is a regular file while file #{dest_path} is a directory\n") if ui
|
374
379
|
return
|
375
380
|
else
|
376
|
-
|
377
381
|
# Both are files! Copy them unless we're sure they are the same.'
|
378
382
|
if options[:diff] == false
|
379
383
|
should_copy = false
|
@@ -389,7 +393,9 @@ class Chef
|
|
389
393
|
ui.output "Would update #{dest_path}" if ui
|
390
394
|
else
|
391
395
|
src_value = src_entry.read if src_value.nil?
|
396
|
+
result["total"] += 1
|
392
397
|
dest_entry.write(src_value)
|
398
|
+
result["success_count"] += 1
|
393
399
|
ui.output "Updated #{dest_path}" if ui
|
394
400
|
end
|
395
401
|
end
|
@@ -397,17 +403,25 @@ class Chef
|
|
397
403
|
end
|
398
404
|
end
|
399
405
|
rescue RubyFileError => e
|
406
|
+
failure = { "src_path" => src_path, "reason" => e.reason }
|
407
|
+
result["failed"].append(failure)
|
400
408
|
ui.warn "#{format_path.call(e.entry)} #{e.reason}." if ui
|
401
409
|
rescue DefaultEnvironmentCannotBeModifiedError => e
|
410
|
+
failure = { "src_path" => src_path, "reason" => e.reason }
|
411
|
+
result["failed"].append(failure)
|
402
412
|
ui.warn "#{format_path.call(e.entry)} #{e.reason}." if ui
|
403
413
|
rescue OperationFailedError => e
|
414
|
+
failure = { "src_path" => src_path, "reason" => e.reason }
|
415
|
+
result["failed"].append(failure)
|
404
416
|
ui.error "#{format_path.call(e.entry)} failed to #{e.operation}: #{e.message}" if ui
|
405
417
|
error = true
|
406
418
|
rescue OperationNotAllowedError => e
|
419
|
+
failure = { "src_path" => src_path, "reason" => e.reason }
|
420
|
+
result["failed"].append(failure)
|
407
421
|
ui.error "#{format_path.call(e.entry)} #{e.reason}." if ui
|
408
422
|
error = true
|
409
423
|
end
|
410
|
-
error
|
424
|
+
[error, result]
|
411
425
|
end
|
412
426
|
|
413
427
|
def get_or_create_parent(entry, options, ui, format_path)
|
data/lib/chef/mixin/checksum.rb
CHANGED
data/lib/chef/property.rb
CHANGED
@@ -307,7 +307,7 @@ class Chef
|
|
307
307
|
#
|
308
308
|
def required?(action = nil)
|
309
309
|
if !action.nil? && options[:required].is_a?(Array)
|
310
|
-
options[:required]
|
310
|
+
(options[:required] & Array(action)).any?
|
311
311
|
else
|
312
312
|
!!options[:required]
|
313
313
|
end
|
@@ -426,7 +426,7 @@ class Chef
|
|
426
426
|
end
|
427
427
|
end
|
428
428
|
|
429
|
-
if value.nil? && required?
|
429
|
+
if value.nil? && required?(resource_action(resource))
|
430
430
|
raise Chef::Exceptions::ValidationFailed, "#{name} is a required property"
|
431
431
|
else
|
432
432
|
value
|
@@ -455,7 +455,7 @@ class Chef
|
|
455
455
|
Chef.deprecated(:property, options[:deprecated])
|
456
456
|
end
|
457
457
|
|
458
|
-
if value.nil? && required?
|
458
|
+
if value.nil? && required?(resource_action(resource))
|
459
459
|
raise Chef::Exceptions::ValidationFailed, "#{name} is a required property"
|
460
460
|
else
|
461
461
|
value
|
@@ -768,5 +768,10 @@ class Chef
|
|
768
768
|
end
|
769
769
|
visitor.call(value)
|
770
770
|
end
|
771
|
+
|
772
|
+
# action from resource, if available
|
773
|
+
def resource_action(resource)
|
774
|
+
resource.action if resource.respond_to?(:action)
|
775
|
+
end
|
771
776
|
end
|
772
777
|
end
|
data/lib/chef/provider/cron.rb
CHANGED
@@ -88,7 +88,11 @@ class Chef
|
|
88
88
|
|
89
89
|
def cron_different?
|
90
90
|
CRON_ATTRIBUTES.any? do |cron_var|
|
91
|
-
new_resource.send(cron_var)
|
91
|
+
if new_resource.send(cron_var).class == current_resource.send(cron_var).class
|
92
|
+
new_resource.send(cron_var) != current_resource.send(cron_var)
|
93
|
+
else
|
94
|
+
new_resource.send(cron_var).to_s != current_resource.send(cron_var).to_s
|
95
|
+
end
|
92
96
|
end
|
93
97
|
end
|
94
98
|
|
data/lib/chef/provider/file.rb
CHANGED
@@ -336,7 +336,7 @@ class Chef
|
|
336
336
|
end
|
337
337
|
|
338
338
|
def do_validate_content
|
339
|
-
if new_resource.checksum && tempfile && (
|
339
|
+
if new_resource.checksum && tempfile && !checksum_match?(new_resource.checksum, tempfile_checksum)
|
340
340
|
raise Chef::Exceptions::ChecksumMismatch.new(short_cksum(new_resource.checksum), short_cksum(tempfile_checksum))
|
341
341
|
end
|
342
342
|
|
@@ -450,7 +450,7 @@ class Chef
|
|
450
450
|
|
451
451
|
def contents_changed?
|
452
452
|
logger.trace "calculating checksum of #{tempfile.path} to compare with #{current_resource.checksum}"
|
453
|
-
tempfile_checksum
|
453
|
+
!checksum_match?(tempfile_checksum, current_resource.checksum)
|
454
454
|
end
|
455
455
|
|
456
456
|
def tempfile
|
@@ -153,6 +153,7 @@ class Chef
|
|
153
153
|
"program" => "Program",
|
154
154
|
"program_arguments" => "ProgramArguments",
|
155
155
|
"abandon_process_group" => "AbandonProcessGroup",
|
156
|
+
"associated_bundle_identifiers" => "AssociatedBundleIdentifiers",
|
156
157
|
"debug" => "Debug",
|
157
158
|
"disabled" => "Disabled",
|
158
159
|
"enable_globbing" => "EnableGlobbing",
|
@@ -38,7 +38,7 @@ class Chef
|
|
38
38
|
def define_resource_requirements
|
39
39
|
if new_resource.checksum
|
40
40
|
requirements.assert(:install) do |a|
|
41
|
-
a.assertion { new_resource.checksum
|
41
|
+
a.assertion { checksum_match?(new_resource.checksum, checksum(source_location)) }
|
42
42
|
a.failure_message Chef::Exceptions::Package, "Checksum on resource (#{short_cksum(new_resource.checksum)}) does not match checksum on content (#{short_cksum(source_location)})"
|
43
43
|
end
|
44
44
|
end
|
@@ -53,16 +53,14 @@ def install_only_packages(base, name):
|
|
53
53
|
outpipe.flush()
|
54
54
|
|
55
55
|
def query(base, command):
|
56
|
-
enabled_repos = base.repos.listEnabled()
|
57
|
-
|
58
56
|
# Handle any repocontrols passed in with our options
|
59
57
|
|
60
58
|
if 'repos' in command:
|
61
59
|
for repo in command['repos']:
|
62
60
|
if 'enable' in repo:
|
63
61
|
base.repos.enableRepo(repo['enable'])
|
64
|
-
|
65
|
-
|
62
|
+
if 'disable' in repo:
|
63
|
+
base.repos.disableRepo(repo['disable'])
|
66
64
|
|
67
65
|
args = { 'name': command['provides'] }
|
68
66
|
do_nevra = False
|
@@ -94,8 +92,8 @@ def query(base, command):
|
|
94
92
|
# then the result was searchNevra'd. please be extremely careful if attempting to fix that
|
95
93
|
# since searchNevra does not support prco tuples.
|
96
94
|
if bool(re.search('\\s+', command['provides'])):
|
97
|
-
# handles flags (<, >, =, etc) and versions, but no
|
98
|
-
# raises error for any invalid input like: 'FOO BAR BAZ'
|
95
|
+
# handles flags (<, >, =, etc) and versions, but no wildcards
|
96
|
+
# raises error for any invalid input like: 'FOO BAR BAZ'
|
99
97
|
pkgs = obj.getProvides(*string_to_prco_tuple(command['provides']))
|
100
98
|
elif do_nevra:
|
101
99
|
# now if we're given version or arch properties explicitly, then we do a SearchNevra.
|
@@ -123,16 +121,6 @@ def query(base, command):
|
|
123
121
|
outpipe.write("%(n)s %(e)s:%(v)s-%(r)s %(a)s\n" % { 'n': pkg.name, 'e': pkg.epoch, 'v': pkg.version, 'r': pkg.release, 'a': pkg.arch })
|
124
122
|
outpipe.flush()
|
125
123
|
|
126
|
-
# Reset any repos we were passed in enablerepo/disablerepo to the original state in enabled_repos
|
127
|
-
if 'repos' in command:
|
128
|
-
for repo in command['repos']:
|
129
|
-
if 'enable' in repo:
|
130
|
-
if base.repos.getRepo(repo['enable']) not in enabled_repos:
|
131
|
-
base.repos.disableRepo(repo['enable'])
|
132
|
-
if 'disable' in repo:
|
133
|
-
if base.repos.getRepo(repo['disable']) in enabled_repos:
|
134
|
-
base.repos.enableRepo(repo['disable'])
|
135
|
-
|
136
124
|
# the design of this helper is that it should try to be 'brittle' and fail hard and exit in order
|
137
125
|
# to keep process tables clean. additional error handling should probably be added to the retry loop
|
138
126
|
# on the ruby side.
|
@@ -178,7 +166,7 @@ try:
|
|
178
166
|
|
179
167
|
try:
|
180
168
|
command = json.loads(line)
|
181
|
-
except ValueError
|
169
|
+
except ValueError as e:
|
182
170
|
raise RuntimeError("bad json parse")
|
183
171
|
|
184
172
|
if base is None:
|
@@ -44,7 +44,12 @@ class Chef
|
|
44
44
|
mode new_resource.mode
|
45
45
|
if new_resource.make_cache
|
46
46
|
notifies :run, "execute[yum clean metadata #{new_resource.repositoryid}]", :immediately if new_resource.clean_metadata || new_resource.clean_headers
|
47
|
-
|
47
|
+
# makecache fast only works on non-dnf systems.
|
48
|
+
if !which "dnf" && new_resource.makecache_fast
|
49
|
+
notifies :run, "execute[yum-makecache-fast-#{new_resource.repositoryid}]", :immediately
|
50
|
+
else
|
51
|
+
notifies :run, "execute[yum-makecache-#{new_resource.repositoryid}]", :immediately
|
52
|
+
end
|
48
53
|
notifies :flush_cache, "package[package-cache-reload-#{new_resource.repositoryid}]", :immediately
|
49
54
|
end
|
50
55
|
end
|
@@ -63,6 +68,13 @@ class Chef
|
|
63
68
|
only_if { new_resource.enabled }
|
64
69
|
end
|
65
70
|
|
71
|
+
# download only the minimum required metadata
|
72
|
+
execute "yum-makecache-fast-#{new_resource.repositoryid}" do
|
73
|
+
command "yum -q -y makecache fast --disablerepo=* --enablerepo=#{new_resource.repositoryid}"
|
74
|
+
action :nothing
|
75
|
+
only_if { new_resource.enabled }
|
76
|
+
end
|
77
|
+
|
66
78
|
package "package-cache-reload-#{new_resource.repositoryid}" do
|
67
79
|
action :nothing
|
68
80
|
end
|
@@ -56,6 +56,8 @@ class Chef
|
|
56
56
|
|
57
57
|
description "Use the **apt_package** resource to manage packages on Debian, Ubuntu, and other platforms that use the APT package system."
|
58
58
|
|
59
|
+
allowed_actions :install, :upgrade, :remove, :purge, :reconfig, :lock, :unlock
|
60
|
+
|
59
61
|
property :default_release, String,
|
60
62
|
description: "The default release. For example: `stable`.",
|
61
63
|
desired_state: false
|
@@ -255,7 +255,7 @@ class Chef
|
|
255
255
|
action :create, description: "Create a client.rb config file and folders for configuring #{ChefUtils::Dist::Infra::PRODUCT}." do
|
256
256
|
[
|
257
257
|
new_resource.config_directory,
|
258
|
-
(::File.dirname(new_resource.log_location)
|
258
|
+
(::File.dirname(new_resource.log_location) if new_resource.log_location.is_a?(String) && !%w{STDOUT STDERR}.include?(new_resource.log_location) && !new_resource.log_location.empty?),
|
259
259
|
new_resource.file_backup_path,
|
260
260
|
new_resource.file_cache_path,
|
261
261
|
::File.join(new_resource.config_directory, "client.d"),
|
@@ -265,7 +265,7 @@ class Chef
|
|
265
265
|
directory dir_path do
|
266
266
|
user new_resource.user unless new_resource.user.nil?
|
267
267
|
group new_resource.group unless new_resource.group.nil?
|
268
|
-
mode dir_path == ::File.dirname(new_resource.log_location) ? "0755" : "0750"
|
268
|
+
mode dir_path == ::File.dirname(new_resource.log_location.to_s) ? "0755" : "0750"
|
269
269
|
recursive true
|
270
270
|
end
|
271
271
|
end
|
@@ -30,6 +30,8 @@ class Chef
|
|
30
30
|
|
31
31
|
description "Use the **freebsd_package** resource to manage packages for the FreeBSD platform."
|
32
32
|
|
33
|
+
allowed_actions :install, :remove
|
34
|
+
|
33
35
|
# make sure we assign the appropriate underlying providers based on what
|
34
36
|
# package managers exist on this FreeBSD system or the source of the package
|
35
37
|
#
|
@@ -60,6 +60,8 @@ class Chef
|
|
60
60
|
```
|
61
61
|
DOC
|
62
62
|
|
63
|
+
allowed_actions :install, :upgrade, :remove, :purge
|
64
|
+
|
63
65
|
property :homebrew_user, [ String, Integer ],
|
64
66
|
description: "The name or uid of the Homebrew owner to be used by #{ChefUtils::Dist::Infra::PRODUCT} when executing a command.\n\n#{ChefUtils::Dist::Infra::PRODUCT}, by default, will attempt to execute a Homebrew command as the owner of the `/usr/local/bin/brew` executable. If that executable does not exist, #{ChefUtils::Dist::Infra::PRODUCT} will attempt to find the user by executing `which brew`. If that executable cannot be found, #{ChefUtils::Dist::Infra::PRODUCT} will print an error message: `Could not find the 'brew' executable in /usr/local/bin or anywhere on the path.`.\n\nSet this property to specify the Homebrew owner for situations where Chef Infra Client cannot automatically detect the correct owner.'"
|
65
67
|
|
@@ -129,6 +129,9 @@ class Chef
|
|
129
129
|
property :abandon_process_group, [ TrueClass, FalseClass ],
|
130
130
|
description: "If a job dies, all remaining processes with the same process ID may be kept running. Set to true to kill all remaining processes."
|
131
131
|
|
132
|
+
property :associated_bundle_identifiers, Hash,
|
133
|
+
description: "This optional key indicates which bundles the Login Items Added by Apps panel associates with the helper executable."
|
134
|
+
|
132
135
|
property :debug, [ TrueClass, FalseClass ],
|
133
136
|
description: "Sets the log mask to `LOG_DEBUG` for this job."
|
134
137
|
|
@@ -69,7 +69,7 @@ class Chef
|
|
69
69
|
|
70
70
|
property :global, [TrueClass, FalseClass],
|
71
71
|
description: "Determines whether or not the domain is global.",
|
72
|
-
deprecated:
|
72
|
+
deprecated: "As of Chef Infra Client 17.8 the `global` property is no longer necessary.",
|
73
73
|
default: false,
|
74
74
|
desired_state: false
|
75
75
|
|
@@ -90,7 +90,7 @@ class Chef
|
|
90
90
|
description: "The value type of the preference key.",
|
91
91
|
equal_to: %w{bool string int float array dict},
|
92
92
|
desired_state: false,
|
93
|
-
deprecated:
|
93
|
+
deprecated: "As of Chef Infra Client 17.8 the `type` property is no longer necessary."
|
94
94
|
|
95
95
|
property :user, [String, Symbol],
|
96
96
|
description: "The system user that the default will be applied to. Set :current for current user, :all for all users or pass a valid username",
|
@@ -100,7 +100,7 @@ class Chef
|
|
100
100
|
description: "Set to true if the setting you wish to modify requires privileged access. This requires passwordless sudo for the `/usr/bin/defaults` command to be setup for the user running #{ChefUtils::Dist::Infra::PRODUCT}.",
|
101
101
|
default: false,
|
102
102
|
desired_state: false,
|
103
|
-
deprecated:
|
103
|
+
deprecated: "As of Chef Infra Client 17.8 the `sudo` property is no longer necessary."
|
104
104
|
|
105
105
|
load_current_value do |new_resource|
|
106
106
|
Chef::Log.debug "#load_current_value: attempting to read \"#{new_resource.domain}\" value from preferences to determine state"
|
@@ -25,6 +25,8 @@ class Chef
|
|
25
25
|
|
26
26
|
description "Use the **macports_package** resource to manage packages for the macOS platform using the MacPorts package management system."
|
27
27
|
|
28
|
+
allowed_actions :install, :upgrade, :remove, :purge
|
29
|
+
|
28
30
|
property :package_name, String,
|
29
31
|
description: "An optional property to set the package name if it differs from the resource block's name.",
|
30
32
|
identity: true
|
@@ -26,6 +26,8 @@ class Chef
|
|
26
26
|
|
27
27
|
description "Use the **portage_package** resource to manage packages for the Gentoo platform."
|
28
28
|
|
29
|
+
allowed_actions :install, :upgrade, :remove, :purge
|
30
|
+
|
29
31
|
property :package_name, String,
|
30
32
|
description: "An optional property to set the package name if it differs from the resource block's name.",
|
31
33
|
identity: true
|
@@ -92,7 +92,7 @@ class Chef
|
|
92
92
|
|
93
93
|
property :release,
|
94
94
|
[Float, String],
|
95
|
-
description: "Sets the operating system minor release to use for subscriptions for the system. Products and updates are limited to the specified minor release version. This is used
|
95
|
+
description: "Sets the operating system minor release to use for subscriptions for the system. Products and updates are limited to the specified minor release version. This is used with the `auto_attach` option, it may also be used with activation keys. For example, `release '6.4'` will append `--release=6.4` to the register command.",
|
96
96
|
introduced: "17.8"
|
97
97
|
|
98
98
|
action :register, description: "Register the node with RHSM." do
|
@@ -205,6 +205,7 @@ class Chef
|
|
205
205
|
command << "--name=#{Shellwords.shellescape(new_resource.system_name)}" if new_resource.system_name
|
206
206
|
command << "--serverurl=#{Shellwords.shellescape(new_resource.server_url)}" if new_resource.server_url
|
207
207
|
command << "--baseurl=#{Shellwords.shellescape(new_resource.base_url)}" if new_resource.base_url
|
208
|
+
command << "--release=#{Shellwords.shellescape(new_resource.release)}" if new_resource.release
|
208
209
|
command << "--force" if new_resource.force
|
209
210
|
|
210
211
|
return command.join(" ")
|
@@ -27,6 +27,8 @@ class Chef
|
|
27
27
|
|
28
28
|
description "Use the **smartos_package** resource to manage packages for the SmartOS platform."
|
29
29
|
|
30
|
+
allowed_actions :install, :upgrade, :remove
|
31
|
+
|
30
32
|
property :package_name, String,
|
31
33
|
description: "An optional property to set the package name if it differs from the resource block's name.",
|
32
34
|
identity: true
|
@@ -27,6 +27,8 @@ class Chef
|
|
27
27
|
description "Use the **snap_package** resource to manage snap packages on Debian and Ubuntu platforms."
|
28
28
|
introduced "15.0"
|
29
29
|
|
30
|
+
allowed_actions :install, :upgrade, :remove, :purge
|
31
|
+
|
30
32
|
property :channel, String,
|
31
33
|
description: "The default channel. For example: stable.",
|
32
34
|
default: "stable",
|
@@ -27,6 +27,8 @@ class Chef
|
|
27
27
|
|
28
28
|
description "Use the **solaris_package** resource to manage packages on the Solaris platform."
|
29
29
|
|
30
|
+
allowed_actions :install, :upgrade, :remove
|
31
|
+
|
30
32
|
property :package_name, String,
|
31
33
|
description: "An optional property to set the package name if it differs from the resource block's name.",
|
32
34
|
identity: true
|
@@ -78,7 +78,7 @@ class Chef
|
|
78
78
|
```ruby
|
79
79
|
windows_package '7zip' do
|
80
80
|
source 'http://www.7-zip.org/a/7z938-x64.msi'
|
81
|
-
checksum '
|
81
|
+
checksum '7c8e873991c82ad9cfcdbdf45254ea6101e9a645e12977dcd518979e50fdedf3'
|
82
82
|
end
|
83
83
|
```
|
84
84
|
|
@@ -91,7 +91,7 @@ class Chef
|
|
91
91
|
source 'http://www.7-zip.org/a/7z938-x64.msi'
|
92
92
|
remote_file_attributes ({
|
93
93
|
:path => 'C:\\7zip.msi',
|
94
|
-
:checksum => '
|
94
|
+
:checksum => '7c8e873991c82ad9cfcdbdf45254ea6101e9a645e12977dcd518979e50fdedf3'
|
95
95
|
})
|
96
96
|
end
|
97
97
|
```
|
@@ -100,7 +100,7 @@ class Chef
|
|
100
100
|
|
101
101
|
```ruby
|
102
102
|
windows_package 'Mercurial 3.6.1 (64-bit)' do
|
103
|
-
source '
|
103
|
+
source 'https://www.mercurial-scm.org/release/windows/Mercurial-3.6.1-x64.exe'
|
104
104
|
checksum 'febd29578cb6736163d232708b834a2ddd119aa40abc536b2c313fc5e1b5831d'
|
105
105
|
end
|
106
106
|
```
|
@@ -109,6 +109,8 @@ class Chef
|
|
109
109
|
```
|
110
110
|
DOC
|
111
111
|
|
112
|
+
allowed_actions :install, :upgrade, :remove, :purge, :lock, :unlock
|
113
|
+
|
112
114
|
# XXX: the coercions here are due to the provider promiscuously updating the properties on the
|
113
115
|
# new_resource which causes immutable modification exceptions when passed an immutable node array.
|
114
116
|
#
|
@@ -114,6 +114,10 @@ class Chef
|
|
114
114
|
description: "Determines whether package files downloaded by Yum stay in cache directories. By using cached data, you can carry out certain operations without a network connection.",
|
115
115
|
default: true
|
116
116
|
|
117
|
+
property :makecache_fast, [TrueClass, FalseClass],
|
118
|
+
description: "if make_cache is true, uses `yum makecache fast`, which downloads only the minimum amount of data required. Useful over slower connections and when disk space is at a premium.",
|
119
|
+
default: false
|
120
|
+
|
117
121
|
property :max_retries, [String, Integer],
|
118
122
|
description: "Number of times any attempt to retrieve a file should retry before returning an error. Setting this to `0` makes Yum try forever."
|
119
123
|
|
@@ -53,6 +53,8 @@ class Chef
|
|
53
53
|
```
|
54
54
|
DOC
|
55
55
|
|
56
|
+
allowed_actions :install, :upgrade, :remove, :purge, :lock, :unlock
|
57
|
+
|
56
58
|
property :gpg_check, [ TrueClass, FalseClass ],
|
57
59
|
description: "Verify the package's GPG signature. Can also be controlled site-wide using the `zypper_check_gpg` config option.",
|
58
60
|
default: lazy { Chef::Config[:zypper_check_gpg] }, default_description: "true"
|
data/lib/chef/version.rb
CHANGED
data/spec/data/chef_guid
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
25435897-47c0-49b1-9eb3-561b312cbfd6
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
|
3
|
+
<revision>1667508211</revision>
|
4
|
+
<data type="filelists">
|
5
|
+
<checksum type="sha256">401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93</checksum>
|
6
|
+
<open-checksum type="sha256">bf9808b81cb2dbc54b4b8e35adc584ddcaa73bd81f7088d73bf7dbbada961310</open-checksum>
|
7
|
+
<location href="repodata/401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93-filelists.xml.gz"/>
|
8
|
+
<timestamp>1667508211</timestamp>
|
9
|
+
<size>123</size>
|
10
|
+
<open-size>125</open-size>
|
11
|
+
</data>
|
12
|
+
<data type="primary">
|
13
|
+
<checksum type="sha256">dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9</checksum>
|
14
|
+
<open-checksum type="sha256">e1e2ffd2fb1ee76f87b70750d00ca5677a252b397ab6c2389137a0c33e7b359f</open-checksum>
|
15
|
+
<location href="repodata/dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9-primary.xml.gz"/>
|
16
|
+
<timestamp>1667508211</timestamp>
|
17
|
+
<size>134</size>
|
18
|
+
<open-size>167</open-size>
|
19
|
+
</data>
|
20
|
+
<data type="primary_db">
|
21
|
+
<checksum type="sha256">5dc1e6e73c84803f059bb3065e684e56adfc289a7e398946574d79dac6643945</checksum>
|
22
|
+
<open-checksum type="sha256">f0d550414e8f2e960e82e704549364299ca9e3e8664ad4faffd208262c3b6d12</open-checksum>
|
23
|
+
<location href="repodata/5dc1e6e73c84803f059bb3065e684e56adfc289a7e398946574d79dac6643945-primary.sqlite.bz2"/>
|
24
|
+
<timestamp>1667508211</timestamp>
|
25
|
+
<database_version>10</database_version>
|
26
|
+
<size>1131</size>
|
27
|
+
<open-size>21504</open-size>
|
28
|
+
</data>
|
29
|
+
<data type="other_db">
|
30
|
+
<checksum type="sha256">7c36572015e075add2b38b900837bcdbb8a504130ddff49b2351a7fc0affa3d4</checksum>
|
31
|
+
<open-checksum type="sha256">4de0fe7c5dd2674849a7c63c326e42f33af0a0f46219bc6dd59f51dfa2ac8c68</open-checksum>
|
32
|
+
<location href="repodata/7c36572015e075add2b38b900837bcdbb8a504130ddff49b2351a7fc0affa3d4-other.sqlite.bz2"/>
|
33
|
+
<timestamp>1667508211</timestamp>
|
34
|
+
<database_version>10</database_version>
|
35
|
+
<size>575</size>
|
36
|
+
<open-size>6144</open-size>
|
37
|
+
</data>
|
38
|
+
<data type="other">
|
39
|
+
<checksum type="sha256">6bf9672d0862e8ef8b8ff05a2fd0208a922b1f5978e6589d87944c88259cb670</checksum>
|
40
|
+
<open-checksum type="sha256">e0ed5e0054194df036cf09c1a911e15bf2a4e7f26f2a788b6f47d53e80717ccc</open-checksum>
|
41
|
+
<location href="repodata/6bf9672d0862e8ef8b8ff05a2fd0208a922b1f5978e6589d87944c88259cb670-other.xml.gz"/>
|
42
|
+
<timestamp>1667508211</timestamp>
|
43
|
+
<size>123</size>
|
44
|
+
<open-size>121</open-size>
|
45
|
+
</data>
|
46
|
+
<data type="filelists_db">
|
47
|
+
<checksum type="sha256">01a3b489a465bcac22a43492163df43451dc6ce47d27f66de289756b91635523</checksum>
|
48
|
+
<open-checksum type="sha256">c4211f57bdcbb142c9f93a6d32401539f775eb6a670ab7a423e13f435ce94689</open-checksum>
|
49
|
+
<location href="repodata/01a3b489a465bcac22a43492163df43451dc6ce47d27f66de289756b91635523-filelists.sqlite.bz2"/>
|
50
|
+
<timestamp>1667508211</timestamp>
|
51
|
+
<database_version>10</database_version>
|
52
|
+
<size>586</size>
|
53
|
+
<open-size>7168</open-size>
|
54
|
+
</data>
|
55
|
+
</repomd>
|
@@ -57,6 +57,12 @@ describe Chef::Resource::YumPackage, :requires_root, external: exclude_test do
|
|
57
57
|
baseurl=file://#{CHEF_SPEC_ASSETS}/yumrepo
|
58
58
|
enable=1
|
59
59
|
gpgcheck=0
|
60
|
+
[chef-yum-empty]
|
61
|
+
name=Chef DNF spec empty repo
|
62
|
+
baseurl=file://#{CHEF_SPEC_ASSETS}/yumrepo-empty
|
63
|
+
enable=1
|
64
|
+
gpgcheck=0
|
65
|
+
|
60
66
|
EOF
|
61
67
|
end
|
62
68
|
# ensure we don't have any stray chef_rpms installed
|
@@ -1095,6 +1101,16 @@ describe Chef::Resource::YumPackage, :requires_root, external: exclude_test do
|
|
1095
1101
|
end.should_not_be_updated
|
1096
1102
|
end
|
1097
1103
|
|
1104
|
+
it "should work to disable a repo" do
|
1105
|
+
flush_cache
|
1106
|
+
expect {
|
1107
|
+
yum_package "chef_rpm" do
|
1108
|
+
options "--disablerepo=chef-yum-localtesting --enablerepo=chef-yum-empty"
|
1109
|
+
action :install
|
1110
|
+
end
|
1111
|
+
}.to raise_error(Chef::Exceptions::Package, /No candidate version available/)
|
1112
|
+
end
|
1113
|
+
|
1098
1114
|
it "when an idempotent install action is run, does not leave repos disabled" do
|
1099
1115
|
flush_cache
|
1100
1116
|
# this is a bit tricky -- we need this action to be idempotent, so that it doesn't recycle any
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "chef-client fips" do
|
4
|
+
def enable_fips
|
5
|
+
OpenSSL.fips_mode = true
|
6
|
+
end
|
7
|
+
|
8
|
+
# All tests assume fips mode is off at present
|
9
|
+
after { OpenSSL.fips_mode = false }
|
10
|
+
|
11
|
+
# For non-FIPS OSes/builds of Ruby, enabling FIPS should error
|
12
|
+
example "Error enabling fips_mode if FIPS not linked", fips_mode: false do
|
13
|
+
expect { enable_fips }.to raise_error(OpenSSL::OpenSSLError)
|
14
|
+
end
|
15
|
+
|
16
|
+
# For FIPS OSes/builds of Ruby, enabling FIPS should not error
|
17
|
+
example "Do not error enabling fips_mode if FIPS linked", fips_mode: true do
|
18
|
+
expect { enable_fips }.not_to raise_error
|
19
|
+
end
|
20
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -138,6 +138,10 @@ RSpec.configure do |config|
|
|
138
138
|
|
139
139
|
config.filter_run_excluding skip_buildkite: true if ENV["BUILDKITE"]
|
140
140
|
|
141
|
+
config.filter_run_excluding fips_mode: !fips_mode_build? unless opensuse?
|
142
|
+
# RubyDistros OpenSUSE docker images have a broken fips
|
143
|
+
config.filter_run_excluding :fips_mode if opensuse?
|
144
|
+
|
141
145
|
config.filter_run_excluding windows_only: true unless windows?
|
142
146
|
config.filter_run_excluding not_supported_on_windows: true if windows?
|
143
147
|
config.filter_run_excluding not_supported_on_macos: true if macos?
|
@@ -51,4 +51,32 @@ describe Chef::Mixin::Checksum do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
describe "checksum_match?" do
|
55
|
+
context "when checksum cases match" do
|
56
|
+
it "returns true" do
|
57
|
+
expect(@checksum_user.checksum_match?("u7ghbxikk3i9blsimmy2y2ionmxx", "u7ghbxikk3i9blsimmy2y2ionmxx")).to be true
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
context "when one checksum is uppercase and other is lowercase" do
|
62
|
+
it "returns true" do
|
63
|
+
expect(@checksum_user.checksum_match?("U7GHBXIKK3I9BLSIMMY2Y2IONMXX", "u7ghbxikk3i9blsimmy2y2ionmxx")).to be true
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context "when checksums do not match" do
|
68
|
+
it "returns false" do
|
69
|
+
expect(@checksum_user.checksum_match?("u7ghbxikk3i9blsimmy2y2ionmxx", "09ee9c8cc70501763563bcf9c218")).to be false
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context "when checksum is nil" do
|
74
|
+
it "returns false" do
|
75
|
+
expect(@checksum_user.checksum_match?("u7ghbxikk3i9blsimmy2y2ionmxx", nil)).to be false
|
76
|
+
expect(@checksum_user.checksum_match?(nil, "09ee9c8cc70501763563bcf9c218")).to be false
|
77
|
+
expect(@checksum_user.checksum_match?(nil, nil)).to be false
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
54
82
|
end
|
@@ -600,6 +600,36 @@ describe "Chef::Resource.property validation" do
|
|
600
600
|
it "does not fail if it is not specified, on running the doit2 action" do
|
601
601
|
expect { resource.run_action(:doit2) }.not_to raise_error
|
602
602
|
end
|
603
|
+
|
604
|
+
context "when an action does not require it" do
|
605
|
+
before do
|
606
|
+
resource.action(:doit2)
|
607
|
+
end
|
608
|
+
|
609
|
+
it "retrieval succeeds if x is not set when resource uses the doit2 action" do
|
610
|
+
expect { resource.x }.not_to raise_error
|
611
|
+
end
|
612
|
+
|
613
|
+
it "succeeds with set to nil when resource uses the doit2 action" do
|
614
|
+
expect { resource.x nil }.not_to raise_error
|
615
|
+
end
|
616
|
+
end
|
617
|
+
|
618
|
+
context "when an action requires it" do
|
619
|
+
before do
|
620
|
+
# NOTE: this is already the default action, but it doesn't
|
621
|
+
# hurt to be clear about the situation.
|
622
|
+
resource.action(:doit)
|
623
|
+
end
|
624
|
+
|
625
|
+
it "if x is not specified, retrieval fails for the doit action" do
|
626
|
+
expect { resource.x }.to raise_error Chef::Exceptions::ValidationFailed
|
627
|
+
end
|
628
|
+
|
629
|
+
it "value nil is not valid for the doit action (required means 'not nil')" do
|
630
|
+
expect { resource.x nil }.to raise_error Chef::Exceptions::ValidationFailed
|
631
|
+
end
|
632
|
+
end
|
603
633
|
end
|
604
634
|
|
605
635
|
with_property ":x, String, required: true" do
|
@@ -769,6 +769,42 @@ describe Chef::Provider::Cron do
|
|
769
769
|
end
|
770
770
|
end
|
771
771
|
|
772
|
+
context "when integers are provided to the resource to express time values" do
|
773
|
+
it "should not report any difference" do
|
774
|
+
@new_resource.minute(1)
|
775
|
+
@new_resource.hour(1)
|
776
|
+
@new_resource.day(1)
|
777
|
+
@new_resource.month(1)
|
778
|
+
@new_resource.weekday(1)
|
779
|
+
allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB)
|
780
|
+
# Chef Name: cronhole some stuff
|
781
|
+
1 1 1 1 1 /bin/true
|
782
|
+
|
783
|
+
CRONTAB
|
784
|
+
|
785
|
+
@provider.run_action(:create)
|
786
|
+
expect(@new_resource).not_to be_updated_by_last_action
|
787
|
+
end
|
788
|
+
end
|
789
|
+
|
790
|
+
context "when strings are provided to the resource to express time values" do
|
791
|
+
it "should not report any difference" do
|
792
|
+
@new_resource.minute("1")
|
793
|
+
@new_resource.hour("1")
|
794
|
+
@new_resource.day("1")
|
795
|
+
@new_resource.month("1")
|
796
|
+
@new_resource.weekday("1")
|
797
|
+
allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB)
|
798
|
+
# Chef Name: cronhole some stuff
|
799
|
+
1 1 1 1 1 /bin/true
|
800
|
+
|
801
|
+
CRONTAB
|
802
|
+
|
803
|
+
@provider.run_action(:create)
|
804
|
+
expect(@new_resource).not_to be_updated_by_last_action
|
805
|
+
end
|
806
|
+
end
|
807
|
+
|
772
808
|
context "when environment variable is used" do
|
773
809
|
before :each do
|
774
810
|
@provider.cron_exists = true
|
@@ -68,6 +68,10 @@ describe Chef::Resource::YumRepository do
|
|
68
68
|
expect(resource.make_cache).to eql(true)
|
69
69
|
end
|
70
70
|
|
71
|
+
it "makecache_fast property defaults to false" do
|
72
|
+
expect(resource.makecache_fast).to eql(false)
|
73
|
+
end
|
74
|
+
|
71
75
|
it "mode property defaults to '0644'" do
|
72
76
|
expect(resource.mode).to eql("0644")
|
73
77
|
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: 18.0
|
4
|
+
version: 18.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-05 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: 18.0
|
19
|
+
version: 18.1.0
|
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: 18.0
|
26
|
+
version: 18.1.0
|
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: 18.0
|
33
|
+
version: 18.1.0
|
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: 18.0
|
40
|
+
version: 18.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,9 +45,6 @@ dependencies:
|
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.10'
|
48
|
-
- - ">="
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: 3.2.28
|
51
48
|
type: :runtime
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -55,9 +52,6 @@ dependencies:
|
|
55
52
|
- - "~>"
|
56
53
|
- !ruby/object:Gem::Version
|
57
54
|
version: '3.10'
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 3.2.28
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: train-winrm
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -271,7 +265,7 @@ dependencies:
|
|
271
265
|
version: 2.1.2
|
272
266
|
- - "<"
|
273
267
|
- !ruby/object:Gem::Version
|
274
|
-
version: '
|
268
|
+
version: '5.0'
|
275
269
|
type: :runtime
|
276
270
|
prerelease: false
|
277
271
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -281,7 +275,7 @@ dependencies:
|
|
281
275
|
version: 2.1.2
|
282
276
|
- - "<"
|
283
277
|
- !ruby/object:Gem::Version
|
284
|
-
version: '
|
278
|
+
version: '5.0'
|
285
279
|
- !ruby/object:Gem::Dependency
|
286
280
|
name: net-ftp
|
287
281
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1433,6 +1427,7 @@ files:
|
|
1433
1427
|
- spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ufy6g3-0
|
1434
1428
|
- spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-x2d6j9-0
|
1435
1429
|
- spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-xi0l6h-0
|
1430
|
+
- spec/data/chef_guid
|
1436
1431
|
- spec/data/client.d_00/00-foo.rb
|
1437
1432
|
- spec/data/client.d_00/01-bar.rb
|
1438
1433
|
- spec/data/client.d_00/02-strings.rb
|
@@ -1565,6 +1560,7 @@ files:
|
|
1565
1560
|
- spec/data/mixin/real_data.rb
|
1566
1561
|
- spec/data/nested.json
|
1567
1562
|
- spec/data/nodes/default.rb
|
1563
|
+
- spec/data/nodes/mcwfhpowell.json
|
1568
1564
|
- spec/data/nodes/test.example.com.rb
|
1569
1565
|
- spec/data/nodes/test.rb
|
1570
1566
|
- spec/data/null_config.rb
|
@@ -1728,6 +1724,13 @@ files:
|
|
1728
1724
|
- spec/functional/assets/mytest-1.0-1.noarch.rpm
|
1729
1725
|
- spec/functional/assets/mytest-2.0-1.noarch.rpm
|
1730
1726
|
- spec/functional/assets/testchefsubsys
|
1727
|
+
- spec/functional/assets/yumrepo-empty/repodata/01a3b489a465bcac22a43492163df43451dc6ce47d27f66de289756b91635523-filelists.sqlite.bz2
|
1728
|
+
- spec/functional/assets/yumrepo-empty/repodata/401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93-filelists.xml.gz
|
1729
|
+
- spec/functional/assets/yumrepo-empty/repodata/5dc1e6e73c84803f059bb3065e684e56adfc289a7e398946574d79dac6643945-primary.sqlite.bz2
|
1730
|
+
- spec/functional/assets/yumrepo-empty/repodata/6bf9672d0862e8ef8b8ff05a2fd0208a922b1f5978e6589d87944c88259cb670-other.xml.gz
|
1731
|
+
- spec/functional/assets/yumrepo-empty/repodata/7c36572015e075add2b38b900837bcdbb8a504130ddff49b2351a7fc0affa3d4-other.sqlite.bz2
|
1732
|
+
- spec/functional/assets/yumrepo-empty/repodata/dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9-primary.xml.gz
|
1733
|
+
- spec/functional/assets/yumrepo-empty/repodata/repomd.xml
|
1731
1734
|
- spec/functional/assets/yumrepo/chef_rpm-1.10-1.aarch64.rpm
|
1732
1735
|
- spec/functional/assets/yumrepo/chef_rpm-1.10-1.i686.rpm
|
1733
1736
|
- spec/functional/assets/yumrepo/chef_rpm-1.10-1.ppc64.rpm
|
@@ -1848,6 +1851,7 @@ files:
|
|
1848
1851
|
- spec/functional/win32/versions_spec.rb
|
1849
1852
|
- spec/integration/client/client_spec.rb
|
1850
1853
|
- spec/integration/client/exit_code_spec.rb
|
1854
|
+
- spec/integration/client/fips_spec.rb
|
1851
1855
|
- spec/integration/client/ipv6_spec.rb
|
1852
1856
|
- spec/integration/compliance/compliance_spec.rb
|
1853
1857
|
- spec/integration/ohai/ohai_spec.rb
|
@@ -2445,7 +2449,7 @@ metadata:
|
|
2445
2449
|
homepage_uri: https://www.chef.io
|
2446
2450
|
mailing_list_uri: https://discourse.chef.io/
|
2447
2451
|
source_code_uri: https://github.com/chef/chef/
|
2448
|
-
post_install_message:
|
2452
|
+
post_install_message:
|
2449
2453
|
rdoc_options: []
|
2450
2454
|
require_paths:
|
2451
2455
|
- lib
|
@@ -2453,15 +2457,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2453
2457
|
requirements:
|
2454
2458
|
- - ">="
|
2455
2459
|
- !ruby/object:Gem::Version
|
2456
|
-
version: 3.0
|
2460
|
+
version: 3.1.0
|
2457
2461
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2458
2462
|
requirements:
|
2459
2463
|
- - ">="
|
2460
2464
|
- !ruby/object:Gem::Version
|
2461
2465
|
version: '0'
|
2462
2466
|
requirements: []
|
2463
|
-
rubygems_version: 3.
|
2464
|
-
signing_key:
|
2467
|
+
rubygems_version: 3.3.26
|
2468
|
+
signing_key:
|
2465
2469
|
specification_version: 4
|
2466
2470
|
summary: A systems integration framework, built to bring the benefits of configuration
|
2467
2471
|
management to your entire infrastructure.
|