summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-04-16 21:22:16 -0700
committerJohn Keiser <john@johnkeiser.com>2016-04-18 14:21:02 -0700
commit31f9ada8660a2831204aca436e343b6a10b103cd (patch)
tree9d22ab219a02c3f7303ec056c989e858a87a68f7
parentea2593fe58037739c5c2ada517e3d988dec290ff (diff)
downloadchef-31f9ada8660a2831204aca436e343b6a10b103cd.tar.gz
Allow Windows to freeze
-rw-r--r--appveyor.yml6
-rw-r--r--omnibus/config/projects/chef.rb2
-rw-r--r--omnibus/config/software/chef.rb5
-rw-r--r--omnibus/files/chef-appbundle/build-chef-appbundle.rb5
-rw-r--r--omnibus/files/chef/build-chef.rb2
-rw-r--r--tasks/dependencies.rb2
-rw-r--r--version_policy.rb7
7 files changed, 14 insertions, 15 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 17282f9414..bdfe0fd24c 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -28,10 +28,12 @@ install:
- update_rubygems
- gem --version
- bundler --version
- - SET BUNDLE_GEMFILE=Gemfile.windows
build_script:
- - bundle config --local frozen 1
+# 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
diff --git a/omnibus/config/projects/chef.rb b/omnibus/config/projects/chef.rb
index ce79c5cd1d..fa6f30b322 100644
--- a/omnibus/config/projects/chef.rb
+++ b/omnibus/config/projects/chef.rb
@@ -45,6 +45,8 @@ end
overrides_path = File.expand_path("../../../../omnibus_overrides.rb", __FILE__)
instance_eval(IO.read(overrides_path), overrides_path)
+override :"ruby-windows-devkit", version: "4.5.2-20111229-1559" if windows? && windows_arch_i386?
+
dependency "preparation"
# All actual dependencies are in chef-complete, so that the addition
diff --git a/omnibus/config/software/chef.rb b/omnibus/config/software/chef.rb
index 866694c894..4b4e9c2850 100644
--- a/omnibus/config/software/chef.rb
+++ b/omnibus/config/software/chef.rb
@@ -63,10 +63,7 @@ build do
# 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.
- # TODO Windows cannot be frozen, because Bundler doesn't understand platform-specific
- # versions. However, on Windows we have explicit version pins for most things, so
- # we will *probably* get the exact versions of everything we want.
- create_bundle_config(chef_gemfile, retries: 4, jobs: windows? ? 1 : 7, frozen: !windows?)
+ create_bundle_config(chef_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) { "" } }
diff --git a/omnibus/files/chef-appbundle/build-chef-appbundle.rb b/omnibus/files/chef-appbundle/build-chef-appbundle.rb
index 5e4a6afdfd..da6a4dc970 100644
--- a/omnibus/files/chef-appbundle/build-chef-appbundle.rb
+++ b/omnibus/files/chef-appbundle/build-chef-appbundle.rb
@@ -50,10 +50,7 @@ module BuildChefAppbundle
# "test", "changelog" and "guard" come from berkshelf, "maintenance" comes from chef
# "tools" and "integration" come from inspec
shellout!("#{bundle_bin} config --local without #{without_groups.join(":")}", env: env, cwd: installed_path)
- # TODO Windows cannot be frozen, because Bundler doesn't understand platform-specific
- # versions. However, on Windows we have explicit version pins for most things, so
- # we will *probably* get the exact versions of everything we want.
- shellout!("#{bundle_bin} config --local frozen 1") unless windows?
+ shellout!("#{bundle_bin} config --local frozen 1")
shellout!("#{bundle_bin} check", env: env, cwd: installed_path)
diff --git a/omnibus/files/chef/build-chef.rb b/omnibus/files/chef/build-chef.rb
index dd2f76e049..a4a6becfdd 100644
--- a/omnibus/files/chef/build-chef.rb
+++ b/omnibus/files/chef/build-chef.rb
@@ -78,7 +78,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 --trace", env: chef_env, cwd: gem_path)
+ shellout!("#{bundle_bin} exec #{rake_bin} install", env: chef_env, cwd: gem_path)
end
end
end
diff --git a/tasks/dependencies.rb b/tasks/dependencies.rb
index 0fe3907ce1..35cbe2800e 100644
--- a/tasks/dependencies.rb
+++ b/tasks/dependencies.rb
@@ -104,7 +104,7 @@ namespace :dependencies do
puts "-------------------------------------------------------------------"
# Generate the new overrides file
- overrides = "# Generated by \"rake dependencies\". Do not edit.\n"
+ overrides = "# DO NOT EDIT. Generated by \"rake dependencies\". Edit version_policy.rb instead.\n"
# Replace the bundler and rubygems versions
OMNIBUS_RUBYGEMS_AT_LATEST_VERSION.each do |override_name, gem_name|
diff --git a/version_policy.rb b/version_policy.rb
index fd60fbd644..a83251c226 100644
--- a/version_policy.rb
+++ b/version_policy.rb
@@ -33,9 +33,10 @@ OMNIBUS_OVERRIDES = {
"ncurses" => "5.9",
"pkg-config-lite" => "0.28-1",
"ruby" => "2.1.8",
- # Leave dev-kit pinned to 4.5 because 4.7 is 20MB larger and we don't want
- # to unnecessarily make the client any fatter.
- "ruby-windows-devkit" => "4.5.2-20111229-1559",
+ # Leave dev-kit pinned to 4.5 on 32-bit, because 4.7 is 20MB larger and we don't want
+ # to unnecessarily make the client any fatter. (Since it's different between
+ # 32 and 64, we have to do it in the project file still.)
+ # "ruby-windows-devkit" => "4.5.2-20111229-1559",
"ruby-windows-devkit-bash" => "3.1.23-4-msys-1.0.18",
"util-macros" => "1.19.0",
"xproto" => "7.0.28",