summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-04-17 09:34:29 -0700
committerJohn Keiser <john@johnkeiser.com>2016-04-18 14:21:02 -0700
commit01cf3ef2a85d3190b0bd46835ff6ae37f830764a (patch)
treeb15fc1934d56c4449101b10d074b72e26a4884e3
parent31f9ada8660a2831204aca436e343b6a10b103cd (diff)
downloadchef-01cf3ef2a85d3190b0bd46835ff6ae37f830764a.tar.gz
Remove Gemfile.windows and put both platforms in Gemfile.lock
-rw-r--r--.gitignore3
-rw-r--r--Gemfile13
-rw-r--r--Gemfile.lock63
-rw-r--r--Gemfile.windows41
-rw-r--r--Gemfile.windows.lock553
-rw-r--r--README.md8
-rw-r--r--acceptance/Gemfile.lock10
-rw-r--r--acceptance/fips/test/integration/fips/serverspec/Gemfile.lock8
-rw-r--r--appveyor.yml8
-rw-r--r--chef-config/lib/chef-config/package_task.rb11
-rw-r--r--chef-universal-darwin.gemspec58
-rw-r--r--chef-universal-mingw32.gemspec (renamed from chef-windows.gemspec)0
-rwxr-xr-xci/verify-chef.bat8
-rwxr-xr-xci/verify-chef.sh26
-rw-r--r--kitchen-tests/Gemfile.lock9
-rw-r--r--kitchen-tests/test/integration/webapp/serverspec/Gemfile.lock2
-rw-r--r--omnibus/Gemfile.lock8
-rw-r--r--omnibus/files/chef-gem/build-chef-gem/gem-install-software-def.rb12
-rw-r--r--omnibus/files/chef/build-chef.rb10
-rw-r--r--omnibus_overrides.rb3
-rw-r--r--tasks/bundle.rb16
-rw-r--r--tasks/bundle_util.rb6
-rw-r--r--tasks/dependencies.rb8
-rw-r--r--tasks/gemfile_util.rb6
24 files changed, 228 insertions, 662 deletions
diff --git a/.gitignore b/.gitignore
index 0fd3c63849..1e60843467 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,8 +15,7 @@ external_tests/*.lock
# http://gembundler.com/man/bundle-exec.1.html
b/
binstubs/
-omnibus/.bundle
-acceptance/.bundle
+**/.bundle
# RVM and RBENV ruby version files
.rbenv-version
.rvmrc
diff --git a/Gemfile b/Gemfile
index 9099f6c4cb..ab1b5d11f5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,7 +3,18 @@ require_relative "tasks/gemfile_util"
extend GemfileUtil
source "https://rubygems.org"
-gemspec name: ($chef_platform ? "chef-#{$chef_platform}" : "chef")
+
+# Pick the gemspec for our platform
+gemspec_name = "chef"
+Dir.glob("chef-*.gemspec").each do |gemspec_filename|
+ gemspec_filename =~ /^chef-(.+).gemspec/
+ gemspec_platform = $1
+ if Gem::Platform.match(Gem::Platform.new(gemspec_platform))
+ Bundler.ui.info "Using gemspec #{gemspec_filename} for current platform."
+ gemspec_name = "chef-#{gemspec_platform}"
+ end
+end
+gemspec name: gemspec_name
gem "activesupport", "< 4.0.0", group: :compat_testing, platform: "ruby"
gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__))
diff --git a/Gemfile.lock b/Gemfile.lock
index a2aec12cd6..3d32f3133d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -44,6 +44,43 @@ PATH
specinfra (~> 2.10)
syslog-logger (~> 1.6)
uuidtools (~> 2.1.5)
+ chef (12.10.5-universal-mingw32)
+ bundler (>= 1.10)
+ chef-config (= 12.10.5)
+ chef-zero (~> 4.5)
+ diff-lcs (~> 1.2, >= 1.2.4)
+ erubis (~> 2.7)
+ ffi (~> 1.9)
+ ffi-yajl (~> 2.2)
+ highline (~> 1.6, >= 1.6.9)
+ mixlib-authentication (~> 1.4)
+ mixlib-cli (~> 1.4)
+ mixlib-log (~> 1.3)
+ mixlib-shellout (~> 2.0)
+ net-sftp (~> 2.1, >= 2.1.2)
+ net-ssh (>= 2.9, < 4.0)
+ net-ssh-multi (~> 1.1)
+ ohai (>= 8.6.0.alpha.1, < 9)
+ plist (~> 3.2)
+ proxifier (~> 1.0)
+ rspec-core (~> 3.4)
+ rspec-expectations (~> 3.4)
+ rspec-mocks (~> 3.4)
+ rspec_junit_formatter (~> 0.2.0)
+ serverspec (~> 2.7)
+ specinfra (~> 2.10)
+ syslog-logger (~> 1.6)
+ uuidtools (~> 2.1.5)
+ win32-api (~> 1.5.3)
+ win32-dir (~> 0.5.0)
+ win32-event (~> 0.6.1)
+ win32-eventlog (= 0.6.3)
+ win32-mmap (~> 0.4.1)
+ win32-mutex (~> 0.4.2)
+ win32-process (~> 0.8.2)
+ win32-service (~> 0.8.7)
+ windows-api (~> 0.4.4)
+ wmi-lite (~> 1.0)
PATH
remote: chef-config
@@ -127,6 +164,7 @@ GEM
fauxhai (3.3.0)
net-ssh
ffi (1.9.10)
+ ffi (1.9.10-x86-mingw32)
ffi-yajl (2.2.3)
libyajl2 (~> 1.2)
foodcritic (6.1.1)
@@ -201,6 +239,9 @@ GEM
mixlib-versioning
mixlib-log (1.6.0)
mixlib-shellout (2.2.6)
+ mixlib-shellout (2.2.6-universal-mingw32)
+ win32-process (~> 0.8.2)
+ wmi-lite (~> 1.0)
mixlib-versioning (1.1.0)
multi_json (1.11.2)
multi_xml (0.5.5)
@@ -219,6 +260,8 @@ GEM
netrc (0.11.0)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
+ nokogiri (1.6.7.2-x86-mingw32)
+ mini_portile2 (~> 2.0.0.rc2)
nori (2.6.0)
oauth2 (1.1.0)
faraday (>= 0.8, < 0.10)
@@ -332,6 +375,25 @@ GEM
ubuntu_ami (0.4.1)
unicode-display_width (1.0.3)
uuidtools (2.1.5)
+ win32-api (1.5.3-universal-mingw32)
+ win32-dir (0.5.1)
+ ffi (>= 1.0.0)
+ win32-event (0.6.3)
+ win32-ipc (>= 0.6.0)
+ win32-eventlog (0.6.3)
+ ffi
+ win32-ipc (0.6.6)
+ ffi
+ win32-mmap (0.4.2)
+ ffi
+ win32-mutex (0.4.3)
+ win32-ipc (>= 0.6.0)
+ win32-process (0.8.3)
+ ffi (>= 1.0.0)
+ win32-service (0.8.7)
+ ffi
+ windows-api (0.4.4)
+ win32-api (>= 1.4.5)
winrm (1.7.3)
builder (>= 2.1.2)
gssapi (~> 1.2)
@@ -346,6 +408,7 @@ GEM
PLATFORMS
ruby
+ x86-mingw32
DEPENDENCIES
activesupport (< 4.0.0)
diff --git a/Gemfile.windows b/Gemfile.windows
deleted file mode 100644
index def7a0bff6..0000000000
--- a/Gemfile.windows
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# We ensure everything in windows is pinned to the same version as "generic"
-# by reading the generic Gemfile.lock and pinning to that version in the Gemfile.
-#
-# This could *almost* be accomplished by simply copying the lockfile and doing a
-# `bundle install` to add any windows dependencies, but bundler can still update
-# existing versions in a couple of cases:
-#
-# 1. When the source has changed since the main lockfile was built.
-# 2. When Windows-specific dependencies constrain our solution.
-#
-# We do NOT allow windows gem versions to differ from non-windows, so that our
-# packages are consistent across operating systems.
-#
-# At the end of this process, this `Gemfile`:
-#
-# ```
-# gem 'chef', github: 'chef/chef'
-# gem 'berkshelf'
-# ```
-#
-# Is transformed to something like this:
-#
-# ```
-# gem 'chef', github: 'chef/chef', ref: '23049723984237948023'
-# gem 'berkshelf', '= 2.0.5'
-# gem 'ohai', '= 12.9.30' # implicit dependency of chef
-# ```
-#
-
-require_relative "tasks/gemfile_util"
-extend GemfileUtil
-
-# Honor the main gem's lockfile
-include_locked_gemfile("Gemfile", without_groups: [ :aix, :bsd, :mac_os_x, :linux, :solaris ], copy_groups: true)
-
-# We have the same deps as the main Gemfile (except since we're Windows, we read the
-# chef-windows.gemspec instead of chef.gemspec)
-$chef_platform = "windows"
-chef_gemfile = File.expand_path("../Gemfile", __FILE__)
-instance_eval(IO.read(chef_gemfile), chef_gemfile)
diff --git a/Gemfile.windows.lock b/Gemfile.windows.lock
deleted file mode 100644
index 8eadf2b475..0000000000
--- a/Gemfile.windows.lock
+++ /dev/null
@@ -1,553 +0,0 @@
-GIT
- remote: https://github.com/chef/chefstyle.git
- revision: cc37808b7849fdcf49f04011626143940f83fe92
- ref: cc37808b7849fdcf49f04011626143940f83fe92
- specs:
- chefstyle (0.3.1)
- rubocop (= 0.39.0)
-
-GIT
- remote: https://github.com/rubysec/bundler-audit.git
- revision: 4e32fca89d75f0e249671431ff38aadc02bfb28b
- ref: 4e32fca89d75f0e249671431ff38aadc02bfb28b
- specs:
- bundler-audit (0.4.0)
- bundler (~> 1.2)
- thor (~> 0.18)
-
-PATH
- remote: .
- specs:
- chef (12.10.5)
- bundler (>= 1.10)
- chef-config (= 12.10.5)
- chef-zero (~> 4.5)
- diff-lcs (~> 1.2, >= 1.2.4)
- erubis (~> 2.7)
- ffi-yajl (~> 2.2)
- highline (~> 1.6, >= 1.6.9)
- mixlib-authentication (~> 1.4)
- mixlib-cli (~> 1.4)
- mixlib-log (~> 1.3)
- mixlib-shellout (~> 2.0)
- net-sftp (~> 2.1, >= 2.1.2)
- net-ssh (>= 2.9, < 4.0)
- net-ssh-multi (~> 1.1)
- ohai (>= 8.6.0.alpha.1, < 9)
- plist (~> 3.2)
- proxifier (~> 1.0)
- rspec-core (~> 3.4)
- rspec-expectations (~> 3.4)
- rspec-mocks (~> 3.4)
- rspec_junit_formatter (~> 0.2.0)
- serverspec (~> 2.7)
- specinfra (~> 2.10)
- syslog-logger (~> 1.6)
- uuidtools (~> 2.1.5)
- chef (12.10.5-universal-mingw32)
- bundler (>= 1.10)
- chef-config (= 12.10.5)
- chef-zero (~> 4.5)
- diff-lcs (~> 1.2, >= 1.2.4)
- erubis (~> 2.7)
- ffi (~> 1.9)
- ffi-yajl (~> 2.2)
- highline (~> 1.6, >= 1.6.9)
- mixlib-authentication (~> 1.4)
- mixlib-cli (~> 1.4)
- mixlib-log (~> 1.3)
- mixlib-shellout (~> 2.0)
- net-sftp (~> 2.1, >= 2.1.2)
- net-ssh (>= 2.9, < 4.0)
- net-ssh-multi (~> 1.1)
- ohai (>= 8.6.0.alpha.1, < 9)
- plist (~> 3.2)
- proxifier (~> 1.0)
- rspec-core (~> 3.4)
- rspec-expectations (~> 3.4)
- rspec-mocks (~> 3.4)
- rspec_junit_formatter (~> 0.2.0)
- serverspec (~> 2.7)
- specinfra (~> 2.10)
- syslog-logger (~> 1.6)
- uuidtools (~> 2.1.5)
- win32-api (~> 1.5.3)
- win32-dir (~> 0.5.0)
- win32-event (~> 0.6.1)
- win32-eventlog (= 0.6.3)
- win32-mmap (~> 0.4.1)
- win32-mutex (~> 0.4.2)
- win32-process (~> 0.8.2)
- win32-service (~> 0.8.7)
- windows-api (~> 0.4.4)
- wmi-lite (~> 1.0)
-
-PATH
- remote: chef-config
- specs:
- chef-config (12.10.5)
- fuzzyurl (~> 0.8.0)
- mixlib-config (~> 2.0)
- mixlib-shellout (~> 2.0)
-
-GEM
- remote: https://rubygems.org/
- specs:
- activesupport (3.2.22.2)
- i18n (~> 0.6, >= 0.6.4)
- multi_json (~> 1.0)
- addressable (2.4.0)
- appbundler (0.9.0)
- mixlib-cli (~> 1.4)
- artifactory (2.3.2)
- ast (2.2.0)
- aws-sdk (2.2.34)
- aws-sdk-resources (= 2.2.34)
- aws-sdk-core (2.2.34)
- jmespath (~> 1.0)
- aws-sdk-resources (2.2.34)
- aws-sdk-core (= 2.2.34)
- aws-sdk-v1 (1.66.0)
- json (~> 1.4)
- nokogiri (>= 1.4.4)
- binding_of_caller (0.7.2)
- debug_inspector (>= 0.0.1)
- builder (3.2.2)
- byebug (8.2.4)
- chef-api (0.5.0)
- logify (~> 0.1)
- mime-types
- chef-provisioning (1.7.0)
- cheffish (>= 1.3.1, < 3.0)
- inifile (>= 2.0.2)
- mixlib-install (~> 1.0)
- net-scp (~> 1.0)
- net-ssh (>= 2.9, < 4.0)
- net-ssh-gateway (~> 1.2.0)
- winrm (~> 1.3)
- chef-provisioning-aws (1.9.0)
- aws-sdk (>= 2.1.26, < 3.0)
- aws-sdk-v1 (>= 1.59.0)
- chef-provisioning (~> 1.4)
- retryable (~> 2.0, >= 2.0.1)
- ubuntu_ami (~> 0.4, >= 0.4.1)
- chef-rewind (0.0.9)
- chef-sugar (3.3.0)
- chef-zero (4.6.1)
- ffi-yajl (~> 2.2)
- hashie (>= 2.0, < 4.0)
- mixlib-log (~> 1.3)
- rack
- uuidtools (~> 2.1)
- cheffish (2.0.4)
- chef-zero (~> 4.3)
- compat_resource
- chefspec (4.6.1)
- chef (>= 11.14)
- fauxhai (~> 3.2)
- rspec (~> 3.0)
- childprocess (0.5.9)
- ffi (~> 1.0, >= 1.0.11)
- coderay (1.1.1)
- colorize (0.7.7)
- compat_resource (12.9.1)
- cucumber-core (1.4.0)
- gherkin (~> 3.2.0)
- debug_inspector (0.0.2)
- descendants_tracker (0.0.4)
- thread_safe (~> 0.3, >= 0.3.1)
- diff-lcs (1.2.5)
- docile (1.1.5)
- erubis (2.7.0)
- faraday (0.9.2)
- multipart-post (>= 1.2, < 3)
- fauxhai (3.3.0)
- net-ssh
- ffi (1.9.10)
- ffi (1.9.10-x86-mingw32)
- ffi-yajl (2.2.3)
- libyajl2 (~> 1.2)
- foodcritic (6.1.1)
- cucumber-core (>= 1.3)
- erubis
- nokogiri (>= 1.5, < 2.0)
- rake
- rufus-lru (~> 1.0)
- treetop (~> 1.4)
- yajl-ruby (~> 1.1)
- fuzzyurl (0.8.0)
- gherkin (3.2.0)
- github_api (0.13.1)
- addressable (~> 2.4.0)
- descendants_tracker (~> 0.0.4)
- faraday (~> 0.8, < 0.10)
- hashie (>= 3.4)
- multi_json (>= 1.7.5, < 2.0)
- oauth2
- github_changelog_generator (1.11.3)
- bundler (>= 1.7)
- colorize (~> 0.7)
- github_api (~> 0.12)
- overcommit (>= 0.31)
- rake (>= 10.0)
- rspec (>= 3.2)
- rubocop (>= 0.31)
- gssapi (1.2.0)
- ffi (>= 1.0.1)
- gyoku (1.3.1)
- builder (>= 2.1.2)
- halite (1.2.1)
- bundler
- chef (~> 12.0)
- stove (~> 3.2, >= 3.2.3)
- thor
- hashie (3.4.3)
- highline (1.7.8)
- httpclient (2.7.1)
- i18n (0.7.0)
- inifile (3.0.0)
- iniparse (1.4.2)
- ipaddress (0.8.3)
- jmespath (1.2.4)
- json_pure (>= 1.8.1)
- json (1.8.3)
- json_pure (1.8.3)
- jwt (1.5.1)
- knife-windows (1.4.0)
- winrm (~> 1.7)
- libyajl2 (1.2.0)
- little-plugger (1.1.4)
- logging (2.1.0)
- little-plugger (~> 1.1)
- multi_json (~> 1.10)
- logify (0.2.0)
- method_source (0.8.2)
- mime-types (3.0)
- mime-types-data (~> 3.2015)
- mime-types-data (3.2016.0221)
- mini_portile2 (2.0.0)
- mixlib-authentication (1.4.0)
- mixlib-log
- rspec-core (~> 3.2)
- rspec-expectations (~> 3.2)
- rspec-mocks (~> 3.2)
- mixlib-cli (1.5.0)
- mixlib-config (2.2.1)
- mixlib-install (1.0.7)
- artifactory
- mixlib-shellout
- mixlib-versioning
- mixlib-log (1.6.0)
- mixlib-shellout (2.2.6)
- mixlib-shellout (2.2.6-universal-mingw32)
- win32-process (~> 0.8.2)
- wmi-lite (~> 1.0)
- mixlib-versioning (1.1.0)
- multi_json (1.11.2)
- multi_xml (0.5.5)
- multipart-post (2.0.0)
- net-scp (1.2.1)
- net-ssh (>= 2.6.5)
- net-sftp (2.1.2)
- net-ssh (>= 2.6.5)
- net-ssh (3.1.1)
- net-ssh-gateway (1.2.0)
- net-ssh (>= 2.6.5)
- net-ssh-multi (1.2.1)
- net-ssh (>= 2.6.5)
- net-ssh-gateway (>= 1.2.0)
- net-telnet (0.1.1)
- netrc (0.11.0)
- nokogiri (1.6.7.2)
- mini_portile2 (~> 2.0.0.rc2)
- nokogiri (1.6.7.2-x86-mingw32)
- mini_portile2 (~> 2.0.0.rc2)
- nori (2.6.0)
- oauth2 (1.1.0)
- faraday (>= 0.8, < 0.10)
- jwt (~> 1.0, < 1.5.2)
- multi_json (~> 1.3)
- multi_xml (~> 0.5)
- rack (>= 1.2, < 3)
- octokit (4.3.0)
- sawyer (~> 0.7.0, >= 0.5.3)
- ohai (8.14.0)
- chef-config (>= 12.5.0.alpha.1, < 13)
- ffi (~> 1.9)
- ffi-yajl (~> 2.2)
- ipaddress
- mixlib-cli
- mixlib-config (~> 2.0)
- mixlib-log
- mixlib-shellout (~> 2.0)
- plist (~> 3.1)
- systemu (~> 2.6.4)
- wmi-lite (~> 1.0)
- overcommit (0.33.0)
- childprocess (~> 0.5.8)
- iniparse (~> 1.4)
- parser (2.3.0.7)
- ast (~> 2.2)
- plist (3.2.0)
- poise (2.7.0)
- halite (~> 1.0)
- polyglot (0.3.5)
- powerpack (0.1.1)
- proxifier (1.0.3)
- pry (0.10.3)
- coderay (~> 1.1.0)
- method_source (~> 0.8.1)
- slop (~> 3.4)
- pry-byebug (3.3.0)
- byebug (~> 8.0)
- pry (~> 0.10)
- pry-remote (0.1.8)
- pry (~> 0.9)
- slop (~> 3.0)
- pry-stack_explorer (0.4.9.2)
- binding_of_caller (>= 0.7)
- pry (>= 0.9.11)
- rack (1.6.4)
- rainbow (2.1.0)
- rake (11.1.2)
- rb-readline (0.5.3)
- retryable (2.0.3)
- rspec (3.4.0)
- rspec-core (~> 3.4.0)
- rspec-expectations (~> 3.4.0)
- rspec-mocks (~> 3.4.0)
- rspec-core (3.4.4)
- rspec-support (~> 3.4.0)
- rspec-expectations (3.4.0)
- diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.4.0)
- rspec-its (1.2.0)
- rspec-core (>= 3.0.0)
- rspec-expectations (>= 3.0.0)
- rspec-mocks (3.4.1)
- diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.4.0)
- rspec-support (3.4.1)
- rspec_junit_formatter (0.2.3)
- builder (< 4)
- rspec-core (>= 2, < 4, != 2.12.0)
- rubocop (0.39.0)
- parser (>= 2.3.0.7, < 3.0)
- powerpack (~> 0.1)
- rainbow (>= 1.99.1, < 3.0)
- ruby-progressbar (~> 1.7)
- unicode-display_width (~> 1.0, >= 1.0.1)
- ruby-prof (0.15.9)
- ruby-progressbar (1.7.5)
- rubyntlm (0.6.0)
- rufus-lru (1.0.5)
- sawyer (0.7.0)
- addressable (>= 2.3.5, < 2.5)
- faraday (~> 0.8, < 0.10)
- serverspec (2.31.1)
- multi_json
- rspec (~> 3.0)
- rspec-its
- specinfra (~> 2.53)
- sfl (2.2)
- simplecov (0.11.2)
- docile (~> 1.1.0)
- json (~> 1.8)
- simplecov-html (~> 0.10.0)
- simplecov-html (0.10.0)
- slop (3.6.0)
- specinfra (2.56.1)
- net-scp
- net-ssh (>= 2.7, < 4.0)
- net-telnet
- sfl
- stove (3.2.8)
- chef-api (~> 0.5)
- logify (~> 0.2)
- syslog-logger (1.6.8)
- systemu (2.6.5)
- thor (0.19.1)
- thread_safe (0.3.5)
- tomlrb (1.2.1)
- treetop (1.6.5)
- polyglot (~> 0.3)
- ubuntu_ami (0.4.1)
- unicode-display_width (1.0.3)
- uuidtools (2.1.5)
- win32-api (1.5.3-universal-mingw32)
- win32-dir (0.5.1)
- ffi (>= 1.0.0)
- win32-event (0.6.3)
- win32-ipc (>= 0.6.0)
- win32-eventlog (0.6.3)
- ffi
- win32-ipc (0.6.6)
- ffi
- win32-mmap (0.4.2)
- ffi
- win32-mutex (0.4.3)
- win32-ipc (>= 0.6.0)
- win32-process (0.8.3)
- ffi (>= 1.0.0)
- win32-service (0.8.7)
- ffi
- windows-api (0.4.4)
- win32-api (>= 1.4.5)
- winrm (1.7.3)
- builder (>= 2.1.2)
- gssapi (~> 1.2)
- gyoku (~> 1.0)
- httpclient (~> 2.2, >= 2.2.0.2)
- logging (>= 1.6.1, < 3.0)
- nori (~> 2.0)
- rubyntlm (~> 0.6.0)
- wmi-lite (1.0.0)
- yajl-ruby (1.2.1)
- yard (0.8.7.6)
-
-PLATFORMS
- ruby
- x86-mingw32
-
-DEPENDENCIES
- activesupport (= 3.2.22.2)!
- addressable (= 2.4.0)!
- appbundler (= 0.9.0)!
- artifactory (= 2.3.2)!
- ast (= 2.2.0)!
- aws-sdk (= 2.2.34)!
- aws-sdk-core (= 2.2.34)!
- aws-sdk-resources (= 2.2.34)!
- aws-sdk-v1 (= 1.66.0)!
- binding_of_caller (= 0.7.2)!
- builder (= 3.2.2)!
- bundler
- bundler-audit (= 0.4.0)!
- byebug (= 8.2.4)!
- chef!
- chef-api (= 0.5.0)!
- chef-config!
- chef-provisioning (= 1.7.0)!
- chef-provisioning-aws (= 1.9.0)!
- chef-rewind (= 0.0.9)!
- chef-sugar (= 3.3.0)!
- chef-zero (= 4.6.1)!
- cheffish (= 2.0.4)!
- chefspec (= 4.6.1)!
- chefstyle (= 0.3.1)!
- childprocess (= 0.5.9)!
- coderay (= 1.1.1)!
- colorize (= 0.7.7)!
- compat_resource (= 12.9.1)!
- cucumber-core (= 1.4.0)!
- debug_inspector (= 0.0.2)!
- descendants_tracker (= 0.0.4)!
- diff-lcs (= 1.2.5)!
- docile (= 1.1.5)!
- erubis (= 2.7.0)!
- faraday (= 0.9.2)!
- fauxhai (= 3.3.0)!
- ffi (= 1.9.10)!
- ffi-yajl (= 2.2.3)!
- foodcritic (= 6.1.1)!
- fuzzyurl (= 0.8.0)!
- gherkin (= 3.2.0)!
- github_api (= 0.13.1)!
- github_changelog_generator (= 1.11.3)!
- gssapi (= 1.2.0)!
- gyoku (= 1.3.1)!
- halite (= 1.2.1)!
- hashie (= 3.4.3)!
- highline (= 1.7.8)!
- httpclient (= 2.7.1)!
- i18n (= 0.7.0)!
- inifile (= 3.0.0)!
- iniparse (= 1.4.2)!
- ipaddress (= 0.8.3)!
- jmespath (= 1.2.4)!
- json (= 1.8.3)!
- json_pure (= 1.8.3)!
- jwt (= 1.5.1)!
- knife-windows (= 1.4.0)!
- libyajl2 (= 1.2.0)!
- little-plugger (= 1.1.4)!
- logging (= 2.1.0)!
- logify (= 0.2.0)!
- method_source (= 0.8.2)!
- mime-types (= 3.0)!
- mime-types-data (= 3.2016.0221)!
- mini_portile2 (= 2.0.0)!
- mixlib-authentication (= 1.4.0)!
- mixlib-cli (= 1.5.0)!
- mixlib-config (= 2.2.1)!
- mixlib-install (= 1.0.7)!
- mixlib-log (= 1.6.0)!
- mixlib-shellout (= 2.2.6)!
- mixlib-versioning (= 1.1.0)!
- multi_json (= 1.11.2)!
- multi_xml (= 0.5.5)!
- multipart-post (= 2.0.0)!
- net-scp (= 1.2.1)!
- net-sftp (= 2.1.2)!
- net-ssh (= 3.1.1)!
- net-ssh-gateway (= 1.2.0)!
- net-ssh-multi (= 1.2.1)!
- net-telnet (= 0.1.1)!
- netrc (= 0.11.0)!
- nokogiri (= 1.6.7.2)!
- nori (= 2.6.0)!
- oauth2 (= 1.1.0)!
- octokit (= 4.3.0)!
- ohai (= 8.14.0)!
- overcommit (= 0.33.0)!
- parser (= 2.3.0.7)!
- plist (= 3.2.0)!
- poise (= 2.7.0)!
- polyglot (= 0.3.5)!
- powerpack (= 0.1.1)!
- proxifier (= 1.0.3)!
- pry (= 0.10.3)!
- pry-byebug (= 3.3.0)!
- pry-remote (= 0.1.8)!
- pry-stack_explorer (= 0.4.9.2)!
- rack (= 1.6.4)!
- rainbow (= 2.1.0)!
- rake (= 11.1.2)!
- rb-readline (= 0.5.3)!
- retryable (= 2.0.3)!
- rspec (= 3.4.0)!
- rspec-core (= 3.4.4)!
- rspec-expectations (= 3.4.0)!
- rspec-its (= 1.2.0)!
- rspec-mocks (= 3.4.1)!
- rspec-support (= 3.4.1)!
- rspec_junit_formatter (= 0.2.3)!
- rubocop (= 0.39.0)!
- ruby-prof (= 0.15.9)!
- ruby-progressbar (= 1.7.5)!
- rubyntlm (= 0.6.0)!
- rufus-lru (= 1.0.5)!
- sawyer (= 0.7.0)!
- serverspec (= 2.31.1)!
- sfl (= 2.2)!
- simplecov (= 0.11.2)!
- simplecov-html (= 0.10.0)!
- slop (= 3.6.0)!
- specinfra (= 2.56.1)!
- stove (= 3.2.8)!
- syslog-logger (= 1.6.8)!
- systemu (= 2.6.5)!
- thor (= 0.19.1)!
- thread_safe (= 0.3.5)!
- tomlrb (= 1.2.1)!
- treetop (= 1.6.5)!
- ubuntu_ami (= 0.4.1)!
- unicode-display_width (= 1.0.3)!
- uuidtools (= 2.1.5)!
- winrm (= 1.7.3)!
- wmi-lite (= 1.0.0)!
- yajl-ruby (= 1.2.1)!
- yard (= 0.8.7.6)!
-
-BUNDLED WITH
- 1.11.2
diff --git a/README.md b/README.md
index ddf72423f2..4697e55190 100644
--- a/README.md
+++ b/README.md
@@ -134,7 +134,7 @@ Once you've made any changes you want, you have to update the lockfiles that act
* To update specific gems only, run `rake bundle:update[gem1 gem2 ...]`
* **`bundle update` and `bundle install` will *not* work, on purpose:** the rake task handles both the windows and non-windows lockfiles and updates them in sync.
-To perform a full update of all dependencies in chef (including binary packages, tests and build system dependencies), run `rake dependencies`. This will update the `Gemfile.lock`, `Gemfile.windows.lock`, `omnibus/Gemfile.lock`, `acceptance/Gemfile.lock`, `omnibus/Berksfile.lock`, and `omnibus_overrides.rb`. It will also show you any outdated dependencies due to conflicting constraints. Some outdated dependencies are to be expected; it will inform you if any new ones appear that we don't know about, and tell you how to proceed.
+To perform a full update of all dependencies in chef (including binary packages, tests and build system dependencies), run `rake dependencies`. This will update the `Gemfile.lock`, `omnibus/Gemfile.lock`, `acceptance/Gemfile.lock`, `omnibus/Berksfile.lock`, and `omnibus_overrides.rb`. It will also show you any outdated dependencies due to conflicting constraints. Some outdated dependencies are to be expected; it will inform you if any new ones appear that we don't know about, and tell you how to proceed.
# How Chef Builds and Versions
@@ -157,7 +157,7 @@ Additionally, periodically Chef will update the desired versions of chef compone
Whenever a change is checked in to `master`, the patch version of `chef` is bumped. To do this, the `lita-versioner` bot listens to github for merged PRs, and when it finds one, takes these actions:
1. Bumps the patch version in `lib/chef/version.rb` (e.g. 0.9.14 -> 0.9.15).
-2. Runs `rake dependencies:update_conservative` to update the `Gemfile.lock` and `Gemfile.windows.lock` to include the new version.
+2. Runs `rake dependencies:update_conservative` to update the `Gemfile.lock` to include the new version.
3. Pushes to `master` and submits a new build to Chef's Jenkins cluster.
## Component Versions
@@ -176,11 +176,11 @@ These have software definitions either in [omnibus/config/software](omnibus/conf
Most of the actual front-facing software in chef is composed of ruby projects. berkshelf, test-kitchen and even chef itself are made of ruby gems. Chef uses the typical ruby way of controlling rubygems versions, the `Gemfile`. Specifically, the `Gemfile` at the top of chef repository governs the version of every single gem we install into chef package. It's a one-stop shop.
-Our rubygems component versions are locked down with `Gemfile.lock` and `Gemfile.windows.lock` (which affects windows), and can be updated with `rake dependencies`.
+Our rubygems component versions are locked down with `Gemfile.lock`, and can be updated with `rake dependencies`.
There are three gems versioned outside the `Gemfile`: `rubygems`, `bundler` and `chef`. `rubygems` and `bundler` are in the `RUBYGEMS_AT_LATEST_VERSION` constant in [version_policy.rb](version-policy.rb) and locked in [omnibus_overrides](omnibus_overrides.rb). They are kept up to date by `rake dependencies`.
-**Windows**: [Gemfile.lock](Gemfile.lock) is generated platform-agnostic. In order to keep windows versions in sync, [Gemfile.windows](Gemfile.windows) reads the generic Gemfile.lock and explicitly pins all gems to those versions, allowing bundler to bring in windows-specific versions of the gems and new deps, but requiring that all gems shared between Windows and Unix have the same version.
+**Windows**: [Gemfile.lock](Gemfile.lock) is generated platform-agnostic, and then generated again for Windows. The one file has the solution for both Linux and Windows.
The tool we use to generate Windows-specific lockfiles on non-Windows machines is [tasks/bin/bundle-platform](bundle-platform), which takes the first argument and sets `Gem.platforms`, and then calls `bundle` with the remaining arguments.
diff --git a/acceptance/Gemfile.lock b/acceptance/Gemfile.lock
index fe7ffe9513..2be52cc859 100644
--- a/acceptance/Gemfile.lock
+++ b/acceptance/Gemfile.lock
@@ -86,7 +86,7 @@ GEM
excon (0.49.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
- ffi (1.9.10)
+ ffi (1.9.10-x86-mingw32)
fuzzyurl (0.8.0)
gssapi (1.2.0)
ffi (>= 1.0.1)
@@ -94,6 +94,7 @@ GEM
builder (>= 2.1.2)
hashie (3.4.3)
hitimes (1.2.3)
+ hitimes (1.2.3-x86-mingw32)
httpclient (2.7.1)
inspec (0.18.0)
json (~> 1.8)
@@ -130,6 +131,9 @@ GEM
mixlib-versioning
mixlib-log (1.6.0)
mixlib-shellout (2.2.6)
+ mixlib-shellout (2.2.6-universal-mingw32)
+ win32-process (~> 0.8.2)
+ wmi-lite (~> 1.0)
mixlib-versioning (1.1.0)
molinillo (0.4.4)
multi_json (1.11.2)
@@ -214,6 +218,8 @@ GEM
varia_model (0.4.1)
buff-extensions (~> 1.0)
hashie (>= 2.0.2, < 4.0.0)
+ win32-process (0.8.3)
+ ffi (>= 1.0.0)
windows_chef_zero (2.0.0)
test-kitchen (>= 1.2.1)
winrm (1.7.3)
@@ -229,9 +235,11 @@ GEM
logging (>= 1.6.1, < 3.0)
rubyzip (~> 1.1)
winrm (~> 1.5)
+ wmi-lite (1.0.0)
PLATFORMS
ruby
+ x86-mingw32
DEPENDENCIES
berkshelf
diff --git a/acceptance/fips/test/integration/fips/serverspec/Gemfile.lock b/acceptance/fips/test/integration/fips/serverspec/Gemfile.lock
index 44714c028b..bc1bc17377 100644
--- a/acceptance/fips/test/integration/fips/serverspec/Gemfile.lock
+++ b/acceptance/fips/test/integration/fips/serverspec/Gemfile.lock
@@ -1,10 +1,18 @@
GEM
remote: https://rubygems.org/
specs:
+ ffi (1.9.10-x86-mingw32)
mixlib-shellout (2.2.6)
+ mixlib-shellout (2.2.6-universal-mingw32)
+ win32-process (~> 0.8.2)
+ wmi-lite (~> 1.0)
+ win32-process (0.8.3)
+ ffi (>= 1.0.0)
+ wmi-lite (1.0.0)
PLATFORMS
ruby
+ x86-mingw32
DEPENDENCIES
mixlib-shellout
diff --git a/appveyor.yml b/appveyor.yml
index bdfe0fd24c..3e8b321125 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -28,13 +28,11 @@ install:
- update_rubygems
- gem --version
- bundler --version
+ - SET BUNDLE_IGNORE_CONFIG=true
+ - SET BUNDLE_FROZEN=1
+ - SET BUNDLE_WITHOUT=docgen:maintenance:omnibus_package:integration:aix:bsd:linux:mac_os_x:solaris
build_script:
-# TODO set frozen to true (can't do this until we can enable Gemfile.windows; can't do that
-# until we make the tests Bundle.with_clean_env before running things).
- # - SET BUNDLE_GEMFILE=%APPVEYOR_BUILD_FOLDER%\Gemfile.windows
- - bundle config --delete frozen
- - bundle config --local without docgen:maintenance:omnibus_package:integration:aix:bsd:linux:mac_os_x:solaris
- bundle install || bundle install || bundle install
test_script:
diff --git a/chef-config/lib/chef-config/package_task.rb b/chef-config/lib/chef-config/package_task.rb
index 5971510337..b984f60f9f 100644
--- a/chef-config/lib/chef-config/package_task.rb
+++ b/chef-config/lib/chef-config/package_task.rb
@@ -211,23 +211,20 @@ end
task :version => "version:update"
- Dir[File.expand_path("*gemspec", root_path)].reverse_each do |gemspec_path|
+ gemspec_platform_to_install = ""
+ Dir[File.expand_path("*.gemspec", root_path)].reverse_each do |gemspec_path|
gemspec = eval(IO.read(gemspec_path))
Gem::PackageTask.new(gemspec) do |task|
task.package_dir = full_package_dir
end
+ gemspec_platform_to_install = "-#{gemspec.platform}" if gemspec.platform != Gem::Platform::RUBY && Gem::Platform.match(gemspec.platform)
end
desc "Build and install a #{module_path} gem"
task :install => [:package] do
with_clean_env do
full_module_path = File.join(full_package_dir, module_path)
- # Install the windows version on windows
- if Gem.win_platform? && File.exist?("#{full_module_path}-#{version}-universal-mingw32.gem")
- sh %{gem install #{full_module_path}-#{version}-universal-mingw32.gem --no-rdoc --no-ri}
- else
- sh %{gem install #{full_module_path}-#{version}.gem --no-rdoc --no-ri}
- end
+ sh %{gem install #{full_module_path}-#{version}#{gemspec_platform_to_install}.gem --no-rdoc --no-ri}
end
end
diff --git a/chef-universal-darwin.gemspec b/chef-universal-darwin.gemspec
new file mode 100644
index 0000000000..59367b00f8
--- /dev/null
+++ b/chef-universal-darwin.gemspec
@@ -0,0 +1,58 @@
+$:.unshift(File.dirname(__FILE__) + "/lib")
+require "chef/version"
+
+Gem::Specification.new do |s|
+ s.name = "chef"
+ s.version = Chef::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.extra_rdoc_files = ["README.md", "CONTRIBUTING.md", "LICENSE" ]
+ s.summary = "A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure."
+ s.description = s.summary
+ s.license = "Apache-2.0"
+ s.author = "Adam Jacob"
+ s.email = "adam@chef.io"
+ s.homepage = "http://www.chef.io"
+
+ s.required_ruby_version = ">= 2.1.0"
+
+ s.add_dependency "chef-config", "= #{Chef::VERSION}"
+
+ s.add_dependency "mixlib-cli", "~> 1.4"
+ s.add_dependency "mixlib-log", "~> 1.3"
+ s.add_dependency "mixlib-authentication", "~> 1.4"
+ s.add_dependency "mixlib-shellout", "~> 2.0"
+ s.add_dependency "ohai", ">= 8.6.0.alpha.1", "< 9"
+
+ s.add_dependency "ffi-yajl", "~> 2.2"
+ s.add_dependency "net-ssh", ">= 2.9", "< 4.0"
+ s.add_dependency "net-ssh-multi", "~> 1.1"
+ s.add_dependency "net-sftp", "~> 2.1", ">= 2.1.2"
+ s.add_dependency "highline", "~> 1.6", ">= 1.6.9"
+ s.add_dependency "erubis", "~> 2.7"
+ s.add_dependency "diff-lcs", "~> 1.2", ">= 1.2.4"
+
+ s.add_dependency "chef-zero", "~> 4.5"
+
+ s.add_dependency "plist", "~> 3.2"
+
+ # Audit mode requires these, so they are non-developmental dependencies now
+ %w{rspec-core rspec-expectations rspec-mocks}.each { |gem| s.add_dependency gem, "~> 3.4" }
+ s.add_dependency "rspec_junit_formatter", "~> 0.2.0"
+ s.add_dependency "serverspec", "~> 2.7"
+ s.add_dependency "specinfra", "~> 2.10"
+
+ s.add_dependency "syslog-logger", "~> 1.6"
+ s.add_dependency "uuidtools", "~> 2.1.5"
+
+ s.add_dependency "proxifier", "~> 1.0"
+
+ # v1.10 is needed as a runtime dep now for 'bundler/inline'
+ # very deliberately avoiding putting a ceiling on this to avoid depsolver conflicts.
+ s.add_dependency "bundler", ">= 1.10"
+
+ s.bindir = "bin"
+ s.executables = %w{ chef-client chef-solo knife chef-shell chef-apply }
+
+ s.require_paths = %w{ lib lib-backcompat }
+ s.files = %w{Gemfile Rakefile LICENSE README.md CONTRIBUTING.md VERSION} + Dir.glob("{distro,lib,lib-backcompat,tasks,acceptance,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } + Dir.glob("*.gemspec")
+end
diff --git a/chef-windows.gemspec b/chef-universal-mingw32.gemspec
index a4f086cfaf..a4f086cfaf 100644
--- a/chef-windows.gemspec
+++ b/chef-universal-mingw32.gemspec
diff --git a/ci/verify-chef.bat b/ci/verify-chef.bat
index 1f8be56ef1..a063cd417e 100755
--- a/ci/verify-chef.bat
+++ b/ci/verify-chef.bat
@@ -46,8 +46,8 @@ call %EMBEDDED_BIN_DIR%\rspec --version
SET PATH=C:\opscode\%PROJECT_NAME%\bin;C:\opscode\%PROJECT_NAME%\embedded\bin;%PATH%
-REM ; Test against the vendored chef gem
-cd C:\opscode\%PROJECT_NAME%\embedded\lib\ruby\gems\2*\gems\chef-*-mingw32
+REM ; Test against the vendored chef gem (cd into the output of "bundle show chef")
+for /f "delims=" %%a in ('bundle show chef') do cd %%a
IF NOT EXIST "Gemfile.lock" (
ECHO "Chef gem does not contain a Gemfile.lock! This is needed to run any tests."
@@ -61,4 +61,8 @@ IF "%PIPELINE_NAME%" == "chef-fips" (
REM ; ffi-yajl must run in c-extension mode for perf, so force it so we don't accidentally fall back to ffi
set FORCE_FFI_YAJL=ext
+set BUNDLE_IGNORE_CONFIG=true
+set BUNDLE_FROZEN=1
+set BUNDLE_WITHOUT=docgen:maintenance:omnibus_package:integration:aix:bsd:linux:mac_os_x:solaris
+call bundle install
call bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o %WORKSPACE%\test.xml -f documentation spec/functional
diff --git a/ci/verify-chef.sh b/ci/verify-chef.sh
index d6486f3b35..61dc3ba699 100755
--- a/ci/verify-chef.sh
+++ b/ci/verify-chef.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+set -evx
+
# Set up a custom tmpdir, and clean it up before and after the tests
TMPDIR="${TMPDIR:-/tmp}/cheftest"
export TMPDIR
@@ -84,22 +86,31 @@ export FORCE_FFI_YAJL
# ACCEPTANCE environment variable will be set on acceptance testers.
# If is it set; we run the acceptance tests, otherwise run rspec tests.
if [ "x$ACCEPTANCE" != "x" ]; then
+ # Find the Chef gem and cd there.
+ OLD_PATH=$PATH
+ PATH=/opt/$PROJECT_NAME/bin:/opt/$PROJECT_NAME/embedded/bin:$PATH
+ cd /opt/$PROJECT_NAME
+ CHEF_GEM=`bundle show chef`
+ PATH=$OLD_PATH
+ cd $CHEF_GEM
+
# On acceptance testers we have Chef DK. We will use its Ruby environment
# to cut down the gem installation time.
PATH=/opt/chefdk/bin:/opt/chefdk/embedded/bin:$PATH
export PATH
- # Test against the vendored Chef gem
- cd /opt/$PROJECT_NAME/embedded/lib/ruby/gems/*/gems/chef-[0-9]*/acceptance
+ # Test against the Chef bundle
+ sudo env PATH=$PATH AWS_SSH_KEY_ID=$AWS_SSH_KEY_ID ARTIFACTORY_USERNAME=$ARTIFACTORY_USERNAME ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD gem install bundler
sudo env PATH=$PATH AWS_SSH_KEY_ID=$AWS_SSH_KEY_ID ARTIFACTORY_USERNAME=$ARTIFACTORY_USERNAME ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD bundle install
sudo env PATH=$PATH AWS_SSH_KEY_ID=$AWS_SSH_KEY_ID ARTIFACTORY_USERNAME=$ARTIFACTORY_USERNAME ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD KITCHEN_DRIVER=ec2 bundle exec chef-acceptance test --force-destroy
else
PATH=/opt/$PROJECT_NAME/bin:/opt/$PROJECT_NAME/embedded/bin:$PATH
export PATH
- # Test against the vendored Chef gem
- cd /opt/$PROJECT_NAME/embedded/lib/ruby/gems/*/gems/chef-[0-9]*
-
+ # Test against the installed Chef gem
+ cd /opt/$PROJECT_NAME
+ CHEF_GEM=`bundle show chef`
+ cd $CHEF_GEM
if [ ! -f "Gemfile.lock" ]; then
echo "Chef gem does not contain a Gemfile.lock! This is needed to run any tests."
exit 1
@@ -111,5 +122,8 @@ else
CHEF_FIPS=1
export CHEF_FIPS
fi
- sudo env PATH=$PATH TERM=xterm CHEF_FIPS=$CHEF_FIPS bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o $WORKSPACE/test.xml -f documentation spec/functional
+
+ # TODO Fix Solaris and AIX so we don't have to do GIT_SSL_NO_VERIFY=true
+ sudo env BUNDLE_IGNORE_CONFIG=true BUNDLE_FROZEN=1 BUNDLE_WITHOUT=docgen:maintenance:omnibus_package:integration GIT_SSL_NO_VERIFY=true PATH=$PATH TERM=xterm CHEF_FIPS=$CHEF_FIPS bundle install
+ sudo env BUNDLE_IGNORE_CONFIG=true BUNDLE_FROZEN=1 BUNDLE_WITHOUT=docgen:maintenance:omnibus_package:integration GIT_SSL_NO_VERIFY=true PATH=$PATH TERM=xterm CHEF_FIPS=$CHEF_FIPS bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o $WORKSPACE/test.xml -f documentation spec/functional
fi
diff --git a/kitchen-tests/Gemfile.lock b/kitchen-tests/Gemfile.lock
index 70f40c5235..78caba0014 100644
--- a/kitchen-tests/Gemfile.lock
+++ b/kitchen-tests/Gemfile.lock
@@ -64,9 +64,11 @@ GEM
excon (0.49.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
+ ffi (1.9.10-x86-mingw32)
fuzzyurl (0.8.0)
hashie (3.4.3)
hitimes (1.2.3)
+ hitimes (1.2.3-x86-mingw32)
httpclient (2.7.1)
jmespath (1.2.4)
json_pure (>= 1.8.1)
@@ -88,6 +90,9 @@ GEM
mixlib-versioning
mixlib-log (1.6.0)
mixlib-shellout (2.2.6)
+ mixlib-shellout (2.2.6-universal-mingw32)
+ win32-process (~> 0.8.2)
+ wmi-lite (~> 1.0)
mixlib-versioning (1.1.0)
molinillo (0.4.4)
multi_json (1.11.2)
@@ -148,9 +153,13 @@ GEM
varia_model (0.4.1)
buff-extensions (~> 1.0)
hashie (>= 2.0.2, < 4.0.0)
+ win32-process (0.8.3)
+ ffi (>= 1.0.0)
+ wmi-lite (1.0.0)
PLATFORMS
ruby
+ x86-mingw32
DEPENDENCIES
berkshelf
diff --git a/kitchen-tests/test/integration/webapp/serverspec/Gemfile.lock b/kitchen-tests/test/integration/webapp/serverspec/Gemfile.lock
index 4a62dbc9ab..ac6c11f28c 100644
--- a/kitchen-tests/test/integration/webapp/serverspec/Gemfile.lock
+++ b/kitchen-tests/test/integration/webapp/serverspec/Gemfile.lock
@@ -2,6 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
ffi (1.9.10)
+ ffi (1.9.10-x86-mingw32)
ffi-yajl (1.4.0)
ffi (~> 1.5)
libyajl2 (~> 1.2)
@@ -9,6 +10,7 @@ GEM
PLATFORMS
ruby
+ x86-mingw32
DEPENDENCIES
ffi-yajl (~> 1.1)
diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock
index 90bf93fa1c..5214847aa1 100644
--- a/omnibus/Gemfile.lock
+++ b/omnibus/Gemfile.lock
@@ -98,6 +98,7 @@ GEM
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.9.10)
+ ffi (1.9.10-x86-mingw32)
ffi-yajl (2.2.3)
libyajl2 (~> 1.2)
fuzzyurl (0.8.0)
@@ -107,6 +108,7 @@ GEM
builder (>= 2.1.2)
hashie (3.4.3)
hitimes (1.2.3)
+ hitimes (1.2.3-x86-mingw32)
httpclient (2.6.0.1)
iostruct (0.0.4)
ipaddress (0.8.3)
@@ -136,6 +138,9 @@ GEM
mixlib-versioning
mixlib-log (1.6.0)
mixlib-shellout (2.2.6)
+ mixlib-shellout (2.2.6-universal-mingw32)
+ win32-process (~> 0.8.2)
+ wmi-lite (~> 1.0)
mixlib-versioning (1.1.0)
multi_json (1.11.2)
multipart-post (1.2.0)
@@ -224,6 +229,8 @@ GEM
varia_model (0.4.1)
buff-extensions (~> 1.0)
hashie (>= 2.0.2, < 4.0.0)
+ win32-process (0.8.3)
+ ffi (>= 1.0.0)
winrm (1.7.3)
builder (>= 2.1.2)
gssapi (~> 1.2)
@@ -242,6 +249,7 @@ GEM
PLATFORMS
ruby
+ x86-mingw32
DEPENDENCIES
berkshelf (~> 3.0)
diff --git a/omnibus/files/chef-gem/build-chef-gem/gem-install-software-def.rb b/omnibus/files/chef-gem/build-chef-gem/gem-install-software-def.rb
index 5d77ebf7f2..3022bf448e 100644
--- a/omnibus/files/chef-gem/build-chef-gem/gem-install-software-def.rb
+++ b/omnibus/files/chef-gem/build-chef-gem/gem-install-software-def.rb
@@ -66,17 +66,7 @@ module BuildChefGem
end
def gemfile_path
- # gemfile path could be relative to software filename (and often is)
- @gemfile_path ||= begin
- # Grab the version (and maybe source) from the lockfile so omnibus knows whether
- # to toss the cache or not
- gemfile_path = File.join(root_path, "Gemfile")
- platform_gemfile_path = "#{gemfile_path}.#{Omnibus::Ohai["platform"]}"
- if File.exist?(platform_gemfile_path)
- gemfile_path = platform_gemfile_path
- end
- gemfile_path
- end
+ File.join(root_path, "Gemfile")
end
def lockfile_path
diff --git a/omnibus/files/chef/build-chef.rb b/omnibus/files/chef/build-chef.rb
index a4a6becfdd..b0d41c185b 100644
--- a/omnibus/files/chef/build-chef.rb
+++ b/omnibus/files/chef/build-chef.rb
@@ -28,17 +28,9 @@ module BuildChef
#
# Get the (possibly platform-specific) path to the Gemfile.
- # /var/omnibus/cache/src/chef/Gemfile or
- # /var/omnibus/cache/src/chef/Gemfile.windows
#
def chef_gemfile
- gemfile = File.join(project_dir, "Gemfile")
- # Check for platform specific version
- platform_gemfile = "#{gemfile}.#{Omnibus::Ohai["platform"]}"
- if File.exist?(platform_gemfile)
- gemfile = platform_gemfile
- end
- gemfile
+ File.join(project_dir, "Gemfile")
end
#
diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb
index 66056c0050..17d0dc4b89 100644
--- a/omnibus_overrides.rb
+++ b/omnibus_overrides.rb
@@ -1,4 +1,4 @@
-# Generated by "rake dependencies". Do not edit.
+# DO NOT EDIT. Generated by "rake dependencies". Edit version_policy.rb instead.
override :rubygems, version: "2.6.3"
override :bundler, version: "1.11.2"
override "libffi", version: "3.2.1"
@@ -12,7 +12,6 @@ override "makedepend", version: "1.0.5"
override "ncurses", version: "5.9"
override "pkg-config-lite", version: "0.28-1"
override "ruby", version: "2.1.8"
-override "ruby-windows-devkit", version: "4.5.2-20111229-1559"
override "ruby-windows-devkit-bash", version: "3.1.23-4-msys-1.0.18"
override "util-macros", version: "1.19.0"
override "xproto", version: "7.0.28"
diff --git a/tasks/bundle.rb b/tasks/bundle.rb
index 349f83124c..9de4529d1a 100644
--- a/tasks/bundle.rb
+++ b/tasks/bundle.rb
@@ -32,13 +32,7 @@ namespace :bundle do
puts "-------------------------------------------------------------------"
bundle "install #{args}", delete_gemfile_lock: true
platforms.each do |platform|
- puts ""
- puts "-------------------------------------------------------------------"
- puts "Updating Gemfile.#{platform}.lock ..."
- puts "-------------------------------------------------------------------"
- puts "Copy Gemfile.lock to Gemfile.#{platform}.lock ..."
- FileUtils.cp(File.join(project_root, "Gemfile.lock"), File.join(project_root, "Gemfile.#{platform}.lock"))
- bundle "lock", gemfile: "Gemfile.#{platform}", platform: platform
+ bundle "lock", platform: platform
end
end
end
@@ -54,13 +48,7 @@ namespace :bundle do
puts "-------------------------------------------------------------------"
bundle "install #{args}"
platforms.each do |platform|
- puts ""
- puts "-------------------------------------------------------------------"
- puts "Updating Gemfile.#{platform}.lock (conservatively) ..."
- puts "-------------------------------------------------------------------"
- puts "Copy Gemfile.lock to Gemfile.#{platform}.lock ..."
- FileUtils.cp(File.join(project_root, "Gemfile.lock"), File.join(project_root, "Gemfile.#{platform}.lock"))
- bundle "lock", gemfile: "Gemfile.#{platform}", platform: platform
+ bundle "lock", platform: platform
end
end
end
diff --git a/tasks/bundle_util.rb b/tasks/bundle_util.rb
index ee75610cac..c2f1ca51e3 100644
--- a/tasks/bundle_util.rb
+++ b/tasks/bundle_util.rb
@@ -25,12 +25,12 @@ module BundleUtil
result
end
- def with_bundle_unfrozen
- bundle "config --delete frozen"
+ def with_bundle_unfrozen(cwd: nil)
+ bundle "config --delete frozen", cwd: cwd
begin
yield
ensure
- bundle "config --local frozen 1"
+ bundle "config --local frozen 1", cwd: cwd
end
end
diff --git a/tasks/dependencies.rb b/tasks/dependencies.rb
index 35cbe2800e..d383ee4433 100644
--- a/tasks/dependencies.rb
+++ b/tasks/dependencies.rb
@@ -52,7 +52,13 @@ namespace :dependencies do
puts "-------------------------------------------------------------------"
puts "Updating #{dir}/Gemfile.lock#{conservative ? " (conservatively)" : ""} ..."
puts "-------------------------------------------------------------------"
- bundle "install", cwd: dir, delete_gemfile_lock: !conservative
+ with_bundle_unfrozen(cwd: dir) do
+ bundle "install", cwd: dir, delete_gemfile_lock: !conservative
+ # Include all other supported platforms into the lockfile as well
+ platforms.each do |platform|
+ bundle "lock", cwd: dir, platform: platform
+ end
+ end
end
end
end
diff --git a/tasks/gemfile_util.rb b/tasks/gemfile_util.rb
index 62d8cfdf0b..e21299705a 100644
--- a/tasks/gemfile_util.rb
+++ b/tasks/gemfile_util.rb
@@ -292,6 +292,8 @@ module GemfileUtil
# Never include bundler, it can't be bundled and doesn't put itself in
# the lockfile correctly anyway
next if spec.name == "bundler"
+ # Only the platform-specific locks for now (TODO make it possible to emit all locks)
+ next if spec.platform && spec.platform != Gem::Platform::RUBY
lock = lock_source_metadata(spec)
lock[:version] = spec.version.to_s
runtime = spec.dependencies.select { |dep| dep.type == :runtime }
@@ -304,6 +306,10 @@ module GemfileUtil
# Transitivize the deps.
locks.each do |name, lock|
+ # Not all deps were brought over (platform-specific ones) so weed them out
+ lock[:dependencies] &= locks.keys
+ lock[:development_dependencies] &= locks.keys
+
lock[:dependencies] = transitive_dependencies(locks, name, :dependencies)
lock[:development_dependencies] = transitive_dependencies(locks, name, :development_dependencies)
end