vagrant-unbundled 1.8.4.2 → 1.8.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +52 -0
  4. data/Gemfile.lock +9 -7
  5. data/RELEASE.md +37 -14
  6. data/lib/vagrant/action/builtin/box_add.rb +3 -1
  7. data/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb +5 -0
  8. data/lib/vagrant/box_collection.rb +2 -1
  9. data/lib/vagrant/bundler.rb +36 -1
  10. data/lib/vagrant/errors.rb +16 -8
  11. data/lib/vagrant/plugin/state_file.rb +8 -1
  12. data/lib/vagrant/util/platform.rb +1 -1
  13. data/plugins/guests/arch/cap/change_host_name.rb +13 -10
  14. data/plugins/guests/arch/cap/configure_networks.rb +11 -8
  15. data/plugins/guests/arch/cap/nfs.rb +35 -0
  16. data/plugins/guests/arch/cap/rsync.rb +16 -0
  17. data/plugins/guests/arch/cap/smb.rb +17 -0
  18. data/plugins/guests/arch/plugin.rb +28 -3
  19. data/plugins/guests/atomic/cap/change_host_name.rb +13 -10
  20. data/plugins/guests/atomic/plugin.rb +3 -3
  21. data/plugins/guests/{netbsd → bsd}/cap/halt.rb +2 -2
  22. data/plugins/guests/bsd/cap/nfs.rb +49 -0
  23. data/plugins/guests/bsd/cap/public_key.rb +65 -0
  24. data/plugins/guests/bsd/cap/virtualbox.rb +16 -0
  25. data/plugins/guests/bsd/guest.rb +9 -0
  26. data/plugins/guests/bsd/plugin.rb +40 -0
  27. data/plugins/guests/coreos/cap/change_host_name.rb +1 -1
  28. data/plugins/guests/coreos/plugin.rb +4 -4
  29. data/plugins/guests/darwin/cap/change_host_name.rb +4 -1
  30. data/plugins/guests/darwin/cap/configure_networks.rb +12 -5
  31. data/plugins/guests/darwin/cap/halt.rb +3 -1
  32. data/plugins/guests/darwin/cap/rsync.rb +7 -4
  33. data/plugins/guests/darwin/plugin.rb +13 -28
  34. data/plugins/guests/debian/cap/change_host_name.rb +14 -15
  35. data/plugins/guests/debian/cap/configure_networks.rb +2 -6
  36. data/plugins/guests/debian/cap/{nfs_client.rb → nfs.rb} +2 -1
  37. data/plugins/guests/debian/cap/rsync.rb +5 -6
  38. data/plugins/guests/debian/plugin.rb +8 -8
  39. data/plugins/guests/esxi/cap/mount_nfs_folder.rb +2 -2
  40. data/plugins/guests/esxi/plugin.rb +6 -6
  41. data/plugins/guests/fedora/cap/flavor.rb +1 -1
  42. data/plugins/guests/fedora/plugin.rb +2 -17
  43. data/plugins/guests/freebsd/cap/change_host_name.rb +2 -3
  44. data/plugins/guests/freebsd/cap/rsync.rb +7 -4
  45. data/plugins/guests/freebsd/plugin.rb +9 -29
  46. data/plugins/guests/funtoo/plugin.rb +3 -8
  47. data/plugins/guests/gentoo/cap/change_host_name.rb +21 -6
  48. data/plugins/guests/gentoo/cap/configure_networks.rb +35 -26
  49. data/plugins/guests/gentoo/plugin.rb +4 -4
  50. data/plugins/guests/linux/cap/choose_addressable_ip_addr.rb +2 -3
  51. data/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +31 -45
  52. data/plugins/guests/linux/cap/network_interfaces.rb +20 -0
  53. data/plugins/guests/linux/cap/nfs.rb +57 -0
  54. data/plugins/guests/linux/cap/public_key.rb +65 -0
  55. data/plugins/guests/linux/cap/rsync.rb +7 -4
  56. data/plugins/guests/linux/plugin.rb +30 -25
  57. data/plugins/guests/mint/plugin.rb +1 -1
  58. data/plugins/guests/netbsd/plugin.rb +10 -30
  59. data/plugins/guests/nixos/plugin.rb +5 -5
  60. data/plugins/guests/omnios/cap/change_host_name.rb +1 -1
  61. data/plugins/guests/omnios/plugin.rb +4 -4
  62. data/plugins/guests/openbsd/cap/change_host_name.rb +21 -3
  63. data/plugins/guests/openbsd/plugin.rb +10 -30
  64. data/plugins/guests/photon/cap/change_host_name.rb +1 -1
  65. data/plugins/guests/photon/plugin.rb +4 -4
  66. data/plugins/guests/pld/cap/change_host_name.rb +1 -1
  67. data/plugins/guests/pld/plugin.rb +4 -4
  68. data/plugins/guests/redhat/cap/change_host_name.rb +4 -3
  69. data/plugins/guests/redhat/cap/configure_networks.rb +1 -24
  70. data/plugins/guests/redhat/plugin.rb +7 -7
  71. data/plugins/guests/slackware/cap/change_host_name.rb +1 -1
  72. data/plugins/guests/slackware/cap/configure_networks.rb +1 -5
  73. data/plugins/guests/slackware/plugin.rb +3 -3
  74. data/plugins/guests/smartos/plugin.rb +12 -12
  75. data/plugins/guests/solaris/plugin.rb +14 -14
  76. data/plugins/guests/solaris11/plugin.rb +12 -12
  77. data/plugins/guests/suse/cap/change_host_name.rb +1 -1
  78. data/plugins/guests/suse/cap/configure_networks.rb +1 -5
  79. data/plugins/guests/suse/plugin.rb +8 -8
  80. data/plugins/guests/tinycore/cap/mount_nfs.rb +2 -2
  81. data/plugins/guests/tinycore/plugin.rb +7 -7
  82. data/plugins/guests/trisquel/plugin.rb +1 -1
  83. data/plugins/guests/ubuntu/guest.rb +1 -1
  84. data/plugins/guests/ubuntu/plugin.rb +1 -6
  85. data/plugins/guests/windows/plugin.rb +2 -2
  86. data/plugins/kernel_v2/config/vm.rb +8 -1
  87. data/plugins/providers/hyperv/scripts/get_vm_status.ps1 +25 -5
  88. data/plugins/providers/virtualbox/driver/meta.rb +1 -0
  89. data/plugins/providers/virtualbox/driver/version_5_1.rb +734 -0
  90. data/plugins/providers/virtualbox/plugin.rb +1 -0
  91. data/plugins/synced_folders/nfs/synced_folder.rb +10 -2
  92. data/plugins/synced_folders/rsync/helper.rb +11 -4
  93. data/scripts/{bintray_upload.sh → sign.sh} +0 -0
  94. data/templates/guests/arch/network_static.erb +3 -3
  95. data/templates/guests/arch/network_static6.erb +8 -0
  96. data/templates/guests/freebsd/network_static6.erb +6 -0
  97. data/templates/guests/funtoo/network_static6.erb +9 -0
  98. data/templates/guests/gentoo/network_dhcp.erb +1 -1
  99. data/templates/guests/gentoo/network_static.erb +4 -4
  100. data/templates/guests/gentoo/network_static6.erb +7 -0
  101. data/templates/guests/redhat/network_dhcp.erb +1 -1
  102. data/templates/guests/redhat/network_static.erb +4 -1
  103. data/templates/guests/{fedora → redhat}/network_static6.erb +5 -2
  104. data/templates/locales/en.yml +40 -6
  105. data/test/unit/plugins/guests/arch/cap/change_host_name_test.rb +6 -6
  106. data/test/unit/plugins/guests/arch/cap/configure_networks_test.rb +20 -15
  107. data/test/unit/plugins/guests/arch/cap/rsync_test.rb +30 -0
  108. data/test/unit/plugins/guests/arch/cap/smb_test.rb +38 -0
  109. data/test/unit/plugins/guests/atomic/cap/change_host_name_test.rb +9 -8
  110. data/test/unit/plugins/guests/{freebsd → bsd}/cap/halt_test.rb +11 -10
  111. data/test/unit/plugins/guests/{freebsd → bsd}/cap/insert_public_key_test.rb +7 -6
  112. data/test/unit/plugins/guests/bsd/cap/nfs_test.rb +68 -0
  113. data/test/unit/plugins/guests/coreos/cap/change_host_name_test.rb +5 -5
  114. data/test/unit/plugins/guests/darwin/cap/change_host_name_test.rb +5 -5
  115. data/test/unit/plugins/guests/darwin/cap/halt_test.rb +36 -0
  116. data/test/unit/plugins/guests/debian/cap/change_host_name_test.rb +3 -5
  117. data/test/unit/plugins/guests/debian/cap/configure_networks_test.rb +13 -9
  118. data/test/unit/plugins/guests/debian/cap/rsync_test.rb +3 -11
  119. data/test/unit/plugins/guests/freebsd/cap/change_host_name_test.rb +2 -2
  120. data/test/unit/plugins/guests/linux/cap/mount_nfs_test.rb +16 -3
  121. data/test/unit/plugins/guests/omnios/cap/change_host_name_test.rb +2 -2
  122. data/test/unit/plugins/guests/photon/cap/change_host_name_test.rb +2 -2
  123. data/test/unit/plugins/guests/pld/cap/change_host_name_test.rb +2 -2
  124. data/test/unit/plugins/guests/redhat/cap/change_host_name_test.rb +4 -3
  125. data/test/unit/plugins/guests/redhat/cap/configure_networks_test.rb +17 -33
  126. data/test/unit/plugins/guests/slackware/cap/change_host_name_test.rb +2 -2
  127. data/test/unit/plugins/guests/slackware/cap/configure_networks_test.rb +8 -4
  128. data/test/unit/plugins/guests/suse/cap/change_host_name_test.rb +2 -2
  129. data/test/unit/plugins/guests/suse/cap/configure_networks_test.rb +13 -16
  130. data/test/unit/plugins/kernel_v2/config/vm_test.rb +10 -2
  131. data/test/unit/templates/guests/arch/network_static_test.rb +4 -2
  132. data/test/unit/templates/guests/gentoo/network_dhcp_test.rb +2 -2
  133. data/test/unit/templates/guests/gentoo/network_static_test.rb +10 -10
  134. data/test/unit/templates/guests/redhat/network_dhcp_test.rb +2 -2
  135. data/test/unit/templates/guests/redhat/network_static_test.rb +9 -9
  136. data/vagrant.gemspec +3 -3
  137. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/CHANGELOG.md +1 -0
  138. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/CONTRIBUTING.md +38 -0
  139. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/LICENSE.txt +22 -0
  140. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/README.md +297 -0
  141. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/bin/listen +12 -0
  142. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/base.rb +141 -0
  143. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/bsd.rb +106 -0
  144. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/config.rb +26 -0
  145. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/darwin.rb +92 -0
  146. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/linux.rb +106 -0
  147. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/polling.rb +37 -0
  148. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/windows.rb +98 -0
  149. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter.rb +45 -0
  150. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/backend.rb +38 -0
  151. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/change.rb +76 -0
  152. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/cli.rb +65 -0
  153. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/directory.rb +87 -0
  154. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/config.rb +55 -0
  155. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/loop.rb +117 -0
  156. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/processor.rb +122 -0
  157. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/queue.rb +55 -0
  158. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/file.rb +80 -0
  159. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/fsm.rb +132 -0
  160. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/internals/thread_pool.rb +29 -0
  161. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/listener/config.rb +41 -0
  162. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/listener.rb +133 -0
  163. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/logger.rb +32 -0
  164. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/options.rb +23 -0
  165. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/queue_optimizer.rb +132 -0
  166. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record/entry.rb +64 -0
  167. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record/symlink_detector.rb +39 -0
  168. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record.rb +118 -0
  169. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/silencer/controller.rb +48 -0
  170. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/silencer.rb +97 -0
  171. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/version.rb +3 -0
  172. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen.rb +57 -0
  173. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.gitignore +8 -0
  174. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rspec +2 -0
  175. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rubocop-disables.yml +384 -0
  176. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rubocop.yml +3 -0
  177. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.travis.yml +43 -0
  178. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/AUTHORS +98 -0
  179. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/Gemfile +11 -0
  180. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/LICENSE +21 -0
  181. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/README.md +667 -0
  182. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/Rakefile +132 -0
  183. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/bin/restclient +92 -0
  184. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/history.md +310 -0
  185. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/rest-client.rb +2 -0
  186. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/rest_client.rb +2 -0
  187. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/abstract_response.rb +226 -0
  188. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/exceptions.rb +244 -0
  189. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/params_array.rb +72 -0
  190. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/payload.rb +209 -0
  191. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/platform.rb +49 -0
  192. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/raw_response.rb +38 -0
  193. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/request.rb +904 -0
  194. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/resource.rb +168 -0
  195. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/response.rb +80 -0
  196. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/utils.rb +235 -0
  197. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/version.rb +8 -0
  198. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/windows/root_certs.rb +105 -0
  199. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/windows.rb +8 -0
  200. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient.rb +184 -0
  201. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/rest-client.gemspec +31 -0
  202. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/rest-client.windows.gemspec +19 -0
  203. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/helpers.rb +22 -0
  204. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/_lib.rb +1 -0
  205. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/244b5494.0 +19 -0
  206. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/81b9768f.0 +19 -0
  207. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/README +8 -0
  208. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/digicert.crt +19 -0
  209. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/415660c1.0 +14 -0
  210. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/7651b327.0 +14 -0
  211. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/README +8 -0
  212. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/verisign.crt +14 -0
  213. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/certs/digicert.crt +19 -0
  214. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/certs/verisign.crt +14 -0
  215. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/httpbin_spec.rb +86 -0
  216. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/integration_spec.rb +125 -0
  217. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/request_spec.rb +127 -0
  218. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/spec_helper.rb +29 -0
  219. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/_lib.rb +1 -0
  220. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/abstract_response_spec.rb +145 -0
  221. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/exceptions_spec.rb +108 -0
  222. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/master_shake.jpg +0 -0
  223. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/params_array_spec.rb +36 -0
  224. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/payload_spec.rb +263 -0
  225. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/raw_response_spec.rb +18 -0
  226. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/request2_spec.rb +54 -0
  227. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/request_spec.rb +1265 -0
  228. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/resource_spec.rb +130 -0
  229. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/response_spec.rb +241 -0
  230. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/restclient_spec.rb +79 -0
  231. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/utils_spec.rb +147 -0
  232. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/windows/root_certs_spec.rb +22 -0
  233. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.gitignore +10 -0
  234. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.rspec +3 -0
  235. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.rubocop.yml +3 -0
  236. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.travis.yml +11 -0
  237. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/LICENSE.txt +21 -0
  238. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/README.md +151 -0
  239. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/logger.rb +16 -0
  240. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/quiet.rb +3 -0
  241. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/ruby_version.rb +58 -0
  242. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/travis/ruby_version.rb +59 -0
  243. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/travis.rb +58 -0
  244. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/version.rb +3 -0
  245. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/warning.rb +97 -0
  246. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep.rb +2 -0
  247. data/vendor/bundle/ruby/2.3.0/specifications/listen-3.1.5.gemspec +44 -0
  248. data/vendor/bundle/ruby/2.3.0/specifications/rest-client-2.0.0.gemspec +60 -0
  249. data/vendor/bundle/ruby/2.3.0/specifications/ruby_dep-1.4.0.gemspec +34 -0
  250. data/version.txt +1 -1
  251. metadata +147 -44
  252. data/plugins/guests/darwin/cap/insert_public_key.rb +0 -33
  253. data/plugins/guests/darwin/cap/mount_nfs_folder.rb +0 -37
  254. data/plugins/guests/darwin/cap/remove_public_key.rb +0 -21
  255. data/plugins/guests/fedora/cap/change_host_name.rb +0 -29
  256. data/plugins/guests/fedora/cap/configure_networks.rb +0 -135
  257. data/plugins/guests/fedora/cap/network_scripts_dir.rb +0 -15
  258. data/plugins/guests/freebsd/cap/halt.rb +0 -16
  259. data/plugins/guests/freebsd/cap/insert_public_key.rb +0 -34
  260. data/plugins/guests/freebsd/cap/mount_nfs_folder.rb +0 -24
  261. data/plugins/guests/freebsd/cap/remove_public_key.rb +0 -21
  262. data/plugins/guests/funtoo/cap/change_host_name.rb +0 -17
  263. data/plugins/guests/linux/cap/insert_public_key.rb +0 -31
  264. data/plugins/guests/linux/cap/mount_nfs.rb +0 -50
  265. data/plugins/guests/linux/cap/nfs_client.rb +0 -11
  266. data/plugins/guests/linux/cap/remove_public_key.rb +0 -24
  267. data/plugins/guests/netbsd/cap/insert_public_key.rb +0 -21
  268. data/plugins/guests/netbsd/cap/mount_nfs_folder.rb +0 -17
  269. data/plugins/guests/netbsd/cap/remove_public_key.rb +0 -21
  270. data/plugins/guests/openbsd/cap/halt.rb +0 -16
  271. data/plugins/guests/openbsd/cap/insert_public_key.rb +0 -21
  272. data/plugins/guests/openbsd/cap/mount_nfs_folder.rb +0 -14
  273. data/plugins/guests/openbsd/cap/remove_public_key.rb +0 -21
  274. data/plugins/guests/ubuntu/cap/change_host_name.rb +0 -52
  275. data/templates/guests/fedora/network_dhcp.erb +0 -6
  276. data/templates/guests/fedora/network_static.erb +0 -16
  277. data/test/unit/plugins/guests/freebsd/cap/mount_nfs_folder_test.rb +0 -53
  278. data/test/unit/plugins/guests/ubuntu/cap/change_host_name_test.rb +0 -42
  279. data/test/unit/templates/guests/fedora/network_dhcp_test.rb +0 -21
  280. data/test/unit/templates/guests/fedora/network_static6_test.rb +0 -25
  281. data/test/unit/templates/guests/fedora/network_static_test.rb +0 -71
