vagrant-bindfs 0.2.2 → 0.2.3
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 +15 -0
- data/{LICENSE.txt → MIT-LICENSE} +2 -2
- data/README.md +34 -25
- data/lib/vagrant-bindfs.rb +0 -1
- data/lib/vagrant-bindfs/plugin.rb +5 -1
- data/lib/vagrant-bindfs/version.rb +4 -2
- metadata +32 -40
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MmIwZGNlZTNlOTkxNTIwNWJiZTllZjRiN2QxZjU0NTZhMzk0OTM2NQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NmEzMDM3MzJiMjhlYWU1NmZiMzU1ODRlMzRmZjQ2YzAxNWY2NmU4Zg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NzkxNDcwMjZmY2QzNGQwNmEwZmMxYzFkNmZkN2VkYjliYmQ1NTE1OWZmMjBi
|
10
|
+
NzUzZDhhOWIzMzM3OGFkZDMwOTg4MjM3Yzg3ZTYxNTM3NjFjZDM5ZjY0ZmE2
|
11
|
+
MjU0YWU2ODMzZjBhNTdmYWY0MDYxNzFkNzIwNTEwYzQ0OGUyMzA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZDIzNjgyMDJlYmU1ZmQ1MzgwODRiYTU5MGYzMzhjYjk5MTVhNWNmZGJjYTg3
|
14
|
+
YWUwYjYxZjc3MjVjYmMxOWVmYzBiYjkxNjViN2U4NzE1MGY1MTNmNDg2NmQ1
|
15
|
+
Yjk0N2I1N2YyOTMwYWU3M2JkNDdiOGYyNTkzMDJmNjUzZjBkMjU=
|
data/{LICENSE.txt → MIT-LICENSE}
RENAMED
data/README.md
CHANGED
@@ -1,40 +1,42 @@
|
|
1
1
|
# vagrant-bindfs
|
2
2
|
|
3
|
-
A Vagrant plugin to automate [bindfs](http://code.google.com/p/bindfs/) mount in the VM.
|
3
|
+
A Vagrant plugin to automate [bindfs](http://code.google.com/p/bindfs/) mount in the VM.
|
4
4
|
This allow you to change owner, group and permissions on files and, for example, work around NFS share permissions issues.
|
5
5
|
|
6
|
+
|
6
7
|
## Some Background: Why `vagrant-bindfs`
|
7
8
|
|
8
|
-
The default vagrant provider is [virtualbox](https://www.virtualbox.org/).
|
9
|
-
It's free, and it works well, but it has some [performance problems](http://snippets.aktagon.com/snippets/609-Slow-IO-performance-with-Vagrant-and-VirtualBox-).
|
9
|
+
The default vagrant provider is [virtualbox](https://www.virtualbox.org/). It's free, and it works well, but it has some [performance problems](http://snippets.aktagon.com/snippets/609-Slow-IO-performance-with-Vagrant-and-VirtualBox-).
|
10
10
|
|
11
|
-
People often recommend switching to [vagrant's VMWare-fusion provider](http://www.vagrantup.com/vmware).
|
12
|
-
This reportedly has better performance, but shares with symlinks [won't work](http://communities.vmware.com/thread/428199?start=0&tstart=0)
|
13
|
-
You also have to buy both the plugin and VMWare-fusion.
|
11
|
+
People often recommend switching to [vagrant's VMWare-fusion provider](http://www.vagrantup.com/vmware). This reportedly has better performance, but shares with symlinks [won't work](http://communities.vmware.com/thread/428199?start=0&tstart=0). You also have to buy both the plugin and VMWare-fusion.
|
14
12
|
|
15
|
-
The final recommendation, at least on Linux/OSX hosts, is to [use nfs](http://docs.vagrantup.com/v2/synced-folders/nfs.html).
|
16
|
-
However, an NFS mount has the same numeric permissions in the guest as in the host.
|
17
|
-
If you're on OSX, for instance, a folder owned by the default OSX user will appear to be [owned by `501:20`](https://groups.google.com/forum/?fromgroups#!topic/vagrant-up/qXXJ-AQuKQM) in the guest.
|
13
|
+
The final recommendation, at least on Linux/OSX hosts, is to [use nfs](http://docs.vagrantup.com/v2/synced-folders/nfs.html). However, an NFS mount has the same numeric permissions in the guest as in the host. If you're on OSX, for instance, a folder owned by the default OSX user will appear to be [owned by `501:20`](https://groups.google.com/forum/?fromgroups#!topic/vagrant-up/qXXJ-AQuKQM) in the guest.
|
18
14
|
|
19
15
|
This is where `vagrant-bindfs` comes in!
|
16
|
+
|
20
17
|
Simply:
|
21
18
|
|
22
19
|
- mount your share over NFS into a temporary location in the guest
|
23
20
|
- re-mount the share to the actual destination with `vagrant-bindfs`, setting the correct permissions
|
24
21
|
|
22
|
+
_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._
|
23
|
+
|
25
24
|
## Installation
|
26
25
|
|
27
|
-
Vagrant-bindfs is distributed as a Ruby gem.
|
26
|
+
Vagrant-bindfs is distributed as a Ruby gem.
|
28
27
|
You can install it as any other Vagrant plugin with `vagrant plugin install vagrant-bindfs`.
|
29
28
|
|
29
|
+
|
30
30
|
## Usage
|
31
31
|
|
32
|
-
In your `Vagrantfile`, use `config.bindfs.bind_folder` to configure folders that will be binded on VM startup.
|
32
|
+
In your `Vagrantfile`, use `config.bindfs.bind_folder` to configure folders that will be binded on VM startup.
|
33
33
|
The format is:
|
34
|
+
|
34
35
|
```ruby
|
35
36
|
config.bindfs.bind_folder "/path/to/source", "/path/to/destination", options
|
36
37
|
```
|
37
38
|
|
39
|
+
|
38
40
|
### Example
|
39
41
|
|
40
42
|
```ruby
|
@@ -42,25 +44,31 @@ The format is:
|
|
42
44
|
|
43
45
|
[...] # Your VM configuration
|
44
46
|
|
45
|
-
|
47
|
+
## Basic usage
|
46
48
|
config.bindfs.bind_folder "source/dir", "mount/point"
|
47
49
|
|
48
|
-
|
49
|
-
config.bindfs.bind_folder "source/dir", "mount/point",
|
50
|
+
## Advanced options
|
51
|
+
config.bindfs.bind_folder "source/dir", "mount/point",
|
52
|
+
:perms => "u=rw:g=r:o=r",
|
53
|
+
:create_as_user => true
|
50
54
|
|
51
|
-
|
52
|
-
|
53
|
-
config.vm.
|
55
|
+
## Complete example for a NFS shared folder
|
56
|
+
# Static IP is required to use NFS shared folder
|
57
|
+
config.vm.network "private_network", ip: "192.168.50.4"
|
58
|
+
# Declare shared folder with Vagrant syntax
|
59
|
+
config.vm.synced_folder "host/source/dir", "/vagrant-nfs", :type => :nfs
|
60
|
+
# Use vagrant-bindfs to re-mount folder
|
54
61
|
config.bindfs.bind_folder "/vagrant-nfs", "guest/mount/point"
|
55
62
|
|
56
63
|
end
|
57
64
|
```
|
58
65
|
|
66
|
+
|
59
67
|
### Supported options
|
60
68
|
|
61
69
|
`bind_folder` supports the following arguments:
|
62
70
|
|
63
|
-
- `:
|
71
|
+
- `:owner` (defaults to 'vagrant')
|
64
72
|
- `:group` (defaults to 'vagrant')
|
65
73
|
- `:perms` (defaults to 'u=rwX:g=rD:o=rD')
|
66
74
|
- `:mirror`
|
@@ -69,7 +77,7 @@ The format is:
|
|
69
77
|
- `:'create-for-group'`
|
70
78
|
- `:'create-with-perms'`
|
71
79
|
|
72
|
-
|
80
|
+
… and following flags (all disabled by default, vagrant-bindfs rely on bindfs own defaults) :
|
73
81
|
|
74
82
|
- `:'no-allow-other'`
|
75
83
|
- `:'create-as-user'`
|
@@ -93,23 +101,24 @@ You can overwrite default options _via_ `config.bindfs.default_options`.
|
|
93
101
|
|
94
102
|
See [bindfs man page](http://www.cs.helsinki.fi/u/partel/bindfs_docs/bindfs.1.html) for details.
|
95
103
|
|
96
|
-
vagrant-bindfs does not check compatibility between given arguments but warn you when a binding command fail or if bindfs is not installed on your virtual machine.
|
104
|
+
vagrant-bindfs does not check compatibility between given arguments but warn you when a binding command fail or if bindfs is not installed on your virtual machine.
|
97
105
|
On Debian systems, it will try to install bindfs automatically.
|
98
106
|
|
107
|
+
|
99
108
|
## Contributing
|
100
109
|
|
101
|
-
If you find this plugin useful, we could use a few enhancements!
|
102
|
-
In particular, capabilities files for installing vagrant-bindfs on systems other than Debian would be useful.
|
103
|
-
|
110
|
+
If you find this plugin useful, we could use a few enhancements!
|
111
|
+
In particular, capabilities files for installing vagrant-bindfs on systems other than Debian would be useful. We could also use some specs…
|
112
|
+
|
104
113
|
|
105
114
|
### How to Test Changes
|
106
115
|
|
107
|
-
If you've made changes to this plugin, you can easily test it locally in vagrant.
|
116
|
+
If you've made changes to this plugin, you can easily test it locally in vagrant.
|
108
117
|
From the root of the repo, do:
|
109
118
|
|
110
119
|
- `bundle install`
|
111
120
|
- `rake build`
|
112
121
|
- `bundle exec vagrant up`
|
113
122
|
|
114
|
-
This will spin up a default Debian VM and try to bindfs-mount some shares in it.
|
123
|
+
This will spin up a default Debian VM and try to bindfs-mount some shares in it.
|
115
124
|
Feel free to modify the included `Vagrantfile` to add additional test cases.
|
data/lib/vagrant-bindfs.rb
CHANGED
@@ -25,7 +25,11 @@ module VagrantPlugins
|
|
25
25
|
require 'vagrant-bindfs/bind'
|
26
26
|
%w{up reload}.each do |action|
|
27
27
|
action_hook(:bindfs, "machine_action_#{action}".to_sym) do |hook|
|
28
|
-
|
28
|
+
target = (Vagrant::Action::Builtin.const_defined?(:NFS) ?
|
29
|
+
Vagrant::Action::Builtin::NFS :
|
30
|
+
Vagrant::Action::Builtin::SyncedFolders)
|
31
|
+
|
32
|
+
hook.before(target, Action::Bind)
|
29
33
|
end
|
30
34
|
end
|
31
35
|
end
|
metadata
CHANGED
@@ -1,67 +1,59 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-bindfs
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.2.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.3
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
-
|
6
|
+
authors:
|
7
|
+
- Gaël-Ian Havard
|
9
8
|
- Igor Serebryany
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
|
14
|
-
date: 2013-07-22 00:00:00 Z
|
12
|
+
date: 2013-12-16 00:00:00.000000000 Z
|
15
13
|
dependencies: []
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
description: A Vagrant plugin to automate bindfs mount in the VM. This allow you to
|
15
|
+
change owner, group and permissions on files and, for example, work around NFS share
|
16
|
+
permissions issues.
|
17
|
+
email:
|
19
18
|
- gaelian.havard@gmail.com
|
20
19
|
- igor.serebryany@airbnb.com
|
21
20
|
executables: []
|
22
|
-
|
23
21
|
extensions: []
|
24
|
-
|
25
22
|
extra_rdoc_files: []
|
26
|
-
|
27
|
-
files:
|
28
|
-
- lib/vagrant-bindfs/cap/linux/bindfs_installed.rb
|
29
|
-
- lib/vagrant-bindfs/cap/debian/bindfs_install.rb
|
23
|
+
files:
|
30
24
|
- lib/vagrant-bindfs/bind.rb
|
25
|
+
- lib/vagrant-bindfs/cap/debian/bindfs_install.rb
|
26
|
+
- lib/vagrant-bindfs/cap/linux/bindfs_installed.rb
|
27
|
+
- lib/vagrant-bindfs/config.rb
|
31
28
|
- lib/vagrant-bindfs/errors.rb
|
32
|
-
- lib/vagrant-bindfs/version.rb
|
33
29
|
- lib/vagrant-bindfs/plugin.rb
|
34
|
-
- lib/vagrant-bindfs/
|
30
|
+
- lib/vagrant-bindfs/version.rb
|
35
31
|
- lib/vagrant-bindfs.rb
|
36
32
|
- locales/en.yml
|
37
33
|
- README.md
|
38
|
-
- LICENSE
|
34
|
+
- MIT-LICENSE
|
39
35
|
homepage: https://github.com/gael-ian/vagrant-bindfs
|
40
|
-
licenses:
|
41
|
-
|
36
|
+
licenses:
|
37
|
+
- MIT
|
38
|
+
metadata: {}
|
42
39
|
post_install_message:
|
43
40
|
rdoc_options: []
|
44
|
-
|
45
|
-
require_paths:
|
41
|
+
require_paths:
|
46
42
|
- lib
|
47
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
version: "0"
|
43
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ! '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
59
53
|
requirements: []
|
60
|
-
|
61
54
|
rubyforge_project:
|
62
|
-
rubygems_version:
|
55
|
+
rubygems_version: 2.0.6
|
63
56
|
signing_key:
|
64
|
-
specification_version:
|
57
|
+
specification_version: 4
|
65
58
|
summary: A Vagrant plugin to automate bindfs mount in the VM
|
66
59
|
test_files: []
|
67
|
-
|