vagrant-clone 0.0.1 → 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.
Files changed (306) hide show
  1. checksums.yaml +4 -4
  2. data/.idea/.rakeTasks +7 -0
  3. data/.idea/inspectionProfiles/Project_Default.xml +6 -0
  4. data/.idea/misc.xml +4 -0
  5. data/.idea/modules.xml +8 -0
  6. data/.idea/runConfigurations/clone.xml +21 -0
  7. data/.idea/runConfigurations/libvirt.xml +21 -0
  8. data/.idea/vagrant-clone.iml +114 -0
  9. data/.idea/vcs.xml +6 -0
  10. data/.idea/workspace.xml +948 -0
  11. data/Gemfile +9 -3
  12. data/Gemfile.lock +123 -37
  13. data/Rakefile +2 -1
  14. data/Vagrantfile +9 -0
  15. data/cookbooks/apt/CHANGELOG.md +321 -0
  16. data/cookbooks/apt/CONTRIBUTING.md +2 -0
  17. data/cookbooks/apt/MAINTAINERS.md +15 -0
  18. data/cookbooks/apt/README.md +250 -0
  19. data/cookbooks/apt/attributes/default.rb +57 -0
  20. data/cookbooks/apt/files/15update-stamp +1 -0
  21. data/cookbooks/apt/files/apt-proxy-v2.conf +50 -0
  22. data/cookbooks/apt/libraries/helpers.rb +49 -0
  23. data/cookbooks/apt/libraries/matchers.rb +16 -0
  24. data/cookbooks/apt/metadata.json +1 -0
  25. data/cookbooks/apt/recipes/cacher-client.rb +52 -0
  26. data/cookbooks/apt/recipes/cacher-ng.rb +39 -0
  27. data/cookbooks/apt/recipes/default.rb +93 -0
  28. data/cookbooks/apt/recipes/unattended-upgrades.rb +47 -0
  29. data/cookbooks/apt/resources/preference.rb +90 -0
  30. data/cookbooks/apt/templates/01proxy.erb +11 -0
  31. data/cookbooks/apt/templates/10dpkg-options.erb +8 -0
  32. data/cookbooks/apt/templates/10recommends.erb +3 -0
  33. data/cookbooks/apt/templates/20auto-upgrades.erb +5 -0
  34. data/cookbooks/apt/templates/50unattended-upgrades.erb +75 -0
  35. data/cookbooks/apt/templates/acng.conf.erb +275 -0
  36. data/cookbooks/apt/templates/unattended-upgrades.seed.erb +1 -0
  37. data/cookbooks/build-essential/.foodcritic +1 -0
  38. data/cookbooks/build-essential/CHANGELOG.md +257 -0
  39. data/cookbooks/build-essential/CONTRIBUTING.md +2 -0
  40. data/cookbooks/build-essential/MAINTAINERS.md +15 -0
  41. data/cookbooks/build-essential/README.md +134 -0
  42. data/cookbooks/build-essential/attributes/default.rb +21 -0
  43. data/cookbooks/build-essential/libraries/matchers.rb +9 -0
  44. data/cookbooks/build-essential/metadata.json +1 -0
  45. data/cookbooks/build-essential/recipes/_windows.rb +53 -0
  46. data/cookbooks/build-essential/recipes/default.rb +24 -0
  47. data/cookbooks/build-essential/resources/build_essential.rb +106 -0
  48. data/cookbooks/build-essential/resources/xcode_command_line_tools.rb +61 -0
  49. data/cookbooks/compat_resource/CHANGELOG.md +53 -0
  50. data/cookbooks/compat_resource/CONTRIBUTING.md +2 -0
  51. data/cookbooks/compat_resource/MAINTAINERS.md +16 -0
  52. data/cookbooks/compat_resource/README.md +60 -0
  53. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/constants.rb +47 -0
  54. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/delayed_evaluator.rb +40 -0
  55. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/core.rb +73 -0
  56. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/declare_resource.rb +315 -0
  57. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/platform_introspection.rb +292 -0
  58. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/recipe.rb +37 -0
  59. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/universal.rb +70 -0
  60. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/lazy_module_include.rb +98 -0
  61. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/notifying_block.rb +74 -0
  62. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/params_validate.rb +510 -0
  63. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/powershell_out.rb +117 -0
  64. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/properties.rb +328 -0
  65. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/property.rb +713 -0
  66. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/apt_repository.rb +269 -0
  67. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/apt_update.rb +105 -0
  68. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/noop.rb +56 -0
  69. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/support/yum_repo.erb +132 -0
  70. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/systemd_unit.rb +253 -0
  71. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/yum_repository.rb +136 -0
  72. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb +164 -0
  73. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/action_class.rb +114 -0
  74. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/apt_repository.rb +65 -0
  75. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/apt_update.rb +52 -0
  76. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/systemd_unit.rb +81 -0
  77. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/yum_repository.rb +97 -0
  78. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource.rb +214 -0
  79. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource_builder.rb +174 -0
  80. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef.rb +29 -0
  81. data/cookbooks/compat_resource/files/lib/chef_compat/mixin/properties.rb +8 -0
  82. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/exceptions.rb +10 -0
  83. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/log.rb +30 -0
  84. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/mixin/params_validate.rb +17 -0
  85. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/node.rb +9 -0
  86. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/property.rb +15 -0
  87. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/provider.rb +65 -0
  88. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/recipe.rb +118 -0
  89. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/recipe_hook.rb +20 -0
  90. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource/lwrp_base.rb +60 -0
  91. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource.rb +156 -0
  92. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_builder.rb +167 -0
  93. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection/resource_list.rb +49 -0
  94. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection/resource_set.rb +49 -0
  95. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection.rb +103 -0
  96. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb +691 -0
  97. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb +153 -0
  98. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef.rb +33 -0
  99. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches.rb +41 -0
  100. data/cookbooks/compat_resource/files/lib/chef_compat/property.rb +6 -0
  101. data/cookbooks/compat_resource/files/lib/chef_compat/recipe.rb +8 -0
  102. data/cookbooks/compat_resource/files/lib/chef_compat/resource/lwrp_base.rb +44 -0
  103. data/cookbooks/compat_resource/files/lib/chef_compat/resource.rb +56 -0
  104. data/cookbooks/compat_resource/files/lib/chef_upstream_version.rb +3 -0
  105. data/cookbooks/compat_resource/files/lib/compat_resource.rb +35 -0
  106. data/cookbooks/compat_resource/libraries/autoload.rb +31 -0
  107. data/cookbooks/compat_resource/metadata.json +1 -0
  108. data/cookbooks/inifile_chef_gem/CHANGELOG.md +11 -0
  109. data/cookbooks/inifile_chef_gem/README.md +46 -0
  110. data/cookbooks/inifile_chef_gem/metadata.json +51 -0
  111. data/cookbooks/inifile_chef_gem/metadata.rb +11 -0
  112. data/cookbooks/inifile_chef_gem/resources/default.rb +28 -0
  113. data/cookbooks/mariadb/CHANGELOG.md +332 -0
  114. data/cookbooks/mariadb/README.md +225 -0
  115. data/cookbooks/mariadb/attributes/default.rb +199 -0
  116. data/cookbooks/mariadb/libraries/mariadb_conn_helper.rb +53 -0
  117. data/cookbooks/mariadb/libraries/mariadb_helper.rb +216 -0
  118. data/cookbooks/mariadb/libraries/matchers.rb +21 -0
  119. data/cookbooks/mariadb/metadata.json +1 -0
  120. data/cookbooks/mariadb/providers/configuration.rb +39 -0
  121. data/cookbooks/mariadb/recipes/_audit_plugin.rb +63 -0
  122. data/cookbooks/mariadb/recipes/_debian_galera.rb +62 -0
  123. data/cookbooks/mariadb/recipes/_debian_server.rb +78 -0
  124. data/cookbooks/mariadb/recipes/_mariadb_repository.rb +29 -0
  125. data/cookbooks/mariadb/recipes/_redhat_client.rb +27 -0
  126. data/cookbooks/mariadb/recipes/_redhat_galera.rb +55 -0
  127. data/cookbooks/mariadb/recipes/_redhat_server.rb +58 -0
  128. data/cookbooks/mariadb/recipes/client.rb +47 -0
  129. data/cookbooks/mariadb/recipes/config.rb +115 -0
  130. data/cookbooks/mariadb/recipes/default.rb +46 -0
  131. data/cookbooks/mariadb/recipes/devel.rb +41 -0
  132. data/cookbooks/mariadb/recipes/galera.rb +324 -0
  133. data/cookbooks/mariadb/recipes/plugins.rb +3 -0
  134. data/cookbooks/mariadb/recipes/repository.rb +45 -0
  135. data/cookbooks/mariadb/recipes/server.rb +157 -0
  136. data/cookbooks/mariadb/resources/configuration.rb +13 -0
  137. data/cookbooks/mariadb/resources/mysql2_gem.rb +25 -0
  138. data/cookbooks/mariadb/resources/replication.rb +192 -0
  139. data/cookbooks/mariadb/templates/default/conf.d.generic.erb +19 -0
  140. data/cookbooks/mariadb/templates/default/debian.cnf.erb +12 -0
  141. data/cookbooks/mariadb/templates/default/mariadb-server.seed.erb +13 -0
  142. data/cookbooks/mariadb/templates/default/mariadb_grants.erb +42 -0
  143. data/cookbooks/mariadb/templates/default/my.cnf.erb +210 -0
  144. data/cookbooks/mariadb/templates/default/root.cnf.erb +5 -0
  145. data/cookbooks/mingw/.foodcritic +1 -0
  146. data/cookbooks/mingw/CHANGELOG.md +50 -0
  147. data/cookbooks/mingw/CONTRIBUTING.md +2 -0
  148. data/cookbooks/mingw/MAINTAINERS.md +14 -0
  149. data/cookbooks/mingw/README.md +133 -0
  150. data/cookbooks/mingw/files/default/bash.bat +17 -0
  151. data/cookbooks/mingw/files/default/custom-upgrade.sh +23 -0
  152. data/cookbooks/mingw/files/default/custom_prefix.sh +13 -0
  153. data/cookbooks/mingw/files/default/pthread.h +719 -0
  154. data/cookbooks/mingw/files/default/time.h +297 -0
  155. data/cookbooks/mingw/libraries/_helper.rb +38 -0
  156. data/cookbooks/mingw/metadata.json +1 -0
  157. data/cookbooks/mingw/recipes/default.rb +19 -0
  158. data/cookbooks/mingw/resources/get.rb +56 -0
  159. data/cookbooks/mingw/resources/msys2_package.rb +139 -0
  160. data/cookbooks/mingw/resources/tdm_gcc.rb +114 -0
  161. data/cookbooks/ohai/.foodcritic +2 -0
  162. data/cookbooks/ohai/CHANGELOG.md +166 -0
  163. data/cookbooks/ohai/CONTRIBUTING.md +2 -0
  164. data/cookbooks/ohai/MAINTAINERS.md +15 -0
  165. data/cookbooks/ohai/README.md +134 -0
  166. data/cookbooks/ohai/libraries/matchers.rb +41 -0
  167. data/cookbooks/ohai/metadata.json +1 -0
  168. data/cookbooks/ohai/recipes/default.rb +20 -0
  169. data/cookbooks/ohai/resources/hint.rb +55 -0
  170. data/cookbooks/ohai/resources/plugin.rb +117 -0
  171. data/cookbooks/selinux_policy/.gitignore +51 -0
  172. data/cookbooks/selinux_policy/.kitchen.yml +25 -0
  173. data/cookbooks/selinux_policy/.rubocop.yml +2 -0
  174. data/cookbooks/selinux_policy/.travis.yml +26 -0
  175. data/cookbooks/selinux_policy/Berksfile +8 -0
  176. data/cookbooks/selinux_policy/CHANGELOG.md +155 -0
  177. data/cookbooks/selinux_policy/LICENSE +13 -0
  178. data/cookbooks/selinux_policy/README.md +217 -0
  179. data/cookbooks/selinux_policy/Rakefile +68 -0
  180. data/cookbooks/selinux_policy/TESTING.md +2 -0
  181. data/cookbooks/selinux_policy/Thorfile +12 -0
  182. data/cookbooks/selinux_policy/attributes/default.rb +5 -0
  183. data/cookbooks/selinux_policy/chefignore +102 -0
  184. data/cookbooks/selinux_policy/libraries/helper-disabled.rb +29 -0
  185. data/cookbooks/selinux_policy/libraries/matchers.rb +57 -0
  186. data/cookbooks/selinux_policy/metadata.json +58 -0
  187. data/cookbooks/selinux_policy/metadata.rb +20 -0
  188. data/cookbooks/selinux_policy/providers/boolean.rb +28 -0
  189. data/cookbooks/selinux_policy/providers/fcontext.rb +78 -0
  190. data/cookbooks/selinux_policy/providers/module.rb +81 -0
  191. data/cookbooks/selinux_policy/providers/permissive.rb +26 -0
  192. data/cookbooks/selinux_policy/providers/port.rb +58 -0
  193. data/cookbooks/selinux_policy/recipes/default.rb +9 -0
  194. data/cookbooks/selinux_policy/recipes/install.rb +32 -0
  195. data/cookbooks/selinux_policy/resources/boolean.rb +8 -0
  196. data/cookbooks/selinux_policy/resources/fcontext.rb +8 -0
  197. data/cookbooks/selinux_policy/resources/module.rb +21 -0
  198. data/cookbooks/selinux_policy/resources/permissive.rb +6 -0
  199. data/cookbooks/selinux_policy/resources/port.rb +9 -0
  200. data/cookbooks/seven_zip/CHANGELOG.md +30 -0
  201. data/cookbooks/seven_zip/README.md +108 -0
  202. data/cookbooks/seven_zip/attributes/default.rb +31 -0
  203. data/cookbooks/seven_zip/libraries/matchers.rb +33 -0
  204. data/cookbooks/seven_zip/metadata.json +1 -0
  205. data/cookbooks/seven_zip/providers/archive.rb +68 -0
  206. data/cookbooks/seven_zip/recipes/default.rb +41 -0
  207. data/cookbooks/seven_zip/resources/archive.rb +29 -0
  208. data/cookbooks/windows/.foodcritic +2 -0
  209. data/cookbooks/windows/CHANGELOG.md +528 -0
  210. data/cookbooks/windows/CONTRIBUTING.md +2 -0
  211. data/cookbooks/windows/MAINTAINERS.md +21 -0
  212. data/cookbooks/windows/README.md +803 -0
  213. data/cookbooks/windows/attributes/default.rb +21 -0
  214. data/cookbooks/windows/files/dism_features.rb +45 -0
  215. data/cookbooks/windows/libraries/matchers.rb +586 -0
  216. data/cookbooks/windows/libraries/powershell_helper.rb +53 -0
  217. data/cookbooks/windows/libraries/registry_helper.rb +356 -0
  218. data/cookbooks/windows/libraries/version.rb +207 -0
  219. data/cookbooks/windows/libraries/version_helper.rb +79 -0
  220. data/cookbooks/windows/libraries/windows_helper.rb +174 -0
  221. data/cookbooks/windows/libraries/windows_privileged.rb +103 -0
  222. data/cookbooks/windows/libraries/wmi_helper.rb +32 -0
  223. data/cookbooks/windows/metadata.json +1 -0
  224. data/cookbooks/windows/recipes/default.rb +21 -0
  225. data/cookbooks/windows/resources/auto_run.rb +46 -0
  226. data/cookbooks/windows/resources/certificate.rb +166 -0
  227. data/cookbooks/windows/resources/certificate_binding.rb +128 -0
  228. data/cookbooks/windows/resources/feature.rb +82 -0
  229. data/cookbooks/windows/resources/feature_dism.rb +108 -0
  230. data/cookbooks/windows/resources/feature_powershell.rb +70 -0
  231. data/cookbooks/windows/resources/feature_servermanagercmd.rb +76 -0
  232. data/cookbooks/windows/resources/font.rb +80 -0
  233. data/cookbooks/windows/resources/http_acl.rb +110 -0
  234. data/cookbooks/windows/resources/pagefile.rb +152 -0
  235. data/cookbooks/windows/resources/path.rb +54 -0
  236. data/cookbooks/windows/resources/printer.rb +103 -0
  237. data/cookbooks/windows/resources/printer_port.rb +101 -0
  238. data/cookbooks/windows/resources/share.rb +291 -0
  239. data/cookbooks/windows/resources/shortcut.rb +53 -0
  240. data/cookbooks/windows/resources/task.rb +384 -0
  241. data/cookbooks/windows/resources/zipfile.rb +125 -0
  242. data/cookbooks/yum/.foodcritic +1 -0
  243. data/cookbooks/yum/CHANGELOG.md +351 -0
  244. data/cookbooks/yum/CONTRIBUTING.md +2 -0
  245. data/cookbooks/yum/MAINTAINERS.md +16 -0
  246. data/cookbooks/yum/README.md +125 -0
  247. data/cookbooks/yum/attributes/main.rb +103 -0
  248. data/cookbooks/yum/libraries/matchers.rb +9 -0
  249. data/cookbooks/yum/metadata.json +1 -0
  250. data/cookbooks/yum/recipes/default.rb +26 -0
  251. data/cookbooks/yum/recipes/dnf_yum_compat.rb +29 -0
  252. data/cookbooks/yum/resources/globalconfig.rb +119 -0
  253. data/cookbooks/yum/templates/.DS_Store +0 -0
  254. data/cookbooks/yum/templates/main.erb +276 -0
  255. data/cookbooks/yum-epel/CHANGELOG.md +138 -0
  256. data/cookbooks/yum-epel/CONTRIBUTING.md +2 -0
  257. data/cookbooks/yum-epel/MAINTAINERS.md +19 -0
  258. data/cookbooks/yum-epel/README.md +172 -0
  259. data/cookbooks/yum-epel/attributes/default.rb +8 -0
  260. data/cookbooks/yum-epel/attributes/epel-debuginfo.rb +15 -0
  261. data/cookbooks/yum-epel/attributes/epel-source.rb +15 -0
  262. data/cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb +15 -0
  263. data/cookbooks/yum-epel/attributes/epel-testing-source.rb +15 -0
  264. data/cookbooks/yum-epel/attributes/epel-testing.rb +15 -0
  265. data/cookbooks/yum-epel/attributes/epel.rb +21 -0
  266. data/cookbooks/yum-epel/metadata.json +1 -0
  267. data/cookbooks/yum-epel/recipes/default.rb +27 -0
  268. data/cookbooks/yum-scl/.kitchen.dokken.yml +24 -0
  269. data/cookbooks/yum-scl/.kitchen.yml +24 -0
  270. data/cookbooks/yum-scl/.rubocop.yml +6 -0
  271. data/cookbooks/yum-scl/.travis.yml +28 -0
  272. data/cookbooks/yum-scl/Berksfile +3 -0
  273. data/cookbooks/yum-scl/Berksfile.lock +25 -0
  274. data/cookbooks/yum-scl/CHANGELOG.md +11 -0
  275. data/cookbooks/yum-scl/Gemfile +46 -0
  276. data/cookbooks/yum-scl/README.md +76 -0
  277. data/cookbooks/yum-scl/attributes/centos.rb +83 -0
  278. data/cookbooks/yum-scl/attributes/default.rb +15 -0
  279. data/cookbooks/yum-scl/attributes/scientific.rb +1 -0
  280. data/cookbooks/yum-scl/files/default/RPM-GPG-KEY-CentOS-SIG-SCLo +20 -0
  281. data/cookbooks/yum-scl/libraries/yum_scl_helper.rb +33 -0
  282. data/cookbooks/yum-scl/metadata.json +42 -0
  283. data/cookbooks/yum-scl/metadata.rb +12 -0
  284. data/cookbooks/yum-scl/recipes/chef_install.rb +52 -0
  285. data/cookbooks/yum-scl/recipes/default.rb +17 -0
  286. data/cookbooks/yum-scl/recipes/native_install.rb +35 -0
  287. data/lib/vagrant-clone/command/clone.rb +66 -61
  288. data/lib/vagrant-clone/errors.rb +61 -0
  289. data/lib/vagrant-clone/util/clone_manager_base.rb +69 -0
  290. data/lib/vagrant-clone/util/clone_managers/docker.rb +31 -0
  291. data/lib/vagrant-clone/util/clone_managers/libvirt.rb +254 -0
  292. data/lib/vagrant-clone/util/vagrantfile_managers/docker.rb +154 -0
  293. data/lib/vagrant-clone/util/vagrantfile_managers/libvirt.rb +159 -0
  294. data/lib/vagrant-clone/version.rb +2 -2
  295. data/lib/vagrant-clone.rb +6 -6
  296. data/libvirt.txt +7 -0
  297. data/performance_testing.rb +165 -0
  298. data/results.txt +45 -0
  299. data/scripts/create_box.sh +134 -0
  300. data/test.rb +92 -0
  301. data/tools/create_box.sh +130 -0
  302. data/vagrant-clone.gemspec +7 -7
  303. metadata +296 -5
  304. data/lib/vagrant-clone/command/errors.rb +0 -16
  305. data/lib/vagrant-clone/command/provider/docker.rb +0 -13
  306. data/lib/vagrant-clone/utils/vagrantfile_manager.rb +0 -47
