puppet 7.1.0-universal-darwin → 7.3.0-universal-darwin

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 (118) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +15 -13
  3. data/lib/puppet/application/agent.rb +1 -0
  4. data/lib/puppet/application/apply.rb +3 -2
  5. data/lib/puppet/application/device.rb +1 -0
  6. data/lib/puppet/application/script.rb +1 -0
  7. data/lib/puppet/application.rb +10 -6
  8. data/lib/puppet/configurer.rb +16 -3
  9. data/lib/puppet/defaults.rb +5 -14
  10. data/lib/puppet/face/facts.rb +15 -1
  11. data/lib/puppet/file_serving/configuration/parser.rb +5 -2
  12. data/lib/puppet/module_tool/applications/installer.rb +48 -2
  13. data/lib/puppet/module_tool/errors/shared.rb +17 -2
  14. data/lib/puppet/network/formats.rb +67 -0
  15. data/lib/puppet/parser/ast/leaf.rb +3 -2
  16. data/lib/puppet/pops/evaluator/deferred_resolver.rb +5 -3
  17. data/lib/puppet/pops/model/ast_transformer.rb +1 -1
  18. data/lib/puppet/provider/package/apt.rb +4 -0
  19. data/lib/puppet/reference/configuration.rb +6 -5
  20. data/lib/puppet/settings/alias_setting.rb +37 -0
  21. data/lib/puppet/settings.rb +33 -28
  22. data/lib/puppet/util/autoload.rb +1 -8
  23. data/lib/puppet/util/posix.rb +1 -1
  24. data/lib/puppet/version.rb +1 -1
  25. data/locales/puppet.pot +157 -141
  26. data/man/man5/puppet.conf.5 +6 -6
  27. data/man/man8/puppet-agent.8 +2 -2
  28. data/man/man8/puppet-apply.8 +2 -2
  29. data/man/man8/puppet-catalog.8 +1 -1
  30. data/man/man8/puppet-config.8 +1 -1
  31. data/man/man8/puppet-describe.8 +1 -1
  32. data/man/man8/puppet-device.8 +2 -2
  33. data/man/man8/puppet-doc.8 +1 -1
  34. data/man/man8/puppet-epp.8 +1 -1
  35. data/man/man8/puppet-facts.8 +5 -2
  36. data/man/man8/puppet-filebucket.8 +1 -1
  37. data/man/man8/puppet-generate.8 +1 -1
  38. data/man/man8/puppet-help.8 +1 -1
  39. data/man/man8/puppet-lookup.8 +1 -1
  40. data/man/man8/puppet-module.8 +1 -1
  41. data/man/man8/puppet-node.8 +1 -1
  42. data/man/man8/puppet-parser.8 +1 -1
  43. data/man/man8/puppet-plugin.8 +1 -1
  44. data/man/man8/puppet-report.8 +1 -1
  45. data/man/man8/puppet-resource.8 +1 -1
  46. data/man/man8/puppet-script.8 +2 -2
  47. data/man/man8/puppet-ssl.8 +1 -1
  48. data/man/man8/puppet.8 +2 -2
  49. data/spec/fixtures/integration/application/agent/cached_deferred_catalog.json +91 -0
  50. data/spec/integration/application/agent_spec.rb +127 -3
  51. data/spec/integration/application/apply_spec.rb +19 -0
  52. data/spec/integration/defaults_spec.rb +0 -7
  53. data/spec/integration/indirector/file_content/file_server_spec.rb +0 -2
  54. data/spec/integration/indirector/file_metadata/file_server_spec.rb +0 -2
  55. data/spec/integration/resource/type_collection_spec.rb +2 -6
  56. data/spec/integration/transaction_spec.rb +4 -9
  57. data/spec/integration/util/windows/adsi_spec.rb +3 -1
  58. data/spec/integration/util/windows/registry_spec.rb +0 -10
  59. data/spec/spec_helper.rb +1 -4
  60. data/spec/unit/agent_spec.rb +8 -6
  61. data/spec/unit/application/agent_spec.rb +0 -1
  62. data/spec/unit/application/filebucket_spec.rb +0 -2
  63. data/spec/unit/application_spec.rb +17 -9
  64. data/spec/unit/confine/feature_spec.rb +1 -1
  65. data/spec/unit/confine_spec.rb +8 -2
  66. data/spec/unit/face/node_spec.rb +0 -11
  67. data/spec/unit/file_serving/configuration/parser_spec.rb +8 -1
  68. data/spec/unit/file_serving/metadata_spec.rb +3 -3
  69. data/spec/unit/file_serving/terminus_helper_spec.rb +11 -4
  70. data/spec/unit/forge/module_release_spec.rb +2 -7
  71. data/spec/unit/indirector/face_spec.rb +0 -1
  72. data/spec/unit/indirector/facts/facter_spec.rb +11 -5
  73. data/spec/unit/indirector/file_bucket_file/selector_spec.rb +26 -8
  74. data/spec/unit/indirector/indirection_spec.rb +8 -12
  75. data/spec/unit/indirector_spec.rb +2 -2
  76. data/spec/unit/module_tool/applications/installer_spec.rb +66 -0
  77. data/spec/unit/network/formats_spec.rb +41 -0
  78. data/spec/unit/network/http/api/indirected_routes_spec.rb +0 -4
  79. data/spec/unit/parser/compiler_spec.rb +3 -19
  80. data/spec/unit/parser/resource_spec.rb +14 -8
  81. data/spec/unit/pops/evaluator/deferred_resolver_spec.rb +20 -0
  82. data/spec/unit/property_spec.rb +1 -0
  83. data/spec/unit/provider/nameservice_spec.rb +66 -65
  84. data/spec/unit/provider/package/apt_spec.rb +4 -8
  85. data/spec/unit/provider/package/base_spec.rb +6 -5
  86. data/spec/unit/provider/package/pacman_spec.rb +18 -12
  87. data/spec/unit/provider/package/pip_spec.rb +6 -11
  88. data/spec/unit/provider/package/pkgdmg_spec.rb +0 -4
  89. data/spec/unit/provider/user/hpux_spec.rb +1 -1
  90. data/spec/unit/provider_spec.rb +6 -8
  91. data/spec/unit/resource/type_spec.rb +1 -1
  92. data/spec/unit/resource_spec.rb +11 -10
  93. data/spec/unit/settings_spec.rb +13 -6
  94. data/spec/unit/ssl/base_spec.rb +0 -1
  95. data/spec/unit/ssl/ssl_provider_spec.rb +5 -2
  96. data/spec/unit/transaction/additional_resource_generator_spec.rb +3 -7
  97. data/spec/unit/transaction/event_manager_spec.rb +14 -11
  98. data/spec/unit/transaction_spec.rb +13 -4
  99. data/spec/unit/type/file/content_spec.rb +0 -1
  100. data/spec/unit/type/file/selinux_spec.rb +0 -2
  101. data/spec/unit/type/file_spec.rb +0 -6
  102. data/spec/unit/type/group_spec.rb +13 -6
  103. data/spec/unit/type/resources_spec.rb +7 -7
  104. data/spec/unit/type/service_spec.rb +1 -1
  105. data/spec/unit/type/tidy_spec.rb +0 -1
  106. data/spec/unit/type_spec.rb +2 -2
  107. data/spec/unit/util/at_fork_spec.rb +2 -2
  108. data/spec/unit/util/autoload_spec.rb +5 -1
  109. data/spec/unit/util/backups_spec.rb +1 -2
  110. data/spec/unit/util/execution_spec.rb +15 -11
  111. data/spec/unit/util/inifile_spec.rb +6 -14
  112. data/spec/unit/util/log_spec.rb +8 -7
  113. data/spec/unit/util/logging_spec.rb +3 -3
  114. data/spec/unit/util/posix_spec.rb +16 -10
  115. data/spec/unit/util/selinux_spec.rb +76 -52
  116. data/spec/unit/util/suidmanager_spec.rb +44 -41
  117. data/spec/unit/util_spec.rb +13 -6
  118. metadata +7 -2
