puppet 5.5.17-x86-mingw32 → 5.5.22-x86-mingw32

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 (340) hide show
  1. checksums.yaml +4 -4
  2. data/CODEOWNERS +1 -1
  3. data/Gemfile +4 -5
  4. data/Gemfile.lock +59 -55
  5. data/ext/build_defaults.yaml +1 -0
  6. data/ext/cert_inspector +3 -3
  7. data/ext/puppet-test +2 -2
  8. data/ext/regexp_nodes/regexp_nodes.rb +4 -4
  9. data/ext/windows/service/daemon.rb +54 -8
  10. data/install.rb +6 -6
  11. data/lib/puppet.rb +5 -2
  12. data/lib/puppet/agent.rb +5 -13
  13. data/lib/puppet/application.rb +1 -1
  14. data/lib/puppet/application/agent.rb +3 -1
  15. data/lib/puppet/application/apply.rb +2 -2
  16. data/lib/puppet/application/describe.rb +3 -9
  17. data/lib/puppet/application/doc.rb +1 -1
  18. data/lib/puppet/application/filebucket.rb +13 -0
  19. data/lib/puppet/application/lookup.rb +1 -1
  20. data/lib/puppet/application/script.rb +2 -2
  21. data/lib/puppet/configurer.rb +106 -31
  22. data/lib/puppet/configurer/downloader.rb +33 -16
  23. data/lib/puppet/daemon.rb +1 -1
  24. data/lib/puppet/defaults.rb +86 -40
  25. data/lib/puppet/error.rb +9 -1
  26. data/lib/puppet/external/nagios/base.rb +1 -1
  27. data/lib/puppet/face/ca.rb +1 -1
  28. data/lib/puppet/face/module/list.rb +5 -5
  29. data/lib/puppet/face/module/search.rb +1 -1
  30. data/lib/puppet/face/module/uninstall.rb +1 -1
  31. data/lib/puppet/face/module/upgrade.rb +1 -1
  32. data/lib/puppet/file_serving/http_metadata.rb +1 -1
  33. data/lib/puppet/file_serving/mount/locales.rb +1 -2
  34. data/lib/puppet/file_serving/mount/pluginfacts.rb +1 -2
  35. data/lib/puppet/file_serving/mount/plugins.rb +1 -2
  36. data/lib/puppet/file_system.rb +0 -8
  37. data/lib/puppet/file_system/memory_file.rb +1 -1
  38. data/lib/puppet/file_system/posix.rb +3 -2
  39. data/lib/puppet/file_system/uniquefile.rb +4 -0
  40. data/lib/puppet/forge.rb +3 -3
  41. data/lib/puppet/functions/epp.rb +4 -4
  42. data/lib/puppet/functions/inline_epp.rb +5 -5
  43. data/lib/puppet/functions/new.rb +8 -3
  44. data/lib/puppet/functions/reduce.rb +2 -4
  45. data/lib/puppet/functions/reverse_each.rb +1 -1
  46. data/lib/puppet/functions/step.rb +1 -1
  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 +6 -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 +1 -1
  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/pool.rb +7 -1
  69. data/lib/puppet/network/http/rack/rest.rb +2 -2
  70. data/lib/puppet/network/http/site.rb +1 -1
  71. data/lib/puppet/network/resolver.rb +2 -2
  72. data/lib/puppet/node/environment.rb +11 -3
  73. data/lib/puppet/parser/ast.rb +1 -1
  74. data/lib/puppet/parser/ast/resourceparam.rb +1 -1
  75. data/lib/puppet/parser/compiler/catalog_validator/env_relationship_validator.rb +2 -0
  76. data/lib/puppet/parser/compiler/catalog_validator/site_validator.rb +2 -0
  77. data/lib/puppet/parser/environment_compiler.rb +3 -0
  78. data/lib/puppet/parser/functions.rb +14 -10
  79. data/lib/puppet/parser/functions/epp.rb +3 -3
  80. data/lib/puppet/parser/functions/inline_epp.rb +5 -5
  81. data/lib/puppet/parser/resource.rb +3 -2
  82. data/lib/puppet/parser/resource/param.rb +6 -0
  83. data/lib/puppet/pops/adaptable.rb +7 -13
  84. data/lib/puppet/pops/adapters.rb +8 -4
  85. data/lib/puppet/pops/evaluator/access_operator.rb +2 -2
  86. data/lib/puppet/pops/evaluator/collectors/abstract_collector.rb +1 -3
  87. data/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +1 -1
  88. data/lib/puppet/pops/evaluator/collectors/exported_collector.rb +1 -1
  89. data/lib/puppet/pops/evaluator/evaluator_impl.rb +1 -1
  90. data/lib/puppet/pops/evaluator/external_syntax_support.rb +3 -2
  91. data/lib/puppet/pops/evaluator/runtime3_support.rb +4 -4
  92. data/lib/puppet/pops/issues.rb +5 -0
  93. data/lib/puppet/pops/loaders.rb +1 -1
  94. data/lib/puppet/pops/lookup/hiera_config.rb +1 -0
  95. data/lib/puppet/pops/lookup/sub_lookup.rb +1 -1
  96. data/lib/puppet/pops/merge_strategy.rb +22 -18
  97. data/lib/puppet/pops/parser/heredoc_support.rb +1 -1
  98. data/lib/puppet/pops/parser/interpolation_support.rb +4 -4
  99. data/lib/puppet/pops/parser/locator.rb +1 -1
  100. data/lib/puppet/pops/parser/pn_parser.rb +17 -16
  101. data/lib/puppet/pops/puppet_stack.rb +51 -48
  102. data/lib/puppet/pops/resource/resource_type_impl.rb +2 -0
  103. data/lib/puppet/pops/types/iterable.rb +34 -8
  104. data/lib/puppet/pops/types/p_meta_type.rb +1 -1
  105. data/lib/puppet/pops/types/p_sensitive_type.rb +1 -1
  106. data/lib/puppet/pops/types/p_type_set_type.rb +4 -0
  107. data/lib/puppet/pops/types/string_converter.rb +10 -10
  108. data/lib/puppet/pops/types/type_calculator.rb +24 -0
  109. data/lib/puppet/pops/types/types.rb +3 -3
  110. data/lib/puppet/pops/validation/checker4_0.rb +29 -15
  111. data/lib/puppet/pops/validation/validator_factory_4_0.rb +1 -0
  112. data/lib/puppet/property.rb +1 -1
  113. data/lib/puppet/property/ensure.rb +1 -1
  114. data/lib/puppet/provider/augeas/augeas.rb +1 -1
  115. data/lib/puppet/provider/cron/crontab.rb +1 -1
  116. data/lib/puppet/provider/exec.rb +6 -2
  117. data/lib/puppet/provider/group/groupadd.rb +19 -19
  118. data/lib/puppet/provider/group/windows_adsi.rb +3 -3
  119. data/lib/puppet/provider/mailalias/aliases.rb +1 -1
  120. data/lib/puppet/provider/mount.rb +1 -1
  121. data/lib/puppet/provider/mount/parsed.rb +8 -8
  122. data/lib/puppet/provider/nameservice/directoryservice.rb +1 -1
  123. data/lib/puppet/provider/nameservice/pw.rb +2 -2
  124. data/lib/puppet/provider/package/aix.rb +17 -2
  125. data/lib/puppet/provider/package/apt.rb +14 -3
  126. data/lib/puppet/provider/package/dnfmodule.rb +141 -0
  127. data/lib/puppet/provider/package/dpkg.rb +16 -18
  128. data/lib/puppet/provider/package/fink.rb +20 -3
  129. data/lib/puppet/provider/package/gem.rb +4 -2
  130. data/lib/puppet/provider/package/openbsd.rb +14 -2
  131. data/lib/puppet/provider/package/pip.rb +37 -10
  132. data/lib/puppet/provider/package/pkg.rb +18 -5
  133. data/lib/puppet/provider/package/pkgdmg.rb +1 -1
  134. data/lib/puppet/provider/package/pkgng.rb +16 -4
  135. data/lib/puppet/provider/package/portage.rb +4 -4
  136. data/lib/puppet/provider/package/puppet_gem.rb +5 -0
  137. data/lib/puppet/provider/package/rpm.rb +6 -6
  138. data/lib/puppet/provider/package/windows/package.rb +1 -1
  139. data/lib/puppet/provider/package/yum.rb +28 -20
  140. data/lib/puppet/provider/package/zypper.rb +1 -0
  141. data/lib/puppet/provider/package_targetable.rb +5 -4
  142. data/lib/puppet/provider/parsedfile.rb +1 -1
  143. data/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +3 -3
  144. data/lib/puppet/provider/selmodule/semodule.rb +43 -26
  145. data/lib/puppet/provider/service/daemontools.rb +9 -9
  146. data/lib/puppet/provider/service/openbsd.rb +1 -1
  147. data/lib/puppet/provider/service/rcng.rb +2 -2
  148. data/lib/puppet/provider/service/runit.rb +2 -8
  149. data/lib/puppet/provider/service/systemd.rb +31 -13
  150. data/lib/puppet/provider/user/directoryservice.rb +31 -6
  151. data/lib/puppet/provider/user/hpux.rb +1 -1
  152. data/lib/puppet/provider/user/user_role_add.rb +1 -1
  153. data/lib/puppet/provider/user/useradd.rb +39 -20
  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 +1 -1
  162. data/lib/puppet/resource/catalog.rb +1 -1
  163. data/lib/puppet/resource/type.rb +10 -1
  164. data/lib/puppet/settings.rb +3 -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 +20 -12
  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 +8 -4
  176. data/lib/puppet/type/cron.rb +1 -1
  177. data/lib/puppet/type/exec.rb +7 -3
  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 +97 -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 +2 -8
  187. data/lib/puppet/type/user.rb +5 -9
  188. data/lib/puppet/util.rb +35 -12
  189. data/lib/puppet/util/autoload.rb +9 -7
  190. data/lib/puppet/util/command_line/trollop.rb +1 -1
  191. data/lib/puppet/util/http_proxy.rb +8 -14
  192. data/lib/puppet/util/instance_loader.rb +1 -1
  193. data/lib/puppet/util/log.rb +1 -1
  194. data/lib/puppet/util/log/destinations.rb +3 -12
  195. data/lib/puppet/util/logging.rb +30 -18
  196. data/lib/puppet/util/metric.rb +2 -2
  197. data/lib/puppet/util/monkey_patches.rb +1 -1
  198. data/lib/puppet/util/nagios_maker.rb +2 -2
  199. data/lib/puppet/util/network_device/cisco/device.rb +1 -1
  200. data/lib/puppet/util/network_device/cisco/interface.rb +2 -2
  201. data/lib/puppet/util/network_device/transport/ssh.rb +1 -1
  202. data/lib/puppet/util/pidlock.rb +12 -6
  203. data/lib/puppet/util/plist.rb +6 -0
  204. data/lib/puppet/util/provider_features.rb +2 -4
  205. data/lib/puppet/util/rdoc.rb +1 -1
  206. data/lib/puppet/util/reference.rb +1 -1
  207. data/lib/puppet/util/resource_template.rb +1 -1
  208. data/lib/puppet/util/selinux.rb +3 -1
  209. data/lib/puppet/util/windows/adsi.rb +60 -30
  210. data/lib/puppet/util/windows/api_types.rb +45 -32
  211. data/lib/puppet/util/windows/eventlog.rb +1 -6
  212. data/lib/puppet/util/windows/principal.rb +8 -6
  213. data/lib/puppet/util/windows/process.rb +16 -15
  214. data/lib/puppet/util/windows/registry.rb +17 -15
  215. data/lib/puppet/util/windows/security.rb +1 -0
  216. data/lib/puppet/util/windows/sid.rb +3 -3
  217. data/lib/puppet/vendor.rb +1 -1
  218. data/lib/puppet/version.rb +1 -1
  219. data/lib/puppet_pal.rb +2 -2
  220. data/locales/puppet.pot +362 -318
  221. data/man/man5/puppet.conf.5 +39 -9
  222. data/man/man8/puppet-agent.8 +2 -2
  223. data/man/man8/puppet-apply.8 +1 -1
  224. data/man/man8/puppet-ca.8 +1 -1
  225. data/man/man8/puppet-catalog.8 +1 -1
  226. data/man/man8/puppet-cert.8 +1 -1
  227. data/man/man8/puppet-certificate.8 +1 -1
  228. data/man/man8/puppet-certificate_request.8 +1 -1
  229. data/man/man8/puppet-certificate_revocation_list.8 +1 -1
  230. data/man/man8/puppet-config.8 +1 -1
  231. data/man/man8/puppet-describe.8 +1 -1
  232. data/man/man8/puppet-device.8 +1 -1
  233. data/man/man8/puppet-doc.8 +1 -1
  234. data/man/man8/puppet-epp.8 +1 -1
  235. data/man/man8/puppet-facts.8 +1 -1
  236. data/man/man8/puppet-filebucket.8 +16 -1
  237. data/man/man8/puppet-generate.8 +1 -1
  238. data/man/man8/puppet-help.8 +1 -1
  239. data/man/man8/puppet-key.8 +1 -1
  240. data/man/man8/puppet-lookup.8 +1 -1
  241. data/man/man8/puppet-man.8 +1 -1
  242. data/man/man8/puppet-master.8 +1 -1
  243. data/man/man8/puppet-module.8 +1 -1
  244. data/man/man8/puppet-node.8 +1 -1
  245. data/man/man8/puppet-parser.8 +1 -1
  246. data/man/man8/puppet-plugin.8 +1 -1
  247. data/man/man8/puppet-report.8 +1 -1
  248. data/man/man8/puppet-resource.8 +1 -1
  249. data/man/man8/puppet-script.8 +1 -1
  250. data/man/man8/puppet-status.8 +1 -1
  251. data/man/man8/puppet.8 +2 -2
  252. data/spec/fixtures/integration/provider/mailalias/aliases/test1 +1 -0
  253. data/spec/fixtures/unit/provider/package/dnfmodule/dnf-module-list.txt +19 -0
  254. data/spec/fixtures/unit/provider/package/pkgng/pkg.version +2 -0
  255. data/spec/fixtures/unit/provider/package/yum/yum-check-update-subscription-manager.txt +9 -0
  256. data/spec/fixtures/unit/provider/service/systemd/list_unit_files_services +9 -0
  257. data/spec/integration/configurer_spec.rb +66 -0
  258. data/spec/integration/data_binding_spec.rb +1 -0
  259. data/spec/integration/defaults_spec.rb +1 -2
  260. data/spec/integration/faces/plugin_spec.rb +29 -47
  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/type/notify_spec.rb +46 -0
  264. data/spec/integration/util/windows/adsi_spec.rb +6 -1
  265. data/spec/integration/util/windows/registry_spec.rb +7 -7
  266. data/spec/shared_contexts/types_setup.rb +2 -0
  267. data/spec/unit/agent_spec.rb +34 -26
  268. data/spec/unit/application/apply_spec.rb +2 -12
  269. data/spec/unit/configurer/downloader_spec.rb +10 -0
  270. data/spec/unit/configurer/fact_handler_spec.rb +0 -4
  271. data/spec/unit/configurer_spec.rb +430 -415
  272. data/spec/unit/daemon_spec.rb +0 -1
  273. data/spec/unit/file_serving/mount/locales_spec.rb +2 -2
  274. data/spec/unit/file_serving/mount/pluginfacts_spec.rb +2 -2
  275. data/spec/unit/file_serving/mount/plugins_spec.rb +2 -2
  276. data/spec/unit/file_system/uniquefile_spec.rb +11 -0
  277. data/spec/unit/forge/forge_spec.rb +1 -3
  278. data/spec/unit/forge/repository_spec.rb +1 -3
  279. data/spec/unit/indirector/catalog/compiler_spec.rb +45 -26
  280. data/spec/unit/indirector/resource/ral_spec.rb +4 -4
  281. data/spec/unit/network/http/api/indirected_routes_spec.rb +2 -1
  282. data/spec/unit/network/http/connection_spec.rb +43 -1
  283. data/spec/unit/network/http/pool_spec.rb +32 -0
  284. data/spec/unit/node_spec.rb +7 -4
  285. data/spec/unit/parser/environment_compiler_spec.rb +7 -0
  286. data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +8 -3
  287. data/spec/unit/provider/exec_spec.rb +209 -0
  288. data/spec/unit/provider/group/groupadd_spec.rb +30 -1
  289. data/spec/unit/provider/group/windows_adsi_spec.rb +43 -10
  290. data/spec/unit/provider/package/aix_spec.rb +29 -0
  291. data/spec/unit/provider/package/apt_spec.rb +13 -2
  292. data/spec/unit/provider/package/aptitude_spec.rb +1 -0
  293. data/spec/unit/provider/package/dnfmodule_spec.rb +247 -0
  294. data/spec/unit/provider/package/dpkg_spec.rb +35 -7
  295. data/spec/unit/provider/package/openbsd_spec.rb +17 -0
  296. data/spec/unit/provider/package/pip_spec.rb +93 -22
  297. data/spec/unit/provider/package/pkg_spec.rb +13 -1
  298. data/spec/unit/provider/package/pkgdmg_spec.rb +1 -1
  299. data/spec/unit/provider/package/pkgng_spec.rb +36 -0
  300. data/spec/unit/provider/package/portage_spec.rb +4 -4
  301. data/spec/unit/provider/package/puppet_gem_spec.rb +4 -1
  302. data/spec/unit/provider/package/yum_spec.rb +90 -0
  303. data/spec/unit/provider/package/zypper_spec.rb +13 -0
  304. data/spec/unit/provider/package_targetable_spec.rb +60 -0
  305. data/spec/unit/provider/selmodule_spec.rb +118 -47
  306. data/spec/unit/provider/service/daemontools_spec.rb +24 -0
  307. data/spec/unit/provider/service/runit_spec.rb +24 -0
  308. data/spec/unit/provider/service/systemd_spec.rb +109 -36
  309. data/spec/unit/provider/user/directoryservice_spec.rb +41 -0
  310. data/spec/unit/provider/user/hpux_spec.rb +2 -2
  311. data/spec/unit/provider/user/openbsd_spec.rb +1 -0
  312. data/spec/unit/provider/user/useradd_spec.rb +81 -16
  313. data/spec/unit/provider/user/windows_adsi_spec.rb +3 -3
  314. data/spec/unit/puppet_pal_2pec.rb +3 -0
  315. data/spec/unit/ssl/certificate_authority_spec.rb +2 -3
  316. data/spec/unit/ssl/certificate_spec.rb +7 -0
  317. data/spec/unit/ssl/host_spec.rb +2 -0
  318. data/spec/unit/test/test_helper_spec.rb +17 -0
  319. data/spec/unit/type/exec_spec.rb +6 -12
  320. data/spec/unit/type/file/content_spec.rb +9 -3
  321. data/spec/unit/type/file_spec.rb +9 -4
  322. data/spec/unit/type/package_spec.rb +8 -0
  323. data/spec/unit/type/selboolean_spec.rb +4 -6
  324. data/spec/unit/type/service_spec.rb +9 -8
  325. data/spec/unit/type/user_spec.rb +19 -13
  326. data/spec/unit/util/execution_spec.rb +16 -0
  327. data/spec/unit/util/http_proxy_spec.rb +97 -0
  328. data/spec/unit/util/log/destinations_spec.rb +2 -26
  329. data/spec/unit/util/log_spec.rb +0 -138
  330. data/spec/unit/util/logging_spec.rb +200 -0
  331. data/spec/unit/util/pidlock_spec.rb +67 -40
  332. data/spec/unit/util/plist_spec.rb +20 -0
  333. data/spec/unit/util/windows/adsi_spec.rb +55 -4
  334. data/spec/unit/util/windows/api_types_spec.rb +104 -40
  335. data/spec/unit/util/windows/sid_spec.rb +2 -2
  336. data/tasks/manpages.rake +1 -0
  337. metadata +16 -7
  338. data/lib/puppet/pops/loader/null_loader.rb +0 -60
  339. data/locales/ja/puppet.po +0 -12114
  340. data/spec/integration/test/test_helper_spec.rb +0 -31
