(maint) Use git mirrors for puppet/hiera/facter installation

The git server and fork used to construct git urls for installation
projects via beaker was previously hard set to be github.com and
puppetlabs.  While we continue to default to these values, this commit
allows them to be set globally or per installed project via environment
variables so that we can take advantage of internal and local git
mirrors and daemons.
PUP-1975 Add environment information to facts save during compilation

Previously the save method on the indirector was called without including
the environment information. This patch includes the environment so a custom
terminus may utilize this information during storage.

Signed-off-by: Ken Barber <ken@bob.sh>
PUP-1975 Include transaction_uuid in facts terminus save during compilation

This includes transaction_uuid in the options sent to the save method for the
facts terminus.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #2444 from kbarber/ticket/stable/pup-1975-add_environment-to-facts-save

PUP-1975 Add environment information to facts save during compilation
(PUP-1210) Error if missing password info on OSX 10.8

When managing passwords on OSX versions >= 10.8 the password needs to
hashed using PBKDF2. PBKDF2 uses a salt and a number of iterations,
which the puppet user type supports (specifically for this), and are
critical parts of the password storage. Many users seem to have been
tripped up by this change (since no other systems that are managed do
this, including older versions of OSX) and created user accounts that
were unable to be logged into.

This causes the provider to fail on >= 10.8 if any one or two of the
salt, iterations, or password are missing. This should provide better
guidance and error messages for users in this situation.
(PUP-1210) Provide clear guidance on OSX passwords

This tries to make clear what properties need to be used when managing
passwords on OS X >= 10.8, since it is very different from other
providers.
(PUP-1944) Fix issue with manifest being a directory when initializing

The issue was that Puppet manages files and directories mentioned in
settings (to set the correct owner and mode). The :manifest setting
was a :file settings type and this did not work well when the :manifest
was a reference to an existing directory ("cannot change a directory to
a file") and the puppet master refused to start.

This commit changes this by introducing a new settings type;
:file_or_directory that manages the path as a directory if it exists or
if the path ends with slash (/ or \).
(PUP-2017) Change TupleType size to mean total number of entries

The TupleType was implemented so that the size constraint only
applied to the last type. This was difficult to work with. It is
far better if the size constraint works the same way as for an
array, only that the types can be different per index. Thus a size
constraint of 2,3 for the tuple types t1, t2, t3 means that t1, and t2
are required and t3 is optional. If the size range is > the number of
types, the last type repeats.

Conflicts:
	lib/puppet/pops/types/types.rb
Merge pull request #2459 from hlindberg/pup-2017_tuple-type-size-constraint

(PUP-2017) Change TupleType size to mean total number of entries
Merge pull request #2457 from zaphod42/issue/stable/pup-1210-invalid-passwords-set-on-osx

(PUP-1210) Error if missing password info on OSX 10.8
Merge pull request #2461 from hlindberg/pup-1944_management-of-manfests-setting

(PUP-1944) Fix issue with manifest being a directory when initializing
(PUP-2009) Lookup environment from settings in interpolation

Settings#convert() used to have the behavior that if it was
interpolating $environment, and no environment was available to the
method, it would fall through and make another setting lookup for
environment.  This would result in the default or set environment being
obtained.

In 00c2abf of the #23373 command line manipulation of puppet.conf work
which involved a refactor of the setting parsing, this behavior changed,
such that whatever @environment was set in the ChainedValues instance
performing the setting lookup and interpolation, that value would be
returned for $environment, even if nil.

This is the case when asking an actual Setting instance what it's value
is, as it looks it up from settings without supplying an environment,
which results in something like
'manifestdir=/foo/environments/$environment/manifests' interpolating
as '/foo/environments/manifests'.  This can result in the bug seen in
PUP-2009 where a master can fail attempting to manage this typically
non-existent directory because of Settings#use() and to_catalog().

This commit restores the old behavior, allowing interpolation of
$environment to lookup environment from settings when no environment
value was explicitly passed in.
Merge pull request #2462 from jpartlow/issue/stable/pup-2009-manifestdir-dynamic-environments-fails

(PUP-2009) Lookup environment from settings in interpolation
(maint) Check for files by full name

Periodically this test would fail with a message about some path being a
directory. It turns out that what was happening was that that generated
name for the temp directory would end in "one" or "two". This caused the
test to detect the directory entry in the response from the search
request to be one of the files and so it would try to read the contents,
which wasn't possible because it was the directory.

This changes it to check for the files by the full path and use
"include_in_any_order" to pull together two tests into one.
(packaging) Update PUPPETVERSION to 3.5.0-rc2
Merge tag '3.5.0-rc2' into stable

3.5.0-rc2
(maint) Pin rake

Rake 10.2 drops support for ruby 1.8.7. This seems to manifest in all
sorts of strange ways.
(maint) Pin rake for acceptance to the last 1.8 compatible version
(PUP-1937) Calling 'ruby' on Windows Fails for PE

The 'ruby' executable does not exist on a PE installation. Instead, the
real name is 'ruby.exe' and it is located within the PE installation
directory. This commit includes a new method (ruby_cmd) in WindowsUtil
for finding the correct executable name and fixes three tests that call
'ruby' directly on Windows.
(PUP-2039) Fix rpm package provider usage of --whatprovides.

The fix for PUP-897 (commit ecb761e24a) introduced always passing
--whatprovides to rpm when querying for packages. This breaks querying
for packages that have architectures specified, e.g.
'vim-enhanced.x86_64'.

The proper way to do this is to first query without --whatprovides and
see if rpm finds a package by the given name.  If rpm fails to find a
package, fallback to using --whatprovides to support querying for
virtual package names.