@@ -34,6 +34,7 @@ class Puppet::Settings
34
34
  require 'puppet/settings/server_list_setting'
35
35
  require 'puppet/settings/http_extra_headers_setting'
36
36
  require 'puppet/settings/certificate_revocation_setting'
37
+ require 'puppet/settings/alias_setting'
37
38
 
38
39
  # local reference for convenience
39
40
  PuppetOptionParser = Puppet::Util::CommandLine::PuppetOptionParser
@@ -388,19 +389,6 @@ class Puppet::Settings
388
389
  call_hooks_deferred_to_application_initialization
389
390
  issue_deprecations
390
391
 
391
- run_mode = Puppet::Util::RunMode[self.preferred_run_mode]
392
- if run_mode.agent? || run_mode.server?
393
- if self.set_in_section?(:masterport, run_mode.name) && !self.set_in_section?(:serverport, run_mode.name)
394
- self[:serverport] = self[:masterport]
395
- elsif self.set_by_config?(:masterport) && !self.set_by_config?(:serverport)
396
- self[:serverport] = self[:masterport]
397
- elsif self.set_in_section?(:serverport, run_mode.name) && !self.set_in_section?(:masterport, run_mode.name)
398
- self[:masterport] = self[:serverport]
399
- elsif self.set_by_config?(:serverport) && !self.set_by_config?(:masterport)
400
- self[:masterport] = self[:serverport]
401
- end
402
- end
403
-
404
392
  REQUIRED_APP_SETTINGS.each do |key|
405
393
  create_ancestors(Puppet[key])
406
394
  end
@@ -747,7 +735,8 @@ class Puppet::Settings
747
735
  :autosign => AutosignSetting,
748
736
  :server_list => ServerListSetting,
749
737
  :http_extra_headers => HttpExtraHeadersSetting,
