puppet 6.0.0 → 6.1.0

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 (259) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/Gemfile.lock +20 -20
  4. data/Guardfile.example +76 -0
  5. data/LICENSE +189 -4
  6. data/README.md +3 -3
  7. data/Rakefile +5 -2
  8. data/ext/solaris/smf/svc-puppetd +8 -1
  9. data/ext/solaris/smf/svc-puppetmasterd +8 -1
  10. data/lib/puppet/application/apply.rb +100 -59
  11. data/lib/puppet/application/cert.rb +4 -114
  12. data/lib/puppet/application/device.rb +48 -32
  13. data/lib/puppet/application/script.rb +1 -1
  14. data/lib/puppet/application/ssl.rb +135 -51
  15. data/lib/puppet/application.rb +5 -0
  16. data/lib/puppet/configurer.rb +2 -3
  17. data/lib/puppet/defaults.rb +33 -49
  18. data/lib/puppet/etc.rb +20 -0
  19. data/lib/puppet/face/config.rb +3 -3
  20. data/lib/puppet/face/key.rb +1 -1
  21. data/lib/puppet/face/node/clean.rb +0 -1
  22. data/lib/puppet/feature/base.rb +1 -1
  23. data/lib/puppet/file_bucket/dipper.rb +1 -1
  24. data/lib/puppet/file_serving/fileset.rb +1 -1
  25. data/lib/puppet/functions/abs.rb +1 -1
  26. data/lib/puppet/functions/new.rb +1 -1
  27. data/lib/puppet/module/task.rb +29 -38
  28. data/lib/puppet/pal/catalog_compiler.rb +96 -0
  29. data/lib/puppet/pal/compiler.rb +221 -0
  30. data/lib/puppet/pal/function_signature.rb +52 -0
  31. data/lib/puppet/pal/json_catalog_encoder.rb +67 -0
  32. data/lib/puppet/pal/pal_api.rb +15 -0
  33. data/lib/puppet/pal/pal_impl.rb +523 -0
  34. data/lib/puppet/pal/plan_signature.rb +71 -0
  35. data/lib/puppet/pal/script_compiler.rb +71 -0
  36. data/lib/puppet/pal/task_signature.rb +58 -0
  37. data/lib/puppet/parser/catalog_compiler.rb +24 -0
  38. data/lib/puppet/parser/compiler.rb +3 -1
  39. data/lib/puppet/parser/functions/generate.rb +7 -6
  40. data/lib/puppet/plugins/configuration.rb +5 -1
  41. data/lib/puppet/pops/evaluator/collectors/abstract_collector.rb +3 -1
  42. data/lib/puppet/pops/evaluator/deferred_resolver.rb +3 -0
  43. data/lib/puppet/pops/evaluator/evaluator_impl.rb +5 -1
  44. data/lib/puppet/pops/evaluator/external_syntax_support.rb +3 -3
  45. data/lib/puppet/pops/evaluator/runtime3_converter.rb +2 -2
  46. data/lib/puppet/pops/loader/ruby_legacy_function_instantiator.rb +19 -10
  47. data/lib/puppet/pops/loader/task_instantiator.rb +13 -70
  48. data/lib/puppet/pops/parser/heredoc_support.rb +1 -2
  49. data/lib/puppet/pops/parser/lexer2.rb +1 -1
  50. data/lib/puppet/pops/pcore.rb +10 -33
  51. data/lib/puppet/pops/serialization/to_data_converter.rb +9 -1
  52. data/lib/puppet/pops/serialization.rb +1 -0
  53. data/lib/puppet/pops/types/p_timespan_type.rb +2 -2
  54. data/lib/puppet/pops/types/string_converter.rb +18 -4
  55. data/lib/puppet/pops/validation/checker4_0.rb +17 -2
  56. data/lib/puppet/provider/exec.rb +59 -57
  57. data/lib/puppet/provider/group/aix.rb +18 -2
  58. data/lib/puppet/provider/group/windows_adsi.rb +7 -3
  59. data/lib/puppet/provider/nameservice.rb +1 -25
  60. data/lib/puppet/provider/package/dnf.rb +2 -0
  61. data/lib/puppet/provider/package/pkgng.rb +37 -21
  62. data/lib/puppet/provider/package/portage.rb +2 -2
  63. data/lib/puppet/provider/package/windows/exe_package.rb +16 -10
  64. data/lib/puppet/provider/package/windows/msi_package.rb +8 -0
  65. data/lib/puppet/provider/package/windows/package.rb +9 -1
  66. data/lib/puppet/provider/package/windows.rb +2 -2
  67. data/lib/puppet/provider/package/yum.rb +1 -1
  68. data/lib/puppet/provider/parsedfile.rb +25 -4
  69. data/lib/puppet/provider/service/launchd.rb +19 -3
  70. data/lib/puppet/provider/service/smf.rb +54 -0
  71. data/lib/puppet/provider/service/systemd.rb +19 -0
  72. data/lib/puppet/provider/service/upstart.rb +1 -0
  73. data/lib/puppet/provider/service/windows.rb +22 -5
  74. data/lib/puppet/provider/user/aix.rb +48 -2
  75. data/lib/puppet/provider/user/useradd.rb +2 -10
  76. data/lib/puppet/provider/user/windows_adsi.rb +9 -1
  77. data/lib/puppet/resource/catalog.rb +1 -5
  78. data/lib/puppet/resource.rb +3 -1
  79. data/lib/puppet/ssl/host.rb +26 -16
  80. data/lib/puppet/syntax_checkers/epp.rb +34 -0
  81. data/lib/puppet/syntax_checkers/pp.rb +34 -0
  82. data/lib/puppet/transaction/event_manager.rb +13 -1
  83. data/lib/puppet/transaction/persistence.rb +1 -1
  84. data/lib/puppet/transaction/resource_harness.rb +3 -1
  85. data/lib/puppet/type/group.rb +29 -1
  86. data/lib/puppet/type/package.rb +5 -1
  87. data/lib/puppet/type/resources.rb +12 -2
  88. data/lib/puppet/type/schedule.rb +7 -0
  89. data/lib/puppet/type/service.rb +12 -0
  90. data/lib/puppet/type/user.rb +5 -2
  91. data/lib/puppet/type.rb +6 -0
  92. data/lib/puppet/util/command_line.rb +2 -3
  93. data/lib/puppet/util/execution.rb +15 -1
  94. data/lib/puppet/util/filetype.rb +56 -8
  95. data/lib/puppet/util/log/destinations.rb +3 -2
  96. data/lib/puppet/util/logging.rb +3 -2
  97. data/lib/puppet/util/posix.rb +15 -0
  98. data/lib/puppet/util/selinux.rb +1 -1
  99. data/lib/puppet/util/storage.rb +12 -0
  100. data/lib/puppet/util/windows/adsi.rb +79 -2
  101. data/lib/puppet/util/windows/api_types.rb +1 -1
  102. data/lib/puppet/util/windows/process.rb +23 -3
  103. data/lib/puppet/util/windows/registry.rb +29 -5
  104. data/lib/puppet/util/windows/security.rb +14 -0
  105. data/lib/puppet/util/windows/service.rb +294 -74
  106. data/lib/puppet/util/windows/user.rb +3 -5
  107. data/lib/puppet/util.rb +7 -3
  108. data/lib/puppet/version.rb +1 -1
  109. data/lib/puppet.rb +1 -0
  110. data/lib/puppet_pal.rb +5 -1099
  111. data/locales/ja/puppet.po +952 -986
  112. data/locales/puppet.pot +592 -347
  113. data/man/man5/puppet.conf.5 +26 -31
  114. data/man/man8/puppet-agent.8 +1 -1
  115. data/man/man8/puppet-apply.8 +1 -1
  116. data/man/man8/puppet-catalog.8 +1 -1
  117. data/man/man8/puppet-config.8 +4 -4
  118. data/man/man8/puppet-describe.8 +1 -1
  119. data/man/man8/puppet-device.8 +23 -19
  120. data/man/man8/puppet-doc.8 +1 -1
  121. data/man/man8/puppet-epp.8 +1 -1
  122. data/man/man8/puppet-facts.8 +1 -1
  123. data/man/man8/puppet-filebucket.8 +1 -1
  124. data/man/man8/puppet-generate.8 +1 -1
  125. data/man/man8/puppet-help.8 +1 -1
  126. data/man/man8/puppet-key.8 +2 -2
  127. data/man/man8/puppet-lookup.8 +1 -1
  128. data/man/man8/puppet-man.8 +1 -1
  129. data/man/man8/puppet-module.8 +1 -1
  130. data/man/man8/puppet-node.8 +1 -1
  131. data/man/man8/puppet-parser.8 +1 -1
  132. data/man/man8/puppet-plugin.8 +1 -1
  133. data/man/man8/puppet-report.8 +1 -1
  134. data/man/man8/puppet-resource.8 +1 -1
  135. data/man/man8/puppet-script.8 +1 -1
  136. data/man/man8/puppet-ssl.8 +26 -3
  137. data/man/man8/puppet-status.8 +1 -1
  138. data/man/man8/puppet.8 +2 -2
  139. data/spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/bad_func_load.rb +11 -0
  140. data/spec/fixtures/unit/provider/package/pkgng/pkg.query +7 -1
  141. data/spec/fixtures/unit/provider/package/pkgng/pkg.query.zsh +1 -0
  142. data/spec/fixtures/unit/provider/service/smf/svcs_fmri.out +6 -0
  143. data/spec/fixtures/unit/provider/service/smf/svcs_multiple_fmris.out +13 -0
  144. data/spec/integration/application/apply_spec.rb +4 -1
  145. data/spec/integration/parser/collection_spec.rb +4 -8
  146. data/spec/integration/provider/service/windows_spec.rb +5 -5
  147. data/spec/integration/ssl/key_spec.rb +0 -4
  148. data/spec/integration/transaction_spec.rb +559 -0
  149. data/spec/integration/type/file_spec.rb +6 -6
  150. data/spec/integration/util/windows/registry_spec.rb +39 -0
  151. data/spec/integration/util/windows/security_spec.rb +10 -7
  152. data/spec/integration/util/windows/user_spec.rb +37 -17
  153. data/spec/lib/puppet/test_ca.rb +1 -1
  154. data/spec/spec_helper.rb +1 -1
  155. data/spec/unit/agent_spec.rb +2 -2
  156. data/spec/unit/application/apply_spec.rb +55 -2
  157. data/spec/unit/application/device_spec.rb +10 -7
  158. data/spec/unit/application/face_base_spec.rb +1 -1
  159. data/spec/unit/application/lookup_spec.rb +2 -1
  160. data/spec/unit/application/ssl_spec.rb +178 -109
  161. data/spec/unit/application_spec.rb +29 -11
  162. data/spec/unit/configurer/downloader_spec.rb +1 -1
  163. data/spec/unit/configurer_spec.rb +16 -5
  164. data/spec/unit/etc_spec.rb +25 -0
  165. data/spec/unit/face/node_spec.rb +1 -3
  166. data/spec/unit/face/parser_spec.rb +15 -0
  167. data/spec/unit/file_serving/fileset_spec.rb +11 -11
  168. data/spec/unit/functions/logging_spec.rb +10 -3
  169. data/spec/unit/indirector/catalog/json_spec.rb +9 -3
  170. data/spec/unit/indirector/yaml_spec.rb +1 -1
  171. data/spec/unit/network/http/connection_spec.rb +2 -2
  172. data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +36 -0
  173. data/spec/unit/pops/evaluator/runtime3_converter_spec.rb +22 -4
  174. data/spec/unit/pops/loaders/loader_spec.rb +9 -17
  175. data/spec/unit/pops/loaders/loaders_spec.rb +48 -0
  176. data/spec/unit/pops/loaders/module_loaders_spec.rb +7 -7
  177. data/spec/unit/pops/parser/parse_heredoc_spec.rb +16 -0
  178. data/spec/unit/pops/serialization/to_from_hr_spec.rb +9 -0
  179. data/spec/unit/pops/types/p_timespan_type_spec.rb +22 -0
  180. data/spec/unit/pops/types/p_timestamp_type_spec.rb +19 -0
  181. data/spec/unit/pops/types/string_converter_spec.rb +25 -1
  182. data/spec/unit/pops/types/task_spec.rb +42 -116
  183. data/spec/unit/pops/validator/validator_spec.rb +24 -10
  184. data/spec/unit/provider/exec/posix_spec.rb +24 -0
  185. data/spec/unit/provider/group/aix_spec.rb +20 -6
  186. data/spec/unit/provider/group/ldap_spec.rb +22 -25
  187. data/spec/unit/provider/group/pw_spec.rb +7 -10
  188. data/spec/unit/provider/group/windows_adsi_spec.rb +42 -33
  189. data/spec/unit/provider/nameservice/directoryservice_spec.rb +97 -103
  190. data/spec/unit/provider/package/aix_spec.rb +5 -8
  191. data/spec/unit/provider/package/apt_spec.rb +3 -6
  192. data/spec/unit/provider/package/dnf_spec.rb +38 -25
  193. data/spec/unit/provider/package/dpkg_spec.rb +18 -21
  194. data/spec/unit/provider/package/freebsd_spec.rb +4 -7
  195. data/spec/unit/provider/package/gem_spec.rb +41 -41
  196. data/spec/unit/provider/package/hpux_spec.rb +7 -10
  197. data/spec/unit/provider/package/macports_spec.rb +13 -15
  198. data/spec/unit/provider/package/nim_spec.rb +3 -10
  199. data/spec/unit/provider/package/openbsd_spec.rb +14 -17
  200. data/spec/unit/provider/package/pip3_spec.rb +3 -6
  201. data/spec/unit/provider/package/pip_spec.rb +45 -49
  202. data/spec/unit/provider/package/pkgin_spec.rb +13 -18
  203. data/spec/unit/provider/package/pkgng_spec.rb +32 -27
  204. data/spec/unit/provider/package/puppet_gem_spec.rb +6 -9
  205. data/spec/unit/provider/package/tdnf_spec.rb +9 -12
  206. data/spec/unit/provider/package/windows/exe_package_spec.rb +3 -3
  207. data/spec/unit/provider/package/windows_spec.rb +4 -4
  208. data/spec/unit/provider/package/yum_spec.rb +30 -16
  209. data/spec/unit/provider/package/zypper_spec.rb +17 -19
  210. data/spec/unit/provider/service/bsd_spec.rb +7 -9
  211. data/spec/unit/provider/service/daemontools_spec.rb +12 -16
  212. data/spec/unit/provider/service/debian_spec.rb +6 -10
  213. data/spec/unit/provider/service/freebsd_spec.rb +2 -2
  214. data/spec/unit/provider/service/launchd_spec.rb +19 -0
  215. data/spec/unit/provider/service/openbsd_spec.rb +13 -17
  216. data/spec/unit/provider/service/rcng_spec.rb +2 -4
  217. data/spec/unit/provider/service/redhat_spec.rb +12 -11
  218. data/spec/unit/provider/service/runit_spec.rb +7 -14
  219. data/spec/unit/provider/service/smf_spec.rb +77 -13
  220. data/spec/unit/provider/service/src_spec.rb +11 -16
  221. data/spec/unit/provider/service/systemd_spec.rb +39 -1
  222. data/spec/unit/provider/service/windows_spec.rb +39 -7
  223. data/spec/unit/provider/user/aix_spec.rb +43 -2
  224. data/spec/unit/provider/user/hpux_spec.rb +3 -5
  225. data/spec/unit/provider/user/ldap_spec.rb +29 -32
  226. data/spec/unit/provider/user/pw_spec.rb +10 -13
  227. data/spec/unit/provider/user/useradd_spec.rb +2 -2
  228. data/spec/unit/provider/user/windows_adsi_spec.rb +4 -4
  229. data/spec/unit/puppet_pal_2pec.rb +6 -6
  230. data/spec/unit/puppet_pal_catalog_spec.rb +58 -0
  231. data/spec/unit/resource/catalog_spec.rb +2 -2
  232. data/spec/unit/resource_spec.rb +31 -0
  233. data/spec/unit/ssl/host_spec.rb +22 -1
  234. data/spec/unit/ssl/key_spec.rb +2 -4
  235. data/spec/unit/task_spec.rb +50 -5
  236. data/spec/unit/transaction/event_manager_spec.rb +12 -1
  237. data/spec/unit/transaction/persistence_spec.rb +4 -4
  238. data/spec/unit/transaction/resource_harness_spec.rb +18 -0
  239. data/spec/unit/type/group_spec.rb +11 -3
  240. data/spec/unit/type/resources_spec.rb +18 -0
  241. data/spec/unit/type/service_spec.rb +27 -1
  242. data/spec/unit/util/execution_spec.rb +77 -0
  243. data/spec/unit/util/filetype_spec.rb +13 -5
  244. data/spec/unit/util/log/destinations_spec.rb +10 -0
  245. data/spec/unit/util/logging_spec.rb +58 -41
  246. data/spec/unit/util/monkey_patches_spec.rb +18 -5
  247. data/spec/unit/util/posix_spec.rb +28 -0
  248. data/spec/unit/util/selinux_spec.rb +4 -0
  249. data/spec/unit/util/storage_spec.rb +107 -0
  250. data/spec/unit/util/suidmanager_spec.rb +1 -3
  251. data/spec/unit/util/windows/adsi_spec.rb +95 -0
  252. data/spec/unit/util/windows/service_spec.rb +377 -131
  253. metadata +24 -11
  254. data/ext/autotest/Rakefile +0 -8
  255. data/ext/autotest/config +0 -43
  256. data/ext/autotest/readme.rst +0 -16
  257. data/spec/fixtures/unit/provider/package/pkgng/pkg.info +0 -7
  258. data/spec/fixtures/unit/provider/package/pkgng/pkg.query_absent +0 -1
  259. data/spec/watchr.rb +0 -137
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b54142084fb822aa85a40f5e383869469ec2b3d8be722ce8c32ce7837c81d4b6
4
- data.tar.gz: 9e9769a816524a8ec54392fcbca962bf08d37fe285f69b5fcbd43d765f33a666
3
+ metadata.gz: e7f1295c2cb2a6a5f36575454515722a7ab0068aa4cb94ea7ac473c5ac86f4d0
4
+ data.tar.gz: '089d87f06bb92a8305fb9cb02ea707c7dc356ff826fa8fc3d7f6d90f60889a99'
5
5
  SHA512:
