Avoid circular requirement in FileMetadata indirection
Try again to avoid circular dependency in file indirections

Requiring the model at the end of the file seems the best approach for now.
Merge remote-tracking branch 'upstream/2.7.x' into 2.7rc
(#15264) Custom title patterns can fail cryptically.

If a type uses a composite namevar and none of the supplied title
patterns matched, #parse_title would return a nonsensical array value.
This would lead to unexpected behavior like output like:

    /usr/lib/ruby/1.8/puppet/puppet/resource.rb:235:in `to_hash': undefined method `merge' for #<Array:0x007ffba3d80d78> (NoMethodError)

If a type overrides the title_patterns method and nothing matched,
there's no possible way to recover from this. To prevent misleading
errors from being thrown, this patch raises an error if none of the
title patterns matched.
(#15665) Fix issue with eix-update on newer eix (>=0.25.2).
Merge branch '2.7.x' into 2.7rc
Update CHANGELOG lib/puppet.rb conf/redhat/puppet.spec for 2.7.19rc1
Add additional commits to CHANGELOG missed in 2.7.19rc1
Merge pull request #983 from romke/ticket/2.7.x/15665_eix_update_run_every_time

(#15665) Fix issue with eix-update on newer eix (>=0.25.2).
Use Win32 API atomic replace in `replace_file`

The changes to enable Windows support in `replace_file` were not actually
complete, and it didn't work when the file didn't exist - because of
limitations of the emulation done on our side, rather than anything else.

Windows has a bunch of quirks, and Ruby doesn't actually abstract over the
underlying platform a great deal.  We can use the Windows API ReplaceFile, and
MoveFileEx, to achieve the desired behaviour though.

This adds even more conditional code inside the `replace_file` method to
handle multiple platforms - but it really isn't very clean.  Better to get
this working now, then refactor, though.

Cherry pick of: 73e302bbf5ab4a6c5513a39070e2c907542775ae

Conflicts:

	lib/puppet/util.rb
	spec/unit/util_spec.rb
(#15471) Ensure non-root can read report summary

The security fix for locking down the last_run_report, which contains
sensitive information, also locked down the last_run_summary, which does
not contain sensitive information. Unfortunately this file is often used
by monitoring systems so that they can track puppet runs. Since the
agent runs as root and the monitoring systems do not, this caused the
summary to become unreadable by the monitoring systems.

This commit returns the summary to being world readable which undoes
part of the change done in fd44bf5e6d0d360f6a493d663b653c121fa83c3f
(#15471) Fix setting mode of last_run_summary

The writlock function didn't work with setting the mode on the
last_run_summary file. This backports some of the work in commit
7d8fd144949f21eff924602c2a6b7f130f1c0b69. Specifically, the changes
from using writelock to replace_file for saving the summary file. This
builds on top of the backport of getting replace_file to work on
windows.
(Maint) Simplify CONTRIBUTING.md

The previous CONTRIBUTING.md was verbose and prone to change as branches
changed. After discussion on puppet-dev I've cut it down a lot and changed the
policy for which branch to target to be a "prefer master" policy where it is up
to the merger to make sure it will go on the right branch.
Merge pull request #995 from zaphod42/maint/2.7.x/simplify_contributing_doc

(Maint) Simplify CONTRIBUTING.md
(Maint) Whitespace cleanup of CONTRIBUTING.md

Just noticed some whitespace errors.  This is a whitespace only change
that removes trailing whitespace from CONTRIBUTING.md
Add HOWTO hint on topic branches in CONTRIBUTING

Without this patch it's not very clear how to create a topic branch.
This has been a problem in the past because we often get pull requests
from the master branch to the master branch which can be confusing when
working outside of the GitHub Web UI.

This patch addresses the problem by providing a concrete example of how
to create a reasonable topic branch and start using it with two
commands.
Make the example in CONTRIBUTING imperative and concrete

Without this patch applied the example commit message in the CONTRIBUTING
document is not a concrete example.  This is a problem because the
contributor is left to imagine what the commit message should look like
based on a description rather than an example.  This patch fixes the
problem by making the example concrete and imperative.

The first line is a real life imperative statement with a ticket number
from our issue tracker.  The body describes the behavior without the patch,
why this is a problem, and how the patch fixes the problem when applied.
Mark git diff --check as inline code
Merge branch 'fix/2.7.x/my_contribution' into 2.7.x

* fix/2.7.x/my_contribution:
  Mark git diff --check as inline code
  Make the example in CONTRIBUTING imperative and concrete
  Add HOWTO hint on topic branches in CONTRIBUTING
  (Maint) Whitespace cleanup of CONTRIBUTING.md
Merge pull request #892 from adrienthebo/bug/2.7.x/15264-fail_on_no_matching_title_patterns

Bug/2.7.x/15264 fail on no matching title patterns