(PUP-3605) Add new OpenBSD user provider

This new provider is now needed because of the '-S' flag to usermod as well as
the different way expiry is set.
(PUP-1270) downgrade IPS packages in-place instead of uninstall-reinstall

Only use 'pkg install' when the package is absent, and 'pkg update'
otherwise. pkg(1) can do both downgrades and upgrades this way.
(PUP-1270) Use full IPS package version matching

Originally, the pkg provider would only consider IPS versions partially,
eg. '1.0-0.151006', due to not calling pkg(1) with -v. This version
string is missing the "build version" and "timestamp" (documented in
pkg(5)). This causes several issues:

- ensure => latest does nothing when the updated package only has a
  changed timestamp
- ensure => '1.0,5.11-0.151006:20140220T084443Z' is always applied,
  because it's not string equal to what puppet thinks is the installed
version ('1.0-0.151006'); this causes pkg(1) to exit with status 4,
which makes puppet throw an error
- ensure => '1.0-0.151006' sort of works; on the first run, it installs
  the latest available matching version (due to pkg(1) working that
  way), and on subsequent runs does nothing. This can lead to subtle bugs
  where systems provisioned later do not necessarily have the same version
  of a package installed (ie. if a newer-timestamped one was released in
  the meantime).

This commit implements a provider-specific insync? for the pkg type.
Unfortunately it's not possible to fix this issue without allowing
less-than-explicit version numbers in ensure (because that's the
original behavior) without breaking backward compatibility. We try to
match the default behavior of pkg(1) when encountering
less-than-explicit versions in ensure, and throw warnings for such
implicit version matches.
(PUP-1270) don't fail implicit version install when is == :absent
(PUP-1270) add tests for implicit version ensures
(PUP-3013) Accept. tests - 3.7 PMT updates build

This commit adds additional acceptance test coverage for updates
the puppet module build command. These tests validate the
following:

    * detection of symlinks in module
    * detection of file changes created by build process
(maint) Untie parser/files and module

The parser/files module was explicitly handling
Puppet::Module::InvalidName, forcing it to require puppet/module. These
errors are being handled by Puppet::Node::Environment at a lower layer,
and we no longer need to couple module and parser/files.

In addition, Pupper::Module#match_manifest ensures that init.pp is
always added if present, which means that explicitly searching for
init.pp would return an array with the init.pp file listed twice. Hence
the added uniq.
(PUP-3268) Remove use of templatedir setting from parser/files

The templatedir setting is deprecated and being removed for Puppet 4.
It was used only in Puppet::Parser::Files to provide an alternate path
location for templates, instead of looking them up in modules. This
commit removes the use of templatedir, allowing paths to be looked up
only from an absolute path or relative to a module.
(maint) Refactor parser/files find helpers

Puppet::Parser::Files#find_file and #find_template methods were
performing the same work to vet an absolute path and lookup a module
prior to calling an implementation specific method on that module. The
find_template method had a helper which this commit generalizes to work
for both find_file and find_template.
(PUP-3268) Remove --manifestdir reference from application/doc

The doc application used --manifestdir as a means of specifying the
directory of manifests to generate docs for in rdoc mode.  Since
manifestdir is being removed for Puppet 4, and the Puppet Strings module
is being used instead for all manifest documentation, this commit
removes references to manifestdir in the doc application.
(PUP-3520) Refactor Puppet OID registration to be explicit

Prior to this commit, the Puppet::SSL::Oids module would register with
OpenSSL the list of special Puppet OIDs every time it was
loaded (i.e. implicitly during require 'puppet/ssl/oids'). This commit
refactors the registration calls into a module method that is invoked
from the following application faces: agent, master, cert, certificate,
and ca.

The reason for this refactoring is to try and avoid all implicit calls
into OpenSSL so that it is easier to eliminate/avoid the OpenSSL usage
when the Puppet ruby code is loaded into Puppet Server.

