]> git.pld-linux.org Git - packages/chef.git/commitdiff
do not require plist when not using the feature
authorElan Ruusamäe <glen@delfi.ee>
Fri, 5 Dec 2014 12:56:51 +0000 (14:56 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 5 Dec 2014 12:56:51 +0000 (14:56 +0200)
chef.spec
optional-plist.patch [new file with mode: 0644]

index 0309a24718586d97cd20e6ad12889ded27afddff..a25770a6dcb5e6da7d72836121377f838465271a 100644 (file)
--- a/chef.spec
+++ b/chef.spec
@@ -21,6 +21,7 @@ Patch1:               FHS.patch
 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
@@ -70,6 +71,7 @@ Requires:     ruby-rubygems
 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)
 
@@ -111,6 +113,7 @@ gzip -d metadata
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
 
diff --git a/optional-plist.patch b/optional-plist.patch
new file mode 100644 (file)
index 0000000..cbaf5d8
--- /dev/null
@@ -0,0 +1,35 @@
+--- 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
This page took 0.041975 seconds and 4 git commands to generate.