vagrant-bindfs 1.1.1 → 1.1.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/lib/vagrant-bindfs.rb +2 -2
- data/lib/vagrant-bindfs/bindfs.rb +26 -7
- data/lib/vagrant-bindfs/bindfs/command.rb +1 -1
- data/lib/vagrant-bindfs/bindfs/folder.rb +4 -4
- data/lib/vagrant-bindfs/bindfs/option_set.rb +12 -11
- data/lib/vagrant-bindfs/bindfs/validators.rb +2 -2
- data/lib/vagrant-bindfs/bindfs/validators/config.rb +8 -10
- data/lib/vagrant-bindfs/vagrant.rb +5 -5
- data/lib/vagrant-bindfs/vagrant/actions.rb +3 -3
- data/lib/vagrant-bindfs/vagrant/actions/concerns.rb +2 -2
- data/lib/vagrant-bindfs/vagrant/actions/installer.rb +13 -4
- data/lib/vagrant-bindfs/vagrant/actions/mounter.rb +2 -2
- data/lib/vagrant-bindfs/vagrant/capabilities.rb +3 -3
- data/lib/vagrant-bindfs/vagrant/capabilities/all.rb +2 -2
- data/lib/vagrant-bindfs/vagrant/capabilities/all/bindfs.rb +21 -19
- data/lib/vagrant-bindfs/vagrant/capabilities/darwin.rb +3 -3
- data/lib/vagrant-bindfs/vagrant/capabilities/debian.rb +2 -2
- data/lib/vagrant-bindfs/vagrant/capabilities/gentoo.rb +2 -2
- data/lib/vagrant-bindfs/vagrant/capabilities/gentoo/bindfs.rb +1 -1
- data/lib/vagrant-bindfs/vagrant/capabilities/linux.rb +2 -2
- data/lib/vagrant-bindfs/vagrant/capabilities/redhat.rb +2 -2
- data/lib/vagrant-bindfs/vagrant/capabilities/suse.rb +2 -2
- data/lib/vagrant-bindfs/vagrant/capabilities/ubuntu/fuse.rb +0 -1
- data/lib/vagrant-bindfs/vagrant/config.rb +21 -21
- data/lib/vagrant-bindfs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c234e15a05c9a02ed8f450da79360247490e09ec
|
4
|
+
data.tar.gz: a1f2e3a40ff9dc1a08234afae5ce78eba7bbe97f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49a6034879f91b794dbaa28d2f2bf7f8a37a271c07c1b7ba73d657e094a64f3985071ea9de88e6dd6d5347243330cecc07dde26997062d797295a5e2f98a3507
|
7
|
+
data.tar.gz: aa50feaff06230e97c439d516a9816d5bfd5b496a6224d82b3929f9c5a298a82f1924f12cb26e3542af4fe3c4d2952b47484c469a7527d2c8c702b3e630a8ba4
|
data/lib/vagrant-bindfs.rb
CHANGED
@@ -7,8 +7,8 @@ rescue LoadError
|
|
7
7
|
end
|
8
8
|
|
9
9
|
module VagrantBindfs
|
10
|
-
autoload :Vagrant,
|
11
|
-
autoload :Bindfs,
|
10
|
+
autoload :Vagrant, 'vagrant-bindfs/vagrant'
|
11
|
+
autoload :Bindfs, 'vagrant-bindfs/bindfs'
|
12
12
|
end
|
13
13
|
|
14
14
|
I18n.load_path << File.expand_path('../locales/en.yml', __dir__)
|
@@ -2,15 +2,34 @@
|
|
2
2
|
|
3
3
|
module VagrantBindfs
|
4
4
|
module Bindfs
|
5
|
-
SOURCE_VERSION
|
6
|
-
SOURCE_URLS
|
7
|
-
'
|
8
|
-
'
|
5
|
+
SOURCE_VERSION = '1.14.0'
|
6
|
+
SOURCE_URLS = [
|
7
|
+
'https://bindfs.org/downloads/%<basename>s.tar.gz',
|
8
|
+
'https://bindfs.dy.fi/downloads/%<basename>s.tar.gz'
|
9
9
|
].freeze
|
10
10
|
|
11
|
-
autoload :Command,
|
12
|
-
autoload :Folder,
|
13
|
-
autoload :OptionSet,
|
11
|
+
autoload :Command, 'vagrant-bindfs/bindfs/command'
|
12
|
+
autoload :Folder, 'vagrant-bindfs/bindfs/folder'
|
13
|
+
autoload :OptionSet, 'vagrant-bindfs/bindfs/option_set'
|
14
14
|
autoload :Validators, 'vagrant-bindfs/bindfs/validators'
|
15
|
+
|
16
|
+
class << self
|
17
|
+
FULL_VERSION_NUMBER_SINCE = '1.13.0'
|
18
|
+
|
19
|
+
def source_tar_basename(version)
|
20
|
+
['bindfs', normalize_version_in_tar_name(version)].join('-')
|
21
|
+
end
|
22
|
+
|
23
|
+
def source_tar_urls(version)
|
24
|
+
SOURCE_URLS.map { |url| format(url, basename: source_tar_basename(version)) }
|
25
|
+
end
|
26
|
+
|
27
|
+
def normalize_version_in_tar_name(version)
|
28
|
+
v = version.to_s.strip
|
29
|
+
parts = (v.split('.').map(&:to_i) + [0, 0, 0]).take(3).compact
|
30
|
+
parts.pop if parts.last.zero? && Gem::Version.new(v) < Gem::Version.new(FULL_VERSION_NUMBER_SINCE)
|
31
|
+
parts.join('.')
|
32
|
+
end
|
33
|
+
end
|
15
34
|
end
|
16
35
|
end
|
@@ -12,11 +12,11 @@ module VagrantBindfs
|
|
12
12
|
attr_reader :hook
|
13
13
|
|
14
14
|
def initialize(hook, source, destination, options = {})
|
15
|
-
@hook
|
15
|
+
@hook = hook
|
16
16
|
|
17
|
-
@source
|
18
|
-
@destination
|
19
|
-
@options
|
17
|
+
@source = source
|
18
|
+
@destination = destination
|
19
|
+
@options = Bindfs::OptionSet.new(nil, options)
|
20
20
|
end
|
21
21
|
|
22
22
|
def id
|
@@ -16,10 +16,10 @@ module VagrantBindfs
|
|
16
16
|
def_delegators :@options, :each, :[], :keys, :key?
|
17
17
|
|
18
18
|
def initialize(version = nil, options = {})
|
19
|
-
@version
|
20
|
-
@options
|
21
|
-
@invalid_options
|
22
|
-
@unsupported_options
|
19
|
+
@version = version
|
20
|
+
@options = normalize_option_names(options)
|
21
|
+
@invalid_options = {}
|
22
|
+
@unsupported_options = {}
|
23
23
|
|
24
24
|
extract_invalid_options!
|
25
25
|
extract_unsupported_options!
|
@@ -82,10 +82,11 @@ module VagrantBindfs
|
|
82
82
|
|
83
83
|
def cast_option_values!
|
84
84
|
@options = options.each_with_object({}) do |(key, value), normalized|
|
85
|
-
normalized[key] =
|
86
|
-
|
87
|
-
|
88
|
-
|
85
|
+
normalized[key] =
|
86
|
+
case self.class.bindfs_options[key]['type']
|
87
|
+
when 'option' then cast_value_as_option(value)
|
88
|
+
when 'flag' then cast_value_as_flag(value)
|
89
|
+
end
|
89
90
|
normalized
|
90
91
|
end
|
91
92
|
end
|
@@ -100,7 +101,7 @@ module VagrantBindfs
|
|
100
101
|
return true if [true, 'true', 'True', 'yes', 'Yes', 'y', 'Y', 'on', 'On', 1].include?(value)
|
101
102
|
return false if [false, 'false', 'False', 'no', 'No', 'n', 'N', 'off', 'Off', 0].include?(value)
|
102
103
|
|
103
|
-
!!value
|
104
|
+
!!value # rubocop:disable Style/DoubleNegation
|
104
105
|
end
|
105
106
|
|
106
107
|
class << self
|
@@ -116,8 +117,8 @@ module VagrantBindfs
|
|
116
117
|
end
|
117
118
|
|
118
119
|
def compatible_name_for_version(option_name, version)
|
119
|
-
return 'user'
|
120
|
-
return 'group'
|
120
|
+
return 'user' if option_name == 'force-user' && version_lower_than(version, '1.12')
|
121
|
+
return 'group' if option_name == 'force-group' && version_lower_than(version, '1.12')
|
121
122
|
|
122
123
|
option_name
|
123
124
|
end
|
@@ -3,8 +3,8 @@
|
|
3
3
|
module VagrantBindfs
|
4
4
|
module Bindfs
|
5
5
|
module Validators
|
6
|
-
autoload :Config,
|
7
|
-
autoload :Runtime,
|
6
|
+
autoload :Config, 'vagrant-bindfs/bindfs/validators/config'
|
7
|
+
autoload :Runtime, 'vagrant-bindfs/bindfs/validators/runtime'
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -13,8 +13,8 @@ module VagrantBindfs
|
|
13
13
|
def_delegators :@folder, :source, :destination, :options
|
14
14
|
|
15
15
|
def initialize(folder)
|
16
|
-
@folder
|
17
|
-
@errors
|
16
|
+
@folder = folder
|
17
|
+
@errors = []
|
18
18
|
end
|
19
19
|
|
20
20
|
def valid?
|
@@ -28,21 +28,19 @@ module VagrantBindfs
|
|
28
28
|
protected
|
29
29
|
|
30
30
|
def validate_source!
|
31
|
-
@errors << I18n.t('vagrant-bindfs.validations.source_path_required')
|
31
|
+
@errors << I18n.t('vagrant-bindfs.validations.source_path_required') if source.empty?
|
32
32
|
@errors << I18n.t('vagrant-bindfs.validations.path_must_be_absolute', path: source) if relative_path?(source)
|
33
33
|
end
|
34
34
|
|
35
35
|
def validate_destination!
|
36
|
-
@errors << I18n.t('vagrant-bindfs.validations.destination_path_required')
|
37
|
-
@errors << I18n.t('vagrant-bindfs.validations.path_must_be_absolute', path: destination)
|
36
|
+
@errors << I18n.t('vagrant-bindfs.validations.destination_path_required') if destination.empty?
|
37
|
+
@errors << I18n.t('vagrant-bindfs.validations.path_must_be_absolute', path: destination) if relative_path?(destination)
|
38
38
|
end
|
39
39
|
|
40
40
|
def validate_options!
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
@errors << I18n.t('vagrant-bindfs.deprecations.skip_verify_group') if invalid_options.include?('skip-verify-group')
|
45
|
-
@errors << I18n.t('vagrant-bindfs.deprecations.hook') if invalid_options.include?('hook')
|
41
|
+
folder.options.invalid_options.keys.each do |option_name|
|
42
|
+
@errors << I18n.t(option_name.tr('-', '_'), scope: 'vagrant-bindfs.deprecations')
|
43
|
+
end
|
46
44
|
end
|
47
45
|
|
48
46
|
def relative_path?(path)
|
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
module VagrantBindfs
|
4
4
|
module Vagrant
|
5
|
-
autoload :Plugin,
|
6
|
-
autoload :Config,
|
5
|
+
autoload :Plugin, 'vagrant-bindfs/vagrant/plugin'
|
6
|
+
autoload :Config, 'vagrant-bindfs/vagrant/config'
|
7
7
|
autoload :Capabilities, 'vagrant-bindfs/vagrant/capabilities'
|
8
|
-
autoload :Actions,
|
8
|
+
autoload :Actions, 'vagrant-bindfs/vagrant/actions'
|
9
9
|
|
10
|
-
autoload :Error,
|
11
|
-
autoload :ConfigError,
|
10
|
+
autoload :Error, 'vagrant-bindfs/vagrant/errors'
|
11
|
+
autoload :ConfigError, 'vagrant-bindfs/vagrant/errors'
|
12
12
|
end
|
13
13
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
module VagrantBindfs
|
4
4
|
module Vagrant
|
5
5
|
module Actions
|
6
|
-
autoload :Installer,
|
7
|
-
autoload :Mounter,
|
6
|
+
autoload :Installer, 'vagrant-bindfs/vagrant/actions/installer'
|
7
|
+
autoload :Mounter, 'vagrant-bindfs/vagrant/actions/mounter'
|
8
8
|
|
9
|
-
autoload :Concerns,
|
9
|
+
autoload :Concerns, 'vagrant-bindfs/vagrant/actions/concerns'
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -4,8 +4,8 @@ module VagrantBindfs
|
|
4
4
|
module Vagrant
|
5
5
|
module Actions
|
6
6
|
module Concerns
|
7
|
-
autoload :Log,
|
8
|
-
autoload :Machine,
|
7
|
+
autoload :Log, 'vagrant-bindfs/vagrant/actions/concerns/log'
|
8
|
+
autoload :Machine, 'vagrant-bindfs/vagrant/actions/concerns/machine'
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -11,8 +11,8 @@ module VagrantBindfs
|
|
11
11
|
include Concerns::Log
|
12
12
|
|
13
13
|
def initialize(app, env)
|
14
|
-
@app
|
15
|
-
@env
|
14
|
+
@app = app
|
15
|
+
@env = env
|
16
16
|
end
|
17
17
|
|
18
18
|
def call(env)
|
@@ -77,14 +77,19 @@ module VagrantBindfs
|
|
77
77
|
|
78
78
|
def install_bindfs!
|
79
79
|
return install_bindfs_from_source! if install_from_source?
|
80
|
-
return
|
81
|
-
return guest.capability(:bindfs_bindfs_install_version, config.bindfs_version) if install_version_from_repositories?
|
80
|
+
return install_bindfs_from_repositories! if install_from_repositories?
|
82
81
|
|
83
82
|
warn(I18n.t('vagrant-bindfs.actions.bindfs.not_found_in_repository',
|
84
83
|
version: config.bindfs_version))
|
85
84
|
install_bindfs_from_source!
|
86
85
|
end
|
87
86
|
|
87
|
+
def install_bindfs_from_repositories!
|
88
|
+
return guest.capability(:bindfs_bindfs_install) if install_latest_from_repositories?
|
89
|
+
|
90
|
+
guest.capability(:bindfs_bindfs_install_version, config.bindfs_version)
|
91
|
+
end
|
92
|
+
|
88
93
|
def install_bindfs_from_source!
|
89
94
|
version = (config.bindfs_version == :latest ? VagrantBindfs::Bindfs::SOURCE_VERSION : config.bindfs_version.to_s)
|
90
95
|
guest.capability(:bindfs_bindfs_install_compilation_requirements)
|
@@ -95,6 +100,10 @@ module VagrantBindfs
|
|
95
100
|
config.install_bindfs_from_source
|
96
101
|
end
|
97
102
|
|
103
|
+
def install_from_repositories?
|
104
|
+
install_latest_from_repositories? || install_version_from_repositories?
|
105
|
+
end
|
106
|
+
|
98
107
|
def install_latest_from_repositories?
|
99
108
|
config.bindfs_version == :latest && guest.capability(:bindfs_bindfs_search)
|
100
109
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
module VagrantBindfs
|
4
4
|
module Vagrant
|
5
5
|
module Capabilities
|
6
|
-
autoload :All,
|
6
|
+
autoload :All, 'vagrant-bindfs/vagrant/capabilities/all'
|
7
7
|
|
8
8
|
autoload :Darwin, 'vagrant-bindfs/vagrant/capabilities/darwin'
|
9
|
-
autoload :Linux,
|
9
|
+
autoload :Linux, 'vagrant-bindfs/vagrant/capabilities/linux'
|
10
10
|
|
11
11
|
autoload :Debian, 'vagrant-bindfs/vagrant/capabilities/debian'
|
12
12
|
autoload :Ubuntu, 'vagrant-bindfs/vagrant/capabilities/ubuntu'
|
@@ -15,7 +15,7 @@ module VagrantBindfs
|
|
15
15
|
|
16
16
|
autoload :RedHat, 'vagrant-bindfs/vagrant/capabilities/redhat'
|
17
17
|
|
18
|
-
autoload :Suse,
|
18
|
+
autoload :Suse, 'vagrant-bindfs/vagrant/capabilities/suse'
|
19
19
|
|
20
20
|
class << self
|
21
21
|
def included(base)
|
@@ -4,9 +4,9 @@ module VagrantBindfs
|
|
4
4
|
module Vagrant
|
5
5
|
module Capabilities
|
6
6
|
module All
|
7
|
-
autoload :SystemChecks,
|
7
|
+
autoload :SystemChecks, 'vagrant-bindfs/vagrant/capabilities/all/system_checks'
|
8
8
|
autoload :PackageManager, 'vagrant-bindfs/vagrant/capabilities/all/package_manager'
|
9
|
-
autoload :Bindfs,
|
9
|
+
autoload :Bindfs, 'vagrant-bindfs/vagrant/capabilities/all/bindfs'
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -31,31 +31,33 @@ module VagrantBindfs
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def bindfs_bindfs_install_from_source(machine, version)
|
34
|
-
|
35
|
-
|
34
|
+
tar_urls = VagrantBindfs::Bindfs.source_tar_urls(version)
|
35
|
+
tar_dirname = VagrantBindfs::Bindfs.source_tar_basename(version)
|
36
36
|
|
37
37
|
begin
|
38
|
-
machine.communicate.execute
|
39
|
-
for u in "#{source_urls.join('" "')}"; do
|
40
|
-
if wget -q --spider $u; then
|
41
|
-
url=$u;
|
42
|
-
break;
|
43
|
-
fi;
|
44
|
-
done;
|
45
|
-
[ -n "$url" ] && \
|
46
|
-
wget $url -O bindfs.tar.gz && \
|
47
|
-
tar -zxvf bindfs.tar.gz && \
|
48
|
-
[ -d ./bindfs-#{version} ] && \
|
49
|
-
cd bindfs-#{version} && \
|
50
|
-
./configure && \
|
51
|
-
make && \
|
52
|
-
sudo make install
|
53
|
-
SHELL
|
38
|
+
machine.communicate.execute INSTALL_SCRIPT.format(urls: tar_urls, dirname: tar_dirname)
|
54
39
|
ensure
|
55
40
|
machine.communicate.execute('[ -f ./bindfs.tar.gz ] && rm ./bindfs.tar.gz')
|
56
|
-
machine.communicate.execute("[ -d
|
41
|
+
machine.communicate.execute("[ -d ./#{tar_dirname} ] && rm -rf ./#{tar_dirname}")
|
57
42
|
end
|
58
43
|
end
|
44
|
+
|
45
|
+
INSTALL_SCRIPT = <<-SHELL
|
46
|
+
for u in "%<urls>s"; do
|
47
|
+
if wget -q --spider $u; then
|
48
|
+
url=$u;
|
49
|
+
break;
|
50
|
+
fi;
|
51
|
+
done;
|
52
|
+
[ -n "$url" ] && \
|
53
|
+
wget $url -O bindfs.tar.gz && \
|
54
|
+
tar -zxvf bindfs.tar.gz && \
|
55
|
+
[ -d ./%<dirname>s ] && \
|
56
|
+
cd %<dirname>s && \
|
57
|
+
./configure && \
|
58
|
+
make && \
|
59
|
+
sudo make install
|
60
|
+
SHELL
|
59
61
|
end
|
60
62
|
end
|
61
63
|
end
|
@@ -4,10 +4,10 @@ module VagrantBindfs
|
|
4
4
|
module Vagrant
|
5
5
|
module Capabilities
|
6
6
|
module Darwin
|
7
|
-
autoload :SystemChecks,
|
7
|
+
autoload :SystemChecks, 'vagrant-bindfs/vagrant/capabilities/darwin/system_checks'
|
8
8
|
autoload :PackageManager, 'vagrant-bindfs/vagrant/capabilities/darwin/package_manager'
|
9
|
-
autoload :Fuse,
|
10
|
-
autoload :Bindfs,
|
9
|
+
autoload :Fuse, 'vagrant-bindfs/vagrant/capabilities/darwin/fuse'
|
10
|
+
autoload :Bindfs, 'vagrant-bindfs/vagrant/capabilities/darwin/bindfs'
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -5,8 +5,8 @@ module VagrantBindfs
|
|
5
5
|
module Capabilities
|
6
6
|
module Debian
|
7
7
|
autoload :PackageManager, 'vagrant-bindfs/vagrant/capabilities/debian/package_manager'
|
8
|
-
autoload :Fuse,
|
9
|
-
autoload :Bindfs,
|
8
|
+
autoload :Fuse, 'vagrant-bindfs/vagrant/capabilities/debian/fuse'
|
9
|
+
autoload :Bindfs, 'vagrant-bindfs/vagrant/capabilities/debian/bindfs'
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -5,8 +5,8 @@ module VagrantBindfs
|
|
5
5
|
module Capabilities
|
6
6
|
module Gentoo
|
7
7
|
autoload :PackageManager, 'vagrant-bindfs/vagrant/capabilities/gentoo/package_manager'
|
8
|
-
autoload :Fuse,
|
9
|
-
autoload :Bindfs,
|
8
|
+
autoload :Fuse, 'vagrant-bindfs/vagrant/capabilities/gentoo/fuse'
|
9
|
+
autoload :Bindfs, 'vagrant-bindfs/vagrant/capabilities/gentoo/bindfs'
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -28,7 +28,7 @@ module VagrantBindfs
|
|
28
28
|
comm.sudo('emerge app-portage/gentoolkit')
|
29
29
|
comm.sudo("equery -q list -po -F '$fullversion' #{bindfs_package_name} || true") do |_, output|
|
30
30
|
output.strip.gsub(/\s+/, ' ').split(' ').each do |package_version|
|
31
|
-
return package_version
|
31
|
+
return package_version unless package_version.match(/^#{version}/).nil?
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -4,9 +4,9 @@ module VagrantBindfs
|
|
4
4
|
module Vagrant
|
5
5
|
module Capabilities
|
6
6
|
module Linux
|
7
|
-
autoload :SystemChecks,
|
7
|
+
autoload :SystemChecks, 'vagrant-bindfs/vagrant/capabilities/linux/system_checks'
|
8
8
|
autoload :PackageManager, 'vagrant-bindfs/vagrant/capabilities/linux/package_manager'
|
9
|
-
autoload :Fuse,
|
9
|
+
autoload :Fuse, 'vagrant-bindfs/vagrant/capabilities/linux/fuse'
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -5,8 +5,8 @@ module VagrantBindfs
|
|
5
5
|
module Capabilities
|
6
6
|
module RedHat
|
7
7
|
autoload :PackageManager, 'vagrant-bindfs/vagrant/capabilities/redhat/package_manager'
|
8
|
-
autoload :Fuse,
|
9
|
-
autoload :Bindfs,
|
8
|
+
autoload :Fuse, 'vagrant-bindfs/vagrant/capabilities/redhat/fuse'
|
9
|
+
autoload :Bindfs, 'vagrant-bindfs/vagrant/capabilities/redhat/bindfs'
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -5,8 +5,8 @@ module VagrantBindfs
|
|
5
5
|
module Capabilities
|
6
6
|
module Suse
|
7
7
|
autoload :PackageManager, 'vagrant-bindfs/vagrant/capabilities/suse/package_manager'
|
8
|
-
autoload :Fuse,
|
9
|
-
autoload :Bindfs,
|
8
|
+
autoload :Fuse, 'vagrant-bindfs/vagrant/capabilities/suse/fuse'
|
9
|
+
autoload :Bindfs, 'vagrant-bindfs/vagrant/capabilities/suse/bindfs'
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -3,31 +3,31 @@
|
|
3
3
|
module VagrantBindfs
|
4
4
|
module Vagrant
|
5
5
|
class Config < ::Vagrant.plugin('2', :config)
|
6
|
-
attr_reader
|
6
|
+
attr_reader :debug
|
7
7
|
|
8
8
|
attr_accessor :bindfs_version
|
9
|
-
attr_reader
|
9
|
+
attr_reader :install_bindfs_from_source
|
10
10
|
|
11
|
-
attr_reader
|
11
|
+
attr_reader :default_options
|
12
12
|
attr_accessor :binded_folders
|
13
13
|
|
14
14
|
attr_accessor :skip_validations
|
15
|
-
attr_reader
|
15
|
+
attr_reader :force_empty_mountpoints
|
16
16
|
|
17
17
|
def initialize
|
18
|
-
@debug
|
18
|
+
@debug = false
|
19
19
|
|
20
|
-
@bindfs_version
|
20
|
+
@bindfs_version = UNSET_VALUE
|
21
21
|
@install_bindfs_from_source = false
|
22
22
|
|
23
|
-
@binded_folders
|
24
|
-
@default_options
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
@binded_folders = {}
|
24
|
+
@default_options = Bindfs::OptionSet.new(nil,
|
25
|
+
'force-user' => 'vagrant',
|
26
|
+
'force-group' => 'vagrant',
|
27
|
+
'perms' => 'u=rwX:g=rD:o=rD')
|
28
28
|
|
29
|
-
@skip_validations
|
30
|
-
@force_empty_mountpoints
|
29
|
+
@skip_validations = []
|
30
|
+
@force_empty_mountpoints = false
|
31
31
|
end
|
32
32
|
|
33
33
|
def debug=(value)
|
@@ -60,19 +60,19 @@ module VagrantBindfs
|
|
60
60
|
@binded_folders[folder.id] = folder
|
61
61
|
end
|
62
62
|
|
63
|
-
def merge(other)
|
63
|
+
def merge(other) # rubocop:disable Metrics/AbcSize
|
64
64
|
super.tap do |result|
|
65
|
-
result.debug
|
65
|
+
result.debug = (debug || other.debug)
|
66
66
|
|
67
|
-
result_bindfs_version
|
68
|
-
result.bindfs_version
|
67
|
+
result_bindfs_version = [bindfs_version, other.bindfs_version].reject { |v| v == UNSET_VALUE }.min
|
68
|
+
result.bindfs_version = result_bindfs_version unless result_bindfs_version.nil?
|
69
69
|
result.install_bindfs_from_source = (install_bindfs_from_source || other.install_bindfs_from_source)
|
70
70
|
|
71
|
-
result.default_options
|
72
|
-
result.binded_folders
|
71
|
+
result.default_options = default_options.merge(other.default_options)
|
72
|
+
result.binded_folders = binded_folders.merge(other.binded_folders)
|
73
73
|
|
74
|
-
result.skip_validations
|
75
|
-
result.force_empty_mountpoints
|
74
|
+
result.skip_validations = (skip_validations + other.skip_validations).uniq
|
75
|
+
result.force_empty_mountpoints = (force_empty_mountpoints || other.force_empty_mountpoints)
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
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: 1.1.
|
4
|
+
version: 1.1.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: 2019-06-
|
13
|
+
date: 2019-06-18 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: " A Vagrant plugin to automate bindfs mount in the VM. This allow you
|
16
16
|
to change owner, group and permissions on files and, for example, work around NFS
|