Since Puppet OID registration is no longer automatic, tests that rely on
CSR extensions using the Puppet OIDs must explicitly register them for
use. This is necessary since the tests do not go through any of the
application faces where the OID registration has already been taken care of.
(maint) PUP-3638 clarify puppet-doc manpage re: rdoc on manifests

remove the manifest examples and related doc
this functionality has been removed in PUP-3638
(PUP-2563) Gracefully exit on ruby 187

Previously, running puppet on ruby 187 would fail in an unhelpful way:

    in `const_defined?': wrong number of arguments (2 for 1) (ArgumentError)

Since users have historically installed puppet using whatever ruby
version happens to be installed, we want to ensure puppet displays a
useful error message that ruby 1.9.3 or greater is required.

This commit puts the check in lib/puppet.rb, which handles the various
puppet entry points: when executing the `puppet` command, when using
puppet as a library, e.g. `require 'puppet'`, and via passenger's
config.ru. In the `puppet` command case, we need to rescue the
LoadError, print the error message and exit. In the other two cases, we
let the application decide how it wants to handle the LoadError.
Merge pull request #3319 from nwolfe/maint/master/pup3520-refactor-oid-registration

(PUP-3520) Refactor Puppet OID registration to be explicit
Merge pull request #3381 from er0ck/maint/master/PUP-3638-remove_manifest_rdoc_from_doc_manpage

(maint) PUP-3638 clarify puppet-doc manpage re: rdoc on manifests
(maint) Fix two loader issues

This fixes two existing bugs related to the loaders.  The first is that
the Puppet::Pops::Loaders was always looking up the 'production'
environment conf, rather than the environment.conf for the provided
environment.  The second was that the new environment_data_provider
setting was mssing from the Static environment conf class, breaking
Static environment loaders.
(PUP-3268) Use explicit environment references in specs

Specs which relied on legacy environment loaders implicitly generating
environments for unknown environment names need to be updated to use
explicitly created environments. This is because the directory environment
loaders will instead raise environment not found errors.  Since legacy
environments are going to be removed, this change needs to happen before
we add a default to the environmentpath setting and remove the legacy
code.

These specs have been adjusted to either directly supply a created
environment to the methods under test, or to set up a static environment
loader providing some explicitly set of environment(s) to the tests.

I also made some stylistic changes in specs that I was touching to avoid
mocking, replace use of instance variables with let statements, and to
prefer expect over should.
(PUP-3268) Set directory environments as default

Prior to this commit, environmentpath defaulted to the empty string,
which meant that legacy environment loaders would be used. As a first
step to removing the legacy environment code, environmentpath is now set
to "$confdir/environments", defaulting to directory loaders.

In addition, this commit completely removes the deprecated manifestdir
and templatedir settings. It also removes the defaults for manifest and
modulepath, which are only to be allowed in environment.conf and on the
commandline. Enforcement of that is still to be done, as noted by the
XXX_ENV comments. Manifest's default is changed to '/dev/null'.
(maint) Add inspect calls for debugging Settings value sets

These methods just make it a little easier to debug the Puppet::Settings
ChainedValues value sets, avoiding output of the default setting
instance themselves which contain reference to the settings object,
which has all the settings...and produces a lot of output.
(PUP-3268) Set manifest default to nil

The manifest setting can still be set on the commandline but has no
meaningful default.  It was changed to /dev/null as an interim fix,
because a FileSetting has difficulty with "" (its munge method expands
this to current working directory), and with nil (breaks in the Settings
catalog). In this patch, Settings#to_catalog is changed to ignore file
settings with a nil value.

The lack of a default manifest value has an impact on the specs because
many of them execute without a fully initialized settings layer, and
Settings.global_defaults_initialized? is still false. Previously this
was guarding whether or not we would read a directory environment
environment.conf, because we could not be sure of an environmentpath,
but now that this setting has a default, this guard is dropped from
Settings#value_sets_for