@@ -6,17 +6,12 @@ module VagrantPlugins
6
6
  name "Funtoo guest"
7
7
  description "Funtoo guest support."
8
8
 
9
- guest("funtoo", "linux") do
10
- require File.expand_path("../guest", __FILE__)
9
+ guest(:funtoo, :gentoo) do
10
+ require_relative "guest"
11
11
  Guest
12
12
  end
13
13
 
14
- guest_capability("funtoo", "change_host_name") do
15
- require_relative "cap/change_host_name"
16
- Cap::ChangeHostName
17
- end
18
-
19
- guest_capability("funtoo", "configure_networks") do
14
+ guest_capability(:funtoo, :configure_networks) do
20
15
  require_relative "cap/configure_networks"
21
16
  Cap::ConfigureNetworks
22
17
  end
@@ -3,12 +3,27 @@ module VagrantPlugins
3
3
  module Cap
4
4
  class ChangeHostName
5
5
  def self.change_host_name(machine, name)
6
- machine.communicate.tap do |comm|
7
- if !comm.test("sudo hostname --fqdn | grep '#{name}'")
8
- comm.sudo("echo 'hostname=#{name.split('.')[0]}' > /etc/conf.d/hostname")
9
- comm.sudo("sed -i 's@^\\(127[.]0[.]0[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts")
10
- comm.sudo("hostname #{name.split('.')[0]}")
11
- end
6
+ comm = machine.communicate
7
+
8
+ if !comm.test("hostname -f | grep '^#{name}$'", sudo: false)
9
+ basename = name.split(".", 2)[0]
10
+ comm.sudo <<-EOH.gsub(/^ {14}/, "")
11
+ set -e
12
+
13
+ # Set the hostname
14
+ hostname '#{basename}'
15
+ echo "hostname=#{basename}" > /etc/conf.d/hostname
16
+
17
+ # Remove comments and blank lines from /etc/hosts
18
+ sed -i'' -e 's/#.*$//' /etc/hosts
19
+ sed -i'' -e '/^$/d' /etc/hosts
20
+
21
+ # Prepend ourselves to /etc/hosts
22
+ grep -w '#{name}' /etc/hosts || {
23
+ echo -e '127.0.0.1\\t#{name}\\t#{basename}' | cat - /etc/hosts > /tmp/tmp-hosts
24
+ mv /tmp/tmp-hosts /etc/hosts
25
+ }
26
+ EOH
12
27
  end