@@ -26,6 +26,7 @@ decode: root
26
26
  # Other tests
27
27
  anothertest: "|/path/to/rt-mailgate --queue 'another test' --action correspond --url http://my.com/"
28
28
  test: "|/path/to/rt-mailgate --queue 'test' --action correspond --url http://my.com/"
29
+ test_with_commas_inside_command: "|/path/to/rt-mailgate --queue 'test' --action correspond --url http://my.com/ --project proj1,proj2"
29
30
 
30
31
  # Included file
31
32
  incfile: :include: /tmp/somefile
@@ -0,0 +1,19 @@
1
+ localmirror-appstream
2
+ Name Stream Profiles Summary
3
+ 389-ds 1.4 [e] 389 Directory Server (base)
4
+ gimp 2.8 [d][e] common [d], devel [i] gimp module
5
+ mariadb 10.3 [d][e] client [i], server [d], galera MariaDB Module
6
+ nodejs 10 [d][e] common [d], development, minimal [i], s2i Javascript runtime
7
+ perl 5.26 [d][e] common [d], minimal [i] Practical Extraction and Report Language
8
+ postgresql 10 [d][e] client, server [d] [i] PostgreSQL server and client module
9
+ ruby 2.5 [d][e] common [d] An interpreter of object-oriented scripting language
10
+ rust-toolset rhel8 [d][e] common [d] [i] Rust
11
+ subversion 1.10 [d][e] common [d], server [i] Apache Subversion
12
+ scala 2.10 [d] common [d] A hybrid functional/object-oriented language for the JVM
13
+ squid 4 [d] common [d] Squid - Optimising Web Delivery
14
+ subversion 1.10 [d] common [d], server Apache Subversion
15
+ swig 3.0 [d][x] common [d], complete Connects C/C++/Objective C to some high-level programming languages
16
+ varnish 6 [d] common [d] Varnish HTTP cache
17
+ virt rhel [d][x] common [d] Virtualization module
18
+
19
+ Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
@@ -1,3 +1,5 @@
1
1
  shells/bash-completion < needs updating (index has 2.1_3)
