Patch2: poldek.patch
Patch3: https://github.com/glensc/chef/compare/pld-knife-boostrap.patch
# Patch3-md5: 8ff0fdfde6dc90018698775bf8f13062
+Patch4: optional-plist.patch
URL: https://wiki.opscode.com/display/chef/
BuildRequires: rpm-rubyprov
BuildRequires: rpmbuild(macros) >= 1.673
Requires: ruby-yajl < 2
Requires: ruby-yajl >= 1.1
Suggests: chef-zero >= 2.0
+Suggests: ruby-plist >= 3.1.0
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
--- /dev/null
+--- 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
+@@ -19,7 +19,6 @@
+ require 'mixlib/shellout'
+ require 'chef/provider/user'
+ require 'openssl'
+-require 'plist'
+
+ class Chef
+ class Provider
+@@ -125,6 +124,8 @@
+
+ # 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)
+
+ if shadow_hash["SALTED-SHA512"]
+@@ -558,6 +559,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)
+ rescue Chef::Exceptions::PlistUtilCommandFailed
+ end
+@@ -571,6 +573,7 @@
+ #
+ def save_user_info(user_info)
+ 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}")
+ end