vagrant-guest-msys2 0.0.2 → 0.0.3

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
+ SHA1:
3
+ metadata.gz: 3a3f7a4a1d4dbac452c62e24485f0d3e8888eadf
4
+ data.tar.gz: e1f593cbb79a14b3e3093dd065a38d77988e50a8
5
+ SHA512:
6
+ metadata.gz: 71abe576af291dedd846c7771f0c6da3929d268c897659dc2259e070fe5df297576225bb8ab18463c7e70b14bd34f371fc909c01f6fd76f0f259265b36d6eff4
7
+ data.tar.gz: 5051d0bbb50183fcdefc3ec56e9b24c9c9b46e73ebc9ea46e53644b7d5f819fb173cd83e5d7a746cf925aa0dfbca304b1a70ded4620f97a6ce2c229d36fb4056
data/README.md CHANGED
@@ -11,6 +11,9 @@ Implemented capabilities:
11
11
  * https://sourceforge.net/p/msys2/wiki/Porting/#filesystem-namespaces
12
12
  * https://github.com/Alexpux/MSYS2-packages/issues/84
13
13
 
14
+ * `insert_public_key` and `remove_public_key` are inherited from `linux` guest and should be correct
15
+ * `rsync` is unfortunately not yet ready as MSYS2 rsync does not support compression and parameter "-z" is hard-coded in Vagrant code
16
+
14
17
  ### Usage
15
18
 
16
19
  * Build
@@ -0,0 +1,38 @@
1
+ module VagrantPlugins
2
+ module GuestMSYS2
3
+ module Cap
4
+ class RSync
5
+ def self.rsync_installed(machine)
6
+ machine.communicate.test("which rsync")
7
+ end
8
+
9
+ def self.rsync_install(machine)
10
+ machine.communicate.execute(
11
+ 'pacman -S --noconfirm rsync')
12
+ end
13
+
14
+ def self.rsync_command(machine)
15
+ "rsync"
16
+ end
17
+
18
+ def self.rsync_pre(machine, opts)
19
+ machine.communicate.tap do |comm|
20
+ comm.execute("mkdir -p '#{opts[:guestpath]}'")
21
+ end
22
+ end
23
+
24
+ def self.rsync_post(machine, opts)
25
+ if opts.key?(:chown) && !opts[:chown]
26
+ return
27
+ end
28
+
29
+ machine.communicate.execute(
30
+ "find '#{opts[:guestpath]}' " +
31
+ "'!' -type l -a " +
32
+ "'(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
33
+ "xargs -0 -r chown #{opts[:owner]}:#{opts[:group]}")
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -19,7 +19,42 @@ module VagrantPlugins
19
19
  require_relative "cap/halt"
20
20
  Cap::Halt
21
21
  end
22
+
23
+ guest_capability("msys2", "insert_public_key") do
24
+ require Vagrant.source_root.join('plugins/guests/linux/cap/insert_public_key')
25
+ VagrantPlugins::GuestLinux::Cap::InsertPublicKey
26
+ end
27
+
28
+ guest_capability("msys2", "remove_public_key") do
29
+ require Vagrant.source_root.join('plugins/guests/linux/cap/remove_public_key')
30
+ VagrantPlugins::GuestLinux::Cap::RemovePublicKey
31
+ end
22
32
 
33
+ guest_capability("msys2", "rsync_installed") do
34
+ require_relative "cap/rsync"
35
+ Cap::RSync
36
+ end
37
+
38
+ guest_capability("msys2", "rsync_install") do
39
+ require_relative "cap/rsync"
40
+ Cap::RSync
41
+ end
42
+
43
+ guest_capability("msys2", "rsync_command") do
44
+ require_relative "cap/rsync"
45
+ Cap::RSync
46
+ end
47
+
48
+ guest_capability("msys2", "rsync_pre") do
49
+ require_relative "cap/rsync"
50
+ Cap::RSync
51
+ end
52
+
53
+ guest_capability("msys2", "rsync_post") do
54
+ require_relative "cap/rsync"
55
+ Cap::RSync
56
+ end
57
+
23
58
  end
24
59
  end
25
60
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module GuestMSYS2
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-guest-msys2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tobias
@@ -10,10 +9,10 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2016-06-10 00:00:00.000000000 Z
12
+ date: 2016-06-28 00:00:00.000000000 Z
14
13
  dependencies: []
15
- description: ! 'Adds MSYS2 (https://sourceforge.net/p/msys2/wiki/Home/) as a guest
16
- for Vagrant. '
14
+ description: 'Adds MSYS2 (https://sourceforge.net/p/msys2/wiki/Home/) as a guest for
15
+ Vagrant. '
17
16
  email: tsmolka@gmail.com
18
17
  executables: []
19
18
  extensions: []
@@ -22,6 +21,7 @@ files:
22
21
  - lib/vagrant-guest-msys2.rb
23
22
  - lib/vagrant-guest-msys2/plugin.rb
24
23
  - lib/vagrant-guest-msys2/cap/halt.rb
24
+ - lib/vagrant-guest-msys2/cap/rsync.rb
25
25
  - lib/vagrant-guest-msys2/version.rb
26
26
  - lib/vagrant-guest-msys2/guest.rb
27
27
  - Rakefile
@@ -34,26 +34,25 @@ files:
34
34
  homepage: https://github.com/tsmolka/vagrant-guest-msys2
35
35
  licenses:
36
36
  - GPL-2.0
37
+ metadata: {}
37
38
  post_install_message:
38
39
  rdoc_options: []
39
40
  require_paths:
40
41
  - lib
41
42
  required_ruby_version: !ruby/object:Gem::Requirement
42
- none: false
43
43
  requirements:
44
- - - ! '>='
44
+ - - '>='
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  required_rubygems_version: !ruby/object:Gem::Requirement
48
- none: false
49
48
  requirements:
50
- - - ! '>='
49
+ - - '>='
51
50
  - !ruby/object:Gem::Version
52
51
  version: 1.3.6
53
52
  requirements: []
54
53
  rubyforge_project:
55
- rubygems_version: 1.8.23
54
+ rubygems_version: 2.0.14.1
56
55
  signing_key:
57
- specification_version: 3
56
+ specification_version: 4
58
57
  summary: MSYS2 guest for Vagrant
59
58
  test_files: []