2
2
  ftp/curl < needs updating (index has 7.33.0_2)
3
3
  shells/zsh < needs updating (index has 5.0.4)
4
+ sysutils/orphan ? orphaned: sysutils/orphan
5
+ sysutils/broken ! Comparison failed
@@ -0,0 +1,9 @@
1
+ Loaded plugins: product-id, search-disabled-repos, subscription-manager
2
+
3
+ This system is not registered with an entitlement server. You can use subscription-manager to register on.
4
+
5
+ curl.i686 7.32.0-10.fc20 updates
6
+ curl.x86_64 7.32.0-10.fc20 updates
7
+ gawk.i686 4.1.0-3.fc20 updates
8
+ dhclient.i686 12:4.1.1-38.P1.fc20 updates
9
+ java-1.8.0-openjdk.x86_64 1:1.8.0.131-2.b11.el7_3 updates
@@ -5,3 +5,12 @@ autovt@.service disabled
5
5
  avahi-daemon.service enabled
6
6
  blk-availability.service disabled
7
7
  brandbot.service static
8
+ apparmor.service bad
9
+ udev.service enabled-runtime
10
+ ufw.service linked
11
+ umountfs.service linked-runtime
12
+ umountnfs.service masked
13
+ umountroot.service masked-runtime
14
+ urandom.service indirect
15
+ user@.service generated
16
+ uuidd.service transient
@@ -62,5 +62,71 @@ describe Puppet::Configurer do
62
62
  expect(summary["time"]).to be_key("notify")
