summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md10
-rw-r--r--Gemfile.lock10
-rw-r--r--VERSION2
-rwxr-xr-xbin/chef-shell2
-rw-r--r--chef-config/lib/chef-config/version.rb2
-rw-r--r--lib/chef/cookbook/synchronizer.rb6
-rw-r--r--lib/chef/version.rb2
-rw-r--r--spec/unit/cookbook/synchronizer_spec.rb30
8 files changed, 48 insertions, 16 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6faf6faa1f..602c01b1a5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,15 +1,17 @@
<!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
-<!-- latest_release 13.4.36 -->
-## [v13.4.36](https://github.com/chef/chef/tree/v13.4.36) (2017-09-27)
+<!-- latest_release 13.5.5 -->
+## [v13.5.5](https://github.com/chef/chef/tree/v13.5.5) (2017-09-29)
#### Merged Pull Requests
-- fix password property is sensitive for mount resource [#6442](https://github.com/chef/chef/pull/6442) ([dimsh99](https://github.com/dimsh99))
+- Force encoding to UTF_8 in chef-shell to prevent failures [#6447](https://github.com/chef/chef/pull/6447) ([tas50](https://github.com/tas50))
<!-- latest_release -->
<!-- release_rollup since=12.21.14 -->
### Changes since 12.21.14 release
#### Merged Pull Requests
+- Force encoding to UTF_8 in chef-shell to prevent failures [#6447](https://github.com/chef/chef/pull/6447) ([tas50](https://github.com/tas50)) <!-- 13.5.5 -->
+- only warn about skipping sync once [#6454](https://github.com/chef/chef/pull/6454) ([Happycoil](https://github.com/Happycoil)) <!-- 13.5.4 -->
- Replace which apt-get check with simple debian check in apt resources [#6409](https://github.com/chef/chef/pull/6409) ([tas50](https://github.com/tas50)) <!-- 13.4.25 -->
- Quiet the output of the zypper refresh and add force [#6408](https://github.com/chef/chef/pull/6408) ([tas50](https://github.com/tas50)) <!-- 13.4.26 -->
- Remove unused requires in yum_repository [#6413](https://github.com/chef/chef/pull/6413) ([tas50](https://github.com/tas50)) <!-- 13.4.27 -->
@@ -1598,4 +1600,4 @@ of partial templates.
* Fixed a bug where nested resources that inherited from Resource::LWRPBase
would not share the same actions/default_action as their parent
* Raise error if a guard_interpreter is specified and a block is passed to a guard (conditional)
-* Allow specifying a guard_interpreter after a conditional on a resource (Fixes #1943)
+* Allow specifying a guard_interpreter after a conditional on a resource (Fixes #1943) \ No newline at end of file
diff --git a/Gemfile.lock b/Gemfile.lock
index 465ddbb2d9..a9f6f98127 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -17,10 +17,10 @@ GIT
PATH
remote: .
specs:
- chef (13.5.3)
+ chef (13.5.5)
addressable
bundler (>= 1.10)
- chef-config (= 13.5.3)
+ chef-config (= 13.5.5)
chef-zero (>= 13.0)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
@@ -47,10 +47,10 @@ PATH
specinfra (~> 2.10)
syslog-logger (~> 1.6)
uuidtools (~> 2.1.5)
- chef (13.5.3-universal-mingw32)
+ chef (13.5.5-universal-mingw32)
addressable
bundler (>= 1.10)
- chef-config (= 13.5.3)
+ chef-config (= 13.5.5)
chef-zero (>= 13.0)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
@@ -92,7 +92,7 @@ PATH
PATH
remote: chef-config
specs:
- chef-config (13.5.3)
+ chef-config (13.5.5)
addressable
fuzzyurl
mixlib-config (~> 2.0)
diff --git a/VERSION b/VERSION
index cd2c0e088c..4afeb76808 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-13.5.3 \ No newline at end of file
+13.5.5 \ No newline at end of file
diff --git a/bin/chef-shell b/bin/chef-shell
index 4d9300ebb7..9b10aa134b 100755
--- a/bin/chef-shell
+++ b/bin/chef-shell
@@ -23,6 +23,8 @@ begin
rescue LoadError
end
+Encoding.default_external = Encoding::UTF_8
+
require "irb"
require "irb/completion"
require "irb/ext/save-history"
diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb
index 5b585c851d..6256f9fc06 100644
--- a/chef-config/lib/chef-config/version.rb
+++ b/chef-config/lib/chef-config/version.rb
@@ -21,7 +21,7 @@
module ChefConfig
CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__)
- VERSION = "13.5.3"
+ VERSION = "13.5.5"
end
#
diff --git a/lib/chef/cookbook/synchronizer.rb b/lib/chef/cookbook/synchronizer.rb
index ed6b1d9700..991e418f99 100644
--- a/lib/chef/cookbook/synchronizer.rb
+++ b/lib/chef/cookbook/synchronizer.rb
@@ -154,6 +154,7 @@ class Chef
queue = Chef::Util::ThreadedJobQueue.new
+ Chef::Log.warn("skipping cookbook synchronization! DO NOT LEAVE THIS ENABLED IN PRODUCTION!!!") if Chef::Config[:skip_cookbook_sync]
files.each do |file|
queue << lambda do |lock|
full_file_path = sync_file(file)
@@ -279,10 +280,7 @@ class Chef
end
def cached_copy_up_to_date?(local_path, expected_checksum)
- if Chef::Config[:skip_cookbook_sync]
- Chef::Log.warn "skipping cookbook synchronization! DO NOT LEAVE THIS ENABLED IN PRODUCTION!!!"
- return true
- end
+ return true if Chef::Config[:skip_cookbook_sync]
if cache.has_key?(local_path)
current_checksum = CookbookVersion.checksum_cookbook_file(cache.load(local_path, false))
expected_checksum == current_checksum
diff --git a/lib/chef/version.rb b/lib/chef/version.rb
index ccdc73a90a..3cb78e8422 100644
--- a/lib/chef/version.rb
+++ b/lib/chef/version.rb
@@ -23,7 +23,7 @@ require "chef/version_string"
class Chef
CHEF_ROOT = File.expand_path("../..", __FILE__)
- VERSION = Chef::VersionString.new("13.5.3")
+ VERSION = Chef::VersionString.new("13.5.5")
end
#
diff --git a/spec/unit/cookbook/synchronizer_spec.rb b/spec/unit/cookbook/synchronizer_spec.rb
index 6578a9e670..1e6c9ef48c 100644
--- a/spec/unit/cookbook/synchronizer_spec.rb
+++ b/spec/unit/cookbook/synchronizer_spec.rb
@@ -116,9 +116,12 @@ describe Chef::CookbookSynchronizer do
let(:no_lazy_load) { true }
+ let(:skip_cookbook_sync) { false }
+
let(:synchronizer) do
Chef::Config[:no_lazy_load] = no_lazy_load
Chef::Config[:file_cache_path] = "/file-cache"
+ Chef::Config[:skip_cookbook_sync] = skip_cookbook_sync
Chef::CookbookSynchronizer.new(cookbook_manifest, events)
end
@@ -523,5 +526,32 @@ describe Chef::CookbookSynchronizer do
end
end
end
+
+ context "when Chef::Config[:skip_cookbook_sync] is true" do
+ let(:skip_cookbook_sync) { true }
+
+ it "loads the cookbook files and warns the user that this isn't supported" do
+ expect(file_cache).to receive(:load).
+ with("cookbooks/cookbook_a/recipes/default.rb", false).
+ once.
+ and_return("/file-cache/cookbooks/cookbook_a/recipes/default.rb")
+ expect(file_cache).to receive(:load).
+ with("cookbooks/cookbook_a/attributes/default.rb", false).
+ once.
+ and_return("/file-cache/cookbooks/cookbook_a/attributes/default.rb")
+ expect(file_cache).to receive(:load).
+ with("cookbooks/cookbook_a/templates/default/apache2.conf.erb", false).
+ once.
+ and_return("/file-cache/cookbooks/cookbook_a/templates/default/apache2.conf.erb")
+ expect(file_cache).to receive(:load).
+ with("cookbooks/cookbook_a/files/default/megaman.conf", false).
+ once.
+ and_return("/file-cache/cookbooks/cookbook_a/files/default/megaman.conf")
+ expect(Chef::Log).to receive(:warn).
+ with("skipping cookbook synchronization! DO NOT LEAVE THIS ENABLED IN PRODUCTION!!!").
+ once
+ synchronizer.sync_cookbooks
+ end
+ end
end
end