vagrantup 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b1999c814c361d5984f3ea9093c8d733751ca12
4
- data.tar.gz: 15b6e72867f8cce3674a4bbfc617755dbe5153e0
3
+ metadata.gz: c5f7061a128467581a0f3bbe3484e10f2b332a59
4
+ data.tar.gz: c4ca80503ed7c9f7efcfbbd013cc620609b9afc9
5
5
  SHA512:
6
- metadata.gz: bd6ddac289f2463b00f518f6a43ec83a5e2ca14296d5f77bffe3d123b3e08f67b4813fa0b2a1b5299c996c6e28b0fcf192578b518bf672f7199e8dbd113e7d56
7
- data.tar.gz: c2ec52482b59a42b351d493233d33f6c04825b95e0e6c143954dc087cea4214afc6d7897f79a5a9b02a329dfc35fd440fb4c6fa67d8802f213df425d4e6c1c49
6
+ metadata.gz: f704bbfdd79516995b74e33b8bc556666042b0fb382e46f2c0be2dddc097a8c51adfeebf495de6ec98ed871345c24918ad860389a0de88d4b9cba86957f0c56d
7
+ data.tar.gz: 6ea39a6687508855b292af0319069c8b029b69e159da4aa6e68f883518b98edbeca49fb0170ec72dabe019174ee69b01e4535d5f556c95ea30f08cfd09647fc4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 0.9.6 (February 7, 2012)
2
+
3
+ - Fix strange issue with inconsistent childprocess reads on JRuby. [GH-711]
4
+ - `vagrant ssh` does a direct `exec()` syscall now instead of going through
5
+ the shell. This makes it so things like shell expansion oddities no longer
6
+ cause problems. [GH-715]
7
+ - Fix crashing case if there are no ports to forward.
8
+ - Fix issue surrounding improper configuration of host only networks on
9
+ RedHat guests. [GH-719]
10
+ - NFS should work properly on Gentoo. [GH-706]
11
+
1
12
  ## 0.9.5 (February 5, 2012)
2
13
 
3
14
  - Fix crashing case when all network options are `:auto_config false`.
@@ -81,7 +81,10 @@ module Vagrant
81
81
  ports << options.merge(:name => options[:name], :adapter => options[:adapter])
82
82
  end
83
83
 
84
- @env[:vm].driver.forward_ports(ports)
84
+ if !ports.empty?
85
+ # We only need to forward ports if there are any to forward
86
+ @env[:vm].driver.forward_ports(ports)
87
+ end
85
88
  end
86
89
  end
87
90
  end
@@ -144,7 +144,7 @@ module Vagrant
144
144
  pf_builder.join(",")])
145
145
  end
146
146
 
147
- execute("modifyvm", @uuid, *args)
147
+ execute("modifyvm", @uuid, *args) if !args.empty?
148
148
  end
149
149
 
150
150
  def halt
@@ -144,7 +144,7 @@ module Vagrant
144
144
  pf_builder.join(",")])
145
145
  end
146
146
 
147
- execute("modifyvm", @uuid, *args)
147
+ execute("modifyvm", @uuid, *args) if !args.empty?
148
148
  end
149
149
 
150
150
  def halt
@@ -39,9 +39,9 @@ module Vagrant
39
39
  # each specifically, we avoid reconfiguring eth0 (the NAT interface) so
40
40
  # SSH never dies.
41
41
  interfaces.each do |interface|
42
- vm.channel.sudo("/sbin/ifconfig eth#{interface} down 2> /dev/null")
42
+ vm.channel.sudo("/sbin/ifdown eth#{interface} 2> /dev/null", :error_check => false)
43
43
  vm.channel.sudo("cat /tmp/vagrant-network-entry_#{interface} >> #{network_scripts_dir}/ifcfg-eth#{interface}")
44
- vm.channel.sudo("/sbin/ifconfig eth#{interface} up 2> /dev/null")
44
+ vm.channel.sudo("/sbin/ifup eth#{interface} 2> /dev/null")
45
45
  end
46
46
  end
47
47
 
@@ -0,0 +1,20 @@
1
+ module Vagrant
2
+ module Hosts
3
+ class Gentoo < Linux
4
+ def self.match?
5
+ return File.exists?("/etc/gentoo-release")
6
+ end
7
+
8
+ # Normal, mid-range precedence.
9
+ def self.precedence
10
+ 5
11
+ end
12
+
13
+ def initialize(*args)
14
+ super
15
+
16
+ @nfs_server_binary = "/etc/init.d/nfs"
17
+ end
18
+ end
19
+ end
20
+ end
data/lib/vagrant/hosts.rb CHANGED
@@ -7,6 +7,7 @@ module Vagrant
7
7
  autoload :BSD, 'vagrant/hosts/bsd'