6
- metadata.gz: 49f0b565d47831d73b95d6ccd6616febab630c49985ec7a8cca488e80f5830478952a50efbb5876e4b75506a985d2f56f2b658394e223b1218c941417823681c
7
- data.tar.gz: fd573546cde9cc6606c7808d1a437bfb9e341d46b2f95370a27ce3a0fa35e370f87369bf62f3368b2447c2c4ed61b27e296abf7d9954a683e441ee9c3dc8754b
6
+ metadata.gz: 9570381c1bc544401d8b583e1e38c9413eb860ea9e9bdb075750cb74ed964e6bfca3aa7f77ac8f685d822c6955833ca6967699af2ef023884b568dd5de8611d0
7
+ data.tar.gz: 5bcb0ca9e90ef5b35f51b2f7b7ddaeda408bf3482cfe1a003b9ab49402185a6917bbe4d4fd1b6c0c3ab09e8590b763402e96102dde5b8cbe59e6bcd51bd3bee5
data/Gemfile CHANGED
@@ -31,13 +31,13 @@ group(:features) do
31
31
  # gem 'ruby-augeas', require: false, platforms: [:ruby]
32
32
  # requires native ldap headers/libs
33
33
  # gem 'ruby-ldap', '~> 0.9', require: false, platforms: [:ruby]
