Fix for #3984 -- SELinux warns about changes it doesn't actually make

Volumes that don't suport SELinux should be considered in_sync so they don't
generate spurious change notice.

Patch from Darrell Fuhriman
Add stdin parsing to puppet parser validate
(#11727) Support STDIN for `puppet parser validate`

This adds an acceptance test for the STDIN validation feature of the `puppet
parser validate` action.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Maint: Fix borked help/man output for node clean

This action's help was busted:

* You can't put bulleted lists in the description string of an action. It blows
  up the man page formatting.
* Description must begin with a description of the action, not a continuation of
  the summary; otherwise it makes the output of 'puppet help cmd action' useless.
* The description of how unexport works wasn't sufficiently clear.
The openbsd spec tests mistakenly used File.new instead of File.open.
Fix this to use .read, not .open.
(#15731) Full certificate metadata for pson

When attempting to get certificate metadata using the REST API, the API
returns a different set of metadata based on whether one requests yaml
or pson, neither of which are the full set of metadata.
This commit adds dns_alt_names/subjectAltNames to the metadata for pson.
(#15731) explicit fingerprint digest for pson

The pson metadata for a certificate (or certificate request) contains a
fingerprint which was created with the default digest algorithm. This
algorithm must change as we move to FIPS 140-2 compliance because MD5 is
explicitly denied.
This commit includes fingerprint metadata for 3 stronger hashing
algorithms and explicitly calls out that the fingerprint is for that
algorithm.
(Maint): Re-enable tests on Windows

These tests now pass on Windows.  Removed the `pending` block and
re-indented, no code changes.
(#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.
(#15521) Convert to using host stub wrapper

This patch converts the module acceptance code to using the host stub wrapper
now provided in puppet-acceptance: `stub_forge_on`.

This will allow us to change the forge host we are stubbing dynamically as
apposed to manually changing it everywhere in acceptance code.

This also changes the cases where we have teardown code to use the new
`teardown` block, and to use `rm -rf` for file cleanup to avoid puppet backup
duplication issues.
(#15547) make sure that the LANG sentinels being used are present

previously, we used es_ES.UTF-8 as the sentinel value while checking for override
of LANG values in user environment. commands in solaris errors out when the LANG
being used is not present in the locales installed in the system.

This patch changes the lang sentinel being used to en_US.UTF-8 which is present in
a normal solaris install.

For checking the overriding, the procedure is to change the LANG to "C" which is
different from either so we modify the behavior of the test itself.
Don't issue deprecation warnings for allow_ip

A deprecation warning was issued when IP addresses were used with allow. One
had slipped through and was still printing when allow_ip was used.
Merge remote-tracking branch 'rahul/ticket/3.x/15547_valid_lang_sentinels' into 3.x

* rahul/ticket/3.x/15547_valid_lang_sentinels:
  (#15547) make sure that the LANG sentinels being used are present
(#15569) ensure that augeas prints parse errors.

Ensure that loading augeas files prints parse errors if any.

This seems to have fallen through the cracks. It was originally
present in pull/733 ticket:14136

This fixes the build failure that was present in boxes that contained
augeas.
(#14515) Tests fail with mocha 0.11.4

Prior to this commit, these tests only worked with mocha 0.10.5 because
the tests were broken and trying to stub methods on nil, which mocha
0.11.4 no longer allows. After this commit, these tests work with both
mocha 0.10.5 and 0.11.4.
Fix stubbing on nil in some specs
Don't require mocha in spec_helper

Rspec will automatically require mocha, and it knows how to do it properly
depending on the mocha version. This eliminates spurious deprecation warnings
about how mocha is loaded.