(PUP-3227) Address man page ownship conflicts

Prior to this commit, upgrading from puppet=2.7.23-1~deb7u3 and
puppetmaster=2.7.23-1~deb7u3 to puppet=3.7.0.29-1puppetlabs1 and
puppetmaster=3.7.0.29-1puppetlabs1 fails. I believe this problem is due
to how Debian chose to package puppet-common, which owns
`/usr/share/man/man8/puppet-master.8.gz`.

This commit adds in a `Conflicts:` to the puppetmaster and
puppetmaster-common packages to make sure that we can successfully
upgrade from these older package versions. However, if a user has
puppetmaster and puppet older than 3.3.0 installed on a machine, and
only upgrades puppetmaster, this will uninstall the puppet package from
the system.
(maint) Ensure config acceptance resets uid

Now that we are testing puppet packages with service scripts, the puppet
master defaults to running, and we cannot adjust the puppet user uid
while that user is associated with a runing process. This acceptance
test was stopping the puppet master to remove the system puppet
user/group, but was failing to stop the puppet master when restoring the
system user group, resulting in the puppet system user retaining it's
new uid, and some files (particularly in ssldir) being owned by the old
uid.  This would potentially cause failures depending on test order.

This commit fixes the puppet_manages_own_configuration_in_robust_manner
test to stop the puppet master and restore the original user uid.
(maint) Remove the resource/host/should_query test

This test was attempting to verify that the host provider will show an
entry as present in a target host file.  But in fact, because Puppet has
just the single resource representing a host entry of the given name,
what this test is doing is ensuring that the 'localhost' host entry is
found in the given target file. On vms with two localhost entries (say
127.0.0.1 and ::1) this ends up moving the ::1 entry to the target file,
and the system continues to work. But on a system with a single
localhost entry in its /etc/hosts, this ends up moving that to the
target tmp file and crippling localhost name resolution for subsequent
tests. See PUP-1479 for more info.
(PUP-3248) Fix PMT tests for directory environment

The beaker host['distmoduledir'] variable is not meaningful if the
host is using directory environments (e.g. 'production').

This commit updates the helper methods for validating that a module
is (or is not) installed on the host by iterating over the
modulepath if a specific modulepath is not provided.

The calls to these helper methods have been updated for the change
in parameter ordering in the helper methods.
Merge pull request #3106 from jpartlow/maint/stable/ec2-centos6-acceptance-fixes

Maint/stable/ec2 centos6 acceptance fixes
(PUP-3248) Use tmpdir for generating environments

This commit changes calls to the
generate_base_legacy_and_directory_environments helper to use a
tmpdir rather than master['puppetpath'] to isolate the test
environments and prevent collisions.

The generate_base_legacy_and_directory_environments has also been
altered to remove the `environmentpath` setting in the generated
configuration file.
Merge pull request #3109 from johnduarte/pmt_directory_env_support

(PUP-3248) Fix PMT tests for directory environment
(maint) Include fedora as a platform to test with service packages.

Fedora had been left out, through no fault of its own, and was being
tested without starting and stopping via service scripts.
(PUP-3339) Confine failed test off of Fedora 19

There seems to be a bug in `usermod` on Fedora 19 which is causing
this acceptance test to fail. The bug does not appear to be present
in Fedora 20. Since Fedora 19 will likely each end of life soon,
just confine the acceptance test off the platform rather than try
to find a work around in puppet.
Merge pull request #3122 from hkenney/issue/stable/pup-3339_confine_failed_test_off_of_fedora_19

(PUP-3339) Confine failed test off of Fedora 19
(PUP-3126) upgrade win32-service to 0.8.6

This upgrades the win32-service gem to at least 0.8.6 to take advantage
of the fixes to the service gem. This change includes only the fixes that
we have already applied patches to in puppet-win32-ruby.
PUP-3366 Fix issues with string/enum type assignable calculations

There were errors in the calculation of string/enum calculation.
Basically Enum == String, if String is size constrained then
Enum < String. This fixes this calculation.

There were no tests for this, they are now added.
(PUP-3244) ENC ignores missing directory environments

When using an ENC, if an environment that didn't exist was defined for a
node puppet would place the node into the production environment instead
of raising an error to alert the user that the environment that had been
requested did not exist.

This commit changes the behaviour when an environment is defined in an
ENC but does not actually exist. Instead of placing the node into the
production environment a Puppet::Environments::EnvironmentNotFound error
is raised.
Merge pull request #3128 from ferventcoder/ticket/stable/PUP-3126-upgrade-win32-service

(PUP-3126) upgrade win32-service to 0.8.6
(PUP-3126) Bump vendored gem dependencies

Include win32-service 0.8.6 when building MSIs.
(PUP-3365) Change 3x deep map of undef to only do surface map

This changes the mapping of arguments to 3x function calls to not
map undef to empty strings except at the surface level. Other mappings
are still done as they are required for frozen strings, and values
having a type that is not supported by the 3x functions.
(PUP-3258) node exec indirector: default to environment, not its name

Nodes can be classified through a local executable that prints YAML with
a node specification. This is enabled through the node_terminus=exec option.
Since PUP-2519, this setting would break `puppet apply`. Trying to apply
any manifest would lead to Puppet applying the default environment's site
manifest instead.

The reason for this is that the node terminus will include the current
environment's name in the node lookup result. This in turn makes Puppet
look up the environment per name. This is not the desired behavior, because
Application::Apply performs the lookup and further operations with a localized
environment that overrides the site manifest.

Solved by including the current environment object in the returned node object
instead of its name.
(maint) reduce repitition in Application::Apply integration spec
(PUP-3244) Acceptance Tests for Nonexistent Environments

Added acceptance tests to test if an error is raised if an ENC specifies
a nonexistent environment for a node.
(maint) Fix cve-2013-4761 acceptance test

The acceptance test was removing the file that would have been executed
by the exploit, and was therefore passing regardless of the state of the
bug. Fixed so that the exploit file creates a separate exploited marker
file, and the test removes and checks only the marker file.