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>
(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
(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-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.
(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
(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.
(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-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.
(PUP-1937) Revert changes to with_version

Changes were made to with_version for Windows to use beaker's puppet
command instead of Command.new directly. This change is now reverted.
(maint) Ensure Beaker failure bubbles up through Rake

When running Beaker from our acceptance Rake tasks, exceptions from the
shell for a failed test run were being lost.  The Rake sh() helper does
not raise an exception for non-zero exit codes if you pass it a block to
inspect the process results.

This commit passes no block to the sh() helper so that failed beaker
runs will raise an exception, causing Rake to exit non-zero.  The code
to preserve_configuration for re-runs is simplified as well so that we
always generate a preserved_config.yaml unless we are currently running
with one.
(packaging) Update PUPPETVERSION to 3.5.0-rc3
(packaging) Update PUPPETVERSION to 3.5.0
(maint) Turn off inclusion of EPEL repo in acceptance runs

Our acceptance suite no longer needs the EPEL repository enabled.
Disables the beaker flag that was causing EPEL to be loaded on rhel
hosts under test.
(maint) Update external_ca_support/fixtures with 2048 bit keys

A recent security update is causing httpd package on RHEL6.5 to bring in
a more recent openssl (1.0.1e-16.el6_5.4) which was failing to work with
the 512bit RSA keys in our test fixtures.

This commit updates the certchain.sh to produce 2048bit RSA keys.  This
script was then run to produce a new set of fixture artifacts, and the
cert/keys for the fixtures were then updated from its output.