(#19876) Fix crontab regression in resource matching

The logic for matching new resources with exiting unmanaged cronjobs
has been reworked during the fix for #16809. Somehow, this lead to
a new issue which caused spurious matches, e.g.:

10 * * * * /bin/true

and

cron { "blank": command => "/bin/true", ensure => present }

would now match. At least puppet will not try to change the name of the
record (i.e., the 'Puppet Name:' line). But the new entry will not get
added either. It still works if there is a non-matching time field, e.g.

cron { "blank": command => "/bin/true", hour => 1 }

but without such fields, the behaviour is wrong.

The match method (in the crontab provider) will expressly ignore named
records on disk. This is safe to do; if the resource does have the
same name as the on-disk record, the match method will not even get invoked.

There is no scenario in which we'd want differently named records to be
matched with a resource. If an on-disk record has a name, it either is
managed through another resource, or it used to be managed. Either way,
the resource in question needs adding or matching to a different record.
(maint) update cron whitespace strip acceptance test

Since f5d236702 leading and trailing whitespace was stripped from the
cron command to ensure writing cron entries is idempotent. This made the
cron `should_not_rewrite_with_trailing_whitespace.rb` acceptance test
meaningless. This commit updates the acceptance test to confirm the fix
for #656 and updates the test name to reflect the expected behavior.
Merge pull request #1566 from adrienthebo/maint-cron_acceptance_test_failure

(maint) update cron whitespace strip acceptance test
(#12493) Add note that `user` defined in a scheduled_task resource must be a privileged user.

The scheduled_task resource includes a note about issues surrounding the use of the 'SYSTEM'
user and recommends choosing another user to run the scheduled task, or altering the security
policy to allow the 'SYSTEM' account to run scheduled tasks. The note does not mention
that puppet must be running as a privileged user to manage scheduled tasks in order to avoid
'access denied' errors.

This commit corrects the issue by adding a note that puppet must be running as a privileged
user to manage scheduled tasks and avoid 'access denied' errors.
(#19805) Report failures to restart in exit code if requested

Documentation to --detailed-exitcodes states that mask 0x4 is applied in case
"there were failures during the transaction." Currently only failures to change
resource state are reported, failures to restart the resource are still ignored.

Only change (code=2) to Exec['/bin/true'] is considered here:

  $ puppet apply --detailed-exitcodes -e 'service { "duckfaced": restart => "/bin/false", ensure => running, status => "/bin/true" } exec { "/bin/true": notify => Service["duckfaced"] }'
  $ echo $?
  2

Needless to say, information about failed restarts is usually as important to
the user as the status changes, since they usually mean that desired
configuration is not in effect.

This change makes Puppet consider information about failed restarts when
setting the failure bit.

Another possibility to avoid loosing the information  would be to introduce
another bit in the exit code mask, but that would change semantics with respect
to existing documentation and thus probably be more confusing.
Merge branch 'pull-1541'
Merge pull request #1565 from ffrank/ticket/master/19876-crontab-match-regression

(#19876) Fix crontab regression in resource matching
Merge pull request #1567 from pdxmph/windows_scheduled_task

(#12493) Docs: Note that `user` defined in a scheduled_task resource must be a privileged user
Docs: Note in config reference that puppet master needs a restart to notice hiera.yaml edits
Remove trailing whitespace

Our CONTRIBUTING.MD says to check for unnecessary whitespace using `git
diff --check`, but we've gotten lax in checking this. This commit
removes unnecessary trailing whitespace from lib. It ignores the CRNL
line endings in the vendored rgen code.
Merge pull request #1568 from nfagerlund/hiera_config_restart

Docs: Note in config reference that puppet master needs a restart to notice hiera.yaml edits
(#19877) Add support the openwrt service provider

OpenWrt has its own unique initscript conventions, as well as
its own support for enabling and disabling services. This commit
adds support for them and for being the default provider for
OpenWrt platforms.
(#19877) Added opkg as a package provider

Opkg is the package manager for OpenWrt. This commit enables the
opkg package provider and sets it to be default for openwrt platforms.
(#19877) Enable automatic package list downloading for opkg

On OpenWrt package lists do not persist across reboots, often
requiring one to run "opkg update" before running opkg operations.

This commit enables detection for this, so puppet will fetch a
package list if it hasn't been downloaded yet, enabling package
installs to proceed as expected.
Merge branch 'pull-1552'
(maint) remove rspec 2.10 method call

Rspec 2.10 supports a named subject by calling subject with the desired
name, but this isn't backwards compatible with Rspec 2.9. Since we're
not really exploiting the rspec behavior around the subject it is
easiest to change this to use a simple `let` block.
Merge branch 'maint-rspec_2.9_let'
(#1453) Document behavior of removed Cron params

Removing a parameter such as `minute => 10` from a manifest will not reset the
minute component of the associated cronjob to `*`. This is because Puppet only
manages parameters that are out of sync with manifest entries (see issue
[19198][19198]).

This patch updates the documentation for the Cron type to be explicit on this
point as it has been surprising to a lot of people.

  [19198]: https://projects.puppetlabs.com/issues/19198
(maint) improve stubs for opkg specs

Execution commands weren't properly stubbed out for the opkg package
provider and were trying to execute on Windows. This commit stubs out
all execute calls and replaces instance variable usage with let blocks.
Merge branch 'maint-opkg_stubs'