puppet 5.5.16-universal-darwin → 5.5.21-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

Files changed (359) hide show
  1. checksums.yaml +4 -4
  2. data/CODEOWNERS +10 -10
  3. data/Gemfile +2 -3
  4. data/Gemfile.lock +57 -52
  5. data/ext/build_defaults.yaml +1 -0
  6. data/ext/cert_inspector +3 -3
  7. data/ext/project_data.yaml +2 -2
  8. data/ext/puppet-test +2 -2
  9. data/ext/regexp_nodes/regexp_nodes.rb +4 -4
  10. data/ext/windows/service/daemon.rb +54 -8
  11. data/install.rb +6 -24
  12. data/lib/puppet.rb +5 -2
  13. data/lib/puppet/agent.rb +5 -13
  14. data/lib/puppet/application.rb +1 -1
  15. data/lib/puppet/application/agent.rb +15 -1
  16. data/lib/puppet/application/apply.rb +2 -2
  17. data/lib/puppet/application/describe.rb +3 -9
  18. data/lib/puppet/application/device.rb +4 -4
  19. data/lib/puppet/application/doc.rb +1 -1
  20. data/lib/puppet/application/filebucket.rb +13 -0
  21. data/lib/puppet/application/lookup.rb +1 -1
  22. data/lib/puppet/application/resource.rb +4 -4
  23. data/lib/puppet/application/script.rb +2 -2
  24. data/lib/puppet/configurer.rb +86 -28
  25. data/lib/puppet/configurer/downloader.rb +2 -6
  26. data/lib/puppet/daemon.rb +1 -1
  27. data/lib/puppet/defaults.rb +82 -38
  28. data/lib/puppet/error.rb +9 -1
  29. data/lib/puppet/external/nagios/base.rb +1 -1
  30. data/lib/puppet/face/ca.rb +1 -1
  31. data/lib/puppet/face/config.rb +10 -48
  32. data/lib/puppet/face/facts.rb +1 -1
  33. data/lib/puppet/face/module/list.rb +5 -5
  34. data/lib/puppet/face/module/search.rb +1 -1
  35. data/lib/puppet/face/module/uninstall.rb +1 -1
  36. data/lib/puppet/face/module/upgrade.rb +1 -1
  37. data/lib/puppet/face/plugin.rb +9 -2
  38. data/lib/puppet/file_serving/http_metadata.rb +1 -1
  39. data/lib/puppet/file_system.rb +0 -8
  40. data/lib/puppet/file_system/memory_file.rb +1 -1
  41. data/lib/puppet/file_system/posix.rb +3 -2
  42. data/lib/puppet/file_system/uniquefile.rb +4 -0
  43. data/lib/puppet/forge.rb +3 -3
  44. data/lib/puppet/functions/epp.rb +4 -4
  45. data/lib/puppet/functions/inline_epp.rb +5 -5
  46. data/lib/puppet/functions/reduce.rb +2 -4
  47. data/lib/puppet/gettext/module_translations.rb +1 -1
  48. data/lib/puppet/graph/rb_tree_map.rb +2 -2
  49. data/lib/puppet/graph/simple_graph.rb +6 -5
  50. data/lib/puppet/indirector/catalog/compiler.rb +8 -0
  51. data/lib/puppet/indirector/file_bucket_file/file.rb +1 -1
  52. data/lib/puppet/indirector/hiera.rb +2 -0
  53. data/lib/puppet/indirector/resource/ral.rb +1 -3
  54. data/lib/puppet/indirector/resource/validator.rb +1 -1
  55. data/lib/puppet/interface.rb +2 -1
  56. data/lib/puppet/loaders.rb +0 -1
  57. data/lib/puppet/metatype/manager.rb +1 -1
  58. data/lib/puppet/module.rb +1 -1
  59. data/lib/puppet/module_tool/applications/builder.rb +1 -1
  60. data/lib/puppet/module_tool/applications/installer.rb +1 -1
  61. data/lib/puppet/module_tool/applications/uninstaller.rb +3 -3
  62. data/lib/puppet/module_tool/metadata.rb +1 -1
  63. data/lib/puppet/module_tool/shared_behaviors.rb +4 -4
  64. data/lib/puppet/module_tool/tar/mini.rb +12 -2
  65. data/lib/puppet/network/http/api/indirected_routes.rb +13 -12
  66. data/lib/puppet/network/http/api/master/v3/environment.rb +3 -0
  67. data/lib/puppet/network/http/connection.rb +14 -12
  68. data/lib/puppet/network/http/factory.rb +1 -11
  69. data/lib/puppet/network/http/pool.rb +7 -1
  70. data/lib/puppet/network/http/rack/rest.rb +2 -2
  71. data/lib/puppet/network/http/site.rb +1 -1
  72. data/lib/puppet/network/resolver.rb +2 -2
  73. data/lib/puppet/node/environment.rb +4 -2
  74. data/lib/puppet/parameter.rb +8 -0
  75. data/lib/puppet/parser/ast.rb +1 -1
  76. data/lib/puppet/parser/ast/resourceparam.rb +1 -1
  77. data/lib/puppet/parser/compiler/catalog_validator/env_relationship_validator.rb +2 -0
  78. data/lib/puppet/parser/compiler/catalog_validator/site_validator.rb +2 -0
  79. data/lib/puppet/parser/environment_compiler.rb +3 -0
  80. data/lib/puppet/parser/functions.rb +1 -1
  81. data/lib/puppet/parser/functions/epp.rb +3 -3
  82. data/lib/puppet/parser/functions/inline_epp.rb +5 -5
  83. data/lib/puppet/parser/resource.rb +3 -2
  84. data/lib/puppet/parser/resource/param.rb +6 -0
  85. data/lib/puppet/pops/evaluator/access_operator.rb +2 -2
  86. data/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +1 -1
  87. data/lib/puppet/pops/evaluator/collectors/exported_collector.rb +1 -1
  88. data/lib/puppet/pops/evaluator/evaluator_impl.rb +1 -1
  89. data/lib/puppet/pops/evaluator/external_syntax_support.rb +3 -2
  90. data/lib/puppet/pops/evaluator/runtime3_support.rb +4 -4
  91. data/lib/puppet/pops/issues.rb +5 -0
  92. data/lib/puppet/pops/loaders.rb +1 -1
  93. data/lib/puppet/pops/lookup/hiera_config.rb +1 -0
  94. data/lib/puppet/pops/lookup/sub_lookup.rb +1 -1
  95. data/lib/puppet/pops/merge_strategy.rb +22 -18
  96. data/lib/puppet/pops/parser/heredoc_support.rb +1 -1
  97. data/lib/puppet/pops/parser/interpolation_support.rb +4 -4
  98. data/lib/puppet/pops/parser/locator.rb +1 -1
  99. data/lib/puppet/pops/parser/pn_parser.rb +17 -16
  100. data/lib/puppet/pops/puppet_stack.rb +51 -48
  101. data/lib/puppet/pops/resource/resource_type_impl.rb +2 -0
  102. data/lib/puppet/pops/types/p_sensitive_type.rb +1 -1
  103. data/lib/puppet/pops/types/string_converter.rb +10 -10
  104. data/lib/puppet/pops/types/type_calculator.rb +24 -0
  105. data/lib/puppet/pops/types/types.rb +3 -3
  106. data/lib/puppet/pops/validation/checker4_0.rb +10 -0
  107. data/lib/puppet/pops/validation/validator_factory_4_0.rb +1 -0
  108. data/lib/puppet/property.rb +1 -1
  109. data/lib/puppet/property/ensure.rb +1 -1
  110. data/lib/puppet/provider/augeas/augeas.rb +1 -1
  111. data/lib/puppet/provider/cron/crontab.rb +1 -1
  112. data/lib/puppet/provider/exec.rb +6 -2
  113. data/lib/puppet/provider/file/posix.rb +5 -0
  114. data/lib/puppet/provider/group/groupadd.rb +19 -19
  115. data/lib/puppet/provider/group/windows_adsi.rb +3 -3
  116. data/lib/puppet/provider/mailalias/aliases.rb +1 -1
  117. data/lib/puppet/provider/mount.rb +1 -1
  118. data/lib/puppet/provider/mount/parsed.rb +8 -8
  119. data/lib/puppet/provider/nameservice.rb +10 -3
  120. data/lib/puppet/provider/nameservice/directoryservice.rb +1 -1
  121. data/lib/puppet/provider/nameservice/pw.rb +2 -2
  122. data/lib/puppet/provider/package/aix.rb +17 -2
  123. data/lib/puppet/provider/package/apt.rb +14 -3
  124. data/lib/puppet/provider/package/dnf.rb +1 -1
  125. data/lib/puppet/provider/package/dnfmodule.rb +141 -0
  126. data/lib/puppet/provider/package/dpkg.rb +16 -18
  127. data/lib/puppet/provider/package/fink.rb +20 -3
  128. data/lib/puppet/provider/package/openbsd.rb +14 -2
  129. data/lib/puppet/provider/package/pip.rb +37 -10
  130. data/lib/puppet/provider/package/pkg.rb +18 -5
  131. data/lib/puppet/provider/package/pkgdmg.rb +1 -1
  132. data/lib/puppet/provider/package/pkgng.rb +16 -4
  133. data/lib/puppet/provider/package/portage.rb +4 -4
  134. data/lib/puppet/provider/package/rpm.rb +57 -19
  135. data/lib/puppet/provider/package/windows/package.rb +1 -1
  136. data/lib/puppet/provider/package/yum.rb +35 -24
  137. data/lib/puppet/provider/package/zypper.rb +1 -0
  138. data/lib/puppet/provider/package_targetable.rb +5 -4
  139. data/lib/puppet/provider/parsedfile.rb +1 -1
  140. data/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +3 -3
  141. data/lib/puppet/provider/selmodule/semodule.rb +43 -26
  142. data/lib/puppet/provider/service/daemontools.rb +9 -9
  143. data/lib/puppet/provider/service/launchd.rb +20 -5
  144. data/lib/puppet/provider/service/openbsd.rb +1 -1
  145. data/lib/puppet/provider/service/rcng.rb +2 -2
  146. data/lib/puppet/provider/service/runit.rb +2 -8
  147. data/lib/puppet/provider/service/systemd.rb +35 -22
  148. data/lib/puppet/provider/service/windows.rb +8 -0
  149. data/lib/puppet/provider/user/directoryservice.rb +31 -6
  150. data/lib/puppet/provider/user/hpux.rb +1 -1
  151. data/lib/puppet/provider/user/pw.rb +12 -3
  152. data/lib/puppet/provider/user/user_role_add.rb +5 -1
  153. data/lib/puppet/provider/user/useradd.rb +62 -27
  154. data/lib/puppet/provider/user/windows_adsi.rb +4 -5
  155. data/lib/puppet/provider/yumrepo/inifile.rb +2 -2
  156. data/lib/puppet/reference/indirection.rb +2 -2
  157. data/lib/puppet/reference/metaparameter.rb +1 -3
  158. data/lib/puppet/reference/providers.rb +1 -1
  159. data/lib/puppet/reference/type.rb +3 -9
  160. data/lib/puppet/reports.rb +1 -1
  161. data/lib/puppet/resource.rb +18 -1
  162. data/lib/puppet/resource/catalog.rb +1 -1
  163. data/lib/puppet/resource/type.rb +8 -0
  164. data/lib/puppet/settings.rb +43 -3
  165. data/lib/puppet/settings/environment_conf.rb +1 -0
  166. data/lib/puppet/ssl/certificate.rb +2 -1
  167. data/lib/puppet/ssl/certificate_authority.rb +6 -5
  168. data/lib/puppet/ssl/certificate_authority/interface.rb +1 -1
  169. data/lib/puppet/ssl/certificate_factory.rb +2 -2
  170. data/lib/puppet/ssl/host.rb +3 -3
  171. data/lib/puppet/ssl/oids.rb +1 -1
  172. data/lib/puppet/test/test_helper.rb +15 -10
  173. data/lib/puppet/transaction/report.rb +1 -1
  174. data/lib/puppet/transaction/resource_harness.rb +1 -1
  175. data/lib/puppet/type.rb +15 -4
  176. data/lib/puppet/type/cron.rb +1 -1
  177. data/lib/puppet/type/exec.rb +21 -9
  178. data/lib/puppet/type/file.rb +14 -2
  179. data/lib/puppet/type/file/data_sync.rb +5 -1
  180. data/lib/puppet/type/group.rb +4 -2
  181. data/lib/puppet/type/interface.rb +1 -1
  182. data/lib/puppet/type/notify.rb +3 -2
  183. data/lib/puppet/type/package.rb +107 -8
  184. data/lib/puppet/type/schedule.rb +1 -1
  185. data/lib/puppet/type/selboolean.rb +17 -3
  186. data/lib/puppet/type/service.rb +9 -10
  187. data/lib/puppet/type/user.rb +6 -24
  188. data/lib/puppet/type/yumrepo.rb +3 -7
  189. data/lib/puppet/util.rb +47 -25
  190. data/lib/puppet/util/command_line/trollop.rb +1 -1
  191. data/lib/puppet/util/execution.rb +4 -3
  192. data/lib/puppet/util/http_proxy.rb +24 -16
  193. data/lib/puppet/util/instance_loader.rb +1 -1
  194. data/lib/puppet/util/log.rb +1 -1
  195. data/lib/puppet/util/log/destinations.rb +3 -12
  196. data/lib/puppet/util/logging.rb +30 -18
  197. data/lib/puppet/util/metric.rb +2 -2
  198. data/lib/puppet/util/monkey_patches.rb +1 -1
  199. data/lib/puppet/util/nagios_maker.rb +2 -2
  200. data/lib/puppet/util/network_device/cisco/device.rb +1 -1
  201. data/lib/puppet/util/network_device/cisco/interface.rb +2 -2
  202. data/lib/puppet/util/network_device/transport/ssh.rb +1 -1
  203. data/lib/puppet/util/pidlock.rb +12 -6
  204. data/lib/puppet/util/plist.rb +6 -0
  205. data/lib/puppet/util/provider_features.rb +2 -4
  206. data/lib/puppet/util/rdoc.rb +1 -1
  207. data/lib/puppet/util/reference.rb +1 -1
  208. data/lib/puppet/util/resource_template.rb +1 -1
  209. data/lib/puppet/util/selinux.rb +8 -2
  210. data/lib/puppet/util/windows/adsi.rb +60 -30
  211. data/lib/puppet/util/windows/api_types.rb +45 -32
  212. data/lib/puppet/util/windows/eventlog.rb +1 -6
  213. data/lib/puppet/util/windows/principal.rb +8 -6
  214. data/lib/puppet/util/windows/process.rb +16 -15
  215. data/lib/puppet/util/windows/registry.rb +17 -15
  216. data/lib/puppet/util/windows/security.rb +3 -0
  217. data/lib/puppet/util/windows/service.rb +149 -4
  218. data/lib/puppet/util/windows/sid.rb +4 -3
  219. data/lib/puppet/vendor.rb +1 -1
  220. data/lib/puppet/version.rb +1 -1
  221. data/lib/puppet_pal.rb +2 -2
  222. data/locales/puppet.pot +479 -443
  223. data/man/man5/puppet.conf.5 +38 -8
  224. data/man/man8/puppet-agent.8 +2 -2
  225. data/man/man8/puppet-apply.8 +1 -1
  226. data/man/man8/puppet-ca.8 +1 -1
  227. data/man/man8/puppet-catalog.8 +1 -1
  228. data/man/man8/puppet-cert.8 +1 -1
  229. data/man/man8/puppet-certificate.8 +1 -1
  230. data/man/man8/puppet-certificate_request.8 +1 -1
  231. data/man/man8/puppet-certificate_revocation_list.8 +1 -1
  232. data/man/man8/puppet-config.8 +1 -1
  233. data/man/man8/puppet-describe.8 +1 -1
  234. data/man/man8/puppet-device.8 +1 -1
  235. data/man/man8/puppet-doc.8 +1 -1
  236. data/man/man8/puppet-epp.8 +1 -1
  237. data/man/man8/puppet-facts.8 +1 -1
  238. data/man/man8/puppet-filebucket.8 +16 -1
  239. data/man/man8/puppet-generate.8 +1 -1
  240. data/man/man8/puppet-help.8 +1 -1
  241. data/man/man8/puppet-key.8 +1 -1
  242. data/man/man8/puppet-lookup.8 +1 -1
  243. data/man/man8/puppet-man.8 +1 -1
  244. data/man/man8/puppet-master.8 +1 -1
  245. data/man/man8/puppet-module.8 +1 -1
  246. data/man/man8/puppet-node.8 +1 -1
  247. data/man/man8/puppet-parser.8 +1 -1
  248. data/man/man8/puppet-plugin.8 +1 -1
  249. data/man/man8/puppet-report.8 +1 -1
  250. data/man/man8/puppet-resource.8 +1 -1
  251. data/man/man8/puppet-script.8 +1 -1
  252. data/man/man8/puppet-status.8 +1 -1
  253. data/man/man8/puppet.8 +2 -2
  254. data/spec/fixtures/integration/provider/mailalias/aliases/test1 +1 -0
  255. data/spec/fixtures/unit/provider/package/dnfmodule/dnf-module-list.txt +19 -0
  256. data/spec/fixtures/unit/provider/package/pkgng/pkg.version +2 -0
  257. data/spec/fixtures/unit/provider/package/yum/yum-check-update-subscription-manager.txt +9 -0
  258. data/spec/fixtures/unit/provider/service/systemd/list_unit_files_services +9 -0
  259. data/spec/integration/configurer_spec.rb +52 -0
  260. data/spec/integration/defaults_spec.rb +1 -2
  261. data/spec/integration/indirector/facts/facter_spec.rb +4 -0
  262. data/spec/integration/parser/compiler_spec.rb +11 -0
  263. data/spec/integration/provider/service/systemd_spec.rb +8 -5
  264. data/spec/integration/type/file_spec.rb +28 -0
  265. data/spec/integration/type/notify_spec.rb +46 -0
  266. data/spec/integration/util/execution_spec.rb +27 -0
  267. data/spec/integration/util/windows/adsi_spec.rb +6 -1
  268. data/spec/integration/util/windows/registry_spec.rb +7 -7
  269. data/spec/unit/agent_spec.rb +34 -26
  270. data/spec/unit/application/agent_spec.rb +18 -0
  271. data/spec/unit/application/apply_spec.rb +2 -12
  272. data/spec/unit/application/device_spec.rb +1 -1
  273. data/spec/unit/configurer/fact_handler_spec.rb +0 -4
  274. data/spec/unit/configurer_spec.rb +377 -397
  275. data/spec/unit/daemon_spec.rb +0 -1
  276. data/spec/unit/face/facts_spec.rb +9 -0
  277. data/spec/unit/face/plugin_spec.rb +8 -0
  278. data/spec/unit/file_system/uniquefile_spec.rb +11 -0
  279. data/spec/unit/forge/forge_spec.rb +1 -3
  280. data/spec/unit/forge/repository_spec.rb +1 -3
  281. data/spec/unit/indirector/catalog/compiler_spec.rb +45 -26
  282. data/spec/unit/indirector/resource/ral_spec.rb +4 -4
  283. data/spec/unit/module_tool/tar/mini_spec.rb +1 -1
  284. data/spec/unit/network/http/api/indirected_routes_spec.rb +28 -11
  285. data/spec/unit/network/http/connection_spec.rb +43 -1
  286. data/spec/unit/network/http/factory_spec.rb +27 -5
  287. data/spec/unit/network/http/pool_spec.rb +32 -0
  288. data/spec/unit/node_spec.rb +7 -4
  289. data/spec/unit/parser/environment_compiler_spec.rb +7 -0
  290. data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +8 -3
  291. data/spec/unit/pops/validator/validator_spec.rb +7 -0
  292. data/spec/unit/provider/exec_spec.rb +209 -0
  293. data/spec/unit/provider/group/groupadd_spec.rb +30 -1
  294. data/spec/unit/provider/group/windows_adsi_spec.rb +43 -10
  295. data/spec/unit/provider/package/aix_spec.rb +29 -0
  296. data/spec/unit/provider/package/apt_spec.rb +13 -2
  297. data/spec/unit/provider/package/aptitude_spec.rb +1 -0
  298. data/spec/unit/provider/package/aptrpm_spec.rb +1 -1
  299. data/spec/unit/provider/package/dnf_spec.rb +7 -0
  300. data/spec/unit/provider/package/dnfmodule_spec.rb +247 -0
  301. data/spec/unit/provider/package/dpkg_spec.rb +35 -7
  302. data/spec/unit/provider/package/openbsd_spec.rb +17 -0
  303. data/spec/unit/provider/package/pip_spec.rb +93 -22
  304. data/spec/unit/provider/package/pkg_spec.rb +13 -1
  305. data/spec/unit/provider/package/pkgdmg_spec.rb +1 -1
  306. data/spec/unit/provider/package/pkgng_spec.rb +36 -0
  307. data/spec/unit/provider/package/portage_spec.rb +4 -4
  308. data/spec/unit/provider/package/rpm_spec.rb +150 -16
  309. data/spec/unit/provider/package/yum_spec.rb +66 -0
  310. data/spec/unit/provider/package/zypper_spec.rb +13 -0
  311. data/spec/unit/provider/package_targetable_spec.rb +60 -0
  312. data/spec/unit/provider/selmodule_spec.rb +118 -47
  313. data/spec/unit/provider/service/daemontools_spec.rb +24 -0
  314. data/spec/unit/provider/service/launchd_spec.rb +28 -0
  315. data/spec/unit/provider/service/runit_spec.rb +24 -0
  316. data/spec/unit/provider/service/systemd_spec.rb +109 -36
  317. data/spec/unit/provider/service/windows_spec.rb +20 -0
  318. data/spec/unit/provider/user/directoryservice_spec.rb +41 -0
  319. data/spec/unit/provider/user/hpux_spec.rb +2 -2
  320. data/spec/unit/provider/user/openbsd_spec.rb +1 -0
  321. data/spec/unit/provider/user/pw_spec.rb +37 -0
  322. data/spec/unit/provider/user/useradd_spec.rb +122 -15
  323. data/spec/unit/provider/user/windows_adsi_spec.rb +3 -3
  324. data/spec/unit/puppet_pal_2pec.rb +3 -0
  325. data/spec/unit/resource_spec.rb +26 -1
  326. data/spec/unit/ssl/certificate_authority_spec.rb +2 -3
  327. data/spec/unit/ssl/certificate_spec.rb +7 -0
  328. data/spec/unit/test/test_helper_spec.rb +17 -0
  329. data/spec/unit/transaction_spec.rb +18 -0
  330. data/spec/unit/type/exec_spec.rb +15 -12
  331. data/spec/unit/type/file/content_spec.rb +9 -3
  332. data/spec/unit/type/file/source_spec.rb +4 -4
  333. data/spec/unit/type/file_spec.rb +9 -4
  334. data/spec/unit/type/package_spec.rb +8 -0
  335. data/spec/unit/type/schedule_spec.rb +3 -1
  336. data/spec/unit/type/selboolean_spec.rb +4 -6
  337. data/spec/unit/type/service_spec.rb +25 -8
  338. data/spec/unit/type/user_spec.rb +32 -26
  339. data/spec/unit/type/yumrepo_spec.rb +30 -0
  340. data/spec/unit/type_spec.rb +40 -0
  341. data/spec/unit/util/execution_spec.rb +16 -0
  342. data/spec/unit/util/http_proxy_spec.rb +121 -1
  343. data/spec/unit/util/log/destinations_spec.rb +2 -26
  344. data/spec/unit/util/log_spec.rb +0 -112
  345. data/spec/unit/util/logging_spec.rb +200 -0
  346. data/spec/unit/util/pidlock_spec.rb +67 -40
  347. data/spec/unit/util/plist_spec.rb +20 -0
  348. data/spec/unit/util/windows/adsi_spec.rb +55 -4
  349. data/spec/unit/util/windows/api_types_spec.rb +104 -40
  350. data/spec/unit/util/windows/service_spec.rb +9 -0
  351. data/spec/unit/util/windows/sid_spec.rb +2 -2
  352. data/tasks/manpages.rake +1 -0
  353. metadata +16 -11
  354. data/ext/windows/eventlog/Rakefile +0 -32
  355. data/ext/windows/eventlog/puppetres.dll +0 -0
  356. data/ext/windows/eventlog/puppetres.mc +0 -18
  357. data/lib/puppet/pops/loader/null_loader.rb +0 -60
  358. data/locales/ja/puppet.po +0 -12114
  359. data/spec/integration/test/test_helper_spec.rb +0 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53cbc148eb43edb744a2750a884b748514038b84c5245622a84dba14c1b12c33
