(#10354) added delete command to fix missing userdel flag in useradd provider
Fixes for #10915 and #11200 - user provider for AIX

The user provider on AIX fails to set the password for local users
using chpasswd.

This commit includes the code in ticket #11200 suggested by Josh
Cooper. It works in my environment (AIX 5.3 + 6.1).

chpasswd can also return 1 even on success; it's not clear if this is
by design, as the manpage doesn't mention it. The lack of output from
chpasswd indicates success; if there's a problem it dumps output to
stderr/stdout.
(#7285) Add spec for Augeas initialisation and file loading

Simple initialisaton tests with combinations of lens include paths, explicit
file/lens loading against a few example files.
(#13379) Add path of pluginsync'd lenses to Augeas load_path automatically

The path $libdir/augeas/lenses is added to the Augeas load_path initialisation
option automatically to support lenses being pluginsynced.  Lenses should be
added into the <module>/lib/augeas/lenses directory inside a module.

The load_path parameter has been expanded to support an array of paths as well
as a colon-separated list.
(#13880) Add openrc service provider for Gentoo and Funtoo

Gentoo uses openrc (at least since baselayout-2) to
start/stop/enable/disable services. This can be done with the following
commands

    /bin/rc-status   - show runlevels
    /sbin/rc-service - start/stop a service
    /sbin/rc-update  - enable/disable a service

The openrc provider was written as a replacement for the current gentoo
provider. The gentoo provider does just use the openrc commands to
enable/disable a service but it still calls the initscripts directly to
start a stop service. The gentoo provider does also have problems with
long service names (#5197).

The reason why this is a seperate provider: #5197 states that the
rc-service command was probably introduced when gentoo upgraded from
baselayout-1 to baselayout-2 (I wasn't really able to verify this)
so the openrc provider will not work on all gentoo systems.

It is also notable that the new openrc provider does not put any confines
on operatingsystem so the service provider may also be used on other
systems that use openrc (like the Gentoo fork "Funtoo")
(#13880) Add openrc spec - service with extreme long name

The old gentoo provider has some problems handling services with really
long names (#5197).

Add a tests to check the correct behaviour of the openrc provider. The
fake rc-status output was captured after creating a fake initscript in
/etc/init.d with a really long name
Update acceptance tests to use confine instead of skip_test loops

Now that the test harness supports confine :except, :platform = 'windows'
(and the like), update the tests to use that syntax.
Revert changes to symbolic_modes.rb -- this test should indeed be pending
(it should eventually work on Windows).
Remove EL-related test changes from this commit.

These changes will go to the 2.6.x branch instead.
(#14296) Improve template function error message.

The current template function does not provide sufficient detail for
troubleshooting. This patch uses the backtrace to provide the fully
qualified filepath and line number.

Previous error message:
Failed to parse template test/example.erb: undefined method `[]' for
nil:NilClass at /tmp/module/test/manifests/init.pp:2 on node example

New error message:
Failed to parse template test/example.erb:
  Filepath: /tmp/module/test/templates/example.erb
  Line: 10
  Detail: undefined method `[]' for nil:NilClass
 at /tmp/module/test/manifests/init.pp:2 on node example
Don't use features to check for color in logging

The ansicolor feature was causing infinite recursion when it failed to load,
because it's used in logging and features tried to log when it failed to load.
Since logging should be usable at nearly any point in the system's life, it's
best to not depend on features at all.
Add Puppet::Util::Platform to abstract platform checks

This is different from the checks done in features, because sometimes we need
to check the platform before features are initialized.
Merge pull request #744 from pcarlisle/maint/2.7.x/ansicolor-recursion

fix ansicolor recursion
Fix a stub of ansicolor that I missed
Merge pull request #745 from pcarlisle/maint/2.7.x/ansicolor_log_spec

Fix a stub of ansicolor that I missed
Significantly improve compilation performance when using modules

When autoloading classes/defines, the typeloader constructs a set of
possible locations for the class, based on its name. Effectively, it
will look in the canonical locations corresponding to each namespace in
the fully-qualified name. So for each namespace, it will ask the
environment for a Puppet::Module instance for that module, to ask it
which of the module's potentially manifests match the class it's looking
for. To answer that request, the environment instantiates a
Puppet::Module.

This amounts to potentially thousands of Puppet::Module instances being
created, because it does this many times (based on nesting of the class
name) per include/autoload/import. When Puppet::Module instances are
created, they parse and load their metadata.json file, in part to
validate their use. This implies that each compilation results in
metadata.json being parsed thousands of times, which is extremely slow
(and obviously provides no actual benefit).

Fortunately, the environment object already keeps a list of
Puppet::Module instances for every module in its modulepath. The fix
applied here is simply to change the environment such that it provides
modules by looking them up in its cached list, resulting in up to an
order of magnitude improvement in compilation time.
maint: use relative paths to fixtures.

We used to return absolute paths to fixtures, rather than relative paths.

This made the test output uglier than it needed to be; we may as well do the
extra work to make them relative.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#10146) `-` is not legal in variable names.

When a bunch of refactoring went on to clean up the grammer and lexer, the `-`
character became a legal character in variable names.  This was not entirely
desired - and contravenes our existing rules for naming.

This adds testing for legal variable names, then applies that across the lexer
to ensure that legal names pass, and illegal names fail.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Fix broken man page rake task

The mass static man page generator was broken! Something changed in commit
82e5fa9561e2d4cb1d699a41c14f50953d8f2d97 which broke the way we were passing
render_as to the man action; while that bears further investigation, we were
able to get the task working again by simply removing it, since the value we
were passing to option turned out to be redundant when using the action from
the API.

We also found that I had unwisely called the argument of the save action for
indirector faces "<object>", which Ronn confuses for an HTML tag of the same
name and then barfs on. This commit fixes that, too.
Merge pull request #758 from nfagerlund/maint/2.7.x/fix_man_pages

Fix broken man page rake task