8
8
  autoload :FreeBSD, 'vagrant/hosts/freebsd'
9
9
  autoload :Fedora, 'vagrant/hosts/fedora'
10
+ autoload :Gentoo, 'vagrant/hosts/gentoo'
10
11
  autoload :Linux, 'vagrant/hosts/linux'
11
12
  autoload :Windows, 'vagrant/hosts/windows'
12
13
 
@@ -146,12 +146,7 @@ module Vagrant
146
146
  :manifest => @manifest_file)
147
147
 
148
148
  env[:vm].channel.sudo(command) do |type, data|
149
- # Output the data with the proper color based on the stream.
150
- color = type == :stdout ? :green : :red
151
-
152
- # Note: Be sure to chomp the data to avoid the newlines that the
153
- # Chef outputs.
154
- env[:ui].info(data.chomp, :color => color, :prefix => false)
149
+ env[:ui].info(data.chomp, :prefix => false)
155
150
  end
156
151
  end
157
152
 
data/lib/vagrant/ssh.rb CHANGED
@@ -75,26 +75,26 @@ module Vagrant
75
75
  options[:private_key_path] = ssh_info[:private_key_path]
76
76
 
77
77
  # Command line options
78
- command_options = ["-p #{options[:port]}", "-o UserKnownHostsFile=/dev/null",
79
- "-o StrictHostKeyChecking=no", "-o IdentitiesOnly=yes",
80
- "-o LogLevel=ERROR"]
81
- command_options << "-i #{options[:private_key_path]}" if !plain_mode
82
- command_options << "-o ForwardAgent=yes" if ssh_info[:forward_agent]
78
+ command_options = ["-p", options[:port].to_s, "-o", "UserKnownHostsFile=/dev/null",
79
+ "-o", "StrictHostKeyChecking=no", "-o", "IdentitiesOnly=yes",
80
+ "-o", "LogLevel=ERROR"]
81
+ command_options += ["-i", options[:private_key_path]] if !plain_mode
82
+ command_options += ["-o", "ForwardAgent=yes"] if ssh_info[:forward_agent]
83
83
 
84
84
  # If there are extra options, then we append those
85
85
  command_options.concat(opts[:extra_args]) if opts[:extra_args]
86
86
 
87
87
  if ssh_info[:forward_x11]
88
88
  # Both are required so that no warnings are shown regarding X11
89
- command_options << "-o ForwardX11=yes"
90
- command_options << "-o ForwardX11Trusted=yes"
89
+ command_options += ["-o", "ForwardX11=yes"]
90
+ command_options += ["-o", "ForwardX11Trusted=yes"]
91
91
  end
92
92
 
93
93
  host_string = options[:host]
94
94
  host_string = "#{options[:username]}@#{host_string}" if !plain_mode
95
- command = "ssh #{command_options.join(" ")} #{host_string}".strip
96
- @logger.info("Invoking SSH: #{command}")
97
- safe_exec(command)
95
+ command_options << host_string
96
+ @logger.info("Invoking SSH: #{command_options.inspect}")
97
+ safe_exec("ssh", *command_options)
98
98
  end
99
99
 
100
100
  # Checks the file permissions for a private key, resetting them
@@ -78,8 +78,11 @@ module Vagrant
78
78
  # given vagrant environment. This allows for testing of middlewares.
79
79
  def action_env(v_env = nil)
80
80
  v_env ||= vagrant_env
81
+ # duplicate the Vagrant::Environment ui and get the default vm object
82
+ # for the new action environment from the first pair in the vms list
83
+ opts = {:ui => v_env.ui.dup, :vm => v_env.vms.first.last}
81
84
  app = lambda { |env| }
82
- env = Vagrant::Action::Environment.new(v_env)
85
+ env = Vagrant::Action::Environment.new(opts)
83
86
  env["vagrant.test"] = true
84
87
  [app, env]
85
88
  end
