chef 12.16.42-universal-mingw32 → 12.17.44-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 +2 -1
- data/README.md +20 -5
- data/Rakefile +17 -0
- data/VERSION +1 -1
- data/acceptance/Gemfile.lock +32 -23
- data/distro/common/markdown/man1/knife-configure.mkd +3 -2
- data/lib-backcompat/chef/chef_fs/file_system/already_exists_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/cookbook_frozen_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/default_environment_cannot_be_modified_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/file_system_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/must_delete_recursively_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/not_found_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/operation_failed_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/operation_not_allowed_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_entry.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/repository/file_system_root_dir.rb +1 -1
- data/lib/chef/api_client.rb +1 -1
- data/lib/chef/application.rb +1 -1
- data/lib/chef/application/exit_code.rb +3 -3
- data/lib/chef/chef_class.rb +15 -5
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +12 -1
- data/lib/chef/chef_fs/file_system/repository/nodes_dir.rb +19 -0
- data/lib/chef/client.rb +1 -0
- data/lib/chef/cookbook/metadata.rb +2 -2
- data/lib/chef/cookbook_version.rb +4 -4
- data/lib/chef/data_bag.rb +1 -1
- data/lib/chef/data_bag_item.rb +1 -1
- data/lib/chef/data_collector.rb +20 -13
- data/lib/chef/data_collector/messages.rb +0 -1
- data/lib/chef/data_collector/messages/helpers.rb +2 -2
- data/lib/chef/decorator/unchain.rb +2 -2
- data/lib/chef/deprecated.rb +190 -0
- data/lib/chef/deprecation/provider/remote_directory.rb +1 -1
- data/lib/chef/deprecation/warnings.rb +3 -4
- data/lib/chef/dsl/method_missing.rb +2 -2
- data/lib/chef/dsl/resources.rb +2 -2
- data/lib/chef/environment.rb +1 -1
- data/lib/chef/exceptions.rb +1 -1
- data/lib/chef/formatters/base.rb +11 -1
- data/lib/chef/formatters/doc.rb +13 -4
- data/lib/chef/key.rb +1 -1
- data/lib/chef/knife/client_delete.rb +12 -9
- data/lib/chef/knife/configure.rb +1 -1
- data/lib/chef/knife/core/bootstrap_context.rb +25 -1
- data/lib/chef/knife/core/subcommand_loader.rb +3 -3
- data/lib/chef/knife/core/ui.rb +1 -1
- data/lib/chef/knife/node_delete.rb +6 -6
- data/lib/chef/log.rb +1 -1
- data/lib/chef/mixin/deprecation.rb +4 -10
- data/lib/chef/mixin/powershell_type_coercions.rb +19 -19
- data/lib/chef/mixin/shell_out.rb +1 -1
- data/lib/chef/node.rb +2 -2
- data/lib/chef/node/attribute.rb +3 -4
- data/lib/chef/node/common_api.rb +1 -1
- data/lib/chef/node/mixin/state_tracking.rb +5 -2
- data/lib/chef/node_map.rb +2 -2
- data/lib/chef/org.rb +1 -1
- data/lib/chef/platform/rebooter.rb +3 -1
- data/lib/chef/policy_builder/expand_node_object.rb +1 -1
- data/lib/chef/property.rb +5 -5
- data/lib/chef/provider.rb +4 -4
- data/lib/chef/provider/launchd.rb +1 -1
- data/lib/chef/provider/link.rb +6 -0
- data/lib/chef/provider/mount.rb +2 -0
- data/lib/chef/provider/mount/mount.rb +1 -1
- data/lib/chef/provider/ohai.rb +5 -3
- data/lib/chef/provider/package/cab.rb +1 -1
- data/lib/chef/provider/package/chocolatey.rb +2 -2
- data/lib/chef/provider/package/easy_install.rb +2 -2
- data/lib/chef/provider/package/msu.rb +162 -0
- data/lib/chef/provider/package/powershell.rb +114 -0
- data/lib/chef/provider/package/yum.rb +1 -1
- data/lib/chef/provider/yum_repository.rb +6 -7
- data/lib/chef/provider_resolver.rb +2 -2
- data/lib/chef/providers.rb +2 -0
- data/lib/chef/resource.rb +3 -5
- data/lib/chef/resource/apt_update.rb +1 -1
- data/lib/chef/resource/chef_gem.rb +2 -3
- data/lib/chef/resource/file/verification.rb +1 -1
- data/lib/chef/resource/launchd.rb +48 -8
- data/lib/chef/resource/mount.rb +1 -1
- data/lib/chef/resource/msu_package.rb +47 -0
- data/lib/chef/resource/ohai.rb +5 -25
- data/lib/chef/resource/powershell_package.rb +41 -0
- data/lib/chef/resource/reboot.rb +1 -1
- data/lib/chef/resource/user.rb +2 -2
- data/lib/chef/resource_builder.rb +4 -4
- data/lib/chef/resource_resolver.rb +2 -3
- data/lib/chef/resources.rb +2 -0
- data/lib/chef/rest.rb +1 -1
- data/lib/chef/role.rb +1 -1
- data/lib/chef/run_context.rb +3 -3
- data/lib/chef/shell/ext.rb +2 -2
- data/lib/chef/user.rb +3 -3
- data/lib/chef/user_v1.rb +1 -1
- data/lib/chef/version.rb +1 -1
- data/lib/chef/win32/api/security.rb +12 -12
- data/spec/data/sample_msu1.xml +10 -0
- data/spec/data/sample_msu2.xml +14 -0
- data/spec/data/sample_msu3.xml +16 -0
- data/spec/functional/rebooter_spec.rb +3 -3
- data/spec/functional/resource/link_spec.rb +62 -1
- data/spec/functional/resource/msu_package_spec.rb +84 -0
- data/spec/functional/resource/registry_spec.rb +3 -3
- data/spec/functional/resource/rpm_spec.rb +7 -10
- data/spec/integration/solo/solo_spec.rb +50 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/platform_helpers.rb +16 -8
- data/spec/unit/application/exit_code_spec.rb +3 -15
- data/spec/unit/data_collector_spec.rb +6 -16
- data/spec/unit/deprecated_spec.rb +59 -0
- data/spec/unit/deprecation_spec.rb +1 -8
- data/spec/unit/handler_spec.rb +2 -2
- data/spec/unit/knife/client_delete_spec.rb +16 -0
- data/spec/unit/knife/configure_spec.rb +1 -1
- data/spec/unit/knife/cookbook_metadata_spec.rb +116 -113
- data/spec/unit/knife/core/bootstrap_context_spec.rb +55 -5
- data/spec/unit/knife/node_delete_spec.rb +19 -10
- data/spec/unit/mixin/shell_out_spec.rb +0 -1
- data/spec/unit/node/immutable_collections_spec.rb +5 -0
- data/spec/unit/node/vivid_mash_spec.rb +11 -0
- data/spec/unit/node_spec.rb +2 -2
- data/spec/unit/provider/launchd_spec.rb +81 -3
- data/spec/unit/provider/mount/mount_spec.rb +1 -1
- data/spec/unit/provider/mount_spec.rb +7 -0
- data/spec/unit/provider/package/chocolatey_spec.rb +5 -5
- data/spec/unit/provider/package/easy_install_spec.rb +6 -6
- data/spec/unit/provider/package/msu_spec.rb +283 -0
- data/spec/unit/provider/package/powershell_spec.rb +337 -0
- data/spec/unit/provider/service/macosx_spec.rb +1 -1
- data/spec/unit/provider/subversion_spec.rb +9 -0
- data/spec/unit/provider/user/linux_spec.rb +7 -1
- data/spec/unit/recipe_spec.rb +43 -11
- data/spec/unit/resource/apt_update_spec.rb +17 -25
- data/spec/unit/resource/file/verification_spec.rb +1 -1
- data/spec/unit/resource/mount_spec.rb +2 -1
- data/spec/unit/resource/msu_package_spec.rb +49 -0
- data/spec/unit/resource/ohai_spec.rb +1 -1
- data/spec/unit/resource/powershell_package_spec.rb +68 -0
- data/spec/unit/resource_reporter_spec.rb +4 -4
- data/spec/unit/run_status_spec.rb +1 -1
- data/tasks/announce.rb +58 -0
- data/tasks/changelog.rb +26 -6
- data/tasks/templates/prerelease.md.erb +35 -0
- data/tasks/templates/release.md.erb +34 -0
- metadata +21 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62200be93ca6b5ae38241cf1f521245c3e8de987
|
4
|
+
data.tar.gz: 8ce7662f10f8ee5003de838760abeab111fdf089
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c55c490b062b0376d33f4a0ddbaa9cea9ffed118973d376e99e6b9a12d4239a7836ae253a986bfea612a5f909b2b3d8ff155c21c1d9cb55f7e9e409555293918
|
7
|
+
data.tar.gz: 17948692e8795adc3ff159feb30f6a00ea95b0a7edb82281228a513903196b6de95703b1e24dbb1f3bb63656624453b62275b86120b19225be05bd5176c9e339
|
data/Gemfile
CHANGED
@@ -78,7 +78,8 @@ group(:development, :test) do
|
|
78
78
|
end
|
79
79
|
|
80
80
|
group(:changelog) do
|
81
|
-
gem "github_changelog_generator"
|
81
|
+
gem "github_changelog_generator", git: "https://github.com/tduffield/github-changelog-generator", branch: "adjust-tag-section-mapping"
|
82
|
+
gem "mixlib-install"
|
82
83
|
end
|
83
84
|
|
84
85
|
group(:travis) do
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
[![Code Climate](https://codeclimate.com/github/chef/chef.svg)](https://codeclimate.com/github/chef/chef)
|
3
3
|
[![Build Status Master](https://travis-ci.org/chef/chef.svg?branch=master)](https://travis-ci.org/chef/chef)
|
4
4
|
[![Build Status Master](https://ci.appveyor.com/api/projects/status/github/chef/chef?branch=master&svg=true&passingText=master%20-%20Ok&pendingText=master%20-%20Pending&failingText=master%20-%20Failing)](https://ci.appveyor.com/project/Chef/chef/branch/master)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/chef.svg)](https://badge.fury.io/rb/chef)
|
5
6
|
|
6
7
|
Want to try Chef? Get started with [learnchef](https://learn.chef.io)
|
7
8
|
|
@@ -76,7 +77,7 @@ The general development process is:
|
|
76
77
|
master.
|
77
78
|
|
78
79
|
Once your repository is set up, you can start working on the code. We do utilize
|
79
|
-
RSpec for test driven development, so you'll need to get a development
|
80
|
+
RSpec for test driven development, so you'll need to get a development
|
80
81
|
environment running. Follow the above procedure ("Installing from Git") to get
|
81
82
|
your local copy of the source running.
|
82
83
|
|
@@ -156,18 +157,32 @@ Whenever a change is checked in to `master`, the patch version of `chef` is bump
|
|
156
157
|
|
157
158
|
1. Bumps the patch version in `lib/chef/version.rb` (e.g. 0.9.14 -> 0.9.15).
|
158
159
|
2. Runs `rake bundle:install` to update the `Gemfile.lock` to include the new version.
|
159
|
-
3.
|
160
|
+
3. Runs `rake changelog:update` to update the `CHANGELOG.md`.
|
161
|
+
4. Pushes to `master` and submits a new build to Chef's Jenkins cluster.
|
160
162
|
|
161
163
|
## Bumping the minor version of Chef
|
162
164
|
|
163
165
|
After each "official" stable release we need to bump the minor version. To do this:
|
164
166
|
|
165
|
-
1.
|
166
|
-
2. Run `bundle exec rake version` which will copy the version to the respective `version.rb` files in chef and chef-config.
|
167
|
-
3. Run `bundle exec rake bundle:install` to update the base Gemfile.lock
|
167
|
+
1. Run `bundle exec rake version:bump_minor`
|
168
168
|
|
169
169
|
Submit a PR with the changes made by the above.
|
170
170
|
|
171
|
+
## Addressing a Regression
|
172
|
+
|
173
|
+
Sometimes, regressions split through the cracks. Since new functionality is always being added and the minor version is bumped immediately after release, we can't simply roll forward. In this scenario, we'll need to perform a special regression release process. In the example that follows, the stable release with a regression is `1.10.60` while master is currently sitting at `1.11.30`. *Note:* To perform this process, you must be a Chef employee.
|
174
|
+
|
175
|
+
1. If the regression has not already been addressed, open a Pull Request against master with the fix.
|
176
|
+
2. Wait until that Pull Request has been merged and `1.11.31` has passed all the necessary tests and is available in the current channel.
|
177
|
+
3. Inspect the Git history and find the `SHA` associated with the Merge Commit for the Pull Request above.
|
178
|
+
4. Apply the fix for the regression via a cherry-pick:
|
179
|
+
1. Check out the stable release tag: `git checkout v1.10.60`
|
180
|
+
2. Cherry Pick the SHA with the fix: `git cherry-pick SHA`
|
181
|
+
3. Address any conflicts (if necessary)
|
182
|
+
4. Tag the sha with the appropriate version: `git tag -a v1.10.61 -m "Release v1.10.61"`
|
183
|
+
5. Push the new tag to origin: `git push origin --tags`
|
184
|
+
5. Log in to Jenkins and trigger a `chef-trigger-release` job specifying the new tag as the `GIT_REF`.
|
185
|
+
|
171
186
|
## Component Versions
|
172
187
|
|
173
188
|
Chef has two sorts of component: ruby components like `berkshelf` and `test-kitchen`, and binary components like `openssl` and even `ruby` itself.
|
data/Rakefile
CHANGED
@@ -28,6 +28,7 @@ require_relative "tasks/maintainers"
|
|
28
28
|
require_relative "tasks/cbgb"
|
29
29
|
require_relative "tasks/dependencies"
|
30
30
|
require_relative "tasks/changelog"
|
31
|
+
require_relative "tasks/announce"
|
31
32
|
|
32
33
|
ChefConfig::PackageTask.new(File.expand_path("..", __FILE__), "Chef", "chef") do |package|
|
33
34
|
package.component_paths = ["chef-config"]
|
@@ -37,6 +38,22 @@ end
|
|
37
38
|
task "version:bump" => %w{version:bump_patch version:update}
|
38
39
|
task "version:bump" => %w{version:bump_patch version:update}
|
39
40
|
|
41
|
+
task "version:bump_minor" do
|
42
|
+
Rake::Task["changelog:archive"].invoke
|
43
|
+
maj, min, _build = Chef::VERSION.split(".")
|
44
|
+
File.open("VERSION", "w+") { |f| f.write("#{maj}.#{min.to_i + 1}.0") }
|
45
|
+
Rake::Task["version"].invoke
|
46
|
+
Rake::Task["bundle:install"].invoke
|
47
|
+
end
|
48
|
+
|
49
|
+
task "version:bump_major" do
|
50
|
+
Rake::Task["changelog:archive"].invoke
|
51
|
+
maj, _min, _build = Chef::VERSION.split(".")
|
52
|
+
File.open("VERSION", "w+") { |f| f.write("#{maj.to_i + 1}.0.0") }
|
53
|
+
Rake::Task["version"].invoke
|
54
|
+
Rake::Task["bundle:install"].invoke
|
55
|
+
end
|
56
|
+
|
40
57
|
task :pedant, :chef_zero_spec
|
41
58
|
|
42
59
|
task :build_eventlog do
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
12.
|
1
|
+
12.17.44
|
data/acceptance/Gemfile.lock
CHANGED
@@ -9,14 +9,17 @@ GIT
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
addressable (2.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
addressable (2.5.0)
|
13
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
14
|
+
artifactory (2.5.1)
|
15
|
+
aws-sdk (2.6.32)
|
16
|
+
aws-sdk-resources (= 2.6.32)
|
17
|
+
aws-sdk-core (2.6.32)
|
18
|
+
aws-sigv4 (~> 1.0)
|
17
19
|
jmespath (~> 1.0)
|
18
|
-
aws-sdk-resources (2.6.
|
19
|
-
aws-sdk-core (= 2.6.
|
20
|
+
aws-sdk-resources (2.6.32)
|
21
|
+
aws-sdk-core (= 2.6.32)
|
22
|
+
aws-sigv4 (1.0.0)
|
20
23
|
berkshelf (4.3.5)
|
21
24
|
addressable (~> 2.3, >= 2.3.4)
|
22
25
|
berkshelf-api-client (~> 2.0, >= 2.0.2)
|
@@ -53,7 +56,7 @@ GEM
|
|
53
56
|
celluloid-io (0.16.2)
|
54
57
|
celluloid (>= 0.16.0)
|
55
58
|
nio4r (>= 1.1.0)
|
56
|
-
chef-config (12.
|
59
|
+
chef-config (12.16.42)
|
57
60
|
addressable
|
58
61
|
fuzzyurl
|
59
62
|
mixlib-config (~> 2.0)
|
@@ -61,7 +64,7 @@ GEM
|
|
61
64
|
cleanroom (1.0.0)
|
62
65
|
coderay (1.1.1)
|
63
66
|
diff-lcs (1.2.5)
|
64
|
-
docker-api (1.
|
67
|
+
docker-api (1.33.0)
|
65
68
|
excon (>= 0.38.0)
|
66
69
|
json
|
67
70
|
erubis (2.7.0)
|
@@ -77,7 +80,7 @@ GEM
|
|
77
80
|
hashie (3.4.6)
|
78
81
|
hitimes (1.2.4)
|
79
82
|
httpclient (2.7.2)
|
80
|
-
inspec (1.
|
83
|
+
inspec (1.7.0)
|
81
84
|
hashie (~> 3.4)
|
82
85
|
json (>= 1.8, < 3.0)
|
83
86
|
method_source (~> 0.8)
|
@@ -87,6 +90,7 @@ GEM
|
|
87
90
|
rainbow (~> 2)
|
88
91
|
rspec (~> 3)
|
89
92
|
rspec-its (~> 1.2)
|
93
|
+
rspec_junit_formatter (~> 0.2.3)
|
90
94
|
rubyzip (~> 1.1)
|
91
95
|
sslshake (~> 1)
|
92
96
|
thor (~> 0.19)
|
@@ -99,10 +103,11 @@ GEM
|
|
99
103
|
multi_json
|
100
104
|
retryable (~> 2.0)
|
101
105
|
test-kitchen (~> 1.4, >= 1.4.1)
|
102
|
-
kitchen-inspec (0.
|
103
|
-
|
106
|
+
kitchen-inspec (0.16.1)
|
107
|
+
hashie (~> 3.4)
|
108
|
+
inspec (>= 0.34.0, < 2.0.0)
|
104
109
|
test-kitchen (~> 1.6)
|
105
|
-
kitchen-vagrant (0.
|
110
|
+
kitchen-vagrant (0.21.0)
|
106
111
|
test-kitchen (~> 1.4)
|
107
112
|
little-plugger (1.1.4)
|
108
113
|
logging (2.1.0)
|
@@ -132,13 +137,14 @@ GEM
|
|
132
137
|
net-ssh (>= 2.6.5)
|
133
138
|
nio4r (1.2.1)
|
134
139
|
nori (2.6.0)
|
135
|
-
octokit (4.
|
136
|
-
sawyer (~> 0.
|
137
|
-
parallel (1.
|
140
|
+
octokit (4.6.2)
|
141
|
+
sawyer (~> 0.8.0, >= 0.5.3)
|
142
|
+
parallel (1.10.0)
|
138
143
|
pry (0.10.4)
|
139
144
|
coderay (~> 1.1.0)
|
140
145
|
method_source (~> 0.8.1)
|
141
146
|
slop (~> 3.4)
|
147
|
+
public_suffix (2.0.4)
|
142
148
|
rainbow (2.1.0)
|
143
149
|
retryable (2.0.4)
|
144
150
|
ridley (4.6.1)
|
@@ -175,19 +181,22 @@ GEM
|
|
175
181
|
diff-lcs (>= 1.2.0, < 2.0)
|
176
182
|
rspec-support (~> 3.5.0)
|
177
183
|
rspec-support (3.5.0)
|
184
|
+
rspec_junit_formatter (0.2.3)
|
185
|
+
builder (< 4)
|
186
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
178
187
|
rubyntlm (0.6.1)
|
179
188
|
rubyzip (1.2.0)
|
180
189
|
safe_yaml (1.0.4)
|
181
|
-
sawyer (0.
|
182
|
-
addressable (>= 2.3.5, < 2.
|
183
|
-
faraday (~> 0.8, < 0
|
190
|
+
sawyer (0.8.1)
|
191
|
+
addressable (>= 2.3.5, < 2.6)
|
192
|
+
faraday (~> 0.8, < 1.0)
|
184
193
|
semverse (1.2.1)
|
185
194
|
slop (3.6.0)
|
186
195
|
solve (2.0.3)
|
187
196
|
molinillo (~> 0.4.2)
|
188
197
|
semverse (~> 1.1)
|
189
198
|
sslshake (1.0.13)
|
190
|
-
test-kitchen (1.
|
199
|
+
test-kitchen (1.14.0)
|
191
200
|
mixlib-install (>= 1.2, < 3.0)
|
192
201
|
mixlib-shellout (>= 1.2, < 3.0)
|
193
202
|
net-scp (~> 1.1)
|
@@ -195,10 +204,10 @@ GEM
|
|
195
204
|
net-ssh-gateway (~> 1.2.0)
|
196
205
|
safe_yaml (~> 1.0)
|
197
206
|
thor (~> 0.18)
|
198
|
-
thor (0.19.
|
207
|
+
thor (0.19.4)
|
199
208
|
timers (4.0.4)
|
200
209
|
hitimes
|
201
|
-
train (0.
|
210
|
+
train (0.22.0)
|
202
211
|
docker-api (~> 1.26)
|
203
212
|
json (>= 1.8, < 3.0)
|
204
213
|
mixlib-shellout (~> 2.0)
|
@@ -245,4 +254,4 @@ DEPENDENCIES
|
|
245
254
|
winrm-elevated
|
246
255
|
|
247
256
|
BUNDLED WITH
|
248
|
-
1.
|
257
|
+
1.13.6
|
@@ -33,10 +33,11 @@ the specified _directory_.
|
|
33
33
|
* On a freshly installed Chef Server, use _knife configure -i_ to
|
34
34
|
create an administrator and knife configuration file. Leave the
|
35
35
|
field blank to accept the default value. On most systems, the
|
36
|
-
default values are acceptable
|
36
|
+
default values are acceptable (except for the chef server URL,
|
37
|
+
there you must add your organization name)
|
37
38
|
|
38
39
|
user@host$ knife configure -i
|
39
|
-
Please enter the chef server URL: [http://localhost
|
40
|
+
Please enter the chef server URL: [http://localhost/organizations/myorg]
|
40
41
|
Please enter a clientname for the new client: [username]
|
41
42
|
Please enter the existing admin clientname: [chef-webui]
|
42
43
|
Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem]
|
@@ -17,4 +17,4 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require "chef/chef_fs/file_system/exceptions"
|
20
|
-
Chef.
|
20
|
+
Chef.deprecated :internal_api, "Individual ChefFS error files are deprecated. Please require 'chef/chef_fs/file_system/exceptions' rather than 'chef/chef_fs/file_system/#{File.basename(__FILE__, ".rb")}'."
|
@@ -17,4 +17,4 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require "chef/chef_fs/file_system/exceptions"
|
20
|
-
Chef.
|
20
|
+
Chef.deprecated :internal_api, "Individual ChefFS error files are deprecated. Please require 'chef/chef_fs/file_system/exceptions' rather than 'chef/chef_fs/file_system/#{File.basename(__FILE__, ".rb")}'."
|
data/lib-backcompat/chef/chef_fs/file_system/default_environment_cannot_be_modified_error.rb
CHANGED
@@ -17,4 +17,4 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require "chef/chef_fs/file_system/exceptions"
|
20
|
-
Chef.
|
20
|
+
Chef.deprecated :internal_api, "Individual ChefFS error files are deprecated. Please require 'chef/chef_fs/file_system/exceptions' rather than 'chef/chef_fs/file_system/#{File.basename(__FILE__, ".rb")}'."
|
@@ -17,4 +17,4 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require "chef/chef_fs/file_system/exceptions"
|
20
|
-
Chef.
|
20
|
+
Chef.deprecated :internal_api, "Individual ChefFS error files are deprecated. Please require 'chef/chef_fs/file_system/exceptions' rather than 'chef/chef_fs/file_system/#{File.basename(__FILE__, ".rb")}'."
|
@@ -17,4 +17,4 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require "chef/chef_fs/file_system/exceptions"
|
20
|
-
Chef.
|
20
|
+
Chef.deprecated :internal_api, "Individual ChefFS error files are deprecated. Please require 'chef/chef_fs/file_system/exceptions' rather than 'chef/chef_fs/file_system/#{File.basename(__FILE__, ".rb")}'."
|
@@ -17,4 +17,4 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require "chef/chef_fs/file_system/exceptions"
|
20
|
-
Chef.
|
20
|
+
Chef.deprecated :internal_api, "Individual ChefFS error files are deprecated. Please require 'chef/chef_fs/file_system/exceptions' rather than 'chef/chef_fs/file_system/#{File.basename(__FILE__, ".rb")}'."
|
@@ -17,4 +17,4 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require "chef/chef_fs/file_system/exceptions"
|
20
|
-
Chef.
|
20
|
+
Chef.deprecated :internal_api, "Individual ChefFS error files are deprecated. Please require 'chef/chef_fs/file_system/exceptions' rather than 'chef/chef_fs/file_system/#{File.basename(__FILE__, ".rb")}'."
|
@@ -17,4 +17,4 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require "chef/chef_fs/file_system/exceptions"
|
20
|
-
Chef.
|
20
|
+
Chef.deprecated :internal_api, "Individual ChefFS error files are deprecated. Please require 'chef/chef_fs/file_system/exceptions' rather than 'chef/chef_fs/file_system/#{File.basename(__FILE__, ".rb")}'."
|
data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_entry.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "chef/chef_fs/file_system/repository/file_system_entry"
|
2
2
|
|
3
3
|
module Chef::ChefFS::FileSystem::Repository
|
4
|
-
Chef.
|
4
|
+
Chef.deprecated :internal_api, "Chef::ChefFS::FileSystem::Repository::ChefRepositoryFileSystemEntry is deprecated. Please use FileSystemEntry directly"
|
5
5
|
ChefRepositoryFileSystemEntry = FileSystemEntry
|
6
6
|
end
|
@@ -24,7 +24,7 @@ class Chef
|
|
24
24
|
module Repository
|
25
25
|
class FileSystemRootDir < FileSystemEntry
|
26
26
|
def initialize(file_path)
|
27
|
-
Chef.
|
27
|
+
Chef.deprecated :internal_api, "Chef::ChefFS::FileSystem::Repository::FileSystemRootDir is deprecated."
|
28
28
|
super("", nil, file_path)
|
29
29
|
end
|
30
30
|
end
|
data/lib/chef/api_client.rb
CHANGED
@@ -141,7 +141,7 @@ class Chef
|
|
141
141
|
end
|
142
142
|
|
143
143
|
def self.json_create(data)
|
144
|
-
Chef.
|
144
|
+
Chef.deprecated(:json_auto_inflate, "Auto inflation of JSON data is deprecated. Please use Chef::ApiClient#from_hash")
|
145
145
|
from_hash(data)
|
146
146
|
end
|
147
147
|
|
data/lib/chef/application.rb
CHANGED
@@ -333,7 +333,7 @@ class Chef
|
|
333
333
|
|
334
334
|
def emit_warnings
|
335
335
|
if Chef::Config[:chef_gem_compile_time]
|
336
|
-
Chef.
|
336
|
+
Chef.deprecated :chef_gem_compile_time, "setting chef_gem_compile_time to true is deprecated"
|
337
337
|
end
|
338
338
|
end
|
339
339
|
|
@@ -88,7 +88,7 @@ class Chef
|
|
88
88
|
|
89
89
|
def normalize_legacy_exit_code(exit_code)
|
90
90
|
case exit_code
|
91
|
-
when
|
91
|
+
when Integer
|
92
92
|
exit_code
|
93
93
|
when Exception
|
94
94
|
lookup_exit_code_by_exception(exit_code)
|
@@ -199,7 +199,7 @@ class Chef
|
|
199
199
|
|
200
200
|
def notify_on_deprecation(message)
|
201
201
|
begin
|
202
|
-
Chef.
|
202
|
+
Chef.deprecated(:exit_code, message)
|
203
203
|
rescue Chef::Exceptions::DeprecatedFeatureError
|
204
204
|
# Have to rescue this, otherwise this unhandled error preempts
|
205
205
|
# the current exit code assignment.
|
@@ -207,7 +207,7 @@ class Chef
|
|
207
207
|
end
|
208
208
|
|
209
209
|
def deprecation_warning
|
210
|
-
"Chef RFC 062 (https://github.com/chef/chef-rfc/master/rfc062-exit-status.md) defines the" \
|
210
|
+
"Chef RFC 062 (https://github.com/chef/chef-rfc/blob/master/rfc062-exit-status.md) defines the" \
|
211
211
|
" exit codes that should be used with Chef. Chef::Application::ExitCode defines valid exit codes" \
|
212
212
|
" In a future release, non-standard exit codes will be redefined as" \
|
213
213
|
" GENERIC_FAILURE unless `exit_status` is set to `:disabled` in your client.rb."
|
data/lib/chef/chef_class.rb
CHANGED
@@ -31,6 +31,7 @@ require "chef/platform/resource_priority_map"
|
|
31
31
|
require "chef/platform/provider_handler_map"
|
32
32
|
require "chef/platform/resource_handler_map"
|
33
33
|
require "chef/event_dispatch/dsl"
|
34
|
+
require "chef/deprecated"
|
34
35
|
|
35
36
|
class Chef
|
36
37
|
class << self
|
@@ -198,26 +199,35 @@ class Chef
|
|
198
199
|
#
|
199
200
|
# Emit a deprecation message.
|
200
201
|
#
|
201
|
-
# @param
|
202
|
+
# @param type The message to send. This should be a symbol, referring to
|
203
|
+
# a class defined in Chef::Deprecated
|
204
|
+
# @param message An explicit message to display, rather than the generic one
|
205
|
+
# associated with the deprecation.
|
202
206
|
# @param location The location. Defaults to the caller who called you (since
|
203
207
|
# generally the person who triggered the check is the one that needs to be
|
204
208
|
# fixed).
|
205
209
|
#
|
206
210
|
# @example
|
207
|
-
# Chef.
|
211
|
+
# Chef.deprecated(:my_deprecation, message: "This is deprecated!")
|
208
212
|
#
|
209
213
|
# @api private this will likely be removed in favor of an as-yet unwritten
|
210
214
|
# `Chef.log`
|
211
|
-
def
|
215
|
+
def deprecated(type, message, location = nil)
|
212
216
|
location ||= Chef::Log.caller_location
|
217
|
+
deprecation = Chef::Deprecated.create(type, message, location)
|
213
218
|
# `run_context.events` is the primary deprecation target if we're in a
|
214
219
|
# run. If we are not yet in a run, print to `Chef::Log`.
|
215
220
|
if run_context && run_context.events
|
216
|
-
run_context.events.deprecation(
|
221
|
+
run_context.events.deprecation(deprecation, location)
|
217
222
|
else
|
218
|
-
Chef::Log.deprecation(
|
223
|
+
Chef::Log.deprecation(deprecation, location)
|
219
224
|
end
|
220
225
|
end
|
226
|
+
|
227
|
+
def log_deprecation(message, location = nil)
|
228
|
+
location ||= Chef::Log.caller_location
|
229
|
+
Chef.deprecated(:generic, message, location)
|
230
|
+
end
|
221
231
|
end
|
222
232
|
|
223
233
|
# @api private Only for test dependency injection; not evenly implemented as yet.
|
@@ -44,6 +44,7 @@ require "chef/chef_fs/data_handler/role_data_handler"
|
|
44
44
|
require "chef/chef_fs/data_handler/user_data_handler"
|
45
45
|
require "chef/chef_fs/data_handler/group_data_handler"
|
46
46
|
require "chef/chef_fs/data_handler/container_data_handler"
|
47
|
+
require "chef/win32/security" if Chef::Platform.windows?
|
47
48
|
|
48
49
|
class Chef
|
49
50
|
module ChefFS
|
@@ -109,7 +110,17 @@ class Chef
|
|
109
110
|
else
|
110
111
|
child_paths[name].each do |path|
|
111
112
|
begin
|
112
|
-
Dir.mkdir(path)
|
113
|
+
Dir.mkdir(path, 0700)
|
114
|
+
if Chef::Platform.windows?
|
115
|
+
all_mask = Chef::ReservedNames::Win32::API::Security::GENERIC_ALL
|
116
|
+
owner = Chef::ReservedNames::Win32::Security::SID.current_user
|
117
|
+
dacl = Chef::ReservedNames::Win32::Security::ACL.create([
|
118
|
+
Chef::ReservedNames::Win32::Security::ACE.access_allowed(owner, all_mask),
|
119
|
+
])
|
120
|
+
so = Chef::ReservedNames::Win32::Security::SecurableObject.new(path)
|
121
|
+
so.owner = owner
|
122
|
+
so.set_dacl(dacl, false)
|
123
|
+
end
|
113
124
|
rescue Errno::EEXIST
|
114
125
|
end
|
115
126
|
end
|