4
- data.tar.gz: 652ad891715edda33fc101b0d0bd8d2605a3bc601b8672e10a9ef4216dd03092
3
+ metadata.gz: '035888e0c953b64613203cbda6e6ad93c6e4edfd2c670f47cf24a267a0984bc3'
4
+ data.tar.gz: 6a321e8fdfc35aa0d7ad3c0c3d1bff4683f173f6bbfb9b97531325f01f702dbd
5
5
  SHA512:
6
- metadata.gz: c5af9bdc9bf37665cfc51ada652552f77454f44fda12050b04b04514033a66e37fa4333fa669abddc4f5e88e42b8b4981aa9e92cb78bbef784f8b9a5f5f716f6
7
- data.tar.gz: c9df2ba4c230c292d21bdc02d65489347b294aded44485220e577f81985e59fd6bea5d6fdc3cdea426cb33beeaa321e8f67a38ac5fc13e2c0a6ab3cfbb901c73
6
+ metadata.gz: f39f47a5b7fa81fe3ce4eacb8806f718d3668446734507a7df178aca0abe73cd07ecd1e4db25527ff8f717d430c910453908acfee33679b64baf19bdf6ed316e
7
+ data.tar.gz: 194080752e32580af11208f772e95dd34fbd49eb7abc93d78a57c2e07bf480ff6d82f5f1a890288b4b4b46f9086b736353ea9b82503fd967f363fb393c4fad64
data/CODEOWNERS CHANGED
@@ -1,15 +1,15 @@
1
1
  # default to platform-core