13
28
  end
14
29
  end
@@ -9,34 +9,43 @@ module VagrantPlugins
9
9
  include Vagrant::Util
10
10
 
11
11
  def self.configure_networks(machine, networks)
12
- machine.communicate.tap do |comm|
13
- # Remove any previous host only network additions to the interface file
14
- comm.sudo("sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/conf.d/net > /tmp/vagrant-network-interfaces")
15
- comm.sudo("cat /tmp/vagrant-network-interfaces > /etc/conf.d/net")
16
- comm.sudo("rm -f /tmp/vagrant-network-interfaces")
17
-
18
- # Configure each network interface
19
- networks.each do |network|
20
- entry = TemplateRenderer.render("guests/gentoo/network_#{network[:type]}",
21
- options: network)
22
-
23
- # Upload the entry to a temporary location
24
- Tempfile.open("vagrant-gentoo-configure-networks") do |f|
25
- f.binmode
26
- f.write(entry)
27
- f.fsync
28
- f.close
29
- comm.upload(f.path, "/tmp/vagrant-network-entry")
30
- end
31
-
32
- # Configure the interface
33
- comm.sudo("ln -fs /etc/init.d/net.lo /etc/init.d/net.eth#{network[:interface]}")
34
- comm.sudo("/etc/init.d/net.eth#{network[:interface]} stop")
35
- comm.sudo("cat /tmp/vagrant-network-entry >> /etc/conf.d/net")
36
- comm.sudo("rm -f /tmp/vagrant-network-entry")
37
- comm.sudo("/etc/init.d/net.eth#{network[:interface]} start")
12
+ comm = machine.communicate
13
+
14
+ commands = []
15
+ interfaces = machine.guest.capability(:network_interfaces, "/bin/ip")
16
+
17
+ # Remove any previous network additions to the configuration file.
18
+ commands << "sed -i'' -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/conf.d/net"
19
+
20
+ networks.each_with_index do |network, i|
21
+ network[:device] = interfaces[network[:interface]]
22
+
23
+ entry = TemplateRenderer.render("guests/gentoo/network_#{network[:type]}",
24
+ options: network,
25
+ )
26
+
27
+ remote_path = "/tmp/vagrant-network-#{network[:device]}-#{Time.now.to_i}-#{i}"
28
+
29
+ Tempfile.open("vagrant-gentoo-configure-networks") do |f|
30
+ f.binmode
31
+ f.write(entry)
32
+ f.fsync
33
+ f.close
34
+ comm.upload(f.path, remote_path)
38
35
  end
