vagrant-bindfs 0.3.1 → 0.3.2
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/README.md +16 -14
- data/lib/vagrant-bindfs/bind.rb +8 -0
- data/lib/vagrant-bindfs/cap/fedora/bindfs_install.rb +17 -0
- data/lib/vagrant-bindfs/cap/linux/bindfs_installed.rb +8 -0
- data/lib/vagrant-bindfs/plugin.rb +16 -1
- data/lib/vagrant-bindfs/version.rb +1 -1
- data/locales/en.yml +3 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b944042068524c6b7a43c1154df47da425cc3f9e
|
4
|
+
data.tar.gz: fa8c0cb43388efa3c897be12eef37b302cbe6055
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21bd4062a0011ec721e9ad9e1be5fa430f168a2bf24d585103468aebbae89c8c03a3a1bc4f8d6a94dbdfc71113690396c21e10c87b450a0d73f4dfe761ea57fa
|
7
|
+
data.tar.gz: f6a6635e4266adefdac37fdfa5f2c6e51adde626d26dd5811b907fdba816f56fa4e1f13295a5ca0f3b2e5b36c45c14e9e8bc3444da4617d7bdccbb2740d37c10
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ It's free, and it works well, but it has some [performance problems](http://snip
|
|
11
11
|
|
12
12
|
People often recommend switching to [vagrant's VMWare-fusion provider](http://www.vagrantup.com/vmware).
|
13
13
|
This reportedly has better performance, but shares with symlinks [won't work](http://communities.vmware.com/thread/428199?start=0&tstart=0).
|
14
|
-
You also have to buy both the plugin and
|
14
|
+
You also have to buy both the plugin and VMware Fusion.
|
15
15
|
|
16
16
|
The final recommendation, at least on Linux/OSX hosts, is to [use nfs](http://docs.vagrantup.com/v2/synced-folders/nfs.html).
|
17
17
|
However, an NFS mount has the same numeric permissions in the guest as in the host.
|
@@ -26,6 +26,7 @@ Simply:
|
|
26
26
|
|
27
27
|
_Note that `map_uid` and `map_gid` NFS options can be used to set the identity used to read/write files on the host side._
|
28
28
|
|
29
|
+
|
29
30
|
## Installation
|
30
31
|
|
31
32
|
Vagrant-bindfs is distributed as a Ruby gem.
|
@@ -46,31 +47,32 @@ config.bindfs.bind_folder "/path/to/source", "/path/to/destination", options
|
|
46
47
|
|
47
48
|
```ruby
|
48
49
|
Vagrant.configure("2") do |config|
|
49
|
-
|
50
|
+
|
50
51
|
[...] # Your VM configuration
|
51
|
-
|
52
|
+
|
52
53
|
## Basic usage
|
53
54
|
config.bindfs.bind_folder "source/dir", "mount/point"
|
54
|
-
|
55
|
-
|
55
|
+
|
56
|
+
|
56
57
|
## Advanced options
|
57
58
|
config.bindfs.bind_folder "source/dir", "mount/point",
|
58
59
|
perms: "u=rw:g=r:o=r",
|
59
60
|
create_as_user: true
|
60
|
-
|
61
|
-
|
61
|
+
|
62
|
+
|
62
63
|
## Complete example for a NFS shared folder
|
63
|
-
|
64
|
-
# Static IP is required to use NFS shared folder
|
64
|
+
|
65
|
+
# Static IP is required to use NFS shared folder,
|
66
|
+
# this is only required for Virtualbox provider
|
65
67
|
config.vm.network "private_network", ip: "192.168.50.4"
|
66
|
-
|
68
|
+
|
67
69
|
# Declare shared folder with Vagrant syntax
|
68
|
-
config.vm.synced_folder "host/source/dir", "/vagrant-nfs", :
|
69
|
-
|
70
|
+
config.vm.synced_folder "host/source/dir", "/vagrant-nfs", type: :nfs
|
71
|
+
|
70
72
|
# Use vagrant-bindfs to re-mount folder
|
71
73
|
config.bindfs.bind_folder "/vagrant-nfs", "guest/mount/point"
|
72
|
-
|
73
|
-
|
74
|
+
|
75
|
+
|
74
76
|
## Share the default `vagrant` folder via NFS with your own options
|
75
77
|
config.vm.synced_folder ".", "/vagrant", type: :nfs
|
76
78
|
config.bindfs.bind_folder "/vagrant", "/vagrant"
|
data/lib/vagrant-bindfs/bind.rb
CHANGED
@@ -70,6 +70,14 @@ module VagrantPlugins
|
|
70
70
|
raise Vagrant::Bindfs::Error, :cannot_install
|
71
71
|
end
|
72
72
|
end
|
73
|
+
|
74
|
+
unless @machine.guest.capability(:loaded_fuse?)
|
75
|
+
@env[:ui].warn(I18n.t("vagrant.config.bindfs.not_loaded"))
|
76
|
+
|
77
|
+
unless @machine.guest.capability(:modprobe_fuse)
|
78
|
+
raise Vagrant::Bindfs::Error, :cannot_modprobe
|
79
|
+
end
|
80
|
+
end
|
73
81
|
end
|
74
82
|
|
75
83
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Bindfs
|
3
|
+
module Cap
|
4
|
+
module Fedora
|
5
|
+
module BindfsInstall
|
6
|
+
|
7
|
+
def self.bindfs_install(machine)
|
8
|
+
machine.communicate.tap do |comm|
|
9
|
+
comm.sudo('yum -y install bindfs')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -8,6 +8,14 @@ module VagrantPlugins
|
|
8
8
|
machine.communicate.test("bindfs --help")
|
9
9
|
end
|
10
10
|
|
11
|
+
def self.loaded_fuse?(machine)
|
12
|
+
machine.communicate.test("lsmod | grep -q fuse")
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.modprobe_fuse(machine)
|
16
|
+
machine.communicate.sudo("/sbin/modprobe fuse")
|
17
|
+
end
|
18
|
+
|
11
19
|
end
|
12
20
|
end
|
13
21
|
end
|
@@ -3,7 +3,7 @@ module VagrantPlugins
|
|
3
3
|
class Plugin < Vagrant.plugin("2")
|
4
4
|
name "Bindfs"
|
5
5
|
description <<-DESC
|
6
|
-
This plugin allows you to mount -o bind filesystems inside the guest. This is
|
6
|
+
This plugin allows you to mount -o bind filesystems inside the guest. This is
|
7
7
|
useful to change their ownership and permissions.
|
8
8
|
DESC
|
9
9
|
|
@@ -22,11 +22,26 @@ module VagrantPlugins
|
|
22
22
|
Cap::SUSE::BindfsInstall
|
23
23
|
end
|
24
24
|
|
25
|
+
guest_capability("fedora", "bindfs_install") do
|
26
|
+
require 'vagrant-bindfs/cap/fedora/bindfs_install'
|
27
|
+
Cap::Fedora::BindfsInstall
|
28
|
+
end
|
29
|
+
|
25
30
|
guest_capability("linux", "bindfs_installed") do
|
26
31
|
require "vagrant-bindfs/cap/linux/bindfs_installed"
|
27
32
|
Cap::Linux::BindfsInstalled
|
28
33
|
end
|
29
34
|
|
35
|
+
guest_capability("linux", "loaded_fuse?") do
|
36
|
+
require "vagrant-bindfs/cap/linux/bindfs_installed"
|
37
|
+
Cap::Linux::BindfsInstalled
|
38
|
+
end
|
39
|
+
|
40
|
+
guest_capability("linux", "modprobe_fuse") do
|
41
|
+
require "vagrant-bindfs/cap/linux/bindfs_installed"
|
42
|
+
Cap::Linux::BindfsInstalled
|
43
|
+
end
|
44
|
+
|
30
45
|
require "vagrant-bindfs/bind"
|
31
46
|
|
32
47
|
%w{up reload}.each do |action|
|
data/locales/en.yml
CHANGED
@@ -3,6 +3,7 @@ en:
|
|
3
3
|
config:
|
4
4
|
bindfs:
|
5
5
|
not_installed: "Bindfs seems to not be installed on the virtual machine"
|
6
|
+
not_loaded: "Fuse kernel module seems to be not loaded, trying to load it"
|
6
7
|
already_mounted: "There's already a bindfs mount to destination %{dest}"
|
7
8
|
status:
|
8
9
|
binding_all: "Creating bind mounts for selected devices"
|
@@ -11,10 +12,11 @@ en:
|
|
11
12
|
destination_path_relative: "Destination path is relative for bind whatever"
|
12
13
|
source_path_relative: "Source path is relative for bind whatever"
|
13
14
|
source_path_not_exist: "Cannot bind source path %{path} because it doesn't exist"
|
15
|
+
cannot_modprobe: "The fuse kernel module seems to not be loadable on the virtual machine"
|
14
16
|
binding_failed: |-
|
15
17
|
The bind command `%{command}` failed to run!
|
16
18
|
|
17
19
|
Please check options values and compatibility. For a complete documentation,
|
18
20
|
run `sudo bindfs --help` on the VM.
|
19
|
-
|
21
|
+
|
20
22
|
You can see it online at http://www.cs.helsinki.fi/u/partel/bindfs_docs/bindfs.1.html.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-bindfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gaël-Ian Havard
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-11-08 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: A Vagrant plugin to automate bindfs mount in the VM. This allow you to
|
16
16
|
change owner, group and permissions on files and, for example, work around NFS share
|
@@ -24,6 +24,7 @@ extra_rdoc_files: []
|
|
24
24
|
files:
|
25
25
|
- lib/vagrant-bindfs/bind.rb
|
26
26
|
- lib/vagrant-bindfs/cap/debian/bindfs_install.rb
|
27
|
+
- lib/vagrant-bindfs/cap/fedora/bindfs_install.rb
|
27
28
|
- lib/vagrant-bindfs/cap/linux/bindfs_installed.rb
|
28
29
|
- lib/vagrant-bindfs/cap/suse/bindfs_install.rb
|
29
30
|
- lib/vagrant-bindfs/command.rb
|