2
- * @puppetlabs/platform-core
2
+ * @puppetlabs/platform-core @puppetlabs/puppetserver-maintainers
3
3
 
4
- # platform-os
5
- /lib/puppet/type/group @puppetlabs/platform-os
6
- /lib/puppet/type/package @puppetlabs/platform-os
7
- /lib/puppet/type/service @puppetlabs/platform-os
8
- /lib/puppet/type/user @puppetlabs/platform-os
9
- /lib/puppet/provider/group @puppetlabs/platform-os
10
- /lib/puppet/provider/package @puppetlabs/platform-os
11
- /lib/puppet/provider/service @puppetlabs/platform-os
12
- /lib/puppet/provider/user @puppetlabs/platform-os
4
+ # Night's Watch
5
+ /lib/puppet/type/group @puppetlabs/night-s-watch
6
+ /lib/puppet/type/package @puppetlabs/night-s-watch
7
+ /lib/puppet/type/service @puppetlabs/night-s-watch
8
+ /lib/puppet/type/user @puppetlabs/night-s-watch
9
+ /lib/puppet/provider/group @puppetlabs/night-s-watch
10
+ /lib/puppet/provider/package @puppetlabs/night-s-watch
11
+ /lib/puppet/provider/service @puppetlabs/night-s-watch
12
+ /lib/puppet/provider/user @puppetlabs/night-s-watch
13
13
 
