(maint) Fix misspellings in spec tests
(#22535) Add puppet version to status indirector

Without this change, there was no way to query a puppet node for
what version of puppet code it was running.  This change adds a version
field to the status hash.

This allows either a local or rest find on the status indirection
to return the version of puppet code.  This is especially useful
for a client communicating via the REST API.
(#22535) Revert to yaml when a new agent talks to old master

With the 3.3.0 release yaml was deprecated.  However, a 3.3 agent
talking to an older master wasn't fully operational.  This change
causes a 3.3.1+ agent to drop back to yaml when talking with an
older master.  It also issues cautionary messages since the Right
Thing to do in this situation is to upgrade the puppet master.
(#22535) Fix apply/etc by setting the status_terminus per application
(#22535) Cleanup of desc/hook for new settings

For both new backwards compatibility settings, add a note to the desc
that these are set automatically by the agent when needed, so no need
to set them explicitly.

Remove hook with warning message for report_serialization_format as the
agent now emits notice-level messages when it drops into backward compatibility
mode to work with an older master.
(#22535) Improve notice message for backward compatibility
(#22535) Add tests for backward compatibility settings

Ensure that the 2 yaml backward compatibility settings are set when
the master version is unknown (hence older), and that they are not set when
the master version is known.
(#22535) Add test for legacy yaml serialization of arrays in query string
(#22535) Fix an exception msg; cosmetic.
(#22535) Fix support for agent's status endpoint

Without this patch, if the agent's status endpoint were accessed,
it would report the master's version.  This would happen because
the status indirection terminus was set to :rest for the duration of
an agent's lifetime.

This patch removes the puppet setting for status_terminus, and restores
the default terminus of local.  It also moves the check for master version
out of Puppet::Configurer (where it was shared with, say, apply) and into
Puppet::Agent.  And in the agent, the check *temporarily* changes the
endpoint to rest, queries the master's status endpoint, then restores the
original setting for the endpoint.

This patch also updates the corresponding spec tests, moving tests from
configurer_spec.rb to agent_spec.rb, and adding a stub to local_spec.rb.
(#22535) Make a full status object the default in agent spec tests.

Prior to this patch, the default stubs for the find indirection returned
a bare Puppet::Status object, i.e. without setting any version field in the hash,
and the one test that needed a version field overrode that stub with one
providing a status object with a version field.

This is the opposite of what happens in the code, where by default one would
expect Puppet::Status to include the current puppet version, and it's an unusual condition
(older master) for it to omit the version field.  So this patch reverses things
so that the default stub of Puppet::Status includes a version field, and the
two tests with specific expectations about the version field override the stub.
Merge pull request #1910 from kylog/issue/stable/22535-new-agent-old-master-file-ignore-list-is-ignored

(#22535) new agent old master file ignore list is ignored
(#22529) Dpkg provider does not warn on package not found

e96ac6 (#19875) extended the dpkg and rpm providers to obtain package
descriptions, and the change in the regex meant that dpkg-query's 'No
packages found matching foo' output for non-existent packages was no
longer being silently swallowed, and instead began triggering the
warning log.

In this commit we explicitly guard against dpkg-query's package not
found message triggering a warning.
(#22529) Rpm provider does not parse 'package foo is not installed' as a package

Rpm provider previously parsed 'package foo is not installed' as if that
was valid package info returned by an rpm -q call.

In line with changes to dpkg provider, this commit also skip rpm's
'package ... is not installed' message without logging or returning an
erroneous package hash.
(#22529) Acceptance test for puppet package resource behavior

Checking expected output for packages that do not exist.
(maint) Convert from should to expect syntax

Since I was touching the dpkg/rpm_spec...
Merge pull request #1909 from jpartlow/issue/stable/22529_package_query_should_not_warn_if_package_not_found

Issue/stable/22529 package query should not warn if package not found
(#22535) Use a response header for version

The initial fix for #22535 used a new field in the status endpoint hash
to return the puppet master version.  The status endpoint has been
enabled in authconfig.rb since 2.6, so this seemed safe.  However,
acceptance tests are based on conf/auth.conf (as is the default PE
auth.conf), which was never updated to enable the status endpoint.
So the status endpoint is not a good choice for returning the puppet
master's version.

This patch adds a response header containing the puppet version and
uses that to control yaml backward compatibility mode.

This also required updating spec tests, including several that have
a simple mock up of the http response object.
Merge pull request #1915 from kylog/issue/stable/22535-new-agent-old-master-file-ignore-list-is-ignored

(#22535) Use a response header for version
(#22529) Update acceptance test for regex fix and solaris

Confine solaris provider which does not implement purgeable, and place
the confine around the whole agents apply block so that it actually runs
on a confined subset of hosts.

Also fix the too restrictive regex which was missing host names with
hyphens and was insensitive to escape sequences (escape sequences are
very sensitive by nature and easily offended).