vagrant-sshfs 1.3.4 → 1.3.5
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/Gemfile +1 -1
- data/lib/vagrant-sshfs/cap/guest/centos/sshfs_client.rb +38 -0
- data/lib/vagrant-sshfs/cap/guest/redhat/sshfs_client.rb +14 -29
- data/lib/vagrant-sshfs/plugin.rb +10 -0
- data/lib/vagrant-sshfs/version.rb +1 -1
- data/test/misc/Vagrantfile +2 -2
- data/test/misc/dotests.sh +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6513280765fd1bba7182361d9f45354f46bf094d4880da5aa53f37f25fdaab3b
|
4
|
+
data.tar.gz: 8eda8064052fca6390542acf1ce1a63aa98e04f4c69e8c9a66ff197cc868efcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7541dfccd42e153b37da97bc8d84427ca0c87674b0d2333861d98fb946b4ca3847d9c51ac0bb511525207554b21c075a9e22bba3fd6699f03737d877abad24d
|
7
|
+
data.tar.gz: 2e494e523004ded8fcd6644bcdf951728a534110df6d898a2fd55350f7df64842ac089483783c2433d76c4478e30e9185fbde16fff7280a09675749f47da4385
|
data/Gemfile
CHANGED
@@ -6,7 +6,7 @@ group :development do
|
|
6
6
|
# We depend on Vagrant for development, but we don't add it as a
|
7
7
|
# gem dependency because we expect to be installed within the
|
8
8
|
# Vagrant environment itself using `vagrant plugin`.
|
9
|
-
gem "vagrant", :git => "https://github.com/mitchellh/vagrant.git", :ref => 'v2.2.
|
9
|
+
gem "vagrant", :git => "https://github.com/mitchellh/vagrant.git", :ref => 'v2.2.9'
|
10
10
|
end
|
11
11
|
|
12
12
|
group :plugins do
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module GuestCentOS
|
3
|
+
module Cap
|
4
|
+
class SSHFSClient
|
5
|
+
def self.sshfs_install(machine)
|
6
|
+
|
7
|
+
case machine.guest.capability("flavor")
|
8
|
+
when :centos_8
|
9
|
+
# No need to install epel. fuse-sshfs comes from the PowerTools repo
|
10
|
+
# https://bugzilla.redhat.com/show_bug.cgi?id=1758884
|
11
|
+
machine.communicate.sudo("yum -y install --enablerepo=PowerTools fuse-sshfs")
|
12
|
+
when :centos_7, :centos # centos7 and centos6
|
13
|
+
# Install fuse-sshfs from epel
|
14
|
+
if !epel_installed(machine)
|
15
|
+
epel_install(machine)
|
16
|
+
end
|
17
|
+
machine.communicate.sudo("yum -y install fuse-sshfs")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.sshfs_installed(machine)
|
22
|
+
machine.communicate.test("rpm -q fuse-sshfs")
|
23
|
+
end
|
24
|
+
|
25
|
+
protected
|
26
|
+
|
27
|
+
def self.epel_installed(machine)
|
28
|
+
machine.communicate.test("rpm -q epel-release")
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.epel_install(machine)
|
32
|
+
machine.communicate.sudo("yum -y install epel-release")
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -4,19 +4,16 @@ module VagrantPlugins
|
|
4
4
|
class SSHFSClient
|
5
5
|
def self.sshfs_install(machine)
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
# Handle the case where Vagrant doesn't yet know how to
|
10
|
-
# detect and return :rhel_8 https://github.com/hashicorp/vagrant/pull/11453
|
11
|
-
if Gem::Version.new(Vagrant::VERSION) < Gem::Version.new('2.2.8')
|
12
|
-
rhel_version = vagrant_lt_228_flavor_compat(machine)
|
13
|
-
end
|
14
|
-
|
15
|
-
case rhel_version
|
7
|
+
case machine.guest.capability("flavor")
|
16
8
|
when :rhel_8
|
17
|
-
#
|
18
|
-
#
|
19
|
-
|
9
|
+
# fuse-sshfs isn't in EPEL8 and how to get it from RHEL repos
|
10
|
+
# without having to have the system subscribed is unclear:
|
11
|
+
# https://github.com/dustymabe/vagrant-sshfs/issues/108#issuecomment-601061947
|
12
|
+
# Using fuse-sshfs from EPEL7 works for now so let's just go with it.
|
13
|
+
# Do the install in such a way that the epel7 repo doesn't hang around
|
14
|
+
# on the system, which may have unintended consequences on RHEL8.
|
15
|
+
machine.communicate.sudo("rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7")
|
16
|
+
machine.communicate.sudo("yum -y install fuse-sshfs --repofrompath=epel7,'http://download.fedoraproject.org/pub/epel/7/$basearch'")
|
20
17
|
when :rhel_7, :rhel # rhel7 and rhel6
|
21
18
|
# Install fuse-sshfs from epel
|
22
19
|
if !epel_installed(machine)
|
@@ -37,23 +34,11 @@ module VagrantPlugins
|
|
37
34
|
end
|
38
35
|
|
39
36
|
def self.epel_install(machine)
|
40
|
-
machine.
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
# vagrant versions that didn't include:
|
46
|
-
# https://github.com/hashicorp/vagrant/pull/11453
|
47
|
-
output = ""
|
48
|
-
machine.communicate.sudo("cat /etc/redhat-release") do |_, data|
|
49
|
-
output = data
|
50
|
-
end
|
51
|
-
if output =~ /(CentOS|Red Hat Enterprise|Scientific|Cloud|Virtuozzo)\s*Linux( .+)? release 8/i
|
52
|
-
return :rhel_8
|
53
|
-
elsif output =~ /(CentOS|Red Hat Enterprise|Scientific|Cloud|Virtuozzo)\s*Linux( .+)? release 7/i
|
54
|
-
return :rhel_7
|
55
|
-
else
|
56
|
-
return :rhel
|
37
|
+
case machine.guest.capability("flavor")
|
38
|
+
when :rhel_7
|
39
|
+
machine.communicate.sudo("rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm")
|
40
|
+
when :rhel # rhel6
|
41
|
+
machine.communicate.sudo("rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm")
|
57
42
|
end
|
58
43
|
end
|
59
44
|
end
|
data/lib/vagrant-sshfs/plugin.rb
CHANGED
@@ -97,6 +97,16 @@ module VagrantPlugins
|
|
97
97
|
VagrantPlugins::GuestRedHat::Cap::SSHFSClient
|
98
98
|
end
|
99
99
|
|
100
|
+
guest_capability("centos", "sshfs_installed") do
|
101
|
+
require_relative "cap/guest/centos/sshfs_client"
|
102
|
+
VagrantPlugins::GuestCentOS::Cap::SSHFSClient
|
103
|
+
end
|
104
|
+
|
105
|
+
guest_capability("centos", "sshfs_install") do
|
106
|
+
require_relative "cap/guest/centos/sshfs_client"
|
107
|
+
VagrantPlugins::GuestCentOS::Cap::SSHFSClient
|
108
|
+
end
|
109
|
+
|
100
110
|
guest_capability("fedora", "sshfs_installed") do
|
101
111
|
require_relative "cap/guest/fedora/sshfs_client"
|
102
112
|
VagrantPlugins::GuestFedora::Cap::SSHFSClient
|
data/test/misc/Vagrantfile
CHANGED
@@ -8,7 +8,7 @@ Vagrant.configure(2) do |config|
|
|
8
8
|
|
9
9
|
# Test a forward mount to a location that is a symbolic link
|
10
10
|
# https://github.com/dustymabe/vagrant-sshfs/issues/44
|
11
|
-
config.vm.synced_folder "/etc/", "/
|
11
|
+
config.vm.synced_folder "/etc/", "/var/run/forward_slave_mount_sym_link_test/", type: "sshfs"
|
12
12
|
|
13
13
|
# Test a forward normal mount:
|
14
14
|
# mounting a folder from a 3rd party host into guest
|
@@ -22,7 +22,7 @@ Vagrant.configure(2) do |config|
|
|
22
22
|
config.vm.synced_folder "/tmp/reverse_mount_etc/", "/etc", type: "sshfs", reverse: true
|
23
23
|
|
24
24
|
host = 'sshfs-tests'
|
25
|
-
box = 'fedora/
|
25
|
+
box = 'fedora/32-cloud-base'
|
26
26
|
|
27
27
|
config.vm.define host do | tmp |
|
28
28
|
tmp.vm.hostname = host
|
data/test/misc/dotests.sh
CHANGED
@@ -8,7 +8,7 @@ vagrant ssh -- cat /tmp/forward_slave_mount_etc/machine-id
|
|
8
8
|
|
9
9
|
# https://github.com/dustymabe/vagrant-sshfs/issues/44
|
10
10
|
echo -en "Testing slave forward mount with a symlink!\n\t"
|
11
|
-
vagrant ssh -- cat /
|
11
|
+
vagrant ssh -- cat /run/forward_slave_mount_sym_link_test/machine-id
|
12
12
|
|
13
13
|
echo -en "Testing normal forward mount!\n\t"
|
14
14
|
vagrant ssh -- cat /tmp/forward_normal_mount_etc/machine-id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-sshfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dusty Mabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: win32-process
|
@@ -71,6 +71,7 @@ files:
|
|
71
71
|
- lib/vagrant-sshfs/action_hostpath_fixup.rb
|
72
72
|
- lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb
|
73
73
|
- lib/vagrant-sshfs/cap/guest/arch/sshfs_client.rb
|
74
|
+
- lib/vagrant-sshfs/cap/guest/centos/sshfs_client.rb
|
74
75
|
- lib/vagrant-sshfs/cap/guest/debian/sshfs_client.rb
|
75
76
|
- lib/vagrant-sshfs/cap/guest/fedora/sshfs_client.rb
|
76
77
|
- lib/vagrant-sshfs/cap/guest/freebsd/sshfs_client.rb
|