36
+
37
+ commands << <<-EOH.gsub(/^ {14}/, '')
38
+ ln -sf /etc/init.d/net.lo /etc/init.d/net.#{network[:device]}
39
+ /etc/init.d/net.#{network[:device]} stop || true
40
+
41
+ cat '#{remote_path}' >> /etc/conf.d/net
42
+ rm -f '#{remote_path}'
43
+
44
+ /etc/init.d/net.#{network[:device]} start
45
+ EOH
39
46
  end
47
+
48
+ comm.sudo(commands.join("\n"))
40
49
  end
41
50
  end
42
51
  end
@@ -6,17 +6,17 @@ module VagrantPlugins
6
6
  name "Gentoo guest"
7
7
  description "Gentoo guest support."
8
8
 
9
- guest("gentoo", "linux") do
10
- require File.expand_path("../guest", __FILE__)
9
+ guest(:gentoo, :linux) do
10
+ require_relative "guest"
11
11
  Guest
12
12
  end
13
13
 
14
- guest_capability("gentoo", "change_host_name") do
14
+ guest_capability(:gentoo, :change_host_name) do
15
15
  require_relative "cap/change_host_name"
16
16
  Cap::ChangeHostName
17
17
  end
18
18
 
19
- guest_capability("gentoo", "configure_networks") do
19
+ guest_capability(:gentoo, :configure_networks) do
20
20
  require_relative "cap/configure_networks"
