summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-09-08(maint) Correct parameter type from SSLContext to StoreContextJosh Cooper1-9/+9
Previously, our verify callback stated that it received an SSLContext parameter, but that is not correct. While there are SSLContext classes in ruby, the actual object passed is of type StoreContext. (rdb:1) store_context.class OpenSSL::X509::StoreContext
2014-09-08(PUP-3162) Prevent $environment interpolation in directory environmentsJosh Partlow3-10/+163
There are a few settings for which interpolation of $environment does not make sense when using directory environments. * default_manifest -> defines either the relative path to manifests within a directory environment, or an absolute path to manifests to be used by all directory environments. It is currently a configuration error to set $environment within default_manifest. * basemodulepath -> conceptually, this is intended for supplemental modules required for all environments, and should not vary by environment. * environmentpath -> this is the base path defining what directory environments can be found. Interpolating $environment within it makes no sense. Additionally, both environmentpath and basemodulepath are required by the environment loaders during initialization. They will interpolate relative to a specified environment if you interogate config, but in a running master instance, will have interpolated to the default environment regardless of the current environment being processed for a catalog, for instance. A last case, irregardless of type of environment, is the pathological case of attempting to interpolate $environment within environment. This, unsurprisingly, causes a stack overflow. This patch adjusts the Puppet::Settings interpolation code so that $environment is not interpolated within any of these four settings when using directory environments (so, when the environmentpath has been set).* So assuming a confdir=/etc/puppet, basemodulepath=$confdir/modules/$environment will be interpolated as '/etc/puppet/modules/$environment' and a warning will be logged. *Currently setting $environment in default_manifest will error out when puppet loads as a setting validation error, and this behavior will never be reached.
2014-09-08Merge remote-tracking branch 'upstream/pr/3057' into stableJosh Cooper2-3/+7
* upstream/pr/3057: correct test description for http_compression disabled (PUP-1680) Set accept-encoding to identity when http_compression is false Closes GH-3057
2014-09-08correct test description for http_compression disabledJohan Haals1-1/+1
2014-09-08(PUP-1680) Set accept-encoding to identity when http_compression is falseJohan Haals2-2/+6
Override the Ruby 2.x default of setting accept-encoding to gzip when puppet http_compression is set to false.
2014-09-08Merge pull request #3055 from ↵Josh Cooper2-4/+12
hlindberg/PUP-3177_Stable-Remove-square-bracket-magic-in-titles (PUP-3177) Remove magic handling of square brackets in resource title
2014-09-08(maint) Remove unused constant from default_manifest_specJosh Partlow1-1/+0
2014-09-08(PUP-3190) Don't assume puppet is in a lib dirAndrew Parker7-76/+67
The loaders previously assumed that any installation of puppet would be under a directory called lib. This holds true when running puppet from source (during development), or in some package cases, but is not generally true. This simplifying assumption was made so that the loading path for both puppet system extensions (built in functions) and module extensions could be loaded in the same manner: find the root of the extender and loading code from `lib/puppet/...`. This changes to loading to instead only assume that there is a `puppet` directory and not the name of the parent. This, however, forces the loader for modules to become specialized to only be able to find ruby extentions, because they are in the 'lib' directory, which is how the loader must now be configured.
2014-09-07releasing package puppet version 3.7.0-1debian/3.7.0-1Stig Sandbeck Mathisen1-2/+8
2014-09-07Do not install vendored "rgen"Stig Sandbeck Mathisen1-0/+1
2014-09-07Update package descriptionsStig Sandbeck Mathisen1-66/+74
- Text from "what is puppet" at https://docs.puppetlabs.com/guides/faq.html
2014-09-07d/control: Set "Testsuite:" headerStig Sandbeck Mathisen1-1/+1
2014-09-07d/control: Update vcs browse urlStig Sandbeck Mathisen1-1/+1
2014-09-07d/copyright: updateStig Sandbeck Mathisen1-7/+89
- git-copyright-scan did the heavy lifting
2014-09-07Imported upstream release 3.7.0Stig Sandbeck Mathisen1-0/+6
2014-09-07Merge tag 'upstream/3.7.0'Stig Sandbeck Mathisen758-13060/+40720
Upstream version 3.7.0
2014-09-07Imported Upstream version 3.7.0upstream/3.7.0Stig Sandbeck Mathisen758-13060/+40720
2014-09-06(PUP-3177) Remove magic handling of square brackets in resource titleHenrik Lindberg2-4/+12
The Resource handles square brackets in a resource title as if it is a complete resource reference. This behavior is there to support the component resource type, and whits. The implementation however did not check if a regular type was also given. This means that any resource with square brackets in its title either leads to an error, or to the creation of an instance of different type/title than what was intended. This commit fixes this by only doing the munging of the title if the type is nil, component or a whit.
2014-09-06(PUP-3174) Make settings catalog skip manifestdir if environmentpathHenrik Lindberg2-1/+16
This makes the settings catalog skip managment of manifestdir if environmentpath is set.
2014-09-03Merge remote-tracking branch 'upstream/master' into stableJosh Partlow1-1/+1
* upstream/master: (packaging) Update PUPPETVERSION to 3.7.0
2014-09-03(packaging) Update PUPPETVERSION to 3.7.0Josh Partlow1-1/+1
2014-09-03Merge remote-tracking branch 'upstream/master' into stableJosh Partlow882-13328/+42149
* upstream/master: (767 commits) (maint) Namespace constant declaration in specs to prevent warnings (maint) Expect test to fail on windows ruby 2.0 x86 (PUP-3069) Fix path expansion for environment.conf test on Win (PUP-2349) Add windows specific expectation for deprecation_warning (PUP-2349) Add windows specific expectation for deprecation_warning (PUP-3069) Clear configuration_file for tests (PUP-3069) Test both future and current parser with default_manifest (PUP-3069) Update default_manifest setting descriptions (PUP-3069) Change restrict_environment_manifest name (PUP-3163) Create and manage the mode of $reportsdir (maint) Clear record of configured deprecated settings (PUP-3069) Add an integration spec for default_manifest (PUP-3069) Halt compile if environment has manifest conflict (PUP-3069) Add spec test for new default options (PUP-3069) Add default manifest settings PUP-3155 Improve spec tests around the PE puppet version (PUP-3153) Guard against nil when closing Uniquefiles (PUP-2984) Remove old installation directory when going from x64 to x86 (PUP-1884) Migrate MSI deps into puppet repo (PUP-3154) Create and manage the mode of $statedir on redhat ...
2014-09-03Merge pull request #3016 from nfagerlund/docs_37_file_functionHenrik Lindberg5-14/+42
(docs) Revise and unify explanations of module/file references in functi...
2014-09-03Merge pull request #3021 from nfagerlund/docs_clarify_resources_resourcesJosh Partlow1-5/+5
(docs) Clarify note about ssh_authorized_keys in resources resource type
2014-09-02(maint) Namespace constant declaration in specs to prevent warningsJosh Partlow2-2/+6
Add module namespacing to two specs declaring an FS constant (for convenience) so that we don't receive warnings about the duplicate declaration.
2014-09-02(maint) Expect test to fail on windows ruby 2.0 x86Josh Cooper1-1/+5
Ruby 2.0 x86 on windows does not observe the 'TZ' environment variable, so the test would generate a Time object whose `#zone` was 'Eur', but had timezone offset based on the current timezone. C:\work\puppet>ruby --version ruby 2.0.0p481 (2014-05-08) [i386-mingw32] C:\work\puppet>irb irb(main):001:0> ENV['TZ'] = 'Europe/London' => "Europe/London" irb(main):002:0> tm = Time.local(2012, "dec", 11, 15, 59, 2) => 2012-12-11 15:59:02 -0800 irb(main):003:0> tm.zone => "Eur" irb(main):004:0> tm.gmt_offset => -28800 Ironically, ruby 1.9 and 2.0 x64 do the correct thing: C:\Windows\system32>ruby --version ruby 2.0.0p481 (2014-05-08) [x64-mingw32] C:\Windows\system32>irb irb(main):001:0> ENV['TZ'] = 'Europe/London' => "Europe/London" irb(main):002:0> tm = Time.local(2012, "dec", 11, 15, 59, 2) => 2012-12-11 15:59:02 +0000 irb(main):003:0> tm.gmt_offset => 0 irb(main):004:0> tm.zone => "Eur" This commit modifies the test so that we expect failure on windows 1.8 and 2.0 x86, otherwise, we expect the test to pass on other ruby platforms. Reviewed-by: Josh Partlow <joshua.partlow@puppetlabs.com>
2014-09-02Merge branch 'master' of github.com:puppetlabs/puppetJosh Cooper1-2/+2
* 'master' of github.com:puppetlabs/puppet: (PUP-3069) Fix path expansion for environment.conf test on Win (PUP-2349) Add windows specific expectation for deprecation_warning
2014-09-02Merge branch 'feature/master/pup-3069-win-spec-fix'Josh Partlow1-2/+2
* feature/master/pup-3069-win-spec-fix: (PUP-3069) Fix path expansion for environment.conf test on Win
2014-09-02(PUP-3069) Fix path expansion for environment.conf test on WinJosh Partlow1-2/+2
The intention in these specs is for the default_manifest setting to be absolute for the platform under test. Without an expand_path, the POSIX style setting we're using will still seem relative on windows, causing these two tests to fail. Really these settings should only be used on a master instance, which would be POSIX, but for completeness sake, this commit expands the initial default_manifest paths.
2014-09-02(PUP-2349) Add windows specific expectation for deprecation_warningJosh Cooper1-2/+10
Previously, the spec test assumed that no deprecation warnings would be issued. However, the test relies on puppet using the `source_permissions` of the source, and that behavior is deprecated on Windows. As a result, the test was failing on Windows. This commit updates the test to expect only the "Copying owner/mode/group/.." deprecation warning on Windows, and no deprecation warnings on other platforms. Reviewed-by: Josh Partlow <joshua.partlow@puppetlabs.com>
2014-09-02(PUP-2349) Add windows specific expectation for deprecation_warningJosh Cooper1-2/+10
Previously, the spec test assumed that no deprecation warnings would be issued. However, the test relies on puppet using the `source_permissions` of the source, and that behavior is deprecated on Windows. As a result, the test was failing on Windows. This commit updates the test to expect only the "Copying owner/mode/group/.." deprecation warning on Windows, and no deprecation warnings on other platforms.
2014-08-30Merge pull request #3032 from ↵Henrik Lindberg13-27/+556
jpartlow/feature/master/pup-3069-add-defaultmanifest Feature/master/pup 3069 add defaultmanifest
2014-08-30(PUP-3069) Clear configuration_file for testsJosh Partlow1-0/+1
The new default_manifest integration spec is parsing actual configuration files and uncovered that our Settings do not clear the @configuration_file data when #unsafe_clear is called. This allows parsed settings to leak across specs. Specifically dropping the @configuration_file in the test helper Settings#clear_everything_for_tests, resolves this, without changing the behavior of the Settings#clear, and through it, the Puppet.clear methods.
2014-08-29(PUP-3069) Test both future and current parser with default_manifestJosh Partlow1-170/+186
Previously the environments/default_manifest_spec.rb was only running with the current parser. This runs the set of tests for both the future and current parser cases.
2014-08-29(PUP-3069) Update default_manifest setting descriptionsJosh Partlow1-5/+17
Better descriptions of default_manifest and disable_per_environment_manifest courtesy of Nick Fagerlund.
2014-08-29Merge pull request #3024 from ↵Josh Partlow8-176/+268
hlindberg/PUP-3117_resource-expression-splat-rocket-alt (PUP-3117) Complete the Resource Expression implementation
2014-08-29(PUP-3069) Change restrict_environment_manifest nameJosh Partlow9-27/+27
After discussion with Nick Fagerlund and Henrik Lindberg, changing restrict_environment_manifest setting to disable_per_environment_manifest to more clearly reflect what the setting does.
2014-08-29Merge pull request #3036 from melissaanne/ticket/master/fix-reportsdir-ownershipKylo Ginsberg3-1/+6
(PUP-3163) Create and manage the mode of $reportsdir
2014-08-29(PUP-3163) Create and manage the mode of $reportsdirMelissa Stone3-1/+6
For redhat and debian, we create and manage a $statedir with ownership set to puppet:puppet. Unfortuntely, we also create a $reportsdir that is owned by root. This means that other applications, even those in the puppet group, could not write to this directory. This commits adds the $reportsdir to both debian and redhat packaging to ensure it is created with the correct permissions (just at the $statedir is), to ensure a more consistent experience for users of our packages.
2014-08-29(maint) Clear record of configured deprecated settingsJosh Partlow1-4/+5
We cache a list of deprecated settings that have been configured in the initial parse_config, so that later initialization steps allow us to read the :disable_warnings value, and then decide whether or not to actually issue a particular warning. But we weren't clearing this cache in the unsafe_clear call, which was allowing this state to leak across specs. Once we added that cache clear to unsafe_clear, we then had to reorder parse_config steps for unsafe_clear, followed by record_deprecations_from_puppet_conf(data).
2014-08-29(PUP-3069) Add an integration spec for default_manifestJosh Partlow1-0/+256
This adds integration testing of the new default_manifest and restrict_environment_manifest settings. It tests all the way from Puppet initialization from actual puppet.conf files and environment/manifest files through catalog compilation, simulating Puppet master activity. Since these settings are purely server-side constructs, in that they do not impact the agent beyond the contents of the final catalog the agent receives, I believe this is sufficient to validate them.
2014-08-29(PUP-3069) Halt compile if environment has manifest conflictJosh Partlow6-3/+110
Henrik brought up that with the new restrict_environment_manifest setting set true, authors of modules in a particular environment may be surprised by a manifest they have specified in their environment.conf not being pulled in, leading to bad behavior when a catalog is executed. Although this is logged on the master, compilation delivery and catalog execution is not prevented. This commit will raise an exception on the master prior to catalog compilation if it detect's a conflict between manifest settings in the requested environment.
2014-08-29(PUP-3069) Add spec test for new default optionsBritt Gresham3-6/+32
Added tests for checking that default_manifest behaves properly when given $environment. Also when restrict_environment_manifest is true with a non-relative default_manifest. This commit also fixed the hook on the :default_manifest setting to validate that $environment was not present when setting the value.
2014-08-29(PUP-3069) Add default manifest settingsJosh Partlow4-15/+125
Some Puppet installations do not use environment specific manifests (particularly when an ENC is in use), however may still have global setup required for all environments. For these installations it is convenient to have a :default_manifest setting specified rather than copying them manifest into every environment. There are also installations which have a separation of roles between users mainting the puppet master, puppet.conf and enc, and users making per environment module changes. In these cases some Puppet installations prefer to restrict the use of per environment manifests. These two use cases were handled by setting the global manifest to a non-interpolated path while setting the global modulepath to a path interpolated with $environment. With these settings being deprecated, directory environment installations did not provide a means of preserving this functionality. This patch addresses this by providing two new settings: * default_manifest - is now the fallback manifest path if non is specified in a given environment's environment.conf. It defaults to the environment root relative path './manifests' which is the same default that was previously hardset in early version of directory environments. * restrict_environment_manifest - if set to true, enforces that environments cannot define their own manifest setting, and validates that default_manifest is set to an absolute path. It is an initialization error if default_manifest is set to a string that has an '$environment' to be interpolated within it. We also log an error if restrict_environment_manifest is true and the loaded environment's environment.conf has a manifest setting that differs from the default_manifest setting.
2014-08-28Merge pull request #3031 from ↵Kylo Ginsberg1-2/+2
andersonmills/fix/master/PUP-3155-improve_pe_version_spec_tests PUP-3155 Improve spec tests around the PE puppet version
2014-08-28Merge pull request #3029 from ↵Kylo Ginsberg3-3/+7
cprice404/bug/master/PUP-3153-guard-against-nil-when-closing-uniquefiles (PUP-3153) Guard against nil when closing Uniquefiles
2014-08-28PUP-3155 Improve spec tests around the PE puppet versionAnderson Mills1-2/+2
Before this commit, when checking the puppet version on a PE build, several characters; '(', ')' and '.'; caused problems with the regex. This commit Regexp.escape-s them.
2014-08-28(PUP-3153) Guard against nil when closing UniquefilesChris Price3-3/+7
In a recent commit we introduced `Uniquefile` to use in place of `Tempfile` for certain code paths. Because `Uniquefile` does not automatically delete files for you, it is necessary to call `close!` explicitly if you wish to make sure that they get removed. In the original commit I did this in a few places in an `ensure` block. However, I did not guard against the possibility that an error might occur when attempting to instantiate the `Uniquefile` object (e.g., file permissions error), and thus the calls to `close!` in the `ensure` blocks may result in a NilClass exception (and also mask the real error). This commit adds guards to ensure that we only try to call `close!` if the `Uniquefile` object was actually instantiated.
2014-08-28(PUP-2984) Remove old installation directory when going from x64 to x86Josh Cooper1-1/+1
Update dependency on puppet_for_the_win: https://github.com/puppetlabs/puppet_for_the_win/commit/c61dda253b09bd855488f7b6dd7332fdf84d3039
2014-08-28Merge pull request #3020 from melissaanne/ticket/master/pupet-1884Matthaus Owens1-0/+15
(PUP-1884) Migrate MSI deps into puppet repo