puppet 2.7.13 → 2.7.14

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 (215) hide show
  1. data/CHANGELOG +144 -1
  2. data/conf/osx/preflight +1 -1
  3. data/conf/redhat/puppet.spec +9 -5
  4. data/conf/suse/puppet.spec +4 -1
  5. data/conf/windows/eventlog/Rakefile +32 -0
  6. data/conf/windows/eventlog/puppetres.dll +0 -0
  7. data/conf/windows/eventlog/puppetres.mc +18 -0
  8. data/ext/rack/files/apache2.conf +3 -0
  9. data/install.rb +23 -1
  10. data/lib/puppet.rb +1 -1
  11. data/lib/puppet/agent.rb +1 -14
  12. data/lib/puppet/application/kick.rb +1 -1
  13. data/lib/puppet/application/module.rb +11 -0
  14. data/lib/puppet/daemon.rb +74 -3
  15. data/lib/puppet/defaults.rb +1 -1
  16. data/lib/puppet/face/certificate.rb +1 -1
  17. data/lib/puppet/face/help/man.erb +1 -1
  18. data/lib/puppet/face/module.rb +17 -0
  19. data/lib/puppet/face/module/build.rb +10 -4
  20. data/lib/puppet/face/module/changes.rb +5 -5
  21. data/lib/puppet/face/module/generate.rb +6 -4
  22. data/lib/puppet/face/module/install.rb +122 -32
  23. data/lib/puppet/face/module/list.rb +234 -33
  24. data/lib/puppet/face/module/search.rb +56 -23
  25. data/lib/puppet/face/module/uninstall.rb +33 -38
  26. data/lib/puppet/face/module/upgrade.rb +84 -0
  27. data/lib/puppet/feature/eventlog.rb +6 -0
  28. data/lib/puppet/forge.rb +67 -122
  29. data/lib/puppet/forge/cache.rb +1 -1
  30. data/lib/puppet/forge/repository.rb +6 -25
  31. data/lib/puppet/indirector/facts/network_device.rb +1 -1
  32. data/lib/puppet/interface/action.rb +1 -1
  33. data/lib/puppet/module.rb +79 -28
  34. data/lib/puppet/module_tool.rb +72 -34
  35. data/lib/puppet/module_tool/applications.rb +12 -14
  36. data/lib/puppet/module_tool/applications/application.rb +21 -19
  37. data/lib/puppet/module_tool/applications/builder.rb +4 -4
  38. data/lib/puppet/module_tool/applications/checksummer.rb +12 -3
  39. data/lib/puppet/module_tool/applications/generator.rb +1 -1
  40. data/lib/puppet/module_tool/applications/installer.rb +163 -34
  41. data/lib/puppet/module_tool/applications/searcher.rb +2 -3
  42. data/lib/puppet/module_tool/applications/uninstaller.rb +84 -36
  43. data/lib/puppet/module_tool/applications/unpacker.rb +4 -26
  44. data/lib/puppet/module_tool/applications/upgrader.rb +109 -0
  45. data/lib/puppet/module_tool/checksums.rb +2 -2
  46. data/lib/puppet/module_tool/contents_description.rb +1 -1
  47. data/lib/puppet/module_tool/dependency.rb +2 -2
  48. data/lib/puppet/module_tool/errors.rb +9 -0
  49. data/lib/puppet/module_tool/errors/base.rb +15 -0
  50. data/lib/puppet/module_tool/errors/installer.rb +90 -0
  51. data/lib/puppet/module_tool/errors/shared.rb +115 -0
  52. data/lib/puppet/module_tool/errors/uninstaller.rb +45 -0
  53. data/lib/puppet/module_tool/errors/upgrader.rb +72 -0
  54. data/lib/puppet/module_tool/metadata.rb +2 -2
  55. data/lib/puppet/module_tool/modulefile.rb +7 -7
  56. data/lib/puppet/module_tool/shared_behaviors.rb +161 -0
  57. data/lib/puppet/module_tool/skeleton.rb +1 -1
  58. data/lib/puppet/node/environment.rb +4 -2
  59. data/lib/puppet/parser/ast/leaf.rb +1 -1
  60. data/lib/puppet/parser/functions/create_resources.rb +3 -2
  61. data/lib/puppet/parser/scope.rb +44 -9
  62. data/lib/puppet/provider/augeas/augeas.rb +2 -2
  63. data/lib/puppet/provider/exec.rb +8 -3
  64. data/lib/puppet/provider/exec/shell.rb +1 -2
  65. data/lib/puppet/provider/nameservice/directoryservice.rb +10 -4
  66. data/lib/puppet/provider/package/gem.rb +1 -1
  67. data/lib/puppet/provider/package/pkg.rb +10 -21
  68. data/lib/puppet/provider/selmodule/semodule.rb +1 -2
  69. data/lib/puppet/provider/service/upstart.rb +33 -17
  70. data/lib/puppet/provider/ssh_authorized_key/parsed.rb +1 -1
  71. data/lib/puppet/rails/inventory_node.rb +7 -7
  72. data/lib/puppet/reports/http.rb +4 -1
  73. data/lib/puppet/reports/tagmail.rb +8 -1
  74. data/lib/puppet/resource/type.rb +1 -1
  75. data/lib/puppet/test/test_helper.rb +138 -0
  76. data/lib/puppet/type.rb +9 -1
  77. data/lib/puppet/type/file.rb +18 -10
  78. data/lib/puppet/type/package.rb +13 -9
  79. data/lib/puppet/type/resources.rb +1 -1
  80. data/lib/puppet/type/ssh_authorized_key.rb +3 -4
  81. data/lib/puppet/type/sshkey.rb +4 -4
  82. data/lib/puppet/type/user.rb +1 -0
  83. data/lib/puppet/type/vlan.rb +1 -1
  84. data/lib/puppet/util.rb +31 -14
  85. data/lib/puppet/util/autoload.rb +1 -1
  86. data/lib/puppet/util/command_line.rb +2 -6
  87. data/lib/puppet/util/instrumentation/indirection_probe.rb +1 -1
  88. data/lib/puppet/util/instrumentation/instrumentable.rb +1 -1
  89. data/lib/puppet/util/instrumentation/listeners/log.rb +1 -1
  90. data/lib/puppet/util/instrumentation/listeners/performance.rb +1 -1
  91. data/lib/puppet/util/log.rb +3 -1
  92. data/lib/puppet/util/log/destinations.rb +38 -0
  93. data/lib/puppet/util/monkey_patches.rb +45 -0
  94. data/lib/puppet/util/network_device/base.rb +1 -1
  95. data/lib/puppet/util/network_device/cisco.rb +1 -1
  96. data/lib/puppet/util/network_device/cisco/facts.rb +1 -1
  97. data/lib/puppet/util/network_device/cisco/interface.rb +1 -1
  98. data/lib/puppet/util/network_device/config.rb +1 -1
  99. data/lib/puppet/util/network_device/ipcalc.rb +1 -1
  100. data/lib/puppet/util/network_device/transport.rb +1 -1
  101. data/lib/puppet/util/network_device/transport/base.rb +1 -1
  102. data/lib/puppet/util/network_device/transport/ssh.rb +1 -1
  103. data/lib/puppet/util/settings.rb +2 -11
  104. data/lib/puppet/util/settings/file_setting.rb +3 -5
  105. data/lib/puppet/util/terminal.rb +16 -0
  106. data/lib/puppet/util/zaml.rb +3 -1
  107. data/lib/semver.rb +15 -7
  108. data/spec/fixtures/releases/jamtur01-apache/metadata.json +1 -1
  109. data/spec/fixtures/unit/parser/lexer/arithmetic_expression.pp +1 -1
  110. data/spec/fixtures/unit/provider/package/pkg/dummy +1 -0
  111. data/spec/fixtures/unit/provider/package/pkg/incomplete +1 -0
  112. data/spec/fixtures/unit/provider/package/pkg/publisher +2 -0
  113. data/spec/fixtures/unit/provider/package/pkg/simple +4 -0
  114. data/spec/fixtures/unit/reports/tagmail/tagmail_email.conf +2 -0
  115. data/spec/fixtures/yaml/report0.25.x.yaml +1 -1
  116. data/spec/fixtures/yaml/report2.6.x.yaml +1 -1
  117. data/spec/integration/faces/documentation_spec.rb +1 -1
  118. data/spec/integration/network/rest_authconfig_spec.rb +1 -1
  119. data/spec/lib/puppet_spec/compiler.rb +6 -0
  120. data/spec/lib/puppet_spec/database.rb +30 -0
  121. data/spec/lib/puppet_spec/files.rb +4 -2
  122. data/spec/shared_behaviours/path_parameters.rb +2 -29
  123. data/spec/shared_contexts/platform.rb +43 -0
  124. data/spec/spec_helper.rb +36 -65
  125. data/spec/unit/agent_spec.rb +0 -32
  126. data/spec/unit/application/kick_spec.rb +2 -2
  127. data/spec/unit/daemon_spec.rb +1 -17
  128. data/spec/unit/face/module/install_spec.rb +158 -0
  129. data/spec/unit/face/module/list_spec.rb +182 -0
  130. data/spec/unit/face/module/search_spec.rb +163 -0
  131. data/spec/unit/face/module/uninstall_spec.rb +77 -0
  132. data/spec/unit/face/module/upgrade_spec.rb +26 -0
  133. data/spec/unit/forge/repository_spec.rb +0 -30
  134. data/spec/unit/forge_spec.rb +28 -86
  135. data/spec/unit/indirector/catalog/active_record_spec.rb +45 -65
  136. data/spec/unit/indirector/facts/inventory_active_record_spec.rb +5 -18
  137. data/spec/unit/indirector/resource/active_record_spec.rb +2 -11
  138. data/spec/unit/indirector/resource/ral_spec.rb +7 -2
  139. data/spec/unit/module_spec.rb +240 -107
  140. data/spec/unit/module_tool/application_spec.rb +3 -5
  141. data/spec/unit/module_tool/applications/application_spec.rb +19 -0
  142. data/spec/unit/module_tool/applications/installer_spec.rb +205 -0
  143. data/spec/unit/module_tool/applications/uninstaller_spec.rb +206 -0
  144. data/spec/unit/module_tool/applications/upgrader_spec.rb +37 -0
  145. data/spec/unit/module_tool/metadata_spec.rb +2 -2
  146. data/spec/unit/module_tool_spec.rb +109 -1
  147. data/spec/unit/node/environment_spec.rb +16 -1
  148. data/spec/unit/parser/ast/leaf_spec.rb +16 -1
  149. data/spec/unit/parser/collector_spec.rb +2 -12
  150. data/spec/unit/parser/functions/create_resources_spec.rb +135 -86
  151. data/spec/unit/parser/functions/generate_spec.rb +2 -10
  152. data/spec/unit/parser/scope_spec.rb +345 -16
  153. data/spec/unit/provider/augeas/augeas_spec.rb +19 -0
  154. data/spec/unit/provider/exec/shell_spec.rb +17 -14
  155. data/spec/unit/provider/exec/windows_spec.rb +1 -7
  156. data/spec/unit/provider/exec_spec.rb +35 -0
  157. data/spec/unit/provider/nameservice/directoryservice_spec.rb +10 -0
  158. data/spec/unit/provider/package/dpkg_spec.rb +2 -1
  159. data/spec/unit/provider/package/gem_spec.rb +15 -0
  160. data/spec/unit/provider/package/openbsd_spec.rb +5 -4
  161. data/spec/unit/provider/package/pacman_spec.rb +3 -2
  162. data/spec/unit/provider/package/pkg_spec.rb +56 -33
  163. data/spec/unit/provider/selmodule_spec.rb +11 -4
  164. data/spec/unit/provider/service/redhat_spec.rb +1 -3
  165. data/spec/unit/provider/service/smf_spec.rb +1 -3
  166. data/spec/unit/provider/service/upstart_spec.rb +38 -0
  167. data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +28 -0
  168. data/spec/unit/rails/host_spec.rb +6 -12
  169. data/spec/unit/rails/param_value_spec.rb +3 -8
  170. data/spec/unit/rails/resource_spec.rb +2 -8
  171. data/spec/unit/reports/http_spec.rb +47 -31
  172. data/spec/unit/reports/tagmail_spec.rb +77 -0
  173. data/spec/unit/resource/type_spec.rb +2 -2
  174. data/spec/unit/resource_spec.rb +18 -20
  175. data/spec/unit/semver_spec.rb +31 -13
  176. data/spec/unit/type/exec_spec.rb +8 -15
  177. data/spec/unit/type/group_spec.rb +0 -9
  178. data/spec/unit/type/package_spec.rb +10 -0
  179. data/spec/unit/type/resources_spec.rb +4 -5
  180. data/spec/unit/type/ssh_authorized_key_spec.rb +4 -15
  181. data/spec/unit/type/sshkey_spec.rb +9 -11
  182. data/spec/unit/type/user_spec.rb +123 -127
  183. data/spec/unit/type_spec.rb +20 -0
  184. data/spec/unit/util/command_line_spec.rb +2 -2
  185. data/spec/unit/util/instrumentation/data_spec.rb +1 -1
  186. data/spec/unit/util/instrumentation/indirection_probe_spec.rb +1 -1
  187. data/spec/unit/util/instrumentation/instrumentable_spec.rb +1 -1
  188. data/spec/unit/util/instrumentation/listener_spec.rb +1 -1
  189. data/spec/unit/util/instrumentation/listeners/log_spec.rb +1 -1
  190. data/spec/unit/util/instrumentation/listeners/performance_spec.rb +1 -1
  191. data/spec/unit/util/instrumentation_spec.rb +1 -1
  192. data/spec/unit/util/log/destinations_spec.rb +4 -8
  193. data/spec/unit/util/log_spec.rb +47 -0
  194. data/spec/unit/util/reference_spec.rb +1 -1
  195. data/spec/unit/util/settings/file_setting_spec.rb +9 -0
  196. data/spec/unit/util/settings_spec.rb +0 -53
  197. data/spec/unit/util/terminal_spec.rb +42 -0
  198. data/spec/unit/util/zaml_spec.rb +7 -0
  199. data/spec/unit/util_spec.rb +63 -20
  200. data/tasks/rake/manpages.rake +1 -1
  201. data/test/data/snippets/arithmetic_expression.pp +1 -1
  202. data/test/other/puppet.rb +0 -1
  203. data/test/util/log.rb +6 -6
  204. metadata +41 -16
  205. data/lib/puppet/external/event-loop.rb +0 -1
  206. data/lib/puppet/external/event-loop/better-definers.rb +0 -367
  207. data/lib/puppet/external/event-loop/event-loop.rb +0 -355
  208. data/lib/puppet/external/event-loop/signal-system.rb +0 -218
  209. data/lib/puppet/face/module/clean.rb +0 -30
  210. data/lib/puppet/module_tool/applications/cleaner.rb +0 -16
  211. data/lib/puppet/module_tool/skeleton/templates/generator/metadata.json +0 -12
  212. data/lib/puppet/module_tool/utils.rb +0 -5
  213. data/lib/puppet/module_tool/utils/interrogation.rb +0 -25
  214. data/spec/integration/module_tool_spec.rb +0 -475
  215. data/spec/unit/module_tool/uninstaller_spec.rb +0 -124
