vagrant-freebsd 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 428ffa64706d752b2369b15a0090d451bb30a5377ad550c78c7799e897fb3240
4
+ data.tar.gz: ede9bbf22e9d8c5b5e7cb4166f823658d4379e5035f3dd84fc0a034f7a0bf428
5
+ SHA512:
6
+ metadata.gz: d489718dfd7246b8457385fe60b753d468e173bff965fd866814bda9a0fd53f3f95ce5762fc26010fd6d781706c1796ce8cf6b9dafa64f50703dd901511a30f6
7
+ data.tar.gz: 82fdc596da5aee3487522c83360f4d53a5b20768308caad99017fbe00aa59378e54c793ea365edecafa8080671ecec0cfe1a591712b1e64ac495cbbe1543a2bf
@@ -0,0 +1,23 @@
1
+ .idea
2
+ *.gem
3
+ *.rbc
4
+ .bundle
5
+ .config
6
+ .yardoc
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
19
+ *.bundle
20
+ *.so
21
+ *.o
22
+ *.a
23
+ mkmf.log
@@ -0,0 +1 @@
1
+ vagrant-freebsd
@@ -0,0 +1 @@
1
+ ruby-2.1.1
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
6
+ - 2.1.1
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in vagrant-freebsd.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Alexander Grynchuk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,26 @@
1
+ # Vagrant-FreeBSD
2
+
3
+ # Description
4
+
5
+ This is a Vagrant plugin for FreeBSD.
6
+ This plugin supports mounting the vagrant directory on FreeBSD.
7
+ Now it supports vmware_desktop provider only.
8
+
9
+ ## Installation
10
+
11
+ Install via Vagrant
12
+
13
+ ```zsh
14
+ $ vagrant plugin install vagrant-freebsd
15
+ ```
16
+
17
+ To install from source code, first build via `rake` and then:
18
+
19
+ ```zsh
20
+ $ vagrant plugin install pkg/vagrant-freebsd-x.x.x.gem
21
+ ```
22
+
23
+
24
+ ## Credits
25
+
26
+ Inspired and based on
@@ -0,0 +1,3 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ task :default => :build
@@ -0,0 +1,2 @@
1
+ require "vagrant-freebsd/version"
2
+ require "vagrant-freebsd/plugin"
@@ -0,0 +1,38 @@
1
+ # Copyright (c) 2020 Olexander Grynchuk
2
+ module Vagrant
3
+ module FreeBSD
4
+ module Cap
5
+ class MountVmwareSharedFolder
6
+
7
+ def self.mount_vmware_shared_folder(machine, name, guestpath, options)
8
+ owner = options[:owner]
9
+ group = options[:group]
10
+ machine.communicate.tap do |comm|
11
+ if owner.is_a? Integer
12
+ mount_uid = owner
13
+ else
14
+ mount_uid = "`id -u #{owner}`"
15
+ end
16
+
17
+ if group.is_a? Integer
18
+ mount_gid = group
19
+ else
20
+ mount_gid = "`id -g #{group}`"
21
+ end
22
+
23
+
24
+ # create guest parent folder if doesn't exist
25
+ parent_guest_path = File.dirname(guestpath)
26
+ if !comm.test("test -d \"#{parent_guest_path}\"", sudo: true)
27
+ comm.sudo("mkdir -p \"#{parent_guest_path}\"")
28
+ end
29
+ #vmhgfs-fuse -o uid=`id -u vagrant`,gid=`id -u vagrant`,allow_other .host:/-workspace #$app_dir
30
+ # Set permissions correctly on the link
31
+ comm.sudo("vmhgfs-fuse -o uid=#{mount_uid},gid=#{mount_gid},allow_other .host:/#{name} \"#{guestpath}\"")
32
+ end
33
+ end
34
+
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,15 @@
1
+ require "vagrant"
2
+
3
+ module Vagrant
4
+ module FreeBSD
5
+ class Plugin < Vagrant.plugin("2")
6
+ name "FreeBSD guest"
7
+ description "FreeBSD guest support."
8
+
9
+ guest_capability("freebsd", "mount_vmware_shared_folder") do
10
+ require_relative "cap/mount_vmware_shared_folder"
11
+ Cap::MountVmwareSharedFolder
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ module Vagrant
2
+ module FreeBSD
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'vagrant-freebsd/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "vagrant-freebsd"
8
+ spec.version = Vagrant::FreeBSD::VERSION
9
+ spec.authors = ["Olexande Grynchuk"]
10
+ spec.email = ["agrynchuk@gmail.com"]
11
+ spec.description = "Guest plugin for Vagrant FreeBSD"
12
+ spec.summary = "Guest plugin for Vagrant FreeBSD"
13
+ spec.homepage = "https://github.com/ph20/vagrant-freebsd"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ # development dependencies
22
+ spec.add_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "rake"
24
+ end
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-freebsd
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Olexande Grynchuk
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-11-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Guest plugin for Vagrant FreeBSD
42
+ email:
43
+ - agrynchuk@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - ".ruby-gemset"
50
+ - ".ruby-version"
51
+ - ".travis.yml"
52
+ - Gemfile
53
+ - LICENSE
54
+ - README.md
55
+ - Rakefile
56
+ - lib/vagrant-freebsd.rb
57
+ - lib/vagrant-freebsd/cap/mount_vmware_shared_folder.rb
58
+ - lib/vagrant-freebsd/plugin.rb
59
+ - lib/vagrant-freebsd/version.rb
60
+ - vagrant-freebsd.gemspec
61
+ homepage: https://github.com/ph20/vagrant-freebsd
62
+ licenses:
63
+ - MIT
64
+ metadata: {}
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ requirements: []
80
+ rubyforge_project:
81
+ rubygems_version: 2.7.6
82
+ signing_key:
83
+ specification_version: 4
84
+ summary: Guest plugin for Vagrant FreeBSD
85
+ test_files: []