34
- gem 'puppetserver-ca', '~> 0.5', require: false
34
+ gem 'puppetserver-ca', '~> 1.1', require: false
35
35
  end
36
36
 
37
37
  group(:test) do
38
38
  gem "json-schema", "~> 2.0", require: false
39
39
  gem "mocha", '~> 1.5.0', require: false
40
- gem "rake", '~> 12.2.1', require: false
40
+ gem "rake", *location_for(ENV['RAKE_LOCATION'] || '~> 12.2')
41
41
  gem "rspec", "~> 3.1", require: false
42
42
  gem "rspec-its", "~> 1.1", require: false
43
43
  gem "rspec-collection_matchers", "~> 1.1", require: false
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- puppet (6.0.0)
4
+ puppet (6.0.5)
5
5
  CFPropertyList (~> 2.2)
6
- facter (>= 2.0.1, < 4)
6
+ facter (>= 2.4.0, < 4)
7
7
  fast_gettext (~> 1.1.2)
8
8
  hiera (>= 3.2.1, < 4)
9
9
  httpclient (~> 2.8)
@@ -33,7 +33,7 @@ GEM
33
33
  gettext (>= 3.0.2)
34
34
  locale
35
35
  hashdiff (0.3.7)
36
- hiera (3.4.4)
36
+ hiera (3.4.5.13)
37
37
  hiera-eyaml (2.1.0)
