puppet 6.17.0-x64-mingw32 → 6.18.0-x64-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -5
- data/lib/puppet/application/apply.rb +18 -20
- data/lib/puppet/application/lookup.rb +16 -4
- data/lib/puppet/configurer/downloader.rb +31 -10
- data/lib/puppet/confine.rb +1 -1
- data/lib/puppet/confine/any.rb +1 -1
- data/lib/puppet/defaults.rb +21 -3
- data/lib/puppet/feature/base.rb +1 -1
- data/lib/puppet/file_serving/mount/locales.rb +1 -2
- data/lib/puppet/file_serving/mount/pluginfacts.rb +1 -2
- data/lib/puppet/file_serving/mount/plugins.rb +1 -2
- data/lib/puppet/file_system/file_impl.rb +3 -3
- data/lib/puppet/functions/lstrip.rb +4 -4
- data/lib/puppet/functions/reverse_each.rb +1 -1
- data/lib/puppet/functions/rstrip.rb +4 -4
- data/lib/puppet/functions/step.rb +1 -1
- data/lib/puppet/functions/strip.rb +4 -4
- data/lib/puppet/gettext/config.rb +5 -5
- data/lib/puppet/gettext/module_translations.rb +4 -4
- data/lib/puppet/indirector/exec.rb +1 -1
- data/lib/puppet/indirector/facts/facter.rb +3 -3
- data/lib/puppet/indirector/file_metadata/http.rb +1 -0
- data/lib/puppet/indirector/hiera.rb +4 -0
- data/lib/puppet/indirector/indirection.rb +1 -1
- data/lib/puppet/indirector/report/processor.rb +2 -2
- data/lib/puppet/module.rb +1 -2
- data/lib/puppet/network/format_support.rb +2 -2
- data/lib/puppet/network/http/route.rb +2 -2
- data/lib/puppet/node/environment.rb +12 -5
- data/lib/puppet/pal/pal_impl.rb +27 -3
- data/lib/puppet/parameter.rb +1 -1
- data/lib/puppet/parser/functions.rb +21 -17
- data/lib/puppet/parser/functions/create_resources.rb +11 -7
- data/lib/puppet/parser/type_loader.rb +2 -2
- data/lib/puppet/pops/adaptable.rb +7 -13
- data/lib/puppet/pops/adapters.rb +8 -4
- data/lib/puppet/pops/loader/runtime3_type_loader.rb +4 -2
- data/lib/puppet/pops/loaders.rb +18 -11
- data/lib/puppet/pops/lookup/context.rb +1 -1
- data/lib/puppet/pops/lookup/hiera_config.rb +14 -1
- data/lib/puppet/pops/types/iterable.rb +34 -8
- data/lib/puppet/pops/validation/checker4_0.rb +19 -15
- data/lib/puppet/provider/file/windows.rb +1 -1
- data/lib/puppet/provider/package/apt.rb +34 -0
- data/lib/puppet/provider/package/gem.rb +4 -2
- data/lib/puppet/provider/package/puppet_gem.rb +5 -0
- data/lib/puppet/provider/package/zypper.rb +3 -0
- data/lib/puppet/provider/user/aix.rb +1 -1
- data/lib/puppet/provider/user/user_role_add.rb +1 -1
- data/lib/puppet/provider/user/windows_adsi.rb +18 -1
- data/lib/puppet/settings.rb +1 -1
- data/lib/puppet/ssl/validator/default_validator.rb +1 -1
- data/lib/puppet/test/test_helper.rb +10 -3
- data/lib/puppet/transaction.rb +2 -2
- data/lib/puppet/transaction/persistence.rb +1 -1
- data/lib/puppet/transaction/report.rb +1 -1
- data/lib/puppet/trusted_external.rb +2 -2
- data/lib/puppet/type.rb +4 -3
- data/lib/puppet/type/file.rb +2 -2
- data/lib/puppet/type/file/source.rb +27 -7
- data/lib/puppet/type/notify.rb +2 -2
- data/lib/puppet/type/service.rb +4 -0
- data/lib/puppet/type/user.rb +18 -3
- data/lib/puppet/util.rb +26 -12
- data/lib/puppet/util/autoload.rb +9 -7
- data/lib/puppet/util/character_encoding.rb +9 -5
- data/lib/puppet/util/execution.rb +2 -2
- data/lib/puppet/util/windows.rb +1 -0
- data/lib/puppet/util/windows/api_types.rb +15 -1
- data/lib/puppet/util/windows/monkey_patches/dir.rb +40 -0
- data/lib/puppet/util/windows/security.rb +4 -4
- data/lib/puppet/util/windows/user.rb +219 -0
- data/lib/puppet/version.rb +1 -1
- data/locales/puppet.pot +78 -69
- data/man/man5/puppet.conf.5 +22 -3
- data/man/man8/puppet-agent.8 +1 -1
- data/man/man8/puppet-apply.8 +1 -1
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +1 -1
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +1 -1
- data/man/man8/puppet-filebucket.8 +1 -1
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-key.8 +1 -1
- data/man/man8/puppet-lookup.8 +2 -2
- data/man/man8/puppet-man.8 +1 -1
- data/man/man8/puppet-module.8 +1 -1
- data/man/man8/puppet-node.8 +1 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +1 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +1 -1
- data/man/man8/puppet-ssl.8 +1 -1
- data/man/man8/puppet-status.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/provider/applytest/applytest.rb +2 -0
- data/spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/type/applytest.rb +25 -0
- data/spec/fixtures/unit/forge/bacula-releases.json +128 -0
- data/spec/fixtures/unit/forge/bacula.tar.gz +0 -0
- data/spec/integration/application/agent_spec.rb +29 -37
- data/spec/integration/application/apply_spec.rb +149 -149
- data/spec/integration/application/config_spec.rb +74 -0
- data/spec/integration/application/doc_spec.rb +16 -6
- data/spec/integration/application/filebucket_spec.rb +65 -16
- data/spec/integration/application/help_spec.rb +42 -0
- data/spec/integration/application/lookup_spec.rb +13 -0
- data/spec/integration/application/module_spec.rb +68 -0
- data/spec/integration/application/plugin_spec.rb +50 -0
- data/spec/integration/data_binding_spec.rb +82 -0
- data/spec/integration/directory_environments_spec.rb +17 -17
- data/spec/integration/indirector/facts/facter_spec.rb +8 -6
- data/spec/integration/node/environment_spec.rb +1 -1
- data/spec/integration/util/execution_spec.rb +22 -0
- data/spec/integration/util/windows/monkey_patches/dir_spec.rb +11 -0
- data/spec/integration/util/windows/process_spec.rb +26 -32
- data/spec/integration/util/windows/user_spec.rb +7 -0
- data/spec/integration/util_spec.rb +7 -33
- data/spec/lib/puppet_spec/matchers.rb +0 -80
- data/spec/lib/puppet_spec/puppetserver.rb +8 -0
- data/spec/unit/application/agent_spec.rb +3 -4
- data/spec/unit/application/face_base_spec.rb +6 -4
- data/spec/unit/application/facts_spec.rb +39 -10
- data/spec/unit/application/man_spec.rb +52 -0
- data/spec/unit/application/resource_spec.rb +3 -1
- data/spec/unit/application/ssl_spec.rb +15 -2
- data/spec/unit/configurer/downloader_spec.rb +10 -0
- data/spec/unit/configurer_spec.rb +47 -31
- data/spec/unit/confine_spec.rb +2 -1
- data/spec/unit/face/config_spec.rb +3 -1
- data/spec/unit/file_serving/mount/locales_spec.rb +2 -2
- data/spec/unit/file_serving/mount/pluginfacts_spec.rb +2 -2
- data/spec/unit/file_serving/mount/plugins_spec.rb +2 -2
- data/spec/unit/file_system/uniquefile_spec.rb +18 -0
- data/spec/unit/http/client_spec.rb +0 -1
- data/spec/unit/http/resolver_spec.rb +0 -1
- data/spec/unit/http/service/ca_spec.rb +0 -1
- data/spec/unit/http/service/compiler_spec.rb +0 -1
- data/spec/unit/http/service/file_server_spec.rb +0 -1
- data/spec/unit/http/service/report_spec.rb +0 -1
- data/spec/unit/http/service_spec.rb +0 -1
- data/spec/unit/http/session_spec.rb +0 -1
- data/spec/unit/module_tool/tar/mini_spec.rb +20 -0
- data/spec/unit/network/format_support_spec.rb +3 -2
- data/spec/unit/node/environment_spec.rb +18 -1
- data/spec/unit/pops/loaders/loaders_spec.rb +70 -0
- data/spec/unit/pops/lookup/lookup_spec.rb +25 -0
- data/spec/unit/provider/package/apt_spec.rb +77 -0
- data/spec/unit/provider/package/aptitude_spec.rb +1 -0
- data/spec/unit/provider/package/puppet_gem_spec.rb +4 -1
- data/spec/unit/provider/package/zypper_spec.rb +14 -0
- data/spec/unit/provider/service/init_spec.rb +41 -0
- data/spec/unit/provider/service/systemd_spec.rb +1 -6
- data/spec/unit/provider/service/windows_spec.rb +28 -0
- data/spec/unit/provider/user/windows_adsi_spec.rb +82 -0
- data/spec/unit/puppet_pal_2pec.rb +40 -0
- data/spec/unit/reports/store_spec.rb +17 -13
- data/spec/unit/transaction/persistence_spec.rb +15 -0
- data/spec/unit/type/service_spec.rb +35 -2
- data/spec/unit/type/user_spec.rb +31 -2
- data/spec/unit/util/character_encoding_spec.rb +4 -4
- data/spec/unit/util/command_line_spec.rb +11 -6
- metadata +21 -44
- data/spec/integration/faces/config_spec.rb +0 -91
- data/spec/integration/faces/documentation_spec.rb +0 -57
- data/spec/integration/file_bucket/file_spec.rb +0 -50
- data/spec/integration/file_serving/content_spec.rb +0 -7
- data/spec/integration/file_serving/fileset_spec.rb +0 -12
- data/spec/integration/file_serving/metadata_spec.rb +0 -8
- data/spec/integration/file_serving/terminus_helper_spec.rb +0 -20
- data/spec/integration/file_system/uniquefile_spec.rb +0 -26
- data/spec/integration/module_tool/forge_spec.rb +0 -51
- data/spec/integration/module_tool/tar/mini_spec.rb +0 -28
- data/spec/integration/provider/service/init_spec.rb +0 -48
- data/spec/integration/provider/service/systemd_spec.rb +0 -25
- data/spec/integration/provider/service/windows_spec.rb +0 -50
- data/spec/integration/reference/providers_spec.rb +0 -21
- data/spec/integration/reports_spec.rb +0 -13
- data/spec/integration/ssl/certificate_request_spec.rb +0 -44
- data/spec/integration/ssl/host_spec.rb +0 -72
- data/spec/integration/ssl/key_spec.rb +0 -99
- data/spec/shared_behaviours/file_serving_model.rb +0 -51
- data/spec/unit/face/man_spec.rb +0 -25
- data/spec/unit/man_spec.rb +0 -31
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 34037923ba5422bbf8ac993686508b9e9d549500440a20ad2bff322aed8edee7
         | 