63
63
  expect(summary["time"]["last_run"]).to be_between(t1, t2)
64
64
  end
65
+
66
+ it "applies a cached catalog if pluginsync fails when usecacheonfailure is true" do
67
+ Puppet[:ignore_plugin_errors] = false
68
+
69
+ Puppet[:use_cached_catalog] = false
70
+ Puppet[:usecacheonfailure] = true
71
+
72
+ report = Puppet::Transaction::Report.new
73
+ expect_any_instance_of(Puppet::Configurer::Downloader).to receive(:evaluate).and_raise(Puppet::Error, 'Failed to retrieve: some file')
74
+ expect(Puppet::Resource::Catalog.indirection).to receive(:find).and_return(@catalog)
75
+
76
+ @configurer.run(pluginsync: true, report: report)
77
+ expect(report.cached_catalog_status).to eq('on_failure')
78
+ end
79
+
80
+ describe 'resubmitting facts' do
81
+ context 'when resubmit_facts is set to false' do
82
+ it 'should not send data' do
83
+ expect(@configurer).to receive(:resubmit_facts).never
84
+
85
+ @configurer.run(catalog: @catalog)
86
+ end
87
+ end
88
+
89
+ context 'when resubmit_facts is set to true' do
90
+ let(:test_facts) { Puppet::Node::Facts.new('configurer.test') }
91
+ let(:fact_rest_terminus) { Puppet::Node::Facts.indirection.terminus(:rest) }
92
+
93
+ before(:each) do
94
+ Puppet[:resubmit_facts] = true
95
+
96
+ allow(@configurer).to receive(:find_facts).and_return(test_facts)
97
+ allow(fact_rest_terminus).to receive(:save)
98
+ end
99
+
100
+ it 'sends fact data using the rest terminus' do
101
+ expect(fact_rest_terminus).to receive(:save)
102
+
103
+ @configurer.run(catalog: @catalog)
104
+ end
105
+
106
+ it 'logs errors that occur during fact generation' do
107
+ allow(@configurer).to receive(:find_facts).and_raise('error generating facts')
108
+ expect(Puppet).to receive(:log_exception).with(instance_of(RuntimeError),
109
+ /^Failed to submit facts/)
110
+
111
+ @configurer.run(catalog: @catalog)
112
+ end
113
+
114
+ it 'logs errors that occur during fact submission' do
115
+ allow(fact_rest_terminus).to receive(:save).and_raise('error sending facts')
116
+ expect(Puppet).to receive(:log_exception).with(instance_of(RuntimeError),
117
+ /^Failed to submit facts/)
118
+
119
+ @configurer.run(catalog: @catalog)
120
+ end
121
+
122
+ it 'records time spent resubmitting facts' do
123
+ report = Puppet::Transaction::Report.new
124
+
125
+ @configurer.run(catalog: @catalog, report: report)
126
+
127
+ expect(report.metrics['time'].values).to include(["resubmit_facts", anything, Numeric])
128
+ end
129
+ end
130
+ end
65
131
  end