38
38
  highline (~> 1.6.19)
39
39
  trollop (~> 2.0)
@@ -41,37 +41,37 @@ GEM
41
41
  hocon (1.2.5)
42
42
  hpricot (0.8.6)
43
43
  httpclient (2.8.3)
44
- json-schema (2.8.0)
44
+ json-schema (2.8.1)
45
45
  addressable (>= 2.4)
46
46
  locale (2.1.2)
47
- memory_profiler (0.9.11)
47
+ memory_profiler (0.9.12)
48
48
  metaclass (0.0.4)
49
- method_source (0.9.0)
50
- minitar (0.6.1)
49
+ method_source (0.9.2)
50
+ minitar (0.7)
51
51
  mocha (1.5.0)
52
52
  metaclass (~> 0.0.1)
53
53
  msgpack (1.2.4)
54
54
  multi_json (1.13.1)
55
- mustache (1.0.5)
56
- packaging (0.99.8)
57
- artifactory
58
- rake (~> 12.2.1)
55
+ mustache (1.1.0)
56
+ packaging (0.99.19)
57
+ artifactory (~> 2)
58
+ rake (~> 12.3)
59
59
  parallel (1.12.1)
60
- parser (2.5.1.2)
60
+ parser (2.5.3.0)
61
61
  ast (~> 2.4.0)
