Merge remote branch 'remotes/upstream/master' into redhat-distro
This commit is contained in:
commit
fcf8190477
|
@ -6,6 +6,7 @@
|
||||||
- Shared folders with no guest path are not automounted. [GH-184]
|
- Shared folders with no guest path are not automounted. [GH-184]
|
||||||
- Boxes downloaded during `vagrant up` reload the Vagrantfile config, which
|
- Boxes downloaded during `vagrant up` reload the Vagrantfile config, which
|
||||||
fixes a problem with box settings not being properly loaded. [GH-231]
|
fixes a problem with box settings not being properly loaded. [GH-231]
|
||||||
|
- `config.ssh.forward_x11` to enable the ForwardX11 SSH option. [GH-255]
|
||||||
|
|
||||||
## 0.7.0.beta (December 24, 2010)
|
## 0.7.0.beta (December 24, 2010)
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ Vagrant::Config.run do |config|
|
||||||
config.ssh.timeout = 30
|
config.ssh.timeout = 30
|
||||||
config.ssh.private_key_path = File.expand_path("keys/vagrant", Vagrant.source_root)
|
config.ssh.private_key_path = File.expand_path("keys/vagrant", Vagrant.source_root)
|
||||||
config.ssh.forward_agent = false
|
config.ssh.forward_agent = false
|
||||||
|
config.ssh.forward_x11 = false
|
||||||
|
|
||||||
config.vm.auto_port_range = (2200..2250)
|
config.vm.auto_port_range = (2200..2250)
|
||||||
config.vm.box_ovf = "box.ovf"
|
config.vm.box_ovf = "box.ovf"
|
||||||
|
|
|
@ -114,7 +114,7 @@ module Vagrant
|
||||||
@env.ui.info I18n.t("vagrant.actions.vm.nfs.mounting")
|
@env.ui.info I18n.t("vagrant.actions.vm.nfs.mounting")
|
||||||
|
|
||||||
# Only mount the folders which have a guest path specified
|
# Only mount the folders which have a guest path specified
|
||||||
am_folders = folders.select { |folder| folder[:guestpath] }
|
am_folders = folders.select { |name, folder| folder[:guestpath] }
|
||||||
@env["vm"].system.mount_nfs(host_ip, am_folders)
|
@env["vm"].system.mount_nfs(host_ip, am_folders)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ module Vagrant
|
||||||
attr_accessor :timeout
|
attr_accessor :timeout
|
||||||
attr_writer :private_key_path
|
attr_writer :private_key_path
|
||||||
attr_accessor :forward_agent
|
attr_accessor :forward_agent
|
||||||
|
attr_accessor :forward_x11
|
||||||
|
|
||||||
def private_key_path
|
def private_key_path
|
||||||
File.expand_path(@private_key_path, env.root_path)
|
File.expand_path(@private_key_path, env.root_path)
|
||||||
|
|
|
@ -42,6 +42,7 @@ module Vagrant
|
||||||
"-o StrictHostKeyChecking=no", "-o IdentitiesOnly=yes",
|
"-o StrictHostKeyChecking=no", "-o IdentitiesOnly=yes",
|
||||||
"-i #{options[:private_key_path]}"]
|
"-i #{options[:private_key_path]}"]
|
||||||
command_options << "-o ForwardAgent=yes" if env.config.ssh.forward_agent
|
command_options << "-o ForwardAgent=yes" if env.config.ssh.forward_agent
|
||||||
|
command_options << "-o ForwardX11=yes" if env.config.ssh.forward_x11
|
||||||
|
|
||||||
# Some hackery going on here. On Mac OS X Leopard (10.5), exec fails
|
# Some hackery going on here. On Mac OS X Leopard (10.5), exec fails
|
||||||
# (GH-51). As a workaround, we fork and wait. On all other platforms,
|
# (GH-51). As a workaround, we fork and wait. On all other platforms,
|
||||||
|
|
|
@ -160,7 +160,7 @@ class NFSVMActionTest < Test::Unit::TestCase
|
||||||
context "mounting folders" do
|
context "mounting folders" do
|
||||||
setup do
|
setup do
|
||||||
@instance.stubs(:host_ip).returns("foo")
|
@instance.stubs(:host_ip).returns("foo")
|
||||||
@instance.stubs(:folders).returns([{:guestpath => "foo"}])
|
@instance.stubs(:folders).returns({ "v-data" => {:guestpath => "foo"}})
|
||||||
end
|
end
|
||||||
|
|
||||||
should "mount the folders on the system" do
|
should "mount the folders on the system" do
|
||||||
|
@ -169,8 +169,8 @@ class NFSVMActionTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
should "not mount folders which have no guest path" do
|
should "not mount folders which have no guest path" do
|
||||||
@instance.stubs(:folders).returns([{}])
|
@instance.stubs(:folders).returns({ "v-data" => {}})
|
||||||
@vm.system.expects(:mount_nfs).with(@instance.host_ip, [])
|
@vm.system.expects(:mount_nfs).with(@instance.host_ip, {})
|
||||||
@instance.mount_folders
|
@instance.mount_folders
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -69,6 +69,17 @@ class SshTest < Test::Unit::TestCase
|
||||||
@ssh.connect
|
@ssh.connect
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "add forward X11 option if enabled" do
|
||||||
|
@env.config.ssh.forward_x11 = true
|
||||||
|
ssh_exec_expect(@ssh.port,
|
||||||
|
@env.config.ssh.private_key_path,
|
||||||
|
@env.config.ssh.username,
|
||||||
|
@env.config.ssh.host) do |args|
|
||||||
|
assert args =~ /-o ForwardX11=yes/
|
||||||
|
end
|
||||||
|
@ssh.connect
|
||||||
|
end
|
||||||
|
|
||||||
context "on leopard" do
|
context "on leopard" do
|
||||||
setup do
|
setup do
|
||||||
Vagrant::Util::Platform.stubs(:leopard?).returns(true)
|
Vagrant::Util::Platform.stubs(:leopard?).returns(true)
|
||||||
|
|
Loading…
Reference in New Issue