66
132
  end
@@ -1,6 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  require 'puppet_spec/compiler'
4
+ require 'puppet/indirector/data_binding/hiera'
4
5
 
5
6
  describe "Data binding" do
6
7
  include PuppetSpec::Files
@@ -130,8 +130,7 @@ describe "Puppet defaults" do
130
130
  Puppet::Util.withenv( {"PATH" => path }, :windows) do
131
131
  Puppet.settings[:path] = "none" # this causes it to ignore the setting
132
132
 
133
- envhash = Puppet::Util::Windows::Process.get_environment_strings
134
- expect(envhash['Path']).to eq(path)
133
+ expect(Puppet::Util.get_env('Path')).to eq(path)
135
134
  end
136
135
  end
137
136
  end
@@ -1,59 +1,41 @@
1
1
  require 'spec_helper'
2
- require 'puppet/face'
3
- require 'puppet/file_serving/metadata'
4
- require 'puppet/file_serving/content'
5
- require 'puppet/indirector/memory'
2
+ require 'webmock/rspec'
6
3
 
7
- module PuppetFaceIntegrationSpecs
8
4
  describe "Puppet plugin face" do
9
- INDIRECTORS = [
10
- Puppet::Indirector::FileMetadata,
11
- Puppet::Indirector::FileContent,
12
- ]
5
+ before :each do
6
+ metadata = "[{\"path\":\"/etc/puppetlabs/code\",\"relative_path\":\".\",\"links\":\"follow\",\"owner\":0,\"group\":0,\"mode\":420,\"checksum\":{\"type\":\"ctime\",\"value\":\"{ctime}2020-07-10 14:00:00 -0700\"},\"type\":\"directory\",\"destination\":null}]"
7
+ stub_request(:get, %r{/puppet/v3/file_metadatas/(plugins|locales)}).to_return(status: 200, body: metadata, headers: {'Content-Type' => 'application/json'})
13
8
 
