puppet 5.5.8-x86-mingw32 → 5.5.10-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +14 -14
  3. data/Rakefile +3 -1
  4. data/ext/solaris/smf/svc-puppetd +8 -1
  5. data/ext/solaris/smf/svc-puppetmasterd +8 -1
  6. data/lib/puppet/application/device.rb +45 -29
  7. data/lib/puppet/face/config.rb +1 -1
  8. data/lib/puppet/forge.rb +4 -1
  9. data/lib/puppet/pops/evaluator/collectors/abstract_collector.rb +3 -1
  10. data/lib/puppet/pops/types/p_timespan_type.rb +2 -2
  11. data/lib/puppet/pops/types/string_converter.rb +11 -2
  12. data/lib/puppet/provider/cron/crontab.rb +1 -1
  13. data/lib/puppet/provider/package/windows/exe_package.rb +13 -0
  14. data/lib/puppet/provider/package/windows/msi_package.rb +8 -0
  15. data/lib/puppet/provider/package/windows/package.rb +9 -1
  16. data/lib/puppet/provider/parsedfile.rb +25 -4
  17. data/lib/puppet/provider/service/smf.rb +54 -0
  18. data/lib/puppet/transaction.rb +4 -1
  19. data/lib/puppet/transaction/event_manager.rb +13 -1
  20. data/lib/puppet/transaction/resource_harness.rb +3 -1
  21. data/lib/puppet/util/command_line.rb +2 -3
  22. data/lib/puppet/util/filetype.rb +36 -4
  23. data/lib/puppet/util/selinux.rb +1 -1
  24. data/lib/puppet/util/windows/api_types.rb +1 -1
  25. data/lib/puppet/util/windows/registry.rb +29 -5
  26. data/lib/puppet/util/windows/service.rb +106 -99
  27. data/lib/puppet/version.rb +1 -1
  28. data/locales/puppet.pot +97 -69
  29. data/man/man5/puppet.conf.5 +2 -2
  30. data/man/man8/puppet-agent.8 +1 -1
  31. data/man/man8/puppet-apply.8 +1 -1
  32. data/man/man8/puppet-ca.8 +1 -1
  33. data/man/man8/puppet-catalog.8 +1 -1
  34. data/man/man8/puppet-cert.8 +1 -1
  35. data/man/man8/puppet-certificate.8 +1 -1
  36. data/man/man8/puppet-certificate_request.8 +1 -1
  37. data/man/man8/puppet-certificate_revocation_list.8 +1 -1
  38. data/man/man8/puppet-config.8 +2 -2
  39. data/man/man8/puppet-describe.8 +1 -1
  40. data/man/man8/puppet-device.8 +23 -19
  41. data/man/man8/puppet-doc.8 +1 -1
  42. data/man/man8/puppet-epp.8 +1 -1
  43. data/man/man8/puppet-facts.8 +1 -1
  44. data/man/man8/puppet-filebucket.8 +1 -1
  45. data/man/man8/puppet-generate.8 +1 -1
  46. data/man/man8/puppet-help.8 +1 -1
  47. data/man/man8/puppet-key.8 +1 -1
  48. data/man/man8/puppet-lookup.8 +1 -1
  49. data/man/man8/puppet-man.8 +1 -1
  50. data/man/man8/puppet-master.8 +1 -1
  51. data/man/man8/puppet-module.8 +1 -1
  52. data/man/man8/puppet-node.8 +1 -1
  53. data/man/man8/puppet-parser.8 +1 -1
  54. data/man/man8/puppet-plugin.8 +1 -1
  55. data/man/man8/puppet-report.8 +1 -1
  56. data/man/man8/puppet-resource.8 +1 -1
  57. data/man/man8/puppet-script.8 +1 -1
  58. data/man/man8/puppet-status.8 +1 -1
  59. data/man/man8/puppet.8 +2 -2
  60. data/spec/fixtures/unit/provider/service/smf/svcs_fmri.out +6 -0
  61. data/spec/fixtures/unit/provider/service/smf/svcs_multiple_fmris.out +13 -0
  62. data/spec/integration/ssl/key_spec.rb +0 -4
  63. data/spec/integration/transaction_spec.rb +1 -1
  64. data/spec/integration/util/windows/registry_spec.rb +39 -0
  65. data/spec/unit/application/device_spec.rb +4 -1
  66. data/spec/unit/application/lookup_spec.rb +10 -9
  67. data/spec/unit/forge/forge_spec.rb +4 -2
  68. data/spec/unit/indirector/yaml_spec.rb +1 -1
  69. data/spec/unit/pops/loaders/loader_spec.rb +6 -7
  70. data/spec/unit/pops/types/p_timespan_type_spec.rb +22 -0
  71. data/spec/unit/pops/types/p_timestamp_type_spec.rb +19 -0
  72. data/spec/unit/pops/types/string_converter_spec.rb +20 -0
  73. data/spec/unit/provider/cron/parsed_spec.rb +4 -3
  74. data/spec/unit/provider/group/ldap_spec.rb +22 -25
  75. data/spec/unit/provider/group/pw_spec.rb +7 -10
  76. data/spec/unit/provider/host/parsed_spec.rb +3 -17
  77. data/spec/unit/provider/nameservice/directoryservice_spec.rb +97 -103
  78. data/spec/unit/provider/package/aix_spec.rb +5 -8
  79. data/spec/unit/provider/package/apt_spec.rb +3 -6
  80. data/spec/unit/provider/package/dnf_spec.rb +29 -31
  81. data/spec/unit/provider/package/dpkg_spec.rb +18 -21
  82. data/spec/unit/provider/package/freebsd_spec.rb +4 -7
  83. data/spec/unit/provider/package/gem_spec.rb +41 -41
  84. data/spec/unit/provider/package/hpux_spec.rb +7 -10
  85. data/spec/unit/provider/package/macports_spec.rb +13 -15
  86. data/spec/unit/provider/package/nim_spec.rb +3 -10
  87. data/spec/unit/provider/package/openbsd_spec.rb +14 -17
  88. data/spec/unit/provider/package/pip3_spec.rb +3 -6
  89. data/spec/unit/provider/package/pip_spec.rb +44 -72
  90. data/spec/unit/provider/package/pkgin_spec.rb +13 -18
  91. data/spec/unit/provider/package/pkgng_spec.rb +21 -24
  92. data/spec/unit/provider/package/puppet_gem_spec.rb +6 -9
  93. data/spec/unit/provider/package/tdnf_spec.rb +9 -12
  94. data/spec/unit/provider/package/yum_spec.rb +29 -15
  95. data/spec/unit/provider/package/zypper_spec.rb +17 -19
  96. data/spec/unit/provider/service/bsd_spec.rb +8 -12
  97. data/spec/unit/provider/service/daemontools_spec.rb +12 -20
  98. data/spec/unit/provider/service/debian_spec.rb +8 -16
  99. data/spec/unit/provider/service/freebsd_spec.rb +2 -5
  100. data/spec/unit/provider/service/openbsd_spec.rb +12 -18
  101. data/spec/unit/provider/service/rcng_spec.rb +3 -7
  102. data/spec/unit/provider/service/redhat_spec.rb +21 -23
  103. data/spec/unit/provider/service/runit_spec.rb +9 -19
  104. data/spec/unit/provider/service/smf_spec.rb +82 -21
  105. data/spec/unit/provider/service/src_spec.rb +14 -23
  106. data/spec/unit/provider/user/hpux_spec.rb +2 -5
  107. data/spec/unit/provider/user/ldap_spec.rb +29 -32
  108. data/spec/unit/provider/user/pw_spec.rb +10 -13
  109. data/spec/unit/ssl/key_spec.rb +2 -4
  110. data/spec/unit/transaction/event_manager_spec.rb +12 -1
  111. data/spec/unit/transaction/resource_harness_spec.rb +18 -0
  112. data/spec/unit/transaction_spec.rb +25 -0
  113. data/spec/unit/util/filetype_spec.rb +13 -5
  114. data/spec/unit/util/logging_spec.rb +0 -41
  115. data/spec/unit/util/monkey_patches_spec.rb +18 -5
  116. data/spec/unit/util/selinux_spec.rb +4 -0
  117. metadata +6 -2