@@ -15,7 +15,6 @@ module Vagrant
15
15
  matchers = [/\e\[\d*[ABCD]/, # Matches things like \e[4D
16
16
  /\e\[(\d*;)?\d*[HF]/, # Matches \e[1;2H or \e[H
17
17
  /\e\[(s|u|2J|K)/, # Matches \e[s, \e[2J, etc.
18
- /\e\[(\d*;){0,2}\d*m/, # Matches color escapes: \e[32m
19
18
  /\e\[=\d*[hl]/, # Matches \e[=24h
20
19
  /\e\[\?[1-9][hl]/, # Matches \e[?2h
21
20
  /\e\[20[hl]/, # Matches \e[20l]
@@ -7,7 +7,7 @@ module Vagrant
7
7
  # thread. In that case, `safe_exec` automatically falls back to
8
8
  # forking.
9
9
  module SafeExec
10
- def safe_exec(command)
10
+ def safe_exec(command, *args)
11
11
  # Create a list of things to rescue from. Since this is OS
12
12
  # specific, we need to do some defined? checks here to make
13
13
  # sure they exist.
@@ -20,7 +20,7 @@ module Vagrant
20
20
  begin
21
21
  pid = nil
22
22
  pid = fork if fork_instead
23
- Kernel.exec(command) if pid.nil?
23
+ Kernel.exec(command, *args) if pid.nil?
24
24
  Process.wait(pid) if pid
25
25
  rescue *rescue_from
26
26
  # We retried already, raise the issue and be done
@@ -64,10 +64,6 @@ module Vagrant
64
64
  # Make sure the stdin does not buffer
65
65
  process.io.stdin.sync = true
66
66
 
67
- # Close the writer pipes, since we're just reading
68
- stdout_writer.close
69
- stderr_writer.close
70
-
71
67
  # Create a dictionary to store all the output we see.
72
68
  io_data = { :stdout => "", :stderr => "" }
73
69
 
@@ -140,6 +136,12 @@ module Vagrant
140
136
  yield io_name, extra_data if block_given?
141
137
  end
142
138
 
139
+ # Close the writer pipes. Note that we do this so late (after the process
140
+ # has quit) to work around an issue with childprocess and JRuby. It is
141
+ # bizarre but it works.
142
+ stdout_writer.close
143
+ stderr_writer.close
144
+
143
145
  # Return an exit status container
144
146
  return Result.new(process.exit_code, io_data[:stdout], io_data[:stderr])
145
147
  end
@@ -2,5 +2,5 @@ module Vagrant
2
2
  # This will always be up to date with the current version of Vagrant,
3
3
  # since it is used to generate the gemspec and is also the source of
4
4
  # the version for `vagrant -v`
5
- VERSION = "0.9.5"
5
+ VERSION = "0.9.6"
6
6
  end
data/lib/vagrant.rb CHANGED
@@ -160,6 +160,7 @@ Vagrant.hosts.register(:arch) { Vagrant::Hosts::Arch }
160
160
  Vagrant.hosts.register(:bsd) { Vagrant::Hosts::BSD }
161
161
  Vagrant.hosts.register(:fedora) { Vagrant::Hosts::Fedora }
162
162
  Vagrant.hosts.register(:freebsd) { Vagrant::Hosts::FreeBSD }
163
+ Vagrant.hosts.register(:gentoo) { Vagrant::Hosts::Gentoo }
163
164
  Vagrant.hosts.register(:linux) { Vagrant::Hosts::Linux }
164
165
  Vagrant.hosts.register(:windows) { Vagrant::Hosts::Windows }
165
166
 
@@ -11,7 +11,6 @@ describe Vagrant::Util::ANSIEscapeCodeRemover do
11
11
 
12
12
  it "should remove ANSI escape codes" do
13
13
  klass.remove_ansi_escape_codes("\e[Hyo").should == "yo"
14
- klass.remove_ansi_escape_codes("\e[38myo").should == "yo"
15
14
  end
16
15
  end
17
16
 
data/vagrant.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.rubyforge_project = "vagrant"
16
16
 
17
17
  s.add_dependency "archive-tar-minitar", "= 0.5.2"
18
- s.add_dependency "childprocess", "~> 0.3.0"
18
+ s.add_dependency "childprocess", "~> 0.3.1"
19
19
  s.add_dependency "erubis", "~> 2.7.0"
20
20
  s.add_dependency "json", "~> 1.5.1"
21
21
  s.add_dependency "log4r", "~> 1.1.9"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrantup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitchell Hashimoto
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - ~>
33
33
  - !ruby/object:Gem::Version
34
- version: 0.3.0
34
+ version: 0.3.1
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ~>
40
40
  - !ruby/object:Gem::Version
41
- version: 0.3.0
41
+ version: 0.3.1
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: erubis
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -361,6 +361,7 @@ files:
361
361
  - lib/vagrant/hosts/bsd.rb
362
362
  - lib/vagrant/hosts/fedora.rb
363
363
  - lib/vagrant/hosts/freebsd.rb
364
+ - lib/vagrant/hosts/gentoo.rb
364
365
  - lib/vagrant/hosts/linux.rb
365
366
  - lib/vagrant/hosts/windows.rb
366
367
  - lib/vagrant/plugin.rb