14
- INDIRECTED_CLASSES = [
15
- Puppet::FileServing::Metadata,
16
- Puppet::FileServing::Content,
17
- Puppet::Node::Facts,
18
- ]
19
-
20
- INDIRECTORS.each do |indirector|
21
- class indirector::Memory < Puppet::Indirector::Memory
22
- def find(request)
23
- model.new('/dev/null', { 'type' => 'directory' })
24
- end
25
- end
9
+ # response retains owner/group/mode due to source_permissions => use
10
+ facts_metadata = "[{\"path\":\"/etc/puppetlabs/code\",\"relative_path\":\".\",\"links\":\"follow\",\"owner\":500,\"group\":500,\"mode\":493,\"checksum\":{\"type\":\"ctime\",\"value\":\"{ctime}2020-07-10 14:00:00 -0700\"},\"type\":\"directory\",\"destination\":null}]"
11
+ stub_request(:get, %r{/puppet/v3/file_metadatas/pluginfacts}).to_return(status: 200, body: facts_metadata, headers: {'Content-Type' => 'application/json'})
26
12
  end
27
13
 
28
- before do
29
- FileUtils.mkdir(File.join(Puppet[:vardir], 'lib'))
30
- FileUtils.mkdir(File.join(Puppet[:vardir], 'facts.d'))
31
- FileUtils.mkdir(File.join(Puppet[:vardir], 'locales'))
32
- @termini_classes = {}
33
- INDIRECTED_CLASSES.each do |indirected|
34
- @termini_classes[indirected] = indirected.indirection.terminus_class
35
- indirected.indirection.terminus_class = :memory
36
- end
37
- end
14
+ it "processes a download request resulting in no changes" do
15
+ # /opt/puppetlabs/puppet/cache/facts.d will be created based on our umask.
16
+ # If the mode on disk is not 0755, then the mode from the metadata response
17
+ # (493 => 0755) will be applied, resulting in "plugins were downloaded"
18
+ # message. Enforce a umask so the results are consistent.
19
+ Puppet::FileSystem.mkpath(Puppet[:pluginfactdest])
20
+ Puppet::FileSystem.chmod(0755, Puppet[:pluginfactdest])
38
21
 
39
- after do
40
- INDIRECTED_CLASSES.each do |indirected|
41
- indirected.indirection.terminus_class = @termini_classes[indirected]
42
- indirected.indirection.termini.clear
43
- end
22
+ app = Puppet::Application[:plugin]
23
+ app.command_line.args << 'download'
24
+ expect {
25
+ app.run
26
+ }.to exit_with(0)
27
+ .and output(/No plugins downloaded/).to_stdout
44
28
  end
45
29
 
46
- def init_cli_args_and_apply_app(args = ["download"])
47
- Puppet::Application.find(:plugin).new(double('command_line', :subcommand_name => :plugin, :args => args))
48
- end
30
+ it "updates the facts.d mode", unless: Puppet::Util::Platform.windows? do
31
+ Puppet::FileSystem.mkpath(Puppet[:pluginfactdest])
32
+ Puppet::FileSystem.chmod(0775, Puppet[:pluginfactdest])
49
33
 
50
- it "processes a download request" do
51
- app = init_cli_args_and_apply_app
52
- expect do
53
- expect {
54
- app.run
55
- }.to exit_with(0)
56
- end.to have_printed(/No plugins downloaded/)
34
+ app = Puppet::Application[:plugin]
35
+ app.command_line.args << 'download'
36
+ expect {
37
+ app.run
38
+ }.to exit_with(0)
39
+ .and output(/Downloaded these plugins: .*facts\.d/).to_stdout
57
40
  end
58
41
  end
59
- end
@@ -8,6 +8,10 @@ describe Puppet::Node::Facts::Facter do
8
8
  include PuppetSpec::Files
9
9
  include PuppetSpec::Compiler
10
10
 
11
+ before :each do
12
+ Puppet::Node::Facts.indirection.terminus_class = :facter
13
+ end
14
+
11
15
  it "preserves case in fact values" do
12
16
  Facter.add(:downcase_test) do
13
17
  setcode do
@@ -841,6 +841,17 @@ describe Puppet::Parser::Compiler do
841
841
  MANIFEST