62
62
  powerpack (0.1.2)
63
- pry (0.11.3)
63
+ pry (0.12.2)
64
64
  coderay (~> 1.1.0)
65
65
  method_source (~> 0.9.0)
66
66
  public_suffix (3.0.3)
67
- puppet-resource_api (1.5.0)
67
+ puppet-resource_api (1.6.2)
68
68
  hocon (>= 1.0)
69
- puppetserver-ca (0.7.0)
69
+ puppetserver-ca (1.2.1)
70
70
  facter (>= 2.0.1, < 4)
71
71
  racc (1.4.9)
72
72
  rainbow (2.2.2)
73
73
  rake
74
- rake (12.2.1)
74
+ rake (12.3.2)
75
75
  rdiscount (2.2.0.1)
76
76
  rdoc (6.0.4)
77
77
  ronn (0.7.3)
@@ -86,7 +86,7 @@ GEM
86
86
  rspec-expectations (>= 2.99.0.beta1)
87
87
  rspec-core (3.8.0)
88
88
  rspec-support (~> 3.8.0)
89
- rspec-expectations (3.8.1)
89
+ rspec-expectations (3.8.2)
90
90
  diff-lcs (>= 1.2.0, < 2.0)
91
91
  rspec-support (~> 3.8.0)
92
92
  rspec-its (1.2.0)