21
21
  Cap::ConfigureNetworks
22
22
  end
@@ -6,13 +6,12 @@ module VagrantPlugins
6
6
  comm = machine.communicate
7
7
 
8
8
  possible.each do |ip|
9
- command = "ping -c1 -w1 -W1 #{ip}"
10
- if comm.test(command)
9
+ if comm.test("ping -c1 -w1 -W1 #{ip}")
11
10
  return ip
12
11
  end
13
12
  end
14
13
 
15
- nil
14
+ return nil
16
15
  end
17
16
  end
18
17
  end
@@ -1,12 +1,17 @@
1
+ require "shellwords"
2
+
3
+ require "vagrant/util/retryable"
4
+
1
5
  module VagrantPlugins
2
6
  module GuestLinux
3
7
  module Cap
4
8
  class MountVirtualBoxSharedFolder
9
+ extend Vagrant::Util::Retryable
10
+
5
11
  def self.mount_virtualbox_shared_folder(machine, name, guestpath, options)
6
- expanded_guest_path = machine.guest.capability(
7
- :shell_expand_guest_path, guestpath)
12
+ guest_path = Shellwords.escape(guestpath)
8
13
 
9
- mount_commands = []
14
+ mount_commands = ["set -e"]
10
15
 
11
16
  if options[:owner].is_a? Integer
