]> git.pld-linux.org Git - packages/chef.git/blob - optional-plist.patch
fix optional plist
[packages/chef.git] / optional-plist.patch
1 --- chef-12.10.24/lib/chef/provider/user/dscl.rb~       2016-06-01 23:58:45.000000000 +0300
2 +++ chef-12.10.24/lib/chef/provider/user/dscl.rb        2016-06-02 00:00:22.479841208 +0300
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 @@ -130,6 +129,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 @@ -589,6 +589,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 @@ -601,6 +602,7 @@
28          # in DSCL_PROPERTY_MAP to the disk.
29          #
30          def save_user_info(user_info)
31 +          require "plist"
32            user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist"
33            Plist::Emit.save_plist(user_info, user_plist_file)
34            run_plutil("convert binary1 #{user_plist_file}")
35 --- ./lib/chef/provider/launchd.rb~     2016-04-27 20:57:14.000000000 +0300
36 +++ ./lib/chef/provider/launchd.rb      2016-06-02 22:33:01.049679641 +0300
37 @@ -21,7 +21,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 @@ -150,6 +149,7 @@
46        end
47  
48        def content
49 +        require "plist"
50          plist_hash = new_resource.hash || gen_hash
51          Plist::Emit.dump(plist_hash) unless plist_hash.nil?
52        end
This page took 0.057569 seconds and 3 git commands to generate.