@@ -4,6 +4,7 @@ require 'matchers/include_in_order'
4
4
  require 'puppet_spec/compiler'
5
5
 
6
6
  require 'puppet/transaction'
7
+ require 'puppet/type/notify'
7
8
  require 'fileutils'
8
9
 
9
10
  describe Puppet::Transaction do
@@ -896,6 +897,30 @@ describe Puppet::Transaction do
896
897
  expect(transaction.report.resource_statuses['Notify[b]']).to be_skipped
897
898
  end
898
899
  end
900
+
901
+ describe "failed dependency is depended on multiple times" do
902
+ it "notifies the failed dependency once" do
903
+ command_string = File.expand_path('/my/command')
904
+ Puppet::Util::Execution.stubs(:execute).with([command_string]).raises(Puppet::ExecutionFailure, "Failed")
905
+
906
+ Puppet::Type::Notify.any_instance.expects(:send_log).with(:notice, "Dependency Exec[exec1] has failures: true")
907
+ Puppet::Type::Notify.any_instance.expects(:send_log).with(:notice, "Dependency Exec[exec2] has failures: true")
908
+ Puppet::Type::Notify.any_instance.expects(:send_log).with(:notice, "Dependency Exec[exec3] has failures: true")
909
+ Puppet::Type::Notify.any_instance.expects(:send_log).with(:notice, "Dependency Exec[exec4] has failures: true")
910
+ Puppet::Type::Notify.any_instance.expects(:send_log).with(:notice, "Dependency Exec[exec5] has failures: true")
911
+
912
+ Puppet::Type::Notify.any_instance.expects(:send_log).with(:warning, "Skipping because of failed dependencies").times(3)
913
+
914
+ apply_compiled_manifest(<<-MANIFEST)
915
+ exec { ['exec1', 'exec2', 'exec3', 'exec4', 'exec5']:
916
+ command => '#{command_string}'
917
+ } ->
918
+ notify { ['notify1', 'notify2', 'notify3']: }
919
+ MANIFEST
920
+
921
+ end
922
+ end
923
+
899
924
  end