12
17
  mount_uid = options[:owner]
@@ -25,73 +30,54 @@ module VagrantPlugins
25
30
  # First mount command uses getent to get the group
26
31
  mount_options = "-o uid=#{mount_uid},gid=#{mount_gid}"
27
32
  mount_options += ",#{options[:mount_options].join(",")}" if options[:mount_options]
28
- mount_commands << "mount -t vboxsf #{mount_options} #{name} #{expanded_guest_path}"
33
+ mount_commands << "mount -t vboxsf #{mount_options} #{name} #{guest_path}"
29
34
 
30
35
  # Second mount command uses the old style `id -g`
31
36
  mount_options = "-o uid=#{mount_uid},gid=#{mount_gid_old}"
32
37
  mount_options += ",#{options[:mount_options].join(",")}" if options[:mount_options]
33
- mount_commands << "mount -t vboxsf #{mount_options} #{name} #{expanded_guest_path}"
38
+ mount_commands << "mount -t vboxsf #{mount_options} #{name} #{guest_path}"
34
39
 
35
40
  # Create the guest path if it doesn't exist
36
- machine.communicate.sudo("mkdir -p #{expanded_guest_path}")
41
+ machine.communicate.sudo("mkdir -p #{guest_path}")
37
42
 
38
43
  # Attempt to mount the folder. We retry here a few times because
39
44
  # it can fail early on.
