puppet 2.7.11 → 2.7.12

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 (220) hide show
  1. data/CHANGELOG +188 -0
  2. data/conf/osx/createpackage.sh +1 -0
  3. data/conf/redhat/puppet.spec +12 -9
  4. data/conf/suse/puppet.spec +4 -1
  5. data/install.rb +9 -22
  6. data/lib/puppet.rb +1 -31
  7. data/lib/puppet/agent.rb +3 -5
  8. data/lib/puppet/agent/locker.rb +15 -1
  9. data/lib/puppet/application.rb +7 -4
  10. data/lib/puppet/application/agent.rb +4 -25
  11. data/lib/puppet/application/apply.rb +3 -3
  12. data/lib/puppet/application/device.rb +2 -16
  13. data/lib/puppet/application/doc.rb +2 -2
  14. data/lib/puppet/application/face_base.rb +22 -5
  15. data/lib/puppet/application/filebucket.rb +2 -0
  16. data/lib/puppet/application/inspect.rb +2 -1
  17. data/lib/puppet/application/kick.rb +25 -9
  18. data/lib/puppet/application/queue.rb +0 -23
  19. data/lib/puppet/configurer.rb +1 -0
  20. data/lib/puppet/configurer/downloader.rb +7 -3
  21. data/lib/puppet/defaults.rb +34 -29
  22. data/lib/puppet/face/ca.rb +1 -1
  23. data/lib/puppet/face/catalog.rb +1 -0
  24. data/lib/puppet/face/file/store.rb +1 -1
  25. data/lib/puppet/face/module/list.rb +23 -3
  26. data/lib/puppet/face/module/search.rb +21 -32
  27. data/lib/puppet/face/module/uninstall.rb +56 -15
  28. data/lib/puppet/file_bucket/dipper.rb +2 -2
  29. data/lib/puppet/file_serving/base.rb +6 -5
  30. data/lib/puppet/file_serving/configuration/parser.rb +1 -1
  31. data/lib/puppet/file_serving/content.rb +1 -1
  32. data/lib/puppet/forge.rb +153 -0
  33. data/lib/puppet/{module_tool → forge}/cache.rb +1 -2
  34. data/lib/puppet/{module_tool → forge}/repository.rb +46 -4
  35. data/lib/puppet/indirector/exec.rb +1 -1
  36. data/lib/puppet/indirector/file_bucket_file/file.rb +3 -3
  37. data/lib/puppet/interface/action.rb +6 -2
  38. data/lib/puppet/module.rb +70 -10
  39. data/lib/puppet/module_tool.rb +2 -38
  40. data/lib/puppet/module_tool/applications.rb +15 -11
  41. data/lib/puppet/module_tool/applications/application.rb +2 -5
  42. data/lib/puppet/module_tool/applications/cleaner.rb +1 -1
  43. data/lib/puppet/module_tool/applications/installer.rb +10 -45
  44. data/lib/puppet/module_tool/applications/searcher.rb +2 -26
  45. data/lib/puppet/module_tool/applications/uninstaller.rb +39 -13
  46. data/lib/puppet/module_tool/applications/unpacker.rb +1 -1
  47. data/lib/puppet/module_tool/dependency.rb +1 -1
  48. data/lib/puppet/network/authconfig.rb +1 -1
  49. data/lib/puppet/network/handler/fileserver.rb +1 -1
  50. data/lib/puppet/network/http/handler.rb +4 -1
  51. data/lib/puppet/network/http/webrick.rb +4 -2
  52. data/lib/puppet/node/environment.rb +32 -6
  53. data/lib/puppet/parameter/path.rb +0 -4
  54. data/lib/puppet/parser/ast/relationship.rb +3 -16
  55. data/lib/puppet/parser/collector.rb +5 -3
  56. data/lib/puppet/parser/compiler.rb +2 -1
  57. data/lib/puppet/parser/functions/file.rb +1 -1
  58. data/lib/puppet/parser/functions/generate.rb +8 -2
  59. data/lib/puppet/parser/grammar.ra +16 -15
  60. data/lib/puppet/parser/parser.rb +959 -881
  61. data/lib/puppet/parser/relationship.rb +32 -15
  62. data/lib/puppet/parser/resource.rb +0 -1
  63. data/lib/puppet/parser/type_loader.rb +1 -2
  64. data/lib/puppet/provider/augeas/augeas.rb +17 -29
  65. data/lib/puppet/provider/exec/windows.rb +25 -3
  66. data/lib/puppet/provider/file/posix.rb +1 -1
  67. data/lib/puppet/provider/file/windows.rb +1 -1
  68. data/lib/puppet/provider/group/windows_adsi.rb +1 -1
  69. data/lib/puppet/provider/package/aix.rb +1 -1
  70. data/lib/puppet/provider/package/appdmg.rb +1 -1
  71. data/lib/puppet/provider/package/dpkg.rb +1 -1
  72. data/lib/puppet/provider/package/gem.rb +21 -23
  73. data/lib/puppet/provider/package/macports.rb +1 -1
  74. data/lib/puppet/provider/package/msi.rb +7 -1
  75. data/lib/puppet/provider/package/openbsd.rb +13 -16
  76. data/lib/puppet/provider/package/pacman.rb +1 -1
  77. data/lib/puppet/provider/package/pip.rb +3 -0
  78. data/lib/puppet/provider/package/pkg.rb +1 -1
  79. data/lib/puppet/provider/package/pkgdmg.rb +1 -1
  80. data/lib/puppet/provider/package/pkgutil.rb +1 -1
  81. data/lib/puppet/provider/package/portage.rb +2 -2
  82. data/lib/puppet/provider/package/rpm.rb +1 -1
  83. data/lib/puppet/provider/package/sun.rb +1 -1
  84. data/lib/puppet/provider/package/zypper.rb +35 -3
  85. data/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +6 -2
  86. data/lib/puppet/provider/selmodule/semodule.rb +2 -2
  87. data/lib/puppet/provider/service/base.rb +1 -1
  88. data/lib/puppet/provider/service/launchd.rb +4 -0
  89. data/lib/puppet/provider/service/src.rb +2 -2
  90. data/lib/puppet/provider/service/upstart.rb +1 -1
  91. data/lib/puppet/provider/service/windows.rb +5 -4
  92. data/lib/puppet/provider/user/aix.rb +3 -3
  93. data/lib/puppet/provider/user/pw.rb +6 -0
  94. data/lib/puppet/provider/user/windows_adsi.rb +1 -1
  95. data/lib/puppet/resource/catalog.rb +6 -6
  96. data/lib/puppet/resource/type.rb +2 -0
  97. data/lib/puppet/ssl/certificate_request.rb +0 -70
  98. data/lib/puppet/transaction.rb +1 -1
  99. data/lib/puppet/transaction/report.rb +3 -2
  100. data/lib/puppet/type.rb +1 -1
  101. data/lib/puppet/type/cron.rb +5 -2
  102. data/lib/puppet/type/exec.rb +8 -0
  103. data/lib/puppet/type/file.rb +27 -18
  104. data/lib/puppet/type/file/checksum.rb +2 -2
  105. data/lib/puppet/type/file/content.rb +14 -9
  106. data/lib/puppet/type/file/ensure.rb +5 -4
  107. data/lib/puppet/type/file/group.rb +10 -2
  108. data/lib/puppet/type/file/mode.rb +46 -18
  109. data/lib/puppet/type/file/owner.rb +10 -2
  110. data/lib/puppet/type/file/source.rb +27 -40
  111. data/lib/puppet/type/file/target.rb +6 -6
  112. data/lib/puppet/type/group.rb +13 -9
  113. data/lib/puppet/type/k5login.rb +1 -1
  114. data/lib/puppet/type/package.rb +24 -8
  115. data/lib/puppet/type/scheduled_task.rb +77 -131
  116. data/lib/puppet/type/service.rb +22 -8
  117. data/lib/puppet/type/user.rb +29 -9
  118. data/lib/puppet/util.rb +24 -33
  119. data/lib/puppet/util/colors.rb +98 -0
  120. data/lib/puppet/util/diff.rb +3 -1
  121. data/lib/puppet/util/log.rb +5 -1
  122. data/lib/puppet/util/log/destinations.rb +37 -44
  123. data/lib/puppet/util/monkey_patches.rb +32 -0
  124. data/lib/puppet/util/pidlock.rb +70 -21
  125. data/lib/puppet/util/rdoc/parser.rb +4 -2
  126. data/lib/puppet/util/selinux.rb +1 -1
  127. data/lib/puppet/util/suidmanager.rb +2 -12
  128. data/lib/puppet/util/windows.rb +2 -0
  129. data/lib/puppet/util/windows/process.rb +33 -0
  130. data/lib/puppet/util/windows/security.rb +6 -4
  131. data/lib/puppet/util/windows/user.rb +44 -0
  132. data/lib/semver.rb +55 -4
  133. data/spec/fixtures/unit/provider/package/openbsd/pkginfo.detail +19 -0
  134. data/spec/fixtures/unit/provider/package/openbsd/pkginfo.list +10 -0
  135. data/spec/fixtures/unit/provider/package/openbsd/pkginfo.query +1 -0
  136. data/spec/fixtures/unit/provider/package/zypper/zypper-list-updates-SLES11sp1.out +369 -0
  137. data/spec/integration/defaults_spec.rb +10 -0
  138. data/spec/integration/indirector/direct_file_server_spec.rb +1 -1
  139. data/spec/integration/module_tool_spec.rb +10 -12
  140. data/spec/integration/parser/compiler_spec.rb +147 -0
  141. data/spec/integration/type/file_spec.rb +1 -1
  142. data/spec/integration/util/windows/user_spec.rb +59 -0
  143. data/spec/lib/puppet/face/basetest.rb +5 -0
  144. data/spec/lib/puppet_spec/modules.rb +26 -0
  145. data/spec/spec_helper.rb +25 -0
  146. data/spec/unit/agent/locker_spec.rb +12 -0
  147. data/spec/unit/agent_backward_compatibility_spec.rb +152 -0
  148. data/spec/unit/agent_spec.rb +28 -8
  149. data/spec/unit/application/agent_spec.rb +4 -36
  150. data/spec/unit/application/device_spec.rb +55 -10
  151. data/spec/unit/application/face_base_spec.rb +32 -10
  152. data/spec/unit/application/filebucket_spec.rb +5 -0
  153. data/spec/unit/application/kick_spec.rb +6 -0
  154. data/spec/unit/application_spec.rb +8 -1
  155. data/spec/unit/configurer/downloader_spec.rb +4 -5
  156. data/spec/unit/face/ca_spec.rb +15 -4
  157. data/spec/unit/file_bucket/dipper_spec.rb +1 -1
  158. data/spec/unit/file_serving/base_spec.rb +60 -42
  159. data/spec/unit/file_serving/configuration/parser_spec.rb +5 -3
  160. data/spec/unit/file_serving/content_spec.rb +26 -27
  161. data/spec/unit/file_serving/metadata_spec.rb +22 -21
  162. data/spec/unit/forge/repository_spec.rb +86 -0
  163. data/spec/unit/forge_spec.rb +114 -0
  164. data/spec/unit/indirector/exec_spec.rb +8 -6
  165. data/spec/unit/indirector/facts/inventory_active_record_spec.rb +0 -1
  166. data/spec/unit/indirector/file_bucket_file/file_spec.rb +1 -1
  167. data/spec/unit/indirector/node/exec_spec.rb +1 -1
  168. data/spec/unit/indirector/resource/active_record_spec.rb +0 -4
  169. data/spec/unit/interface/action_builder_spec.rb +7 -5
  170. data/spec/unit/module_spec.rb +228 -9
  171. data/spec/unit/module_tool/application_spec.rb +3 -3
  172. data/spec/unit/module_tool/uninstaller_spec.rb +107 -27
  173. data/spec/unit/module_tool_spec.rb +0 -33
  174. data/spec/unit/network/authconfig_spec.rb +22 -21
  175. data/spec/unit/network/http/webrick_spec.rb +13 -9
  176. data/spec/unit/node/environment_spec.rb +159 -66
  177. data/spec/unit/parser/collector_spec.rb +16 -8
  178. data/spec/unit/parser/functions/generate_spec.rb +60 -18
  179. data/spec/unit/parser/resource_spec.rb +44 -0
  180. data/spec/unit/provider/augeas/augeas_spec.rb +160 -179
  181. data/spec/unit/provider/confine/feature_spec.rb +3 -5
  182. data/spec/unit/provider/package/dpkg_spec.rb +4 -2
  183. data/spec/unit/provider/package/gem_spec.rb +59 -43
  184. data/spec/unit/provider/package/openbsd_spec.rb +114 -0
  185. data/spec/unit/provider/package/pacman_spec.rb +1 -1
  186. data/spec/unit/provider/package/pip_spec.rb +10 -4
  187. data/spec/unit/provider/package/zypper_spec.rb +56 -14
  188. data/spec/unit/provider/selmodule_spec.rb +3 -3
  189. data/spec/unit/provider/service/launchd_spec.rb +22 -21
  190. data/spec/unit/provider/service/{upstart.rb → upstart_spec.rb} +7 -3
  191. data/spec/unit/provider/user/pw_spec.rb +19 -0
  192. data/spec/unit/resource/catalog_spec.rb +3 -3
  193. data/spec/unit/semver_spec.rb +117 -24
  194. data/spec/unit/transaction/report_spec.rb +11 -1
  195. data/spec/unit/type/cron_spec.rb +200 -213
  196. data/spec/unit/type/exec_spec.rb +7 -0
  197. data/spec/unit/type/file/content_spec.rb +2 -2
  198. data/spec/unit/type/file_spec.rb +12 -9
  199. data/spec/unit/type/package_spec.rb +25 -0
  200. data/spec/unit/type/schedule_spec.rb +31 -31
  201. data/spec/unit/util/diff_spec.rb +30 -0
  202. data/spec/unit/util/execution_stub_spec.rb +1 -2
  203. data/spec/unit/util/log/destinations_spec.rb +51 -0
  204. data/spec/unit/util/log_spec.rb +17 -1
  205. data/spec/unit/util/monkey_patches_spec.rb +119 -0
  206. data/spec/unit/util/rdoc/parser_spec.rb +25 -1
  207. data/spec/unit/util/selinux_spec.rb +2 -2
  208. data/spec/unit/util/suidmanager_spec.rb +6 -51
  209. data/spec/unit/util_spec.rb +82 -24
  210. data/test/lib/puppettest/certificates.rb +16 -0
  211. data/test/lib/puppettest/servertest.rb +4 -0
  212. data/test/util/pidlock.rb +125 -0
  213. metadata +23 -14
  214. data/ext/puppetstoredconfigclean.rb +0 -103
  215. data/lib/puppet/agent/disabler.rb +0 -27
  216. data/lib/puppet/util/anonymous_filelock.rb +0 -36
  217. data/spec/unit/agent/disabler_spec.rb +0 -60
  218. data/spec/unit/module_tool/repository_spec.rb +0 -52
  219. data/spec/unit/util/anonymous_filelock_spec.rb +0 -78
  220. data/spec/unit/util/pidlock_spec.rb +0 -208
