vagrant-sshfs 1.3.1 → 1.3.6
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 +5 -5
- data/Gemfile +2 -3
- data/README.adoc +3 -6
- data/RELEASE.txt +31 -30
- data/Rakefile +0 -10
- data/build.sh +43 -0
- data/lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb +24 -0
- data/lib/vagrant-sshfs/cap/guest/centos/sshfs_client.rb +39 -0
- data/lib/vagrant-sshfs/cap/guest/linux/sshfs_forward_mount.rb +2 -2
- data/lib/vagrant-sshfs/cap/guest/redhat/sshfs_client.rb +17 -6
- data/lib/vagrant-sshfs/cap/host/darwin/sshfs_reverse_mount.rb +1 -1
- data/lib/vagrant-sshfs/cap/host/linux/sshfs_reverse_mount.rb +1 -1
- data/lib/vagrant-sshfs/plugin.rb +20 -0
- data/lib/vagrant-sshfs/synced_folder.rb +2 -1
- data/lib/vagrant-sshfs/version.rb +1 -1
- data/test/misc/README.txt +12 -1
- data/test/misc/Vagrantfile +3 -3
- data/test/misc/dotests.sh +1 -1
- data/vagrant-sshfs.gemspec +0 -3
- metadata +9 -65
- data/features/README.md +0 -21
- data/features/sshfs_cwd_mount.feature +0 -46
- data/features/step_definitions/sshfs_cwd_mount_steps.rb +0 -12
- data/features/support/env.rb +0 -27
- data/test/libvirt/README.txt +0 -23
- data/test/libvirt/Vagrantfile +0 -35
- data/test/virtualbox/README.txt +0 -25
- data/test/virtualbox/Vagrantfile +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 67c5b84b4c824dd5ddedd3971d74d64cd565b0343333f3dfe3c314e2d1714c5a
|
4
|
+
data.tar.gz: f62e9fedb4e7944b87b5ce64b64df2c9b0e155dc72a8bf4d8a087da3f2319a11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 789c76020230299d03c670b595b4726c2143168c8dd3da1410d64356e81db7a8bb9b85875499b5221e1ef269affba39a7dd00c231dd197fcda201ca2dffcd41c
|
7
|
+
data.tar.gz: 9437171f5eebd043e06f500d3d2007a4c61b0bcfbaee03069b15eef77f06e36d749e17954695e04af7375c1be57385fba0842bb585a5769ac32d2d774efd57a0
|
data/Gemfile
CHANGED
@@ -6,12 +6,11 @@ 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.
|
9
|
+
gem "vagrant", :git => "https://github.com/mitchellh/vagrant.git", :ref => 'v2.2.16'
|
10
10
|
end
|
11
11
|
|
12
12
|
group :plugins do
|
13
|
-
gem "vagrant-sshfs" , path: "."
|
14
13
|
# Add vagrant-libvirt plugin here, otherwise you won't be able to
|
15
14
|
# use libvirt as a provider when you execute `bundle exec vagrant up`
|
16
|
-
gem "vagrant-libvirt" , '0.
|
15
|
+
gem "vagrant-libvirt" , '0.4.1'
|
17
16
|
end
|
data/README.adoc
CHANGED
@@ -33,6 +33,9 @@ exists on Linux/Mac. On windows you only need to install
|
|
33
33
|
https://cygwin.com/cgi-bin2/package-grep.cgi?grep=openssh&arch=x86_64[openssh]
|
34
34
|
via https://cygwin.com/[cygwin] and you will get `sftp-server`.
|
35
35
|
|
36
|
+
Also, we recommend running vagrant from the cygwin provided terminal. There have
|
37
|
+
been issues with other shells leading to problems with mounts.
|
38
|
+
|
36
39
|
|
37
40
|
[[history]]
|
38
41
|
== History
|
@@ -290,12 +293,6 @@ test and install this plugin on your local machine:
|
|
290
293
|
# Install development dependencies
|
291
294
|
$ gem install bundler && bundle install
|
292
295
|
|
293
|
-
# List available Rake tasks
|
294
|
-
$ bundle exec rake -T
|
295
|
-
|
296
|
-
# Run Cucumber tests
|
297
|
-
$ bundle exec rake featuretests
|
298
|
-
|
299
296
|
# Build the gem (gets generated in the 'pkg' directory
|
300
297
|
$ bundle exec rake build
|
301
298
|
|
data/RELEASE.txt
CHANGED
@@ -1,58 +1,59 @@
|
|
1
1
|
|
2
|
+
# point local system to git for vagrant-sshfs
|
3
|
+
- cd /usr/share/vagrant/gems/gems
|
4
|
+
- sudo mv vagrant-sshfs-1.3.3 vsshfs133
|
5
|
+
- sudo ln -s /var/b/shared/code/github.com/dustymabe/vagrant-sshfs ./vagrant-sshfs-1.3.3
|
2
6
|
|
3
|
-
# Run
|
4
|
-
cd /
|
5
|
-
vagrant up
|
7
|
+
# Run misc tests
|
8
|
+
cd /var/b/shared/code/github.com/dustymabe/vagrant-sshfs/test/misc
|
6
9
|
follow README for running tests
|
7
10
|
|
8
11
|
# Make sure to bump version in lib/vagrant-sshfs/version.rb and commit
|
9
12
|
# DO NOT TAG YET
|
10
13
|
|
14
|
+
# Craft a commit message for the tag.
|
15
|
+
LASTTAG='v1.3.1'
|
16
|
+
VERSION='1.3.2'
|
17
|
+
NEWTAG="v${VERSION}"
|
18
|
+
cat <<EOF > release-notes.txt
|
19
|
+
This is release ${NEWTAG} of the vagrant-sshfs plugin.
|
11
20
|
|
12
|
-
|
13
|
-
a previous tag by running: git tag -l -n100 v1.2.1
|
21
|
+
Thanks to the following contributors for patches during this release:
|
14
22
|
|
15
|
-
|
16
|
-
|
17
|
-
and
|
18
|
-
git log --no-merges --pretty=format:"%h - %ae - %s"
|
19
|
-
|
20
|
-
|
21
|
-
-> In vim add commit log - grab with
|
22
|
-
git log --no-merges --pretty=format:"%h %s"
|
23
|
-
|
24
|
-
-> In vim add release message - see previous tag for example
|
23
|
+
$(git shortlog --no-merges --pretty=format:"%h %s" -e ${LASTTAG}..HEAD)
|
24
|
+
EOF
|
25
25
|
|
26
26
|
# After crafting message then install git-evtag and sign
|
27
27
|
|
28
|
-
git-evtag sign
|
28
|
+
git-evtag sign ${NEWTAG}
|
29
29
|
|
30
30
|
|
31
31
|
close and type in password for signing
|
32
32
|
|
33
|
-
verify with git-evtag verify
|
34
|
-
verify with git verify-tag
|
33
|
+
verify with git-evtag verify ${NEWTAG}
|
34
|
+
verify with git verify-tag ${NEWTAG}
|
35
35
|
|
36
36
|
git push
|
37
37
|
git push --tags
|
38
38
|
|
39
|
-
# Build with
|
40
|
-
|
39
|
+
# Build with build.sh script (uses buildah)
|
40
|
+
# We must run it in a buildah unshare session. Otherwise we get the error:
|
41
|
+
#
|
42
|
+
# ++ buildah mount fedora-working-container
|
43
|
+
# cannot mount using driver overlay in rootless mode. You need to run it in a `buildah unshare` session
|
44
|
+
buildah unshare ./build.sh
|
41
45
|
|
42
|
-
# Sign the output
|
43
|
-
|
44
|
-
$ ls pkg/vagrant-sshfs-1.2.0.gem*
|
45
|
-
pkg/vagrant-sshfs-1.2.0.gem pkg/vagrant-sshfs-1.2.0.gem.asc
|
46
|
+
# Sign the output (This will create a .asc file)
|
47
|
+
gpg2 --armor --detach-sign ./vagrant-sshfs-${VERSION}.gem
|
46
48
|
|
47
49
|
# make tar.gz and zip files
|
48
|
-
git archive --format=tar.gz
|
49
|
-
|
50
|
-
git archive --format=zip
|
51
|
-
|
50
|
+
git archive --format=tar.gz ${NEWTAG} > vagrant-sshfs-${VERSION}.tar.gz
|
51
|
+
gpg2 --armor --detach-sign vagrant-sshfs-${VERSION}.tar.gz
|
52
|
+
git archive --format=zip ${NEWTAG} > vagrant-sshfs-${VERSION}.zip
|
53
|
+
gpg2 --armor --detach-sign vagrant-sshfs-${VERSION}.zip
|
52
54
|
|
53
55
|
|
54
56
|
# Update release notes and upload files on github
|
55
57
|
|
56
58
|
# push to rubygems with:
|
57
|
-
gem push
|
58
|
-
|
59
|
+
gem push ./vagrant-sshfs-${VERSION}.gem
|
data/Rakefile
CHANGED
@@ -7,9 +7,6 @@
|
|
7
7
|
#
|
8
8
|
require 'bundler/gem_tasks'
|
9
9
|
|
10
|
-
# cucumber/rake/task provides us with an easy way to call cucumber
|
11
|
-
require 'cucumber/rake/task'
|
12
|
-
|
13
10
|
# rake/clean provides CLEAN/CLOBBER
|
14
11
|
# http://www.virtuouscode.com/2014/04/28/rake-part-6-clean-and-clobber/
|
15
12
|
# CLEAN - list to let rake know what files can be cleaned up after build
|
@@ -29,10 +26,3 @@ CLOBBER.include('pkg')
|
|
29
26
|
task :init do
|
30
27
|
FileUtils.mkdir_p 'build'
|
31
28
|
end
|
32
|
-
|
33
|
-
# Create new Cucumber::Rake::Task that will run Cucumber tests
|
34
|
-
Cucumber::Rake::Task.new(:featuretests)
|
35
|
-
|
36
|
-
# Define Rake::Task dependency - run :init before :featuretests
|
37
|
-
task :featuretests => :init
|
38
|
-
|
data/build.sh
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/bin/bash -x
|
2
|
+
set -ex
|
3
|
+
|
4
|
+
ctr=$(buildah from registry.fedoraproject.org/fedora:33)
|
5
|
+
|
6
|
+
rpms=(
|
7
|
+
make gcc ruby ruby-devel redhat-rpm-config # for building gems
|
8
|
+
gcc-c++ # for building unf_ext
|
9
|
+
libvirt-devel # for building ruby-libvirt gem
|
10
|
+
zlib-devel # for building nokogiri gem
|
11
|
+
git # for the git ls-files in gemspec file
|
12
|
+
bsdtar # used by vagrant to unpack box files
|
13
|
+
)
|
14
|
+
|
15
|
+
WORKINGDIR='/tmp/workingdir/'
|
16
|
+
|
17
|
+
# Set working directory
|
18
|
+
buildah config --workingdir $WORKINGDIR $ctr
|
19
|
+
|
20
|
+
# Get all updates and install needed rpms
|
21
|
+
buildah run $ctr -- dnf update -y
|
22
|
+
buildah run $ctr -- dnf install -y ${rpms[@]}
|
23
|
+
|
24
|
+
# Add source code
|
25
|
+
buildah add $ctr './' $WORKINGDIR
|
26
|
+
|
27
|
+
# Install bundler
|
28
|
+
buildah run $ctr -- gem install bundler
|
29
|
+
|
30
|
+
# Install all needed gems
|
31
|
+
buildah run $ctr -- bundle install --with plugins
|
32
|
+
|
33
|
+
# Install all needed gems
|
34
|
+
buildah run $ctr -- bundle exec rake build
|
35
|
+
|
36
|
+
# Copy built files outside of container
|
37
|
+
mount=$(buildah mount $ctr)
|
38
|
+
package=$(ls $mount/$WORKINGDIR/pkg/vagrant-sshfs-*gem)
|
39
|
+
echo "copying to ./$(basename $package)"
|
40
|
+
cp $package ./
|
41
|
+
buildah umount $ctr
|
42
|
+
|
43
|
+
echo "Built package is at ./$(basename $package)"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module GuestAlpine
|
3
|
+
module Cap
|
4
|
+
class SSHFSClient
|
5
|
+
def self.sshfs_install(machine)
|
6
|
+
# Install sshfs
|
7
|
+
machine.communicate.sudo("apk add sshfs")
|
8
|
+
# Load the fuse module
|
9
|
+
machine.communicate.sudo("modprobe fuse")
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.sshfs_installed(machine)
|
13
|
+
installed = machine.communicate.test("apk -e info sshfs")
|
14
|
+
if installed
|
15
|
+
# fuse may not get loaded at boot, so check if it's loaded otherwise force load it
|
16
|
+
machine.communicate.sudo("lsmod | grep fuse || modprobe fuse")
|
17
|
+
end
|
18
|
+
|
19
|
+
installed
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,39 @@
|
|
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
|
+
# https://github.com/dustymabe/vagrant-sshfs/issues/123
|
12
|
+
machine.communicate.sudo("yum -y install --enablerepo=powertools fuse-sshfs")
|
13
|
+
when :centos_7, :centos # centos7 and centos6
|
14
|
+
# Install fuse-sshfs from epel
|
15
|
+
if !epel_installed(machine)
|
16
|
+
epel_install(machine)
|
17
|
+
end
|
18
|
+
machine.communicate.sudo("yum -y install fuse-sshfs")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.sshfs_installed(machine)
|
23
|
+
machine.communicate.test("rpm -q fuse-sshfs")
|
24
|
+
end
|
25
|
+
|
26
|
+
protected
|
27
|
+
|
28
|
+
def self.epel_installed(machine)
|
29
|
+
machine.communicate.test("rpm -q epel-release")
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.epel_install(machine)
|
33
|
+
machine.communicate.sudo("yum -y install epel-release")
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -288,8 +288,8 @@ module VagrantPlugins
|
|
288
288
|
:thread_inherit => true,
|
289
289
|
:startup_info => {:stdin => w1, :stdout => r2, :stderr => f2})
|
290
290
|
else
|
291
|
-
p1 = spawn(sftp_server_cmd, :out => w2, :in => r1, :err => f1, :pgroup => true)
|
292
|
-
p2 = spawn(ssh_cmd, :out => w1, :in => r2, :err => f2, :pgroup => true)
|
291
|
+
p1 = spawn(sftp_server_cmd, :out => w2, :in => r1, :err => f1, :pgroup => true, :close_others => true)
|
292
|
+
p2 = spawn(ssh_cmd, :out => w1, :in => r2, :err => f2, :pgroup => true, :close_others => true)
|
293
293
|
|
294
294
|
# Detach from the processes so they will keep running
|
295
295
|
Process.detach(p1)
|
@@ -3,13 +3,24 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
class SSHFSClient
|
5
5
|
def self.sshfs_install(machine)
|
6
|
-
# Install epel rpm if not installed
|
7
|
-
if !epel_installed(machine)
|
8
|
-
epel_install(machine)
|
9
|
-
end
|
10
6
|
|
11
|
-
|
12
|
-
|
7
|
+
case machine.guest.capability("flavor")
|
8
|
+
when :rhel_8
|
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'")
|
17
|
+
when :rhel_7, :rhel # rhel7 and rhel6
|
18
|
+
# Install fuse-sshfs from epel
|
19
|
+
if !epel_installed(machine)
|
20
|
+
epel_install(machine)
|
21
|
+
end
|
22
|
+
machine.communicate.sudo("yum -y install fuse-sshfs")
|
23
|
+
end
|
13
24
|
end
|
14
25
|
|
15
26
|
def self.sshfs_installed(machine)
|
@@ -120,7 +120,7 @@ module VagrantPlugins
|
|
120
120
|
:thread_inherit => true,
|
121
121
|
:startup_info => {:stdin => w2, :stdout => r1, :stderr => f1})
|
122
122
|
else
|
123
|
-
p1 = spawn(sshfs_cmd, :out => f1, :err => f1, :pgroup => true)
|
123
|
+
p1 = spawn(sshfs_cmd, :out => f1, :err => f1, :pgroup => true, :close_others => true)
|
124
124
|
Process.detach(p1) # Detach so process will keep running
|
125
125
|
end
|
126
126
|
|
@@ -117,7 +117,7 @@ module VagrantPlugins
|
|
117
117
|
:thread_inherit => true,
|
118
118
|
:startup_info => {:stdin => w2, :stdout => r1, :stderr => f1})
|
119
119
|
else
|
120
|
-
p1 = spawn(sshfs_cmd, :out => f1, :err => f1, :pgroup => true)
|
120
|
+
p1 = spawn(sshfs_cmd, :out => f1, :err => f1, :pgroup => true, :close_others => true)
|
121
121
|
Process.detach(p1) # Detach so process will keep running
|
122
122
|
end
|
123
123
|
|
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
|
@@ -127,6 +137,16 @@ module VagrantPlugins
|
|
127
137
|
VagrantPlugins::GuestArch::Cap::SSHFSClient
|
128
138
|
end
|
129
139
|
|
140
|
+
guest_capability("alpine", "sshfs_installed") do
|
141
|
+
require_relative "cap/guest/alpine/sshfs_client"
|
142
|
+
VagrantPlugins::GuestAlpine::Cap::SSHFSClient
|
143
|
+
end
|
144
|
+
|
145
|
+
guest_capability("alpine", "sshfs_install") do
|
146
|
+
require_relative "cap/guest/alpine/sshfs_client"
|
147
|
+
VagrantPlugins::GuestAlpine::Cap::SSHFSClient
|
148
|
+
end
|
149
|
+
|
130
150
|
guest_capability("suse", "sshfs_installed") do
|
131
151
|
require_relative "cap/guest/suse/sshfs_client"
|
132
152
|
VagrantPlugins::GuestSUSE::Cap::SSHFSClient
|
@@ -110,10 +110,11 @@ module VagrantPlugins
|
|
110
110
|
ENV['PATH'] += ';C:\cygwin64\usr\sbin'
|
111
111
|
end
|
112
112
|
else
|
113
|
+
ENV['PATH'] += ':/usr/libexec/ssh' # Linux (openSUSE/SUSE Family)
|
113
114
|
ENV['PATH'] += ':/usr/libexec/openssh' # Linux (Red Hat Family)
|
114
115
|
ENV['PATH'] += ':/usr/lib/openssh' # Linux (Debian Family)
|
115
116
|
ENV['PATH'] += ':/usr/lib/ssh' # Linux (Arch Linux Family)
|
116
|
-
ENV['PATH'] += ':/usr/
|
117
|
+
ENV['PATH'] += ':/usr/lib64/misc' # Linux (Gentoo Family)
|
117
118
|
ENV['PATH'] += ':/usr/libexec/' # Mac OS X
|
118
119
|
end
|
119
120
|
|
data/test/misc/README.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# This directory is for testing the three different mount modes
|
3
3
|
# that are supported by vagrant-sshfs
|
4
4
|
|
5
|
-
# To test we will first create the directory on the
|
5
|
+
# To test we will first create the directory on the machine where
|
6
6
|
# we will mount the guest /etc/ into the host (the reverse mount).
|
7
7
|
|
8
8
|
mkdir /tmp/reverse_mount_etc
|
@@ -13,6 +13,11 @@ export THIRD_PARTY_HOST='192.168.121.73'
|
|
13
13
|
export THIRD_PARTY_HOST_USER='vagrant'
|
14
14
|
export THIRD_PARTY_HOST_PASS='vagrant'
|
15
15
|
|
16
|
+
# Open an extra file descriptor to test it is not passed onto child processes
|
17
|
+
# https://github.com/dustymabe/vagrant-sshfs/issues/120
|
18
|
+
tmpfile=$(mktemp)
|
19
|
+
exec {extra_fd}<> "$tmpfile"
|
20
|
+
|
16
21
|
# Next vagrant up - will do 4 mounts
|
17
22
|
# - slave
|
18
23
|
# - slave with sym link
|
@@ -34,3 +39,9 @@ Testing reverse mount!
|
|
34
39
|
# We are printing out the machine-id under each mount. The first two
|
35
40
|
should be the same, because they are from the same machine. The last
|
36
41
|
two should be different.
|
42
|
+
|
43
|
+
# Close our file descriptor. No other process should be using it
|
44
|
+
exec {extra_fd}>&-
|
45
|
+
if lsof -wn -d $extra_fd | grep "$tmpfile"; then
|
46
|
+
echo "Failure: there are processes running that hold an inherited file descriptor"
|
47
|
+
fi
|
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
|
@@ -21,8 +21,8 @@ Vagrant.configure(2) do |config|
|
|
21
21
|
# mounting /etc/ from vagrant guest into vagrant host
|
22
22
|
config.vm.synced_folder "/tmp/reverse_mount_etc/", "/etc", type: "sshfs", reverse: true
|
23
23
|
|
24
|
-
host = '
|
25
|
-
box = 'fedora/
|
24
|
+
host = 'sshfs-tests'
|
25
|
+
box = 'fedora/34-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
|
data/vagrant-sshfs.gemspec
CHANGED
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dusty Mabe
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: win32-process
|
@@ -52,48 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: cucumber
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: aruba
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: komenda
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
55
|
description: "\n A Vagrant synced folder plugin that mounts folders via SSHFS.
|
98
56
|
\n This is the successor to Fabio Kreusch's implementation:\n https://github.com/fabiokr/vagrant-sshfs"
|
99
57
|
email:
|
@@ -108,13 +66,12 @@ files:
|
|
108
66
|
- README.adoc
|
109
67
|
- RELEASE.txt
|
110
68
|
- Rakefile
|
111
|
-
-
|
112
|
-
- features/sshfs_cwd_mount.feature
|
113
|
-
- features/step_definitions/sshfs_cwd_mount_steps.rb
|
114
|
-
- features/support/env.rb
|
69
|
+
- build.sh
|
115
70
|
- lib/vagrant-sshfs.rb
|
116
71
|
- lib/vagrant-sshfs/action_hostpath_fixup.rb
|
72
|
+
- lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb
|
117
73
|
- lib/vagrant-sshfs/cap/guest/arch/sshfs_client.rb
|
74
|
+
- lib/vagrant-sshfs/cap/guest/centos/sshfs_client.rb
|
118
75
|
- lib/vagrant-sshfs/cap/guest/debian/sshfs_client.rb
|
119
76
|
- lib/vagrant-sshfs/cap/guest/fedora/sshfs_client.rb
|
120
77
|
- lib/vagrant-sshfs/cap/guest/freebsd/sshfs_client.rb
|
@@ -134,19 +91,15 @@ files:
|
|
134
91
|
- lib/vagrant-sshfs/synced_folder/sshfs_reverse_mount.rb
|
135
92
|
- lib/vagrant-sshfs/version.rb
|
136
93
|
- locales/synced_folder_sshfs.yml
|
137
|
-
- test/libvirt/README.txt
|
138
|
-
- test/libvirt/Vagrantfile
|
139
94
|
- test/misc/README.txt
|
140
95
|
- test/misc/Vagrantfile
|
141
96
|
- test/misc/dotests.sh
|
142
|
-
- test/virtualbox/README.txt
|
143
|
-
- test/virtualbox/Vagrantfile
|
144
97
|
- vagrant-sshfs.gemspec
|
145
98
|
homepage: https://github.com/dustymabe/vagrant-sshfs
|
146
99
|
licenses:
|
147
100
|
- GPL-2.0
|
148
101
|
metadata: {}
|
149
|
-
post_install_message:
|
102
|
+
post_install_message:
|
150
103
|
rdoc_options: []
|
151
104
|
require_paths:
|
152
105
|
- lib
|
@@ -161,21 +114,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
114
|
- !ruby/object:Gem::Version
|
162
115
|
version: '0'
|
163
116
|
requirements: []
|
164
|
-
|
165
|
-
|
166
|
-
signing_key:
|
117
|
+
rubygems_version: 3.1.6
|
118
|
+
signing_key:
|
167
119
|
specification_version: 4
|
168
120
|
summary: 'A Vagrant synced folder plugin that mounts folders via SSHFS. This is the
|
169
121
|
successor to Fabio Kreusch''s implementation: https://github.com/fabiokr/vagrant-sshfs'
|
170
122
|
test_files:
|
171
|
-
- features/README.md
|
172
|
-
- features/sshfs_cwd_mount.feature
|
173
|
-
- features/step_definitions/sshfs_cwd_mount_steps.rb
|
174
|
-
- features/support/env.rb
|
175
|
-
- test/libvirt/README.txt
|
176
|
-
- test/libvirt/Vagrantfile
|
177
123
|
- test/misc/README.txt
|
178
124
|
- test/misc/Vagrantfile
|
179
125
|
- test/misc/dotests.sh
|
180
|
-
- test/virtualbox/README.txt
|
181
|
-
- test/virtualbox/Vagrantfile
|
data/features/README.md
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
|
2
|
-
We are using Cucumber for automated testing. Read more at the
|
3
|
-
following two links:
|
4
|
-
|
5
|
-
- [link1](https://en.wikipedia.org/wiki/Cucumber_(software))
|
6
|
-
- [link2](http://www.methodsandtools.com/tools/cucumber.php)
|
7
|
-
|
8
|
-
features/
|
9
|
-
This is the features directory. The features directory Contains
|
10
|
-
feature files, which all have a .feature extension. May contain
|
11
|
-
subdirectories to organize feature files.
|
12
|
-
|
13
|
-
features/step_definitions
|
14
|
-
This directory contains step definition files, which are Ruby code
|
15
|
-
and have a .rb extension.
|
16
|
-
|
17
|
-
features/support
|
18
|
-
This directory contains supporting Ruby code. Files in support
|
19
|
-
load before those in step_definitions, which makes it useful for
|
20
|
-
such things as environment configuration (commonly done in a file
|
21
|
-
called env.rb).
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# The language in this file is Gherkin. It is the language Cucumber
|
2
|
-
# uses to define test cases and is designed to be non-technical and
|
3
|
-
# human readable. All Gherkin files have a .feature extension
|
4
|
-
#
|
5
|
-
# See more here: https://en.wikipedia.org/wiki/Cucumber_(software)
|
6
|
-
#
|
7
|
-
# Additionally in the setup/env.rb file we set up Aruba. Aruba is used
|
8
|
-
# to define most of the basic step definitions that we use as part of
|
9
|
-
# the Gherkin syntax in this file.
|
10
|
-
#
|
11
|
-
# For more information on the step definitions provided see:
|
12
|
-
# https://github.com/cucumber/aruba/tree/bb5d7ff71809b5461e29153ded793d2b9a3a0624/features/testing_frameworks/cucumber/steps
|
13
|
-
#
|
14
|
-
Feature: SSHFS mount of vagrant current working directory
|
15
|
-
|
16
|
-
Scenario Outline: SSHFS mounting of vagrant cwd
|
17
|
-
Given a file named "Vagrantfile" with:
|
18
|
-
"""
|
19
|
-
Vagrant.configure('2') do |config|
|
20
|
-
config.vm.box = '<box>'
|
21
|
-
# Disable the default rsync
|
22
|
-
config.vm.synced_folder '.', '/vagrant', disabled: true
|
23
|
-
|
24
|
-
# If using libvirt and nested virt (vagrant in vagrant) then
|
25
|
-
# we need to use a different network than 192.168.121.0
|
26
|
-
config.vm.provider :libvirt do |libvirt|
|
27
|
-
libvirt.management_network_name = 'vagrant-libvirt-test'
|
28
|
-
libvirt.management_network_address = '192.168.129.0/24'
|
29
|
-
end
|
30
|
-
|
31
|
-
# Mount up the current dir. It will have the Vagrantfile in there.
|
32
|
-
config.vm.synced_folder './', '/testdir', type: 'sshfs'
|
33
|
-
end
|
34
|
-
"""
|
35
|
-
When I successfully run `bundle exec vagrant up`
|
36
|
-
Then stdout from "bundle exec vagrant up" should contain "Installing SSHFS client..."
|
37
|
-
And stdout from "bundle exec vagrant up" should contain "Mounting SSHFS shared folder..."
|
38
|
-
And stdout from "bundle exec vagrant up" should contain "Folder Successfully Mounted!"
|
39
|
-
# The code for the following test is in ./step_definitions/sshfs_cwd_mount_steps.rb
|
40
|
-
And vagrant current working directory should be mounted
|
41
|
-
|
42
|
-
Examples:
|
43
|
-
| box |
|
44
|
-
| centos/7 |
|
45
|
-
|
46
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# This is a cucumber step definition. Cucumber scenarios become automated
|
2
|
-
# tests with the addition of what are called step definitions. A step
|
3
|
-
# definition is a block of code associated with one or more steps by a
|
4
|
-
# regular expression (or, in simple cases, a string).
|
5
|
-
#
|
6
|
-
# This is the step definition for the `And vagrant current working
|
7
|
-
# directory should be mounted` step from sshfs_cwd_mount.feature
|
8
|
-
#
|
9
|
-
And(/^vagrant current working directory should be mounted$/) do
|
10
|
-
run("vagrant ssh -c 'ls /testdir/Vagrantfile'")
|
11
|
-
expect(last_command_started).to have_exit_status(0)
|
12
|
-
end
|
data/features/support/env.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# This is a support file for the cucumber tests. This file sets up the
|
2
|
-
# environment for the tests to run. At this point mainly that means
|
3
|
-
# configuring Aruba. Aruba is used to define most of the basic step
|
4
|
-
# definitions that we use as part of the Gherkin syntax in our .feature files.
|
5
|
-
#
|
6
|
-
# For more information on the step definitions provided see:
|
7
|
-
# https://github.com/cucumber/aruba/tree/bb5d7ff71809b5461e29153ded793d2b9a3a0624/features/testing_frameworks/cucumber/steps
|
8
|
-
require 'aruba/cucumber'
|
9
|
-
require 'komenda' # use komenda for easily executing a command
|
10
|
-
|
11
|
-
# Configure aruba. The options can be inferred from here:
|
12
|
-
# https://github.com/cucumber/aruba/tree/bb5d7ff71809b5461e29153ded793d2b9a3a0624/features/configuration
|
13
|
-
Aruba.configure do |config|
|
14
|
-
# Wait up to 300 seconds for the test to run
|
15
|
-
config.exit_timeout = 300
|
16
|
-
# Output stdout and stderr on test failure
|
17
|
-
config.activate_announcer_on_command_failure = [:stdout, :stderr]
|
18
|
-
# The directory where the tests are to be run
|
19
|
-
config.working_directory = 'build/aruba'
|
20
|
-
end
|
21
|
-
|
22
|
-
# After running tests, clean up
|
23
|
-
After do |_scenario|
|
24
|
-
if File.exist?(File.join(aruba.config.working_directory, 'Vagrantfile'))
|
25
|
-
Komenda.run('bundle exec vagrant destroy -f', cwd: aruba.config.working_directory, fail_on_fail: true)
|
26
|
-
end
|
27
|
-
end
|
data/test/libvirt/README.txt
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
|
2
|
-
To bring up vagrant host:
|
3
|
-
|
4
|
-
vagrant up
|
5
|
-
|
6
|
-
To run tests:
|
7
|
-
|
8
|
-
vagrant ssh
|
9
|
-
|
10
|
-
and then:
|
11
|
-
|
12
|
-
cd /sharedfolder/code/github.com/dustymabe/vagrant-sshfs/
|
13
|
-
gem install bundler # see [2]
|
14
|
-
bundle install --with plugins # see [1]
|
15
|
-
bundle exec rake featuretests
|
16
|
-
|
17
|
-
[1] when running with bundler 1.13.2 I had to comment out
|
18
|
-
the vagrant-sshfs line in Gemfile because it errored out
|
19
|
-
complaining about it being defined twice. Running with
|
20
|
-
1.12.5 works fine.
|
21
|
-
[2] because of [1] need to use this instead:
|
22
|
-
gem install bundler --version 1.12.5
|
23
|
-
|
data/test/libvirt/Vagrantfile
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# -*- mode: ruby -*-
|
2
|
-
# vi: set ft=ruby :
|
3
|
-
Vagrant.configure(2) do |config|
|
4
|
-
|
5
|
-
config.ssh.insert_key = 'true'
|
6
|
-
config.vm.synced_folder "/guests/sharedfolder", "/sharedfolder", type: "sshfs"
|
7
|
-
|
8
|
-
config.vm.provider :libvirt do |domain|
|
9
|
-
domain.memory = 4096
|
10
|
-
domain.cpus = 4
|
11
|
-
domain.nested = true
|
12
|
-
end
|
13
|
-
|
14
|
-
host = 'viv-libvirt' # vagrant in vagrant - to test libvirt
|
15
|
-
box = 'fedora/25-cloud-base'
|
16
|
-
|
17
|
-
config.vm.define host do | tmp |
|
18
|
-
tmp.vm.hostname = host
|
19
|
-
tmp.vm.box = box
|
20
|
-
end
|
21
|
-
config.vm.provision "shell", inline: <<-SHELL
|
22
|
-
rpms=(
|
23
|
-
libvirt-daemon-kvm # for vagrant libvirt support
|
24
|
-
make gcc ruby ruby-devel redhat-rpm-config # for building gems
|
25
|
-
gcc-c++ # for building unf_ext
|
26
|
-
libvirt-devel # for building ruby-libvirt gem
|
27
|
-
zlib-devel # for building nokogiri gem
|
28
|
-
git # for the git ls-files in gemspec file
|
29
|
-
bsdtar # used by vagrant to unpack box files
|
30
|
-
)
|
31
|
-
dnf install -y ${rpms[@]}
|
32
|
-
usermod -a -G libvirt vagrant
|
33
|
-
systemctl start libvirtd virtlogd
|
34
|
-
SHELL
|
35
|
-
end
|
data/test/virtualbox/README.txt
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# XXX Note this is not working right now as nested virt. I keep
|
2
|
-
# getting kernel tracebacks on Fedora 24.
|
3
|
-
|
4
|
-
To bring up vagrant host:
|
5
|
-
|
6
|
-
vagrant up
|
7
|
-
|
8
|
-
To run tests:
|
9
|
-
|
10
|
-
vagrant ssh
|
11
|
-
|
12
|
-
and then:
|
13
|
-
|
14
|
-
cd /sharedfolder/code/github.com/dustymabe/vagrant-sshfs/
|
15
|
-
gem install bundler # see [2]
|
16
|
-
bundle install --with plugins # see [1]
|
17
|
-
bundle exec rake featuretests
|
18
|
-
|
19
|
-
[1] when running with bundler 1.13.2 I had to comment out
|
20
|
-
the vagrant-sshfs line in Gemfile because it errored out
|
21
|
-
complaining about it being defined twice. Running with
|
22
|
-
1.12.5 works fine.
|
23
|
-
[2] because of [1] need to use this instead:
|
24
|
-
gem install bundler --version 1.12.5
|
25
|
-
|
data/test/virtualbox/Vagrantfile
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
# -*- mode: ruby -*-
|
2
|
-
# vi: set ft=ruby :
|
3
|
-
#
|
4
|
-
# XXX Note this is not working right now as nested virt. I keep
|
5
|
-
# getting kernel tracebacks on Fedora 24.
|
6
|
-
#
|
7
|
-
Vagrant.configure(2) do |config|
|
8
|
-
|
9
|
-
config.ssh.insert_key = 'true'
|
10
|
-
config.vm.synced_folder "/guests/sharedfolder", "/sharedfolder", type: "sshfs"
|
11
|
-
|
12
|
-
config.vm.provider :libvirt do |domain|
|
13
|
-
domain.memory = 4096
|
14
|
-
domain.cpus = 4
|
15
|
-
domain.nested = true
|
16
|
-
end
|
17
|
-
|
18
|
-
host = 'viv-virtbox' # vagrant in vagrant - to test virtbox
|
19
|
-
box = 'fedora/25-cloud-base'
|
20
|
-
|
21
|
-
config.vm.define host do | tmp |
|
22
|
-
tmp.vm.hostname = host
|
23
|
-
tmp.vm.box = box
|
24
|
-
end
|
25
|
-
# Must use VirtualBox-5.0 - 5.1 not supported by Vagrant yet
|
26
|
-
config.vm.provision "shell", inline: <<-SHELL
|
27
|
-
dnf config-manager --add-repo http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
|
28
|
-
rpms=(
|
29
|
-
kernel-devel-$(uname -r) kernel-headers-$(uname -r)
|
30
|
-
gcc make VirtualBox-5.0 # all for virtualbox support
|
31
|
-
make gcc ruby ruby-devel redhat-rpm-config # for building gems
|
32
|
-
gcc-c++ # for building unf_ext
|
33
|
-
libvirt-devel # for building ruby-libvirt gem
|
34
|
-
zlib-devel # for building nokogiri gem
|
35
|
-
git # for the git ls-files in gemspec file
|
36
|
-
bsdtar # used by vagrant to unpack box files
|
37
|
-
)
|
38
|
-
dnf install -y ${rpms[@]}
|
39
|
-
/usr/lib/virtualbox/vboxdrv.sh setup
|
40
|
-
usermod -a -G vboxusers vagrant
|
41
|
-
SHELL
|
42
|
-
end
|