The openbsd spec tests mistakenly used File.new instead of File.open.
Fix this to use .read, not .open.
(Maint): Re-enable tests on Windows

These tests now pass on Windows.  Removed the `pending` block and
re-indented, no code changes.
Add additional commits to CHANGELOG missed in 2.7.19rc1
(#15803) add self.instances to zpool provider

- Adds self.instances which makes use of zpool list
- Adds a test case for checking that it works.
Use Win32 API atomic replace in `replace_file`

The changes to enable Windows support in `replace_file` were not actually
complete, and it didn't work when the file didn't exist - because of
limitations of the emulation done on our side, rather than anything else.

Windows has a bunch of quirks, and Ruby doesn't actually abstract over the
underlying platform a great deal.  We can use the Windows API ReplaceFile, and
MoveFileEx, to achieve the desired behaviour though.

This adds even more conditional code inside the `replace_file` method to
handle multiple platforms - but it really isn't very clean.  Better to get
this working now, then refactor, though.

Cherry pick of: 73e302bbf5ab4a6c5513a39070e2c907542775ae

Conflicts:

	lib/puppet/util.rb
	spec/unit/util_spec.rb
(#15471) Ensure non-root can read report summary

The security fix for locking down the last_run_report, which contains
sensitive information, also locked down the last_run_summary, which does
not contain sensitive information. Unfortunately this file is often used
by monitoring systems so that they can track puppet runs. Since the
agent runs as root and the monitoring systems do not, this caused the
summary to become unreadable by the monitoring systems.

This commit returns the summary to being world readable which undoes
part of the change done in fd44bf5e6d0d360f6a493d663b653c121fa83c3f
(#15471) Fix setting mode of last_run_summary

The writlock function didn't work with setting the mode on the
last_run_summary file. This backports some of the work in commit
7d8fd144949f21eff924602c2a6b7f130f1c0b69. Specifically, the changes
from using writelock to replace_file for saving the summary file. This
builds on top of the backport of getting replace_file to work on
windows.
(Maint) Add cprice to Git mailmap

Without this patch I noticed the git log contains both Chris Price and
cprice as separate authors.  This patch fixes the problem by normalizing
them to Chris Price <chris@puppetlabs.com>
(Maint) Move Trollop inside of Puppet

The Trollop library is improperly vendored inside of Puppet without this
patch applied.  This is a problem because end users or developers who
have the trollop gem installed will be monkey patched by Puppet since we
open up the top level Trollop module namespace.

This patch fixes the problem by placing Trollop in the namespace of
Puppet::Util::CommandLine::Trollop.  This fixes the problem because the
only place Trollop is used by Puppet is inside the
Puppet::Util::CommandLine class.  Therefore we no longer need to use the
absolute namespace notation of the leading ::.

This also prevents us from monkey patching the real Trollop gem that
lives at ::Trollop if it's been loaded into the process.
(Maint) Use $LOAD_PATH instead of $:

This is just slightly more readable.
(Maint) Clean up markdown in README_DEVELOPER

Without this patch the README_DEVELOPER file displays poorly in my Vim
buffers.  This patch adds some additional markup to separate the code
snippets from the prose.
(#15337) Do not merge user and system puppet.conf

Puppet 3.x reads settings from both ~/.puppet/puppet.conf and the system
puppet.conf without this patch applied.  This is a problem because it
makes it difficult to determine where to load plugins and extensions
from at runtime.  Merging the configuration file also makes it more
difficult to explain where a particular setting is taking effect.

This patch makes the intended `puppet.conf` reading behavior the
following:

 1: If provided, use explicit puppet.conf in `--confdir`
 2: If root, use system puppet.conf
 3: Otherwise, use ~/.puppet/puppet.conf

This patch also changes the behavior of rack puppet master applications.
We now intended for the rack configuration file, `config.ru` to
explicitly set `--confdir` to avoid reading from
`~/.puppet/puppet.conf`.  Please see the example in
`ext/rack/files/config.ru` for an up to date rack configuration.
Fixed #11686 - Updated documentation for exec timeout

The exec timeout of 300 seconds was previously not mentioned in the
exec type documentation. This commit makes the default value clear.
Merge pull request #1007 from nfagerlund/tickets/master/11686

Fixed #11686 - Updated documentation for exec timeout
(#11870) Add registry module

Ruby includes a built-in set of modules and classes for interacting with
the registry, however, it is only present on Windows.  This makes it
difficult to write spec tests that can run on non-Windows platforms due to
the `Win32` namespace and related constants.

This commit adds a utility module to wrap the Windows specific code.  This
way if you write a module/class that uses the registry, you can just add
expects/stub expectations to the utility module or the class that
includes/extends it.
(#11870) Refactor windows-specific requires

Previously, we were explicitly requiring windows-specific code, which
made it hard to write spec tests that still run on non-Windows platforms.

This commit refactors the requires into the
`Puppet.features.microsoft_windows?` definition, so that if we are on
Windows all of our dependencies will be satisified, and if we're not on
Windows, we won't accidentally load code that doesn't apply.  Also,
re-ordered the dependencies based on where they come from, e.g. ruby vs
gem.
(#11870) Add package options parameter

This commit adds a new package options parameter type that accepts an
array of strings or hashes. For example,

    [ 'arg1', { 'key2' => 'val2', 'key2' => 'val3' }, 'arg4' ]

The parameter preserves the order of array elements, as it may be
significant for a provider, e.g. '--source', 'URL'. Order of hash
key-value pairs is based on the natural sort order of the keys. Any
argument containing spaces will automatically be quoted, so that you don't
have to check that in each manifest.

The package options parameter is not currently used, but will be in a
future commit to enable install and uninstall options to be passed to the
package provider.

Oddly, if any puppet parameter is specifed as an array with one element,
puppet's parser-based resource will automatically de-arrify it (see commit
46252b5b). As a result, if an array is a valid value, then the validate &
munge methods cannot reject an element that isn't an array.

Therefore, the package options munge method arrayifies values, which has
the side-efect that it will accept the 2.7.x style way of declaring
install_options for MSI packages. Moreso, it means that the old way cannot
be deprecated without changing core puppet behavior.
Merge remote-tracking branch 'rahul/ticket/3.x/15803_zpool_instances' into 3.x

* rahul/ticket/3.x/15803_zpool_instances:
  (#15803) add self.instances to zpool provider
(#15803) Split string for ruby 1.9

Previously, the spec test passed on ruby 1.8, because String includes
the Enumerable module, so that the collect method could be called on the
string. This doesn't work in ruby 1.9.

This commit splits the output of the svcs command on newlines, and then
collects the service instances.