summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile8
-rw-r--r--acceptance/fips/test/integration/fips/serverspec/Gemfile.lock13
-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
-rw-r--r--tasks/dependencies.rb6
7 files changed, 21 insertions, 38 deletions
diff --git a/Gemfile b/Gemfile
index 74099131ea..d80f33f2ad 100644
--- a/Gemfile
+++ b/Gemfile
@@ -64,11 +64,9 @@ group(:linux, :bsd, :mac_os_x, :solaris, :windows) do
# may need to disable this in insolation on fussy builds like AIX, RHEL4, etc
gem "ruby-prof"
end
-unless $chef_platform == "windows"
- # Everything except AIX and Windows
- group(:linux, :bsd, :mac_os_x, :solaris) do
- gem "ruby-shadow"
- end
+# Everything except AIX and Windows
+group(:linux, :bsd, :mac_os_x, :solaris) do
+ gem "ruby-shadow"
end
group(:development, :test) do
diff --git a/acceptance/fips/test/integration/fips/serverspec/Gemfile.lock b/acceptance/fips/test/integration/fips/serverspec/Gemfile.lock
deleted file mode 100644
index 44714c028b..0000000000
--- a/acceptance/fips/test/integration/fips/serverspec/Gemfile.lock
+++ /dev/null
@@ -1,13 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- mixlib-shellout (2.2.6)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- mixlib-shellout
-
-BUNDLED WITH
- 1.11.2
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)
diff --git a/tasks/dependencies.rb b/tasks/dependencies.rb
index fc7f11ec4d..e353dbae87 100644
--- a/tasks/dependencies.rb
+++ b/tasks/dependencies.rb
@@ -88,10 +88,8 @@ namespace :dependencies do
end
gemfile_lock_task :update_omnibus_gemfile_lock, dirs: %w{omnibus}
- gemfile_lock_task :update_acceptance_gemfile_lock, dirs: %w{
- acceptance
- acceptance/fips/test/integration/fips/serverspec
- }, other_platforms: false, leave_frozen: false
+ gemfile_lock_task :update_acceptance_gemfile_lock, dirs: %w{acceptance},
+ other_platforms: false, leave_frozen: false
gemfile_lock_task :update_kitchen_tests_gemfile_lock, dirs: %w{
kitchen-tests
kitchen-tests/test/integration/webapp/serverspec