]> git.pld-linux.org Git - packages/chef.git/blob - optional-plist.patch
update plist patch
[packages/chef.git] / optional-plist.patch
1 --- chef-14.1.21/lib/chef/provider/user/dscl.rb~        2018-05-21 18:22:54.000000000 +0200
2 +++ chef-14.1.21/lib/chef/provider/user/dscl.rb 2018-07-14 22:26:52.821861848 +0200
3 @@ -19,7 +19,6 @@
4  require "mixlib/shellout"
5  require "chef/provider/user"
6  require "openssl"
7 -require "plist"
8  require "chef/util/path_helper"
9  
10  class Chef
11 @@ -136,6 +135,7 @@
12  
13                # Calling shell_out directly since we want to give an input stream
14                shadow_hash_xml = convert_binary_plist_to_xml(shadow_hash_binary.string)
15 +              require "plist"
16                shadow_hash = Plist.parse_xml(shadow_hash_xml)
17  
18                if shadow_hash["SALTED-SHA512"]
19 @@ -591,6 +591,7 @@
20            begin
21              user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist"
22              user_plist_info = run_plutil("convert", "xml1", "-o", "-", user_plist_file)
23 +            require "plist"
24              user_info = Plist.parse_xml(user_plist_info)
25            rescue Chef::Exceptions::PlistUtilCommandFailed
26            end
27 @@ -604,6 +605,7 @@
28          #
29          def save_user_info(user_info)
30            user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist"
31 +          require "plist"
32            Plist::Emit.save_plist(user_info, user_plist_file)
33            run_plutil("convert", "binary1", user_plist_file)
34          end
35 --- chef-14.1.36/lib/chef/provider/launchd.rb~  2018-06-04 22:47:04.000000000 +0300
36 +++ chef-14.1.36/lib/chef/provider/launchd.rb   2018-07-16 17:04:37.751739371 +0300
37 @@ -20,7 +20,6 @@
38  require "chef/resource/file"
39  require "chef/resource/cookbook_file"
40  require "chef/resource/macosx_service"
41 -require "plist"
42  require "forwardable"
43  
44  class Chef
45 @@ -173,6 +172,8 @@
46        end
47  
48        def content
49 +        require "plist"
50 +
51          plist_hash = new_resource.plist_hash || gen_hash
52          Plist::Emit.dump(plist_hash) unless plist_hash.nil?
53        end
This page took 0.031946 seconds and 4 git commands to generate.