14
14
  # language
15
15
  /lib/puppet/datatypes @puppetlabs/language
data/Gemfile CHANGED
@@ -74,7 +74,7 @@ group(:development, :test) do
74
74
  gem 'hashdiff', '0.3.8'
75
75
  gem 'webmock', '~> 1.24'
76
76
  gem 'vcr', '~> 2.9'
77
- gem "hiera-eyaml", :require => false
77
+ gem "hiera-eyaml", *location_for(ENV['HIERA_EYAML_LOCATION'])
78
78
 
79
79
  gem 'memory_profiler', :platforms => [:mri_21, :mri_22, :mri_23, :mri_24, :mri_25]
80
80
  end
@@ -93,8 +93,7 @@ group(:extra) do
93
93
  gem "msgpack", :require => false
94
94
  end
95
95
 
96
-
97
- if File.exists? "#{__FILE__}.local"
96
+ if File.exist? "#{__FILE__}.local"
98
97
  eval(File.read("#{__FILE__}.local"), binding)
99
98
  end
100
99
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- puppet (5.5.16)
4
+ puppet (5.5.21)
5
5
  CFPropertyList (~> 2.2)
6
6
  facter (>= 2.4.0, < 4)
7
7
  fast_gettext (~> 1.1.2)
@@ -17,95 +17,100 @@ GEM
17
17
  CFPropertyList (2.3.6)