40
- attempts = 0
41
- while true
42
- success = true
43
-
44
- stderr = ""
45
- mount_commands.each do |command|
46
- no_such_device = false
47
- stderr = ""
48
- status = machine.communicate.sudo(command, error_check: false) do |type, data|
49
- if type == :stderr
50
- no_such_device = true if data =~ /No such device/i
51
- stderr += data.to_s
52
- end
53
- end
54
-
55
- success = status == 0 && !no_such_device
56
- break if success
57
- end
58
-
59
- break if success
60
-
61
- attempts += 1
62
- if attempts > 10
63
- raise Vagrant::Errors::LinuxMountFailed,
64
- command: mount_commands.join("\n"),
65
- output: stderr
66
- end
67
-
68
- sleep(2*attempts)
45
+ command = mount_commands.join("\n")
46
+ stderr = ""
47
+ retryable(on: Vagrant::Errors::VirtualBoxMountFailed, tries: 3, sleep: 5) do
48
+ machine.communicate.sudo(command,
49
+ error_class: Vagrant::Errors::VirtualBoxMountFailed,
50
+ error_key: :virtualbox_mount_failed,
51
+ command: command,
52
+ output: stderr,
53
+ ) { |type, data| stderr = data if type == :stderr }
69
54
  end
70
55
 
71
56
  # Chown the directory to the proper user. We skip this if the
72
57
  # mount options contained a readonly flag, because it won't work.
73
58
  if !options[:mount_options] || !options[:mount_options].include?("ro")
74
59
  chown_commands = []
75
- chown_commands << "chown #{mount_uid}:#{mount_gid} #{expanded_guest_path}"
76
- chown_commands << "chown #{mount_uid}:#{mount_gid_old} #{expanded_guest_path}"
60
+ chown_commands << "chown #{mount_uid}:#{mount_gid} #{guest_path}"
61
+ chown_commands << "chown #{mount_uid}:#{mount_gid_old} #{guest_path}"
77
62
 
78
63
  exit_status = machine.communicate.sudo(chown_commands[0], error_check: false)
79
64
  machine.communicate.sudo(chown_commands[1]) if exit_status != 0
80
65
  end
81
66
 
82
67
  # Emit an upstart event if we can
83
- machine.communicate.sudo <<-SCRIPT
84
- if command -v /sbin/init && /sbin/init --version | grep upstart; then
85
- /sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
86
- fi
87
- SCRIPT
68
+ machine.communicate.sudo <<-EOH.gsub(/^ {12}/, "")
69
+ if command -v /sbin/init && /sbin/init --version | grep upstart; then
70
+ /sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{guest_path}
71
+ fi
72
+ EOH
88
73
  end
89
74
 
90
75
  def self.unmount_virtualbox_shared_folder(machine, guestpath, options)
91
- result = machine.communicate.sudo(
92
- "umount #{guestpath}", error_check: false)
76
+ guest_path = Shellwords.escape(guestpath)
77
+
78
+ result = machine.communicate.sudo("umount #{guest_path}", error_check: false)
93
79
  if result == 0
94
- machine.communicate.sudo("rmdir #{guestpath}", error_check: false)
80
+ machine.communicate.sudo("rmdir #{guest_path}", error_check: false)
95
81
  end
96
82
  end
97
83
  end