750
- :certificate_revocation => CertificateRevocationSetting
738
+ :certificate_revocation => CertificateRevocationSetting,
739
+ :alias => AliasSetting
751
740
  }
752
741
 
753
742
  # Create a new setting. The value is passed in because it's used to determine
@@ -1285,27 +1274,37 @@ Generated on #{Time.now}.
1285
1274
  end
1286
1275
 
1287
1276
  def add_environment_resources(catalog, sections)
1288
- path = self[:environmentpath]
1289
- envdir = path.split(File::PATH_SEPARATOR).first if path
1290
1277
  configured_environment = self[:environment]
1291
- if configured_environment == "production" && envdir && Puppet::FileSystem.exist?(envdir)
1292
- configured_environment_path = File.join(envdir, configured_environment)
1293
- # If configured_environment_path is a symlink, assume the source path is being managed
1294
- # elsewhere, so don't do any of this configuration
1295
- if !Puppet::FileSystem.symlink?(configured_environment_path)
1278
+
1279
+ if configured_environment == "production" && !production_environment_exists?
1280
+ environment_path = self[:environmentpath]
1281
+ first_environment_path = environment_path.split(File::PATH_SEPARATOR).first
1282
+
1283
+ if Puppet::FileSystem.exist?(first_environment_path)
1284
+ production_environment_path = File.join(first_environment_path, configured_environment)
1296
1285
  parameters = { :ensure => 'directory' }
1297
- unless Puppet::FileSystem.exist?(configured_environment_path)
1298
- parameters[:mode] = '0750'
1299
- if Puppet.features.root?
1300
- parameters[:owner] = Puppet[:user] if service_user_available?
1301
- parameters[:group] = Puppet[:group] if service_group_available?
1302
- end
1286
+ parameters[:mode] = '0750'
1287
+ if Puppet.features.root?
1288
+ parameters[:owner] = Puppet[:user] if service_user_available?
1289
+ parameters[:group] = Puppet[:group] if service_group_available?
1303
1290
  end
1304
- catalog.add_resource(Puppet::Resource.new(:file, configured_environment_path, :parameters => parameters))
1291
+ catalog.add_resource(Puppet::Resource.new(:file, production_environment_path, :parameters => parameters))
1305
1292
  end
1306
1293
  end
1307
1294
  end
1308
1295
 
1296
+ def production_environment_exists?
1297
+ environment_path = self[:environmentpath]
1298
+ paths = environment_path.split(File::PATH_SEPARATOR)
1299
+
1300
+ paths.any? do |path|
1301
+ # If expected_path is a symlink, assume the source path is being managed
1302
+ # elsewhere, so accept it also as a valid production environment path
1303
+ expected_path = File.join(path, 'production')
1304
+ Puppet::FileSystem.directory?(expected_path) || Puppet::FileSystem.symlink?(expected_path)
1305
+ end
1306
+ end
1307
+
1309
1308
  def add_user_resources(catalog, sections)
1310
1309
  return unless Puppet.features.root?
1311
1310
  return if Puppet::Util::Platform.windows?
@@ -1406,6 +1405,12 @@ Generated on #{Time.now}.
1406
1405
  end
1407
1406
  end
1408
1407
 
1408
+ setting = @defaults[name]
1409
+ if setting.respond_to?(:alias_name)
1410
+ val = lookup(setting.alias_name)
1411
+ return val if val
1412
+ end
1413
+
1409
1414
  @defaults[name].default
1410
1415
  end
1411
1416
 
@@ -166,14 +166,7 @@ class Puppet::Util::Autoload
166
166
  # Normalize a path. This converts ALT_SEPARATOR to SEPARATOR on Windows
167
167
  # and eliminates unnecessary parts of a path.
168
168
  def cleanpath(path)
169
- # There are two cases here because cleanpath does not handle absolute
170
- # paths correctly on windows (c:\ and c:/ are treated as distinct) but
171
- # we don't want to convert relative paths to absolute
172
- if Puppet::Util.absolute_path?(path)
173
- File.expand_path(path)
174
- else
175
- Pathname.new(path).cleanpath.to_s
176
- end
169
+ Pathname.new(path).cleanpath.to_s
177
170
  end
178
171
  end
179
172
 
@@ -23,7 +23,7 @@ module Puppet::Util::POSIX
23
23
  groups << group.name if group.mem.include?(user)
24
24
  end
25
25
  end
26
-
26
+
27
27
  uniq_groups = groups.uniq
28
28
  if uniq_groups != groups
29
29
  Puppet.debug(_('Removing any duplicate group entries'))
@@ -6,7 +6,7 @@
6
6
  # Raketasks and such to set the version based on the output of `git describe`
7
7
 
8
8
  module Puppet
9
- PUPPETVERSION = '7.1.0'
9
+ PUPPETVERSION = '7.3.0'
10
10
 
11
11
  ##
12
12
  # version is a public API method intended to always provide a fast and