@@ -17,6 +17,10 @@ module PuppetTest::Certificates
17
17
  end
18
18
 
19
19
  def mkCA
20
+ # The defaults make tests that consume this very slow.
21
+ Puppet[:req_bits] = 512
22
+ Puppet[:keylength] = 512
23
+
20
24
  ca = nil
21
25
  assert_nothing_raised {
22
26
  ca = Puppet::SSLCertificates::CA.new
@@ -26,6 +30,10 @@ module PuppetTest::Certificates
26
30
  end
27
31
 
28
32
  def mkStore(ca)
33
+ # The defaults make tests that consume this very slow.
34
+ Puppet[:req_bits] = 512
35
+ Puppet[:keylength] = 512
36
+
29
37
  store = OpenSSL::X509::Store.new
30
38
  store.purpose = OpenSSL::X509::PURPOSE_SSL_CLIENT
31
39
  store.flags = OpenSSL::X509::V_FLAG_CRL_CHECK
@@ -35,6 +43,10 @@ module PuppetTest::Certificates
35
43
  end
36
44
 
37
45
  def mkcert(hostname)
46
+ # The defaults make tests that consume this very slow.
47
+ Puppet[:req_bits] = 512
48
+ Puppet[:keylength] = 512
49
+
38
50
  cert = nil
39
51
  assert_nothing_raised {
40
52
  cert = Puppet::SSLCertificates::Certificate.new(:name => hostname)
@@ -45,6 +57,10 @@ module PuppetTest::Certificates
45
57
  end
46
58
 
47
59
  def mksignedcert(ca = nil, hostname = nil)
60
+ # The defaults make tests that consume this very slow.
61
+ Puppet[:req_bits] = 512
62
+ Puppet[:keylength] = 512
63
+
48
64
  ca ||= mkCA()
49
65
  hostname ||= "ttltest.example.com"
50
66
 
@@ -31,6 +31,10 @@ module PuppetTest::ServerTest
31
31
 
32
32
  # create a server, forked into the background
33
33
  def mkserver(handlers = nil)
34
+ # The defaults make for very slow tests.
35
+ Puppet[:req_bits] = 512
36
+ Puppet[:keylength] = 512
37
+
34
38
  Puppet[:name] = "puppetmasterd"
35
39
  # our default handlers
36
40
  unless handlers
@@ -0,0 +1,125 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/puppettest')
2
+
3
+ require 'puppet/util/pidlock'
4
+ require 'fileutils'
5
+
6
+ # This is *fucked* *up*
7
+ Puppet.debug = false
8
+
9
+ class TestPuppetUtilPidlock < Test::Unit::TestCase
10
+ include PuppetTest
11
+
12
+ def setup
13
+ super
14
+ @workdir = tstdir
15
+ end
16
+
17
+ def teardown
18
+ super
19
+ FileUtils.rm_rf(@workdir)
20
+ end
21
+
22
+ def test_00_basic_create
23
+ l = nil
24
+ assert_nothing_raised { l = Puppet::Util::Pidlock.new(@workdir + '/nothingmuch') }
25
+
26
+ assert_equal Puppet::Util::Pidlock, l.class
27
+
28
+ assert_equal @workdir + '/nothingmuch', l.lockfile
29
+ end
30
+
31
+ def test_10_uncontended_lock
32
+ l = Puppet::Util::Pidlock.new(@workdir + '/test_lock')
33
+
34
+ assert !l.locked?
35
+ assert !l.mine?
36
+ assert l.lock
37
+ assert l.locked?
38
+ assert l.mine?
39
+ assert !l.anonymous?
40
+ # It's OK to call lock multiple times
41
+ assert l.lock
42
+ assert l.unlock
43
+ assert !l.locked?
44
+ assert !l.mine?
45
+ end
46
+
47
+ def test_20_someone_elses_lock
48
+ childpid = nil
49
+ l = Puppet::Util::Pidlock.new(@workdir + '/someone_elses_lock')
50
+
51
+ # First, we need a PID that's guaranteed to be (a) used, (b) someone
52
+ # else's, and (c) around for the life of this test.
53
+ childpid = fork { loop do; sleep 10; end }
54
+
55
+ File.open(l.lockfile, 'w') { |fd| fd.write(childpid) }
56
+
57
+ assert l.locked?
58
+ assert !l.mine?
59
+ assert !l.lock
60
+ assert l.locked?
61
+ assert !l.mine?
62
+ assert !l.unlock
63
+ assert l.locked?
64
+ assert !l.mine?
65
+ ensure
66
+ Process.kill("KILL", childpid) unless childpid.nil?
67
+ end
68
+
69
+ def test_30_stale_lock
70
+ # This is a bit hard to guarantee, but we need a PID that is definitely
71
+ # unused, and will stay so for the the life of this test. Our best
72
+ # bet is to create a process, get it's PID, let it die, and *then*
73
+ # lock on it.
74
+ childpid = fork { exit }
75
+
76
+ # Now we can't continue until we're sure that the PID is dead
77
+ Process.wait(childpid)
78
+
79
+ l = Puppet::Util::Pidlock.new(@workdir + '/stale_lock')
80
+
81
+ # locked? should clear the lockfile
82
+ File.open(l.lockfile, 'w') { |fd| fd.write(childpid) }
83
+ assert File.exists?(l.lockfile)
84
+ assert !l.locked?
85
+ assert !File.exists?(l.lockfile)
86
+
87
+ # lock should replace the lockfile with our own
88
+ File.open(l.lockfile, 'w') { |fd| fd.write(childpid) }
89
+ assert File.exists?(l.lockfile)
90
+ assert l.lock
91
+ assert l.locked?
92
+ assert l.mine?
93
+
94
+ # unlock should fail, but should clear the stale lockfile.
95
+ File.open(l.lockfile, 'w') { |fd| fd.write(childpid) }
96
+ assert File.exists?(l.lockfile)
97
+ assert !l.unlock
98
+ assert !File.exists?(l.lockfile)
99
+ end
100
+
101
+ def test_40_not_locked_at_all
102
+ l = Puppet::Util::Pidlock.new(@workdir + '/not_locked')
103
+
104
+ assert !l.locked?
105
+ # We can't unlock if we don't hold the lock
106
+ assert !l.unlock
107
+ end
108
+
109
+ def test_50_anonymous_lock
110
+ l = Puppet::Util::Pidlock.new(@workdir + '/anonymous_lock')
111
+
112
+ assert !l.locked?
113
+ assert l.lock(:anonymous => true)
114
+ assert l.locked?
115
+ assert l.anonymous?
116
+ assert !l.mine?
117
+ assert "", File.read(l.lockfile)
118
+ assert !l.unlock
119
+ assert l.locked?
120
+ assert l.anonymous?
121
+ assert l.unlock(:anonymous => true)
122
+ assert !File.exists?(l.lockfile)
123
+ end
124
+ end
125
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 7
9
- - 11
10
- version: 2.7.11
9
+ - 12
10
+ version: 2.7.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Puppet Labs
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-23 00:00:00 Z
18
+ date: 2012-03-12 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: facter
@@ -63,7 +63,6 @@ files:
63
63
  - bin/puppet
64
64
  - bin/puppetdoc
65
65
  - bin/ralsh
66
- - lib/puppet/agent/disabler.rb
67
66
  - lib/puppet/agent/locker.rb
68
67
  - lib/puppet/agent.rb
69
68
  - lib/puppet/application/agent.rb
@@ -196,6 +195,9 @@ files:
196
195
  - lib/puppet/file_serving/mount.rb
197
196
  - lib/puppet/file_serving/terminus_helper.rb
198
197
  - lib/puppet/file_serving.rb
198
+ - lib/puppet/forge/cache.rb
199
+ - lib/puppet/forge/repository.rb
200
+ - lib/puppet/forge.rb
199
201
  - lib/puppet/indirector/active_record.rb
200
202
  - lib/puppet/indirector/catalog/active_record.rb
201
203
  - lib/puppet/indirector/catalog/compiler.rb
@@ -311,13 +313,11 @@ files:
311
313
  - lib/puppet/module_tool/applications/uninstaller.rb
312
314
  - lib/puppet/module_tool/applications/unpacker.rb
313
315
  - lib/puppet/module_tool/applications.rb
314
- - lib/puppet/module_tool/cache.rb
315
316
  - lib/puppet/module_tool/checksums.rb
316
317
  - lib/puppet/module_tool/contents_description.rb
317
318
  - lib/puppet/module_tool/dependency.rb
318
319
  - lib/puppet/module_tool/metadata.rb
319
320
  - lib/puppet/module_tool/modulefile.rb
320
- - lib/puppet/module_tool/repository.rb
321
321
  - lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb
322
322
  - lib/puppet/module_tool/skeleton/templates/generator/metadata.json
323
323
  - lib/puppet/module_tool/skeleton/templates/generator/Modulefile.erb
@@ -689,13 +689,13 @@ files:
689
689
  - lib/puppet/type/zpool.rb
690
690
  - lib/puppet/type.rb
691
691
  - lib/puppet/util/adsi.rb
692
- - lib/puppet/util/anonymous_filelock.rb
693
692
  - lib/puppet/util/autoload/file_cache.rb
694
693
  - lib/puppet/util/autoload.rb
695
694
  - lib/puppet/util/backups.rb
696
695
  - lib/puppet/util/cacher.rb
697
696
  - lib/puppet/util/checksums.rb
698
697
  - lib/puppet/util/classgen.rb
698
+ - lib/puppet/util/colors.rb
699
699
  - lib/puppet/util/command_line.rb
700
700
  - lib/puppet/util/constant_inflector.rb
701
701
  - lib/puppet/util/diff.rb
@@ -778,7 +778,9 @@ files:
778
778
  - lib/puppet/util/user_attr.rb
779
779
  - lib/puppet/util/warnings.rb
780
780
  - lib/puppet/util/windows/error.rb
781
+ - lib/puppet/util/windows/process.rb
781
782
  - lib/puppet/util/windows/security.rb
783
+ - lib/puppet/util/windows/user.rb
782
784
  - lib/puppet/util/windows.rb
783
785
  - lib/puppet/util/zaml.rb
784
786
  - lib/puppet/util.rb
@@ -915,7 +917,6 @@ files:
915
917
  - ext/puppet-test
916
918
  - ext/puppetlisten/puppetlisten.rb
917
919
  - ext/puppetlisten/puppetrun.rb
918
- - ext/puppetstoredconfigclean.rb
919
920
  - ext/pure_ruby_dsl/dsl_test.rb
920
921
  - ext/rack/files/apache2.conf
921
922
  - ext/rack/files/config.ru
@@ -1127,6 +1128,7 @@ files:
1127
1128
  - test/util/log.rb
1128
1129
  - test/util/metrics.rb
1129
1130
  - test/util/package.rb
1131
+ - test/util/pidlock.rb
1130
1132
  - test/util/settings.rb
1131
1133
  - test/util/storage.rb
1132
1134
  - test/util/subclass_loader.rb
@@ -1211,6 +1213,10 @@ files:
1211
1213
  - spec/fixtures/unit/provider/mount/parsed/openbsd.mount
1212
1214
  - spec/fixtures/unit/provider/mount/parsed/solaris.fstab
1213
1215
  - spec/fixtures/unit/provider/mount/parsed/solaris.mount
1216
+ - spec/fixtures/unit/provider/package/openbsd/pkginfo.detail
1217
+ - spec/fixtures/unit/provider/package/openbsd/pkginfo.list
1218
+ - spec/fixtures/unit/provider/package/openbsd/pkginfo.query
1219
+ - spec/fixtures/unit/provider/package/zypper/zypper-list-updates-SLES11sp1.out
1214
1220
  - spec/fixtures/unit/provider/ssh_authorized_key/parsed/authorized_keys
1215
1221
  - spec/fixtures/unit/provider/ssh_authorized_key/parsed/authorized_keys1
1216
1222
  - spec/fixtures/unit/provider/ssh_authorized_key/parsed/authorized_keys2
@@ -1276,6 +1282,7 @@ files:
1276
1282
  - spec/integration/util/rdoc/parser_spec.rb
1277
1283
  - spec/integration/util/settings_spec.rb
1278
1284
  - spec/integration/util/windows/security_spec.rb
1285
+ - spec/integration/util/windows/user_spec.rb
1279
1286
  - spec/integration/util_spec.rb
1280
1287
  - spec/lib/matchers/json.rb
1281
1288
  - spec/lib/puppet/face/1.0.0/huzzah.rb
@@ -1286,6 +1293,7 @@ files:
1286
1293
  - spec/lib/puppet_spec/files.rb
1287
1294
  - spec/lib/puppet_spec/fixtures.rb
1288
1295
  - spec/lib/puppet_spec/matchers.rb
1296
+ - spec/lib/puppet_spec/modules.rb
1289
1297
  - spec/lib/puppet_spec/verbose.rb
1290
1298
  - spec/monkey_patches/alias_should_to_must.rb
1291
1299
  - spec/monkey_patches/publicize_methods.rb
@@ -1300,8 +1308,8 @@ files:
1300
1308
  - spec/shared_behaviours/things_that_declare_options.rb
1301
1309
  - spec/spec.opts
1302
1310
  - spec/spec_helper.rb
1303
- - spec/unit/agent/disabler_spec.rb
1304
1311
  - spec/unit/agent/locker_spec.rb
1312
+ - spec/unit/agent_backward_compatibility_spec.rb
1305
1313
  - spec/unit/agent_spec.rb
1306
1314
  - spec/unit/application/agent_spec.rb
1307
1315
  - spec/unit/application/apply_spec.rb
@@ -1366,6 +1374,8 @@ files:
1366
1374
  - spec/unit/file_serving/mount/plugins_spec.rb
1367
1375
  - spec/unit/file_serving/mount_spec.rb
1368
1376
  - spec/unit/file_serving/terminus_helper_spec.rb
1377
+ - spec/unit/forge/repository_spec.rb
1378
+ - spec/unit/forge_spec.rb
1369
1379
  - spec/unit/indirector/active_record_spec.rb
1370
1380
  - spec/unit/indirector/catalog/active_record_spec.rb
1371
1381
  - spec/unit/indirector/catalog/compiler_spec.rb
@@ -1459,7 +1469,6 @@ files:
1459
1469
  - spec/unit/module_spec.rb
1460
1470
  - spec/unit/module_tool/application_spec.rb
1461
1471
  - spec/unit/module_tool/metadata_spec.rb
1462
- - spec/unit/module_tool/repository_spec.rb
1463
1472
  - spec/unit/module_tool/uninstaller_spec.rb
1464
1473
  - spec/unit/module_tool_spec.rb
1465
1474
  - spec/unit/network/authconfig_spec.rb
@@ -1593,6 +1602,7 @@ files:
1593
1602
  - spec/unit/provider/package/macports_spec.rb
1594
1603
  - spec/unit/provider/package/msi_spec.rb
1595
1604
  - spec/unit/provider/package/nim_spec.rb
1605
+ - spec/unit/provider/package/openbsd_spec.rb
1596
1606
  - spec/unit/provider/package/pacman_spec.rb
1597
1607
  - spec/unit/provider/package/pip_spec.rb
1598
1608
  - spec/unit/provider/package/pkg_spec.rb
@@ -1615,7 +1625,7 @@ files:
1615
1625
  - spec/unit/provider/service/smf_spec.rb
1616
1626
  - spec/unit/provider/service/src_spec.rb
1617
1627
  - spec/unit/provider/service/systemd_spec.rb
1618
- - spec/unit/provider/service/upstart.rb
1628
+ - spec/unit/provider/service/upstart_spec.rb
1619
1629
  - spec/unit/provider/service/windows_spec.rb
1620
1630
  - spec/unit/provider/ssh_authorized_key/parsed_spec.rb
1621
1631
  - spec/unit/provider/sshkey/parsed_spec.rb
@@ -1717,7 +1727,6 @@ files:
1717
1727
  - spec/unit/type/zpool_spec.rb
1718
1728
  - spec/unit/type_spec.rb
1719
1729
  - spec/unit/util/adsi_spec.rb
1720
- - spec/unit/util/anonymous_filelock_spec.rb
1721
1730
  - spec/unit/util/autoload/file_cache_spec.rb
1722
1731
  - spec/unit/util/autoload_spec.rb
1723
1732
  - spec/unit/util/backups_spec.rb
@@ -1726,6 +1735,7 @@ files:
1726
1735
  - spec/unit/util/checksums_spec.rb
1727
1736
  - spec/unit/util/command_line_spec.rb
1728
1737
  - spec/unit/util/constant_inflector_spec.rb
1738
+ - spec/unit/util/diff_spec.rb
1729
1739
  - spec/unit/util/errors_spec.rb
1730
1740
  - spec/unit/util/execution_spec.rb
1731
1741
  - spec/unit/util/execution_stub_spec.rb
@@ -1760,7 +1770,6 @@ files:
1760
1770
  - spec/unit/util/network_device/transport/telnet_spec.rb
1761
1771
  - spec/unit/util/network_device_spec.rb
1762
1772
  - spec/unit/util/package_spec.rb
1763
- - spec/unit/util/pidlock_spec.rb
1764
1773
  - spec/unit/util/posix_spec.rb
1765
1774
  - spec/unit/util/pson_spec.rb
1766
1775
  - spec/unit/util/queue/stomp_spec.rb
@@ -1,103 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # Script to clean up stored configs for (a) given host(s)
4
- #
5
- # Credits:
6
- # Script was taken from http://reductivelabs.com/trac/puppet/attachment/wiki/UsingStoredConfiguration/kill_node_in_storedconfigs_db.rb (link no longer valid),
7
- # which haven been initially posted by James Turnbull
8
- # duritong adapted and improved the script a bit.
9
-
10
- require 'getoptlong'
11
- require 'puppet'
12
- require 'puppet/rails'
13
-
14
- config = Puppet[:config]
15
-
16
- def printusage(error_code)
17
- puts "Usage: #{$0} [ list of hostnames as stored in hosts table ]"
18
- puts "\n Options:"
19
- puts "--config <puppet config file>"
20
- exit(error_code)
21
- end
22
-
23
- opts = GetoptLong.new(
24
- [ "--config", "-c", GetoptLong::REQUIRED_ARGUMENT ],
25
- [ "--help", "-h", GetoptLong::NO_ARGUMENT ],
26
- [ "--usage", "-u", GetoptLong::NO_ARGUMENT ],
27
- [ "--version", "-v", GetoptLong::NO_ARGUMENT ]
28
- )
29
-
30
- begin
31
- opts.each do |opt, arg|
32
- case opt
33
- when "--config"
34
- config = arg
35
-
36
- when "--help"
37
- printusage(0)
38
-
39
- when "--usage"
40
- printusage(0)
41
-
42
- when "--version"
43
- puts "#{Puppet.version}"
44
- exit
45
- end
46
- end
47
- rescue GetoptLong::InvalidOption => detail
48
- $stderr.puts "Try '#{$0} --help'"
49
- exit(1)
50
- end
51
-
52
- printusage(1) unless ARGV.size > 0
53
-
54
- if config != Puppet[:config]
55
- Puppet[:config]=config
56
- Puppet.settings.parse
57
- end
58
-
59
- master = Puppet.settings.instance_variable_get(:@values)[:master]
60
- main = Puppet.settings.instance_variable_get(:@values)[:main]
61
- db_config = main.merge(master)
62
-
63
- # get default values
64
- [:master, :main, :rails].each do |section|
65
- Puppet.settings.params(section).each do |key|
66
- db_config[key] ||= Puppet[key]
67
- end
68
- end
69
-
70
- adapter = db_config[:dbadapter]
71
- args = {:adapter => adapter, :log_level => db_config[:rails_loglevel]}
72
-
73
- case adapter
74
- when "sqlite3"
75
- args[:dbfile] = db_config[:dblocation]
76
- when "mysql", "mysql2", "postgresql"
77
- args[:host] = db_config[:dbserver] unless db_config[:dbserver].to_s.empty?
78
- args[:username] = db_config[:dbuser] unless db_config[:dbuser].to_s.empty?
79
- args[:password] = db_config[:dbpassword] unless db_config[:dbpassword].to_s.empty?
80
- args[:database] = db_config[:dbname] unless db_config[:dbname].to_s.empty?
81
- args[:port] = db_config[:dbport] unless db_config[:dbport].to_s.empty?
82
- socket = db_config[:dbsocket]
83
- args[:socket] = socket unless socket.to_s.empty?
84
- else
85
- raise ArgumentError, "Invalid db adapter #{adapter}"
86
- end
87
-
88
- args[:database] = "puppet" unless not args[:database].to_s.empty?
89
-
90
- ActiveRecord::Base.establish_connection(args)
91
-
92
- ARGV.each do |hostname|
93
- if @host = Puppet::Rails::Host.find_by_name(hostname.strip)
94
- print "Removing #{hostname} from storedconfig..."
95
- $stdout.flush
96
- @host.destroy
97
- puts "done."
98
- else
99
- puts "Error: Can't find host #{hostname}."
100
- end
101
- end
102
-
103
- exit 0