@@ -136,9 +136,9 @@ DEPENDENCIES
136
136
  pry
137
137
  puppet!
138
138
  puppet-resource_api (~> 1.5)
139
- puppetserver-ca (~> 0.5)
139
+ puppetserver-ca (~> 1.1)
140
140
  racc (= 1.4.9)
141
- rake (~> 12.2.1)
141
+ rake (~> 12.2)
142
142
  rdoc (~> 6.0)
143
143
  ronn (~> 0.7.3)
144
144
  rspec (~> 3.1)
@@ -153,4 +153,4 @@ DEPENDENCIES
153
153
  yard
154
154
 
155
155
  BUNDLED WITH
156
- 1.16.2
156
+ 1.16.5
data/Guardfile.example ADDED
@@ -0,0 +1,76 @@
1
+ # More info at https://github.com/guard/guard#readme
2
+
3
+ # You'll need to make sure Guard, and any of its plugins are in your Gemfile.local
4
+ #
5
+ # Example:
6
+ # # Automatically run tests on file changes
7
+ # gem 'guard', require: false
8
+ # gem 'guard-rspec', require: false
9
+ # gem 'guard-bundler', require: false
10
+ # gem 'terminal-notifier-guard', require: false
11
+ #
12
+ # After running `bundle install`, you can run Guard via `bundle exec guard`
13
+ # from the top of the repository checkout.
14
+
15
+ notification(:terminal_notifier, app_name: "Puppet ::", group: `pwd`.chomp) if `uname` =~ /Darwin/
16
+
17
+ ## Uncomment and set this to only include directories you want to watch
18
+ # directories %w(app lib config test spec features) \
19
+ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
20
+
21
+ ## Note: if you are using the `directories` clause above and you are not
22
+ ## watching the project directory ('.'), then you will want to move
23
+ ## the Guardfile to a watched dir and symlink it back, e.g.
24
+ #
25
+ # $ mkdir config
26
+ # $ mv Guardfile config/
27
+ # $ ln -s config/Guardfile .
28
+ #
29
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
30
+
31
+ guard :bundler do
32
+ require 'guard/bundler'
33
+ require 'guard/bundler/verify'
34
+ helper = Guard::Bundler::Verify.new
35
+
36
+ files = ['Gemfile', 'Gemfile.local']
37
+ files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
38
+
39
+ # Assume files are symlinked from somewhere
40
+ files.each { |file| watch(helper.real_path(file)) }
41
+ end
42
+
43
+ def file2specs(match)
44
+ file = match[0]
45
+ puts "Lib file changed: #{file.inspect}"
46
+ %w{spec/unit spec/integration}.collect { |d|
47
+ file.sub('lib/puppet', d).sub(".rb", "_spec.rb")
48
+ }.find_all { |f|
49
+ File.exist?(f)
50
+ }
51
+ end
52
+
53
+ rspec_options = {
54
+ cmd: "bundle exec rspec",
55
+ run_all: {
56
+ cmd: "bundle exec parallel_rspec -o '--format progress ",
57
+ cmd_additional_args: "'"
58
+ },
59
+ all_after_pass: false
60
+ }
61
+ guard :rspec, rspec_options do
62
+ require "guard/rspec/dsl"
63
+ dsl = Guard::RSpec::Dsl.new(self)
64
+
65
+ # Feel free to open issues for suggestions and improvements
66
+
67
+ # RSpec files
68
+ rspec = dsl.rspec
69
+ watch(rspec.spec_helper) { rspec.spec_dir }
70
+ watch(rspec.spec_support) { rspec.spec_dir }
71
+ watch(rspec.spec_files)
72
+
73
+ # Ruby files
74
+ ruby = dsl.ruby
75
+ watch(ruby.lib_files) { |f| file2specs(f) }
76
+ end
data/LICENSE CHANGED
@@ -1,14 +1,199 @@
1
- Puppet - Automating Configuration Management.
2
1
 
