summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-12-04 16:35:40 -0800
committerTim Smith <tsmith@chef.io>2018-12-04 16:38:17 -0800
commite0a85cf1f9a7c1a0146aae70fe0ebbe3aa9f51d9 (patch)
treed6cfa08d10954ce061223d200f8854f32980f6e8
parent3584550db722a9c45a5d98c36eb93d7b814f801f (diff)
downloadchef-e0a85cf1f9a7c1a0146aae70fe0ebbe3aa9f51d9.tar.gz
Pin the ohai definition to use the ohai version from Gemfile.lock
Without this we end up with chef-client's definition using the version of ohai in the gemfile.lock and the ohai defintion using whatever is in master. This is bad for two reasons: 1. we're shipping an unreleased master version even when we ship chef 13 or chef 14 2. we ship the ohai gem twice which takes up space on disk Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--omnibus_overrides.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb
index 8664617310..4b1fa0163d 100644
--- a/omnibus_overrides.rb
+++ b/omnibus_overrides.rb
@@ -23,3 +23,8 @@ override "util-macros", version: "1.19.0"
override "xproto", version: "7.0.28"
override "zlib", version: "1.2.11"
override "openssl", version: "1.0.2q"
+
+# this pins the ohai omnibus definition ohai version to the same version that's
+# in the gemfile.lock, which is what the chef defition will end up using. If we
+# don't pin in this file we get master, which isn't the released version (usually)
+override "ohai", version: ::File.readlines("Gemfile.lock", File.expand_path(File.dirname(__FILE__))).find { |l| l =~ /^\s+ohai \((\d+\.\d+\.\d+)\)/ }; $1