18
18
  addressable (2.4.0)
19
19
  artifactory (2.8.2)
20
- ast (2.4.0)
21
- builder (3.2.3)
22
- coderay (1.1.2)
20
+ ast (2.4.1)
21
+ builder (3.2.4)
22
+ coderay (1.1.3)
23
23
  crack (0.4.3)
24
24
  safe_yaml (~> 1.0.0)
25
- diff-lcs (1.3)
26
- facter (2.5.1)
25
+ csv (3.1.5)
26
+ diff-lcs (1.4.4)
27
+ docopt (0.6.1)
28
+ facter (2.5.7)
27
29
  fast_gettext (1.1.2)
28
30
  gettext (3.2.9)
29
31
  locale (>= 2.0.5)
30
32
  text (>= 1.3.0)
31
- gettext-setup (0.30)
33
+ gettext-setup (0.34)
32
34
  fast_gettext (~> 1.1.0)
33
- gettext (>= 3.0.2)
35
+ gettext (>= 3.0.2, < 3.3.0)
34
36
  locale
35
37
  hashdiff (0.3.8)
36
- hiera (3.5.0)
37
- hiera-eyaml (3.0.0)
38
+ hiera (3.6.0)
39
+ hiera-eyaml (3.2.0)
38
40
  highline (~> 1.6.19)
39
41
  optimist
40
42
  highline (1.6.21)
41
- hocon (1.2.5)
43
+ hocon (1.3.1)
42
44
  hpricot (0.8.6)
43
45
  json-schema (2.8.1)
44
46
  addressable (>= 2.4)
45
- locale (2.1.2)
47
+ locale (2.1.3)
46
48
  memory_profiler (0.9.14)
47
- metaclass (0.0.4)
48
- method_source (0.9.2)
49
- mocha (1.9.0)
50
- metaclass (~> 0.0.1)
51
- msgpack (1.3.0)
52
- multi_json (1.13.1)
53
- mustache (1.1.0)
49
+ method_source (1.0.0)
50
+ mocha (1.11.2)
51
+ msgpack (1.3.3)
52
+ multi_json (1.14.1)
53
+ mustache (1.1.1)
54
54
  net-ssh (4.2.0)
55
- optimist (3.0.0)
56
- packaging (0.99.36)
55
+ optimist (3.0.1)
56
+ packaging (0.99.66)
57
57
  artifactory (~> 2)
58
- rake (~> 12.3)
59
- parallel (1.17.0)
60
- parser (2.6.3.0)
61
- ast (~> 2.4.0)
58
+ rake (>= 12.3)
59
+ release-metrics
60
+ parallel (1.19.2)
61
+ parser (2.7.1.4)
62
+ ast (~> 2.4.1)
62
63
  pathspec (0.2.1)
63
64
  powerpack (0.1.2)
64
- pry (0.12.2)
65
- coderay (~> 1.1.0)
66
- method_source (~> 0.9.0)
67
- puppet-lint (2.3.6)
68
- puppet-syntax (2.5.0)
65
+ pry (0.13.1)
66
+ coderay (~> 1.1)
67
+ method_source (~> 1.0)
68
+ puppet-lint (2.4.2)
69
+ puppet-syntax (3.1.0)
70
+ puppet (>= 5)
69
71
  rake
70
- puppetlabs_spec_helper (2.14.1)
72
+ puppetlabs_spec_helper (2.15.0)
71
73
  mocha (~> 1.0)
72
74
  pathspec (~> 0.2.1)
