vagrant-bindfs 0.4.14 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +66 -4
- data/Rakefile +11 -7
- data/Vagrantfile +10 -8
- data/lib/vagrant-bindfs.rb +10 -16
- data/lib/vagrant-bindfs/bindfs.rb +15 -0
- data/lib/vagrant-bindfs/bindfs/command.rb +47 -0
- data/lib/vagrant-bindfs/bindfs/folder.rb +38 -0
- data/lib/vagrant-bindfs/bindfs/option_definitions.json +67 -0
- data/lib/vagrant-bindfs/bindfs/option_set.rb +105 -0
- data/lib/vagrant-bindfs/bindfs/validators.rb +9 -0
- data/lib/vagrant-bindfs/bindfs/validators/config.rb +58 -0
- data/lib/vagrant-bindfs/bindfs/validators/runtime.rb +56 -0
- data/lib/vagrant-bindfs/vagrant.rb +12 -0
- data/lib/vagrant-bindfs/vagrant/actions.rb +11 -0
- data/lib/vagrant-bindfs/vagrant/actions/concerns.rb +11 -0
- data/lib/vagrant-bindfs/vagrant/actions/concerns/log.rb +34 -0
- data/lib/vagrant-bindfs/vagrant/actions/concerns/machine.rb +31 -0
- data/lib/vagrant-bindfs/vagrant/actions/installer.rb +99 -0
- data/lib/vagrant-bindfs/vagrant/actions/mounter.rb +65 -0
- data/lib/vagrant-bindfs/vagrant/capabilities.rb +108 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/all.rb +12 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/all/bindfs.rb +53 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/all/package_manager.rb +17 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/all/system_checks.rb +20 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/darwin.rb +13 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/darwin/bindfs.rb +33 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/darwin/fuse.rb +32 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/darwin/package_manager.rb +24 -0
- data/lib/vagrant-bindfs/{cap/darwin/checks.rb → vagrant/capabilities/darwin/system_checks.rb} +7 -8
- data/lib/vagrant-bindfs/vagrant/capabilities/debian.rb +12 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/debian/bindfs.rb +39 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/debian/fuse.rb +16 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/debian/package_manager.rb +20 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/linux.rb +12 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/linux/fuse.rb +24 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/linux/package_manager.rb +16 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/linux/system_checks.rb +26 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/redhat.rb +12 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/redhat/bindfs.rb +39 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/redhat/fuse.rb +17 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/redhat/package_manager.rb +20 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/suse.rb +12 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/suse/bindfs.rb +41 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/suse/fuse.rb +17 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/suse/package_manager.rb +20 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/ubuntu.rb +10 -0
- data/lib/vagrant-bindfs/vagrant/capabilities/ubuntu/fuse.rb +23 -0
- data/lib/vagrant-bindfs/vagrant/config.rb +86 -0
- data/lib/vagrant-bindfs/vagrant/errors.rb +12 -0
- data/lib/vagrant-bindfs/vagrant/plugin.rb +43 -0
- data/lib/vagrant-bindfs/version.rb +3 -12
- data/locales/en.yml +71 -26
- metadata +48 -23
- data/lib/vagrant-bindfs/bind.rb +0 -109
- data/lib/vagrant-bindfs/cap/all/bindfs_installed.rb +0 -17
- data/lib/vagrant-bindfs/cap/all/checks.rb +0 -17
- data/lib/vagrant-bindfs/cap/darwin/fuse_loaded.rb +0 -19
- data/lib/vagrant-bindfs/cap/darwin/install_bindfs.rb +0 -61
- data/lib/vagrant-bindfs/cap/debian/install_bindfs.rb +0 -17
- data/lib/vagrant-bindfs/cap/fedora/install_bindfs.rb +0 -17
- data/lib/vagrant-bindfs/cap/linux/bindfs_installed.rb +0 -17
- data/lib/vagrant-bindfs/cap/linux/checks.rb +0 -21
- data/lib/vagrant-bindfs/cap/linux/enable_fuse.rb +0 -17
- data/lib/vagrant-bindfs/cap/linux/fuse_loaded.rb +0 -17
- data/lib/vagrant-bindfs/cap/redhat/install_bindfs.rb +0 -52
- data/lib/vagrant-bindfs/cap/suse/install_bindfs.rb +0 -17
- data/lib/vagrant-bindfs/cap/ubuntu/fuse_loaded.rb +0 -19
- data/lib/vagrant-bindfs/command.rb +0 -212
- data/lib/vagrant-bindfs/config.rb +0 -119
- data/lib/vagrant-bindfs/errors.rb +0 -7
- data/lib/vagrant-bindfs/plugin.rb +0 -145
- data/test/test_helper.rb +0 -20
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module VagrantBindfs
|
3
|
+
module Bindfs
|
4
|
+
module Validators
|
5
|
+
class Config
|
6
|
+
attr_reader :folder
|
7
|
+
attr_reader :errors
|
8
|
+
|
9
|
+
extend Forwardable
|
10
|
+
def_delegator :@folder, :source
|
11
|
+
def_delegator :@folder, :destination
|
12
|
+
def_delegator :@folder, :options
|
13
|
+
|
14
|
+
def initialize(folder)
|
15
|
+
@folder = folder
|
16
|
+
@errors = []
|
17
|
+
end
|
18
|
+
|
19
|
+
def valid?
|
20
|
+
@errors = []
|
21
|
+
validate_source!
|
22
|
+
validate_destination!
|
23
|
+
validate_options!
|
24
|
+
@errors.empty?
|
25
|
+
end
|
26
|
+
|
27
|
+
protected
|
28
|
+
|
29
|
+
def validate_source!
|
30
|
+
@errors << I18n.t('vagrant-bindfs.validations.source_path_required') if source.empty?
|
31
|
+
@errors << I18n.t('vagrant-bindfs.validations.path_must_be_absolute', path: source) if relative_path?(source)
|
32
|
+
end
|
33
|
+
|
34
|
+
def validate_destination!
|
35
|
+
@errors << I18n.t('vagrant-bindfs.validations.destination_path_required') if destination.empty?
|
36
|
+
@errors << I18n.t('vagrant-bindfs.validations.path_must_be_absolute', path: destination) if relative_path?(destination)
|
37
|
+
@errors << I18n.t('vagrant-bindfs.validations.destination_path_reserved', path: destination) if reserved_path?(destination)
|
38
|
+
end
|
39
|
+
|
40
|
+
def validate_options!
|
41
|
+
invalid_options = folder.options.invalid_options.keys
|
42
|
+
@errors << I18n.t('vagrant-bindfs.deprecations.disabled') if invalid_options.include?('disabled')
|
43
|
+
@errors << I18n.t('vagrant-bindfs.deprecations.skip_verify_user') if invalid_options.include?('skip-verify-user')
|
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')
|
46
|
+
end
|
47
|
+
|
48
|
+
def relative_path?(path)
|
49
|
+
Pathname.new(path).relative?
|
50
|
+
end
|
51
|
+
|
52
|
+
def reserved_path?(path)
|
53
|
+
!Pathname.new(path).to_path.match(%r{^\/vagrant\/}).nil?
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module VagrantBindfs
|
3
|
+
module Bindfs
|
4
|
+
module Validators
|
5
|
+
class Runtime < Config
|
6
|
+
attr_reader :machine
|
7
|
+
|
8
|
+
def initialize(folder, machine)
|
9
|
+
super(folder)
|
10
|
+
@machine = machine
|
11
|
+
end
|
12
|
+
|
13
|
+
protected
|
14
|
+
|
15
|
+
def validate_source!
|
16
|
+
super
|
17
|
+
|
18
|
+
@errors << I18n.t('vagrant-bindfs.validations.source_path_does_not_exist', path: source) unless directory_exists?(source)
|
19
|
+
end
|
20
|
+
|
21
|
+
def validate_destination!
|
22
|
+
super
|
23
|
+
|
24
|
+
@errors << I18n.t('vagrant-bindfs.validations.destination_already_mounted', dest: destination) if mount_exists?(destination)
|
25
|
+
end
|
26
|
+
|
27
|
+
def validate_options!
|
28
|
+
super
|
29
|
+
|
30
|
+
validate_user
|
31
|
+
validate_group
|
32
|
+
end
|
33
|
+
|
34
|
+
def directory_exists?(path)
|
35
|
+
machine.guest.capability(:bindfs_exists_directory, path)
|
36
|
+
end
|
37
|
+
|
38
|
+
def mount_exists?(path)
|
39
|
+
machine.guest.capability(:bindfs_exists_mount, path)
|
40
|
+
end
|
41
|
+
|
42
|
+
def validate_user
|
43
|
+
return if machine.config.bindfs.skip_validations.include?(:user)
|
44
|
+
return if machine.guest.capability(:bindfs_exists_user, options['force-user'])
|
45
|
+
@errors << I18n.t('vagrant-bindfs.validations.user_does_not_exist', user: options['force-user'])
|
46
|
+
end
|
47
|
+
|
48
|
+
def validate_group
|
49
|
+
return if machine.config.bindfs.skip_validations.include?(:group)
|
50
|
+
return if machine.guest.capability(:bindfs_exists_group, options['force-group'])
|
51
|
+
@errors << I18n.t('vagrant-bindfs.validations.group_does_not_exist', group: options['force-group'])
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module VagrantBindfs
|
3
|
+
module Vagrant
|
4
|
+
autoload :Plugin, 'vagrant-bindfs/vagrant/plugin'
|
5
|
+
autoload :Config, 'vagrant-bindfs/vagrant/config'
|
6
|
+
autoload :Capabilities, 'vagrant-bindfs/vagrant/capabilities'
|
7
|
+
autoload :Actions, 'vagrant-bindfs/vagrant/actions'
|
8
|
+
|
9
|
+
autoload :Error, 'vagrant-bindfs/vagrant/errors'
|
10
|
+
autoload :ConfigError, 'vagrant-bindfs/vagrant/errors'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module VagrantBindfs
|
3
|
+
module Vagrant
|
4
|
+
module Actions
|
5
|
+
autoload :Installer, 'vagrant-bindfs/vagrant/actions/installer'
|
6
|
+
autoload :Mounter, 'vagrant-bindfs/vagrant/actions/mounter'
|
7
|
+
|
8
|
+
autoload :Concerns, 'vagrant-bindfs/vagrant/actions/concerns'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module VagrantBindfs
|
3
|
+
module Vagrant
|
4
|
+
module Actions
|
5
|
+
module Concerns
|
6
|
+
autoload :Log, 'vagrant-bindfs/vagrant/actions/concerns/log'
|
7
|
+
autoload :Machine, 'vagrant-bindfs/vagrant/actions/concerns/machine'
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module VagrantBindfs
|
3
|
+
module Vagrant
|
4
|
+
module Actions
|
5
|
+
module Concerns
|
6
|
+
module Log
|
7
|
+
def logger
|
8
|
+
env[:ui]
|
9
|
+
end
|
10
|
+
|
11
|
+
def debug(message)
|
12
|
+
logger.detail(message) if config.debug
|
13
|
+
end
|
14
|
+
|
15
|
+
def detail(message)
|
16
|
+
logger.detail(message)
|
17
|
+
end
|
18
|
+
|
19
|
+
def info(message)
|
20
|
+
logger.info message
|
21
|
+
end
|
22
|
+
|
23
|
+
def warn(message)
|
24
|
+
logger.warn message
|
25
|
+
end
|
26
|
+
|
27
|
+
def error(message)
|
28
|
+
logger.error message
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module VagrantBindfs
|
3
|
+
module Vagrant
|
4
|
+
module Actions
|
5
|
+
module Concerns
|
6
|
+
module Machine
|
7
|
+
def machine
|
8
|
+
env[:machine]
|
9
|
+
end
|
10
|
+
|
11
|
+
def config
|
12
|
+
machine.config.bindfs
|
13
|
+
end
|
14
|
+
|
15
|
+
def binded_folders(hook = nil)
|
16
|
+
@binded_folders ||= begin
|
17
|
+
config.binded_folders.each_with_object({}) do |(id, folder), binded|
|
18
|
+
binded[id] = folder if hook.nil? || folder.hook == hook
|
19
|
+
binded
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def guest
|
25
|
+
machine.guest
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module VagrantBindfs
|
3
|
+
module Vagrant
|
4
|
+
module Actions
|
5
|
+
class Installer
|
6
|
+
attr_reader :app
|
7
|
+
attr_reader :env
|
8
|
+
|
9
|
+
include Concerns::Machine
|
10
|
+
include Concerns::Log
|
11
|
+
|
12
|
+
def initialize(app, env)
|
13
|
+
@app = app
|
14
|
+
@env = env
|
15
|
+
end
|
16
|
+
|
17
|
+
def call(env)
|
18
|
+
@app.call(env)
|
19
|
+
apply!(env)
|
20
|
+
end
|
21
|
+
|
22
|
+
protected
|
23
|
+
|
24
|
+
def apply!(_env)
|
25
|
+
return if binded_folders.empty?
|
26
|
+
ensure_guest_is_ready_to_bind!
|
27
|
+
end
|
28
|
+
|
29
|
+
def ensure_guest_is_ready_to_bind!
|
30
|
+
info(I18n.t('vagrant-bindfs.actions.installer.start'))
|
31
|
+
ensure_package_manager_is_installed!
|
32
|
+
ensure_fuse_is_installed!
|
33
|
+
ensure_fuse_is_loaded!
|
34
|
+
ensure_bindfs_is_installed!
|
35
|
+
info(I18n.t('vagrant-bindfs.actions.installer.end'))
|
36
|
+
end
|
37
|
+
|
38
|
+
def ensure_package_manager_is_installed!
|
39
|
+
unless guest.capability(:bindfs_package_manager_installed)
|
40
|
+
warn(I18n.t('vagrant-bindfs.actions.package_manager.not_installed'))
|
41
|
+
guest.capability(:bindfs_package_manager_install)
|
42
|
+
end
|
43
|
+
|
44
|
+
detail(I18n.t('vagrant-bindfs.actions.package_manager.installed',
|
45
|
+
name: guest.capability(:bindfs_package_manager_name)))
|
46
|
+
end
|
47
|
+
|
48
|
+
def ensure_fuse_is_installed!
|
49
|
+
unless guest.capability(:bindfs_fuse_installed)
|
50
|
+
warn(I18n.t('vagrant-bindfs.actions.fuse.not_installed'))
|
51
|
+
guest.capability(:bindfs_fuse_install)
|
52
|
+
end
|
53
|
+
|
54
|
+
detail(I18n.t('vagrant-bindfs.actions.fuse.installed'))
|
55
|
+
end
|
56
|
+
|
57
|
+
def ensure_fuse_is_loaded!
|
58
|
+
unless guest.capability(:bindfs_fuse_loaded)
|
59
|
+
warn(I18n.t('vagrant-bindfs.actions.fuse.not_loaded'))
|
60
|
+
guest.capability(:bindfs_fuse_load)
|
61
|
+
end
|
62
|
+
|
63
|
+
detail(I18n.t('vagrant-bindfs.actions.fuse.loaded'))
|
64
|
+
end
|
65
|
+
|
66
|
+
def ensure_bindfs_is_installed!
|
67
|
+
unless guest.capability(:bindfs_bindfs_installed)
|
68
|
+
warn(I18n.t('vagrant-bindfs.actions.bindfs.not_installed'))
|
69
|
+
|
70
|
+
case true
|
71
|
+
when config.install_bindfs_from_source
|
72
|
+
install_bindfs_from_source!
|
73
|
+
|
74
|
+
when config.bindfs_version == :latest
|
75
|
+
guest.capability(:bindfs_bindfs_install)
|
76
|
+
|
77
|
+
when config.bindfs_version != :latest && guest.capability(:bindfs_bindfs_search_version, config.bindfs_version)
|
78
|
+
guest.capability(:bindfs_bindfs_install_version, config.bindfs_version)
|
79
|
+
|
80
|
+
else
|
81
|
+
warn(I18n.t('vagrant-bindfs.actions.bindfs.not_found_in_repository',
|
82
|
+
version: config.bindfs_version))
|
83
|
+
install_bindfs_from_source!
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
detail(I18n.t('vagrant-bindfs.actions.bindfs.detected',
|
88
|
+
version: guest.capability(:bindfs_bindfs_version)))
|
89
|
+
end
|
90
|
+
|
91
|
+
def install_bindfs_from_source!
|
92
|
+
version = (config.bindfs_version == :latest ? VagrantBindfs::Bindfs::SOURCE_VERSION : config.bindfs_version.to_s)
|
93
|
+
guest.capability(:bindfs_bindfs_install_compilation_requirements)
|
94
|
+
guest.capability(:bindfs_bindfs_install_from_source, version)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module VagrantBindfs
|
3
|
+
module Vagrant
|
4
|
+
module Actions
|
5
|
+
class Mounter
|
6
|
+
attr_reader :app
|
7
|
+
attr_reader :env
|
8
|
+
attr_reader :hook
|
9
|
+
|
10
|
+
include Concerns::Machine
|
11
|
+
include Concerns::Log
|
12
|
+
|
13
|
+
def initialize(app, env, hook)
|
14
|
+
@app = app
|
15
|
+
@env = env
|
16
|
+
@hook = hook
|
17
|
+
end
|
18
|
+
|
19
|
+
def call(env)
|
20
|
+
app.call(env)
|
21
|
+
return if binded_folders(hook).empty?
|
22
|
+
bind_folders!
|
23
|
+
end
|
24
|
+
|
25
|
+
protected
|
26
|
+
|
27
|
+
def bind_folders!
|
28
|
+
info I18n.t('vagrant-bindfs.actions.mounter.start', hook: hook)
|
29
|
+
bindfs_version = guest.capability(:bindfs_bindfs_version)
|
30
|
+
|
31
|
+
binded_folders(hook).each do |_, folder|
|
32
|
+
folder.reverse_merge!(config.default_options)
|
33
|
+
folder.to_version!(bindfs_version)
|
34
|
+
|
35
|
+
validator = VagrantBindfs::Bindfs::Validators::Runtime.new(folder, machine)
|
36
|
+
|
37
|
+
unless validator.valid?
|
38
|
+
error I18n.t(
|
39
|
+
'vagrant-bindfs.validations.errors_found',
|
40
|
+
dest: folder.destination,
|
41
|
+
source: folder.source,
|
42
|
+
errors: validator.errors.join(' ')
|
43
|
+
)
|
44
|
+
next
|
45
|
+
end
|
46
|
+
|
47
|
+
command = VagrantBindfs::Bindfs::Command.new(folder)
|
48
|
+
|
49
|
+
detail I18n.t(
|
50
|
+
'vagrant-bindfs.actions.mounter.entry',
|
51
|
+
dest: folder.destination,
|
52
|
+
source: folder.source
|
53
|
+
)
|
54
|
+
|
55
|
+
machine.communicate.tap do |comm|
|
56
|
+
comm.sudo("mkdir -p #{folder.destination}")
|
57
|
+
comm.sudo(command.to_s, error_class: VagrantBindfs::Vagrant::Error, error_key: 'bindfs.mount_failed')
|
58
|
+
debug(command.to_s)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module VagrantBindfs
|
3
|
+
module Vagrant
|
4
|
+
module Capabilities
|
5
|
+
autoload :All, 'vagrant-bindfs/vagrant/capabilities/all'
|
6
|
+
|
7
|
+
autoload :Darwin, 'vagrant-bindfs/vagrant/capabilities/darwin'
|
8
|
+
autoload :Linux, 'vagrant-bindfs/vagrant/capabilities/linux'
|
9
|
+
|
10
|
+
autoload :Debian, 'vagrant-bindfs/vagrant/capabilities/debian'
|
11
|
+
autoload :Ubuntu, 'vagrant-bindfs/vagrant/capabilities/ubuntu'
|
12
|
+
|
13
|
+
autoload :RedHat, 'vagrant-bindfs/vagrant/capabilities/redhat'
|
14
|
+
|
15
|
+
autoload :Suse, 'vagrant-bindfs/vagrant/capabilities/suse'
|
16
|
+
|
17
|
+
class << self
|
18
|
+
def included(base)
|
19
|
+
declare_capabilities_for_system_checks!(base)
|
20
|
+
declare_capabilities_for_package_manager!(base)
|
21
|
+
declare_capabilities_for_fuse!(base)
|
22
|
+
declare_capabilities_for_bindfs!(base)
|
23
|
+
end
|
24
|
+
|
25
|
+
def declare_capabilities_for_system_checks!(base)
|
26
|
+
base.guest_capability('darwin', 'bindfs_exists_user') { Capabilities::Darwin::SystemChecks }
|
27
|
+
base.guest_capability('linux', 'bindfs_exists_user') { Capabilities::Linux::SystemChecks }
|
28
|
+
|
29
|
+
base.guest_capability('darwin', 'bindfs_exists_group') { Capabilities::Darwin::SystemChecks }
|
30
|
+
base.guest_capability('linux', 'bindfs_exists_group') { Capabilities::Linux::SystemChecks }
|
31
|
+
|
32
|
+
base.guest_capability('darwin', 'bindfs_exists_directory') { Capabilities::All::SystemChecks }
|
33
|
+
base.guest_capability('linux', 'bindfs_exists_directory') { Capabilities::All::SystemChecks }
|
34
|
+
|
35
|
+
base.guest_capability('darwin', 'bindfs_exists_mount') { Capabilities::All::SystemChecks }
|
36
|
+
base.guest_capability('linux', 'bindfs_exists_mount') { Capabilities::All::SystemChecks }
|
37
|
+
end
|
38
|
+
|
39
|
+
def declare_capabilities_for_package_manager!(base)
|
40
|
+
base.guest_capability('darwin', 'bindfs_package_manager_name') { Capabilities::Darwin::PackageManager }
|
41
|
+
base.guest_capability('debian', 'bindfs_package_manager_name') { Capabilities::Debian::PackageManager }
|
42
|
+
base.guest_capability('redhat', 'bindfs_package_manager_name') { Capabilities::RedHat::PackageManager }
|
43
|
+
base.guest_capability('suse', 'bindfs_package_manager_name') { Capabilities::Suse::PackageManager }
|
44
|
+
|
45
|
+
base.guest_capability('darwin', 'bindfs_package_manager_installed') { Capabilities::All::PackageManager }
|
46
|
+
base.guest_capability('linux', 'bindfs_package_manager_installed') { Capabilities::All::PackageManager }
|
47
|
+
|
48
|
+
base.guest_capability('darwin', 'bindfs_package_manager_install') { Capabilities::Darwin::PackageManager }
|
49
|
+
base.guest_capability('linux', 'bindfs_package_manager_install') { Capabilities::Linux::PackageManager }
|
50
|
+
|
51
|
+
base.guest_capability('darwin', 'bindfs_package_manager_update') { Capabilities::Darwin::PackageManager }
|
52
|
+
base.guest_capability('debian', 'bindfs_package_manager_update') { Capabilities::Debian::PackageManager }
|
53
|
+
base.guest_capability('redhat', 'bindfs_package_manager_update') { Capabilities::RedHat::PackageManager }
|
54
|
+
base.guest_capability('suse', 'bindfs_package_manager_update') { Capabilities::Suse::PackageManager }
|
55
|
+
end
|
56
|
+
|
57
|
+
def declare_capabilities_for_fuse!(base)
|
58
|
+
base.guest_capability('darwin', 'bindfs_fuse_installed') { Capabilities::Darwin::Fuse }
|
59
|
+
base.guest_capability('linux', 'bindfs_fuse_installed') { Capabilities::Linux::Fuse }
|
60
|
+
|
61
|
+
base.guest_capability('darwin', 'bindfs_fuse_install') { Capabilities::Darwin::Fuse }
|
62
|
+
base.guest_capability('debian', 'bindfs_fuse_install') { Capabilities::Debian::Fuse }
|
63
|
+
base.guest_capability('redhat', 'bindfs_fuse_install') { Capabilities::RedHat::Fuse }
|
64
|
+
base.guest_capability('suse', 'bindfs_fuse_install') { Capabilities::Suse::Fuse }
|
65
|
+
|
66
|
+
base.guest_capability('darwin', 'bindfs_fuse_loaded') { Capabilities::Darwin::Fuse }
|
67
|
+
base.guest_capability('linux', 'bindfs_fuse_loaded') { Capabilities::Linux::Fuse }
|
68
|
+
base.guest_capability('ubuntu', 'bindfs_fuse_loaded') { Capabilities::Ubuntu::Fuse }
|
69
|
+
|
70
|
+
base.guest_capability('darwin', 'bindfs_fuse_load') { Capabilities::Darwin::Fuse }
|
71
|
+
base.guest_capability('linux', 'bindfs_fuse_load') { Capabilities::Linux::Fuse }
|
72
|
+
base.guest_capability('ubuntu', 'bindfs_fuse_load') { Capabilities::Ubuntu::Fuse }
|
73
|
+
end
|
74
|
+
|
75
|
+
def declare_capabilities_for_bindfs!(base)
|
76
|
+
base.guest_capability('darwin', 'bindfs_bindfs_installed') { Capabilities::All::Bindfs }
|
77
|
+
base.guest_capability('linux', 'bindfs_bindfs_installed') { Capabilities::All::Bindfs }
|
78
|
+
|
79
|
+
base.guest_capability('darwin', 'bindfs_bindfs_version') { Capabilities::All::Bindfs }
|
80
|
+
base.guest_capability('linux', 'bindfs_bindfs_version') { Capabilities::All::Bindfs }
|
81
|
+
|
82
|
+
base.guest_capability('darwin', 'bindfs_bindfs_install') { Capabilities::Darwin::Bindfs }
|
83
|
+
base.guest_capability('debian', 'bindfs_bindfs_install') { Capabilities::Debian::Bindfs }
|
84
|
+
base.guest_capability('redhat', 'bindfs_bindfs_install') { Capabilities::RedHat::Bindfs }
|
85
|
+
base.guest_capability('suse', 'bindfs_bindfs_install') { Capabilities::Suse::Bindfs }
|
86
|
+
|
87
|
+
base.guest_capability('darwin', 'bindfs_bindfs_search_version') { Capabilities::Darwin::Bindfs }
|
88
|
+
base.guest_capability('debian', 'bindfs_bindfs_search_version') { Capabilities::Debian::Bindfs }
|
89
|
+
base.guest_capability('redhat', 'bindfs_bindfs_search_version') { Capabilities::RedHat::Bindfs }
|
90
|
+
base.guest_capability('suse', 'bindfs_bindfs_search_version') { Capabilities::Suse::Bindfs }
|
91
|
+
|
92
|
+
base.guest_capability('darwin', 'bindfs_bindfs_install_version') { Capabilities::Darwin::Bindfs }
|
93
|
+
base.guest_capability('debian', 'bindfs_bindfs_install_version') { Capabilities::Debian::Bindfs }
|
94
|
+
base.guest_capability('redhat', 'bindfs_bindfs_install_version') { Capabilities::RedHat::Bindfs }
|
95
|
+
base.guest_capability('suse', 'bindfs_bindfs_install_version') { Capabilities::Suse::Bindfs }
|
96
|
+
|
97
|
+
base.guest_capability('darwin', 'bindfs_bindfs_install_compilation_requirements') { Capabilities::Darwin::Bindfs }
|
98
|
+
base.guest_capability('debian', 'bindfs_bindfs_install_compilation_requirements') { Capabilities::Debian::Bindfs }
|
99
|
+
base.guest_capability('redhat', 'bindfs_bindfs_install_compilation_requirements') { Capabilities::RedHat::Bindfs }
|
100
|
+
base.guest_capability('suse', 'bindfs_bindfs_install_compilation_requirements') { Capabilities::Suse::Bindfs }
|
101
|
+
|
102
|
+
base.guest_capability('darwin', 'bindfs_bindfs_install_from_source') { Capabilities::All::Bindfs }
|
103
|
+
base.guest_capability('linux', 'bindfs_bindfs_install_from_source') { Capabilities::All::Bindfs }
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|