clean up docs for new parser functions
(#20383) Provide location of duplicate resource in error

Commit ac83f85 cleaned up Puppet::Error and extracted file and line
presentation into a mixin. However the DuplicateResourceError exception
was relying on that behavior, and when the behavior was extracted the
location of the duplicate resource was lost.

This commit mixes in the ExternalFileError mixin and passes the file
line and number to the exception so that the duplicate resource location
can be displayed.

Thanks to Richard Clamp <richardc@unixbeard.net> for finding the
original error and providing the base for this fix.
Merge branch '20383-duplicate_resource_error_location' into stable
Merge pull request #1696 from Sharpie/21028-document-future-parser-functions

clean up docs for new parser functions (backport)
(maint) Fix Facter stubs in redhat service spec

The underlying OS was leaking into this test causing issues. This makes sure
operatingsystem is stubbed, and also corrects the casing on stubbed osfamily
values.
(maint) Agent logger specs account for lack of daemonize on windows.

Because agent cannot --daemonize on Windows, a Runtime error is thrown
from the flag setting during the integration/agent/logging_spec.rb run.

Adjusts the spec so that when run on Windows, we expect the Runtime
error when the --daemonize flag is part of the set under test.
(maint) Simplifies agent logging spec setup.

Takes advantage of recent changes to Puppet::Application::Agent
and Puppet::Daemon to simplify the stubbing and internal calling for the
spec/integration/agent/logging_spec.rb.
(#21193) Fix rgen assertion check

Corrects `@asserted` to be `@@asserted` and assigns `true` value upon
successful assertion.
(maint) Expects eventlog when testing on windows.

On Windows, eventlog is used by default rather than syslog.

Also an explicit --logdest=syslog is silently ignored, but must
be expected.

Accounts for both issues.
Maint: Update comments

Update comment and white space.
Merge branch 'maint/agent-logger-specs-on-windows'

* maint/agent-logger-specs-on-windows:
  Maint: Update comments
  (maint) Expects eventlog when testing on windows.
  (maint) Simplifies agent logging spec setup.
  (maint) Agent logger specs account for lack of daemonize on windows.
Merge pull request #1701 from hunner/fix/master/rgen_assert_check

(#21193) Fix rgen assertion check
Merge branch 'stable'

* stable:
  (maint) Fix Facter stubs in redhat service spec
  (#20383) Provide location of duplicate resource in error
  clean up docs for new parser functions
maint: Refactor mount specs

Reduce the number of describe blocks and use real object instances
instead of mocks. This way it should be easier to extend the specs in
the future
(6409) Reject spaces in mount type

The puppet mount provider is unable to handle fstab entries with spaces
so it should not try to write such entries.

The accepted solution in redmine ticket #6409 is for the mount type to
reject property values that contain spaces.
(#6409) Dont use invalid values in type_spec

The type_spec uses the mount type as an example in a lot of spec tests.
Unfortunately it uses example values that are now invalid for the mount
type.

The atboot property only accepts :yes and :no now, because these are the
only valid options in /etc/vfstab [1].

[1] http://docs.oracle.com/cd/E19455-01/805-7228/6j6q7uev3/index.html
(#4689) Set correct blockdevice for nfs mounts

Solaris vfstab has an extra field "blockdevice". The Puppet
Documentation claims that the blockdevice should default to the correct
value and you do not have to set it explicitly. While this may be true
for regular devices the user has to set blockdevice explicitly if the
mount resource describes an NFS share.

The correct entry for NFS shares in /etc/vfstab is to set blockdevice
to "-"
(#6793) Remove trailing slashes from mount resource

The mount system command always displays mount points without trailing
slashes so if a user defines a mount resource with a trailing slash,
puppet will always see the mount resource as unmounted and as a result
will keep remounting the device on every puppet run.

Munge the name and strip away any trailing slashes but make sure that we
do not remove the slash if the mount describes the root directory `/`.
This way the munged name will always equal the mount output and puppet
is able to find it.
(#21168) Set default pass property to "-" on Solaris

The current default value of "0" for the pass property has a different
meaning on Solaris than on other systems. A value of 0 actually depends
on the filesystem type: It will cause the system to not fsck the device
if it is an UFS filesystems and will fsck the device if it is not an UFS
filesystem

(http://docs.oracle.com/cd/E19455-01/805-6331/fsadm-59727/index.html)

I never actually saw a value of "0" in any /etc/vfstab and it seems to
be common to use "-" instead. This will always deactivate filesystem
checking and is also used in many examples (see link above).

Change the default value of the pass property to "-" on Solaris and keep
the default value of zero on other systems.
(#15837) Do not pass options explicitly when mounting

The mount provider explicitly passes the mountoptions to the mount
command with the "-o" parameter. While this works in most cases it fails
when the option property contains an option that needs to be unique as
the default behaviour of the mount command seems to be to merge fstab
options with explicitly definied options via the commandline.

Since the mountprovider always updates the /etc/fstab file before
attempting to mount we should not need to pass the options explicitly.
The current code mentions some weired behaviour on MacOSX so we keep the
original behaviour on MacOS and drop the explicit options on
all other platforms.

This also fixes #7791