73
75
  puppet-lint (~> 2.0)
74
- puppet-syntax (~> 2.0)
76
+ puppet-syntax (>= 2.0, < 4)
75
77
  rspec-puppet (~> 2.0)
76
78
  racc (1.4.9)
77
- rack (1.6.11)
79
+ rack (1.6.13)
78
80
  rainbow (2.1.0)
79
- rake (12.3.2)
81
+ rake (12.3.3)
80
82
  rdiscount (2.2.0.1)
81
83
  rdoc (4.3.0)
82
84
  redcarpet (2.3.0)
85
+ release-metrics (1.1.0)
86
+ csv
87
+ docopt
83
88
  ronn (0.7.3)
84
89
  hpricot (>= 0.8.2)
85
90
  mustache (>= 0.7.0)
86
91
  rdiscount (>= 1.5.8)
87
- rspec (3.8.0)
88
- rspec-core (~> 3.8.0)
89
- rspec-expectations (~> 3.8.0)
90
- rspec-mocks (~> 3.8.0)
91
- rspec-collection_matchers (1.1.3)
92
+ rspec (3.9.0)
93
+ rspec-core (~> 3.9.0)
94
+ rspec-expectations (~> 3.9.0)
95
+ rspec-mocks (~> 3.9.0)
96
+ rspec-collection_matchers (1.2.0)
92
97
  rspec-expectations (>= 2.99.0.beta1)
93
- rspec-core (3.8.2)
94
- rspec-support (~> 3.8.0)
95
- rspec-expectations (3.8.4)
98
+ rspec-core (3.9.2)
99
+ rspec-support (~> 3.9.3)
100
+ rspec-expectations (3.9.2)
96
101
  diff-lcs (>= 1.2.0, < 2.0)
97
- rspec-support (~> 3.8.0)
102
+ rspec-support (~> 3.9.0)
98
103
  rspec-its (1.3.0)
99
104
  rspec-core (>= 3.0.0)
100
105
  rspec-expectations (>= 3.0.0)
101
- rspec-legacy_formatters (1.0.1)
106
+ rspec-legacy_formatters (1.0.2)
102
107
  rspec (~> 3.0)
103
- rspec-mocks (3.8.1)
108
+ rspec-mocks (3.9.1)
104
109
  diff-lcs (>= 1.2.0, < 2.0)
105
- rspec-support (~> 3.8.0)
106
- rspec-puppet (2.7.5)
110
+ rspec-support (~> 3.9.0)
111
+ rspec-puppet (2.7.8)
107
112
  rspec
108
- rspec-support (3.8.2)
113
+ rspec-support (3.9.3)
109
114
  rubocop (0.49.1)
110
115
  parallel (~> 1.10)
111
116
  parser (>= 2.3.3.1, < 3.0)
@@ -115,17 +120,17 @@ GEM
115
120
  unicode-display_width (~> 1.0, >= 1.0.1)
116
121
  rubocop-i18n (1.2.0)
117
122
  rubocop (~> 0.49.0)
118
- ruby-prof (0.18.0)
123
+ ruby-prof (1.4.1)
119
124
  ruby-progressbar (1.10.1)
120
125
  safe_yaml (1.0.5)
121
126
  text (1.3.1)
122
- unicode-display_width (1.6.0)
127
+ unicode-display_width (1.7.0)
123
128
  vcr (2.9.3)
124
129
  webmock (1.24.6)
125
130
  addressable (>= 2.3.6)
126
131
  crack (>= 0.3.2)
127
132
  hashdiff
128
- yard (0.9.20)
133
+ yard (0.9.25)
129
134
  yarjuf (2.0.0)
130
135
  builder
131
136
  rspec (~> 3)
@@ -165,4 +170,4 @@ DEPENDENCIES
165
170
  yarjuf (~> 2.0)
166
171
 
167
172
  BUNDLED WITH
168
- 1.16.5
173
+ 1.17.3
@@ -16,3 +16,4 @@ apt_signing_server: 'apt.puppetlabs.com'
16
16
  apt_repo_url: 'http://apt.puppetlabs.com'
17
17
  apt_repo_path: '/opt/repository/incoming'
18
18
  tar_host: 'downloads.puppetlabs.com'
19
+ nonfinal_gem_path: '/opt/repository-nightlies/downloads/gems/puppet5-nightly'
@@ -75,15 +75,15 @@ class X509Collector
75
75
  end
76
76
  when OpenSSL::X509::Certificate
77
77
  signature_desc = who_signed(meaning, key_names, keys)
78
- "Certificate assigning name #{meaning.subject.to_s} to #{key_names[meaning.public_key.to_s]}\n serial number #{meaning.serial}\n issued by #{meaning.issuer.to_s}\n signed by #{signature_desc}"
78
+ "Certificate assigning name #{meaning.subject} to #{key_names[meaning.public_key.to_s]}\n serial number #{meaning.serial}\n issued by #{meaning.issuer}\n signed by #{signature_desc}"
79
79
  when OpenSSL::X509::Request
80
80
  signature_desc = who_signed(meaning, key_names, keys)
81
- "Certificate request for #{meaning.subject.to_s} having key #{key_names[meaning.public_key.to_s]}\n signed by #{signature_desc}"
81
+ "Certificate request for #{meaning.subject} having key #{key_names[meaning.public_key.to_s]}\n signed by #{signature_desc}"
82
82
  when OpenSSL::X509::CRL
83
83
  signature_desc = who_signed(meaning, key_names, keys)
84
84
  revoked_serial_numbers = meaning.revoked.map { |r| r.serial }
85
85
  revoked_desc = if revoked_serial_numbers.count > 0 then "serial numbers #{revoked_serial_numbers.inspect}" else "nothing" end
86
- "Certificate revocation list revoking #{revoked_desc}\n issued by #{meaning.issuer.to_s}\n signed by #{signature_desc}"
86
+ "Certificate revocation list revoking #{revoked_desc}\n issued by #{meaning.issuer}\n signed by #{signature_desc}"
87
87
  else
88
88
  "Unknown"
89
89
  end
@@ -45,7 +45,7 @@ gem_platform_dependencies:
45
45
  # Use of win32-security is deprecated
46
46
  win32-security: '= 0.2.5'
47
47
  win32-service: '= 0.8.8'
48
- minitar: '~> 0.6.1'
48
+ minitar: '~> 0.9'
49
49
  x64-mingw32:
50
50
  gem_runtime_dependencies:
51
51
  # ffi is pinned due to PUP-8438
@@ -56,7 +56,7 @@ gem_platform_dependencies:
56
56
  # Use of win32-security is deprecated