@@ -0,0 +1,20 @@
1
+ module VagrantPlugins
2
+ module GuestLinux
3
+ module Cap
4
+ class NetworkInterfaces
5
+ # Get network interfaces as a list. The result will be something like:
6
+ #
7
+ # eth0\nenp0s8\nenp0s9
8
+ #
9
+ # @return [Array<String>]
10
+ def self.network_interfaces(machine, path = "/sbin/ip")
11
+ s = ""
12
+ machine.communicate.sudo("#{path} -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'") do |type, data|
13
+ s << data if type == :stdout
14
+ end
15
+ s.split("\n")
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,57 @@
1
+ require "vagrant/util/retryable"
2
+
3
+ module VagrantPlugins
4
+ module GuestLinux
5
+ module Cap
6
+ class NFS
7
+ extend Vagrant::Util::Retryable
8
+
9
+ def self.nfs_client_installed(machine)
10
+ machine.communicate.test("test -x /sbin/mount.nfs")
11
+ end
12
+
13
+ def self.mount_nfs_folder(machine, ip, folders)
14
+ comm = machine.communicate
15
+
16
+ folders.each do |name, opts|
17
+ # Mount each folder separately so we can retry.
18
+ commands = ["set -e"]
19
+
20
+ # Shellescape the paths in case they do not have special characters.
21
+ guest_path = Shellwords.escape(opts[:guestpath])
22
+ host_path = Shellwords.escape(opts[:hostpath])
23
+
24
+ # Build the list of mount options.
25
+ mount_opts = []
26
+ mount_opts << "vers=#{opts[:nfs_version]}" if opts[:nfs_version]
27
+ mount_opts << "udp" if opts[:nfs_udp]
28
+ if opts[:mount_options]
29
+ mount_opts = mount_opts + opts[:mount_options].dup
30
+ end
31
+ mount_opts = mount_opts.join(",")
32
+
33
+ # Make the directory on the guest.
34
+ commands << "mkdir -p #{guest_path}"
35
+
36
+ # Perform the mount operation.
37
+ commands << "mount -o #{mount_opts} #{ip}:#{host_path} #{guest_path}"
38
+
39
+ # Emit a mount event
40
+ commands << <<-EOH.gsub(/^ {14}/, '')
41
+ if command -v /sbin/init && /sbin/init --version | grep upstart; then
42
+ /sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{guest_path}
43
+ fi
44
+ EOH
45
+
46
+ # Run the command, raising a specific error.
47
+ retryable(on: Vagrant::Errors::NFSMountFailed, tries: 3, sleep: 5) do
48
+ machine.communicate.sudo(commands.join("\n"),
49
+ error_class: Vagrant::Errors::NFSMountFailed,
50
+ )
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,65 @@
1
+ require "tempfile"
2
+
3
+ require "vagrant/util/shell_quote"
4
+
5
+ module VagrantPlugins
6
+ module GuestLinux
7
+ module Cap
8
+ class PublicKey
9
+ def self.insert_public_key(machine, contents)
10
+ comm = machine.communicate
11
+ contents = contents.strip << "\n"
12
+
13
+ remote_path = "/tmp/vagrant-insert-pubkey-#{Time.now.to_i}"
14
+ Tempfile.open("vagrant-linux-insert-public-key") do |f|
15
+ f.binmode
16
+ f.write(contents)
17
+ f.fsync
18
+ f.close
19
+ comm.upload(f.path, remote_path)
20
+ end
21
+
22
+ # Use execute (not sudo) because we want to execute this as the SSH
23
+ # user (which is "vagrant" by default).
24
+ comm.execute <<-EOH.gsub(/^ {12}/, "")
25
+ set -e
26
+
27
+ mkdir -p ~/.ssh
28
+ chmod 0700 ~/.ssh
29
+ cat '#{remote_path}' >> ~/.ssh/authorized_keys
30
+ chmod 0600 ~/.ssh/authorized_keys
31
+
32
+ rm -f '#{remote_path}'
33
+ EOH
34
+ end
35
+
36
+ def self.remove_public_key(machine, contents)
37
+ comm = machine.communicate
38
+ contents = contents.strip << "\n"
39
+
40
+ remote_path = "/tmp/vagrant-remove-pubkey-#{Time.now.to_i}"
41
+ Tempfile.open("vagrant-bsd-remove-public-key") do |f|
42
+ f.binmode
43
+ f.write(contents)
44
+ f.fsync
45
+ f.close
46
+ comm.upload(f.path, remote_path)
47
+ end
48
+
49
+ # Use execute (not sudo) because we want to execute this as the SSH
50
+ # user (which is "vagrant" by default).
51
+ comm.execute <<-EOH.sub(/^ {12}/, "")
52
+ set -e
53
+
54
+ if test -f ~/.ssh/authorized_keys; then
55
+ grep -v -x -f '#{remote_path}' ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.tmp
56
+ mv ~/.ssh/authorized_keys.tmp ~/.ssh/authorized_keys
57
+ fi
58
+
59
+ rm -f '#{remote_path}'
60
+ EOH
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -1,3 +1,5 @@
1
+ require "shellwords"
2
+
1
3
  module VagrantPlugins
2
4
  module GuestLinux
3
5
  module Cap
@@ -11,9 +13,8 @@ module VagrantPlugins
11
13
  end
12
14
 
13
15
  def self.rsync_pre(machine, opts)
14
- machine.communicate.tap do |comm|
15
- comm.sudo("mkdir -p '#{opts[:guestpath]}'")
16
- end
16
+ guest_path = Shellwords.escape(opts[:guestpath])
17
+ machine.communicate.sudo("mkdir -p #{guest_path}")
17
18
  end
18
19
 
19
20
  def self.rsync_post(machine, opts)
@@ -21,8 +22,10 @@ module VagrantPlugins
21
22
  return
22
23
  end
23
24
 
25
+ guest_path = Shellwords.escape(opts[:guestpath])
26
+
24
27
  machine.communicate.sudo(
25
- "find '#{opts[:guestpath]}' " +
28
+ "find #{guest_path} " +
26
29
  "'!' -type l -a " +
27
30
  "'(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
28
31
  "xargs -0 -r chown #{opts[:owner]}:#{opts[:group]}")