(PUP-2508) Ensure env & trn-uuid are sent when configurer failures occur

Any failure in the configurer #run code might cause the ensure block to
evaluate early, and a report might be sent missing the details of what
the environment and transaction_uuid should be.

This patch moves where the report fields 'environment' and
'transaction_uuid' are set in the configurer code to ensure they are
populated early.

It also ensures the report environment is modified if the catalog or
server specifies it is different to the launched environment. This is
because we change this mid-flight, so our code simplies updates the
report environment when this happens.

Signed-off-by: Ken Barber <ken@bob.sh>
(packaging) Update PUPPETVERSION to 3.6.0
(PUP-2182) Add virtual_packages feature to package type.

In 3.5.x, the yum package provider changed to accept virtual package
names (packages that provide other package names).

That change in behavior caused some undesirable side-effects. As we did
not give users fair warning that this behavior was changing, we have
decided to change the yum provider back to only accepting "real" package
names by default.

To keep the support for virtual package names, a "virtual_packages"
feature has been implemented on the package type and supported on the
yum package provider.  The feature adds the "allow_virtual" parameter
that controls whether or not virtual package names will be allowed for
install/uninstall.

For now, the default value for this parameter will be false to restore
the previous behavior.  However, a deprecation warning will be issued to
let users know that the default will eventually be changed to true.
Users can prevent the deprecation warning by explicitly setting the
parameter to either true or false.
(PUP-2031) Fix broken range support in unless_uid parameter.

The unless_uid parameter on the resources type attempts to support
ranges, but the implementation is expecting ruby Range types during
munging, which the current parser implementation will not produce.

Additionally, it tries to parse strings of "[x,y]" and "[x..y]" as
ranges but fails to properly remove the brackets and fails to
munge the value.

As there is currently no way to efficiently represent a range for this
parameter, we've decided to back out this broken support for ranges and
instead limit the unless_uid values to integers, integer strings, and
arrays of integers or integer strings.

Users that want to use a range will have to make use of the stdlib
range() function, which is what they have to do currently given the
range support was broken.

In Puppet 4.x, we should look to making use of the future parser's
support for ranges in the Puppet language for this parameter.
Merge pull request #2626 from kbarber/ticket/stable/pup-2508-no-environment-trn-uuid-compilation-failure

(PUP-2508) Ensure env & trn-uuid are sent when configurer failures occur
(maint) Remove dead code in configurer
(PUP-2522) Include transaction_uuid in node requests

This makes the transaction_uuid available for use by a node terminus, to make
it easier to track the full catalog lifecycle when using an ENC.
Merge branch 'stable'
Merge pull request #2654 from peterhuene/pup/2182

(PUP-2182) Add virtual_packages feature to package type.
Merge branch 'stable'

* stable:
  (PUP-2182) Add virtual_packages feature to package type.

Conflicts:
	lib/puppet/provider/package/yum.rb
(PUP-2505) Implement DELETE verb for HTTP routing

Duplicates:
   PUP-2483 Deleting a certificate does not work with the API
   PUP-2516 Delete a clients certificate with HTTP API no longer working

HTTP API requests using the DELETE method are failing with "Server Error:
undefined method `each' for nil:NilClass"...

e.g.
 curl -k -X DELETE https://${PMASTER}:8140/production/certificate_status/$AGENT

Traced problem back to missing specification for :DELETE in @method_handlers
(PUP-2505) Add method to specify delete handlers

Amending pull request per review comment.  Adding handler for delete
method.
(PUP-2505) Add test for delete handling
(PUP-2505) Reject requests with unknown HTTP verbs

When we forgot to handle DELETE the error showed up as a 500 because the
code tried to call a method on nil. The correct response is a 405, since
the server does not handle that method. Now that GET, POST, PUT, HEAD,
and DELETE are all covered, it should be safe to respond with 405 in all
other cases.
(PUP-2582) Update apache vhost SSL settings

Previously the apache vhost defined an SSLCipherSuite which included
several weak ciphers. This commit disables the following algorithms:
aNULL, eNULL, DES, 3DES, IDEA, SEED, DSS, PSK, RC4, MD5

Second, previously LOW, SSLv2, and EXP were removed, but not
killed from the list, which meant that they could be added again in
subsequent declarations.

Third, ALL:!ADH meant that AECDH was enabled. This commit uses !aNULL
to disable all anonymous authentication algorithms. It also explicitly
specifies !eNULL (anonymous encryption algorithms).

Fourth, we were only enabling SSLv3 and TLSv1, but not TLSv1.1 or
TLSv1.2. TLSv1.2 protects against attacks known to work against SSLv3
and TLSv1.0.

Finally, SSLHonorCipherOrder is set to on, because certain clients do
not send ciphers in the correct preferred order, and this setting will
help mitigate that problem.

Thanks to Aaron Zauner <azet@azet.org> for bringing this to our attention.
Merge branch 'pr/2657' into stable

* pr/2657:
  (PUP-2582) Update apache vhost SSL settings
Merge pull request #2652 from peterhuene/pup/2031

(PUP-2031) Fix broken range support in unless_uid parameter.
Merge remote-tracking branch 'zaphod42/issue/stable/pup-2505-delete-not-respected' into stable

* zaphod42/issue/stable/pup-2505-delete-not-respected:
  (PUP-2505) Reject requests with unknown HTTP verbs
  (PUP-2505) Add test for delete handling
  (PUP-2505) Add method to specify delete handlers
  (PUP-2505) Implement DELETE verb for HTTP routing
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (PUP-2582) Update apache vhost SSL settings
  (PUP-2505) Reject requests with unknown HTTP verbs
  (PUP-2505) Add test for delete handling
  (PUP-2505) Add method to specify delete handlers
  (PUP-2505) Implement DELETE verb for HTTP routing
(PUP-2519) Create the default directory environment

Directory environments are not guaranteed to exist; Puppet provides a
fallback staticly loaded environment for the default production
environment if it does not exist, but we would prefer to set up a real
directory environment if possible to provide a better experience for new
installations.

This commit adjusts the Puppet::Settings catalog to create the default directory
environment in the first `environmentpath` directory if that directory
exists.

Now that the production directory environment is created implicitly by
the Puppet settings catalog when we have an environmentpath, the
can_enumerate_environments test needs to expect that the production
environment will be there along with the two we have explicitly created.