vagrant-bindfs 0.4.9 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -10
- data/Rakefile +20 -0
- data/Vagrantfile +41 -0
- data/lib/vagrant-bindfs/bind.rb +5 -4
- data/lib/vagrant-bindfs/cap/all/bindfs_installed.rb +17 -0
- data/lib/vagrant-bindfs/cap/all/checks.rb +17 -0
- data/lib/vagrant-bindfs/cap/darwin/checks.rb +27 -0
- data/lib/vagrant-bindfs/cap/darwin/fuse_loaded.rb +19 -0
- data/lib/vagrant-bindfs/cap/darwin/install_bindfs.rb +61 -0
- data/lib/vagrant-bindfs/cap/debian/install_bindfs.rb +4 -5
- data/lib/vagrant-bindfs/cap/fedora/install_bindfs.rb +4 -4
- data/lib/vagrant-bindfs/cap/linux/bindfs_installed.rb +5 -3
- data/lib/vagrant-bindfs/cap/linux/checks.rb +21 -0
- data/lib/vagrant-bindfs/cap/linux/enable_fuse.rb +5 -3
- data/lib/vagrant-bindfs/cap/linux/fuse_loaded.rb +5 -3
- data/lib/vagrant-bindfs/cap/redhat/install_bindfs.rb +26 -24
- data/lib/vagrant-bindfs/cap/suse/install_bindfs.rb +4 -4
- data/lib/vagrant-bindfs/cap/ubuntu/fuse_loaded.rb +7 -5
- data/lib/vagrant-bindfs/plugin.rb +56 -8
- data/lib/vagrant-bindfs/version.rb +2 -2
- data/locales/en.yml +2 -0
- data/test/test_helper.rb +20 -0
- metadata +23 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 900a04a49bc1a677d237d79da64f34934005dbf3
|
4
|
+
data.tar.gz: 5976a7561c03512d795bedf4139a3b80212e6f2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34331af45a9c3c6360389ac0d74a40aa57bb454a5a7c3854202294f0a54af005083ac992129bc91432bad00f104bf4bc1e00a9c26e84de05bb769f74ba8522d5
|
7
|
+
data.tar.gz: eb2e1f2d5081cce1fc235282495b9caf6f007f8ef79e0bff1ded307fe1afe224cd63fcb5eb58c5350910911afa2345a6bd602c869796849a83a5a526db59a0c0
|
data/README.md
CHANGED
@@ -93,37 +93,39 @@ end
|
|
93
93
|
|
94
94
|
The `bind_folder` config accept any option you can pass to bindfs.
|
95
95
|
vagrant-bindfs is compatible with bindfs from version 1.9 to 1.13.1.
|
96
|
-
Check [lib/vagrant-bindfs/command.rb](https://github.com/gael-ian/vagrant-bindfs/blob/master/lib/vagrant-bindfs/command.rb#L66) for a complete list of supported options and default values.
|
96
|
+
Check [lib/vagrant-bindfs/command.rb](https://github.com/gael-ian/vagrant-bindfs/blob/master/lib/vagrant-bindfs/command.rb#L66) for a complete list of supported options and default values and read the [bindfs man page](http://bindfs.org/docs/bindfs.1.html) for full documentation.
|
97
97
|
|
98
98
|
Both long arguments and shorthand are supported.
|
99
99
|
If you set both, shorthand will prevail.
|
100
100
|
Long arguments can be written indifferently with underscore ('force_user') or dash ('force-user') and as strings (:'force-user') or symbols (:force_user).
|
101
101
|
|
102
102
|
You can overwrite default options _via_ `config.bindfs.default_options`.
|
103
|
-
See [bindfs man page](http://bindfs.org/docs/bindfs.1.html) for details.
|
104
103
|
|
105
104
|
vagrant-bindfs detects installed version of bindfs, translate option names when needed and ignore an option if it is not supported.
|
106
105
|
As we may have missed something, it will warn you when a binding command fail.
|
107
106
|
|
108
|
-
On Debian (this includes Ubuntu), SUSE
|
107
|
+
On Debian (this includes Ubuntu), SUSE, Fedora, CentOS (5-6) and OS X guest systems, vagrant-bindfs will try to install bindfs automatically if it is not installed.
|
109
108
|
On other system, you'll get warned.
|
110
109
|
|
110
|
+
OS X guests may need some specific options. See [bindfs README](https://github.com/mpartel/bindfs#os-x-note) for details.
|
111
|
+
|
111
112
|
|
112
113
|
## Contributing
|
113
114
|
|
114
115
|
If you find this plugin useful, we could use a few enhancements!
|
115
|
-
In particular, capabilities files for installing vagrant-bindfs on
|
116
|
+
In particular, capabilities files for installing vagrant-bindfs on other systems would be useful.
|
116
117
|
We could also use some specs…
|
117
118
|
|
118
119
|
|
119
120
|
### How to Test Changes
|
120
121
|
|
121
122
|
If you've made changes to this plugin, you can easily test it locally in vagrant.
|
122
|
-
From the root of the repo, do:
|
123
123
|
|
124
|
-
|
125
|
-
|
126
|
-
|
124
|
+
Edit `Vagrantfile` and uncomment one or more of the selected test boxes.
|
125
|
+
Then, from the root of the repo, do:
|
126
|
+
|
127
|
+
bundle install
|
128
|
+
bundle exec vagrant up
|
127
129
|
|
128
|
-
This will spin up
|
129
|
-
Feel free to modify the included `Vagrantfile` to add additional test cases.
|
130
|
+
This will spin up one or more VM and try to bindfs-mount some shares in it.
|
131
|
+
Feel free to modify the included `Vagrantfile` or test helpers (in `test/test_helpers.rb`) to add additional boxes and test cases.
|
data/Rakefile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "bundler/setup"
|
3
|
+
|
4
|
+
#require "rspec/core/rake_task"
|
5
|
+
|
6
|
+
# Immediately sync all stdout
|
7
|
+
$stdout.sync = true
|
8
|
+
$stderr.sync = true
|
9
|
+
|
10
|
+
# Change to the directory of this file
|
11
|
+
Dir.chdir(File.expand_path("../", __FILE__))
|
12
|
+
|
13
|
+
# Installs the tasks for gem creation
|
14
|
+
Bundler::GemHelper.install_tasks
|
15
|
+
|
16
|
+
# Install the `spec` task so that we can run tests
|
17
|
+
#RSpec::Core::RakeTask.new
|
18
|
+
|
19
|
+
# Default task is to run the unit tests
|
20
|
+
#task :default => "spec"
|
data/Vagrantfile
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
# Uncomment machines you want to test
|
5
|
+
test_machines = {
|
6
|
+
# debian: { box: "bento/debian-8.5" },
|
7
|
+
# ubuntu: { box: "bento/ubuntu-16.04" },
|
8
|
+
# fedora: { box: "bento/fedora-24" },
|
9
|
+
# redhat: { box: "bento/centos-7.2" },
|
10
|
+
|
11
|
+
# The `vagrant` user group does not exist in this box.
|
12
|
+
# suse: { box: "bento/opensuse-leap-42.1", args: { group: 'users' } },
|
13
|
+
|
14
|
+
# **This box require the Oracle VM VirtualBox Extension Pack for Virtualbox.**
|
15
|
+
# The `vagrant` user group does not exist in this box.
|
16
|
+
# osx: { box: "jhcook/osx-elcapitan-10.11", args: { group: 'staff' } },
|
17
|
+
|
18
|
+
# When you add a new test machine, please ensure that it will stay
|
19
|
+
# available and regularly updated for future tests. We recommend to
|
20
|
+
# use officialy supported boxes, as stated in the Vagrant
|
21
|
+
# documentation. See https://goo.gl/LbkPVF
|
22
|
+
}
|
23
|
+
|
24
|
+
require File.expand_path("../test/test_helper", __FILE__)
|
25
|
+
|
26
|
+
Vagrant.configure("2") do |config|
|
27
|
+
|
28
|
+
# Common configuration
|
29
|
+
config.vm.provider "virtualbox" do |vb|
|
30
|
+
vb.memory = 512
|
31
|
+
vb.cpus = 2
|
32
|
+
end
|
33
|
+
|
34
|
+
test_machines.each do |distro, options|
|
35
|
+
config.vm.define "vagrant-bindfs-test-#{distro}" do |machine|
|
36
|
+
machine.vm.box = options[:box]
|
37
|
+
tests_setup(machine, (options[:args] || {}))
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
data/lib/vagrant-bindfs/bind.rb
CHANGED
@@ -4,6 +4,7 @@ module VagrantPlugins
|
|
4
4
|
module Bindfs
|
5
5
|
module Action
|
6
6
|
class Bind
|
7
|
+
|
7
8
|
def initialize(app, env, hook)
|
8
9
|
@app = app
|
9
10
|
@env = env
|
@@ -46,7 +47,7 @@ module VagrantPlugins
|
|
46
47
|
next
|
47
48
|
end
|
48
49
|
|
49
|
-
unless options[:skip_verify_user] == true ||
|
50
|
+
unless options[:skip_verify_user] == true || @machine.guest.capability(:bindfs_check_user, command.user)
|
50
51
|
@env[:ui].error I18n.t(
|
51
52
|
"vagrant.config.bindfs.errors.user_not_exist",
|
52
53
|
user: command.user
|
@@ -54,15 +55,15 @@ module VagrantPlugins
|
|
54
55
|
next
|
55
56
|
end
|
56
57
|
|
57
|
-
unless options[:skip_verify_user] == true ||
|
58
|
+
unless options[:skip_verify_user] == true || @machine.guest.capability(:bindfs_check_group, command.group)
|
58
59
|
@env[:ui].error I18n.t(
|
59
60
|
"vagrant.config.bindfs.errors.group_not_exist",
|
60
61
|
group: command.group
|
61
62
|
)
|
62
63
|
next
|
63
64
|
end
|
64
|
-
|
65
|
-
if @machine.
|
65
|
+
|
66
|
+
if @machine.guest.capability(:bindfs_check_mount, command.destination)
|
66
67
|
@env[:ui].info I18n.t(
|
67
68
|
"vagrant.config.bindfs.already_mounted",
|
68
69
|
dest: command.destination
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Bindfs
|
3
|
+
module Cap
|
4
|
+
module All
|
5
|
+
module Checks
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def bindfs_check_mount(machine, directory)
|
9
|
+
machine.communicate.test("mount | grep '^bindfs' | grep #{directory.shellescape}")
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Bindfs
|
3
|
+
module Cap
|
4
|
+
module Darwin
|
5
|
+
module Checks
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def bindfs_check_user(machine, user)
|
9
|
+
(
|
10
|
+
user.nil? || \
|
11
|
+
machine.communicate.test("test -n \"$(dscacheutil -q user -a name #{user.shellescape})\"")
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
def bindfs_check_group(machine, group)
|
16
|
+
(
|
17
|
+
group.nil? || \
|
18
|
+
machine.communicate.test("test -n \"$(dscacheutil -q group -a name #{group.shellescape})\"")
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Bindfs
|
3
|
+
module Cap
|
4
|
+
module Darwin
|
5
|
+
module FuseLoaded
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def fuse_loaded(machine)
|
9
|
+
# OSXFuse is automatically loaded.
|
10
|
+
# Just check if it is installed
|
11
|
+
machine.communicate.test("test -d /Library/Frameworks/OSXFUSE.framework/")
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Bindfs
|
3
|
+
module Cap
|
4
|
+
module Darwin
|
5
|
+
module InstallBindfs
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def install_bindfs(machine)
|
9
|
+
@machine = machine
|
10
|
+
|
11
|
+
unless homebrew_installed?
|
12
|
+
warn(I18n.t("vagrant.config.bindfs.homebrew_not_installed"))
|
13
|
+
homebrew_install
|
14
|
+
else
|
15
|
+
execute("brew update")
|
16
|
+
end
|
17
|
+
|
18
|
+
unless osxfuse_installed?
|
19
|
+
warn(I18n.t("vagrant.config.bindfs.osxfuse_not_installed"))
|
20
|
+
osxfuse_install
|
21
|
+
end
|
22
|
+
|
23
|
+
execute("brew install homebrew/fuse/bindfs")
|
24
|
+
end
|
25
|
+
|
26
|
+
def warn(message)
|
27
|
+
@machine.env.ui.warn(message)
|
28
|
+
end
|
29
|
+
|
30
|
+
def execute(command)
|
31
|
+
@machine.communicate.execute(command)
|
32
|
+
end
|
33
|
+
|
34
|
+
def test(command)
|
35
|
+
@machine.communicate.test(command)
|
36
|
+
end
|
37
|
+
|
38
|
+
protected
|
39
|
+
|
40
|
+
def homebrew_installed?
|
41
|
+
test("brew --help")
|
42
|
+
end
|
43
|
+
|
44
|
+
def homebrew_install
|
45
|
+
execute("/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"")
|
46
|
+
end
|
47
|
+
|
48
|
+
def osxfuse_installed?
|
49
|
+
test("[ -d /Library/Frameworks/OSXFUSE.framework/ ]")
|
50
|
+
end
|
51
|
+
|
52
|
+
def osxfuse_install
|
53
|
+
execute("brew tap caskroom/cask && brew cask install osxfuse")
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -3,14 +3,13 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
module Debian
|
5
5
|
module InstallBindfs
|
6
|
+
class << self
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
comm.sudo("apt-get update")
|
10
|
-
comm.sudo("apt-get install -y bindfs")
|
8
|
+
def install_bindfs(machine)
|
9
|
+
machine.communicate.sudo("apt-get update && apt-get install -y bindfs")
|
11
10
|
end
|
12
|
-
end
|
13
11
|
|
12
|
+
end
|
14
13
|
end
|
15
14
|
end
|
16
15
|
end
|
@@ -3,13 +3,13 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
module Fedora
|
5
5
|
module InstallBindfs
|
6
|
+
class << self
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
comm.sudo('yum -y install bindfs')
|
8
|
+
def install_bindfs(machine)
|
9
|
+
machine.communicate.sudo('yum -y install bindfs')
|
10
10
|
end
|
11
|
-
end
|
12
11
|
|
12
|
+
end
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -3,11 +3,13 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
module Linux
|
5
5
|
module BindfsInstalled
|
6
|
+
class << self
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
def bindfs_installed(machine)
|
9
|
+
machine.communicate.test("bindfs --help")
|
10
|
+
end
|
10
11
|
|
12
|
+
end
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Bindfs
|
3
|
+
module Cap
|
4
|
+
module Linux
|
5
|
+
module Checks
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def bindfs_check_user(machine, user)
|
9
|
+
(user.nil? || machine.communicate.test("getent passwd #{user.shellescape}"))
|
10
|
+
end
|
11
|
+
|
12
|
+
def bindfs_check_group(machine, group)
|
13
|
+
(group.nil? || machine.communicate.test("getent group #{group.shellescape}"))
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -3,11 +3,13 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
module Linux
|
5
5
|
module EnableFuse
|
6
|
+
class << self
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
def enable_fuse(machine)
|
9
|
+
machine.communicate.sudo("/sbin/modprobe fuse")
|
10
|
+
end
|
10
11
|
|
12
|
+
end
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
@@ -3,11 +3,13 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
module Linux
|
5
5
|
module FuseLoaded
|
6
|
+
class << self
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
def fuse_loaded(machine)
|
9
|
+
machine.communicate.test("lsmod | grep -q fuse")
|
10
|
+
end
|
10
11
|
|
12
|
+
end
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
@@ -5,34 +5,36 @@ module VagrantPlugins
|
|
5
5
|
module Cap
|
6
6
|
module RedHat
|
7
7
|
module InstallBindfs
|
8
|
+
class << self
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
10
|
+
def install_bindfs(machine)
|
11
|
+
machine.communicate.tap do |comm|
|
12
|
+
if comm.test("test 0 -eq $(sudo yum search bindfs 2>&1 >/dev/null | wc -l)")
|
13
|
+
comm.sudo("yum -y install bindfs")
|
14
|
+
else
|
15
|
+
comm.sudo("yum -y install fuse fuse-devel gcc wget tar make")
|
16
|
+
comm.sudo <<-SHELL
|
17
|
+
for u in "#{SOURCE_URLS.join('" "')}"; do
|
18
|
+
if wget -q --spider $u; then
|
19
|
+
url=$u;
|
20
|
+
break;
|
21
|
+
fi;
|
22
|
+
done;
|
23
|
+
[ -n "$url" ] && \
|
24
|
+
wget $url -O bindfs.tar.gz && \
|
25
|
+
tar --overwrite -zxvf bindfs.tar.gz && \
|
26
|
+
[ -d ./bindfs-#{SOURCE_VERSION} ] && \
|
27
|
+
cd bindfs-#{SOURCE_VERSION} && \
|
28
|
+
./configure && \
|
29
|
+
make && \
|
30
|
+
make install && \
|
31
|
+
ln -s /usr/local/bin/bindfs /usr/bin
|
32
|
+
SHELL
|
33
|
+
end
|
32
34
|
end
|
33
35
|
end
|
34
|
-
end
|
35
36
|
|
37
|
+
end
|
36
38
|
end
|
37
39
|
end
|
38
40
|
end
|
@@ -3,13 +3,13 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
module Suse
|
5
5
|
module InstallBindfs
|
6
|
+
class << self
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
comm.sudo("zypper -n install bindfs")
|
8
|
+
def install_bindfs(machine)
|
9
|
+
machine.communicate.sudo("zypper -n install bindfs")
|
10
10
|
end
|
11
|
-
end
|
12
11
|
|
12
|
+
end
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -3,13 +3,15 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
module Ubuntu
|
5
5
|
module FuseLoaded
|
6
|
+
class << self
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
def fuse_loaded(machine)
|
9
|
+
# Ubuntu 6.10 and after automatically load fuse.
|
10
|
+
# Just check if it is installed
|
11
|
+
machine.communicate.test("test -e /dev/fuse")
|
12
|
+
end
|
12
13
|
|
14
|
+
end
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
@@ -15,9 +15,47 @@ module VagrantPlugins
|
|
15
15
|
end
|
16
16
|
|
17
17
|
|
18
|
+
guest_capability("linux", "bindfs_check_user") do
|
19
|
+
require "vagrant-bindfs/cap/linux/checks"
|
20
|
+
Cap::Linux::Checks
|
21
|
+
end
|
22
|
+
|
23
|
+
guest_capability("darwin", "bindfs_check_user") do
|
24
|
+
require "vagrant-bindfs/cap/darwin/checks"
|
25
|
+
Cap::Darwin::Checks
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
guest_capability("linux", "bindfs_check_group") do
|
30
|
+
require "vagrant-bindfs/cap/linux/checks"
|
31
|
+
Cap::Linux::Checks
|
32
|
+
end
|
33
|
+
|
34
|
+
guest_capability("darwin", "bindfs_check_group") do
|
35
|
+
require "vagrant-bindfs/cap/darwin/checks"
|
36
|
+
Cap::Darwin::Checks
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
guest_capability("linux", "bindfs_check_mount") do
|
41
|
+
require "vagrant-bindfs/cap/all/checks"
|
42
|
+
Cap::All::Checks
|
43
|
+
end
|
44
|
+
|
45
|
+
guest_capability("darwin", "bindfs_check_mount") do
|
46
|
+
require "vagrant-bindfs/cap/all/checks"
|
47
|
+
Cap::All::Checks
|
48
|
+
end
|
49
|
+
|
50
|
+
|
18
51
|
guest_capability("linux", "bindfs_installed") do
|
19
|
-
require "vagrant-bindfs/cap/
|
20
|
-
Cap::
|
52
|
+
require "vagrant-bindfs/cap/all/bindfs_installed"
|
53
|
+
Cap::All::BindfsInstalled
|
54
|
+
end
|
55
|
+
|
56
|
+
guest_capability("darwin", "bindfs_installed") do
|
57
|
+
require "vagrant-bindfs/cap/all/bindfs_installed"
|
58
|
+
Cap::All::BindfsInstalled
|
21
59
|
end
|
22
60
|
|
23
61
|
|
@@ -30,6 +68,11 @@ module VagrantPlugins
|
|
30
68
|
require "vagrant-bindfs/cap/ubuntu/fuse_loaded"
|
31
69
|
Cap::Ubuntu::FuseLoaded
|
32
70
|
end
|
71
|
+
|
72
|
+
guest_capability("darwin", "fuse_loaded") do
|
73
|
+
require "vagrant-bindfs/cap/darwin/fuse_loaded"
|
74
|
+
Cap::Darwin::FuseLoaded
|
75
|
+
end
|
33
76
|
|
34
77
|
|
35
78
|
guest_capability("linux", "enable_fuse") do
|
@@ -43,9 +86,9 @@ module VagrantPlugins
|
|
43
86
|
Cap::Debian::InstallBindfs
|
44
87
|
end
|
45
88
|
|
46
|
-
guest_capability("
|
47
|
-
require
|
48
|
-
Cap::
|
89
|
+
guest_capability("redhat", "install_bindfs") do
|
90
|
+
require 'vagrant-bindfs/cap/redhat/install_bindfs'
|
91
|
+
Cap::RedHat::InstallBindfs
|
49
92
|
end
|
50
93
|
|
51
94
|
guest_capability("fedora", "install_bindfs") do
|
@@ -53,9 +96,14 @@ module VagrantPlugins
|
|
53
96
|
Cap::Fedora::InstallBindfs
|
54
97
|
end
|
55
98
|
|
56
|
-
guest_capability("
|
57
|
-
require
|
58
|
-
Cap::
|
99
|
+
guest_capability("suse", "install_bindfs") do
|
100
|
+
require "vagrant-bindfs/cap/suse/install_bindfs"
|
101
|
+
Cap::Suse::InstallBindfs
|
102
|
+
end
|
103
|
+
|
104
|
+
guest_capability("darwin", "install_bindfs") do
|
105
|
+
require "vagrant-bindfs/cap/darwin/install_bindfs"
|
106
|
+
Cap::Darwin::InstallBindfs
|
59
107
|
end
|
60
108
|
|
61
109
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module VagrantPlugins
|
2
2
|
module Bindfs
|
3
3
|
|
4
|
-
VERSION = "0.4.
|
4
|
+
VERSION = "0.4.10"
|
5
5
|
|
6
|
-
SOURCE_VERSION = "1.13.
|
6
|
+
SOURCE_VERSION = "1.13.2"
|
7
7
|
SOURCE_URLS = [
|
8
8
|
"http://bindfs.org/downloads/bindfs-#{SOURCE_VERSION}.tar.gz",
|
9
9
|
"http://bindfs.dnsalias.net/downloads/bindfs-#{SOURCE_VERSION}.tar.gz"
|
data/locales/en.yml
CHANGED
@@ -2,6 +2,8 @@ en:
|
|
2
2
|
vagrant:
|
3
3
|
config:
|
4
4
|
bindfs:
|
5
|
+
homebrew_not_installed: "Homebrew seems to not be installed on the virtual machine, installing now"
|
6
|
+
osxfuse_not_installed: "OSXFuse seems to not be installed on the virtual machine, installing now"
|
5
7
|
not_installed: "Bindfs seems to not be installed on the virtual machine, installing now"
|
6
8
|
not_loaded: "Fuse kernel module seems to be not loaded, trying to load it"
|
7
9
|
already_mounted: "There's already a bindfs mount to destination %{dest}"
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
def tests_setup(machine, options = {})
|
2
|
+
|
3
|
+
machine.bindfs.debug = true
|
4
|
+
|
5
|
+
machine.bindfs.bind_folder "/etc", "/etc-binded-symbol", options.merge({ chown_ignore: true })
|
6
|
+
machine.bindfs.bind_folder "/etc", "/etc-binded-string", options.merge({ "chown-ignore" => true })
|
7
|
+
|
8
|
+
machine.bindfs.bind_folder "/etc", "/etc-binded-with-option", options.merge({ owner: "root" })
|
9
|
+
machine.bindfs.bind_folder "/etc", "/etc-binded-with-flag", options.merge({ "create-as-user" => true })
|
10
|
+
machine.bindfs.bind_folder "/etc", "/etc-binded-with-short-option", options.merge({ r: true })
|
11
|
+
machine.bindfs.bind_folder "/etc", "/etc-binded-without-explicit-owner", options.merge({ owner: nil })
|
12
|
+
|
13
|
+
# This should fail
|
14
|
+
machine.bindfs.bind_folder "/etc3", "/etc-nonexit", options
|
15
|
+
|
16
|
+
# These should also fail
|
17
|
+
machine.bindfs.bind_folder "/etc", "/etc-binded-with-nonexistent-user", options.merge({ user: "nonuser", after: :provision })
|
18
|
+
machine.bindfs.bind_folder "/etc", "/etc-binded-with-nonexistent-group", options.merge({ group: "nongroup", after: :provision })
|
19
|
+
|
20
|
+
end
|
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.4.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gaël-Ian Havard
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-10-02 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
|
-
description: A Vagrant plugin to automate bindfs mount in the VM. This allow you
|
16
|
-
change owner, group and permissions on files and, for example, work around NFS
|
17
|
-
permissions issues.
|
15
|
+
description: " A Vagrant plugin to automate bindfs mount in the VM. This allow you
|
16
|
+
to change owner, group and permissions on files and, for example, work around NFS
|
17
|
+
share permissions issues. "
|
18
18
|
email:
|
19
19
|
- gaelian.havard@gmail.com
|
20
20
|
- igor.serebryany@airbnb.com
|
@@ -24,11 +24,19 @@ extra_rdoc_files: []
|
|
24
24
|
files:
|
25
25
|
- MIT-LICENSE
|
26
26
|
- README.md
|
27
|
+
- Rakefile
|
28
|
+
- Vagrantfile
|
27
29
|
- lib/vagrant-bindfs.rb
|
28
30
|
- lib/vagrant-bindfs/bind.rb
|
31
|
+
- lib/vagrant-bindfs/cap/all/bindfs_installed.rb
|
32
|
+
- lib/vagrant-bindfs/cap/all/checks.rb
|
33
|
+
- lib/vagrant-bindfs/cap/darwin/checks.rb
|
34
|
+
- lib/vagrant-bindfs/cap/darwin/fuse_loaded.rb
|
35
|
+
- lib/vagrant-bindfs/cap/darwin/install_bindfs.rb
|
29
36
|
- lib/vagrant-bindfs/cap/debian/install_bindfs.rb
|
30
37
|
- lib/vagrant-bindfs/cap/fedora/install_bindfs.rb
|
31
38
|
- lib/vagrant-bindfs/cap/linux/bindfs_installed.rb
|
39
|
+
- lib/vagrant-bindfs/cap/linux/checks.rb
|
32
40
|
- lib/vagrant-bindfs/cap/linux/enable_fuse.rb
|
33
41
|
- lib/vagrant-bindfs/cap/linux/fuse_loaded.rb
|
34
42
|
- lib/vagrant-bindfs/cap/redhat/install_bindfs.rb
|
@@ -40,28 +48,33 @@ files:
|
|
40
48
|
- lib/vagrant-bindfs/plugin.rb
|
41
49
|
- lib/vagrant-bindfs/version.rb
|
42
50
|
- locales/en.yml
|
51
|
+
- test/test_helper.rb
|
43
52
|
homepage: https://github.com/gael-ian/vagrant-bindfs
|
44
53
|
licenses:
|
45
54
|
- MIT
|
46
|
-
metadata:
|
55
|
+
metadata:
|
56
|
+
allowed_push_host: https://rubygems.org
|
57
|
+
issue_tracker: https://github.com/gael-ian/vagrant-bindfs/issues
|
47
58
|
post_install_message:
|
48
59
|
rdoc_options: []
|
49
60
|
require_paths:
|
50
61
|
- lib
|
51
62
|
required_ruby_version: !ruby/object:Gem::Requirement
|
52
63
|
requirements:
|
53
|
-
- - "
|
64
|
+
- - "~>"
|
54
65
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
66
|
+
version: '2.2'
|
56
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
68
|
requirements:
|
58
69
|
- - ">="
|
59
70
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
71
|
+
version: 1.3.6
|
61
72
|
requirements: []
|
62
73
|
rubyforge_project:
|
63
74
|
rubygems_version: 2.5.1
|
64
75
|
signing_key:
|
65
76
|
specification_version: 4
|
66
77
|
summary: A Vagrant plugin to automate bindfs mount in the VM
|
67
|
-
test_files:
|
78
|
+
test_files:
|
79
|
+
- test/test_helper.rb
|
80
|
+
- Vagrantfile
|