842
842
  end.to raise_error(/Foo\[bar\]:\s+parameter 'a' expects a value for key 'd'\s+parameter 'a' unrecognized key 'c'/m)
843
843
  end
844
+
845
+ it 'handles Sensitive type in resource array' do
846
+ catalog = compile_to_catalog(<<-MANIFEST)
847
+ define foo(Sensitive[String] $password) {
848
+ notify{ "${title}": message => "${password}" }
849
+ }
850
+ foo { ['testA', 'testB']: password =>Sensitive('some password') }
851
+ MANIFEST
852
+ expect(catalog).to have_resource("Notify[testA]").with_parameter(:message, 'Sensitive [value redacted]')
853
+ expect(catalog).to have_resource("Notify[testB]").with_parameter(:message, 'Sensitive [value redacted]')
854
+ end
844
855
  end
845
856
 
846
857
  context 'when using typed parameters in class' do
@@ -0,0 +1,46 @@
1
+ require 'spec_helper'
2
+ require 'puppet_spec/compiler'
3
+
4
+ describe Puppet::Type.type(:notify) do
5
+ include PuppetSpec::Compiler
6
+
7
+ it "logs the title at notice level" do
8
+ apply_compiled_manifest(<<-MANIFEST)
9
+ notify { 'hi': }
10
+ MANIFEST
11
+
12
+ expect(@logs).to include(an_object_having_attributes(level: :notice, message: 'hi'))
13
+ end
14
+
15
+ it "logs the message property" do
16
+ apply_compiled_manifest(<<-MANIFEST)
17
+ notify { 'title':
18
+ message => 'hello'
19
+ }
20
+ MANIFEST
21
+
22
+ expect(@logs).to include(an_object_having_attributes(level: :notice, message: "defined 'message' as 'hello'"))
23
+ end
24
+
25
+ it "redacts sensitive message properties" do
26
+ apply_compiled_manifest(<<-MANIFEST)
27
+ $message = Sensitive('secret')
28
+ notify { 'notify1':
29
+ message => $message
30
+ }
31
+ MANIFEST
32
+
33
+ expect(@logs).to include(an_object_having_attributes(level: :notice, message: 'changed [redacted] to [redacted]'))
34
+ end
35
+
36
+ it "redacts sensitive interpolated message properties" do
37
+ apply_compiled_manifest(<<-MANIFEST)
38
+ $message = Sensitive('secret')
39
+ notify { 'notify2':
40
+ message => "${message}"
41
+ }
42
+ MANIFEST
43
+
44
+ expect(@logs).to include(an_object_having_attributes(level: :notice, message: "defined 'message' as 'Sensitive [value redacted]'"))
45
+ end
46
+ end
@@ -82,6 +82,9 @@ describe Puppet::Util::Windows::ADSI::Group,
82
82
  it 'should return a list of members resolvable with Puppet::Util::Windows::ADSI::Group.name_sid_hash' do
83
83
  temp_groupname = "g#{SecureRandom.uuid}"
84
84
  temp_username = "u#{SecureRandom.uuid}"[0..12]
85
+ # From https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements
86
+ specials = "~!@#$%^&*_-+=`|\(){}[]:;\"'<>,.?/"
87
+ temp_password = "p#{SecureRandom.uuid[0..7]}-#{SecureRandom.uuid.upcase[0..7]}-#{specials[rand(specials.length)]}"
85
88
 
86
89
  # select a virtual account that requires an authority to be able to resolve to SID
87
90
  # the Dhcp service is chosen for no particular reason aside from it's a service available on all Windows versions
@@ -110,6 +113,8 @@ describe Puppet::Util::Windows::ADSI::Group,
110
113
  begin
111
114
  # :SidTypeUser as user on localhost, can be resolved with or without authority prefix
112
115
  user = Puppet::Util::Windows::ADSI::User.create(temp_username)
116
+ # appveyor sometimes requires a password
117
+ user.password = temp_password
113
118
  user.commit()
114
119
  users.push({ :sid => user.sid.sid, :name => Puppet::Util::Windows::ADSI.computer_name + '\\' + temp_username })
115
120
 
@@ -160,7 +165,7 @@ describe Puppet::Util::Windows::ADSI::Group,
160
165
 
161
166
  # unresolvable SID
162
167
  expect(admins.members[1].sid).to eq('S-1-5-21-3661721861-956923663-2119435483-1112')
163
- expect(admins.members[1].account).to eq('S-1-5-21-3661721861-956923663-2119435483-1112 (unresolvable)')
168
+ expect(admins.members[1].account).to eq('S-1-5-21-3661721861-956923663-2119435483-1112')
164
169
  expect(admins.members[1].account_type).to eq(:SidTypeUnknown)
165
170
  end
166
171
 
@@ -259,23 +259,23 @@ describe Puppet::Util::Windows::Registry do
259
259
  {
260
260
  name: 'REG_SZ',
261
261
  type: Win32::Registry::REG_SZ,
262
- value: "reg sz\u0000 string",
263
- expected_value: "reg sz string"
262
+ value: "reg sz\u0000\u0000 string",
263
+ expected_value: "reg sz"
264
264
  },
265
265
  {
266
266
  name: 'REG_SZ_2',
267
267
  type: Win32::Registry::REG_SZ,
268
- value: "reg sz\x00 string",
269
- expected_value: "reg sz string"
268
+ value: "reg sz 2\x00\x00 string",
269
+ expected_value: "reg sz 2"
270
270
  },
271
271
  {
272
272
  name: 'REG_EXPAND_SZ',
273
273
  type: Win32::Registry::REG_EXPAND_SZ,
274
- value: "\0reg expand string",
275
- expected_value: " reg expand string"
274
+ value: "\0\0\0reg expand string",
275
+ expected_value: ""
276
276
  }