| 4 | 
            +
              data.tar.gz: 286aca7f2999a9814635a8357af53383d8465abac59a4902678943645a63381b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 528133db6440c7c27ebc646d38da4291d93570ddabf3ebe3a458bacefd897cba9b67218e61290a673a93dfa619f8c1f04f9eceb0bdab599a368398f877caa37f
         | 
| 7 | 
            +
              data.tar.gz: 571cdafdd35691b056adf3e02c911c37319691e1891578a430fbfdf141504c7b0cb7a4d9a9e8e5a5a7d68293480ea9155ae57792c264445bb265672c13e51b94
         | 
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                puppet (6. | 
| 4 | 
            +
                puppet (6.18.0)
         | 
| 5 5 | 
             
                  CFPropertyList (~> 2.2)
         | 
| 6 6 | 
             
                  concurrent-ruby (~> 1.0)
         | 
| 7 7 | 
             
                  deep_merge (~> 1.0)
         | 
| @@ -22,14 +22,14 @@ GEM | |
| 22 22 | 
             
                artifactory (2.8.2)
         | 
| 23 23 | 
             
                ast (2.4.1)
         | 
| 24 24 | 
             
                coderay (1.1.3)
         | 
| 25 | 
            -
                concurrent-ruby (1.1. | 
| 25 | 
            +
                concurrent-ruby (1.1.7)
         | 
| 26 26 | 
             
                crack (0.4.3)
         | 
| 27 27 | 
             
                  safe_yaml (~> 1.0.0)
         | 
| 28 28 | 
             
                csv (3.1.5)
         | 
| 29 29 | 
             
                deep_merge (1.2.1)
         | 
| 30 30 | 
             
                diff-lcs (1.4.4)
         | 
| 31 31 | 
             
                docopt (0.6.1)
         | 
| 32 | 
            -
                facter (4.0. | 
| 32 | 
            +
                facter (4.0.35)
         | 
| 33 33 | 
             
                  hocon (~> 1.3)
         | 
| 34 34 | 
             
                  thor (>= 1.0.1, < 2.0)
         | 
| 35 35 | 
             
                fast_gettext (1.1.2)
         | 
| @@ -59,8 +59,9 @@ GEM | |
| 59 59 | 
             
                multi_json (1.15.0)
         | 
| 60 60 | 
             
                mustache (1.1.1)
         | 
| 61 61 | 
             
                optimist (3.0.1)
         | 
| 62 | 
            -
                packaging (0.99. | 
| 62 | 
            +
                packaging (0.99.68)
         | 
| 63 63 | 
             
                  artifactory (~> 2)
         | 
| 64 | 
            +
                  csv (= 3.1.5)
         | 
| 64 65 | 
             
                  rake (>= 12.3)
         | 
| 65 66 | 
             
                  release-metrics
         | 
| 66 67 | 
             
                parallel (1.19.2)
         | 
| @@ -79,7 +80,7 @@ GEM | |
| 79 80 | 
             
                rainbow (2.2.2)
         | 
| 80 81 | 
             
                  rake
         | 
| 81 82 | 
             
                rake (12.3.3)
         | 
| 82 | 
            -
                rdiscount (2.2.0. | 
| 83 | 
            +
                rdiscount (2.2.0.2)
         | 
| 83 84 | 
             
                rdoc (6.2.1)
         | 
| 84 85 | 
             
                release-metrics (1.1.0)
         | 
| 85 86 | 
             
                  csv
         | 
| @@ -190,7 +190,7 @@ Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License | |
| 190 190 | 
             
                  text = Puppet::FileSystem.read(options[:catalog], :encoding => 'utf-8')
         | 
| 191 191 | 
             
                end
         | 
| 192 192 | 
             
                env = Puppet.lookup(:environments).get(Puppet[:environment])
         | 
| 193 | 
            -
                Puppet.override(:current_environment => env, :loaders =>  | 
| 193 | 
            +
                Puppet.override(:current_environment => env, :loaders => create_loaders(env)) do
         | 
| 194 194 | 
             
                  catalog = read_catalog(text)
         | 
| 195 195 | 
             
                  apply_catalog(catalog)
         | 
| 196 196 | 
             
                end
         | 
| @@ -204,7 +204,7 @@ Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License | |
| 204 204 | 
             
                apply_environment = get_configured_environment(node, manifest)
         | 
| 205 205 |  | 
| 206 206 | 
             
                # TRANSLATORS "puppet apply" is a program command and should not be translated
         | 
| 207 | 
            -
                Puppet.override({:current_environment => apply_environment}, _("For puppet apply")) do
         | 
| 207 | 
            +
                Puppet.override({:current_environment => apply_environment, :loaders => create_loaders(apply_environment)}, _("For puppet apply")) do
         | 
| 208 208 | 
             
                  configure_node_facts(node, facts)
         | 
| 209 209 |  | 
| 210 210 | 
             
                  # Allow users to load the classes that puppet agent creates.
         | 
| @@ -235,30 +235,23 @@ Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License | |
| 235 235 | 
             
                      exit(1)
         | 
| 236 236 | 
             
                    end
         | 
| 237 237 |  | 
| 238 | 
            -
                    #  | 
| 239 | 
            -
                     | 
| 240 | 
            -
                    # required steps as it is expensive to set up loaders twice (once for
         | 
| 241 | 
            -
                    # resolution and once for the apply).
         | 
| 242 | 
            -
                    #
         | 
| 243 | 
            -
                    exit_status = Puppet.override(:loaders => Puppet::Pops::Loaders.new(apply_environment)) do
         | 
| 238 | 
            +
                    # Resolve all deferred values and replace them / mutate the catalog
         | 
| 239 | 
            +
                    Puppet::Pops::Evaluator::DeferredResolver.resolve_and_replace(node.facts, catalog)
         | 
| 244 240 |  | 
| 245 | 
            -
             | 
| 246 | 
            -
             | 
| 241 | 
            +
                    # Translate it to a RAL catalog
         | 
| 242 | 
            +
                    catalog = catalog.to_ral
         | 
| 247 243 |  | 
| 248 | 
            -
             | 
| 249 | 
            -
                      catalog = catalog.to_ral
         | 
| 244 | 
            +
                    catalog.finalize
         | 
| 250 245 |  | 
| 251 | 
            -
             | 
| 246 | 
            +
                    catalog.retrieval_duration = Time.now - starttime
         | 
| 252 247 |  | 
| 253 | 
            -
             | 
| 248 | 
            +
                    if options[:write_catalog_summary]
         | 
| 249 | 
            +
                      catalog.write_class_file
         | 
| 250 | 
            +
                      catalog.write_resource_file
         | 
| 251 | 
            +
                    end
         | 
| 254 252 |  | 
| 255 | 
            -
             | 
| 256 | 
            -
                        catalog.write_class_file
         | 
| 257 | 
            -
                        catalog.write_resource_file
         | 
| 258 | 
            -
                      end
         | 
| 253 | 
            +
                    exit_status = apply_catalog(catalog)
         | 
| 259 254 |  | 
| 260 | 
            -
                      apply_catalog(catalog)
         | 
| 261 | 
            -
                    end
         | 
| 262 255 | 
             
                    if not exit_status
         | 
| 263 256 | 
             
                      exit(1)
         | 
| 264 257 | 
             
                    elsif options[:detailed_exitcodes] then
         | 
| @@ -313,6 +306,11 @@ Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License | |
| 313 306 |  | 
| 314 307 | 
             
              private
         | 
| 315 308 |  | 
| 309 | 
            +
              def create_loaders(env)
         | 
| 310 | 
            +
                # Ignore both 'cached_puppet_lib' and pcore resource type loaders
         | 
| 311 | 
            +
                Puppet::Pops::Loaders.new(env, false, false)
         | 
| 312 | 
            +
              end
         | 
| 313 | 
            +
             | 
| 316 314 | 
             
              def read_catalog(text)
         | 
| 317 315 | 
             
                facts = get_facts()
         | 
| 318 316 | 
             
                node = get_node()
         | 
| @@ -90,8 +90,14 @@ class Puppet::Application::Lookup < Puppet::Application | |
| 90 90 |  | 
| 91 91 | 
             
                exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs?
         | 
| 92 92 |  | 
| 93 | 
            -
                 | 
| 94 | 
            -
             | 
| 93 | 
            +
                if options[:node]
         | 
| 94 | 
            +
                  Puppet::Util.skip_external_facts do
         | 
| 95 | 
            +
                    Puppet.settings.use :main, :master, :ssl, :metrics
         | 
| 96 | 
            +
                  end
         | 
| 97 | 
            +
                else
         | 
| 98 | 
            +
                  Puppet.settings.use :main, :master, :ssl, :metrics
         | 
| 99 | 
            +
                end
         | 
| 100 | 
            +
                
         | 
| 95 101 | 
             
                setup_terminuses
         | 
| 96 102 | 
             
              end
         | 
| 97 103 |  | 
| @@ -102,7 +108,7 @@ class Puppet::Application::Lookup < Puppet::Application | |
| 102 108 | 
             
              def help
         | 
| 103 109 | 
             
                <<-HELP
         | 
| 104 110 |  | 
| 105 | 
            -
            puppet | 
| 111 | 
            +
            puppet-lookup(8) -- #{summary}
         | 
| 106 112 | 
             
            ========
         | 
| 107 113 |  | 
| 108 114 | 
             
            SYNOPSIS
         | 
| @@ -364,6 +370,12 @@ Copyright (c) 2015 Puppet Inc., LLC Licensed under the Apache 2.0 License | |
| 364 370 |  | 
| 365 371 | 
             
                Puppet[:code] = 'undef' unless options[:compile]
         | 
| 366 372 | 
             
                compiler = Puppet::Parser::Compiler.new(node)
         | 
| 367 | 
            -
                 | 
| 373 | 
            +
                if options[:node]
         | 
| 374 | 
            +
                  Puppet::Util.skip_external_facts do 
         | 
| 375 | 
            +
                    compiler.compile { |catalog| yield(compiler.topscope); catalog }
         | 
| 376 | 
            +
                  end
         | 
| 377 | 
            +
                else
         | 
| 378 | 
            +
                  compiler.compile { |catalog| yield(compiler.topscope); catalog }
         | 
| 379 | 
            +
                end
         | 
| 368 380 | 
             
              end
         | 
| 369 381 | 
             
            end
         | 
| @@ -11,32 +11,53 @@ class Puppet::Configurer::Downloader | |
| 11 11 | 
             
                files = []
         | 
| 12 12 | 
             
                begin
         | 
| 13 13 | 
             
                  catalog.apply do |trans|
         | 
| 14 | 
            +
                    unless Puppet[:ignore_plugin_errors]
         | 
| 15 | 
            +
                      # Propagate the first failure associated with the transaction. The any_failed?
         | 
| 16 | 
            +
                      # method returns the first resource status that failed or nil, not a boolean.
         | 
| 17 | 
            +
                      first_failure = trans.any_failed?
         | 
| 18 | 
            +
                      if first_failure
         | 
| 19 | 
            +
                        event = (first_failure.events || []).first
         | 
| 20 | 
            +
                        detail = event ? event.message : 'unknown'
         | 
| 21 | 
            +
                        raise Puppet::Error.new(_("Failed to retrieve %{name}: %{detail}") % { name: name, detail: detail })
         | 
| 22 | 
            +
                      end
         | 
| 23 | 
            +
                    end
         | 
| 24 | 
            +
             | 
| 14 25 | 
             
                    trans.changed?.each do |resource|
         | 
| 15 26 | 
             
                      yield resource if block_given?
         | 
| 16 27 | 
             
                      files << resource[:path]
         | 
| 17 28 | 
             
                    end
         | 
| 18 29 | 
             
                  end
         | 
| 19 30 | 
             
                rescue Puppet::Error => detail
         | 
| 20 | 
            -
                  Puppet | 
| 31 | 
            +
                  if Puppet[:ignore_plugin_errors]
         | 
| 32 | 
            +
                    Puppet.log_exception(detail, _("Could not retrieve %{name}: %{detail}") % { name: name, detail: detail })
         | 
| 33 | 
            +
                  else
         | 
| 34 | 
            +
                    raise detail
         | 
| 35 | 
            +
                  end
         | 
| 21 36 | 
             
                end
         | 
| 22 37 | 
             
                files
         | 
| 23 38 | 
             
              end
         | 
| 24 39 |  | 
| 25 40 | 
             
              def initialize(name, path, source, ignore = nil, environment = nil, source_permissions = :ignore)
         | 
| 26 41 | 
             
                @name, @path, @source, @ignore, @environment, @source_permissions = name, path, source, ignore, environment, source_permissions
         | 
| 27 | 
            -
              end
         | 
| 28 42 |  | 
| 29 | 
            -
              def catalog
         | 
| 30 | 
            -
                catalog = Puppet::Resource::Catalog.new("PluginSync", @environment)
         | 
| 31 | 
            -
                catalog.host_config = false
         | 
| 32 | 
            -
                catalog.add_resource(file)
         | 
| 33 | 
            -
                catalog
         | 
| 34 43 | 
             
              end
         | 
| 35 44 |  | 
| 36 45 | 
             
              def file
         | 
| 37 | 
            -
                 | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 46 | 
            +
                unless @file
         | 
| 47 | 
            +
                  args = default_arguments.merge(:path => path, :source => source)
         | 
| 48 | 
            +
                  args[:ignore] = ignore.split if ignore
         | 
| 49 | 
            +
                  @file = Puppet::Type.type(:file).new(args)
         | 
| 50 | 
            +
                end
         | 
| 51 | 
            +
                @file
         | 
| 52 | 
            +
              end
         | 
| 53 | 
            +
             | 
| 54 | 
            +
              def catalog
         | 
| 55 | 
            +
                unless @catalog
         | 
| 56 | 
            +
                  @catalog = Puppet::Resource::Catalog.new("PluginSync", @environment)
         | 
| 57 | 
            +
                  @catalog.host_config = false
         | 
| 58 | 
            +
                  @catalog.add_resource(file)
         | 
| 59 | 
            +
                end
         | 
| 60 | 
            +
                @catalog
         | 
| 40 61 | 
             
              end
         | 
| 41 62 |  | 
| 42 63 | 
             
              private
         | 
    
        data/lib/puppet/confine.rb
    CHANGED
    
    
    
        data/lib/puppet/confine/any.rb
    CHANGED
    
    
    
        data/lib/puppet/defaults.rb
    CHANGED
    
    | @@ -822,7 +822,9 @@ API to expire the cache as needed | |
| 822 822 | 
             
                      only use lowercase letters, numbers, periods, underscores, and dashes. (That is,
         | 
| 823 823 | 
             
                      it should match `/\A[a-z0-9._-]+\Z/`.)
         | 
| 824 824 | 
             
                    * The special value `ca` is reserved, and can't be used as the certname
         | 
| 825 | 
            -
                      for a normal node.
         | 
| 825 | 
            +
                      for a normal node.         
         | 
| 826 | 
            +
             | 
| 827 | 
            +
                      **Note:** You must set the certname in the main section of the puppet.conf file. Setting it in a different section causes errors.
         | 
| 826 828 |  | 
| 827 829 | 
             
                    Defaults to the node's fully qualified domain name.",
         | 
| 828 830 | 
             
                  :hook => proc { |value| raise(ArgumentError, _("Certificate names must be lower case")) unless value == value.downcase }},
         | 
| @@ -1701,8 +1703,7 @@ EOT | |
| 1701 1703 | 
             
                  :type     => :duration,
         | 
| 1702 1704 | 
             
                  :desc     => "How often puppet agent applies the catalog.
         | 
| 1703 1705 | 
             
                      Note that a runinterval of 0 means \"run continuously\" rather than
         | 
| 1704 | 
            -
                      \"never run.\"  | 
| 1705 | 
            -
                      it with the `--no-client` option. #{AS_DURATION}",
         | 
| 1706 | 
            +
                      \"never run.\" #{AS_DURATION}",
         | 
| 1706 1707 | 
             
                },
         | 
| 1707 1708 | 
             
                :runtimeout => {
         | 
| 1708 1709 | 
             
                  :default  => "1h",
         | 
| @@ -1958,9 +1959,26 @@ EOT | |
| 1958 1959 | 
             
                  is used for retrieval, so anything that is a valid file source can
         | 
| 1959 1960 | 
             
                  be used here.",
         | 
| 1960 1961 | 
             
                },
         | 
| 1962 | 
            +
                :pluginsync => {
         | 
| 1963 | 
            +
                  :default    => true,
         | 
| 1964 | 
            +
                  :type       => :boolean,
         | 
| 1965 | 
            +
                  :desc       => "Whether plugins should be synced with the central server. This setting is
         | 
| 1966 | 
            +
                    deprecated.",
         | 
| 1967 | 
            +
                  :hook => proc { |value|
         | 
| 1968 | 
            +
                    #TRANSLATORS 'pluginsync' is a setting and should not be translated
         | 
| 1969 | 
            +
                    Puppet.deprecation_warning(_("Setting 'pluginsync' is deprecated."))
         | 
| 1970 | 
            +
                  }
         | 
| 1971 | 
            +
                },
         | 
| 1961 1972 | 
             
                :pluginsignore => {
         | 
| 1962 1973 | 
             
                    :default  => ".svn CVS .git .hg",
         | 
| 1963 1974 | 
             
                    :desc     => "What files to ignore when pulling down plugins.",
         | 
| 1975 | 
            +
                },
         | 
| 1976 | 
            +
                :ignore_plugin_errors => {
         | 
| 1977 | 
            +
                  :default    => true,
         | 
| 1978 | 
            +
                  :type       => :boolean,
         | 
| 1979 | 
            +
                  :desc       => "Whether the puppet run should ignore errors during pluginsync. If the setting
         | 
| 1980 | 
            +
                    is false and there are errors during pluginsync, then the agent will abort the run and
         | 
| 1981 | 
            +
                    submit a report containing information about the failed run."
         | 
| 1964 1982 | 
             
                }
         | 
| 1965 1983 | 
             
              )
         | 
| 1966 1984 |  | 
    
        data/lib/puppet/feature/base.rb
    CHANGED
    
    
| @@ -17,14 +17,13 @@ class Puppet::FileServing::Mount::Locales < Puppet::FileServing::Mount | |
| 17 17 | 
             
              def search(relative_path, request)
         | 
| 18 18 | 
             
                # We currently only support one kind of search on locales - return
         | 
| 19 19 | 
             
                # them all.
         | 
| 20 | 
            -
                Puppet.debug("Warning: calling Locales.search with empty module path.") if request.environment.modules.empty?
         | 
| 21 20 | 
             
                paths = request.environment.modules.find_all { |mod| mod.locales? }.collect { |mod| mod.locale_directory }
         | 
| 22 21 | 
             
                if paths.empty?
         | 
| 23 22 | 
             
                  # If the modulepath is valid then we still need to return a valid root
         | 
| 24 23 | 
             
                  # directory for the search, but make sure nothing inside it is
         | 
| 25 24 | 
             
                  # returned.
         | 
| 26 25 | 
             
                  request.options[:recurse] = false
         | 
| 27 | 
            -
                  request.environment.modulepath.empty? ?  | 
| 26 | 
            +
                  request.environment.modulepath.empty? ? [Puppet[:codedir]] : request.environment.modulepath
         | 
| 28 27 | 
             
                else
         | 
| 29 28 | 
             
                  paths
         | 
| 30 29 | 
             
                end
         | 
| @@ -17,14 +17,13 @@ class Puppet::FileServing::Mount::PluginFacts < Puppet::FileServing::Mount | |
| 17 17 | 
             
              def search(relative_path, request)
         | 
| 18 18 | 
             
                # We currently only support one kind of search on plugins - return
         | 
| 19 19 | 
             
                # them all.
         | 
| 20 | 
            -
                Puppet.debug("Warning: calling Plugins.search with empty module path.") if request.environment.modules.empty?
         | 
| 21 20 | 
             
                paths = request.environment.modules.find_all { |mod| mod.pluginfacts? }.collect { |mod| mod.plugin_fact_directory }
         | 
| 22 21 | 
             
                if paths.empty?
         | 
| 23 22 | 
             
                  # If the modulepath is valid then we still need to return a valid root
         | 
| 24 23 | 
             
                  # directory for the search, but make sure nothing inside it is
         | 
| 25 24 | 
             
                  # returned.
         | 
| 26 25 | 
             
                  request.options[:recurse] = false
         | 
| 27 | 
            -
                  request.environment.modulepath.empty? ?  | 
| 26 | 
            +
                  request.environment.modulepath.empty? ? [Puppet[:codedir]] : request.environment.modulepath
         | 
| 28 27 | 
             
                else
         | 
| 29 28 | 
             
                  paths
         | 
| 30 29 | 
             
                end
         | 
| @@ -17,14 +17,13 @@ class Puppet::FileServing::Mount::Plugins < Puppet::FileServing::Mount | |
| 17 17 | 
             
              def search(relative_path, request)
         | 
| 18 18 | 
             
                # We currently only support one kind of search on plugins - return
         | 
| 19 19 | 
             
                # them all.
         | 
| 20 | 
            -
                Puppet.debug("Warning: calling Plugins.search with empty module path.") if request.environment.modules.empty?
         | 
| 21 20 | 
             
                paths = request.environment.modules.find_all { |mod| mod.plugins? }.collect { |mod| mod.plugin_directory }
         | 
| 22 21 | 
             
                if paths.empty?
         | 
| 23 22 | 
             
                  # If the modulepath is valid then we still need to return a valid root
         | 
| 24 23 | 
             
                  # directory for the search, but make sure nothing inside it is
         | 
| 25 24 | 
             
                  # returned.
         | 
| 26 25 | 
             
                  request.options[:recurse] = false
         | 
| 27 | 
            -
                  request.environment.modulepath.empty? ?  | 
| 26 | 
            +
                  request.environment.modulepath.empty? ? [Puppet[:codedir]] : request.environment.modulepath
         | 
| 28 27 | 
             
                else
         | 
| 29 28 | 
             
                  paths
         | 
| 30 29 | 
             
                end
         | 
| @@ -54,12 +54,12 @@ class Puppet::FileSystem::FileImpl | |
| 54 54 | 
             
                while !written
         | 
| 55 55 | 
             
                  ::File.open(path, options, mode) do |rf|
         | 
| 56 56 | 
             
                    if rf.flock(::File::LOCK_EX|::File::LOCK_NB)
         | 
| 57 | 
            -
                      Puppet.debug | 
| 57 | 
            +
                      Puppet.debug{ _("Locked '%{path}'") % { path: path } }
         | 
| 58 58 | 
             
                      yield rf
         | 
| 59 59 | 
             
                      written = true
         | 
| 60 | 
            -
                      Puppet.debug | 
| 60 | 
            +
                      Puppet.debug{ _("Unlocked '%{path}'") % { path: path } }
         | 
| 61 61 | 
             
                    else
         | 
| 62 | 
            -
                      Puppet.debug | 
| 62 | 
            +
                      Puppet.debug{ "Failed to lock '%s' retrying in %.2f milliseconds" % [path, wait * 1000] }
         | 
| 63 63 | 
             
                      sleep wait
         | 
| 64 64 | 
             
                      timeout -= wait
         | 
| 65 65 | 
             
                      wait *= 2
         | 
| @@ -12,15 +12,15 @@ | |
| 12 12 | 
             
            #
         | 
| 13 13 | 
             
            # @example Removing leading space from a String
         | 
| 14 14 | 
             
            # ```puppet
         | 
| 15 | 
            -
            # "\n\thello".lstrip()
         | 
| 16 | 
            -
            #  | 
| 15 | 
            +
            # "\n\thello ".lstrip()
         | 
| 16 | 
            +
            # lstrip("\n\thello ")
         | 
| 17 17 | 
             
            # ```
         | 
| 18 18 | 
             
            # Would both result in `"hello"`
         | 
| 19 19 | 
             
            #
         | 
| 20 20 | 
             
            # @example Removing leading space from strings in an Array
         | 
| 21 21 | 
             
            # ```puppet
         | 
| 22 | 
            -
            # ["\n\thello", "\n\thi"].lstrip()
         | 
| 23 | 
            -
            # lstrip(["\n\thello", "\n\thi"])
         | 
| 22 | 
            +
            # ["\n\thello ", "\n\thi "].lstrip()
         | 
| 23 | 
            +
            # lstrip(["\n\thello ", "\n\thi "])
         | 
| 24 24 | 
             
            # ```
         | 
| 25 25 | 
             
            # Would both result in `['hello', 'hi']`
         | 
| 26 26 | 
             
            #
         | 
| @@ -84,7 +84,7 @@ Puppet::Functions.create_function(:reverse_each) do | |
| 84 84 |  | 
| 85 85 | 
             
              def reverse_each(iterable)
         | 
| 86 86 | 
             
                # produces an Iterable
         | 
| 87 | 
            -
                Puppet::Pops::Types::Iterable.asserted_iterable(self, iterable).reverse_each
         | 
| 87 | 
            +
                Puppet::Pops::Types::Iterable.asserted_iterable(self, iterable, true).reverse_each
         | 
| 88 88 | 
             
              end
         | 
| 89 89 |  | 
| 90 90 | 
             
              def reverse_each_block(iterable, &block)
         | 
| @@ -12,15 +12,15 @@ | |
| 12 12 | 
             
            #
         | 
| 13 13 | 
             
            # @example Removing trailing space from a String
         | 
| 14 14 | 
             
            # ```puppet
         | 
| 15 | 
            -
            # "hello\n\t". | 
| 16 | 
            -
            #  | 
| 15 | 
            +
            # " hello\n\t".rstrip()
         | 
| 16 | 
            +
            # rstrip(" hello\n\t")
         | 
| 17 17 | 
             
            # ```
         | 
| 18 18 | 
             
            # Would both result in `"hello"`
         | 
| 19 19 | 
             
            #
         | 
| 20 20 | 
             
            # @example Removing trailing space from strings in an Array
         | 
| 21 21 | 
             
            # ```puppet
         | 
| 22 | 
            -
            # ["hello\n\t", "hi\n\t"]. | 
| 23 | 
            -
            #  | 
| 22 | 
            +
            # [" hello\n\t", " hi\n\t"].rstrip()
         | 
| 23 | 
            +
            # rstrip([" hello\n\t", " hi\n\t"])
         | 
| 24 24 | 
             
            # ```
         | 
| 25 25 | 
             
            # Would both result in `['hello', 'hi']`
         | 
| 26 26 | 
             
            #
         | 
| @@ -88,7 +88,7 @@ Puppet::Functions.create_function(:step) do | |
| 88 88 |  | 
| 89 89 | 
             
              def step(iterable, step)
         | 
| 90 90 | 
             
                # produces an Iterable
         | 
| 91 | 
            -
                Puppet::Pops::Types::Iterable.asserted_iterable(self, iterable).step(step)
         | 
| 91 | 
            +
                Puppet::Pops::Types::Iterable.asserted_iterable(self, iterable, true).step(step)
         | 
| 92 92 | 
             
              end
         | 
| 93 93 |  | 
| 94 94 | 
             
              def step_block(iterable, step, &block)
         | 
| @@ -12,15 +12,15 @@ | |
| 12 12 | 
             
            #
         | 
| 13 13 | 
             
            # @example Removing leading and trailing space from a String
         | 
| 14 14 | 
             
            # ```puppet
         | 
| 15 | 
            -
            # " hello\n\t". | 
| 16 | 
            -
            #  | 
| 15 | 
            +
            # " hello\n\t".strip()
         | 
| 16 | 
            +
            # strip(" hello\n\t")
         | 
| 17 17 | 
             
            # ```
         | 
| 18 18 | 
             
            # Would both result in `"hello"`
         | 
| 19 19 | 
             
            #
         | 
| 20 20 | 
             
            # @example Removing trailing space from strings in an Array
         | 
| 21 21 | 
             
            # ```puppet
         | 
| 22 | 
            -
            # [" hello\n\t", " hi\n\t"]. | 
| 23 | 
            -
            #  | 
| 22 | 
            +
            # [" hello\n\t", " hi\n\t"].strip()
         | 
| 23 | 
            +
            # strip([" hello\n\t", " hi\n\t"])
         | 
| 24 24 | 
             
            # ```
         | 
| 25 25 | 
             
            # Would both result in `['hello', 'hi']`
         | 
| 26 26 | 
             
            #
         |