vagrantup 0.9.5 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/vagrant/action/vm/forward_ports.rb +4 -1
- data/lib/vagrant/driver/virtualbox_4_0.rb +1 -1
- data/lib/vagrant/driver/virtualbox_4_1.rb +1 -1
- data/lib/vagrant/guest/redhat.rb +2 -2
- data/lib/vagrant/hosts/gentoo.rb +20 -0
- data/lib/vagrant/hosts.rb +1 -0
- data/lib/vagrant/provisioners/puppet.rb +1 -6
- data/lib/vagrant/ssh.rb +10 -10
- data/lib/vagrant/test_helpers.rb +4 -1
- data/lib/vagrant/util/ansi_escape_code_remover.rb +0 -1
- data/lib/vagrant/util/safe_exec.rb +2 -2
- data/lib/vagrant/util/subprocess.rb +6 -4
- data/lib/vagrant/version.rb +1 -1
- data/lib/vagrant.rb +1 -0
- data/test/unit/vagrant/util/ansi_escape_code_remover_test.rb +0 -1
- data/vagrant.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5f7061a128467581a0f3bbe3484e10f2b332a59
|
4
|
+
data.tar.gz: c4ca80503ed7c9f7efcfbbd013cc620609b9afc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/vagrant/guest/redhat.rb
CHANGED
@@ -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/
|
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/
|
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
|
-
|
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
|
79
|
-
"-o StrictHostKeyChecking=no", "-o IdentitiesOnly=yes",
|
80
|
-
"-o LogLevel=ERROR"]
|
81
|
-
command_options
|
82
|
-
command_options
|
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
|
90
|
-
command_options
|
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
|
-
|
96
|
-
@logger.info("Invoking SSH: #{
|
97
|
-
safe_exec(
|
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
|
data/lib/vagrant/test_helpers.rb
CHANGED
@@ -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(
|
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
|
data/lib/vagrant/version.rb
CHANGED
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
|
|
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.
|
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.
|
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.
|
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.
|
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
|