puppet 0.24.8 → 0.24.9

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 (435) hide show
  1. data/CHANGELOG +3 -0
  2. data/Rakefile +3 -0
  3. data/bin/filebucket +0 -0
  4. data/bin/puppet +0 -0
  5. data/bin/puppetca +0 -0
  6. data/bin/puppetd +0 -0
  7. data/bin/puppetdoc +0 -0
  8. data/bin/puppetmasterd +0 -0
  9. data/bin/puppetrun +0 -0
  10. data/bin/ralsh +0 -0
  11. data/conf/gentoo/init.d/puppetmaster +0 -0
  12. data/conf/osx/createpackage.sh +0 -0
  13. data/conf/osx/preflight +0 -0
  14. data/conf/solaris/smf/svc-puppetd +0 -0
  15. data/conf/solaris/smf/svc-puppetmasterd +0 -0
  16. data/examples/etc/init.d/sleeper +0 -0
  17. data/examples/mac_dscl.pp +0 -0
  18. data/examples/mac_dscl_revert.pp +0 -0
  19. data/examples/mac_netinfo.pp +0 -0
  20. data/examples/mac_pkgdmg.pp +0 -0
  21. data/ext/bin/sleeper +0 -0
  22. data/ext/module_puppet +0 -0
  23. data/ext/nagios/check_puppet.rb +0 -0
  24. data/ext/puppet-test +21 -13
  25. data/ext/puppetlast +0 -0
  26. data/install.rb +0 -0
  27. data/lib/puppet.rb +1 -1
  28. data/lib/puppet/daemon.rb +1 -1
  29. data/lib/puppet/external/base64.rb +0 -0
  30. data/lib/puppet/external/nagios.rb +0 -0
  31. data/lib/puppet/external/nagios/base.rb +0 -0
  32. data/lib/puppet/network/authstore.rb +0 -0
  33. data/lib/puppet/network/handler/filebucket.rb +0 -0
  34. data/lib/puppet/network/handler/fileserver.rb +0 -0
  35. data/lib/puppet/network/handler/report.rb +0 -0
  36. data/lib/puppet/network/handler/resource.rb +0 -0
  37. data/lib/puppet/network/handler/runner.rb +0 -0
  38. data/lib/puppet/network/rights.rb +0 -0
  39. data/lib/puppet/node/facts.rb +0 -0
  40. data/lib/puppet/parser/functions.rb +1 -1
  41. data/lib/puppet/parser/functions/regsubst.rb +23 -47
  42. data/lib/puppet/parser/functions/sprintf.rb +2 -7
  43. data/lib/puppet/provider/augeas/augeas.rb +106 -55
  44. data/lib/puppet/provider/cron/crontab.rb +0 -0
  45. data/lib/puppet/provider/mailalias/aliases.rb +0 -0
  46. data/lib/puppet/provider/maillist/mailman.rb +0 -0
  47. data/lib/puppet/provider/mount/parsed.rb +0 -0
  48. data/lib/puppet/provider/package/apple.rb +0 -0
  49. data/lib/puppet/provider/package/apt.rb +0 -0
  50. data/lib/puppet/provider/package/aptitude.rb +0 -0
  51. data/lib/puppet/provider/package/blastwave.rb +0 -0
  52. data/lib/puppet/provider/package/darwinport.rb +0 -0
  53. data/lib/puppet/provider/package/dpkg.rb +0 -0
  54. data/lib/puppet/provider/package/fink.rb +0 -0
  55. data/lib/puppet/provider/package/freebsd.rb +0 -0
  56. data/lib/puppet/provider/package/gem.rb +0 -0
  57. data/lib/puppet/provider/package/openbsd.rb +0 -0
  58. data/lib/puppet/provider/package/ports.rb +0 -0
  59. data/lib/puppet/provider/package/rpm.rb +0 -0
  60. data/lib/puppet/provider/package/sun.rb +0 -0
  61. data/lib/puppet/provider/package/sunfreeware.rb +0 -0
  62. data/lib/puppet/provider/package/yum.rb +0 -0
  63. data/lib/puppet/provider/parsedfile.rb +0 -0
  64. data/lib/puppet/provider/port/parsed.rb +0 -0
  65. data/lib/puppet/provider/service/base.rb +0 -0
  66. data/lib/puppet/provider/service/debian.rb +0 -0
  67. data/lib/puppet/provider/service/init.rb +0 -0
  68. data/lib/puppet/provider/service/redhat.rb +0 -0
  69. data/lib/puppet/provider/service/smf.rb +0 -0
  70. data/lib/puppet/provider/sshkey/parsed.rb +0 -0
  71. data/lib/puppet/reports.rb +0 -0
  72. data/lib/puppet/sslcertificates.rb +0 -0
  73. data/lib/puppet/type/augeas.rb +5 -6
  74. data/lib/puppet/type/cron.rb +0 -0
  75. data/lib/puppet/type/exec.rb +0 -0
  76. data/lib/puppet/type/file/checksum.rb +0 -0
  77. data/lib/puppet/type/file/content.rb +0 -0
  78. data/lib/puppet/type/file/ensure.rb +0 -0
  79. data/lib/puppet/type/file/group.rb +0 -0
  80. data/lib/puppet/type/file/mode.rb +0 -0
  81. data/lib/puppet/type/file/owner.rb +0 -0
  82. data/lib/puppet/type/file/source.rb +0 -0
  83. data/lib/puppet/type/file/type.rb +0 -0
  84. data/lib/puppet/type/filebucket.rb +0 -0
  85. data/lib/puppet/type/group.rb +0 -0
  86. data/lib/puppet/type/host.rb +0 -0
  87. data/lib/puppet/type/mailalias.rb +0 -0
  88. data/lib/puppet/type/maillist.rb +0 -0
  89. data/lib/puppet/type/mount.rb +0 -0
  90. data/lib/puppet/type/port.rb +0 -0
  91. data/lib/puppet/type/schedule.rb +0 -0
  92. data/lib/puppet/type/sshkey.rb +0 -0
  93. data/lib/puppet/type/tidy.rb +0 -0
  94. data/lib/puppet/type/user.rb +0 -0
  95. data/lib/puppet/type/zfs.rb +0 -0
  96. data/lib/puppet/type/zpool.rb +0 -0
  97. data/lib/puppet/util.rb +22 -0
  98. data/lib/puppet/util/filetype.rb +0 -0
  99. data/lib/puppet/util/instance_loader.rb +0 -0
  100. data/lib/puppet/util/loadedfile.rb +0 -0
  101. data/lib/puppet/util/posix.rb +0 -0
  102. data/lib/puppet/util/reference.rb +3 -2
  103. data/spec/integration/checksum.rb +0 -0
  104. data/spec/integration/defaults.rb +0 -0
  105. data/spec/integration/file_serving/configuration.rb +0 -0
  106. data/spec/integration/file_serving/content.rb +0 -0
  107. data/spec/integration/file_serving/metadata.rb +0 -0
  108. data/spec/integration/indirector/direct_file_server.rb +0 -0
  109. data/spec/integration/indirector/file_content/file_server.rb +0 -0
  110. data/spec/integration/indirector/file_metadata/file_server.rb +0 -0
  111. data/spec/integration/indirector/module_files.rb +0 -0
  112. data/spec/integration/indirector/node/ldap.rb +0 -0
  113. data/spec/integration/indirector/rest.rb +0 -0
  114. data/spec/integration/network/server/mongrel.rb +0 -0
  115. data/spec/integration/network/server/webrick.rb +0 -0
  116. data/spec/integration/node.rb +0 -0
  117. data/spec/integration/node/catalog.rb +0 -0
  118. data/spec/integration/node/facts.rb +0 -0
  119. data/spec/integration/provider/package.rb +0 -0
  120. data/spec/integration/provider/service/init.rb +0 -0
  121. data/spec/integration/reference/providers.rb +0 -0
  122. data/spec/integration/reports.rb +0 -0
  123. data/spec/integration/transaction/report.rb +0 -0
  124. data/spec/integration/type/package.rb +0 -0
  125. data/spec/integration/util/file_locking.rb +0 -0
  126. data/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb +1 -1
  127. data/spec/spec_helper.rb +1 -0
  128. data/spec/unit/executables/client/certhandler.rb +0 -0
  129. data/spec/unit/file_collection.rb +0 -0
  130. data/spec/unit/file_collection/lookup.rb +0 -0
  131. data/spec/unit/file_serving/configuration.rb +0 -0
  132. data/spec/unit/file_serving/configuration/parser.rb +0 -0
  133. data/spec/unit/file_serving/content.rb +0 -0
  134. data/spec/unit/file_serving/file_base.rb +0 -0
  135. data/spec/unit/file_serving/fileset.rb +0 -0
  136. data/spec/unit/file_serving/indirection_hooks.rb +0 -0
  137. data/spec/unit/file_serving/metadata.rb +0 -0
  138. data/spec/unit/file_serving/mount.rb +0 -0
  139. data/spec/unit/file_serving/terminus_helper.rb +0 -0
  140. data/spec/unit/indirector.rb +0 -0
  141. data/spec/unit/indirector/catalog/compiler.rb +0 -0
  142. data/spec/unit/indirector/catalog/yaml.rb +0 -0
  143. data/spec/unit/indirector/checksum/file.rb +0 -0
  144. data/spec/unit/indirector/code.rb +0 -0
  145. data/spec/unit/indirector/direct_file_server.rb +0 -0
  146. data/spec/unit/indirector/envelope.rb +0 -0
  147. data/spec/unit/indirector/exec.rb +0 -0
  148. data/spec/unit/indirector/facts/facter.rb +0 -0
  149. data/spec/unit/indirector/facts/yaml.rb +0 -0
  150. data/spec/unit/indirector/file.rb +0 -0
  151. data/spec/unit/indirector/file_content/file.rb +0 -0
  152. data/spec/unit/indirector/file_content/file_server.rb +0 -0
  153. data/spec/unit/indirector/file_content/modules.rb +0 -0
  154. data/spec/unit/indirector/file_content/rest.rb +0 -0
  155. data/spec/unit/indirector/file_metadata/file.rb +0 -0
  156. data/spec/unit/indirector/file_metadata/file_server.rb +0 -0
  157. data/spec/unit/indirector/file_metadata/modules.rb +0 -0
  158. data/spec/unit/indirector/file_metadata/rest.rb +0 -0
  159. data/spec/unit/indirector/file_server.rb +0 -0
  160. data/spec/unit/indirector/indirection.rb +0 -0
  161. data/spec/unit/indirector/ldap.rb +0 -0
  162. data/spec/unit/indirector/memory.rb +0 -0
  163. data/spec/unit/indirector/module_files.rb +0 -0
  164. data/spec/unit/indirector/node/exec.rb +0 -0
  165. data/spec/unit/indirector/node/ldap.rb +0 -0
  166. data/spec/unit/indirector/node/memory.rb +0 -0
  167. data/spec/unit/indirector/node/plain.rb +0 -0
  168. data/spec/unit/indirector/node/rest.rb +0 -0
  169. data/spec/unit/indirector/node/yaml.rb +0 -0
  170. data/spec/unit/indirector/plain.rb +0 -0
  171. data/spec/unit/indirector/report/processor.rb +0 -0
  172. data/spec/unit/indirector/request.rb +0 -0
  173. data/spec/unit/indirector/rest.rb +0 -0
  174. data/spec/unit/indirector/ssl_rsa/file.rb +0 -0
  175. data/spec/unit/indirector/terminus.rb +0 -0
  176. data/spec/unit/indirector/yaml.rb +0 -0
  177. data/spec/unit/module.rb +0 -0
  178. data/spec/unit/network/client.rb +0 -0
  179. data/spec/unit/network/client/master.rb +0 -0
  180. data/spec/unit/network/http.rb +0 -0
  181. data/spec/unit/network/http/mongrel.rb +0 -0
  182. data/spec/unit/network/http/mongrel/rest.rb +0 -0
  183. data/spec/unit/network/http/mongrel/xmlrpc.rb +0 -0
  184. data/spec/unit/network/http/webrick.rb +0 -0
  185. data/spec/unit/network/http/webrick/rest.rb +0 -0
  186. data/spec/unit/network/http/webrick/xmlrpc.rb +0 -0
  187. data/spec/unit/network/http_pool.rb +0 -0
  188. data/spec/unit/network/server.rb +0 -0
  189. data/spec/unit/network/xmlrpc/client.rb +0 -0
  190. data/spec/unit/node.rb +0 -0
  191. data/spec/unit/node/catalog.rb +0 -0
  192. data/spec/unit/node/environment.rb +0 -0
  193. data/spec/unit/node/facts.rb +0 -0
  194. data/spec/unit/other/checksum.rb +0 -0
  195. data/spec/unit/other/pgraph.rb +0 -0
  196. data/spec/unit/other/transbucket.rb +0 -0
  197. data/spec/unit/other/transobject.rb +0 -0
  198. data/spec/unit/parameter.rb +0 -0
  199. data/spec/unit/parser/ast/arithmetic_operator.rb +0 -0
  200. data/spec/unit/parser/ast/astarray.rb +0 -0
  201. data/spec/unit/parser/ast/boolean_operator.rb +0 -0
  202. data/spec/unit/parser/ast/collexpr.rb +0 -0
  203. data/spec/unit/parser/ast/comparison_operator.rb +0 -0
  204. data/spec/unit/parser/ast/definition.rb +0 -0
  205. data/spec/unit/parser/ast/hostclass.rb +0 -0
  206. data/spec/unit/parser/ast/minus.rb +0 -0
  207. data/spec/unit/parser/ast/node.rb +0 -0
  208. data/spec/unit/parser/ast/nop.rb +0 -0
  209. data/spec/unit/parser/ast/not.rb +0 -0
  210. data/spec/unit/parser/ast/resource.rb +0 -0
  211. data/spec/unit/parser/ast/resource_override.rb +0 -0
  212. data/spec/unit/parser/ast/resource_reference.rb +0 -0
  213. data/spec/unit/parser/ast/vardef.rb +0 -0
  214. data/spec/unit/parser/collector.rb +0 -0
  215. data/spec/unit/parser/compiler.rb +0 -0
  216. data/spec/unit/parser/functions/realize.rb +0 -0
  217. data/spec/unit/parser/functions/versioncmp.rb +0 -0
  218. data/spec/unit/parser/interpreter.rb +0 -0
  219. data/spec/unit/parser/lexer.rb +0 -0
  220. data/spec/unit/parser/parser.rb +0 -0
  221. data/spec/unit/parser/resource.rb +0 -0
  222. data/spec/unit/parser/resource/reference.rb +0 -0
  223. data/spec/unit/parser/scope.rb +0 -0
  224. data/spec/unit/parser/templatewrapper.rb +0 -0
  225. data/spec/unit/property.rb +0 -0
  226. data/spec/unit/provider/augeas/augeas.rb +105 -109
  227. data/spec/unit/provider/confine.rb +0 -0
  228. data/spec/unit/provider/confine/exists.rb +0 -0
  229. data/spec/unit/provider/confine/false.rb +0 -0
  230. data/spec/unit/provider/confine/feature.rb +0 -0
  231. data/spec/unit/provider/confine/true.rb +0 -0
  232. data/spec/unit/provider/confine/variable.rb +0 -0
  233. data/spec/unit/provider/confine_collection.rb +0 -0
  234. data/spec/unit/provider/confiner.rb +0 -0
  235. data/spec/unit/provider/group/groupadd.rb +0 -0
  236. data/spec/unit/provider/group/ldap.rb +0 -0
  237. data/spec/unit/provider/ldap.rb +0 -0
  238. data/spec/unit/provider/macauthorization.rb +0 -0
  239. data/spec/unit/provider/mcx/mcxcontent.rb +0 -0
  240. data/spec/unit/provider/mount.rb +0 -0
  241. data/spec/unit/provider/mount/parsed.rb +0 -0
  242. data/spec/unit/provider/package/apt.rb +0 -0
  243. data/spec/unit/provider/package/dpkg.rb +0 -0
  244. data/spec/unit/provider/parsedfile.rb +0 -0
  245. data/spec/unit/provider/selboolean.rb +0 -0
  246. data/spec/unit/provider/selmodule.rb +0 -0
  247. data/spec/unit/provider/service/launchd.rb +0 -0
  248. data/spec/unit/provider/ssh_authorized_key/parsed.rb +0 -0
  249. data/spec/unit/provider/user/hpux.rb +0 -0
  250. data/spec/unit/provider/user/ldap.rb +0 -0
  251. data/spec/unit/provider/user/useradd.rb +0 -0
  252. data/spec/unit/provider/zfs/solaris.rb +0 -0
  253. data/spec/unit/provider/zone/solaris.rb +0 -0
  254. data/spec/unit/provider/zpool/solaris.rb +0 -0
  255. data/spec/unit/rails.rb +0 -0
  256. data/spec/unit/relationship.rb +0 -0
  257. data/spec/unit/reports.rb +0 -0
  258. data/spec/unit/resource_reference.rb +0 -0
  259. data/spec/unit/simple_graph.rb +0 -0
  260. data/spec/unit/transaction.rb +0 -0
  261. data/spec/unit/transaction/change.rb +0 -0
  262. data/spec/unit/transaction/event.rb +0 -0
  263. data/spec/unit/transaction/report.rb +0 -0
  264. data/spec/unit/type.rb +0 -0
  265. data/spec/unit/type/computer.rb +0 -0
  266. data/spec/unit/type/exec.rb +0 -0
  267. data/spec/unit/type/file.rb +0 -0
  268. data/spec/unit/type/file/content.rb +0 -0
  269. data/spec/unit/type/file/ensure.rb +0 -0
  270. data/spec/unit/type/file/group.rb +0 -0
  271. data/spec/unit/type/file/owner.rb +0 -0
  272. data/spec/unit/type/group.rb +0 -0
  273. data/spec/unit/type/macauthorization.rb +0 -0
  274. data/spec/unit/type/mcx.rb +0 -0
  275. data/spec/unit/type/mount.rb +0 -0
  276. data/spec/unit/type/nagios.rb +0 -0
  277. data/spec/unit/type/noop_metaparam.rb +0 -0
  278. data/spec/unit/type/package.rb +0 -0
  279. data/spec/unit/type/schedule.rb +0 -0
  280. data/spec/unit/type/selboolean.rb +0 -0
  281. data/spec/unit/type/selmodule.rb +0 -0
  282. data/spec/unit/type/service.rb +0 -0
  283. data/spec/unit/type/ssh_authorized_key.rb +0 -0
  284. data/spec/unit/type/tidy.rb +0 -0
  285. data/spec/unit/type/user.rb +0 -0
  286. data/spec/unit/type/zfs.rb +0 -0
  287. data/spec/unit/type/zone.rb +0 -0
  288. data/spec/unit/type/zpool.rb +0 -0
  289. data/spec/unit/util/autoload.rb +0 -0
  290. data/spec/unit/util/checksums.rb +0 -0
  291. data/spec/unit/util/constant_inflector.rb +0 -0
  292. data/spec/unit/util/file_locking.rb +0 -0
  293. data/spec/unit/util/ldap/connection.rb +0 -0
  294. data/spec/unit/util/ldap/generator.rb +0 -0
  295. data/spec/unit/util/ldap/manager.rb +0 -0
  296. data/spec/unit/util/loadedfile.rb +0 -0
  297. data/spec/unit/util/log.rb +0 -0
  298. data/spec/unit/util/metric.rb +0 -0
  299. data/spec/unit/util/nagios_maker.rb +0 -0
  300. data/spec/unit/util/posix.rb +0 -0
  301. data/spec/unit/util/resource_template.rb +0 -0
  302. data/spec/unit/util/settings.rb +0 -0
  303. data/spec/unit/util/storage.rb +0 -0
  304. data/spec/unit/util/tagging.rb +0 -0
  305. data/spec/unit/util/uri_helper.rb +0 -0
  306. data/spec/unit/util/warnings.rb +0 -0
  307. data/test/certmgr/ca.rb +0 -0
  308. data/test/certmgr/certmgr.rb +0 -0
  309. data/test/certmgr/inventory.rb +0 -0
  310. data/test/certmgr/support.rb +0 -0
  311. data/test/data/snippets/subclass_name_duplication.pp +0 -0
  312. data/test/executables/filebucket.rb +0 -0
  313. data/test/executables/puppetbin.rb +0 -0
  314. data/test/executables/puppetca.rb +0 -0
  315. data/test/executables/puppetd.rb +0 -0
  316. data/test/executables/puppetmasterd.rb +0 -0
  317. data/test/executables/puppetmodule.rb +0 -0
  318. data/test/language/ast.rb +0 -0
  319. data/test/language/ast/casestatement.rb +0 -0
  320. data/test/language/ast/resource.rb +0 -0
  321. data/test/language/ast/resource_reference.rb +0 -0
  322. data/test/language/ast/selector.rb +0 -0
  323. data/test/language/ast/variable.rb +0 -0
  324. data/test/language/functions.rb +0 -0
  325. data/test/language/parser.rb +0 -0
  326. data/test/language/resource.rb +0 -0
  327. data/test/language/scope.rb +0 -0
  328. data/test/language/snippets.rb +0 -0
  329. data/test/language/transportable.rb +0 -0
  330. data/test/lib/puppettest.rb +0 -0
  331. data/test/lib/puppettest/support/resources.rb +0 -0
  332. data/test/network/authconfig.rb +0 -0
  333. data/test/network/authorization.rb +0 -0
  334. data/test/network/authstore.rb +0 -0
  335. data/test/network/client/ca.rb +0 -0
  336. data/test/network/client/client.rb +0 -0
  337. data/test/network/client/dipper.rb +0 -0
  338. data/test/network/client/master.rb +0 -0
  339. data/test/network/client/resource.rb +0 -0
  340. data/test/network/client_request.rb +0 -0
  341. data/test/network/daemon.rb +0 -0
  342. data/test/network/handler/bucket.rb +0 -0
  343. data/test/network/handler/ca.rb +0 -0
  344. data/test/network/handler/fileserver.rb +0 -0
  345. data/test/network/handler/handler.rb +0 -0
  346. data/test/network/handler/master.rb +0 -0
  347. data/test/network/handler/report.rb +0 -0
  348. data/test/network/handler/resource.rb +0 -0
  349. data/test/network/handler/runner.rb +0 -0
  350. data/test/network/rights.rb +0 -0
  351. data/test/network/server/mongrel_test.rb +0 -0
  352. data/test/network/server/webrick.rb +0 -0
  353. data/test/network/xmlrpc/client.rb +0 -0
  354. data/test/network/xmlrpc/processor.rb +0 -0
  355. data/test/network/xmlrpc/server.rb +0 -0
  356. data/test/network/xmlrpc/webrick_servlet.rb +0 -0
  357. data/test/other/dsl.rb +0 -0
  358. data/test/other/events.rb +0 -0
  359. data/test/other/overrides.rb +0 -0
  360. data/test/other/provider.rb +0 -0
  361. data/test/other/puppet.rb +0 -0
  362. data/test/other/relationships.rb +0 -0
  363. data/test/other/report.rb +0 -0
  364. data/test/other/transactions.rb +0 -0
  365. data/test/puppet/conffiles.rb +0 -0
  366. data/test/puppet/defaults.rb +0 -0
  367. data/test/puppet/errortest.rb +0 -0
  368. data/test/puppet/tc_suidmanager.rb +0 -0
  369. data/test/rails/ast.rb +0 -0
  370. data/test/rails/configuration.rb +0 -0
  371. data/test/rails/host.rb +0 -0
  372. data/test/rails/rails.rb +0 -0
  373. data/test/rails/railsparameter.rb +0 -0
  374. data/test/rails/railsresource.rb +0 -0
  375. data/test/ral/manager/attributes.rb +0 -0
  376. data/test/ral/manager/instances.rb +0 -0
  377. data/test/ral/manager/manager.rb +0 -0
  378. data/test/ral/manager/provider.rb +0 -0
  379. data/test/ral/manager/type.rb +0 -0
  380. data/test/ral/providers/cron/crontab.rb +0 -0
  381. data/test/ral/providers/group.rb +0 -0
  382. data/test/ral/providers/host/netinfo.rb +0 -0
  383. data/test/ral/providers/host/parsed.rb +0 -0
  384. data/test/ral/providers/mailalias/aliases.rb +0 -0
  385. data/test/ral/providers/mount/netinfo.rb +0 -0
  386. data/test/ral/providers/nameservice.rb +0 -0
  387. data/test/ral/providers/package.rb +0 -0
  388. data/test/ral/providers/package/aptitude.rb +0 -0
  389. data/test/ral/providers/package/aptrpm.rb +0 -0
  390. data/test/ral/providers/parsedfile.rb +0 -0
  391. data/test/ral/providers/port/parsed.rb +0 -0
  392. data/test/ral/providers/provider.rb +0 -0
  393. data/test/ral/providers/service/base.rb +0 -0
  394. data/test/ral/providers/service/debian.rb +0 -0
  395. data/test/ral/providers/sshkey/parsed.rb +0 -0
  396. data/test/ral/providers/user.rb +0 -0
  397. data/test/ral/providers/user/useradd.rb +0 -0
  398. data/test/ral/type/basic.rb +0 -0
  399. data/test/ral/type/cron.rb +0 -0
  400. data/test/ral/type/exec.rb +0 -0
  401. data/test/ral/type/file.rb +0 -0
  402. data/test/ral/type/file/target.rb +0 -0
  403. data/test/ral/type/filebucket.rb +0 -0
  404. data/test/ral/type/fileignoresource.rb +0 -0
  405. data/test/ral/type/filesources.rb +0 -0
  406. data/test/ral/type/group.rb +0 -0
  407. data/test/ral/type/host.rb +0 -0
  408. data/test/ral/type/mailalias.rb +0 -0
  409. data/test/ral/type/parameter.rb +0 -0
  410. data/test/ral/type/port.rb +0 -0
  411. data/test/ral/type/property.rb +0 -0
  412. data/test/ral/type/resources.rb +0 -0
  413. data/test/ral/type/service.rb +0 -0
  414. data/test/ral/type/sshkey.rb +0 -0
  415. data/test/ral/type/tidy.rb +0 -0
  416. data/test/ral/type/user.rb +0 -0
  417. data/test/ral/type/yumrepo.rb +0 -0
  418. data/test/ral/type/zone.rb +0 -0
  419. data/test/test +0 -0
  420. data/test/util/autoload.rb +0 -0
  421. data/test/util/classgen.rb +0 -0
  422. data/test/util/execution.rb +0 -0
  423. data/test/util/features.rb +0 -0
  424. data/test/util/fileparsing.rb +0 -0
  425. data/test/util/inifile.rb +0 -0
  426. data/test/util/instance_loader.rb +0 -0
  427. data/test/util/log.rb +0 -0
  428. data/test/util/metrics.rb +0 -0
  429. data/test/util/package.rb +0 -0
  430. data/test/util/pidlock.rb +0 -0
  431. data/test/util/settings.rb +0 -0
  432. data/test/util/storage.rb +0 -0
  433. data/test/util/subclass_loader.rb +0 -0
  434. data/test/util/utiltest.rb +0 -0
  435. metadata +877 -1009
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 0.24.9
2
+ Fix for temporary file issues (https://bugzilla.redhat.com/show_bug.cgi?id=502881)
3
+
1
4
  0.24.8
2
5
  Fixed #2077 - ralsh user broken on OSX
3
6
 
data/Rakefile CHANGED
@@ -163,6 +163,9 @@ namespace :ci do
163
163
  ENV['CI_REPORTS'] = 'results'
164
164
  end
165
165
 
166
+ desc "Run all CI tests"
167
+ task :all => [:unit, :spec]
168
+
166
169
  desc "Run CI Unit tests"
167
170
  task :unit => [:prep, 'ci:setup:testunit'] do
168
171
  sh "cd test; rake test; exit 0"
File without changes
data/bin/puppet CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/bin/ralsh CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -53,6 +53,11 @@
53
53
  # list::
54
54
  # List all available tests.
55
55
  #
56
+ # node::
57
+ # Specify the node to use. This is useful for looking up cached yaml data
58
+ # in your :clientyaml directory, and forcing a specific host's configuration to
59
+ # get compiled.
60
+ #
56
61
  # pause::
57
62
  # Pause before starting test (useful for testing with dtrace).
58
63
  #
@@ -216,7 +221,7 @@ end
216
221
 
217
222
  Suite.new :local_catalog, "Local catalog handling" do
218
223
  def prepare
219
- @node = Puppet::Node.find(Puppet[:certname])
224
+ @node = Puppet::Node.find($options[:nodes][0])
220
225
  end
221
226
 
222
227
  newtest :compile, "Compiled catalog" do
@@ -233,15 +238,10 @@ Suite.new :remote_catalog, "Remote catalog handling" do
233
238
  fail "Could not read client certificate"
234
239
  end
235
240
 
236
- # Use the facts from the cache, to skip the time it takes
237
- # to load them.
238
- @client.dostorage
239
- @facts = Puppet::Util::Storage.cache(:configuration)[:facts] || {}
240
-
241
- if @facts.empty?
242
- if tmp = Puppet::Node::Facts.find("me")
243
- @facts = tmp.values
244
- end
241
+ if tmp = Puppet::Node::Facts.find($options[:nodes][0])
242
+ @facts = tmp.values
243
+ else
244
+ raise "Could not find facts for %s" % $optins[:nodes][0]
245
245
  end
246
246
 
247
247
  if host = $options[:fqdn]
@@ -374,6 +374,7 @@ $cmdargs = [
374
374
  [ "--test", "-t", GetoptLong::REQUIRED_ARGUMENT ],
375
375
  [ "--pause", "-p", GetoptLong::NO_ARGUMENT ],
376
376
  [ "--repeat", "-r", GetoptLong::REQUIRED_ARGUMENT ],
377
+ [ "--node", "-n", GetoptLong::REQUIRED_ARGUMENT ],
377
378
  [ "--debug", "-d", GetoptLong::NO_ARGUMENT ],
378
379
  [ "--help", "-h", GetoptLong::NO_ARGUMENT ],
379
380
  [ "--list", "-l", GetoptLong::NO_ARGUMENT ],
@@ -385,11 +386,16 @@ $cmdargs = [
385
386
  Puppet.settings.addargs($cmdargs)
386
387
  Puppet::Util::Log.newdestination(:console)
387
388
 
389
+ Puppet::Node.terminus_class = :plain
390
+ Puppet::Node.cache_class = :yaml
391
+ Puppet::Node::Facts.terminus_class = :facter
392
+ Puppet::Node::Facts.cache_class = :yaml
393
+
388
394
  result = GetoptLong.new(*$cmdargs)
389
395
 
390
396
  $args = {}
391
397
 
392
- $options = {:repeat => 1, :fork => 0, :pause => false}
398
+ $options = {:repeat => 1, :fork => 0, :pause => false, :nodes => []}
393
399
 
394
400
  begin
395
401
  explicit_waitforcert = false
@@ -443,6 +449,8 @@ begin
443
449
  $options[:file] = arg
444
450
  when "--pause"
445
451
  $options[:pause] = true
452
+ when "--node"
453
+ $options[:nodes] << arg
446
454
  when "--list"
447
455
  Suite.suites.sort { |a,b| a.to_s <=> b.to_s }.each do |suite_name|
448
456
  suite = Suite[suite_name]
@@ -463,6 +471,8 @@ end
463
471
  # Now parse the config
464
472
  Puppet.parse_config
465
473
 
474
+ $options[:nodes] << Puppet.settings[:certname] if $options[:nodes].empty?
475
+
466
476
  $args[:Server] = Puppet[:server]
467
477
 
468
478
  unless $options[:test]
@@ -481,5 +491,3 @@ Suite.run($options[:test])
481
491
  if $options[:fork] > 0
482
492
  Process.waitall
483
493
  end
484
-
485
- # $Id$
File without changes
data/install.rb CHANGED
File without changes
@@ -25,7 +25,7 @@ require 'puppet/util/suidmanager'
25
25
  # it's also a place to find top-level commands like 'debug'
26
26
 
27
27
  module Puppet
28
- PUPPETVERSION = '0.24.8'
28
+ PUPPETVERSION = '0.24.9'
29
29
 
30
30
  def Puppet.version
31
31
  return PUPPETVERSION
@@ -30,7 +30,7 @@ module Puppet::Daemon
30
30
  $stderr.reopen $stdout
31
31
  Puppet::Util::Log.reopen
32
32
  rescue => detail
33
- File.open("/tmp/daemonout", "w") { |f|
33
+ Puppet::Util.secure_open("/tmp/daemonout", "w") { |f|
34
34
  f.puts "Could not start %s: %s" % [Puppet[:name], detail]
35
35
  }
36
36
  Puppet.err "Could not start %s: %s" % [Puppet[:name], detail]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -92,7 +92,7 @@ module Functions
92
92
  #ret += "%s\n%s\n" % [name, hash[:type]]
93
93
  ret += "%s\n%s\n" % [name, "-" * name.to_s.length]
94
94
  if hash[:doc]
95
- ret += hash[:doc].gsub(/\n\s*/, ' ')
95
+ ret += Puppet::Util::Docs.scrub(hash[:doc])
96
96
  else
97
97
  ret += "Undocumented.\n"
98
98
  end
@@ -1,63 +1,39 @@
1
1
  module Puppet::Parser::Functions
2
2
  newfunction(:regsubst, :type => :rvalue,
3
- :doc => "\
4
- Perform regexp replacement on a string.
3
+ :doc => "
4
+ Perform regexp replacement on a string. Parameters (in order):
5
5
 
6
- Parameters (in order):
6
+ :str: The string to operate on.
7
7
 
8
- :str:
9
- The string to operate on.
8
+ :regexp: The regular expression matching the string. If you want it anchored at the start and or end of the string, you must do that with ^ and $ yourself.
10
9
 
11
- :regexp:
12
- The regular expression matching the string. If you want it
13
- anchored at the start and/or end of the string, you must do
14
- that with ^ and $ yourself.
10
+ :replacement: Replacement string. Can contain back references to what was matched using 0, 1, and so on.
15
11
 
16
- :replacement:
17
- Replacement string. Can contain back references to what was
18
- matched using \\0, \\1, and so on.
12
+ :flags: Optional. String of single letter flags for how the regexp is interpreted:
19
13
 
20
- :flags:
21
- Optional. String of single letter flags for how the regexp
22
- is interpreted:
14
+ - **E** Extended regexps
15
+ - **I** Ignore case in regexps
16
+ - **M** Multiline regexps
17
+ - **G** Global replacement; all occurrences of the regexp in the string will be replaced. Without this, only the first occurrence will be replaced.
23
18
 
24
- - **E**
25
- Extended regexps
26
- - **I**
27
- Ignore case in regexps
28
- - **M**
29
- Multiline regexps
30
- - **G**
31
- Global replacement; all occurances of the regexp in
32
- the string will be replaced. Without this, only the
33
- first occurance will be replaced.
19
+ :lang: Optional. How to handle multibyte characters. A single-character string with the following values:
20
+
21
+ - **N** None
22
+ - **E** EUC
23
+ - **S** SJIS
24
+ - **U** UTF-8
34
25
 
35
- :lang:
36
- Optional. How to handle multibyte characters. A
37
- single-character string with the following values:
26
+ **Examples**
38
27
 
39
- - **N**
40
- None
41
- - **E**
42
- EUC
43
- - **S**
44
- SJIS
45
- - **U**
46
- UTF-8
28
+ Get the third octet from the node's IP address::
47
29
 
48
- **Examples**
30
+ $i3 = regsubst($ipaddress,'^([0-9]+)[.]([0-9]+)[.]([0-9]+)[.]([0-9]+)$','\\3')
49
31
 
50
- Get the third octet from the node's IP address: ::
32
+ Put angle brackets around each octet in the node's IP address::
51
33
 
52
- $i3 = regsubst($ipaddress,
53
- '^([0-9]+)[.]([0-9]+)[.]([0-9]+)[.]([0-9]+)$',
54
- '\\\\3')
55
-
56
- Put angle brackets around each octet in the node's IP address: ::
57
-
58
- $x = regsubst($ipaddress, '([0-9]+)', '<\\\\1>', 'G')
59
- ") \
60
- do |args|
34
+ $x = regsubst($ipaddress, '([0-9]+)', '<\\1>', 'G')
35
+ ") \
36
+ do |args|
61
37
  flag_mapping = {
62
38
  "E" => Regexp::EXTENDED,
63
39
  "I" => Regexp::IGNORECASE,
@@ -1,13 +1,8 @@
1
1
  module Puppet::Parser::Functions
2
2
  newfunction(:sprintf, :type => :rvalue,
3
- :doc => "\
4
- Perform printf-style formatting of text.
3
+ :doc => "Perform printf-style formatting of text.
5
4
 
6
- The first parameter is format string describing how the rest of the
7
- parameters should be formatted. See the documentation for the
8
- ``Kernel::sprintf()`` function in Ruby for all the details.
9
- ") \
10
- do |args|
5
+ The first parameter is format string describing how the rest of the parameters should be formatted. See the documentation for the ``Kernel::sprintf()`` function in Ruby for all the details.") do |args|
11
6
  if args.length < 1
12
7
  raise Puppet::ParseError, 'sprintf() needs at least one argument'
13
8
  end
@@ -18,6 +18,7 @@
18
18
  # Author: Bryan Kearney <bkearney@redhat.com>
19
19
 
20
20
  require 'augeas' if Puppet.features.augeas?
21
+ require 'strscan'
21
22
 
22
23
  Puppet::Type.type(:augeas).provide(:augeas) do
23
24
  include Puppet::Util
@@ -29,6 +30,22 @@ Puppet::Type.type(:augeas).provide(:augeas) do
29
30
  SAVE_NOOP = "noop"
30
31
  SAVE_OVERWRITE = "overwrite"
31
32
 
33
+ COMMANDS = {
34
+ "set" => [ :path, :string ],
35
+ "rm" => [ :path ],
36
+ "clear" => [ :path ],
37
+ "insert" => [ :string, :string, :path ],
38
+ "get" => [ :path, :comparator, :string ],
39
+ "match" => [ :path, :glob ],
40
+ "size" => [:comparator, :int],
41
+ "include" => [:string],
42
+ "eq" => [:glob],
43
+ "noteq" => [:glob]
44
+ }
45
+
46
+ COMMANDS["ins"] = COMMANDS["insert"]
47
+ COMMANDS["remove"] = COMMANDS["rm"]
48
+
32
49
  attr_accessor :aug
33
50
 
34
51
  # Extracts an 2 dimensional array of commands which are in the
@@ -38,42 +55,76 @@ Puppet::Type.type(:augeas).provide(:augeas) do
38
55
  # - A string with many commands per line
39
56
  # - An array of strings.
40
57
  def parse_commands(data)
41
- commands = Array.new()
58
+ context = resource[:context]
59
+ # Add a trailing / if it is not there
60
+ if (context.length > 0)
61
+ context << "/" if context[-1, 1] != "/"
62
+ end
63
+
42
64
  if data.is_a?(String)
43
- data.each_line do |line|
44
- cmd_array = Array.new()
45
- single = line.index("'")
46
- double = line.index('"')
47
- tokens = nil
48
- delim = " "
49
- if ((single != nil) or (double != nil))
50
- single = 99999 if single == nil
51
- double = 99999 if double == nil
52
- delim = '"' if double < single
53
- delim = "'" if single < double
54
- end
55
- tokens = line.split(delim)
56
- # If the length of tokens is 2, thn that means the pattern was
57
- # command file "some text", therefore we need to re-split
58
- # the first line
59
- if tokens.length == 2
60
- tokens = (tokens[0].split(" ")) << tokens[1]
65
+ s = data
66
+ data = []
67
+ s.each_line { |line| data << line }
68
+ end
69
+ args = []
70
+ data.each do |line|
71
+ argline = []
72
+ sc = StringScanner.new(line)
73
+ cmd = sc.scan(/\w+/)
74
+ formals = COMMANDS[cmd]
75
+ fail("Unknown command #{cmd}") unless formals
76
+ argline << cmd
77
+ narg = 0
78
+ formals.each do |f|
79
+ sc.skip(/\s+/)
80
+ narg += 1
81
+ if f == :path
82
+ start = sc.pos
83
+ nbracket = 0
84
+ begin
85
+ sc.skip(/[^\]\[\s]+/)
86
+ ch = sc.getch
87
+ nbracket += 1 if ch == "["
88
+ nbracket -= 1 if ch == "]"
89
+ fail("unmatched [") if nbracket < 0
90
+ end until nbracket == 0 && (sc.eos? || ch =~ /\s/)
91
+ len = sc.pos - start
92
+ len -= 1 unless sc.eos?
93
+ unless p = sc.string[start, len]
94
+ fail("missing path argument #{narg} for #{cmd}")
95
+ end
96
+ if p[0,1] != "$" && p[0,1] != "/"
97
+ argline << context + p
98
+ else
99
+ argline << p
100
+ end
101
+ elsif f == :string
102
+ delim = sc.peek(1)
103
+ if delim == "'" || delim == "\""
104
+ sc.getch
105
+ argline << sc.scan(/([^\\#{delim}]|(\\.))*/)
106
+ sc.getch
107
+ else
108
+ argline << sc.scan(/[^\s]+/)
109
+ end
110
+ unless argline[-1]
111
+ fail(raise Exception, "missing string argument #{narg} for #{cmd}")
112
+ end
113
+ elsif f == :comparator
114
+ argline << sc.scan(/(==|!=|=~|<|<=|>|>=)/)
115
+ unless argline[-1]
116
+ puts sc.rest()
117
+ fail(raise Exception, "invalid comparator for command #{cmd}")
118
+ end
119
+ elsif f == :int
120
+ argline << sc.scan(/\d+/).to_i
121
+ elsif f== :glob
122
+ argline << sc.rest()
61
123
  end
62
- cmd = tokens.shift().strip()
63
- delim = "" if delim == " "
64
- file = tokens.shift().strip()
65
- other = tokens.join(" ").strip()
66
- cmd_array << cmd if !cmd.nil?
67
- cmd_array << file if !file.nil?
68
- cmd_array << other if other != ""
69
- commands << cmd_array
70
- end
71
- elsif data.is_a?(Array)
72
- data.each do |datum|
73
- commands.concat(parse_commands(datum))
74
124
  end
125
+ args << argline
75
126
  end
76
- return commands
127
+ return args
77
128
  end
78
129
 
79
130
 
@@ -137,10 +188,13 @@ Puppet::Type.type(:augeas).provide(:augeas) do
137
188
  return_value = false
138
189
 
139
190
  #validate and tear apart the command
140
- fail("Invalid command: #{cmd_array.join(" ")}") if cmd_array.length < 4
191
+ fail("Invalid command: #{cmd_array.join(" ")}") if cmd_array.length < 3
141
192
  cmd = cmd_array.shift()
142
193
  path = cmd_array.shift()
143
- verb = cmd_array.shift()
194
+
195
+ # Need to break apart the clause
196
+ clause_array = parse_commands(cmd_array.shift())[0]
197
+ verb = clause_array.shift()
144
198
 
145
199
  #Get the values from augeas
146
200
  result = @aug.match(path) || ''
@@ -148,21 +202,29 @@ Puppet::Type.type(:augeas).provide(:augeas) do
148
202
  unless (result.nil?)
149
203
  case verb
150
204
  when "size":
151
- fail("Invalid command: #{cmd_array.join(" ")}") if cmd_array.length != 2
152
- comparator = cmd_array.shift()
153
- arg = cmd_array.shift().to_i
205
+ fail("Invalid command: #{cmd_array.join(" ")}") if clause_array.length != 2
206
+ comparator = clause_array.shift()
207
+ arg = clause_array.shift()
154
208
  return_value = true if (result.size.send(comparator, arg))
155
209
  when "include":
156
- arg = cmd_array.join(" ")
210
+ arg = clause_array.shift()
157
211
  return_value = true if result.include?(arg)
158
- when "==":
212
+ when "eq":
159
213
  begin
160
- arg = cmd_array.join(" ")
214
+ arg = clause_array.shift()
161
215
  new_array = eval arg
162
216
  return_value = true if result == new_array
163
217
  rescue
164
218
  fail("Invalid array in command: #{cmd_array.join(" ")}")
165
219
  end
220
+ when "noteq":
221
+ begin
222
+ arg = clause_array.shift()
223
+ new_array = eval arg
224
+ return_value = true if result != new_array
225
+ rescue
226
+ fail("Invalid array in command: #{cmd_array.join(" ")}")
227
+ end
166
228
  end
167
229
  end
168
230
  return_value
@@ -188,11 +250,9 @@ Puppet::Type.type(:augeas).provide(:augeas) do
188
250
  self.open_augeas()
189
251
  filter = resource[:onlyif]
190
252
  unless (filter == "")
191
- cmd_array = filter.split
253
+ cmd_array = parse_commands(filter)[0]
192
254
  command = cmd_array[0];
193
- cmd_array[1]= File.join(resource[:context], cmd_array[1])
194
255
  begin
195
- data = nil
196
256
  case command
197
257
  when "get" then return_value = process_get(cmd_array)
198
258
  when "match" then return_value = process_match(cmd_array)
@@ -244,35 +304,26 @@ Puppet::Type.type(:augeas).provide(:augeas) do
244
304
 
245
305
  # Actually execute the augeas changes.
246
306
  def do_execute_changes
247
- commands = resource[:changes].clone()
248
- context = resource[:context]
307
+ commands = parse_commands(resource[:changes])
249
308
  commands.each do |cmd_array|
250
- cmd_array = cmd_array.clone()
251
309
  fail("invalid command #{cmd_array.join[" "]}") if cmd_array.length < 2
252
310
  command = cmd_array[0]
253
311
  cmd_array.shift()
254
312
  begin
255
313
  case command
256
314
  when "set":
257
- cmd_array[0]=File.join(context, cmd_array[0])
258
315
  debug("sending command '#{command}' with params #{cmd_array.inspect}")
259
316
  @aug.set(cmd_array[0], cmd_array[1])
260
317
  when "rm", "remove":
261
- cmd_array[0]=File.join(context, cmd_array[0])
262
318
  debug("sending command '#{command}' with params #{cmd_array.inspect}")
263
319
  @aug.rm(cmd_array[0])
264
320
  when "clear":
265
- cmd_array[0]=File.join(context, cmd_array[0])
266
321
  debug("sending command '#{command}' with params #{cmd_array.inspect}")
267
322
  @aug.clear(cmd_array[0])
268
323
  when "insert", "ins"
269
- ext_array = cmd_array[1].split(" ") ;
270
- if cmd_array.size < 2 or ext_array.size < 2
271
- fail("ins requires 3 parameters")
272
- end
273
324
  label = cmd_array[0]
274
- where = ext_array[0]
275
- path = File.join(context, ext_array[1])
325
+ where = cmd_array[1]
326
+ path = cmd_array[2]
276
327
  case where
277
328
  when "before": before = true
278
329
  when "after": before = false