data/CHANGELOG CHANGED
@@ -1,3 +1,128 @@
1
+ 2.7.14
2
+ ===
3
+ 42b20be (#13682) Fix acceptance test failures
4
+ dce3c32 (#13682) Rename Puppet::Module::Tool to Puppet::ModuleTool
5
+ 5117e12 (maint) Ensure every file has a trailing newlines
6
+ c255414 (#14036) Add upstart tests
7
+ dc3bb9f (#14036) Handle upstart better
8
+ 74e462f (#14060) Fix quoting of commands to interpolate inside the shell.
9
+ 796a072 Modernize the style of the shell exec provider tests.
10
+ 934ec89 Improve deprecation warning for dynamic lookup
11
+ 0d9e852 Removed duplication of compiling a catalog
12
+ d67711d Cleaner test for create_resources doing nothing
13
+ 2d3cc63 Fixing problem caused by activerecord
14
+ f1331ba Put back require 'puppet' in Puppet::Util
15
+ 79bf4fa (#13299) Fix error message when agent is disabled
16
+ 5178adc Update puppet.spec for rpm packaging
17
+ fb96747 Fixed old log test to match new autoflush behavior
18
+ 878127f Make sure the log file writable
19
+ 72d3b56 Default autoflushing of log files to true
20
+ 9711d50 Created test that shows enc warning problem
21
+ d54100d (Maint) Fix order-dependent test failure
22
+ f531400 (Maint) Don't assume eventlog gem is installed on Windows
23
+ 2957ffe Fix tempfile cleanup in specs
24
+ e2d6915 Fix communication_error acceptance test
25
+ 27a5eb7 options[:ca_location] is a string not a symbol. Safer to pull Puppet::SSL::Host.ca_location since it is already set correctly.
26
+ c01cac9 (#13204) Don't ignore missing PATH.augnew files
27
+ 7d27cd2 Use :as_platform in the smf service spec
28
+ 876785a Use :as_platform in the redhat service spec
29
+ a7181c8 (#13640) Only agents should use next_agent_run
30
+ 9aa302f Increased test coverage of scoping rules
31
+ 163ab8c Use more descriptive terms for the differing scopes
32
+ 2ddb3d6 Make new scoping look through inherited scopes
33
+ b519e24 Add tests for mixed inheritence/inclusion
34
+ 48bce6b Remove dynamic option for lookupvar
35
+ 2e78aad Implement newlookupvar() to replace dynamic scope
36
+ 9c94586 Tests for deprecation warnings for dynamic scoping
37
+ 2ff6fe4 (#13690) add comments to spec_helper
38
+ 100f42c (#12392) Don't require eventlog gem on non-Windows platforms
39
+ b6ee08a (#13690) Update 2.7.x for spec_helper compatibility with external projects
40
+ 1306611 (maint) Remove unnecessary step from puppet module build help
41
+ 7afcb04 (#9167) Do not send email when nothing changes
42
+ a26ff16 [#13686] Fix directoryservices ShadowHashData code
43
+ b85cdc9 Fixup tests to work on CentOS 5
44
+ 7e78094 (#13659) Convert fact values to string when searching database
45
+ fc2964f fix bug in Util#symbolizehash!
46
+ 46d8973 (#13567) Fix create_resources name parameter bug
47
+ 8d2ff89 (#12392) Add eventlog destination and log to it by default on Windows
48
+ bca4849 (#13636) Update Module Face copyright date
49
+ e7d3911 (#13649) Restrict module name matching
50
+ 9cbda49 (#13643) Make the use of FileUtils.rm_rf secure
51
+ 6819cf3 (#13642) Move search notice message
52
+ 28531f8 (#13639) Don't send errors directly to stderr
53
+ 45f8009 (#13638) Add SemVer#pre function
54
+ a2990a8 (#13737) Swap build_tree and format_tree method names
55
+ f0625ef (#12392) Created Windows eventlog message resource dll
56
+ 245c6b7 (#9167) Do not send email when nothing changes
57
+ 1b810b1 (#3581) Stop forking around: Add fork helper method
58
+ 1de8bd7 Add Module Tool
59
+ e24755d (#13397) fix gem provider ensure=>latest bug
60
+ 271c7f2 Make core changes needed for the puppet module tool
61
+ 7994400 (#13367) Patch SemVer to permit ranges including pre-release components.
62
+ 1342558 Monkey patch FileUtils.mv in Ruby 1.8.5
63
+ 3f28268 (#12101) Make Puppet::Util::absolute_path? usable in autoloader
64
+ 772f756 (#12101) Add shared context for specs to imitate windows or posix
65
+ 8f84207 (#12466) unset X-Forwarded-For header
66
+ 49eabd4 Quote strings containing hex numbers when generating ZAML
67
+ f5487bd (#13439) refactor spec helper for spec compatibility between 2.7 and master
68
+ db17d7c (#13380) Cron acceptance tests don't ensure cron actually installed
69
+ 0498d55 (#13204) Workaround duplicate Augeas save events
70
+ 7048e88 (#3022) File type's force attribute's description is incomplete
71
+ 43003f5 (Maint) Consistently use the same agent fqdn
72
+ 95c2b90 Stub execpipe using StringIO
73
+ ca32364 (#13117) Fix selmodule error on each_lines
74
+ bdb5922 (Maint) Don't change permissions on /etc/hosts
75
+ 40ee256 Finally, stop using the `foo` name in the type_spec test.
76
+ 245f1b9 Clean up the "foo" name in create_resources_spec.
77
+ eb2c71b Clean up "foo" name in global resource state.
78
+ ec5c4bf Document the problem with the `apply_to_device` and related methods.
79
+ d6da1b7 Fix hash comparison under RSpec with 1.8.5
80
+ 0b7841a (#12960) Fix puppet resource <type> if type has no providers
81
+ 6a31287 (#12981) Fix external subcommand exit status
82
+ a2208d0 (#10722) Add spec to verify that an error is logged on bad http
83
+ 7207b68 (#10722) Refactor http_spec to use expectations
84
+ 54e5d18 (#7986) Modify pkg provider to handle publisher
85
+ 2e32924 (#7986) Cleanup pkg provider #2
86
+ 113fc54 (#7986) Cleanup pkg provider #1
87
+ 452e2c4 (#7592) Remove redundant call to String#to_s
88
+ ee554eb (#10722) Display errors on HTTP report submission failures
89
+ 2973d5c (#11988) Work around Augeas reload bug when changing save modes
90
+ dfefc23 (#11988) Don't overwrite symlinks in augeas provider
91
+ d27af92 Stubbing time is risky, better an approximate compare.
92
+ 01c8623 Don't stub the database in Puppet::Rails tests.
93
+ c4b3c84 (#9491) Preserve trailing slashes in FileSettings
94
+ 27bd6bc (#8312) Fix zypper provider so ensure => 'latest' now works
95
+ c6d656a (#1076) Show warning if an empty group is specified
96
+ e1f9957 Maint: Remove unused mock objects in user spec
97
+ bc64d9b Maint: Use real objects in user spec
98
+ 7eb4f5b Maint: Add a real provider class to user spec
99
+ d28c62a Maint: Remove unused variable in user spec
100
+ dba27c9 (#4862) Finally remove the event-loop library.
101
+ 8e11766 (#4862) define_method is not a public method in Ruby.
102
+ 11501a7 (#4862) `returning` is not a standard Ruby method.
103
+ 30a23ac (#4862) Stop using EventLoop in the Puppet daemon.
104
+ a61c785 Updating CHANGELOG and lib/puppet.rb for 2.6.14
105
+ 60b7aa5 Prior to this commit we hard coded paths in two tests that depended on our CI system directory structure. This made it hard to use our acceptance suite without also includin
106
+ 600a6e7 Clean up and unify scratch database setup logic.
107
+ 17a5302 Make PuppetSpec::Files methods available at module level.
108
+ 3857e2b Fix stubbing of ActiveRecord that doesn't work in AR 3.2.*
109
+ dd6d36c Fix Rails compatibility code to be less stupid.
110
+ ade5965 Remove unnecessary fallbacks in change_{user,group}
111
+ 0a09a64 Document uid/gid-related methods in Puppet::Util
112
+ 2599d56 Copy owner/group in replace_file
113
+ ead36ff (#12463) eliminate `secure_open` in favour of `replace_file`
114
+ 1469538 (#12460) use `replace_file` for the .k5login file
115
+ 8461203 (#12462) user_role_add: use `replace_file` for /etc/shadow
116
+ 0ad532a (#12463) add secure `replace_file` to Puppet::Util
117
+ 76d0749 (#12459) drop supplementary groups when permanently dropping UID
118
+ 50909b9 (#12458) default to users primary group, not root, in `asuser`
119
+ d00c5cc (#12457) add users primary group, not Process.gid, in initgroups
120
+ 2732f25 (#12479) Don't make undef regexp match as the string undef.
121
+ a62f711 (#8193) Add support for new ssh keytypes in authorized_key provider
122
+ 0efc65d (#8193) Add unit tests for new ssh keytypes
123
+ 5dfc436 (#8193) Support new keytypes for sshkey
124
+ 36e6642 (#8193) Support new keytypes for ssh_authorized_key
125
+
1
126
  2.7.13
2
127
  ===
3
128
  1f58ea6 Stub mktmpdir and remove_entry_secure in os x package providers
@@ -238,7 +363,7 @@ b28d4ce (#12296) Test cycle detection on real Puppet::Type instances.
238
363
  f11ee44 (#12464) Avoid unnecessarily reloading facts when node_name_fact is not set
239
364
 
240
365
  2.7.10
241
- ===
366
+ =======
242
367
  e31369a (#6541) Use the same filebucket for backup and restore
243
368
  0d8a22a (#11767) No longer necessary to delete ssl directory in each test
244
369
  e1828ba Updated CHANGELOG for 2.7.10rc1
@@ -1950,6 +2075,24 @@ d532e6d Fixing #3185 Rakefile is loading puppet.rb twice
1950
2075
  5aa596c Fix #3150 - require function doesn't like ::class syntax
1951
2076
  3457b87 Added time module to tagmail report
1952
2077
 
2078
+ 2.6.14
2079
+ ===
2080
+ ade5965 Remove unnecessary fallbacks in change_{user,group}
2081
+ 0a09a64 Document uid/gid-related methods in Puppet::Util
2082
+ 2599d56 Copy owner/group in replace_file
2083
+ ead36ff (#12463) eliminate `secure_open` in favour of `replace_file`
2084
+ 1469538 (#12460) use `replace_file` for the .k5login file
2085
+ 8461203 (#12462) user_role_add: use `replace_file` for /etc/shadow
2086
+ 0ad532a (#12463) add secure `replace_file` to Puppet::Util
2087
+ 76d0749 (#12459) drop supplementary groups when permanently dropping UID
2088
+ 50909b9 (#12458) default to users primary group, not root, in `asuser`
2089
+ d00c5cc (#12457) add users primary group, not Process.gid, in initgroups
2090
+ d937ae3 (#6541) Use the same filebucket for backup and restore
2091
+ a758066 (#11996) Fix test failures due to hash processing order changes.
2092
+ e0e31d5 (#5246) Puppetd does not remove it's pidfile when it exits
2093
+ 0ab4597 (#11764) Fix failing cron test
2094
+ 073ca03 (#11764) Fix cron jobs for passing block to method
2095
+
1953
2096
  2.6.13
1954
2097
  ===
1955
2098
  e4ee794 (#10739) Provide default subjectAltNames while bootstrapping master
@@ -21,4 +21,4 @@
21
21
  /bin/rm -Rf "${3}{BINDIR}/puppetd"
22
22
  /bin/rm -Rf "${3}{BINDIR}/puppetmasterd"
23
23
  /bin/rm -Rf "${3}{BINDIR}/puppetqd"
24
- /bin/rm -Rf "${3}{BINDIR}/puppetrun"
24
+ /bin/rm -Rf "${3}{BINDIR}/puppetrun"
@@ -5,7 +5,7 @@
5
5
  %global confdir conf/redhat
6
6
 
7
7
  Name: puppet
8
- Version: 2.7.12
8
+ Version: 2.7.14
9
9
  #Release: 0.1rc1%{?dist}
10
10
  Release: 1%{?dist}
11
11
  Summary: A network tool for managing many disparate systems
@@ -21,13 +21,11 @@ Group: System Environment/Base
21
21
  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
22
22
 
23
23
  BuildRequires: facter >= 1.5
24
- BuildRequires: ruby >= 1.8.1
24
+ BuildRequires: ruby >= 1.8.5
25
25
 
26
- %if 0%{?fedora} || 0%{?rhel} >= 5
27
26
  BuildArch: noarch
28
27
  Requires: ruby(abi) >= 1.8
29
28
  Requires: ruby-shadow
30
- %endif
31
29
 
32
30
  # Pull in ruby selinux bindings where available
33
31
  %if 0%{?fedora} || 0%{?rhel} >= 6
@@ -39,7 +37,7 @@ Requires: ruby-shadow
39
37
  %endif
40
38
 
41
39
  Requires: facter >= 1.5
42
- Requires: ruby >= 1.8.1
40
+ Requires: ruby >= 1.8.5
43
41
  %{!?_without_augeas:Requires: ruby-augeas}
44
42
 
45
43
  Requires(pre): shadow-utils
@@ -285,6 +283,12 @@ fi
285
283
  rm -rf %{buildroot}
286
284
 
287
285
  %changelog
286
+ * Wed May 02 2012 Moses Mendoza <moses@puppetlabs.com> - 2.7.14-1
287
+ - Update for 2.7.14
288
+
289
+ * Tue Apr 10 2012 Matthaus Litteken <matthaus@puppetlabs.com> - 2.7.13-1
290
+ - Update for 2.7.13
291
+
288
292
  * Mon Mar 12 2012 Michael Stahnke <stahnma@puppetlabs.com> - 2.7.12-1
289
293
  - Update for 2.7.12
290
294
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  Summary: A network tool for managing many disparate systems
6
6
  Name: puppet
7
- Version: 2.7.12
7
+ Version: 2.7.14
8
8
  Release: 1%{?dist}
9
9
  License: Apache 2.0
10
10
  Group: Productivity/Networking/System
@@ -136,6 +136,9 @@ find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -exec chmod a-x '{}' \;
136
136
  %{__rm} -rf %{buildroot}
137
137
 
138
138
  %changelog
139
+ * Wed May 02 2012 Moses Mendoza <moses@puppetlabs.com> - 2.7.14-1
140
+ - Update for 2.7.14
141
+
139
142
  * Mon Mar 12 2012 Michael Stahnke <stahnma@puppetlabs.com> - 2.7.12-1
140
143
  - Update for 2.7.12
141
144
 
@@ -0,0 +1,32 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'fileutils'
4
+ require 'rbconfig'
5
+
6
+ BASENAME = "puppetres"
7
+
8
+ task :default do
9
+ sh 'rake -T'
10
+ end
11
+
12
+ desc 'Build puppet eventlog message dll'
13
+ task :dist => ['out', "#{BASENAME}.dll"]
14
+
15
+ directory 'out'
16
+
17
+ rule '.rc' => '.mc' do |t|
18
+ sh "mc -b -r out -h out #{t.source}"
19
+ end
20
+
21
+ rule '.res' => '.rc' do |t|
22
+ sh "rc -nologo -r -fo out/#{t.name} out/#{t.source}"
23
+ end
24
+
25
+ rule '.dll' => '.res' do |t|
26
+ sh "link -nologo -dll -noentry -machine:x86 -out:out/#{t.name} out/#{t.source}"
27
+ end
28
+
29
+ desc 'Delete generated files'
30
+ task :clean do
31
+ FileUtils.rm_rf('out')
32
+ end
@@ -0,0 +1,18 @@
1
+ MessageId=0x1
2
+ SymbolicName=PUPPET_INFO
3
+ Language=English
4
+ %1
5
+ .
6
+
7
+ MessageId=0x2
8
+ SymbolicName=PUPPET_WARN
9
+ Language=English
10
+ %1
11
+ .
12
+
13
+ MessageId=0x3
14
+ SymbolicName=PUPPET_ERROR
15
+ Language=English
16
+ %1
17
+ .
18
+
@@ -26,6 +26,9 @@ Listen 8140
26
26
  SSLVerifyDepth 1
27
27
  SSLOptions +StdEnvVars
28
28
 
29
+ # This header needs to be set if using a loadbalancer or proxy
30
+ RequestHeader unset X-Forwarded-For
31
+
29
32
  RequestHeader set X-SSL-Subject %{SSL_CLIENT_S_DN}e
30
33
  RequestHeader set X-Client-DN %{SSL_CLIENT_S_DN}e
31
34
  RequestHeader set X-Client-Verify %{SSL_CLIENT_VERIFY}e
data/install.rb CHANGED
@@ -86,7 +86,29 @@ def do_configs(configs, target, strip = 'conf/')
86
86
  else
87
87
  FileUtils.install(cf, ocf, {:mode => 0644, :verbose => true})
88
88
  end
89
- end
89
+ end
90
+
91
+ if $operatingsystem == 'windows'
92
+ src_dll = 'conf/windows/eventlog/puppetres.dll'
93
+ dst_dll = File.join(InstallOptions.bin_dir, 'puppetres.dll')
94
+ if $haveftools
95
+ File.install(src_dll, dst_dll, 0644, true)
96
+ else
97
+ FileUtils.install(src_dll, dst_dll, {:mode => 0644, :verbose => true})
98
+ end
99
+
100
+ require 'win32/registry'
101
+ include Win32::Registry::Constants
102
+
103
+ begin
104
+ Win32::Registry::HKEY_LOCAL_MACHINE.create('SYSTEM\CurrentControlSet\services\eventlog\Application\Puppet', KEY_ALL_ACCESS | 0x0100) do |reg|
105
+ reg.write_s('EventMessageFile', dst_dll.tr('/', '\\'))
106
+ reg.write_i('TypesSupported', 0x7)
107
+ end
108
+ rescue Win32::Registry::Error => e
109
+ warn "Failed to create puppet eventlog registry key: #{e}"
110
+ end
111
+ end
90
112
  end
91
113
 
92
114
  def do_bins(bins, target, strip = 's?bin/')
@@ -24,7 +24,7 @@ require 'puppet/util/run_mode'
24
24
  # it's also a place to find top-level commands like 'debug'
25
25
 
26
26
  module Puppet
27
- PUPPETVERSION = '2.7.13'
27
+ PUPPETVERSION = '2.7.14'
28
28
 
29
29
  def Puppet.version
30
30
  PUPPETVERSION
@@ -1,5 +1,4 @@
1
1
  require 'sync'
2
- require 'puppet/external/event-loop'
3
2
  require 'puppet/application'
4
3
 
5
4
  # A general class for triggering a run of another
@@ -32,7 +31,7 @@ class Puppet::Agent
32
31
  return
33
32
  end
34
33
  if disabled?
35
- Puppet.notice "Skipping run of #{client_class}; administratively disabled; use 'puppet #{client_class} --enable' to re-enable."
34
+ Puppet.notice "Skipping run of #{client_class}; administratively disabled; use 'puppet agent --enable' to re-enable."
36
35
  return
37
36
  end
38
37
 
@@ -75,18 +74,6 @@ class Puppet::Agent
75
74
  @splayed = true
76
75
  end
77
76
 
78
- # Start listening for events. We're pretty much just listening for
79
- # timer events here.
80
- def start
81
- # Create our timer. Puppet will handle observing it and such.
82
- timer = EventLoop::Timer.new(:interval => Puppet[:runinterval], :tolerance => 1, :start? => true) do
83
- run
84
- end
85
-
86
- # Run once before we start following the timer
87
- timer.sound_alarm
88
- end
89
-
90
77
  def sync
91
78
  @sync ||= Sync.new
92
79
  end
@@ -201,7 +201,7 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License
201
201
  # do, then do the next host.
202
202
  if @children.length < options[:parallel] and ! todo.empty?
203
203
  host = todo.shift
204
- pid = fork do
204
+ pid = safe_posix_fork do
205
205
  run_for_host(host)
206
206
  end
207
207
  @children[pid] = host
@@ -0,0 +1,11 @@
1
+ require 'puppet/application/face_base'
2
+
3
+ class Puppet::Application::Module < Puppet::Application::FaceBase
4
+ def setup
5
+ super
6
+ if self.render_as.name == :console
7
+ Puppet::Util::Log.close(:console)
8
+ Puppet::Util::Log.newdestination(:telly_prototype_console)
9
+ end
10
+ end
11
+ end
@@ -1,6 +1,5 @@
1
1
  require 'puppet'
2
2
  require 'puppet/util/pidlock'
3
- require 'puppet/external/event-loop'
4
3
  require 'puppet/application'
5
4
 
6
5
  # A module that handles operations common to all daemons. This is included
@@ -120,10 +119,82 @@ class Puppet::Daemon
120
119
  create_pidfile
121
120
 
122
121
  raise Puppet::DevError, "Daemons must have an agent, server, or both" unless agent or server
122
+
123
+ # Start the listening server, if required.
123
124
  server.start if server
124
- agent.start if agent
125
125
 
126
- EventLoop.current.run
126
+ # Finally, loop forever running events - or, at least, until we exit.
127
+ run_event_loop
128
+ end
129
+
130
+ def run_event_loop
131
+ # Now, we loop waiting for either the configuration file to change, or the
132
+ # next agent run to be due. Fun times.
133
+ #
134
+ # We want to trigger the reparse if 15 seconds passed since the previous
135
+ # wakeup, and the agent run if Puppet[:runinterval] seconds have passed
136
+ # since the previous wakeup.
137
+ #
138
+ # We always want to run the agent on startup, so it was always before now.
139
+ # Because 0 means "continuously run", `to_i` does the right thing when the
140
+ # input is strange or badly formed by returning 0. Integer will raise,
141
+ # which we don't want, and we want to protect against -1 or below.
142
+ next_agent_run = 0
143
+ agent_run_interval = [Puppet[:runinterval].to_i, 0].max
144
+
145
+ # We may not want to reparse; that can be disable. Fun times.
146
+ next_reparse = 0
147
+ reparse_interval = Puppet[:filetimeout].to_i
148
+
149
+ loop do
150
+ now = Time.now.to_i
151
+
152
+ # We set a default wakeup of "one hour from now", which will
153
+ # recheck everything at a minimum every hour. Just in case something in
154
+ # the math messes up or something; it should be inexpensive enough to
155
+ # wake once an hour, then go back to sleep after doing nothing, if
156
+ # someone only wants listen mode.
157
+ next_event = now + 60 * 60
158
+
159
+ # Handle reparsing of configuration files, if desired and required.
160
+ # `reparse` will just check if the action is required, and would be
161
+ # better named `reparse_if_changed` instead.
162
+ if reparse_interval > 0 and now >= next_reparse
163
+ Puppet.settings.reparse
164
+
165
+ # The time to the next reparse might have changed, so recalculate
166
+ # now. That way we react dynamically to reconfiguration.
167
+ reparse_interval = Puppet[:filetimeout].to_i
168
+
169
+ # Set up the next reparse check based on the new reparse_interval.
170
+ if reparse_interval > 0
171
+ next_reparse = now + reparse_interval
172
+ next_event > next_reparse and next_event = next_reparse
173
+ end
174
+
175
+ # We should also recalculate the agent run interval, and adjust the
176
+ # next time it is scheduled to run, just in case. In the event that
177
+ # we made no change the result will be a zero second adjustment.
178
+ new_run_interval = [Puppet[:runinterval].to_i, 0].max
179
+ next_agent_run += agent_run_interval - new_run_interval
180
+ agent_run_interval = new_run_interval
181
+ end
182
+
183
+ # Handle triggering another agent run. This will block the next check
184
+ # for configuration reparsing, which is a desired and deliberate
185
+ # behaviour. You should not change that. --daniel 2012-02-21
186
+ if agent and now >= next_agent_run
187
+ agent.run
188
+
189
+ # Set up the next agent run time
190
+ next_agent_run = now + agent_run_interval
191
+ next_event > next_agent_run and next_event = next_agent_run
192
+ end
193
+
194
+ # Finally, an interruptable able sleep until the next scheduled event.
195
+ how_long = next_event - now
196
+ how_long > 0 and select([], [], [], how_long)
197
+ end
127
198
  end
128
199
  end
129
200