57
57
  win32-security: '= 0.2.5'
58
58
  win32-service: '= 0.8.8'
59
- minitar: '~> 0.6.1'
59
+ minitar: '~> 0.9'
60
60
  bundle_platforms:
61
61
  universal-darwin: all
62
62
  x86-mingw32: mingw
@@ -435,9 +435,9 @@ begin
435
435
  when "--node"
436
436
  $options[:nodes] << arg
437
437
  when "--list"
438
- Suite.suites.sort { |a,b| a.to_s <=> b.to_s }.each do |suite_name|
438
+ Suite.suites.sort_by(&:to_s).each do |suite_name|
439
439
  suite = Suite[suite_name]
440
- tests = suite.tests.sort { |a,b| a.to_s <=> b.to_s }.join(", ")
440
+ tests = suite.tests.sort_by(&:to_s).join(", ")
441
441
  puts "%20s: %s" % [suite_name, tests]
442
442
  end
443
443
  exit(0)
@@ -159,7 +159,7 @@ class ExternalNode
159
159
  log("list of patterns for #{filepath}: #{patternlist}")
160
160
 
161
161
  if matchthis =~ Regexp.union(patternlist)
162
- log("matched #{$~.to_s} in #{matchthis}, returning true")
162
+ log("matched #{$~} in #{matchthis}, returning true")
163
163
  return true
164
164
 
165
165
  else # hostname didn't match anything in patternlist
@@ -181,7 +181,7 @@ class ExternalNode
181
181
  log("Attempting to match [#{@hostname}] in [#{filepath}]")
182
182
  if matched_in_patternfile?(filepath,@hostname)
183
183
  @classes << patternfile.to_s
184
- log("Appended #{patternfile.to_s} to classes instance variable")
184
+ log("Appended #{patternfile} to classes instance variable")
185
185
  end
186
186
  end
187
187
  end
@@ -198,7 +198,7 @@ class ExternalNode
198
198
  log("Attempting to match [#{@hostname}] in [#{filepath}]")
199
199
  if matched_in_patternfile?(filepath,@hostname)
200
200
  @environment = patternfile.to_s
201
- log("Wrote #{patternfile.to_s} to environment instance variable")
201
+ log("Wrote #{patternfile} to environment instance variable")
202
202
  end
203
203
  end
204
204
  end
@@ -230,7 +230,7 @@ class ExternalNode
230
230
  log("Attempting to match [#{@hostname}] in [#{secondlevel}]")
231
231
  if matched_in_patternfile?(secondlevel, @hostname)
232
232
  @parameters[ parametername.to_s ] = patternfile.to_s
233
- log("Set @parameters[#{parametername.to_s}] = #{patternfile.to_s}")
233
+ log("Set @parameters[#{parametername}] = #{patternfile}")
234
234
  end
235
235
  end
236
236
  end
@@ -15,6 +15,7 @@ class WindowsDaemon < Win32::Daemon
15
15
 
16
16
  @run_thread = nil
17
17
  @LOG_TO_FILE = false
18
+ @loglevel = 0
18
19
  LOG_FILE = File.expand_path(File.join(Dir::COMMON_APPDATA, 'PuppetLabs', 'puppet', 'var', 'log', 'windows.log'))
19
20
  LEVELS = [:debug, :info, :notice, :warning, :err, :alert, :emerg, :crit]
20
21
  LEVELS.each do |level|
@@ -37,7 +38,9 @@ class WindowsDaemon < Win32::Daemon
37
38
  FileUtils.mkdir_p(File.dirname(LOG_FILE))
38
39
  args = args.gsub("--logtofile","")
39
40
  end
40
- basedir = File.expand_path(File.join(File.dirname(__FILE__), '..'))
41
+
42
+ base_dir = File.expand_path(File.join(File.dirname(__FILE__), '..'))
43
+ load_env(base_dir)
41
44
 
42
45
  # The puppet installer registers a 'Puppet' event source. For the moment events will be logged with this key, but
43
46
  # it may be a good idea to split the Service and Puppet events later so it's easier to read in the windows Event Log.
@@ -54,25 +57,29 @@ class WindowsDaemon < Win32::Daemon
54
57
  # )
55
58
  # end
56
59
 
57
- puppet = File.join(basedir, 'bin', 'puppet.bat')
58
- unless File.exists?(puppet)
60
+ puppet = File.join(base_dir, 'puppet', 'bin', 'puppet').tr('/', '\\')
61
+ ruby = File.join(base_dir, "sys", "ruby", "bin", "ruby.exe").tr('/', '\\')
62
+ ruby_puppet_cmd = "\"#{ruby}\" \"#{puppet}\""
63
+
64
+ unless File.exist?(puppet)
59
65
  log_err("File not found: '#{puppet}'")
60
66
  return
61
67
  end
62
68
  log_debug("Using '#{puppet}'")
63
69
 
64
70
  cmdline_debug = argsv.index('--debug') ? :debug : nil
65
- @loglevel = parse_log_level(puppet, cmdline_debug)
71
+ @loglevel = parse_log_level(ruby_puppet_cmd, cmdline_debug)
66
72
  log_notice('Service started')
67
73
 
68
74
  service = self
69
75
  @run_thread = Thread.new do
70
76
  begin
71
77
  while service.running? do
72
- runinterval = service.parse_runinterval(puppet)
78
+ runinterval = service.parse_runinterval(ruby_puppet_cmd)
79
+
73
80
  if service.state == RUNNING or service.state == IDLE
74
81
  service.log_notice("Executing agent with arguments: #{args}")
75
- pid = Process.create(:command_line => "\"#{puppet}\" agent --onetime #{args}", :creation_flags => CREATE_NEW_CONSOLE).process_id
82
+ pid = Process.create(:command_line => "#{ruby_puppet_cmd} agent --onetime #{args}", :creation_flags => CREATE_NEW_CONSOLE).process_id
76
83
  service.log_debug("Process created: #{pid}")
77
84
  else
78
85
  service.log_debug("Service is paused. Not invoking Puppet agent")
@@ -153,7 +160,7 @@ class WindowsDaemon < Win32::Daemon
153
160
 
154
161
  def parse_runinterval(puppet_path)
155
162
  begin