@@ -0,0 +1,29 @@
1
+ module ChefCompat
2
+ module CopiedFromChef
3
+ def self.extend_chef_module(chef_module, target)
4
+ target.instance_eval do
5
+ include chef_module
6
+ @chef_module = chef_module
7
+ def self.method_missing(name, *args, &block)
8
+ @chef_module.send(name, *args, &block)
9
+ end
10
+ def self.const_missing(name)
11
+ @chef_module.const_get(name)
12
+ end
13
+ end
14
+ end
15
+
16
+ # This patch to CopiedFromChef's ActionClass is necessary for the include to work
17
+ require 'chef/resource'
18
+ class Chef < ::Chef
19
+ class Resource < ::Chef::Resource
20
+ module ActionClass
21
+ def self.use_inline_resources
22
+ end
23
+ def self.include_resource_dsl(include_resource_dsl)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,8 @@
1
+ require 'chef_compat/monkeypatches'
2
+ require 'chef_compat/copied_from_chef/chef/mixin/properties'
3
+
4
+ module ChefCompat
5
+ module Mixin
6
+ Properties = ChefCompat::CopiedFromChef::Chef::Mixin::Properties
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ require 'chef/exceptions'
2
+
3
+ class Chef
4
+ class Exceptions
5
+ # Used in Resource::ActionClass#load_current_resource to denote that
6
+ # the resource doesn't actually exist (for example, the file does not exist)
7
+ class CurrentValueDoesNotExist < RuntimeError; end unless defined?(CurrentValueDoesNotExist)
8
+ class CannotValidateStaticallyError < RuntimeError; end unless defined?(CannotValidateStaticallyError)
9
+ end
10
+ end
@@ -0,0 +1,30 @@
1
+ require 'chef/log'
2
+
3
+ # for now we have to patch this in everything
4
+ class Chef
5
+ class Log
6
+ def self.caller_location
7
+ # Pick the first caller that is *not* part of the Chef gem, that's the
8
+ # thing the user wrote.
9
+ compat_resource_path = File.expand_path("../../../../..", __FILE__)
10
+ chef_gem_path = Gem.loaded_specs['chef'].full_gem_path
11
+ caller(0..20).find { |c| !c.start_with?(compat_resource_path) && !c.start_with?(chef_gem_path) }
12
+ end
13
+ end
14
+ end
15
+
16
+ if Gem::Requirement.new('< 12.13.37').satisfied_by?(Gem::Version.new(Chef::VERSION))
17
+
18
+ # FIXME: why does this not match the implementation in Chef itself?
19
+ class Chef
20
+ class Log
21
+ module ChefCompatDeprecation
22
+ def deprecation(message, location=nil)
23
+ Chef.log_deprecation(message, location)
24
+ end
25
+ end
26
+ extend ChefCompatDeprecation
27
+ end
28
+ end
29
+
30
+ end
@@ -0,0 +1,17 @@
1
+ if Chef::VERSION.to_f >= 12.5 && Chef::VERSION.to_f <= 12.8
2
+ require 'chef/mixin/params_validate'
3
+ class Chef
4
+ module Mixin
5
+ module ParamsValidate
6
+ class SetOrReturnProperty < Chef::Property
7
+ # 12.9 introduced a new optional parameter to `get()` to avoid a nil-set warning.
8
+ # When their method gets called with 2 args, we need to ignore and call with 1.
9
+ alias_method :_original_get2, :get
10
+ def get(resource, *args)
11
+ _original_get2(resource)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,9 @@
1
+ class Chef
2
+ class Node
3
+ unless method_defined?(:set_cookbook_attribute)
4
+ def set_cookbook_attribute
5
+ # this implementation deliberately left blank - we don't need to do anything we just need to not fail
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,15 @@
1
+ # 12.9 introduced a new optional parameter to `get()` to avoid a nil-set warning.
2
+ # We need to mimick it here.
3
+ if Chef::VERSION.to_f >= 12.5 && Chef::VERSION.to_f <= 12.8
4
+ require 'chef/property'
5
+ class Chef
6
+ class Property
7
+ # 12.9 introduced a new optional parameter to `get()` to avoid a nil-set warning.
8
+ # When their method gets called with 2 args, we need to ignore and call with 1.
9
+ alias_method :_original_get, :get
10
+ def get(resource, *args)
11
+ _original_get(resource)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,65 @@
1
+ require 'chef/provider'
2
+ require 'chef/provider/lwrp_base'
3
+
4
+ class Chef::Provider
5
+ if !defined?(InlineResources)
6
+ InlineResources = Chef::Provider::LWRPBase::InlineResources
7
+ end
8
+ module InlineResources
9
+ require 'chef/dsl/recipe'
10
+ require 'chef/dsl/platform_introspection'
11
+ require 'chef/dsl/data_query'
12
+ require 'chef/dsl/include_recipe'
13
+ include Chef::DSL::Recipe
14
+ include Chef::DSL::PlatformIntrospection
15
+ include Chef::DSL::DataQuery
16
+ include Chef::DSL::IncludeRecipe
17
+
18
+ unless Chef::Provider::InlineResources::ClassMethods.instance_method(:action).source_location[0] =~ /chefspec/
19
+ # Don't override action if chefspec is doing its thing
20
+ module ::ChefCompat
21
+ module Monkeypatches
22
+ module InlineResources
23
+ module ClassMethods
24
+ def action(name, &block)
25
+ super(name) { send("compile_action_#{name}") }
26
+ # We put the action in its own method so that super() works.
27
+ define_method("compile_action_#{name}", &block)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ module ClassMethods
34
+ prepend ChefCompat::Monkeypatches::InlineResources::ClassMethods
35
+ end
36
+ end
37
+ end
38
+ end
39
+
40
+
41
+ class Chef
42
+ class Provider
43
+ class LWRPBase < Provider
44
+ if defined?(InlineResources)
45
+ module InlineResources
46
+ # since we upgrade the Chef::Runner and Chef::RunContext globally to >= 12.14 style classes, we need to also
47
+ # fix the use_inline_resources LWRPBase wrapper that creates a sub-resource collection with the ugpraded code
48
+ # from the Chef::Provider subclasses that do similar things in post-12.5 chef.
49
+ def recipe_eval_with_update_check(&block)
50
+ old_run_context = run_context
51
+ @run_context = run_context.create_child
52
+ return_value = instance_eval(&block)
53
+ Chef::Runner.new(run_context).converge
54
+ return_value
55
+ ensure
56
+ if run_context.resource_collection.any? { |r| r.updated? }
57
+ new_resource.updated_by_last_action(true)
58
+ end
59
+ @run_context = old_run_context
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,118 @@
1
+ #
2
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
3
+ #
4
+ # THIS IS A FILE AUTOGENERATED BY 'rake update' DO NOT EDIT!!!!
5
+ #
6
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
7
+ #
8
+
9
+ if Gem::Requirement.new('< 12.16.42').satisfied_by?(Gem::Version.new(Chef::VERSION))
10
+ #--
11
+ # Author:: Adam Jacob (<adam@chef.io>)
12
+ # Author:: Christopher Walters (<cw@chef.io>)
13
+ # Copyright:: Copyright 2008-2016, Chef Software Inc.
14
+ # License:: Apache License, Version 2.0
15
+ #
16
+ # Licensed under the Apache License, Version 2.0 (the "License");
17
+ # you may not use this file except in compliance with the License.
18
+ # You may obtain a copy of the License at
19
+ #
20
+ # http://www.apache.org/licenses/LICENSE-2.0
21
+ #
22
+ # Unless required by applicable law or agreed to in writing, software
23
+ # distributed under the License is distributed on an "AS IS" BASIS,
24
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25
+ # See the License for the specific language governing permissions and
26
+ # limitations under the License.
27
+ #
28
+
29
+ require "chef/dsl/recipe"
30
+ require "chef/mixin/from_file"
31
+ require "chef/mixin/deprecation"
32
+
33
+ class Chef
34
+ # == Chef::Recipe
35
+ # A Recipe object is the context in which Chef recipes are evaluated.
36
+ class Recipe
37
+ attr_accessor :cookbook_name, :recipe_name, :recipe, :params, :run_context
38
+
39
+ include Chef::DSL::Recipe
40
+
41
+ include Chef::Mixin::FromFile
42
+ include Chef::Mixin::Deprecation
43
+
44
+ # Parses a potentially fully-qualified recipe name into its
45
+ # cookbook name and recipe short name.
46
+ #
47
+ # For example:
48
+ # "aws::elastic_ip" returns [:aws, "elastic_ip"]
49
+ # "aws" returns [:aws, "default"]
50
+ # "::elastic_ip" returns [ current_cookbook, "elastic_ip" ]
51
+ #--
52
+ # TODO: Duplicates functionality of RunListItem
53
+ def self.parse_recipe_name(recipe_name, current_cookbook: nil)
54
+ case recipe_name
55
+ when /(.+?)::(.+)/
56
+ [ $1.to_sym, $2 ]
57
+ when /^::(.+)/
58
+ raise "current_cookbook is nil, cannot resolve #{recipe_name}" if current_cookbook.nil?
59
+ [ current_cookbook.to_sym, $1 ]
60
+ else
61
+ [ recipe_name.to_sym, "default" ]
62
+ end
63
+ end
64
+
65
+ def initialize(cookbook_name, recipe_name, run_context)
66
+ @cookbook_name = cookbook_name
67
+ @recipe_name = recipe_name
68
+ @run_context = run_context
69
+ # TODO: 5/19/2010 cw/tim: determine whether this can be removed
70
+ @params = Hash.new
71
+ end
72
+
73
+ # Used in DSL mixins
74
+ def node
75
+ run_context.node
76
+ end
77
+
78
+ # Used by the DSL to look up resources when executing in the context of a
79
+ # recipe.
80
+ def resources(*args)
81
+ run_context.resource_collection.find(*args)
82
+ end
83
+
84
+ # This was moved to Chef::Node#tag, redirecting here for compatibility
85
+ def tag(*tags)
86
+ run_context.node.tag(*tags)
87
+ end
88
+
89
+ # Returns true if the node is tagged with *all* of the supplied +tags+.
90
+ #
91
+ # === Parameters
92
+ # tags<Array>:: A list of tags
93
+ #
94
+ # === Returns
95
+ # true<TrueClass>:: If all the parameters are present
96
+ # false<FalseClass>:: If any of the parameters are missing
97
+ def tagged?(*tags)
98
+ tags.each do |tag|
99
+ return false unless run_context.node.tags.include?(tag)
100
+ end
101
+ true
102
+ end
103
+
104
+ # Removes the list of tags from the node.
105
+ #
106
+ # === Parameters
107
+ # tags<Array>:: A list of tags
108
+ #
109
+ # === Returns
110
+ # tags<Array>:: The current list of run_context.node.tags
111
+ def untag(*tags)
112
+ tags.each do |tag|
113
+ run_context.node.tags.delete(tag)
114
+ end
115
+ end
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,20 @@
1
+ require 'chef/recipe'
2
+ require 'chef_compat/recipe'
3
+
4
+ class Chef::Recipe
5
+ # If the cookbook depends on compat_resource, create a ChefCompat::Recipe object
6
+ # instead of Chef::Recipe, for the extra goodies.
7
+ def self.new(cookbook_name, recipe_name, run_context)
8
+ if run_context &&
9
+ cookbook_name &&
10
+ recipe_name &&
11
+ run_context.cookbook_collection &&
12
+ run_context.cookbook_collection[cookbook_name] &&
13
+ run_context.cookbook_collection[cookbook_name].metadata.dependencies.has_key?('compat_resource') &&
14
+ self != ::ChefCompat::Recipe
15
+ ::ChefCompat::Recipe.new(cookbook_name, recipe_name, run_context)
16
+ else
17
+ super
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,60 @@
1
+ require 'chef_compat/resource/lwrp_base'
2
+ require 'chef/resource/lwrp_base'
3
+
4
+ module ChefCompat
5
+ module Monkeypatches
6
+ #
7
+ # NOTE: LOTS OF METAPROGRAMMING HERE. NOT FOR FAINT OF HEART.
8
+ #
9
+
10
+ # Add an empty module to Class so we can temporarily override it in build_from_file
11
+ module Class
12
+ end
13
+ class<<::Class
14
+ prepend(ChefCompat::Monkeypatches::Class)
15
+ end
16
+
17
+ module Chef
18
+ module Resource
19
+ module LWRPBase
20
+ def build_from_file(cookbook_name, filename, run_context)
21
+ # If the cookbook this LWRP is from depends on compat_resource, fix its LWRPs up real good
22
+ if run_context.cookbook_collection[cookbook_name].metadata.dependencies.has_key?('compat_resource')
23
+ # All cookbooks do Class.new(Chef::Resource::LWRPBase). Change Class.new
24
+ # temporarily to translate Chef::Resource::LWRPBase to ChefCompat::Resource
25
+ ChefCompat::Monkeypatches::Class.module_eval do
26
+ def new(*args, &block)
27
+ # Trick it! Use ChefCompat::Resource instead of Chef::Resource::LWRPBase
28
+ if args == [ ::Chef::Resource::LWRPBase ]
29
+ ChefCompat::Monkeypatches::Class.module_eval do
30
+ remove_method(:new) if method_defined?(:new)
31
+ end
32
+ args = [ ChefCompat::Resource::LWRPBase ]
33
+ end
34
+ super(*args, &block)
35
+ end
36
+ end
37
+
38
+ begin
39
+
40
+ # Call the actual build_from_file
41
+ super
42
+
43
+ ensure
44
+ class<<ChefCompat::Monkeypatches::Class
45
+ remove_method(:new) if method_defined?(:new)
46
+ end
47
+ end
48
+ else
49
+ # Call the actual build_from_file
50
+ super
51
+ end
52
+ end
53
+ end
54
+ class <<::Chef::Resource::LWRPBase
55
+ prepend(LWRPBase)
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,156 @@
1
+ # this is NOT an AUTOGENERATED file
2
+
3
+ require 'chef/resource'
4
+
5
+ class Chef
6
+ class Resource
7
+
8
+ class UnresolvedSubscribes < self
9
+ # The full key ise given as the name in {Resource#subscribes}
10
+ alias_method :to_s, :name
11
+ alias_method :declared_key, :name
12
+ end
13
+
14
+ #
15
+ # Force a delayed notification into this resource's run_context.
16
+ #
17
+ # This should most likely be paired with action :nothing
18
+ #
19
+ # @param arg [Array[Symbol], Symbol] A list of actions (e.g. `:create`)
20
+ #
21
+ def delayed_action(arg)
22
+ arg = Array(arg).map(&:to_sym)
23
+ arg.map do |action|
24
+ validate(
25
+ { action: action },
26
+ { action: { kind_of: Symbol, equal_to: allowed_actions } }
27
+ )
28
+ # the resource effectively sends a delayed notification to itself
29
+ run_context.add_delayed_action(Notification.new(self, action, self))
30
+ end
31
+ end
32
+
33
+ def subscribes(action, resources, timing = :delayed)
34
+ resources = [resources].flatten
35
+ resources.each do |resource|
36
+ if resource.is_a?(String)
37
+ resource = UnresolvedSubscribes.new(resource, run_context)
38
+ end
39
+ if resource.run_context.nil?
40
+ resource.run_context = run_context
41
+ end
42
+ resource.notifies(action, self, timing)
43
+ end
44
+ true
45
+ end
46
+
47
+ def notifies(action, resource_spec, timing = :delayed)
48
+ # when using old-style resources(:template => "/foo.txt") style, you
49
+ # could end up with multiple resources.
50
+ validate_resource_spec!(resource_spec)
51
+
52
+ resources = [ resource_spec ].flatten
53
+ resources.each do |resource|
54
+
55
+ case timing.to_s
56
+ when "delayed"
57
+ notifies_delayed(action, resource)
58
+ when "immediate", "immediately"
59
+ notifies_immediately(action, resource)
60
+ when "before"
61
+ notifies_before(action, resource)
62
+ else
63
+ raise ArgumentError, "invalid timing: #{timing} for notifies(#{action}, #{resources.inspect}, #{timing}) resource #{self} "\
64
+ "Valid timings are: :delayed, :immediate, :immediately, :before"
65
+ end
66
+ end
67
+
68
+ true
69
+ end
70
+
71
+ #
72
+ # Iterates over all immediate and delayed notifications, calling
73
+ # resolve_resource_reference on each in turn, causing them to
74
+ # resolve lazy/forward references.
75
+ def resolve_notification_references
76
+ run_context.before_notifications(self).each { |n|
77
+ n.resolve_resource_reference(run_context.resource_collection)
78
+ }
79
+ run_context.immediate_notifications(self).each { |n|
80
+ n.resolve_resource_reference(run_context.resource_collection)
81
+ }
82
+ run_context.delayed_notifications(self).each {|n|
83
+ n.resolve_resource_reference(run_context.resource_collection)
84
+ }
85
+ end
86
+
87
+ # Helper for #notifies
88
+ def notifies_before(action, resource_spec)
89
+ run_context.notifies_before(Notification.new(resource_spec, action, self))
90
+ end
91
+
92
+ # Helper for #notifies
93
+ def notifies_immediately(action, resource_spec)
94
+ run_context.notifies_immediately(Notification.new(resource_spec, action, self))
95
+ end
96
+
97
+ # Helper for #notifies
98
+ def notifies_delayed(action, resource_spec)
99
+ run_context.notifies_delayed(Notification.new(resource_spec, action, self))
100
+ end
101
+
102
+ #
103
+ # Get the current actual value of this resource.
104
+ #
105
+ # This does not cache--a new value will be returned each time.
106
+ #
107
+ # @return A new copy of the resource, with values filled in from the actual
108
+ # current value.
109
+ #
110
+ def current_value
111
+ provider = provider_for_action(Array(action).first)
112
+ if provider.whyrun_mode? && !provider.whyrun_supported?
113
+ raise "Cannot retrieve #{self.class.current_resource} in why-run mode: #{provider} does not support why-run"
114
+ end
115
+ provider.load_current_resource
116
+ provider.current_resource
117
+ end
118
+
119
+ # These methods are necessary for new resources to initialize old ones properly
120
+ attr_reader :resource_initializing
121
+ def resource_initializing=(value)
122
+ if value
123
+ @resource_initializing = value
124
+ else
125
+ remove_instance_variable(:@resource_initializing)
126
+ end
127
+ end
128
+
129
+ if !respond_to?(:resource_name)
130
+ def self.resource_name(name=Chef::NOT_PASSED)
131
+ # Setter
132
+ if name != Chef::NOT_PASSED
133
+ # remove_canonical_dsl
134
+
135
+ # Set the resource_name and call provides
136
+ if name
137
+ name = name.to_sym
138
+ # If our class is not already providing this name, provide it.
139
+ # Commented out: use of resource_name and provides will need to be
140
+ # mutually exclusive in this world, generally.
141
+ # if !Chef::ResourceResolver.includes_handler?(name, self)
142
+ provides name#, canonical: true
143
+ # end
144
+ @resource_name = name
145
+ else
146
+ @resource_name = nil
147
+ end
148
+ end
149
+ @resource_name
150
+ end
151
+ def self.resource_name=(name)
152
+ resource_name(name)
153
+ end
154
+ end
155
+ end
156
+ end