277
277
  ].each do |pair|
278
- it 'replaces null bytes with spaces' do
278
+ it 'reads up to the first wide null' do
279
279
  hklm.create("#{puppet_key}\\#{subkey_name}", Win32::Registry::KEY_ALL_ACCESS) do |reg|
280
280
  reg.write(value_name, pair[:type], pair[:value])
281
281
  end
@@ -187,6 +187,8 @@ shared_context 'types_setup' do
187
187
  result << Puppet::Pops::Types::PURIType
188
188
  result << Puppet::Pops::Types::PTupleType.new([tf.rich_data])
189
189
  result << Puppet::Pops::Types::PObjectType
190
+ result << Puppet::Pops::Types::PTypeType
191
+ result << Puppet::Pops::Types::PTypeSetType
190
192
  result
191
193
  end
192
194
  def rich_data_compatible_types
@@ -185,31 +185,26 @@ describe Puppet::Agent do
185
185
 
186
186
  # So we don't actually try to hit the filesystem.
187
187
  allow(@agent).to receive(:lock).and_yield
188
-
189
- allow(Kernel).to receive(:fork)
190
- allow(Process).to receive(:waitpid2).and_return([123, double('process::status', :exitstatus => 0)])
191
- allow(@agent).to receive(:exit)
192
188
  end
193
189
 
194
190
  it "should run the agent in a forked process" do
195
191
  client = AgentTestClient.new
196
192
  expect(AgentTestClient).to receive(:new).and_return(client)
197
193
 
198
- expect(client).to receive(:run)
194
+ expect(client).to receive(:run).and_return(0)
199
195
 
200
196
  expect(Kernel).to receive(:fork).and_yield
201
- @agent.run
197
+ expect { @agent.run }.to exit_with(0)
202
198
  end
203
199
 
204
200
  it "should exit child process if child exit" do
205
201
  client = AgentTestClient.new
206
202
  expect(AgentTestClient).to receive(:new).and_return(client)
207
203
 
208
- expect(client).to receive(:run).and_raise(SystemExit)
204
+ expect(client).to receive(:run).and_raise(SystemExit.new(-1))
209
205
 
210
206
  expect(Kernel).to receive(:fork).and_yield
211
- expect(@agent).to receive(:exit).with(-1)
212
- @agent.run
207
+ expect { @agent.run }.to exit_with(-1)
213
208
  end
214
209
 
215
210
  it 'should exit with 1 if an exception is raised' do
@@ -219,31 +214,44 @@ describe Puppet::Agent do
219
214
  expect(client).to receive(:run).and_raise(StandardError)
220
215
 
221
216
  expect(Kernel).to receive(:fork).and_yield
222
- expect(@agent).to receive(:exit).with(1)
223
- @agent.run
217
+ expect { @agent.run }.to exit_with(1)
224
218
  end
225
219
 
226
- it "should re-raise exit happening in the child" do
227
- allow(Process).to receive(:waitpid2).and_return([123, double('process::status', :exitstatus => -1)])
228
- expect { @agent.run }.to raise_error(SystemExit)
220
+ it 'should exit with 254 if NoMemoryError exception is raised' do
221
+ client = AgentTestClient.new
222
+ expect(AgentTestClient).to receive(:new).and_return(client)
223
+
224
+ expect(client).to receive(:run).and_raise(NoMemoryError)
225
+
226
+ expect(Kernel).to receive(:fork).and_yield
227
+ expect { @agent.run }.to exit_with(254)
229
228
  end
230
229
 
231
- it "should re-raise NoMoreMemory happening in the child" do
232
- allow(Process).to receive(:waitpid2).and_return([123, double('process::status', :exitstatus => -2)])
233
- expect { @agent.run }.to raise_error(NoMemoryError)
230
+ it "should return the block exit code as the child exit code" do
231
+ expect(Kernel).to receive(:fork).and_yield
232
+ expect {
233
+ @agent.run_in_fork {
234
+ 777
235
+ }
236
+ }.to exit_with(777)
234
237
  end
235
238
 
236
- it "should return the child exit code" do
237
- allow(Process).to receive(:waitpid2).and_return([123, double('process::status', :exitstatus => 777)])
238
- expect(@agent.run).to eq(777)
239
+ it "should return `1` exit code if the block returns `nil`" do
240
+ expect(Kernel).to receive(:fork).and_yield
241
+ expect {
242
+ @agent.run_in_fork {
243
+ nil
244
+ }
245
+ }.to exit_with(1)
239
246
  end
240
247
 
241
- it "should return the block exit code as the child exit code" do
248
+ it "should return `1` exit code if the block returns `false`" do
242
249
  expect(Kernel).to receive(:fork).and_yield
243
- expect(@agent).to receive(:exit).with(777)
244
- @agent.run_in_fork {
245
- 777
246
- }
250
+ expect {
251
+ @agent.run_in_fork {
252
+ false
253
+ }
254
+ }.to exit_with(1)
247
255
  end
248
256
  end
249
257
 
@@ -283,7 +291,7 @@ describe Puppet::Agent do
283
291
  expect(client).not_to receive(:handling)
284
292
  expect(Puppet).to receive(:log_exception).with(be_an_instance_of(Puppet::Agent::RunTimeoutError), anything)
285
293
 
286
- expect(@agent.run).to eq(1)
294
+ expect(@agent.run).to eq(nil)
287
295
  end
288
296
  end
289
297
  end