diff options
author | Tim Smith <tsmith@chef.io> | 2018-12-05 15:24:33 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-05 15:24:33 -0800 |
commit | 091982a9d845070ed42a2cb20925fe4e17255902 (patch) | |
tree | 52be16b73fcb2e3a249e4f09500bc3cbd8eb3b9b | |
parent | 029adb60446f6ef3bbedeba5a98d01e288c8e788 (diff) | |
parent | ee07d1b58eb17c667742e9aae055556864281e91 (diff) | |
download | chef-091982a9d845070ed42a2cb20925fe4e17255902.tar.gz |
Merge pull request #8020 from chef/correct_ohai
Make sure the ohai CLI uses the same version of ohai as chef-client
-rw-r--r-- | omnibus_overrides.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb index 8664617310..d3ee80b78a 100644 --- a/omnibus_overrides.rb +++ b/omnibus_overrides.rb @@ -23,3 +23,11 @@ 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" + +# we build both a chef and ohai omnibus-software defintion which create the +# chef-client and ohai binstubs. Out of the box the ohai definition uses whatever +# is in master, which won't match what's in the Gemfile.lock and used by the chef +# definition. This pin will ensure that ohai and chef-client commands use the +# same (released) version of ohai. +gemfile_lock = File.join(File.expand_path(File.dirname(__FILE__)), "Gemfile.lock") +override "ohai", version: "#{::File.readlines(gemfile_lock).find { |l| l =~ /^\s+ohai \((\d+\.\d+\.\d+)\)/ }; 'v' + $1}" # rubocop: disable Layout/SpaceInsideStringInterpolation |