chef 18.1.29-x64-mingw-ucrt → 18.2.7-x64-mingw-ucrt
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/chef-universal-mingw-ucrt.gemspec +2 -2
- data/chef.gemspec +1 -2
- data/distro/powershell/chef/chef.psm1 +459 -0
- data/lib/chef/http/authenticator.rb +2 -2
- data/lib/chef/mixin/proxified_socket.rb +1 -1
- data/lib/chef/platform/query_helpers.rb +4 -2
- data/lib/chef/resource/macos_userdefaults.rb +9 -5
- data/lib/chef/resource/selinux_login.rb +129 -0
- data/lib/chef/resource/selinux_user.rb +137 -0
- data/lib/chef/resources.rb +2 -0
- data/lib/chef/version.rb +1 -1
- data/spec/data/trusted_certs/intermediate.pem +38 -27
- data/spec/data/trusted_certs/opscode.pem +33 -54
- data/spec/functional/resource/macos_userdefaults_spec.rb +4 -4
- data/spec/unit/resource/macos_user_defaults_spec.rb +4 -4
- data/spec/unit/resource/selinux_login_spec.rb +73 -0
- data/spec/unit/resource/selinux_user_spec.rb +92 -0
- metadata +17 -13
- data/lib/chef/powershell.rb +0 -81
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.
|
4
|
+
version: 18.2.7
|
5
5
|
platform: x64-mingw-ucrt
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-04 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.
|
19
|
+
version: 18.2.7
|
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.
|
26
|
+
version: 18.2.7
|
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.
|
33
|
+
version: 18.2.7
|
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.
|
40
|
+
version: 18.2.7
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -336,20 +336,20 @@ dependencies:
|
|
336
336
|
requirements:
|
337
337
|
- - "~>"
|
338
338
|
- !ruby/object:Gem::Version
|
339
|
-
version: '1.
|
339
|
+
version: '1.0'
|
340
340
|
- - ">="
|
341
341
|
- !ruby/object:Gem::Version
|
342
|
-
version: 1.
|
342
|
+
version: 1.0.3
|
343
343
|
type: :runtime
|
344
344
|
prerelease: false
|
345
345
|
version_requirements: !ruby/object:Gem::Requirement
|
346
346
|
requirements:
|
347
347
|
- - "~>"
|
348
348
|
- !ruby/object:Gem::Version
|
349
|
-
version: '1.
|
349
|
+
version: '1.0'
|
350
350
|
- - ">="
|
351
351
|
- !ruby/object:Gem::Version
|
352
|
-
version: 1.
|
352
|
+
version: 1.0.3
|
353
353
|
- !ruby/object:Gem::Dependency
|
354
354
|
name: chef-zero
|
355
355
|
requirement: !ruby/object:Gem::Requirement
|
@@ -710,14 +710,14 @@ dependencies:
|
|
710
710
|
requirements:
|
711
711
|
- - "~>"
|
712
712
|
- !ruby/object:Gem::Version
|
713
|
-
version:
|
713
|
+
version: 18.0.0
|
714
714
|
type: :runtime
|
715
715
|
prerelease: false
|
716
716
|
version_requirements: !ruby/object:Gem::Requirement
|
717
717
|
requirements:
|
718
718
|
- - "~>"
|
719
719
|
- !ruby/object:Gem::Version
|
720
|
-
version:
|
720
|
+
version: 18.0.0
|
721
721
|
description: A systems integration framework, built to bring the benefits of configuration
|
722
722
|
management to your entire infrastructure.
|
723
723
|
email: adam@chef.io
|
@@ -734,6 +734,7 @@ files:
|
|
734
734
|
- Rakefile
|
735
735
|
- chef-universal-mingw-ucrt.gemspec
|
736
736
|
- chef.gemspec
|
737
|
+
- distro/powershell/chef/chef.psm1
|
737
738
|
- distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll
|
738
739
|
- distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll
|
739
740
|
- distro/ruby_bin_folder/AMD64/Ijwhost.dll
|
@@ -1679,7 +1680,6 @@ files:
|
|
1679
1680
|
- lib/chef/policy_builder/dynamic.rb
|
1680
1681
|
- lib/chef/policy_builder/expand_node_object.rb
|
1681
1682
|
- lib/chef/policy_builder/policyfile.rb
|
1682
|
-
- lib/chef/powershell.rb
|
1683
1683
|
- lib/chef/property.rb
|
1684
1684
|
- lib/chef/provider.rb
|
1685
1685
|
- lib/chef/provider/batch.rb
|
@@ -1954,10 +1954,12 @@ files:
|
|
1954
1954
|
- lib/chef/resource/selinux_boolean.rb
|
1955
1955
|
- lib/chef/resource/selinux_fcontext.rb
|
1956
1956
|
- lib/chef/resource/selinux_install.rb
|
1957
|
+
- lib/chef/resource/selinux_login.rb
|
1957
1958
|
- lib/chef/resource/selinux_module.rb
|
1958
1959
|
- lib/chef/resource/selinux_permissive.rb
|
1959
1960
|
- lib/chef/resource/selinux_port.rb
|
1960
1961
|
- lib/chef/resource/selinux_state.rb
|
1962
|
+
- lib/chef/resource/selinux_user.rb
|
1961
1963
|
- lib/chef/resource/service.rb
|
1962
1964
|
- lib/chef/resource/smartos_package.rb
|
1963
1965
|
- lib/chef/resource/snap_package.rb
|
@@ -3116,10 +3118,12 @@ files:
|
|
3116
3118
|
- spec/unit/resource/selinux_boolean_spec.rb
|
3117
3119
|
- spec/unit/resource/selinux_fcontext_spec.rb
|
3118
3120
|
- spec/unit/resource/selinux_install_spec.rb
|
3121
|
+
- spec/unit/resource/selinux_login_spec.rb
|
3119
3122
|
- spec/unit/resource/selinux_module_spec.rb
|
3120
3123
|
- spec/unit/resource/selinux_permissive_spec.rb
|
3121
3124
|
- spec/unit/resource/selinux_port_spec.rb
|
3122
3125
|
- spec/unit/resource/selinux_state_spec.rb
|
3126
|
+
- spec/unit/resource/selinux_user_spec.rb
|
3123
3127
|
- spec/unit/resource/service_spec.rb
|
3124
3128
|
- spec/unit/resource/smartos_package_spec.rb
|
3125
3129
|
- spec/unit/resource/snap_package_spec.rb
|
data/lib/chef/powershell.rb
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Stuart Preston (<stuart@chef.io>)
|
3
|
-
# Copyright:: Copyright (c) Chef Software Inc.
|
4
|
-
# License:: Apache License, Version 2.0
|
5
|
-
#
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
# See the License for the specific language governing permissions and
|
16
|
-
# limitations under the License.
|
17
|
-
|
18
|
-
require "ffi" unless defined?(FFI)
|
19
|
-
require_relative "json_compat"
|
20
|
-
|
21
|
-
class Chef
|
22
|
-
class PowerShell
|
23
|
-
extend FFI::Library
|
24
|
-
|
25
|
-
attr_reader :result
|
26
|
-
attr_reader :errors
|
27
|
-
attr_reader :verbose
|
28
|
-
|
29
|
-
# Run a command under PowerShell via FFI
|
30
|
-
# This implementation requires the managed dll and native wrapper to be in the library search
|
31
|
-
# path on Windows (i.e. c:\windows\system32 or in the same location as ruby.exe).
|
32
|
-
#
|
33
|
-
# Requires: .NET Framework 4.0 or higher on the target machine.
|
34
|
-
#
|
35
|
-
# @param script [String] script to run
|
36
|
-
# @param timeout [Integer, nil] timeout in seconds.
|
37
|
-
# @return [Object] output
|
38
|
-
def initialize(script, timeout: -1)
|
39
|
-
# This Powershell DLL source lives here: https://github.com/chef/chef-powershell-shim
|
40
|
-
# Every merge into that repo triggers a Habitat build and promotion. Running
|
41
|
-
# the rake :update_chef_exec_dll task in this (chef/chef) repo will pull down
|
42
|
-
# the built packages and copy the binaries to distro/ruby_bin_folder. Bundle install
|
43
|
-
# ensures that the correct architecture binaries are installed into the path.
|
44
|
-
@dll ||= "Chef.PowerShell.Wrapper.dll"
|
45
|
-
exec(script, timeout: timeout)
|
46
|
-
end
|
47
|
-
|
48
|
-
#
|
49
|
-
# Was there an error running the command
|
50
|
-
#
|
51
|
-
# @return [Boolean]
|
52
|
-
#
|
53
|
-
def error?
|
54
|
-
return true if errors.count > 0
|
55
|
-
|
56
|
-
false
|
57
|
-
end
|
58
|
-
|
59
|
-
class CommandFailed < RuntimeError; end
|
60
|
-
|
61
|
-
#
|
62
|
-
# @raise [Chef::PowerShell::CommandFailed] raise if the command failed
|
63
|
-
#
|
64
|
-
def error!
|
65
|
-
raise Chef::PowerShell::CommandFailed, "Unexpected exit in PowerShell command: #{@errors}" if error?
|
66
|
-
end
|
67
|
-
|
68
|
-
private
|
69
|
-
|
70
|
-
def exec(script, timeout: -1)
|
71
|
-
FFI.ffi_lib @dll
|
72
|
-
FFI.attach_function :execute_powershell, :ExecuteScript, %i{string int}, :pointer
|
73
|
-
timeout = -1 if timeout == 0 || timeout.nil?
|
74
|
-
execution = FFI.execute_powershell(script, timeout).read_utf16string
|
75
|
-
hashed_outcome = Chef::JSONCompat.parse(execution)
|
76
|
-
@result = Chef::JSONCompat.parse(hashed_outcome["result"])
|
77
|
-
@errors = hashed_outcome["errors"]
|
78
|
-
@verbose = hashed_outcome["verbose"]
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|