chef 12.18.31 → 12.19.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -4
- data/README.md +12 -13
- data/VERSION +1 -1
- data/acceptance/Gemfile +4 -4
- data/acceptance/Gemfile.lock +70 -69
- data/chef-universal-mingw32.gemspec +2 -3
- data/chef.gemspec +6 -6
- data/lib/chef/api_client.rb +8 -10
- data/lib/chef/api_client_v1.rb +9 -11
- data/lib/chef/application/apply.rb +8 -10
- data/lib/chef/application/client.rb +1 -1
- data/lib/chef/application/exit_code.rb +3 -5
- data/lib/chef/application/knife.rb +2 -2
- data/lib/chef/application/windows_service.rb +29 -30
- data/lib/chef/application/windows_service_manager.rb +1 -1
- data/lib/chef/audit/audit_event_proxy.rb +2 -2
- data/lib/chef/audit/control_group_data.rb +1 -1
- data/lib/chef/chef_class.rb +1 -0
- data/lib/chef/chef_fs/chef_fs_data_store.rb +5 -7
- data/lib/chef/chef_fs/command_line.rb +15 -16
- data/lib/chef/chef_fs/data_handler/client_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/container_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/environment_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/group_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/node_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/organization_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/role_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/user_data_handler.rb +1 -1
- data/lib/chef/chef_fs/file_pattern.rb +2 -2
- data/lib/chef/chef_fs/file_system.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +5 -6
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +8 -10
- data/lib/chef/chef_fs/file_system/chef_server/data_bags_dir.rb +8 -10
- data/lib/chef/chef_fs/file_system/chef_server/nodes_dir.rb +10 -12
- data/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb +28 -30
- data/lib/chef/chef_fs/file_system/chef_server/policy_group_entry.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +27 -29
- data/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +18 -24
- data/lib/chef/chef_fs/file_system/memory/memory_file.rb +1 -1
- data/lib/chef/chef_fs/file_system/multiplexed_dir.rb +10 -12
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +10 -12
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +9 -13
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +2 -0
- data/lib/chef/chef_fs/file_system/repository/cookbooks_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/nodes_dir.rb +3 -0
- data/lib/chef/chef_fs/parallelizer.rb +9 -11
- data/lib/chef/cookbook/cookbook_version_loader.rb +25 -31
- data/lib/chef/cookbook/metadata.rb +26 -26
- data/lib/chef/cookbook/syntax_check.rb +1 -1
- data/lib/chef/cookbook_version.rb +3 -3
- data/lib/chef/data_bag.rb +1 -1
- data/lib/chef/data_bag_item.rb +3 -3
- data/lib/chef/data_collector.rb +3 -4
- data/lib/chef/decorator.rb +1 -1
- data/lib/chef/deprecated.rb +30 -0
- data/lib/chef/dsl/audit.rb +2 -2
- data/lib/chef/dsl/declare_resource.rb +1 -1
- data/lib/chef/dsl/platform_introspection.rb +29 -31
- data/lib/chef/dsl/reboot_pending.rb +1 -1
- data/lib/chef/dsl/resources.rb +6 -8
- data/lib/chef/encrypted_data_bag_item.rb +2 -2
- data/lib/chef/environment.rb +9 -11
- data/lib/chef/event_loggers/windows_eventlog.rb +1 -1
- data/lib/chef/exceptions.rb +4 -1
- data/lib/chef/file_access_control/unix.rb +14 -14
- data/lib/chef/file_access_control/windows.rb +1 -1
- data/lib/chef/formatters/error_inspectors/api_error_formatting.rb +4 -5
- data/lib/chef/formatters/error_mapper.rb +6 -6
- data/lib/chef/http/api_versions.rb +50 -0
- data/lib/chef/http/validate_content_length.rb +2 -2
- data/lib/chef/json_compat.rb +6 -10
- data/lib/chef/key.rb +5 -5
- data/lib/chef/knife.rb +4 -4
- data/lib/chef/knife/cookbook_site_install.rb +2 -2
- data/lib/chef/knife/core/cookbook_scm_repo.rb +2 -2
- data/lib/chef/knife/core/gem_glob_loader.rb +1 -1
- data/lib/chef/knife/core/status_presenter.rb +1 -1
- data/lib/chef/knife/core/ui.rb +19 -25
- data/lib/chef/knife/data_bag_secret_options.rb +1 -1
- data/lib/chef/knife/deps.rb +32 -34
- data/lib/chef/knife/help.rb +1 -1
- data/lib/chef/knife/list.rb +1 -1
- data/lib/chef/knife/search.rb +2 -2
- data/lib/chef/knife/ssh.rb +37 -27
- data/lib/chef/knife/ssl_check.rb +1 -1
- data/lib/chef/knife/user_delete.rb +1 -1
- data/lib/chef/mash.rb +1 -1
- data/lib/chef/mixin/command.rb +2 -2
- data/lib/chef/mixin/create_path.rb +3 -5
- data/lib/chef/mixin/from_file.rb +2 -2
- data/lib/chef/mixin/get_source_from_package.rb +2 -2
- data/lib/chef/mixin/notifying_block.rb +7 -9
- data/lib/chef/mixin/params_validate.rb +3 -3
- data/lib/chef/mixin/securable.rb +1 -1
- data/lib/chef/mixin/shell_out.rb +23 -3
- data/lib/chef/mixin/unformatter.rb +2 -2
- data/lib/chef/mixin/uris.rb +4 -6
- data/lib/chef/mixin/versioned_api.rb +69 -0
- data/lib/chef/mixin/which.rb +25 -8
- data/lib/chef/mixin/windows_architecture_helper.rb +2 -2
- data/lib/chef/mixin/xml_escape.rb +3 -5
- data/lib/chef/monkey_patches/webrick-utils.rb +1 -1
- data/lib/chef/node.rb +8 -8
- data/lib/chef/node/attribute.rb +4 -4
- data/lib/chef/node/common_api.rb +5 -7
- data/lib/chef/org.rb +10 -12
- data/lib/chef/platform/provider_mapping.rb +7 -7
- data/lib/chef/platform/query_helpers.rb +1 -1
- data/lib/chef/policy_builder/policyfile.rb +1 -0
- data/lib/chef/property.rb +31 -0
- data/lib/chef/provider/batch.rb +1 -1
- data/lib/chef/provider/breakpoint.rb +1 -1
- data/lib/chef/provider/cookbook_file.rb +3 -3
- data/lib/chef/provider/cron.rb +38 -38
- data/lib/chef/provider/deploy.rb +81 -81
- data/lib/chef/provider/deploy/revision.rb +3 -5
- data/lib/chef/provider/directory.rb +32 -32
- data/lib/chef/provider/dsc_resource.rb +22 -6
- data/lib/chef/provider/env.rb +28 -28
- data/lib/chef/provider/env/windows.rb +1 -1
- data/lib/chef/provider/erl_call.rb +13 -13
- data/lib/chef/provider/execute.rb +5 -2
- data/lib/chef/provider/file.rb +49 -51
- data/lib/chef/provider/git.rb +55 -55
- data/lib/chef/provider/http_request.rb +36 -36
- data/lib/chef/provider/launchd.rb +2 -2
- data/lib/chef/provider/link.rb +50 -50
- data/lib/chef/provider/log.rb +2 -2
- data/lib/chef/provider/mdadm.rb +25 -25
- data/lib/chef/provider/mount/aix.rb +2 -2
- data/lib/chef/provider/mount/mount.rb +2 -2
- data/lib/chef/provider/ohai.rb +1 -1
- data/lib/chef/provider/osx_profile.rb +23 -23
- data/lib/chef/provider/package.rb +74 -56
- data/lib/chef/provider/package/aix.rb +55 -52
- data/lib/chef/provider/package/apt.rb +15 -13
- data/lib/chef/provider/package/cab.rb +49 -20
- data/lib/chef/provider/package/chocolatey.rb +9 -10
- data/lib/chef/provider/package/dnf.rb +20 -18
- data/lib/chef/provider/package/dnf/dnf_helper.py +1 -1
- data/lib/chef/provider/package/dnf/python_helper.rb +63 -26
- data/lib/chef/provider/package/dnf/version.rb +1 -1
- data/lib/chef/provider/package/dpkg.rb +8 -9
- data/lib/chef/provider/package/easy_install.rb +22 -22
- data/lib/chef/provider/package/freebsd/base.rb +10 -10
- data/lib/chef/provider/package/freebsd/pkg.rb +15 -15
- data/lib/chef/provider/package/freebsd/pkgng.rb +13 -15
- data/lib/chef/provider/package/freebsd/port.rb +7 -7
- data/lib/chef/provider/package/homebrew.rb +11 -10
- data/lib/chef/provider/package/ips.rb +18 -23
- data/lib/chef/provider/package/macports.rb +23 -23
- data/lib/chef/provider/package/msu.rb +11 -11
- data/lib/chef/provider/package/openbsd.rb +25 -22
- data/lib/chef/provider/package/pacman.rb +16 -16
- data/lib/chef/provider/package/paludis.rb +26 -27
- data/lib/chef/provider/package/portage.rb +22 -22
- data/lib/chef/provider/package/powershell.rb +17 -17
- data/lib/chef/provider/package/rpm.rb +25 -25
- data/lib/chef/provider/package/rubygems.rb +60 -60
- data/lib/chef/provider/package/smartos.rb +16 -16
- data/lib/chef/provider/package/solaris.rb +44 -44
- data/lib/chef/provider/package/windows.rb +3 -3
- data/lib/chef/provider/package/windows/exe.rb +6 -6
- data/lib/chef/provider/package/windows/msi.rb +6 -6
- data/lib/chef/provider/package/yum.rb +318 -268
- data/lib/chef/provider/package/yum/rpm_utils.rb +34 -34
- data/lib/chef/provider/package/yum/yum_cache.rb +12 -12
- data/lib/chef/provider/package/zypper.rb +11 -11
- data/lib/chef/provider/powershell_script.rb +15 -7
- data/lib/chef/provider/reboot.rb +10 -10
- data/lib/chef/provider/registry_key.rb +39 -39
- data/lib/chef/provider/remote_directory.rb +3 -3
- data/lib/chef/provider/remote_file.rb +3 -3
- data/lib/chef/provider/route.rb +1 -1
- data/lib/chef/provider/ruby_block.rb +3 -3
- data/lib/chef/provider/script.rb +42 -6
- data/lib/chef/provider/service.rb +49 -49
- data/lib/chef/provider/service/solaris.rb +1 -1
- data/lib/chef/provider/service/systemd.rb +1 -1
- data/lib/chef/provider/subversion.rb +39 -39
- data/lib/chef/provider/systemd_unit.rb +2 -0
- data/lib/chef/provider/template.rb +3 -3
- data/lib/chef/provider/user.rb +42 -42
- data/lib/chef/provider/whyrun_safe_ruby_block.rb +4 -4
- data/lib/chef/resource.rb +27 -16
- data/lib/chef/resource/apt_repository.rb +0 -1
- data/lib/chef/resource/chef_gem.rb +1 -1
- data/lib/chef/resource/dnf_package.rb +6 -3
- data/lib/chef/resource/dsc_resource.rb +9 -1
- data/lib/chef/resource/execute.rb +70 -6
- data/lib/chef/resource/file/verification/systemd_unit.rb +67 -0
- data/lib/chef/resource/freebsd_package.rb +1 -1
- data/lib/chef/resource/gem_package.rb +1 -1
- data/lib/chef/resource/launchd.rb +13 -1
- data/lib/chef/resource/package.rb +2 -2
- data/lib/chef/resource/registry_key.rb +1 -1
- data/lib/chef/resource/yum_package.rb +12 -3
- data/lib/chef/resource/yum_repository.rb +0 -1
- data/lib/chef/resource_collection/resource_collection_serialization.rb +3 -3
- data/lib/chef/resource_collection/resource_set.rb +2 -2
- data/lib/chef/resource_reporter.rb +1 -1
- data/lib/chef/run_context.rb +3 -3
- data/lib/chef/run_list/run_list_item.rb +1 -1
- data/lib/chef/run_list/versioned_recipe_list.rb +6 -6
- data/lib/chef/server_api.rb +2 -0
- data/lib/chef/server_api_versions.rb +40 -0
- data/lib/chef/shell.rb +1 -1
- data/lib/chef/shell/ext.rb +3 -3
- data/lib/chef/shell/shell_session.rb +1 -1
- data/lib/chef/user.rb +9 -11
- data/lib/chef/user_v1.rb +9 -11
- data/lib/chef/util/diff.rb +1 -1
- data/lib/chef/util/dsc/lcm_output_parser.rb +1 -1
- data/lib/chef/util/selinux.rb +1 -1
- data/lib/chef/util/windows/net_group.rb +18 -30
- data/lib/chef/util/windows/net_use.rb +7 -11
- data/lib/chef/util/windows/net_user.rb +11 -17
- data/lib/chef/util/windows/volume.rb +9 -15
- data/lib/chef/version.rb +1 -1
- data/lib/chef/version_class.rb +1 -1
- data/lib/chef/win32/api.rb +4 -6
- data/lib/chef/win32/api/file.rb +25 -31
- data/lib/chef/win32/api/installer.rb +2 -2
- data/lib/chef/win32/file.rb +4 -6
- data/lib/chef/win32/registry.rb +9 -9
- data/lib/chef/win32/security.rb +2 -2
- data/lib/chef/win32/security/acl.rb +2 -2
- data/lib/chef/win32/unicode.rb +2 -2
- data/lib/chef/win32/version.rb +1 -1
- data/spec/data/prefer_metadata_json/metadata.json +51 -0
- data/spec/data/prefer_metadata_json/metadata.rb +6 -0
- data/spec/data/prefer_metadata_json/recipes/default.rb +0 -0
- data/spec/functional/knife/ssh_spec.rb +5 -5
- data/spec/functional/resource/batch_spec.rb +5 -1
- data/spec/functional/resource/dsc_script_spec.rb +2 -4
- data/spec/functional/resource/execute_spec.rb +17 -0
- data/spec/functional/resource/user/dscl_spec.rb +2 -4
- data/spec/integration/client/client_spec.rb +33 -0
- data/spec/integration/recipes/recipe_dsl_spec.rb +58 -58
- data/spec/spec_helper.rb +4 -0
- data/spec/support/chef_helpers.rb +5 -7
- data/spec/support/platform_helpers.rb +6 -0
- data/spec/support/platforms/prof/gc.rb +4 -6
- data/spec/support/shared/context/client.rb +1 -1
- data/spec/support/shared/functional/execute_resource.rb +150 -0
- data/spec/support/shared/functional/windows_script.rb +74 -4
- data/spec/support/shared/unit/execute_resource.rb +37 -0
- data/spec/support/shared/unit/provider/file.rb +10 -0
- data/spec/unit/cookbook/cookbook_version_loader_spec.rb +9 -0
- data/spec/unit/cookbook/syntax_check_spec.rb +8 -2
- data/spec/unit/http/api_versions_spec.rb +69 -0
- data/spec/unit/knife/ssh_spec.rb +34 -36
- data/spec/unit/mixin/versioned_api_spec.rb +107 -0
- data/spec/unit/mixin/which.rb +160 -0
- data/spec/unit/platform_spec.rb +28 -1
- data/spec/unit/provider/deploy_spec.rb +1 -1
- data/spec/unit/provider/directory_spec.rb +10 -0
- data/spec/unit/provider/dsc_resource_spec.rb +175 -0
- data/spec/unit/provider/execute_spec.rb +0 -1
- data/spec/unit/provider/launchd_spec.rb +2 -2
- data/spec/unit/provider/package/aix_spec.rb +22 -22
- data/spec/unit/provider/package/apt_spec.rb +27 -27
- data/spec/unit/provider/package/cab_spec.rb +59 -5
- data/spec/unit/provider/package/dnf/python_helper_spec.rb +29 -0
- data/spec/unit/provider/package/dpkg_spec.rb +16 -16
- data/spec/unit/provider/package/easy_install_spec.rb +18 -18
- data/spec/unit/provider/package/freebsd/pkg_spec.rb +15 -15
- data/spec/unit/provider/package/freebsd/pkgng_spec.rb +9 -9
- data/spec/unit/provider/package/freebsd/port_spec.rb +9 -9
- data/spec/unit/provider/package/homebrew_spec.rb +9 -9
- data/spec/unit/provider/package/ips_spec.rb +37 -31
- data/spec/unit/provider/package/macports_spec.rb +10 -10
- data/spec/unit/provider/package/openbsd_spec.rb +10 -10
- data/spec/unit/provider/package/pacman_spec.rb +6 -6
- data/spec/unit/provider/package/paludis_spec.rb +7 -7
- data/spec/unit/provider/package/portage_spec.rb +6 -7
- data/spec/unit/provider/package/rpm_spec.rb +23 -23
- data/spec/unit/provider/package/rubygems_spec.rb +38 -38
- data/spec/unit/provider/package/solaris_spec.rb +15 -15
- data/spec/unit/provider/package/windows_spec.rb +2 -1
- data/spec/unit/provider/package/yum_spec.rb +51 -43
- data/spec/unit/provider/package/zypper_spec.rb +34 -34
- data/spec/unit/provider/package_spec.rb +8 -0
- data/spec/unit/provider/remote_file/sftp_spec.rb +3 -3
- data/spec/unit/provider/route_spec.rb +7 -1
- data/spec/unit/provider/script_spec.rb +49 -6
- data/spec/unit/resource/dsc_resource_spec.rb +6 -0
- data/spec/unit/resource/execute_spec.rb +214 -0
- data/spec/unit/resource/file/verification/systemd_unit_spec.rb +103 -0
- data/spec/unit/resource/freebsd_package_spec.rb +2 -2
- data/spec/unit/resource/package_spec.rb +5 -0
- data/spec/unit/resource/yum_package_spec.rb +42 -1
- data/spec/unit/resource_reporter_spec.rb +1 -1
- data/spec/unit/resource_spec.rb +18 -0
- data/spec/unit/server_api_versions_spec.rb +44 -0
- data/spec/unit/util/selinux_spec.rb +3 -14
- data/spec/unit/win32/error_spec.rb +67 -0
- data/spec/unit/win32/security_spec.rb +66 -0
- data/tasks/changelog.rb +1 -1
- data/tasks/dependencies.rb +20 -4
- metadata +39 -18
- data/lib/chef/monkey_patches/net-ssh-multi.rb +0 -141
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65ad4a81b7257c30979320de1dca03c7d0b86edb
|
4
|
+
data.tar.gz: 701e250fc4dea8abef56bb8e469f73adebe7c2e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fe830a55ca6c2370a2290a61fc20172da9ba6b5fd776925acf6e1a8ce1593adf348d1da625f734bd0e15822cb3fa4856b7e05a7233290c245e9147627f1caf0
|
7
|
+
data.tar.gz: 50987c4fd53c7c6903976523885c8f1cde0a8057763ba379653c6f4f0b5c98bfd740da4cd117869cefb54054e5f72795c50c9aee020df421caf3aafb0fd48dd7
|
data/Gemfile
CHANGED
@@ -12,10 +12,9 @@ source "https://rubygems.org"
|
|
12
12
|
gem "chef", path: "."
|
13
13
|
|
14
14
|
gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__))
|
15
|
-
|
16
|
-
gem "rake", group: [ :default, :omnibus_package, :development ]
|
15
|
+
gem "rake"
|
17
16
|
gem "bundler"
|
18
|
-
gem "cheffish"
|
17
|
+
gem "cheffish" # required for rspec tests
|
19
18
|
|
20
19
|
group(:omnibus_package) do
|
21
20
|
gem "appbundler"
|
@@ -29,6 +28,7 @@ group(:omnibus_package, :pry) do
|
|
29
28
|
gem "pry-remote"
|
30
29
|
gem "pry-stack_explorer"
|
31
30
|
end
|
31
|
+
|
32
32
|
# These are used for external tests
|
33
33
|
group(:integration) do
|
34
34
|
gem "chef-provisioning"
|
@@ -63,6 +63,7 @@ group(:linux, :bsd, :mac_os_x, :solaris, :windows) do
|
|
63
63
|
# may need to disable this in insolation on fussy builds like AIX, RHEL4, etc
|
64
64
|
gem "ruby-prof"
|
65
65
|
end
|
66
|
+
|
66
67
|
# Everything except AIX and Windows
|
67
68
|
group(:linux, :bsd, :mac_os_x, :solaris) do
|
68
69
|
gem "ruby-shadow", platforms: :ruby
|
@@ -77,7 +78,7 @@ group(:development, :test) do
|
|
77
78
|
end
|
78
79
|
|
79
80
|
group(:changelog) do
|
80
|
-
gem "github_changelog_generator", git: "https://github.com/
|
81
|
+
gem "github_changelog_generator", git: "https://github.com/chef/github-changelog-generator"
|
81
82
|
gem "mixlib-install"
|
82
83
|
end
|
83
84
|
|
data/README.md
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
|
7
7
|
Want to try Chef? Get started with [learnchef](https://learn.chef.io)
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
- Documentation: <https://docs.chef.io>
|
10
|
+
- Source: <https://github.com/chef/chef/tree/master>
|
11
|
+
- Tickets/Issues: <https://github.com/chef/chef/issues>
|
12
|
+
- Slack: [Chef Community Slack](https://community-slack.chef.io/)
|
13
|
+
- Mailing list: <https://discourse.chef.io>
|
14
14
|
|
15
15
|
Chef is a configuration management tool designed to bring automation to your
|
16
16
|
entire infrastructure.
|
@@ -18,10 +18,10 @@ entire infrastructure.
|
|
18
18
|
This README focuses on developers who want to modify Chef source code.
|
19
19
|
If you just want to use Chef, check out these resources:
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
- [learnchef](https://learn.chef.io): Getting started guide
|
22
|
+
- [docs.chef.io](https://docs.chef.io): Comprehensive User Docs
|
23
|
+
- [Installer Downloads](https://downloads.chef.io/chef/): Install Chef as a complete package
|
24
|
+
- [chef/chef](https://hub.docker.com/r/chef/chef): Docker image for use with [kitchen-dokken](https://github.com/someara/kitchen-dokken)
|
25
25
|
|
26
26
|
## Installing From Git
|
27
27
|
|
@@ -74,8 +74,7 @@ The general development process is:
|
|
74
74
|
1. Fork this repo and clone it to your workstation.
|
75
75
|
2. Create a feature branch for your change.
|
76
76
|
3. Write code and tests.
|
77
|
-
4. Push your feature branch to github and open a pull request against
|
78
|
-
master.
|
77
|
+
4. Push your feature branch to github and open a pull request against master.
|
79
78
|
|
80
79
|
Once your repository is set up, you can start working on the code. We do utilize
|
81
80
|
RSpec for test driven development, so you'll need to get a development
|
@@ -92,7 +91,7 @@ Note that this repository is primarily for reporting chef-client issues.
|
|
92
91
|
For reporting issues against other Chef projects, please look up the appropriate repository
|
93
92
|
to report issues against in the Chef docs in the
|
94
93
|
[community contributions section](https://docs.chef.io/community_contributions.html#issues-and-bug-reports).
|
95
|
-
If you can't
|
94
|
+
If you can't determine the appropriate place to report an issue, then please open it
|
96
95
|
against the repository you think best fits and it will be directed to the appropriate project.
|
97
96
|
|
98
97
|
## Testing
|
@@ -244,7 +243,7 @@ bundle install
|
|
244
243
|
bundle exec omnibus build chef
|
245
244
|
```
|
246
245
|
|
247
|
-
This causes the [chef project definition](omnibus/config/projects/chef.rb) to load, which runs the [chef-complete](omnibus/config/software/chef-complete.rb) software definition, the primary software definition driving the whole build process. The reason we embed it all in a software
|
246
|
+
This causes the [chef project definition](omnibus/config/projects/chef.rb) to load, which runs the [chef-complete](omnibus/config/software/chef-complete.rb) software definition, the primary software definition driving the whole build process. The reason we embed it all in a software definition instead of the project is to take advantage of omnibus caching: omnibus will invalidate the entire project (and recompile ruby, openssl, and everything else) if you change anything at all in the project file. Not so with a software definition.
|
248
247
|
|
249
248
|
### Installing the Gems
|
250
249
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
12.
|
1
|
+
12.19.33
|
data/acceptance/Gemfile
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
+
gem "rake" # required to build some native extensions
|
3
4
|
gem "chef-acceptance", github: "chef/chef-acceptance"
|
4
5
|
gem "kitchen-ec2"
|
5
6
|
gem "inspec"
|
6
|
-
# Pinning to github for kitchen-vagrant because 0.19.0 incorrectly
|
7
|
-
# puts in a box_url for bento when a vagrant box in atlas is specified
|
8
7
|
gem "kitchen-vagrant"
|
9
8
|
gem "windows_chef_zero"
|
10
9
|
gem "kitchen-inspec"
|
11
10
|
gem "test-kitchen"
|
12
11
|
gem "winrm-elevated"
|
13
|
-
gem "berkshelf"
|
12
|
+
gem "berkshelf"
|
14
13
|
|
15
|
-
#
|
14
|
+
# Pin to 1.2.3 because current mixlib-install has a problem where unstable
|
15
|
+
# packages are not always immediately available via the omnitruck API.
|
16
16
|
gem "mixlib-install", "1.2.3"
|
data/acceptance/Gemfile.lock
CHANGED
@@ -11,76 +11,75 @@ GEM
|
|
11
11
|
specs:
|
12
12
|
addressable (2.5.0)
|
13
13
|
public_suffix (~> 2.0, >= 2.0.2)
|
14
|
-
artifactory (2.
|
15
|
-
aws-sdk (2.
|
16
|
-
aws-sdk-resources (= 2.
|
17
|
-
aws-sdk-core (2.
|
14
|
+
artifactory (2.6.0)
|
15
|
+
aws-sdk (2.7.5)
|
16
|
+
aws-sdk-resources (= 2.7.5)
|
17
|
+
aws-sdk-core (2.7.5)
|
18
18
|
aws-sigv4 (~> 1.0)
|
19
19
|
jmespath (~> 1.0)
|
20
|
-
aws-sdk-resources (2.
|
21
|
-
aws-sdk-core (= 2.
|
20
|
+
aws-sdk-resources (2.7.5)
|
21
|
+
aws-sdk-core (= 2.7.5)
|
22
22
|
aws-sigv4 (1.0.0)
|
23
|
-
berkshelf (
|
23
|
+
berkshelf (5.6.2)
|
24
24
|
addressable (~> 2.3, >= 2.3.4)
|
25
|
-
berkshelf-api-client (
|
26
|
-
buff-config (~>
|
27
|
-
buff-extensions (~>
|
28
|
-
buff-shell_out (~> 0
|
29
|
-
celluloid (= 0.16.0)
|
30
|
-
celluloid-io (~> 0.16.1)
|
25
|
+
berkshelf-api-client (>= 2.0.2, < 4.0)
|
26
|
+
buff-config (~> 2.0)
|
27
|
+
buff-extensions (~> 2.0)
|
28
|
+
buff-shell_out (~> 1.0)
|
31
29
|
cleanroom (~> 1.0)
|
32
30
|
faraday (~> 0.9)
|
33
31
|
httpclient (~> 2.7)
|
34
32
|
minitar (~> 0.5, >= 0.5.4)
|
35
|
-
mixlib-archive (~> 0.
|
33
|
+
mixlib-archive (~> 0.4)
|
36
34
|
octokit (~> 4.0)
|
37
35
|
retryable (~> 2.0)
|
38
|
-
ridley (~>
|
39
|
-
solve (
|
40
|
-
thor (~> 0.19)
|
41
|
-
berkshelf-api-client (
|
42
|
-
faraday (~> 0.9
|
43
|
-
httpclient (~> 2.7
|
44
|
-
ridley (
|
45
|
-
buff-config (
|
46
|
-
buff-extensions (~>
|
47
|
-
varia_model (~> 0.
|
48
|
-
buff-extensions (
|
49
|
-
buff-ignore (1.
|
50
|
-
buff-ruby_engine (
|
51
|
-
buff-shell_out (
|
52
|
-
buff-ruby_engine (~>
|
53
|
-
builder (3.2.
|
36
|
+
ridley (~> 5.0)
|
37
|
+
solve (> 2.0, < 4.0)
|
38
|
+
thor (~> 0.19, < 0.19.2)
|
39
|
+
berkshelf-api-client (3.0.0)
|
40
|
+
faraday (~> 0.9)
|
41
|
+
httpclient (~> 2.7)
|
42
|
+
ridley (>= 4.5, < 6.0)
|
43
|
+
buff-config (2.0.0)
|
44
|
+
buff-extensions (~> 2.0)
|
45
|
+
varia_model (~> 0.6)
|
46
|
+
buff-extensions (2.0.0)
|
47
|
+
buff-ignore (1.2.0)
|
48
|
+
buff-ruby_engine (1.0.0)
|
49
|
+
buff-shell_out (1.1.0)
|
50
|
+
buff-ruby_engine (~> 1.0)
|
51
|
+
builder (3.2.3)
|
54
52
|
celluloid (0.16.0)
|
55
53
|
timers (~> 4.0.0)
|
56
54
|
celluloid-io (0.16.2)
|
57
55
|
celluloid (>= 0.16.0)
|
58
56
|
nio4r (>= 1.1.0)
|
59
|
-
chef-config (12.
|
57
|
+
chef-config (12.18.31)
|
60
58
|
addressable
|
61
59
|
fuzzyurl
|
62
60
|
mixlib-config (~> 2.0)
|
63
61
|
mixlib-shellout (~> 2.0)
|
64
62
|
cleanroom (1.0.0)
|
65
63
|
coderay (1.1.1)
|
66
|
-
diff-lcs (1.
|
67
|
-
docker-api (1.33.
|
64
|
+
diff-lcs (1.3)
|
65
|
+
docker-api (1.33.2)
|
68
66
|
excon (>= 0.38.0)
|
69
67
|
json
|
70
68
|
erubis (2.7.0)
|
71
|
-
excon (0.
|
69
|
+
excon (0.55.0)
|
72
70
|
faraday (0.9.2)
|
73
71
|
multipart-post (>= 1.2, < 3)
|
74
|
-
ffi (1.9.
|
72
|
+
ffi (1.9.17)
|
75
73
|
fuzzyurl (0.9.0)
|
76
74
|
gssapi (1.2.0)
|
77
75
|
ffi (>= 1.0.1)
|
78
76
|
gyoku (1.3.1)
|
79
77
|
builder (>= 2.1.2)
|
80
|
-
hashie (3.
|
78
|
+
hashie (3.5.1)
|
81
79
|
hitimes (1.2.4)
|
82
|
-
httpclient (2.
|
83
|
-
inspec (1.
|
80
|
+
httpclient (2.8.3)
|
81
|
+
inspec (1.14.1)
|
82
|
+
faraday (>= 0.9.0)
|
84
83
|
hashie (~> 3.4)
|
85
84
|
json (>= 1.8, < 3.0)
|
86
85
|
method_source (~> 0.8)
|
@@ -96,7 +95,7 @@ GEM
|
|
96
95
|
thor (~> 0.19)
|
97
96
|
train (>= 0.22.0, < 1.0)
|
98
97
|
jmespath (1.3.1)
|
99
|
-
json (2.0.
|
98
|
+
json (2.0.3)
|
100
99
|
kitchen-ec2 (1.2.0)
|
101
100
|
aws-sdk (~> 2)
|
102
101
|
excon
|
@@ -107,15 +106,15 @@ GEM
|
|
107
106
|
hashie (~> 3.4)
|
108
107
|
inspec (>= 0.34.0, < 2.0.0)
|
109
108
|
test-kitchen (~> 1.6)
|
110
|
-
kitchen-vagrant (0.
|
109
|
+
kitchen-vagrant (1.0.0)
|
111
110
|
test-kitchen (~> 1.4)
|
112
111
|
little-plugger (1.1.4)
|
113
112
|
logging (2.1.0)
|
114
113
|
little-plugger (~> 1.1)
|
115
114
|
multi_json (~> 1.10)
|
116
115
|
method_source (0.8.2)
|
117
|
-
minitar (0.
|
118
|
-
mixlib-archive (0.
|
116
|
+
minitar (0.6.1)
|
117
|
+
mixlib-archive (0.4.1)
|
119
118
|
mixlib-log
|
120
119
|
mixlib-authentication (1.4.1)
|
121
120
|
mixlib-log
|
@@ -127,15 +126,15 @@ GEM
|
|
127
126
|
mixlib-log (1.7.1)
|
128
127
|
mixlib-shellout (2.2.7)
|
129
128
|
mixlib-versioning (1.1.0)
|
130
|
-
molinillo (0.
|
129
|
+
molinillo (0.5.6)
|
131
130
|
multi_json (1.12.1)
|
132
131
|
multipart-post (2.0.0)
|
133
132
|
net-scp (1.2.1)
|
134
133
|
net-ssh (>= 2.6.5)
|
135
|
-
net-ssh (
|
136
|
-
net-ssh-gateway (1.
|
134
|
+
net-ssh (4.0.1)
|
135
|
+
net-ssh-gateway (1.3.0)
|
137
136
|
net-ssh (>= 2.6.5)
|
138
|
-
nio4r (
|
137
|
+
nio4r (2.0.0)
|
139
138
|
nori (2.6.0)
|
140
139
|
octokit (4.6.2)
|
141
140
|
sawyer (~> 0.8.0, >= 0.5.3)
|
@@ -146,13 +145,14 @@ GEM
|
|
146
145
|
slop (~> 3.4)
|
147
146
|
public_suffix (2.0.5)
|
148
147
|
rainbow (2.2.1)
|
148
|
+
rake (12.0.0)
|
149
149
|
retryable (2.0.4)
|
150
|
-
ridley (
|
150
|
+
ridley (5.1.0)
|
151
151
|
addressable
|
152
|
-
buff-config (~>
|
153
|
-
buff-extensions (~>
|
154
|
-
buff-ignore (~> 1.
|
155
|
-
buff-shell_out (~> 0
|
152
|
+
buff-config (~> 2.0)
|
153
|
+
buff-extensions (~> 2.0)
|
154
|
+
buff-ignore (~> 1.2)
|
155
|
+
buff-shell_out (~> 1.0)
|
156
156
|
celluloid (~> 0.16.0)
|
157
157
|
celluloid-io (~> 0.16.1)
|
158
158
|
chef-config (>= 12.5.0)
|
@@ -163,8 +163,8 @@ GEM
|
|
163
163
|
json (>= 1.7.7)
|
164
164
|
mixlib-authentication (>= 1.3.0)
|
165
165
|
retryable (~> 2.0)
|
166
|
-
semverse (~>
|
167
|
-
varia_model (~> 0.
|
166
|
+
semverse (~> 2.0)
|
167
|
+
varia_model (~> 0.6)
|
168
168
|
rspec (3.5.0)
|
169
169
|
rspec-core (~> 3.5.0)
|
170
170
|
rspec-expectations (~> 3.5.0)
|
@@ -185,42 +185,42 @@ GEM
|
|
185
185
|
builder (< 4)
|
186
186
|
rspec-core (>= 2, < 4, != 2.12.0)
|
187
187
|
rubyntlm (0.6.1)
|
188
|
-
rubyzip (1.2.
|
188
|
+
rubyzip (1.2.1)
|
189
189
|
safe_yaml (1.0.4)
|
190
190
|
sawyer (0.8.1)
|
191
191
|
addressable (>= 2.3.5, < 2.6)
|
192
192
|
faraday (~> 0.8, < 1.0)
|
193
|
-
semverse (
|
193
|
+
semverse (2.0.0)
|
194
194
|
slop (3.6.0)
|
195
|
-
solve (
|
196
|
-
molinillo (
|
197
|
-
semverse (
|
195
|
+
solve (3.1.0)
|
196
|
+
molinillo (>= 0.5)
|
197
|
+
semverse (>= 1.1, < 3.0)
|
198
198
|
sslshake (1.0.13)
|
199
|
-
test-kitchen (1.
|
199
|
+
test-kitchen (1.15.0)
|
200
200
|
mixlib-install (>= 1.2, < 3.0)
|
201
201
|
mixlib-shellout (>= 1.2, < 3.0)
|
202
202
|
net-scp (~> 1.1)
|
203
|
-
net-ssh (>= 2.9, <
|
204
|
-
net-ssh-gateway (~> 1.2
|
203
|
+
net-ssh (>= 2.9, < 5.0)
|
204
|
+
net-ssh-gateway (~> 1.2)
|
205
205
|
safe_yaml (~> 1.0)
|
206
206
|
thor (~> 0.18)
|
207
|
-
thor (0.19.
|
207
|
+
thor (0.19.1)
|
208
208
|
timers (4.0.4)
|
209
209
|
hitimes
|
210
|
-
train (0.22.
|
210
|
+
train (0.22.1)
|
211
211
|
docker-api (~> 1.26)
|
212
212
|
json (>= 1.8, < 3.0)
|
213
213
|
mixlib-shellout (~> 2.0)
|
214
214
|
net-scp (~> 1.2)
|
215
|
-
net-ssh (>= 2.9, <
|
215
|
+
net-ssh (>= 2.9, < 5.0)
|
216
216
|
winrm (~> 2.0)
|
217
217
|
winrm-fs (~> 1.0)
|
218
|
-
varia_model (0.
|
219
|
-
buff-extensions (~>
|
218
|
+
varia_model (0.6.0)
|
219
|
+
buff-extensions (~> 2.0)
|
220
220
|
hashie (>= 2.0.2, < 4.0.0)
|
221
221
|
windows_chef_zero (2.0.0)
|
222
222
|
test-kitchen (>= 1.2.1)
|
223
|
-
winrm (2.1.
|
223
|
+
winrm (2.1.2)
|
224
224
|
builder (>= 2.1.2)
|
225
225
|
erubis (~> 2.7)
|
226
226
|
gssapi (~> 1.2)
|
@@ -242,16 +242,17 @@ PLATFORMS
|
|
242
242
|
ruby
|
243
243
|
|
244
244
|
DEPENDENCIES
|
245
|
-
berkshelf
|
245
|
+
berkshelf
|
246
246
|
chef-acceptance!
|
247
247
|
inspec
|
248
248
|
kitchen-ec2
|
249
249
|
kitchen-inspec
|
250
250
|
kitchen-vagrant
|
251
251
|
mixlib-install (= 1.2.3)
|
252
|
+
rake
|
252
253
|
test-kitchen
|
253
254
|
windows_chef_zero
|
254
255
|
winrm-elevated
|
255
256
|
|
256
257
|
BUNDLED WITH
|
257
|
-
1.
|
258
|
+
1.12.5
|
@@ -6,9 +6,8 @@ gemspec.add_dependency "ffi", "~> 1.9"
|
|
6
6
|
gemspec.add_dependency "win32-api", "~> 1.5.3"
|
7
7
|
gemspec.add_dependency "win32-dir", "~> 0.5.0"
|
8
8
|
gemspec.add_dependency "win32-event", "~> 0.6.1"
|
9
|
-
#
|
10
|
-
#
|
11
|
-
# win32-service needed, causing the chef service to not run.
|
9
|
+
# TODO: Relax this pin and make the necessary updaets. The issue originally
|
10
|
+
# leading to this pin has been fixed in 0.6.5.
|
12
11
|
gemspec.add_dependency "win32-eventlog", "0.6.3"
|
13
12
|
gemspec.add_dependency "win32-mmap", "~> 0.4.1"
|
14
13
|
gemspec.add_dependency "win32-mutex", "~> 0.4.2"
|
data/chef.gemspec
CHANGED
@@ -11,9 +11,9 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.license = "Apache-2.0"
|
12
12
|
s.author = "Adam Jacob"
|
13
13
|
s.email = "adam@chef.io"
|
14
|
-
s.homepage = "
|
14
|
+
s.homepage = "https://www.chef.io"
|
15
15
|
|
16
|
-
s.required_ruby_version = ">= 2.2.
|
16
|
+
s.required_ruby_version = ">= 2.2.2"
|
17
17
|
|
18
18
|
s.add_dependency "chef-config", "= #{Chef::VERSION}"
|
19
19
|
|
@@ -21,12 +21,12 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_dependency "mixlib-log", "~> 1.3"
|
22
22
|
s.add_dependency "mixlib-authentication", "~> 1.4"
|
23
23
|
s.add_dependency "mixlib-shellout", "~> 2.0"
|
24
|
-
s.add_dependency "mixlib-archive", "
|
25
|
-
s.add_dependency "ohai", ">= 8.6.0.alpha.1", "<
|
24
|
+
s.add_dependency "mixlib-archive", "~> 0.4"
|
25
|
+
s.add_dependency "ohai", ">= 8.6.0.alpha.1", "< 13"
|
26
26
|
|
27
27
|
s.add_dependency "ffi-yajl", "~> 2.2"
|
28
|
-
s.add_dependency "net-ssh", ">= 2.9", "<
|
29
|
-
s.add_dependency "net-ssh-multi", "~> 1.1"
|
28
|
+
s.add_dependency "net-ssh", ">= 2.9", "< 5.0"
|
29
|
+
s.add_dependency "net-ssh-multi", "~> 1.2", ">= 1.2.1"
|
30
30
|
s.add_dependency "net-sftp", "~> 2.1", ">= 2.1.2"
|
31
31
|
s.add_dependency "highline", "~> 1.6", ">= 1.6.9"
|
32
32
|
s.add_dependency "erubis", "~> 2.7"
|
data/lib/chef/api_client.rb
CHANGED
@@ -162,7 +162,7 @@ class Chef
|
|
162
162
|
if inflate
|
163
163
|
response = Hash.new
|
164
164
|
Chef::Search::Query.new.search(:client) do |n|
|
165
|
-
n =
|
165
|
+
n = json_create(n) if n.instance_of?(Hash)
|
166
166
|
response[n.name] = n
|
167
167
|
end
|
168
168
|
response
|
@@ -188,15 +188,13 @@ class Chef
|
|
188
188
|
|
189
189
|
# Save this client via the REST API, returns a hash including the private key
|
190
190
|
def save
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
raise e
|
199
|
-
end
|
191
|
+
http_api.put("clients/#{name}", { :name => name, :admin => admin, :validator => validator })
|
192
|
+
rescue Net::HTTPServerException => e
|
193
|
+
# If that fails, go ahead and try and update it
|
194
|
+
if e.response.code == "404"
|
195
|
+
http_api.post("clients", { :name => name, :admin => admin, :validator => validator })
|
196
|
+
else
|
197
|
+
raise e
|
200
198
|
end
|
201
199
|
end
|
202
200
|
|