(#8193) Support new keytypes for ssh_authorized_key

Recent versions of openssh (at least openssh 5.8) support the following
keytypes in in the authorized_keys file: ecdsa-sha2-nistp256,
ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-dss or ssh-rsa.

Add support for ecdsa-sha2-nistp256, ecdsa-sha2-nistp384 and
ecdsa-sha2-nistp521.
(#8193) Support new keytypes for sshkey

Recent versions of openssh (at least openssh 5.8) support the following
keytypes in in the authorized_keys file: ecdsa-sha2-nistp256,
ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-dss or ssh-rsa.

Add support for ecdsa-sha2-nistp256, ecdsa-sha2-nistp384 and
ecdsa-sha2-nistp521.
(#8193) Add unit tests for new ssh keytypes

Add unit tests to prove that the ssh_authorized_key provider can parse
all different keytypes. This currently shows that the provider lacks
support for ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, and
ecdsa-sha2-nistp521 keys.
(#8193) Add support for new ssh keytypes in authorized_key provider

The provider now correctly detects lines that describe an
ecdsa-sha2-nistp256, ecdsa-sha2-nistp384 or ecdsa-sha2-nistp521 key.
(#12479) Don't make undef regexp match as the string undef.

As part of commit 53869e99 we did work to make the behaviour of variables that
were explicitly `undef` at least somewhat saner.

One unintended side-effect of this was that we started matching `undef` as the
literal string `undef`, not as the empty string, and not "not matching".

Either of the later would have been sane things to do; this fixes that by
picking "match undef as empty string".

That is for consistency: we already match the *literal* empty string as equal
to undef, so it makes sense to treat it the same way for a regular expression.
(Debate on that point is welcome elsewhere, but we should change literal and
regexp matching the same, consistent way if we change it anywhere.)

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Facter 1.5.7 compatibility in the test condition.

The `augeasversion` fact was only introduced in Facter 1.6.1, and this test
depends on it - or blows up trying to process `nil` in `versioncmp`.

If we don't have the fact we might as well skip over the test set; it isn't
much worse than working harder at this, and less false positives than guessing
the other way around.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#4862) Stop using EventLoop in the Puppet daemon.

This eliminates the places in the code that use the EventLoop model directly:
the two timers established to check configuration changes and run the agent,
and the invocation of the main loop in daemon mode.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#4862) `returning` is not a standard Ruby method.

The `returning(foo) do ... end` idiom used in this method isn't a standard
part of Ruby; it comes from the event-loop better definers code.  Since this
is the one occurrence in the source tree, might as well open-code it.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#4862) define_method is not a public method in Ruby.

The `better-definers` part of the EventLoop library change `define_method` to
be public on all objects, rather than private.  This isn't standard in Ruby,
and we only had one place that wasn't respecting this to start with.

Rather than retaining this divergence we just use `send` to trigger the
behaviour externally in the one place that is needed.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#4862) Finally remove the event-loop library.

Now that all the consumers of the event-loop abstraction have been removed,
delete the obsolete code from Puppet.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Maint: Remove unused variable in user spec

If rspec already gives us the described class why not using it.
Maint: Add a real provider class to user spec

Add a real provider class we can use in the tests.
Maint: Use real objects in user spec

Remove all references to the mock resource object
Maint: Remove unused mock objects in user spec

Also remove the modification of the PATH environment variable because we
will always have our :simple provider which does rely on any commands in
/sbin.
(#1076) Show warning if an empty group is specified

If the user passes an empty group to the user type, puppet will execute
an invalid `usermod` command.

e.g. if groups of user 'foo' is currently 'bar' and we do

    user { 'foo':
      groups     => '',
      membership => minimum # this is the default
    }

puppet will build a should value of ',bar' (old group + the new group '') and
will pass '-G ,bar' to the usermod command (which will then fail).

To really specifiy 'no group' the group property does allow an empty
array so we should fail if we find an empty string as a group.
Documenting missing --noop option for puppet apply
Update packaging spec files for 2.7.12
Update CHANGELOG for 2.7.12
Merge branch '2.7rc' into 2.7.x
Merge pull request #570 from francois/master

Document missing --noop option for puppet apply