3
- Copyright (C) 2005-2016 Puppet, Inc.
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
4
5
 
5
- Puppet, Inc. can be contacted at: info@puppet.com
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "{}"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright {yyyy} {name of copyright owner}
6
191
 
7
192
  Licensed under the Apache License, Version 2.0 (the "License");
8
193
  you may not use this file except in compliance with the License.
9
194
  You may obtain a copy of the License at
10
195
 
11
- https://www.apache.org/licenses/LICENSE-2.0
196
+ http://www.apache.org/licenses/LICENSE-2.0
12
197
 
13
198
  Unless required by applicable law or agreed to in writing, software
14
199
  distributed under the License is distributed on an "AS IS" BASIS,
data/README.md CHANGED
@@ -45,10 +45,10 @@ in.
45
45
  For more complete docs on developing with Puppet, take a look at the
46
46
  rest of the [developer documents](https://github.com/puppetlabs/puppet/blob/master/docs/index.md).
47
47
 
48
- License
49
- -------
48
+ Licensing
49
+ ---------
50
50
 
51
- See [LICENSE](https://github.com/puppetlabs/puppet/blob/master/LICENSE) file.
51
+ See [LICENSE](https://github.com/puppetlabs/puppet/blob/master/LICENSE) file. Puppet is licensed by Puppet, Inc. under the Apache license. Puppet, Inc. can be contacted at: info@puppet.com
52
52
 
53
53
  Support
54
54
  -------
data/Rakefile CHANGED
@@ -71,7 +71,7 @@ task(:commits) do
71
71
  %x{git log --no-merges --pretty=%s #{commit_range}}.each_line do |commit_summary|
72
72
  # This regex tests for the currently supported commit summary tokens: maint, doc, packaging, or pup-<number>.
73
73
  # The exception tries to explain it in more full.
74
- if /^\((maint|doc|docs|packaging|pup-\d+)\)|revert/i.match(commit_summary).nil?
74
+ if /^\((maint|doc|docs|packaging|l10n|pup-\d+)\)|revert/i.match(commit_summary).nil?
75
75
  raise "\n\n\n\tThis commit summary didn't match CONTRIBUTING.md guidelines:\n" \
76
76
  "\n\t\t#{commit_summary}\n" \
77
77
  "\tThe commit summary (i.e. the first line of the commit message) should start with one of:\n" \
@@ -80,6 +80,7 @@ task(:commits) do
80
80
  "\t\t(docs)(DOCUMENT-<digits>)\n" \
81
81
  "\t\t(maint)\n" \
82
82
  "\t\t(packaging)\n" \
83
+ "\t\t(L10n)\n" \
83
84
  "\n\tThis test for the commit summary is case-insensitive.\n\n\n"
84
85
  else
85
86
  puts "#{commit_summary}"
@@ -100,7 +101,9 @@ task(:warnings) do
100
101
  puts "Checking modified files #{commit_range}"
101
102
  %x{git diff --diff-filter=ACM --name-only #{commit_range}}.each_line do |modified_file|
102
103
  modified_file.chomp!
103
- next unless File.extname(modified_file) == '.rb'
104
+ # Skip racc generated file as it can have many warnings that cannot be manually fixed
105
+ next if modified_file.end_with?("pops/parser/eparser.rb")
106
+ next if modified_file.start_with?('spec/fixtures/', 'acceptance/fixtures/') || File.extname(modified_file) != '.rb'
104
107
  puts modified_file
105
108
 
106
109
  stdout, stderr, _ = Open3.capture3("ruby -wc \"#{modified_file}\"")
@@ -12,7 +12,13 @@ exec_prefix=/opt/csw
12
12
  sysconfdir=/opt/csw/etc
13
13
  sbindir=/opt/csw/sbin
14
14
 
15
- pidfile=/var/run/puppetlabs/agent.pid
15
+ if [ -z $SMF_SYSVOL_FS ]; then
16
+ piddir=/var/run/puppetlabs
17
+ else
18
+ piddir=$SMF_SYSVOL_FS/puppetlabs
19
+ fi;
20
+
21
+ pidfile=$piddir/agent.pid
16
22
 
17
23
  case "$1" in
18
24
  start)
@@ -20,6 +26,7 @@ start)
20
26
  # Start daemons.
21
27
 
22
28
  printf "Starting Puppet client services:"
29
+ mkdir -p $piddir
23
30
 
24
31
  /opt/csw/sbin/puppetd
25
32
 
@@ -8,7 +8,13 @@ exec_prefix=/opt/csw
8
8
  sysconfdir=/opt/csw/etc
9
9
  sbindir=/opt/csw/sbin
10
10
 
11
- pidfile=/var/run/puppetlabs/master.pid
11
+ if [ -z $SMF_SYSVOL_FS ]; then
12
+ piddir=/var/run/puppetlabs
13
+ else
14
+ piddir=$SMF_SYSVOL_FS/puppetlabs
15
+ fi;
16
+
17
+ pidfile=$piddir/master.pid
12
18
 
13
19
  case "$1" in
14
20
  start)
@@ -16,6 +22,7 @@ start)
16
22
  # Start daemons.
17
23
 
18
24
  printf "Starting Puppet server services:"
25
+ mkdir -p $piddir
19
26
 
20
27
  /opt/csw/sbin/puppetmasterd
21
28