900
925
 
901
926
  describe Puppet::Transaction, " when determining tags" do
@@ -107,6 +107,10 @@ describe Puppet::Util::FileType do
107
107
  end
108
108
 
109
109
  describe "#read" do
110
+ before(:each) do
111
+ Puppet::Util.stubs(:uid).with(uid).returns 9000
112
+ end
113
+
110
114
  it "should run crontab -l as the target user" do
111
115
  Puppet::Util::Execution.expects(:execute)
112
116
  .with(['crontab', '-l'], user_options)
@@ -115,7 +119,7 @@ describe Puppet::Util::FileType do
115
119
  end
116
120
 
117
121
  it "should not switch user if current user is the target user" do
118
- Puppet::Util.expects(:uid).with(uid).returns 9000
122
+ Puppet::Util.expects(:uid).with(uid).twice.returns 9000
119
123
  Puppet::Util::SUIDManager.expects(:uid).returns 9000
120
124
  Puppet::Util::Execution
121
125
  .expects(:execute).with(['crontab', '-l'], options)
@@ -128,11 +132,15 @@ describe Puppet::Util::FileType do
128
132
  expect(cron.read).to eq('')
129
133
  end
130
134
 
131
- it "should raise an error if the user is not authorized to use cron" do
135
+ it "should treat a nonexistent user's crontab as empty" do
136
+ Puppet::Util.expects(:uid).with(uid).returns nil
137
+
138
+ expect(cron.read).to eq('')
139
+ end
140
+
141
+ it "should return empty if the user is not authorized to use cron" do
132
142
  Puppet::Util::Execution.expects(:execute).with(['crontab', '-l'], user_options).raises(Puppet::ExecutionFailure, unauthorized_crontab)
133
- expect {
134
- cron.read
135
- }.to raise_error Puppet::Error, /User #{uid} not authorized to use cron/
143
+ expect(cron.read).to eq('')
136
144
  end
137
145
  end
138
146
 
@@ -289,21 +289,6 @@ original
289
289
  Facter.unstub(:debugging)
290
290
  end
291
291
 
292
- describe 'does not support debugging' do
293
- before :each do
294
- Facter.stubs(:respond_to?).with(:debugging).returns false
295
- Facter.stubs(:debugging).never
296
- end
297
-
298
- it 'does not enable Facter debugging for debug level' do
299
- Puppet::Util::Log.level = :debug
300
- end
301
-
302
- it 'does not enable Facter debugging non-debug level' do
303
- Puppet::Util::Log.level = :info
304
- end
305
- end
306
-
307
292
  describe 'does support debugging' do
308
293
  before :each do
309
294
  Facter.stubs(:respond_to?).with(:debugging).returns true
@@ -320,21 +305,6 @@ original
320
305
  end
321
306
  end
322
307
 
323
- describe 'does not support trace' do
324
- before :each do
325
- Facter.stubs(:respond_to?).with(:trace).returns false
326
- Facter.stubs(:trace).never
327
- end
328
-
329
- it 'does not enable Facter trace when enabled' do
330
- Puppet[:trace] = true
331
- end
332
-
333
- it 'does not enable Facter trace when disabled' do
334
- Puppet[:trace] = false
335
- end
336
- end
337
-
338
308
  describe 'does support trace' do
