vagrant: 2.4.3 -> 2.4.8 (#434750)

authored by Sandro and committed by GitHub c8ea26ce 494a23fb

+48 -55
+32 -32
pkgs/by-name/va/vagrant/0001-Revert-Merge-pull-request-12225-from-chrisroberts-re.patch
··· 66 - 67 env = nil 68 begin 69 - require 'log4r' 70 - @@ -114,9 +91,6 @@ begin 71 require 'vagrant/util/platform' 72 require 'vagrant/util/experimental' 73 ··· 81 index f790039d3..97e67e3b8 100644 82 --- a/lib/vagrant.rb 83 +++ b/lib/vagrant.rb 84 - @@ -59,7 +59,7 @@ require "vagrant/plugin/manager" 85 # See https://github.com/rest-client/rest-client/issues/34#issuecomment-290858 86 # for more information 87 class VagrantLogger < Log4r::Logger ··· 94 index eb2caabb0..d75f54362 100644 95 --- a/lib/vagrant/bundler.rb 96 +++ b/lib/vagrant/bundler.rb 97 - @@ -189,11 +189,8 @@ module Vagrant 98 attr_reader :env_plugin_gem_path 99 # @return [Pathname] Vagrant environment data path 100 attr_reader :environment_data_path ··· 106 @plugin_gem_path = Vagrant.user_data_path.join("gems", RUBY_VERSION).freeze 107 @logger = Log4r::Logger.new("vagrant::bundler") 108 end 109 - @@ -290,6 +287,7 @@ module Vagrant 110 # Never allow dependencies to be remotely satisfied during init 111 request_set.remote = false 112 ··· 114 begin 115 @logger.debug("resolving solution from available specification set") 116 # Resolve the request set to ensure proper activation order 117 - @@ -652,6 +650,7 @@ module Vagrant 118 self_spec.activate 119 @logger.info("Activated vagrant specification version - #{self_spec.version}") 120 end ··· 122 # discover all the gems we have available 123 list = {} 124 if Gem.respond_to?(:default_specifications_dir) 125 - @@ -660,16 +659,10 @@ module Vagrant 126 spec_dir = Gem::Specification.default_specifications_dir 127 end 128 directories = [spec_dir] 129 - if Vagrant.in_bundler? 130 - Gem::Specification.find_all{true}.each do |spec| 131 - - list[spec.full_name] = spec 132 - end 133 - else 134 - builtin_specs.each do |spec| 135 - - list[spec.full_name] = spec 136 - end 137 + Gem::Specification.find_all{true}.each do |spec| 138 - + list[spec.full_name] = spec 139 end 140 - if Vagrant.in_installer? 141 + if(!Object.const_defined?(:Bundler)) ··· 146 index 5cb861c06..782615bc4 100644 147 --- a/lib/vagrant/errors.rb 148 +++ b/lib/vagrant/errors.rb 149 - @@ -636,18 +636,6 @@ module Vagrant 150 error_key(:provisioner_winrm_unsupported) 151 end 152 ··· 169 index b73f07f9c..9058e68b3 100644 170 --- a/lib/vagrant/plugin/manager.rb 171 +++ b/lib/vagrant/plugin/manager.rb 172 - @@ -179,26 +179,8 @@ module Vagrant 173 result 174 rescue Gem::GemNotFoundException 175 raise Errors::PluginGemNotFound, name: name ··· 202 index edae9b477..782904f49 100644 203 --- a/templates/locales/en.yml 204 +++ b/templates/locales/en.yml 205 - @@ -794,9 +794,9 @@ en: 206 matching this provider. For example, if you're using VirtualBox, 207 the clone environment must also be using VirtualBox. 208 cloud_init_not_found: |- ··· 214 cloud init command '%{cmd}' failed on guest '%{guest_name}'. 215 command_deprecated: |- 216 The command 'vagrant %{name}' has been deprecated and is no longer functional 217 - @@ -1245,30 +1245,6 @@ en: 218 following command: 219 220 vagrant plugin install --local ··· 245 powershell_not_found: |- 246 Failed to locate the powershell executable on the available PATH. Please 247 ensure powershell is installed and available on the local PATH, then 248 - @@ -3015,7 +2998,7 @@ en: 249 pushes: 250 file: 251 no_destination: "File destination must be specified." ··· 258 index dbbd52112..bc11309aa 100644 259 --- a/test/unit/bin/vagrant_test.rb 260 +++ b/test/unit/bin/vagrant_test.rb 261 - @@ -30,7 +30,6 @@ describe "vagrant bin" do 262 allow(Kernel).to receive(:exit) 263 allow(Vagrant::Environment).to receive(:new).and_return(env) 264 allow(Vagrant).to receive(:in_installer?).and_return(true) ··· 270 index 69f425c66..00cedc021 100644 271 --- a/test/unit/vagrant/bundler_test.rb 272 +++ b/test/unit/vagrant/bundler_test.rb 273 - @@ -778,46 +778,42 @@ describe Vagrant::Bundler do 274 end 275 end 276 277 - context "when bundler is not defined" do 278 - before { expect(Vagrant).to receive(:in_bundler?).and_return(false) } 279 + context "when run time dependencies are defined" do 280 + let(:vagrant_dep_specs) { [double("spec", name: "vagrant-dep", requirement: double("spec-req", as_list: []))] } 281 282 - - context "when running inside the installer" do 283 - - before { expect(Vagrant).to receive(:in_installer?).and_return(true) } 284 + it "should call #gem to activate the dependencies" do 285 + expect(subject).to receive(:gem).with("vagrant-dep", any_args) 286 + subject.send(:vagrant_internal_specs) 287 + end 288 + end 289 290 - - it "should load gem specification directories" do 291 - - expect(Gem::Specification).to receive(:dirs).and_return(spec_dirs) 292 - - subject.send(:vagrant_internal_specs) 293 - - end 294 - + context "when bundler is not defined" do 295 - + before { expect(Object).to receive(:const_defined?).with(:Bundler).and_return(false) } 296 - 297 - context "when checking paths" do 298 - let(:spec_dirs) { [double("spec-dir", start_with?: in_user_dir)] } 299 - let(:in_user_dir) { true } 300 - let(:user_dir) { double("user-dir") } 301 + it "should load gem specification directories" do 302 + expect(Gem::Specification).to receive(:dirs).and_return(spec_dirs) 303 + subject.send(:vagrant_internal_specs) 304 + end 305 306 - - before { allow(Gem).to receive(:user_dir).and_return(user_dir) } 307 + context "when checking paths" do 308 + let(:spec_dirs) { [double("spec-dir", start_with?: in_user_dir)] } 309 + let(:in_user_dir) { true } 310 + let(:user_dir) { double("user-dir") } 311 312 - - it "should check if path is within local user directory" do 313 - - expect(spec_dirs.first).to receive(:start_with?).with(user_dir).and_return(false) 314 - - subject.send(:vagrant_internal_specs) 315 - - end 316 - - 317 - context "when path is not within user directory" do 318 - let(:in_user_dir) { false } 319 + before { allow(Gem).to receive(:user_dir).and_return(user_dir) }
··· 66 - 67 env = nil 68 begin 69 + require 'vagrant' 70 + @@ -113,9 +90,6 @@ begin 71 require 'vagrant/util/platform' 72 require 'vagrant/util/experimental' 73 ··· 81 index f790039d3..97e67e3b8 100644 82 --- a/lib/vagrant.rb 83 +++ b/lib/vagrant.rb 84 + @@ -64,7 +64,7 @@ require "vagrant/plugin/manager" 85 # See https://github.com/rest-client/rest-client/issues/34#issuecomment-290858 86 # for more information 87 class VagrantLogger < Log4r::Logger ··· 94 index eb2caabb0..d75f54362 100644 95 --- a/lib/vagrant/bundler.rb 96 +++ b/lib/vagrant/bundler.rb 97 + @@ -192,11 +192,8 @@ 98 attr_reader :env_plugin_gem_path 99 # @return [Pathname] Vagrant environment data path 100 attr_reader :environment_data_path ··· 106 @plugin_gem_path = Vagrant.user_data_path.join("gems", RUBY_VERSION).freeze 107 @logger = Log4r::Logger.new("vagrant::bundler") 108 end 109 + @@ -298,6 +295,7 @@ 110 # Never allow dependencies to be remotely satisfied during init 111 request_set.remote = false 112 ··· 114 begin 115 @logger.debug("resolving solution from available specification set") 116 # Resolve the request set to ensure proper activation order 117 + @@ -672,6 +670,7 @@ 118 self_spec.activate 119 @logger.info("Activated vagrant specification version - #{self_spec.version}") 120 end ··· 122 # discover all the gems we have available 123 list = {} 124 if Gem.respond_to?(:default_specifications_dir) 125 + @@ -680,16 +679,10 @@ 126 spec_dir = Gem::Specification.default_specifications_dir 127 end 128 directories = [spec_dir] 129 - if Vagrant.in_bundler? 130 - Gem::Specification.find_all{true}.each do |spec| 131 + - list[spec.name] = spec 132 - end 133 - else 134 - builtin_specs.each do |spec| 135 + - list[spec.name] = spec 136 - end 137 + Gem::Specification.find_all{true}.each do |spec| 138 + + list[spec.name] = spec 139 end 140 - if Vagrant.in_installer? 141 + if(!Object.const_defined?(:Bundler)) ··· 146 index 5cb861c06..782615bc4 100644 147 --- a/lib/vagrant/errors.rb 148 +++ b/lib/vagrant/errors.rb 149 + @@ -691,18 +691,6 @@ module Vagrant 150 error_key(:provisioner_winrm_unsupported) 151 end 152 ··· 169 index b73f07f9c..9058e68b3 100644 170 --- a/lib/vagrant/plugin/manager.rb 171 +++ b/lib/vagrant/plugin/manager.rb 172 + @@ -182,26 +182,8 @@ module Vagrant 173 result 174 rescue Gem::GemNotFoundException 175 raise Errors::PluginGemNotFound, name: name ··· 202 index edae9b477..782904f49 100644 203 --- a/templates/locales/en.yml 204 +++ b/templates/locales/en.yml 205 + @@ -875,9 +875,9 @@ en: 206 matching this provider. For example, if you're using VirtualBox, 207 the clone environment must also be using VirtualBox. 208 cloud_init_not_found: |- ··· 214 cloud init command '%{cmd}' failed on guest '%{guest_name}'. 215 command_deprecated: |- 216 The command 'vagrant %{name}' has been deprecated and is no longer functional 217 + @@ -1347,30 +1347,6 @@ en: 218 following command: 219 220 vagrant plugin install --local ··· 245 powershell_not_found: |- 246 Failed to locate the powershell executable on the available PATH. Please 247 ensure powershell is installed and available on the local PATH, then 248 + @@ -3183,7 +3159,7 @@ en: 249 pushes: 250 file: 251 no_destination: "File destination must be specified." ··· 258 index dbbd52112..bc11309aa 100644 259 --- a/test/unit/bin/vagrant_test.rb 260 +++ b/test/unit/bin/vagrant_test.rb 261 + @@ -33,7 +33,6 @@ describe "vagrant bin" do 262 allow(Kernel).to receive(:exit) 263 allow(Vagrant::Environment).to receive(:new).and_return(env) 264 allow(Vagrant).to receive(:in_installer?).and_return(true) ··· 270 index 69f425c66..00cedc021 100644 271 --- a/test/unit/vagrant/bundler_test.rb 272 +++ b/test/unit/vagrant/bundler_test.rb 273 + @@ -809,46 +809,42 @@ describe Vagrant::Bundler do 274 end 275 end 276 277 - context "when bundler is not defined" do 278 - before { expect(Vagrant).to receive(:in_bundler?).and_return(false) } 279 + - 280 + - context "when running inside the installer" do 281 + - before { expect(Vagrant).to receive(:in_installer?).and_return(true) } 282 + context "when run time dependencies are defined" do 283 + let(:vagrant_dep_specs) { [double("spec", name: "vagrant-dep", requirement: double("spec-req", as_list: []))] } 284 285 + - it "should load gem specification directories" do 286 + - expect(Gem::Specification).to receive(:dirs).and_return(spec_dirs) 287 + - subject.send(:vagrant_internal_specs) 288 + - end 289 + it "should call #gem to activate the dependencies" do 290 + expect(subject).to receive(:gem).with("vagrant-dep", any_args) 291 + subject.send(:vagrant_internal_specs) 292 + end 293 + end 294 295 - context "when checking paths" do 296 - let(:spec_dirs) { [double("spec-dir", start_with?: in_user_dir)] } 297 - let(:in_user_dir) { true } 298 - let(:user_dir) { double("user-dir") } 299 + + context "when bundler is not defined" do 300 + + before { expect(Object).to receive(:const_defined?).with(:Bundler).and_return(false) } 301 + 302 + - before { allow(Gem).to receive(:user_dir).and_return(user_dir) } 303 + it "should load gem specification directories" do 304 + expect(Gem::Specification).to receive(:dirs).and_return(spec_dirs) 305 + subject.send(:vagrant_internal_specs) 306 + end 307 308 + - it "should check if path is within local user directory" do 309 + - expect(spec_dirs.first).to receive(:start_with?).with(user_dir).and_return(false) 310 + - subject.send(:vagrant_internal_specs) 311 + - end 312 + context "when checking paths" do 313 + let(:spec_dirs) { [double("spec-dir", start_with?: in_user_dir)] } 314 + let(:in_user_dir) { true } 315 + let(:user_dir) { double("user-dir") } 316 317 - context "when path is not within user directory" do 318 - let(:in_user_dir) { false } 319 + before { allow(Gem).to receive(:user_dir).and_return(user_dir) }
+14 -4
pkgs/by-name/va/vagrant/gemset.nix
··· 44 platforms = [ ]; 45 source = { 46 remotes = [ "https://rubygems.org" ]; 47 - sha256 = "1lvcp8bsd35g57f7wz4jigcw2sryzzwrpcgjwwf3chmjrjcww5in"; 48 type = "gem"; 49 }; 50 - version = "4.1.0"; 51 }; 52 concurrent-ruby = { 53 groups = [ "default" ]; ··· 58 type = "gem"; 59 }; 60 version = "1.3.4"; 61 }; 62 date = { 63 groups = [ "default" ]; ··· 837 platforms = [ ]; 838 source = { 839 remotes = [ "https://rubygems.org" ]; 840 - sha256 = "0x5l2pn4x92734k6i2wcjbn2klmwgkiqaajvxadh35k74dgnyh18"; 841 type = "gem"; 842 }; 843 - version = "0.1.1"; 844 }; 845 webrick = { 846 groups = [ "development" ];
··· 44 platforms = [ ]; 45 source = { 46 remotes = [ "https://rubygems.org" ]; 47 + sha256 = "sha256-mo1IS+L9QJag6QoM0+RJoFvDqjP4rJ5Nbc72rBRVtuw="; 48 type = "gem"; 49 }; 50 + version = "5.1.0"; 51 }; 52 concurrent-ruby = { 53 groups = [ "default" ]; ··· 58 type = "gem"; 59 }; 60 version = "1.3.4"; 61 + }; 62 + csv = { 63 + groups = [ "default" ]; 64 + platforms = [ ]; 65 + source = { 66 + remotes = [ "https://rubygems.org" ]; 67 + sha256 = "sha256-C70d79wxE0q+/tAnpjmzcjwnU4YhUPTD7mHKtxsg1n0="; 68 + type = "gem"; 69 + }; 70 + version = "3.3.0"; 71 }; 72 date = { 73 groups = [ "default" ]; ··· 847 platforms = [ ]; 848 source = { 849 remotes = [ "https://rubygems.org" ]; 850 + sha256 = "sha256-xG2dy203UZnKB0ZbxnZp7o8EGuqlXdfa/m3k3Zeydkc="; 851 type = "gem"; 852 }; 853 + version = "0.2.0"; 854 }; 855 webrick = { 856 groups = [ "development" ];
+2 -3
pkgs/by-name/va/vagrant/package.nix
··· 16 let 17 # NOTE: bumping the version and updating the hash is insufficient; 18 # you must use bundix to generate a new gemset.nix in the Vagrant source. 19 - version = "2.4.3"; 20 url = "https://github.com/hashicorp/vagrant/archive/v${version}.tar.gz"; 21 - hash = "sha256-ZQWdSCV5lBL8XUnOvCFwJAFk+tw30q2lRTHR93qeZ2I="; 22 23 deps = bundlerEnv rec { 24 name = "${pname}-${version}"; ··· 72 buildInputs = [ openssl ]; 73 74 patches = [ 75 - ./unofficial-installation-nowarn.patch 76 ./use-system-bundler-version.patch 77 ./0004-Support-system-installed-plugins.patch 78 ./0001-Revert-Merge-pull-request-12225-from-chrisroberts-re.patch
··· 16 let 17 # NOTE: bumping the version and updating the hash is insufficient; 18 # you must use bundix to generate a new gemset.nix in the Vagrant source. 19 + version = "2.4.8"; 20 url = "https://github.com/hashicorp/vagrant/archive/v${version}.tar.gz"; 21 + hash = "sha256-AVagvZKbVT4RWrCJdskhABTunRM9tBb5+jovYM/VF+0="; 22 23 deps = bundlerEnv rec { 24 name = "${pname}-${version}"; ··· 72 buildInputs = [ openssl ]; 73 74 patches = [ 75 ./use-system-bundler-version.patch 76 ./0004-Support-system-installed-plugins.patch 77 ./0001-Revert-Merge-pull-request-12225-from-chrisroberts-re.patch
-16
pkgs/by-name/va/vagrant/unofficial-installation-nowarn.patch
··· 1 - diff --git a/bin/vagrant b/bin/vagrant 2 - index 7ca30b391..d3f4ea61a 100755 3 - --- a/bin/vagrant 4 - +++ b/bin/vagrant 5 - @@ -221,11 +221,6 @@ begin 6 - end 7 - end 8 - 9 - - if !Vagrant.in_installer? && !Vagrant.very_quiet? 10 - - # If we're not in the installer, warn. 11 - - env.ui.warn(I18n.t("vagrant.general.not_in_installer") + "\n", prefix: false) 12 - - end 13 - - 14 - # Acceptable experimental flag values include: 15 - # 16 - # Unset - Disables experimental features
···