156
- runinterval = %x{ "#{puppet_path}" agent --configprint runinterval }.to_i
163
+ runinterval = %x{ #{puppet_path} agent --configprint runinterval }.to_i
157
164
  if runinterval == 0
158
165
  runinterval = 1800
159
166
  log_err("Failed to determine runinterval, defaulting to #{runinterval} seconds")
@@ -168,7 +175,7 @@ class WindowsDaemon < Win32::Daemon
168
175
 
169
176
  def parse_log_level(puppet_path,cmdline_debug)
170
177
  begin
171
- loglevel = %x{ "#{puppet_path}" agent --configprint log_level}.chomp
178
+ loglevel = %x{ #{puppet_path} agent --configprint log_level}.chomp
172
179
  unless loglevel
173
180
  loglevel = :notice
174
181
  log_err("Failed to determine loglevel, defaulting to #{loglevel}")
@@ -180,6 +187,45 @@ class WindowsDaemon < Win32::Daemon
180
187
 
181
188
  LEVELS.index(cmdline_debug ? cmdline_debug : loglevel.to_sym)
182
189
  end
190
+
191
+ private
192
+
193
+ def load_env(base_dir)
194
+ begin
195
+ # ENV that uses backward slashes
196
+ ENV['FACTERDIR'] = File.join(base_dir, 'facter').tr('/', '\\')
197
+ ENV['FACTER_env_windows_installdir'] = base_dir.tr('/', '\\')
198
+ ENV['HIERA_DIR'] = File.join(base_dir, 'hiera').tr('/', '\\')
199
+ ENV['MCOLLECTIVE_DIR'] = File.join(base_dir, 'mcollective').tr('/', '\\')
200
+ ENV['PL_BASEDIR'] = base_dir.tr('/', '\\')
201
+ ENV['PUPPET_DIR'] = File.join(base_dir, 'puppet').tr('/', '\\')
202
+ ENV['RUBYOPT'] = 'rubygems'
203
+ ENV['RUBY_DIR'] = File.join(base_dir, 'sys', 'ruby').tr('/', '\\')
204
+ ENV['OPENSSL_CONF'] = File.join(base_dir, 'puppet', 'ssl', 'openssl.cnf').tr('/', '\\')
205
+ ENV['SSL_CERT_DIR'] = File.join(base_dir, 'puppet', 'ssl', 'certs').tr('/', '\\')
206
+ ENV['SSL_CERT_FILE'] = File.join(base_dir, 'puppet', 'ssl', 'cert.pem').tr('/', '\\')
207
+ ENV['Path'] = [
208
+ File.join(base_dir, 'puppet', 'bin'),
209
+ File.join(base_dir, 'facter', 'bin'),
210
+ File.join(base_dir, 'hiera', 'bin'),
211
+ File.join(base_dir, 'mcollective', 'bin'),
212
+ File.join(base_dir, 'bin'),
213
+ File.join(base_dir, 'sys', 'ruby', 'bin'),
214
+ File.join(base_dir, 'sys', 'tools', 'bin')
215
+ ].join(';').tr('/', '\\') + ';' + ENV['Path']
216
+
217
+ # ENV that uses forward slashes
218
+ ENV['RUBYLIB'] = [
219
+ File.join(base_dir, 'puppet','lib'),
220
+ File.join(base_dir, 'facter', 'lib'),
221
+ File.join(base_dir, 'hiera', 'lib'),
222
+ File.join(base_dir, 'mcollective', 'lib'),
223
+ ENV['RUBYLIB']
224
+ ].compact.join(';') + ';'
225
+ rescue => e
226
+ log_exception(e)
227
+ end
228
+ end
183
229
  end
184
230
 
185
231
  if __FILE__ == $0
data/install.rb CHANGED
@@ -62,24 +62,6 @@ def do_configs(configs, target, strip = 'conf/')
62
62
  ocf = File.join(InstallOptions.config_dir, cf.gsub(/#{strip}/, ''))
63
63
  FileUtils.install(cf, ocf, {:mode => 0644, :preserve => true, :verbose => true})
64
64
  end
65
-
66
- if $operatingsystem == 'windows'
67
- src_dll = 'ext/windows/eventlog/puppetres.dll'
68
- dst_dll = File.join(InstallOptions.bin_dir, 'puppetres.dll')
69
- FileUtils.install(src_dll, dst_dll, {:mode => 0644, :preserve => true, :verbose => true})
70
-
71
- require 'win32/registry'
72
- include Win32::Registry::Constants
73
-
74
- begin
75
- Win32::Registry::HKEY_LOCAL_MACHINE.create('SYSTEM\CurrentControlSet\services\eventlog\Application\Puppet', KEY_ALL_ACCESS | 0x0100) do |reg|
76
- reg.write_s('EventMessageFile', dst_dll.tr('/', '\\'))
77
- reg.write_i('TypesSupported', 0x7)
78
- end
79
- rescue Win32::Registry::Error => e
80
- warn "Failed to create puppet eventlog registry key: #{e}"
81
- end
82
- end
83
65
  end
84
66
 
85
67
  def do_bins(bins, target, strip = 's?bin/')
@@ -140,12 +122,12 @@ def check_prereqs
140
122
  facter_version = Facter.version.to_f
141
123
  if facter_version < MIN_FACTER_VERSION
142
124
  puts "Facter version: #{facter_version}; minimum required: #{MIN_FACTER_VERSION}; cannot install"
143
- exit -1
125
+ exit(-1)
144
126
  end
145
127
  end
146
128
  rescue LoadError
147
129
  puts "Could not load #{pre}; cannot install"
148
- exit -1
130
+ exit(-1)
149
131
  end
150
132
  }
151
133
  end
@@ -266,7 +248,7 @@ def prepare_installation
266
248
  require 'win32/dir'
267
249
  rescue LoadError => e
268
250
  puts "Cannot run on Microsoft Windows without the win32-process, win32-dir & win32-service gems: #{e}"
269
- exit -1
251
+ exit(-1)
270
252
  end
271
253
  end
272
254
 
@@ -455,13 +437,13 @@ def install_binfile(from, op_file, target)
455
437
  if $operatingsystem == "windows" && InstallOptions.batch_files
456
438
  installed_wrapper = false
457
439
 
458
- unless File.extname(from).match(/\.(cmd|bat)/)
459
- if File.exists?("#{from}.bat")
440
+ unless File.extname(from) =~ /\.(cmd|bat)/
441
+ if File.exist?("#{from}.bat")
460
442
  FileUtils.install("#{from}.bat", File.join(target, "#{op_file}.bat"), :mode => 0755, :preserve => true, :verbose => true)
461
443
  installed_wrapper = true
462
444
  end
463
445
 
464
- if File.exists?("#{from}.cmd")
446
+ if File.exist?("#{from}.cmd")
465
447
  FileUtils.install("#{from}.cmd", File.join(target, "#{op_file}.cmd"), :mode => 0755, :preserve => true, :verbose => true)
466
448
  installed_wrapper = true
467
449
  end