339
309
  before :each do
340
310
  Facter.stubs(:respond_to?).with(:trace).returns true
@@ -351,17 +321,6 @@ original
351
321
  end
352
322
  end
353
323
 
354
- describe 'does not support on_message' do
355
- before :each do
356
- Facter.stubs(:respond_to?).with(:on_message).returns false
357
- Facter.stubs(:on_message).never
358
- end
359
-
360
- it 'does not call Facter.on_message' do
361
- expect(Puppet::Util::Logging::setup_facter_logging!).to be_falsey
362
- end
363
- end
364
-
365
324
  describe 'does support on_message' do
366
325
  before :each do
367
326
  Facter.stubs(:respond_to?).with(:on_message).returns true
@@ -102,13 +102,26 @@ describe OpenSSL::X509::Store, :if => Puppet::Util::Platform.windows? do
102
102
  store.set_default_paths
103
103
  end
104
104
 
105
- it "warns when adding a certificate that already exists" do
106
- with_root_certs([cert])
107
- store.add_cert(cert)
105
+ # openssl 1.1.1 ignores duplicate certs
106
+ # https://github.com/openssl/openssl/commit/c0452248ea1a59a41023a4765ef7d9825e80a62b
107
+ if OpenSSL::OPENSSL_VERSION_NUMBER < 0x10101000
108
+ it "warns when adding a certificate that already exists" do
109
+ with_root_certs([cert])
110
+ store.add_cert(cert)
108
111
 
109
- store.expects(:warn).with('Failed to add /DC=com/DC=microsoft/CN=Microsoft Root Certificate Authority')
112
+ store.expects(:warn).with('Failed to add /DC=com/DC=microsoft/CN=Microsoft Root Certificate Authority')
110
113
 
111
- store.set_default_paths
114
+ store.set_default_paths
115
+ end
116
+ else
117
+ it "doesn't warn when adding a duplicate cert" do
118
+ with_root_certs([cert])
119
+ store.add_cert(cert)
120
+
121
+ store.expects(:warn).never
122
+
123
+ store.set_default_paths
124
+ end
112
125
  end
113
126
 
114
127
  it "raises when adding an invalid certificate" do
@@ -73,6 +73,10 @@ describe Puppet::Util::SELinux do
73
73
  expect(selinux_label_support?('/etc/puppetlabs/puppet/testfile')).to be_truthy
74
74
  end
75
75
 
76
+ it "should return true if tmpfs" do
77
+ expect(selinux_label_support?('/dev/shm/testfile')).to be_truthy
78
+ end
79
+
76
80
  it "should return false for a noncapable filesystem" do
77
81
  expect(selinux_label_support?('/mnt/nfs/testfile')).to be_falsey
78
82
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.8
4
+ version: 5.5.10
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-31 00:00:00.000000000 Z
11
+ date: 2019-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -1839,6 +1839,8 @@ files:
1839
1839
  - spec/fixtures/unit/provider/service/openrc/rcservice_list
1840
1840
  - spec/fixtures/unit/provider/service/openrc/rcstatus
1841
1841
  - spec/fixtures/unit/provider/service/smf/svcs.out
1842
+ - spec/fixtures/unit/provider/service/smf/svcs_fmri.out
1843
+ - spec/fixtures/unit/provider/service/smf/svcs_multiple_fmris.out
1842
1844
  - spec/fixtures/unit/provider/service/systemd/list_unit_files_services
1843
1845
  - spec/fixtures/unit/provider/ssh_authorized_key/parsed/authorized_keys
1844
1846
  - spec/fixtures/unit/provider/ssh_authorized_key/parsed/authorized_keys1
@@ -3148,6 +3150,8 @@ test_files:
3148
3150
  - spec/fixtures/unit/provider/service/openrc/rcservice_list
3149
3151
  - spec/fixtures/unit/provider/service/openrc/rcstatus
3150
3152
  - spec/fixtures/unit/provider/service/smf/svcs.out
3153
+ - spec/fixtures/unit/provider/service/smf/svcs_fmri.out
3154
+ - spec/fixtures/unit/provider/service/smf/svcs_multiple_fmris.out
3151
3155
  - spec/fixtures/unit/provider/service/systemd/list_unit_files_services
3152
3156
  - spec/fixtures/unit/provider/ssh_authorized_key/parsed/authorized_keys
3153
3157
  - spec/fixtures/unit/provider/ssh_authorized_key/parsed/authorized_keys1