summaryrefslogtreecommitdiff
path: root/omnibus
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-04-18 13:37:52 -0700
committerJohn Keiser <john@johnkeiser.com>2016-04-18 14:21:02 -0700
commit4ac5018092e0dcd4fefa1813cc99ce7cc393b2f2 (patch)
tree0c1ec15e4c92e49abc5adebbaadfe7cf6d9c62c4 /omnibus
parent9971604ce1556585552a95c937f59355316f3294 (diff)
downloadchef-4ac5018092e0dcd4fefa1813cc99ce7cc393b2f2.tar.gz
Don't update fips serverspec Gemfile.lock
Diffstat (limited to 'omnibus')
-rw-r--r--omnibus/config/software/chef.rb10
-rw-r--r--omnibus/files/chef-appbundle/build-chef-appbundle.rb2
-rw-r--r--omnibus/files/chef-gem/build-chef-gem.rb2
-rw-r--r--omnibus/files/chef/build-chef.rb18
4 files changed, 16 insertions, 16 deletions
diff --git a/omnibus/config/software/chef.rb b/omnibus/config/software/chef.rb
index 4b4e9c2850..49db136e94 100644
--- a/omnibus/config/software/chef.rb
+++ b/omnibus/config/software/chef.rb
@@ -57,17 +57,17 @@ build do
require_relative "../../files/chef/build-chef"
extend BuildChef
- chef_build_env = env.dup
- chef_build_env["BUNDLE_GEMFILE"] = chef_gemfile
+ project_env = env.dup
+ project_env["BUNDLE_GEMFILE"] = project_gemfile
# Prepare to install: build config, retries, job, frozen=true
# TODO Windows install seems to sometimes install already-installed gems such
# as gherkin (and fail as a result) if you use jobs > 1.
- create_bundle_config(chef_gemfile, retries: 4, jobs: windows? ? 1 : 7, frozen: true)
+ create_bundle_config(project_gemfile, retries: 4, jobs: windows? ? 1 : 7, frozen: true)
# Install all the things. Arguments are specified in .bundle/config (see create_bundle_config)
block { log.info(log_key) { "" } }
- bundle "install --verbose", env: chef_build_env
+ bundle "install --verbose", env: project_env
# For whatever reason, nokogiri software def deletes this (rather small) directory
block { log.info(log_key) { "" } }
@@ -78,7 +78,7 @@ build do
# Check that it worked
block { log.info(log_key) { "" } }
- bundle "check", env: chef_build_env
+ bundle "check", env: project_env
# fix up git-sourced gems
properly_reinstall_git_and_path_sourced_gems
diff --git a/omnibus/files/chef-appbundle/build-chef-appbundle.rb b/omnibus/files/chef-appbundle/build-chef-appbundle.rb
index da6a4dc970..eaf4904501 100644
--- a/omnibus/files/chef-appbundle/build-chef-appbundle.rb
+++ b/omnibus/files/chef-appbundle/build-chef-appbundle.rb
@@ -70,7 +70,7 @@ module BuildChefAppbundle
# appbundler against the resulting file.
#
# Relocks the Gemfiles inside the specified gems (e.g. berkshelf, test-kitchen,
- # chef) to use the chef distribution's chosen gems.
+ # chef) to use the distribution's chosen gems.
def appbundle_gem(gem_name)
# First lock the gemfile down.
lockdown_gem(gem_name)
diff --git a/omnibus/files/chef-gem/build-chef-gem.rb b/omnibus/files/chef-gem/build-chef-gem.rb
index 82c0ba08e2..701461b01e 100644
--- a/omnibus/files/chef-gem/build-chef-gem.rb
+++ b/omnibus/files/chef-gem/build-chef-gem.rb
@@ -4,7 +4,7 @@ require "bundler"
require_relative "../../../version_policy"
# Common definitions and helpers (like compile environment and binary
-# locations) for all chef software definitions.
+# locations) for all software definitions.
module BuildChefGem
PLATFORM_FAMILY_FAMILIES = {
"linux" => %w{wrlinux debian fedora rhel suse gentoo slackware arch exherbo alpine},
diff --git a/omnibus/files/chef/build-chef.rb b/omnibus/files/chef/build-chef.rb
index b0d41c185b..e0e0d9928d 100644
--- a/omnibus/files/chef/build-chef.rb
+++ b/omnibus/files/chef/build-chef.rb
@@ -29,7 +29,7 @@ module BuildChef
#
# Get the (possibly platform-specific) path to the Gemfile.
#
- def chef_gemfile
+ def project_gemfile
File.join(project_dir, "Gemfile")
end
@@ -41,12 +41,12 @@ module BuildChef
# then delete the git cached versions.
#
# Once we finish with all this, we update the Gemfile that will end up in the
- # chef so that it doesn't have git or path references anymore.
+ # top-level install so that it doesn't have git or path references anymore.
#
def properly_reinstall_git_and_path_sourced_gems
# Emit blank line to separate different tasks
block { log.info(log_key) { "" } }
- chef_env = env.dup.merge("BUNDLE_GEMFILE" => chef_gemfile)
+ project_env = env.dup.merge("BUNDLE_GEMFILE" => project_gemfile)
# Reinstall git-sourced or path-sourced gems, and delete the originals
block "Reinstall git-sourced gems properly" do
@@ -59,7 +59,7 @@ module BuildChef
# or `gem :x, path: '.'` or `gemspec`). To do this, we just detect which ones
# have properly-installed paths (in the `gems` directory that shows up when
# you run `gem list`).
- locally_installed_gems = shellout!("#{bundle_bin} list --paths", env: chef_env, cwd: project_dir).
+ locally_installed_gems = shellout!("#{bundle_bin} list --paths", env: project_env, cwd: project_dir).
stdout.lines.select { |gem_path| !gem_path.start_with?(gem_install_dir) }
# Install the gems for real using `rake install` in their directories
@@ -70,7 +70,7 @@ module BuildChef
# Emit blank line to separate different tasks
log.info(log_key) { "" }
log.info(log_key) { "Properly installing git or path sourced gem #{gem_path} using rake install" }
- shellout!("#{bundle_bin} exec #{rake_bin} install", env: chef_env, cwd: gem_path)
+ shellout!("#{bundle_bin} exec #{rake_bin} install", env: project_env, cwd: gem_path)
end
end
end
@@ -80,16 +80,16 @@ module BuildChef
block { log.info(log_key) { "" } }
shared_gemfile = self.shared_gemfile
- chef_env = env.dup.merge("BUNDLE_GEMFILE" => chef_gemfile)
+ project_env = env.dup.merge("BUNDLE_GEMFILE" => project_gemfile)
# Show the config for good measure
- bundle "config", env: chef_env
+ bundle "config", env: project_env
# Make `Gemfile` point to these by removing path and git sources and pinning versions.
block "Rewrite Gemfile using all properly-installed gems" do
gem_pins = ""
result = []
- shellout!("#{bundle_bin} list", env: chef_env).stdout.lines.map do |line|
+ shellout!("#{bundle_bin} list", env: project_env).stdout.lines.map do |line|
if line =~ /^\s*\*\s*(\S+)\s+\((\S+).*\)\s*$/
name, version = $1, $2
# rubocop is an exception, since different projects disagree
@@ -99,7 +99,7 @@ module BuildChef
end
# Find the installed chef gem by looking for lib/chef.rb
- chef_gem = File.expand_path("../..", shellout!("#{gem_bin} which chef", env: chef_env).stdout.chomp)
+ chef_gem = File.expand_path("../..", shellout!("#{gem_bin} which chef", env: project_env).stdout.chomp)
# Figure out the path to gemfile_util from there
gemfile_util = Pathname.new(File.join(chef_gem, "tasks", "gemfile_util"))
gemfile_util = gemfile_util.relative_path_from(Pathname.new(shared_gemfile).dirname)