]> git.pld-linux.org Git - packages/chef.git/blobdiff - optional-plist.patch
Apply chef/chef#7994 to fix invalid option: --no-rdoc error
[packages/chef.git] / optional-plist.patch
index cbaf5d80e44df929f9f7ef3c3444ee41efa6ca4b..dc02eb6bbb4aaeb3e7e3790b70da0bdaf23851ae 100644 (file)
@@ -1,35 +1,53 @@
---- chef-11.14.6/lib/chef/provider/user/dscl.rb~       2014-12-05 12:56:20.000000000 +0200
-+++ chef-11.14.6/lib/chef/provider/user/dscl.rb        2014-12-05 13:04:42.684470417 +0200
+--- chef-14.1.21/lib/chef/provider/user/dscl.rb~       2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/lib/chef/provider/user/dscl.rb        2018-07-14 22:26:52.821861848 +0200
 @@ -19,7 +19,6 @@
- require 'mixlib/shellout'
- require 'chef/provider/user'
- require 'openssl'
--require 'plist'
+ require "mixlib/shellout"
+ require "chef/provider/user"
+ require "openssl"
+-require "plist"
+ require "chef/util/path_helper"
  
  class Chef
-   class Provider
-@@ -125,6 +124,8 @@
+@@ -136,6 +135,7 @@
  
                # Calling shell_out directly since we want to give an input stream
                shadow_hash_xml = convert_binary_plist_to_xml(shadow_hash_binary.string)
-+
-+              require 'plist'
-               shadow_hash = Plist::parse_xml(shadow_hash_xml)
++              require "plist"
+               shadow_hash = Plist.parse_xml(shadow_hash_xml)
  
                if shadow_hash["SALTED-SHA512"]
-@@ -558,6 +559,7 @@
+@@ -591,6 +591,7 @@
            begin
-             user_plist_file = "#{USER_PLIST_DIRECTORY}/#{@new_resource.username}.plist"
-             user_plist_info = run_plutil("convert xml1 -o - #{user_plist_file}")
-+            require 'plist'
-             user_info = Plist::parse_xml(user_plist_info)
+             user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist"
+             user_plist_info = run_plutil("convert", "xml1", "-o", "-", user_plist_file)
++            require "plist"
+             user_info = Plist.parse_xml(user_plist_info)
            rescue Chef::Exceptions::PlistUtilCommandFailed
            end
-@@ -571,6 +573,7 @@
+@@ -604,6 +605,7 @@
          #
          def save_user_info(user_info)
-           user_plist_file = "#{USER_PLIST_DIRECTORY}/#{@new_resource.username}.plist"
-+          require 'plist'
+           user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist"
++          require "plist"
            Plist::Emit.save_plist(user_info, user_plist_file)
-           run_plutil("convert binary1 #{user_plist_file}")
+           run_plutil("convert", "binary1", user_plist_file)
          end
+--- chef-14.1.36/lib/chef/provider/launchd.rb~ 2018-06-04 22:47:04.000000000 +0300
++++ chef-14.1.36/lib/chef/provider/launchd.rb  2018-07-16 17:04:37.751739371 +0300
+@@ -20,7 +20,6 @@
+ require "chef/resource/file"
+ require "chef/resource/cookbook_file"
+ require "chef/resource/macosx_service"
+-require "plist"
+ require "forwardable"
+ class Chef
+@@ -173,6 +172,8 @@
+       end
+       def content
++        require "plist"
++
+         plist_hash = new_resource.plist_hash || gen_hash
+         Plist::Emit.dump(plist_hash) unless plist_hash.nil?
+       end
This page took 0.043309 seconds and 4 git commands to generate.