[packages/chef/chef-14] up to 14.1.21
glen
glen at pld-linux.org
Mon Jul 16 13:49:37 CEST 2018
commit 4e5a0fdf1c8fe9286d18bea3c709e124941a22c4
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Mon Jul 16 14:42:00 2018 +0300
up to 14.1.21
re-created from chef-12 branch with master branch
FHS.patch | 293 +++++++++++++++++++++++++++++++++++++++++++++++----
chef.spec | 46 +-------
gemdeps.patch | 17 +--
optional-plist.patch | 36 ++-----
4 files changed, 298 insertions(+), 94 deletions(-)
---
diff --git a/chef.spec b/chef.spec
index 7ed2efc..ae1aa98 100644
--- a/chef.spec
+++ b/chef.spec
@@ -7,12 +7,12 @@
Summary: A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure
Name: chef
-Version: 12.10.24
-Release: 0.8
+Version: 14.1.21
+Release: 0.1
License: Apache v2.0
Group: Networking/Admin
Source0: https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 2390cdbde7445ccc288992401ed62f08
+# Source0-md5: b67966a9b9e6c0a5947a604239267415
Source2: %{name}.tmpfiles
Source3: https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh
# Source3-md5: a4c1e41370be8088a59ddb3b2e7ea397
@@ -136,7 +136,7 @@ cd chef-config
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{systemdtmpfilesdir}} \
$RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
$RPM_BUILD_ROOT%{ruby_specdir} \
$RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}}
@@ -144,9 +144,7 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{s
# chef
cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
-cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir}
cp -p chef-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/README.md
# chef-config
cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
@@ -166,12 +164,9 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_sysconfdir}/%{name}
%attr(755,root,root) %{_bindir}/chef-apply
%attr(755,root,root) %{_bindir}/chef-client
+%attr(755,root,root) %{_bindir}/chef-resource-inspector
%attr(755,root,root) %{_bindir}/chef-shell
%attr(755,root,root) %{_bindir}/chef-solo
-%{_mandir}/man1/chef-shell.1*
-%{_mandir}/man8/chef-apply.8*
-%{_mandir}/man8/chef-client.8*
-%{_mandir}/man8/chef-solo.8*
%{ruby_vendorlibdir}/chef.rb
%{ruby_vendorlibdir}/chef
%{ruby_specdir}/chef-%{version}.gemspec
@@ -204,37 +199,6 @@ rm -rf $RPM_BUILD_ROOT
%{ruby_vendorlibdir}/chef/knife
%{ruby_vendorlibdir}/chef/application/knife.rb
%{ruby_vendorlibdir}/chef/chef_fs/knife.rb
-%{_mandir}/man1/knife-bootstrap.1*
-%{_mandir}/man1/knife-client.1*
-%{_mandir}/man1/knife-configure.1*
-%{_mandir}/man1/knife-cookbook-site.1*
-%{_mandir}/man1/knife-cookbook.1*
-%{_mandir}/man1/knife-data-bag.1*
-%{_mandir}/man1/knife-delete.1*
-%{_mandir}/man1/knife-deps.1*
-%{_mandir}/man1/knife-diff.1*
-%{_mandir}/man1/knife-download.1*
-%{_mandir}/man1/knife-edit.1*
-%{_mandir}/man1/knife-environment.1*
-%{_mandir}/man1/knife-exec.1*
-%{_mandir}/man1/knife-index-rebuild.1*
-%{_mandir}/man1/knife-list.1*
-%{_mandir}/man1/knife-node.1*
-%{_mandir}/man1/knife-raw.1*
-%{_mandir}/man1/knife-recipe-list.1*
-%{_mandir}/man1/knife-role.1*
-%{_mandir}/man1/knife-search.1*
-%{_mandir}/man1/knife-serve.1*
-%{_mandir}/man1/knife-show.1*
-%{_mandir}/man1/knife-ssh.1*
-%{_mandir}/man1/knife-ssl-check.1*
-%{_mandir}/man1/knife-ssl-fetch.1*
-%{_mandir}/man1/knife-status.1*
-%{_mandir}/man1/knife-tag.1*
-%{_mandir}/man1/knife-upload.1*
-%{_mandir}/man1/knife-user.1*
-%{_mandir}/man1/knife-xargs.1*
-%{_mandir}/man1/knife.1*
%files -n bash-completion-knife
%defattr(644,root,root,755)
diff --git a/FHS.patch b/FHS.patch
index a5c17d4..97e0690 100644
--- a/FHS.patch
+++ b/FHS.patch
@@ -1,37 +1,292 @@
---- chef-11.8.0/lib/chef/handler/json_file.rb~ 2013-12-21 17:25:17.000000000 +0200
-+++ chef-11.8.0/lib/chef/handler/json_file.rb 2013-12-21 17:25:58.665209433 +0200
-@@ -27,7 +27,7 @@
-
- def initialize(config={})
- @config = config
-- @config[:path] ||= "/var/chef/reports"
-+ @config[:path] ||= "/var/lib/chef/reports"
- @config
- end
-
---- chef-12.10.24/chef-config/lib/chef-config/config.rb~ 2016-06-02 00:23:49.000000000 +0300
-+++ chef-12.10.24/chef-config/lib/chef-config/config.rb 2016-06-02 00:24:58.502867530 +0300
-@@ -170,7 +170,7 @@
+--- chef-14.1.21/chef-config/lib/chef-config/config.rb.orig 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/chef-config/lib/chef-config/config.rb 2018-07-14 22:03:35.187220811 +0200
+@@ -214,7 +214,7 @@
# Location of cookbooks on disk. String or array of strings.
# Defaults to <chef_repo_path>/cookbooks. If chef_repo_path
- # is not specified, this is set to [/var/chef/cookbooks, /var/chef/site-cookbooks]).
+ # is not specified, this is set to [/var/lib/chef/cookbooks, /var/lib/chef/site-cookbooks]).
default(:cookbook_path) do
- if self.configuration[:chef_repo_path]
+ if configuration[:chef_repo_path]
derive_path_from_chef_repo_path("cookbooks")
-@@ -234,10 +234,10 @@
- if local_mode
+@@ -279,9 +279,9 @@
PathHelper.join(config_dir, "local-mode-cache")
else
-- primary_cache_root = platform_specific_path("/var")
+ primary_cache_root = platform_specific_path("/var")
- primary_cache_path = platform_specific_path("/var/chef")
- # Use /var/chef as the cache path only if that folder exists and we can read and write
- # into it, or /var exists and we can read and write into it (we'll create /var/chef later).
-+ primary_cache_root = platform_specific_path("/var/cache")
+ primary_cache_path = platform_specific_path("/var/cache/chef")
+ # Use /var/cache/chef as the cache path only if that folder exists and we can read and write
+ # into it, or /var exists and we can read and write into it (we'll create /var/cache/chef later).
# Otherwise, we'll create .chef under the user's home directory and use that as
# the cache path.
unless path_accessible?(primary_cache_path) || path_accessible?(primary_cache_root)
+@@ -303,10 +303,10 @@
+ default(:checksum_path) { PathHelper.join(cache_path, "checksums") }
+
+ # Where chef's cache files should be stored
+- default(:file_cache_path) { PathHelper.join(cache_path, "cache") }
++ default(:file_cache_path) { cache_path }
+
+ # Where backups of chef-managed files should go
+- default(:file_backup_path) { PathHelper.join(cache_path, "backup") }
++ default(:file_backup_path) { "/var/lib/chef/backup" }
+
+ # The chef-client (or solo) lockfile.
+ #
+--- chef-14.1.21/chef-config/spec/unit/config_spec.rb.orig 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/chef-config/spec/unit/config_spec.rb 2018-07-14 22:10:47.642865027 +0200
+@@ -252,7 +252,7 @@
+ if is_windows
+ "#{ChefConfig::Config.env['SYSTEMDRIVE']}\\chef"
+ else
+- "/var/chef"
++ "/var/cache/chef"
+ end
+ end
+
+@@ -375,34 +375,34 @@
+ allow(File).to receive(:expand_path).and_return("#{ChefConfig::Config.env["SYSTEMDRIVE"]}/Path/To/Executable")
+ end
+ end
+- context "when /var/chef exists and is accessible" do
+- it "defaults to /var/chef" do
+- allow(ChefConfig::Config).to receive(:path_accessible?).with(to_platform("/var/chef")).and_return(true)
++ context "when /var/cache/chef exists and is accessible" do
++ it "defaults to /var/cache/chef" do
++ allow(ChefConfig::Config).to receive(:path_accessible?).with(to_platform("/var/cache/chef")).and_return(true)
+ expect(ChefConfig::Config[:cache_path]).to eq(primary_cache_path)
+ end
+ end
+
+- context "when /var/chef does not exist and /var is accessible" do
+- it "defaults to /var/chef" do
+- allow(File).to receive(:exists?).with(to_platform("/var/chef")).and_return(false)
+- allow(ChefConfig::Config).to receive(:path_accessible?).with(to_platform("/var")).and_return(true)
++ context "when /var/cache/chef does not exist and /var is accessible" do
++ it "defaults to /var/cache/chef" do
++ allow(File).to receive(:exists?).with(to_platform("/var/cache/chef")).and_return(false)
++ allow(ChefConfig::Config).to receive(:path_accessible?).with(to_platform("/var/cache")).and_return(true)
+ expect(ChefConfig::Config[:cache_path]).to eq(primary_cache_path)
+ end
+ end
+
+- context "when /var/chef does not exist and /var is not accessible" do
++ context "when /var/cache/chef does not exist and /var is not accessible" do
+ it "defaults to $HOME/.chef" do
+- allow(File).to receive(:exists?).with(to_platform("/var/chef")).and_return(false)
+- allow(ChefConfig::Config).to receive(:path_accessible?).with(to_platform("/var")).and_return(false)
++ allow(File).to receive(:exists?).with(to_platform("/var/cache/chef")).and_return(false)
++ allow(ChefConfig::Config).to receive(:path_accessible?).with(to_platform("/var/cache")).and_return(false)
+ expect(ChefConfig::Config[:cache_path]).to eq(secondary_cache_path)
+ end
+ end
+
+- context "when /var/chef exists and is not accessible" do
++ context "when /var/cache/chef exists and is not accessible" do
+ it "defaults to $HOME/.chef" do
+- allow(File).to receive(:exists?).with(to_platform("/var/chef")).and_return(true)
+- allow(File).to receive(:readable?).with(to_platform("/var/chef")).and_return(true)
+- allow(File).to receive(:writable?).with(to_platform("/var/chef")).and_return(false)
++ allow(File).to receive(:exists?).with(to_platform("/var/cache/chef")).and_return(true)
++ allow(File).to receive(:readable?).with(to_platform("/var/cache/chef")).and_return(true)
++ allow(File).to receive(:writable?).with(to_platform("/var/cache/chef")).and_return(false)
+
+ expect(ChefConfig::Config[:cache_path]).to eq(secondary_cache_path)
+ end
+@@ -447,10 +447,8 @@
+ expect(ChefConfig::Config[:download_progress_interval]).to eq(10)
+ end
+
+- it "ChefConfig::Config[:file_backup_path] defaults to /var/chef/backup" do
+- allow(ChefConfig::Config).to receive(:cache_path).and_return(primary_cache_path)
+- backup_path = is_windows ? "#{primary_cache_path}\\backup" : "#{primary_cache_path}/backup"
+- expect(ChefConfig::Config[:file_backup_path]).to eq(backup_path)
++ it "ChefConfig::Config[:file_backup_path] defaults to /var/lib/chef/backup" do
++ expect(ChefConfig::Config[:file_backup_path]).to eq("/var/lib/chef/backup")
+ end
+
+ it "ChefConfig::Config[:ssl_verify_mode] defaults to :verify_peer" do
+@@ -568,19 +566,19 @@
+ end
+ end
+
+- it "ChefConfig::Config[:data_bag_path] defaults to /var/chef/data_bags" do
++ it "ChefConfig::Config[:data_bag_path] defaults to /var/cache/chef/data_bags" do
+ allow(ChefConfig::Config).to receive(:cache_path).and_return(primary_cache_path)
+ data_bag_path = is_windows ? "#{primary_cache_path}\\data_bags" : "#{primary_cache_path}/data_bags"
+ expect(ChefConfig::Config[:data_bag_path]).to eq(data_bag_path)
+ end
+
+- it "ChefConfig::Config[:environment_path] defaults to /var/chef/environments" do
++ it "ChefConfig::Config[:environment_path] defaults to /var/cache/chef/environments" do
+ allow(ChefConfig::Config).to receive(:cache_path).and_return(primary_cache_path)
+ environment_path = is_windows ? "#{primary_cache_path}\\environments" : "#{primary_cache_path}/environments"
+ expect(ChefConfig::Config[:environment_path]).to eq(environment_path)
+ end
+
+- it "ChefConfig::Config[:cookbook_artifact_path] defaults to /var/chef/cookbook_artifacts" do
++ it "ChefConfig::Config[:cookbook_artifact_path] defaults to /var/cache/chef/cookbook_artifacts" do
+ allow(ChefConfig::Config).to receive(:cache_path).and_return(primary_cache_path)
+ environment_path = is_windows ? "#{primary_cache_path}\\cookbook_artifacts" : "#{primary_cache_path}/cookbook_artifacts"
+ expect(ChefConfig::Config[:cookbook_artifact_path]).to eq(environment_path)
+--- chef-14.1.21/lib/chef/handler/json_file.rb~ 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/lib/chef/handler/json_file.rb 2018-07-14 22:11:41.547750482 +0200
+@@ -27,7 +27,7 @@
+
+ def initialize(config = {})
+ @config = config
+- @config[:path] ||= "/var/chef/reports"
++ @config[:path] ||= "/var/lib/chef/reports"
+ end
+
+ def report
+--- chef-14.1.21/spec/support/shared/context/client.rb~ 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/spec/support/shared/context/client.rb 2018-07-14 22:12:36.736009017 +0200
+@@ -164,7 +164,7 @@
+
+ before do
+ Chef::Config[:client_fork] = enable_fork
+- Chef::Config[:cache_path] = windows? ? 'C:\chef' : "/var/chef"
++ Chef::Config[:cache_path] = windows? ? 'C:\chef' : "/var/cache/chef"
+ Chef::Config[:why_run] = false
+ Chef::Config[:audit_mode] = :enabled
+ Chef::Config[:chef_guid] = "default-guid"
+--- chef-14.1.21/spec/support/shared/context/config.rb~ 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/spec/support/shared/context/config.rb 2018-07-14 22:12:53.026479395 +0200
+@@ -13,7 +13,7 @@
+ # Basic config. Nothing fancy.
+ shared_context "default config options" do
+ before do
+- Chef::Config[:cache_path] = windows? ? 'C:\chef' : "/var/chef"
++ Chef::Config[:cache_path] = windows? ? 'C:\chef' : "/var/cache/chef"
+ end
+
+ # Don't need to have an after block to reset the config...
+--- chef-14.1.21/spec/unit/application/solo_spec.rb~ 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/spec/unit/application/solo_spec.rb 2018-07-14 22:13:57.265002987 +0200
+@@ -206,10 +206,10 @@
+ end
+
+ it "sets the repo path" do
+- expect(Chef::Config).to receive(:find_chef_repo_path).and_return("/var/chef")
++ expect(Chef::Config).to receive(:find_chef_repo_path).and_return("/var/lib/chef")
+ app.reconfigure
+ expect(Chef::Config.has_key?(:chef_repo_path)).to be_truthy
+- expect(Chef::Config[:chef_repo_path]).to eq ("/var/chef")
++ expect(Chef::Config[:chef_repo_path]).to eq ("/var/lib/chef")
+ end
+
+ it "runs chef-client in local mode" do
+--- chef-14.1.21/spec/unit/cookbook/file_vendor_spec.rb~ 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/spec/unit/cookbook/file_vendor_spec.rb 2018-07-14 22:14:31.759334653 +0200
+@@ -75,7 +75,7 @@
+
+ context "when configured to load files from disk" do
+
+- let(:cookbook_path) { %w{/var/chef/cookbooks /var/chef/other_cookbooks} }
++ let(:cookbook_path) { %w{/var/lib/chef/cookbooks /var/lib/chef/other_cookbooks} }
+
+ let(:manifest) do
+ cbv = Chef::CookbookVersion.new("bob", Array(Dir.tmpdir))
+--- chef-14.1.21/spec/unit/data_bag_spec.rb~ 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/spec/unit/data_bag_spec.rb 2018-07-14 22:15:36.734550542 +0200
+@@ -243,17 +243,17 @@
+
+ expect do
+ Chef::DataBag.load("foo")
+- end.to raise_error Chef::Exceptions::InvalidDataBagPath, "Data bag path '/var/chef/data_bags' is invalid"
++ end.to raise_error Chef::Exceptions::InvalidDataBagPath, "Data bag path '/var/cache/chef/data_bags' is invalid"
+ end
+
+ end
+
+ describe "data bag with string path" do
+- it_should_behave_like "data bag in solo mode", "/var/chef/data_bags"
++ it_should_behave_like "data bag in solo mode", "/var/cache/chef/data_bags"
+ end
+
+ describe "data bag with array path" do
+- it_should_behave_like "data bag in solo mode", ["/var/chef/data_bags", "/var/chef/data_bags_2"]
++ it_should_behave_like "data bag in solo mode", ["/var/cache/chef/data_bags", "/var/cache/chef/data_bags_2"]
+ end
+ end
+
+--- chef-14.1.21/spec/unit/environment_spec.rb~ 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/spec/unit/environment_spec.rb 2018-07-14 22:16:20.332481816 +0200
+@@ -393,7 +393,7 @@
+ describe "in solo mode" do
+ before do
+ Chef::Config[:solo_legacy_mode] = true
+- Chef::Config[:environment_path] = "/var/chef/environments"
++ Chef::Config[:environment_path] = "/var/cache/chef/environments"
+ end
+
+ after do
+@@ -452,7 +452,7 @@
+
+ expect do
+ Chef::Environment.load("foo")
+- end.to raise_error Chef::Exceptions::InvalidEnvironmentPath, "Environment path '/var/chef/environments' is invalid"
++ end.to raise_error Chef::Exceptions::InvalidEnvironmentPath, "Environment path '/var/cache/chef/environments' is invalid"
+ end
+
+ it "should raise an error if the file does not exist" do
+--- chef-14.1.21/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb~ 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb 2018-07-14 22:17:33.390766108 +0200
+@@ -42,7 +42,7 @@
+ @outputter = Chef::Formatters::IndentableOutputStream.new(@stdout, STDERR)
+ #@outputter = Chef::Formatters::IndentableOutputStream.new(STDOUT, STDERR)
+
+- allow(Chef::Config).to receive(:cookbook_path).and_return([ "/var/chef/cache" ])
++ allow(Chef::Config).to receive(:cookbook_path).and_return([ "/var/lib/chef" ])
+ end
+
+ describe "when explaining an error converging a resource" do
+@@ -58,8 +58,8 @@
+ end
+
+ @trace = [
+- "/var/chef/cache/cookbooks/syntax-err/recipes/default.rb:14:in `from_file'",
+- "/var/chef/cache/cookbooks/syntax-err/recipes/default.rb:11:in `from_file'",
++ "/var/lib/chef/cookbooks/syntax-err/recipes/default.rb:14:in `from_file'",
++ "/var/lib/chef/cookbooks/syntax-err/recipes/default.rb:11:in `from_file'",
+ "/usr/local/lib/ruby/gems/chef/lib/chef/client.rb:123:in `run'" # should not display
+ ]
+ @exception = Chef::Exceptions::Package.new("No such package 'non-existing-package'")
+@@ -70,8 +70,8 @@
+
+ it "filters chef core code from the backtrace" do
+ @expected_filtered_trace = [
+- "/var/chef/cache/cookbooks/syntax-err/recipes/default.rb:14:in `from_file'",
+- "/var/chef/cache/cookbooks/syntax-err/recipes/default.rb:11:in `from_file'",
++ "/var/lib/chef/cookbooks/syntax-err/recipes/default.rb:14:in `from_file'",
++ "/var/lib/chef/cookbooks/syntax-err/recipes/default.rb:11:in `from_file'",
+ ]
+
+ expect(@inspector.filtered_bt).to eq(@expected_filtered_trace)
+--- chef-14.1.21/spec/unit/role_spec.rb~ 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/spec/unit/role_spec.rb 2018-07-14 22:18:45.421896466 +0200
+@@ -252,7 +252,7 @@
+
+ describe "when loading from disk" do
+ before do
+- default_cache_path = windows? ? 'C:\chef' : "/var/chef"
++ default_cache_path = windows? ? 'C:\chef' : "/var/cache/chef"
+ allow(Chef::Config).to receive(:cache_path).and_return(default_cache_path)
+ end
+
+--- chef-14.1.21/spec/unit/run_lock_spec.rb~ 2018-05-21 18:22:54.000000000 +0200
++++ chef-14.1.21/spec/unit/run_lock_spec.rb 2018-07-14 22:19:37.309448017 +0200
+@@ -20,8 +20,8 @@
+
+ describe Chef::RunLock do
+
+- default_cache_path = windows? ? 'C:\chef' : "/var/chef"
+- default_pid_location = windows? ? 'C:\chef\cache\chef-client-running.pid' : "/var/chef/cache/chef-client-running.pid"
++ default_cache_path = windows? ? 'C:\chef' : "/var/cache/chef"
++ default_pid_location = windows? ? 'C:\chef\cache\chef-client-running.pid' : "/var/cache/chef/chef-client-running.pid"
+
+ describe "when first created" do
+ it "locates the lockfile in the file cache path by default" do
diff --git a/gemdeps.patch b/gemdeps.patch
index b8f118d..f61a5a7 100644
--- a/gemdeps.patch
+++ b/gemdeps.patch
@@ -1,15 +1,18 @@
---- chef-12.10.24/chef.gemspec 2016-06-02 22:12:49.407279113 +0300
-+++ chef-12.10.24/chef.gemspec 2016-06-02 22:28:11.841446131 +0300
-@@ -31,25 +31,11 @@
+--- chef-14.1.21/chef.gemspec~ 2018-05-21 19:22:54.000000000 +0300
++++ chef-14.1.21/chef.gemspec 2018-07-16 14:45:25.219811439 +0300
+@@ -34,28 +34,15 @@
s.add_dependency "erubis", "~> 2.7"
s.add_dependency "diff-lcs", "~> 1.2", ">= 1.2.4"
-- s.add_dependency "chef-zero", "~> 4.5"
+- s.add_dependency "chef-zero", ">= 13.0"
-
- s.add_dependency "plist", "~> 3.2"
--
+ s.add_dependency "iniparse", "~> 1.4"
+ s.add_dependency "addressable"
+ s.add_dependency "iso8601", "~> 0.9.1"
+
- # Audit mode requires these, so they are non-developmental dependencies now
-- %w{rspec-core rspec-expectations rspec-mocks}.each { |gem| s.add_dependency gem, "~> 3.4" }
+- %w{rspec-core rspec-expectations rspec-mocks}.each { |gem| s.add_dependency gem, "~> 3.5" }
- s.add_dependency "rspec_junit_formatter", "~> 0.2.0"
- s.add_dependency "serverspec", "~> 2.7"
- s.add_dependency "specinfra", "~> 2.10"
@@ -24,5 +27,5 @@
- s.add_dependency "bundler", ">= 1.10"
-
s.bindir = "bin"
- s.executables = %w{ chef-client chef-solo knife chef-shell chef-apply }
+ s.executables = %w{ chef-client chef-solo knife chef-shell chef-apply chef-resource-inspector }
diff --git a/optional-plist.patch b/optional-plist.patch
index 38c8071..a348365 100644
--- a/optional-plist.patch
+++ b/optional-plist.patch
@@ -1,5 +1,5 @@
---- chef-12.10.24/lib/chef/provider/user/dscl.rb~ 2016-06-01 23:58:45.000000000 +0300
-+++ chef-12.10.24/lib/chef/provider/user/dscl.rb 2016-06-02 00:00:22.479841208 +0300
+--- 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"
@@ -8,7 +8,7 @@
require "chef/util/path_helper"
class Chef
-@@ -130,6 +129,7 @@
+@@ -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)
@@ -16,37 +16,19 @@
shadow_hash = Plist.parse_xml(shadow_hash_xml)
if shadow_hash["SALTED-SHA512"]
-@@ -589,6 +589,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}")
+ 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
-@@ -601,6 +602,7 @@
- # in DSCL_PROPERTY_MAP to the disk.
+@@ -604,6 +605,7 @@
#
def save_user_info(user_info)
-+ 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}")
---- ./lib/chef/provider/launchd.rb~ 2016-04-27 20:57:14.000000000 +0300
-+++ ./lib/chef/provider/launchd.rb 2016-06-02 22:33:01.049679641 +0300
-@@ -21,7 +21,6 @@
- require "chef/resource/file"
- require "chef/resource/cookbook_file"
- require "chef/resource/macosx_service"
--require "plist"
- require "forwardable"
-
- class Chef
-@@ -150,6 +149,7 @@
- end
-
- def content
-+ require "plist"
- plist_hash = new_resource.hash || gen_hash
- Plist::Emit.dump(plist_hash) unless plist_hash.nil?
- end
+ run_plutil("convert", "binary1", user_plist_file)
+ end
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/chef.git/commitdiff/4e5a0fdf1c8fe9286d18bea3c709e124941a22c4
More information about the pld-cvs-commit
mailing list