chef 15.11.8-universal-mingw32 → 15.16.2-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +12 -13
- data/README.md +3 -3
- data/Rakefile +11 -17
- data/chef-universal-mingw32.gemspec +4 -4
- data/chef.gemspec +25 -7
- data/distro/powershell/chef/chef.psm1 +3 -3
- data/distro/templates/powershell/chef/chef.psm1.erb +3 -3
- data/lib/chef/api_client/registration.rb +2 -2
- data/lib/chef/application/apply.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/base_file.rb +1 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +2 -2
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +2 -2
- data/lib/chef/chef_fs/file_system/repository/directory.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/file_system_entry.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/data_bag.rb +2 -2
- data/lib/chef/data_collector/error_handlers.rb +1 -1
- data/lib/chef/deprecated.rb +12 -0
- data/lib/chef/dsl/declare_resource.rb +1 -1
- data/lib/chef/dsl/platform_introspection.rb +2 -0
- data/lib/chef/environment.rb +2 -2
- data/lib/chef/exceptions.rb +3 -0
- data/lib/chef/http.rb +2 -1
- data/lib/chef/knife/bootstrap.rb +6 -9
- data/lib/chef/knife/bootstrap/templates/chef-full.erb +9 -9
- data/lib/chef/knife/bootstrap/train_connector.rb +1 -0
- data/lib/chef/knife/cookbook_download.rb +1 -1
- data/lib/chef/knife/cookbook_metadata.rb +1 -1
- data/lib/chef/knife/core/gem_glob_loader.rb +1 -1
- data/lib/chef/knife/core/hashed_command_loader.rb +3 -2
- data/lib/chef/knife/core/subcommand_loader.rb +1 -1
- data/lib/chef/knife/exec.rb +2 -2
- data/lib/chef/knife/ssh.rb +20 -1
- data/lib/chef/log.rb +1 -1
- data/lib/chef/mixin/openssl_helper.rb +26 -3
- data/lib/chef/mixin/template.rb +1 -0
- data/lib/chef/node_map.rb +5 -2
- data/lib/chef/provider/mount/solaris.rb +0 -1
- data/lib/chef/provider/package/cab.rb +1 -1
- data/lib/chef/provider/package/chocolatey.rb +1 -1
- data/lib/chef/provider/package/dnf/dnf_helper.py +5 -0
- data/lib/chef/provider/package/freebsd/pkgng.rb +3 -1
- data/lib/chef/provider/package/msu.rb +1 -0
- data/lib/chef/provider/package/powershell.rb +5 -1
- data/lib/chef/provider/package/snap.rb +96 -27
- data/lib/chef/provider/package/yum/yum_helper.py +4 -0
- data/lib/chef/provider/package/zypper.rb +0 -1
- data/lib/chef/provider/service/arch.rb +2 -2
- data/lib/chef/provider/service/debian.rb +1 -1
- data/lib/chef/provider/service/gentoo.rb +2 -2
- data/lib/chef/provider/service/macosx.rb +2 -2
- data/lib/chef/provider/service/openbsd.rb +1 -1
- data/lib/chef/provider/service/redhat.rb +2 -2
- data/lib/chef/provider/service/upstart.rb +1 -1
- data/lib/chef/provider/yum_repository.rb +1 -1
- data/lib/chef/provider/zypper_repository.rb +31 -11
- data/lib/chef/resource.rb +2 -0
- data/lib/chef/resource/archive_file.rb +28 -8
- data/lib/chef/resource/cron_access.rb +13 -5
- data/lib/chef/resource/cron_d.rb +2 -1
- data/lib/chef/resource/homebrew_cask.rb +3 -3
- data/lib/chef/resource/hostname.rb +19 -18
- data/lib/chef/resource/locale.rb +1 -1
- data/lib/chef/resource/lwrp_base.rb +7 -0
- data/lib/chef/resource/msu_package.rb +5 -0
- data/lib/chef/resource/ssh_known_hosts_entry.rb +1 -1
- data/lib/chef/resource/sudo.rb +2 -2
- data/lib/chef/resource/windows_feature_powershell.rb +6 -2
- data/lib/chef/resource/windows_font.rb +2 -1
- data/lib/chef/role.rb +2 -2
- data/lib/chef/shell.rb +32 -1
- data/lib/chef/shell/shell_session.rb +2 -0
- data/lib/chef/util/diff.rb +1 -1
- data/lib/chef/util/dsc/configuration_generator.rb +1 -1
- data/lib/chef/util/powershell/cmdlet.rb +1 -1
- data/lib/chef/version.rb +2 -2
- data/lib/chef/version_string.rb +1 -1
- data/lib/chef/win32/file.rb +2 -2
- data/spec/functional/knife/ssh_spec.rb +4 -4
- data/spec/functional/resource/aix_service_spec.rb +0 -1
- data/spec/functional/resource/aixinit_service_spec.rb +7 -8
- data/spec/functional/resource/apt_package_spec.rb +0 -1
- data/spec/functional/resource/bff_spec.rb +2 -2
- data/spec/functional/resource/cookbook_file_spec.rb +1 -1
- data/spec/functional/resource/cron_spec.rb +0 -1
- data/spec/functional/resource/dsc_resource_spec.rb +1 -1
- data/spec/functional/resource/insserv_spec.rb +4 -5
- data/spec/functional/resource/link_spec.rb +17 -17
- data/spec/functional/resource/msu_package_spec.rb +5 -2
- data/spec/functional/resource/rpm_spec.rb +2 -2
- data/spec/functional/resource/user/dscl_spec.rb +1 -1
- data/spec/functional/resource/user/mac_user_spec.rb +1 -1
- data/spec/functional/resource/windows_certificate_spec.rb +3 -3
- data/spec/functional/resource/windows_font_spec.rb +49 -0
- data/spec/functional/resource/windows_task_spec.rb +8 -8
- data/spec/functional/run_lock_spec.rb +2 -1
- data/spec/functional/shell_spec.rb +5 -5
- data/spec/functional/util/powershell/cmdlet_spec.rb +1 -1
- data/spec/functional/version_spec.rb +1 -1
- data/spec/functional/win32/service_manager_spec.rb +1 -1
- data/spec/integration/recipes/accumulator_spec.rb +1 -1
- data/spec/integration/recipes/lwrp_inline_resources_spec.rb +2 -2
- data/spec/integration/recipes/lwrp_spec.rb +1 -1
- data/spec/integration/recipes/notifies_spec.rb +1 -1
- data/spec/integration/recipes/notifying_block_spec.rb +1 -1
- data/spec/integration/recipes/recipe_dsl_spec.rb +1 -1
- data/spec/integration/recipes/resource_converge_if_changed_spec.rb +2 -0
- data/spec/integration/recipes/resource_load_spec.rb +1 -0
- data/spec/integration/recipes/unified_mode_spec.rb +1 -1
- data/spec/scripts/ssl-serve.rb +1 -1
- data/spec/spec_helper.rb +10 -8
- data/spec/support/platform_helpers.rb +12 -42
- data/spec/support/platforms/win32/spec_service.rb +1 -1
- data/spec/support/shared/functional/directory_resource.rb +1 -1
- data/spec/support/shared/functional/execute_resource.rb +1 -1
- data/spec/support/shared/functional/file_resource.rb +2 -2
- data/spec/support/shared/functional/win32_service.rb +1 -1
- data/spec/support/shared/functional/windows_script.rb +3 -3
- data/spec/support/shared/integration/knife_support.rb +2 -5
- data/spec/unit/application_spec.rb +7 -0
- data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +2 -4
- data/spec/unit/cookbook/gem_installer_spec.rb +2 -1
- data/spec/unit/data_bag_spec.rb +1 -1
- data/spec/unit/dsl/platform_introspection_spec.rb +1 -0
- data/spec/unit/environment_spec.rb +7 -7
- data/spec/unit/event_dispatch/dispatcher_spec.rb +3 -0
- data/spec/unit/knife/bootstrap_spec.rb +16 -16
- data/spec/unit/knife/cookbook_download_spec.rb +4 -4
- data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +1 -1
- data/spec/unit/knife/cookbook_upload_spec.rb +5 -6
- data/spec/unit/knife/core/hashed_command_loader_spec.rb +3 -3
- data/spec/unit/knife/ssh_spec.rb +2 -2
- data/spec/unit/knife/supermarket_share_spec.rb +5 -3
- data/spec/unit/lwrp_spec.rb +4 -4
- data/spec/unit/mixin/securable_spec.rb +0 -1
- data/spec/unit/mixin/user_context_spec.rb +1 -9
- data/spec/unit/property_spec.rb +6 -6
- data/spec/unit/provider/package/dnf/python_helper_spec.rb +1 -1
- data/spec/unit/provider/package/freebsd/pkgng_spec.rb +1 -1
- data/spec/unit/provider/package/powershell_spec.rb +95 -86
- data/spec/unit/provider/package/rubygems_spec.rb +5 -10
- data/spec/unit/provider/package/snap_spec.rb +1 -1
- data/spec/unit/provider/package/windows_spec.rb +30 -53
- data/spec/unit/provider/service/arch_service_spec.rb +3 -2
- data/spec/unit/provider/service/debian_service_spec.rb +1 -1
- data/spec/unit/provider/service/gentoo_service_spec.rb +7 -7
- data/spec/unit/provider/service/macosx_spec.rb +3 -3
- data/spec/unit/provider/service/redhat_spec.rb +2 -2
- data/spec/unit/provider/service/upstart_service_spec.rb +3 -3
- data/spec/unit/provider/service/windows_spec.rb +2 -6
- data/spec/unit/provider/systemd_unit_spec.rb +28 -24
- data/spec/unit/provider/zypper_repository_spec.rb +75 -25
- data/spec/unit/provider_spec.rb +1 -0
- data/spec/unit/resource/archive_file_spec.rb +11 -2
- data/spec/unit/resource/msu_package_spec.rb +4 -0
- data/spec/unit/resource/windows_dns_record_spec.rb +3 -3
- data/spec/unit/resource/windows_dns_zone_spec.rb +2 -2
- data/spec/unit/resource/windows_feature_powershell_spec.rb +30 -4
- data/spec/unit/resource/windows_package_spec.rb +1 -0
- data/spec/unit/resource/windows_task_spec.rb +1 -1
- data/spec/unit/resource/windows_uac_spec.rb +2 -2
- data/spec/unit/resource/yum_repository_spec.rb +21 -21
- data/spec/unit/resource_spec.rb +1 -1
- data/spec/unit/role_spec.rb +11 -11
- data/spec/unit/run_context/cookbook_compiler_spec.rb +1 -1
- data/spec/unit/util/threaded_job_queue_spec.rb +9 -0
- data/spec/unit/win32/security_spec.rb +4 -3
- metadata +64 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a22e0b75c33a802a933157f8ed31d6f9efbec9d8d58c8b5592c89acf1ca98fb7
|
4
|
+
data.tar.gz: d9cc14bc958c6c452b5cd55a16418f2bc73bfb51a5b3f2343fca4f08c190d521
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95c743570d0c5951c913562b1fbf63fdf290677736bbbb419cbee98b52865b2c64aacec30f6b3dcbca998a74bf8591e0bfc1750620a659f16f05cc12febbb050
|
7
|
+
data.tar.gz: b922916bd0d1c2857e763db8ca555fc44e4f5f1ba7df70ecfb3aa1fa0934cd3d04ff1a8d72d78d86e4459843d978fb925d79459d09e1da431d04f604b71fa838
|
data/Gemfile
CHANGED
@@ -9,12 +9,12 @@ gem "chef", path: "."
|
|
9
9
|
|
10
10
|
gem "ohai", git: "https://github.com/chef/ohai.git", branch: "15-stable"
|
11
11
|
|
12
|
-
gem "chef-utils", path: File.expand_path("
|
13
|
-
gem "chef-config", path: File.expand_path("
|
12
|
+
gem "chef-utils", path: File.expand_path("chef-utils", __dir__) if File.exist?(File.expand_path("chef-utils", __dir__))
|
13
|
+
gem "chef-config", path: File.expand_path("chef-config", __dir__) if File.exist?(File.expand_path("chef-config", __dir__))
|
14
14
|
|
15
|
-
if File.exist?(File.expand_path("
|
15
|
+
if File.exist?(File.expand_path("chef-bin", __dir__))
|
16
16
|
# bundling in a git checkout
|
17
|
-
gem "chef-bin", path: File.expand_path("
|
17
|
+
gem "chef-bin", path: File.expand_path("chef-bin", __dir__)
|
18
18
|
else
|
19
19
|
# bundling in omnibus
|
20
20
|
gem "chef-bin" # rubocop:disable Bundler/DuplicatedGem
|
@@ -22,24 +22,21 @@ end
|
|
22
22
|
|
23
23
|
gem "cheffish", "~> 14"
|
24
24
|
|
25
|
-
|
26
|
-
gem "chef-telemetry", "=1.0.3"
|
25
|
+
gem "chef-telemetry", ">=1.0.8" # 1.0.8 removes the http dep
|
27
26
|
|
28
27
|
group(:omnibus_package) do
|
29
28
|
gem "appbundler"
|
30
29
|
gem "rb-readline"
|
31
30
|
gem "inspec-core", "~> 4.18"
|
32
|
-
gem "inspec-core-bin", "~> 4.
|
31
|
+
gem "inspec-core-bin", "~> 4.24" # need to provide the binaries for inspec
|
33
32
|
gem "chef-vault"
|
34
|
-
gem "ed25519" # ed25519 ssh key support done here as it's a native gem we can't put in train
|
35
|
-
gem "bcrypt_pbkdf", ">= 1.1.0.rc1" # ed25519 ssh key support done here as it's a native gem we can't put in train
|
36
33
|
end
|
37
34
|
|
38
35
|
group(:omnibus_package, :pry) do
|
39
36
|
gem "pry"
|
40
37
|
gem "pry-byebug"
|
41
38
|
gem "pry-remote"
|
42
|
-
gem "pry-stack_explorer"
|
39
|
+
gem "pry-stack_explorer", "~> 0.4.0" # pin to allow Ruby 2.5
|
43
40
|
end
|
44
41
|
|
45
42
|
group(:docgen) do
|
@@ -66,14 +63,13 @@ group(:development, :test) do
|
|
66
63
|
gem "rspec-core", "~> 3.5"
|
67
64
|
gem "rspec-mocks", "~> 3.5"
|
68
65
|
gem "rspec-expectations", "~> 3.5"
|
69
|
-
gem "rspec_junit_formatter", "~> 0.
|
66
|
+
gem "rspec_junit_formatter", "~> 0.4.0"
|
70
67
|
gem "webmock"
|
71
68
|
gem "fauxhai-ng" # for chef-utils gem
|
72
69
|
end
|
73
70
|
|
74
71
|
group(:chefstyle) do
|
75
|
-
# for
|
76
|
-
gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "master"
|
72
|
+
gem "chefstyle", "1.2.1" # pinned so we don't have to fixup 2 branches for new rules
|
77
73
|
end
|
78
74
|
|
79
75
|
instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]
|
@@ -86,6 +82,9 @@ eval_gemfile("./Gemfile.local") if File.exist?("./Gemfile.local")
|
|
86
82
|
# For FFI to call into PowerShell we need the binaries and assemblies located
|
87
83
|
# in the Ruby bindir.
|
88
84
|
# The Powershell DLL source lives here: https://github.com/chef/chef-powershell-shim
|
85
|
+
# Every merge into that repo triggers a Habitat build and promotion. Running
|
86
|
+
# the rake :update_chef_exec_dll task in this (chef/chef) repo will pull down
|
87
|
+
# the built packages and copy the binaries to distro/ruby_bin_folder.
|
89
88
|
#
|
90
89
|
# We copy (and overwrite) these files every time "bundle <exec|install>" is
|
91
90
|
# executed, just in case they have changed.
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ Chef Infra is a configuration management tool designed to bring automation to yo
|
|
18
18
|
|
19
19
|
### Want to try Chef Infra?
|
20
20
|
|
21
|
-
For Chef Infra usage, please refer to
|
21
|
+
For Chef Infra usage, please refer to [Learn Chef](https://learn.chef.io/), our self-paced, entirely free learning platform. Learn Chef also includes module-based training for Chef Infra, as well as Chef Automate, Chef Habitat, and Chef InSpec.
|
22
22
|
|
23
23
|
Other useful resources for Chef Infra users:
|
24
24
|
|
@@ -26,7 +26,7 @@ Other useful resources for Chef Infra users:
|
|
26
26
|
- Source: <https://github.com/chef/chef/tree/master>
|
27
27
|
- Tickets/Issues: <https://github.com/chef/chef/issues>
|
28
28
|
- Slack: [Chef Community Slack](https://community-slack.chef.io/)
|
29
|
-
- Mailing list: <https://discourse.chef.io>
|
29
|
+
- Mailing list/Forum: <https://discourse.chef.io>
|
30
30
|
|
31
31
|
## Reporting Issues
|
32
32
|
|
@@ -46,7 +46,7 @@ We'd love to have your help developing Chef Infra. See our [Contributing Documen
|
|
46
46
|
|
47
47
|
## License and Copyright
|
48
48
|
|
49
|
-
Copyright 2008-
|
49
|
+
Copyright 2008-2020, Chef Software, Inc.
|
50
50
|
|
51
51
|
```
|
52
52
|
Licensed under the Apache License, Version 2.0 (the "License");
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
3
|
# Author:: Daniel DeLeo (<dan@chef.io>)
|
4
|
-
# Copyright:: Copyright
|
4
|
+
# Copyright:: Copyright, Chef Software Inc.
|
5
5
|
# License:: Apache License, Version 2.0
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -17,16 +17,20 @@
|
|
17
17
|
# limitations under the License.
|
18
18
|
#
|
19
19
|
|
20
|
+
# we need this to resolve files required by lib/chef/dist
|
21
|
+
$LOAD_PATH.unshift(File.expand_path("chef-config/lib", __dir__))
|
22
|
+
|
20
23
|
begin
|
21
24
|
require_relative "tasks/rspec"
|
22
25
|
require_relative "tasks/dependencies"
|
23
|
-
require_relative "tasks/announce"
|
24
26
|
require_relative "tasks/docs"
|
25
|
-
require_relative "lib/chef/dist"
|
27
|
+
require_relative "lib/chef/dist" unless defined?(Chef::Dist)
|
26
28
|
rescue LoadError => e
|
27
29
|
puts "Skipping missing rake dep: #{e}"
|
28
30
|
end
|
29
31
|
|
32
|
+
require "bundler/gem_helper"
|
33
|
+
|
30
34
|
ENV["CHEF_LICENSE"] = "accept-no-persist"
|
31
35
|
|
32
36
|
# hack the chef-config install to run before the traditional install task
|
@@ -38,6 +42,7 @@ task :super_install do
|
|
38
42
|
end
|
39
43
|
|
40
44
|
# Templating the powershell extensions so we can inject distro constants
|
45
|
+
require "erb"
|
41
46
|
template_file = ::File.join(::File.dirname(__FILE__), "distro", "templates", "powershell", "chef", "chef.psm1.erb")
|
42
47
|
psm1_path = ::File.join(::File.dirname(__FILE__), "distro", "powershell", "chef")
|
43
48
|
FileUtils.mkdir_p psm1_path
|
@@ -55,8 +60,9 @@ Bundler::GemHelper.install_tasks name: gemspec
|
|
55
60
|
# this gets appended to the normal bundler install helper
|
56
61
|
task :install do
|
57
62
|
chef_bin_path = ::File.join(::File.dirname(__FILE__), "chef-bin")
|
58
|
-
Dir.chdir(chef_bin_path)
|
59
|
-
|
63
|
+
Dir.chdir(chef_bin_path) do
|
64
|
+
sh("rake install:force")
|
65
|
+
end
|
60
66
|
end
|
61
67
|
|
62
68
|
task :pedant, :chef_zero_spec
|
@@ -82,15 +88,3 @@ begin
|
|
82
88
|
rescue LoadError
|
83
89
|
puts "chefstyle/rubocop is not available. bundle install first to make sure all dependencies are installed."
|
84
90
|
end
|
85
|
-
|
86
|
-
begin
|
87
|
-
require "yard"
|
88
|
-
DOC_FILES = [ "spec/tiny_server.rb", "lib/**/*.rb" ].freeze
|
89
|
-
|
90
|
-
YARD::Rake::YardocTask.new(:docs) do |t|
|
91
|
-
t.files = DOC_FILES
|
92
|
-
t.options = ["--format", "html"]
|
93
|
-
end
|
94
|
-
rescue LoadError
|
95
|
-
puts "yard is not available. bundle install first to make sure all dependencies are installed."
|
96
|
-
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
gemspec = eval(IO.read(File.expand_path("
|
1
|
+
gemspec = eval(IO.read(File.expand_path("chef.gemspec", __dir__)))
|
2
2
|
|
3
3
|
gemspec.platform = Gem::Platform.new(%w{universal mingw32})
|
4
4
|
|
@@ -10,12 +10,12 @@ gemspec.add_dependency "win32-event", "~> 0.6.1"
|
|
10
10
|
gemspec.add_dependency "win32-eventlog", "0.6.3"
|
11
11
|
gemspec.add_dependency "win32-mmap", "~> 0.4.1"
|
12
12
|
gemspec.add_dependency "win32-mutex", "~> 0.4.2"
|
13
|
-
gemspec.add_dependency "win32-process", "~> 0.
|
13
|
+
gemspec.add_dependency "win32-process", "~> 0.9"
|
14
14
|
gemspec.add_dependency "win32-service", ">= 2.1.5", "< 3.0"
|
15
15
|
gemspec.add_dependency "wmi-lite", "~> 1.0"
|
16
16
|
gemspec.add_dependency "win32-taskscheduler", "~> 2.0"
|
17
|
-
gemspec.add_dependency "iso8601", "
|
18
|
-
gemspec.add_dependency "win32-certstore", "~> 0.
|
17
|
+
gemspec.add_dependency "iso8601", ">= 0.12.1", "< 0.14" # validate 0.14 when it comes out
|
18
|
+
gemspec.add_dependency "win32-certstore", "~> 0.5.0" # 0.5+ required for specifying user vs. system store
|
19
19
|
gemspec.extensions << "ext/win32-eventlog/Rakefile"
|
20
20
|
gemspec.files += Dir.glob("{distro,ext}/**/*")
|
21
21
|
|
data/chef.gemspec
CHANGED
@@ -1,4 +1,13 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__) + "/lib")
|
2
|
+
vs_path = File.expand_path("chef-utils/lib/chef-utils/version_string.rb", __dir__)
|
3
|
+
|
4
|
+
if File.exist?(vs_path)
|
5
|
+
# this is the moral equivalent of a require_relative since bundler makes require_relative here fail hard
|
6
|
+
eval(IO.read(vs_path))
|
7
|
+
else
|
8
|
+
# if the path doesn't exist then we're just in the wild gem and not in the git repo
|
9
|
+
require "chef-utils/version_string"
|
10
|
+
end
|
2
11
|
require "chef/version"
|
3
12
|
|
4
13
|
Gem::Specification.new do |s|
|
@@ -20,7 +29,7 @@ Gem::Specification.new do |s|
|
|
20
29
|
s.add_dependency "train-core", "~> 3.2", ">= 3.2.28" # 3.2.28 fixes sudo prompts. See https://github.com/chef/chef/pull/9635
|
21
30
|
s.add_dependency "train-winrm", ">= 0.2.5"
|
22
31
|
|
23
|
-
s.add_dependency "license-acceptance", "
|
32
|
+
s.add_dependency "license-acceptance", ">= 1.0.5", "< 3"
|
24
33
|
s.add_dependency "mixlib-cli", ">= 2.1.1", "< 3.0"
|
25
34
|
s.add_dependency "mixlib-log", ">= 2.0.3", "< 4.0"
|
26
35
|
s.add_dependency "mixlib-authentication", ">= 2.1", "< 4"
|
@@ -30,23 +39,23 @@ Gem::Specification.new do |s|
|
|
30
39
|
|
31
40
|
s.add_dependency "ffi", "~> 1.9", ">= 1.9.25"
|
32
41
|
s.add_dependency "ffi-yajl", "~> 2.2"
|
33
|
-
s.add_dependency "net-ssh", ">= 4.2", "<
|
42
|
+
s.add_dependency "net-ssh", ">= 4.2", "< 7"
|
34
43
|
s.add_dependency "net-ssh-multi", "~> 1.2", ">= 1.2.1"
|
35
|
-
s.add_dependency "net-sftp", "
|
44
|
+
s.add_dependency "net-sftp", ">= 2.1.2", "< 4.0"
|
36
45
|
s.add_dependency "ed25519", "~> 1.2" # ed25519 ssh key support
|
37
46
|
s.add_dependency "bcrypt_pbkdf", "~> 1.0" # ed25519 ssh key support
|
38
|
-
s.add_dependency "highline", ">= 1.6.9", "<
|
47
|
+
s.add_dependency "highline", ">= 1.6.9", "< 3"
|
39
48
|
s.add_dependency "tty-screen", "~> 0.6" # knife list
|
40
49
|
s.add_dependency "erubis", "~> 2.7"
|
41
|
-
s.add_dependency "diff-lcs", "
|
42
|
-
s.add_dependency "ffi-libarchive"
|
50
|
+
s.add_dependency "diff-lcs", ">= 1.2.4", "< 1.4.0" # 1.4 breaks output
|
51
|
+
s.add_dependency "ffi-libarchive", "~> 1.0", ">= 1.0.3"
|
43
52
|
s.add_dependency "chef-zero", ">= 14.0.11"
|
44
53
|
|
45
54
|
s.add_dependency "plist", "~> 3.2"
|
46
55
|
s.add_dependency "iniparse", "~> 1.4"
|
47
56
|
s.add_dependency "addressable"
|
48
57
|
s.add_dependency "syslog-logger", "~> 1.6"
|
49
|
-
s.add_dependency "uuidtools", "
|
58
|
+
s.add_dependency "uuidtools", ">= 2.1.5", "< 3.0"
|
50
59
|
|
51
60
|
s.add_dependency "proxifier", "~> 1.0"
|
52
61
|
|
@@ -62,4 +71,13 @@ Gem::Specification.new do |s|
|
|
62
71
|
Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } +
|
63
72
|
Dir.glob("*.gemspec") +
|
64
73
|
Dir.glob("tasks/rspec.rb")
|
74
|
+
|
75
|
+
s.metadata = {
|
76
|
+
"bug_tracker_uri" => "https://github.com/chef/chef/issues",
|
77
|
+
"changelog_uri" => "https://github.com/chef/chef/blob/master/CHANGELOG.md",
|
78
|
+
"documentation_uri" => "https://docs.chef.io/",
|
79
|
+
"homepage_uri" => "https://www.chef.io",
|
80
|
+
"mailing_list_uri" => "https://discourse.chef.io/",
|
81
|
+
"source_code_uri" => "https://github.com/chef/chef/",
|
82
|
+
}
|
65
83
|
end
|
@@ -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)
|
@@ -72,14 +72,14 @@ class Chef
|
|
72
72
|
|
73
73
|
def assert_destination_writable!
|
74
74
|
abs_path = File.expand_path(destination)
|
75
|
-
unless File.
|
75
|
+
unless File.exist?(File.dirname(abs_path))
|
76
76
|
begin
|
77
77
|
FileUtils.mkdir_p(File.dirname(abs_path))
|
78
78
|
rescue Errno::EACCES
|
79
79
|
raise Chef::Exceptions::CannotWritePrivateKey, "I can't create the configuration directory at #{File.dirname(abs_path)} - check permissions?"
|
80
80
|
end
|
81
81
|
end
|
82
|
-
if (File.
|
82
|
+
if (File.exist?(abs_path) && !File.writable?(abs_path)) || !File.writable?(File.dirname(abs_path))
|
83
83
|
raise Chef::Exceptions::CannotWritePrivateKey, "I can't write your private key to #{abs_path} - check permissions?"
|
84
84
|
end
|
85
85
|
end
|
@@ -76,7 +76,7 @@ class Chef
|
|
76
76
|
|
77
77
|
# Write out .uploaded-cookbook-version.json
|
78
78
|
# cookbook_file_path = File.join(file_path, cookbook_name) <- this should be the same as self.file_path
|
79
|
-
unless File.
|
79
|
+
unless File.exist?(file_path)
|
80
80
|
FileUtils.mkdir_p(file_path)
|
81
81
|
end
|
82
82
|
uploaded_cookbook_version_path = File.join(file_path, Chef::Cookbook::CookbookVersionLoader::UPLOADED_COOKBOOK_VERSION_FILE)
|
@@ -132,7 +132,7 @@ class Chef
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def can_upload?
|
135
|
-
File.
|
135
|
+
File.exist?(uploaded_cookbook_version_path) || children.size > 0
|
136
136
|
end
|
137
137
|
|
138
138
|
protected
|
@@ -161,7 +161,7 @@ class Chef
|
|
161
161
|
# members.json and org.json may be found.
|
162
162
|
#
|
163
163
|
def root_dir
|
164
|
-
existing_paths = root_paths.select { |path| File.
|
164
|
+
existing_paths = root_paths.select { |path| File.exist?(path) }
|
165
165
|
if existing_paths.size > 0
|
166
166
|
MultiplexedDir.new(existing_paths.map do |path|
|
167
167
|
dir = FileSystemEntry.new(name, parent, path)
|
@@ -184,7 +184,7 @@ class Chef
|
|
184
184
|
return root_dir.child(name)
|
185
185
|
end
|
186
186
|
|
187
|
-
paths = (child_paths[name] || []).select { |path| File.
|
187
|
+
paths = (child_paths[name] || []).select { |path| File.exist?(path) }
|
188
188
|
if paths.size == 0
|
189
189
|
return NonexistentFSObject.new(name, self)
|
190
190
|
end
|
@@ -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
|
data/lib/chef/data_bag.rb
CHANGED
@@ -94,7 +94,7 @@ class Chef
|
|
94
94
|
names = []
|
95
95
|
paths.each do |path|
|
96
96
|
unless File.directory?(path)
|
97
|
-
raise Chef::Exceptions::InvalidDataBagPath, "Data bag path '#{path}'
|
97
|
+
raise Chef::Exceptions::InvalidDataBagPath, "Data bag path '#{path}' not found. Please create this directory."
|
98
98
|
end
|
99
99
|
|
100
100
|
names += Dir.glob(File.join(
|
@@ -122,7 +122,7 @@ class Chef
|
|
122
122
|
data_bag = {}
|
123
123
|
paths.each do |path|
|
124
124
|
unless File.directory?(path)
|
125
|
-
raise Chef::Exceptions::InvalidDataBagPath, "Data bag path '#{path}'
|
125
|
+
raise Chef::Exceptions::InvalidDataBagPath, "Data bag path '#{path}' not found. Please create this directory."
|
126
126
|
end
|
127
127
|
|
128
128
|
Dir.glob(File.join(Chef::Util::PathHelper.escape_glob_dir(path, name.to_s), "*.json")).inject({}) do |bag, f|
|