(packaging) (#22726) Add saucy as a package build target
Added a parameter to the beaker tests to pass in an (optional) test directory, or specific test

Conflicts:
	Rakefile
Merge pull request #709 from shrug/1.5.x

(packaging) (#22726) Add saucy as a package build target
Merge pull request #710 from senior/maint/master/beaker-rakefile-individual-tests-1.5.x

Added a parameter to the beaker tests to pass in an (optional) test directory or specific test
Provide better hash reproduction

Sometimes parameters contain hashes, these hashes may be randomly ordered by
Ruby before they hit PuppetDB. This patch ensures those structures are sorted
recursively first to ensure the duplicates that are just suffering from
different ordering are matched properly.

This patch achieves this by provided a new function 'sort-nested-maps' into
utils that is utilised by a set of functions now provide for generically
preparing strings for hashing and an all in one that uses the string
function and hashes it: 'generic-identity-hash' and 'generic-identity-string'.

Now all the -hash and -string functions use those methodologies we have
hopefully centralised our logic and cleaned it up at the same time. We also
have good tests around these generic methods to prove (at least somewhat)
ordering is preserved so we can avoid this issue going forward.

I've also added tests to the other hash functions so we can preserve their
individual hash generation methodologies in unit test form.

Beyond this, we have converted the methodology for serialization before
hash generation to use the cheshire JSON encoding library. This should increase
performance and has been shown that this patch is almost twice as fast
while being more correct even though more work in ensuring correctness is
occuring purely due to the conversion to JSON.

Signed-off-by: Ken Barber <ken@bob.sh>
Create a namespace to host the add-common-json-decoders! function so it can be simply required

Signed-off-by: Ken Barber <ken@bob.sh>
Changelog for 1.5.1 release
Handle PEM privkeys that aren't represented as KeyPair objects

Bouncycastle parses puppet-generated PEM private keys as KeyPair objects
with a nil public key. However, it parses PEMs generated by other tools
(like freeIPA) as PrivateKey objects. This patch fixes up our PEM
loading code to handle both cases.
Merge pull request #711 from cprice404/maint/1.5.x/1.5.1-changelog

Changelog for 1.5.1 release
(packaging) (#17555) Use systemd for Fedora >= 17 and EL >= 7

Fedora versions >= 17 and EL versions >= 7 use the systemd service
management system, replacing the traditional SysV init system.

This commit configure the RPM package to install the correct systemd
service management scripts and registers the puppetdb service on those
platforms.
Make com.puppetlabs.cheshire a proxy for cheshire.core common functions

This is so we can provide default encoders at least, and in the future we may
wish to wrap this functionality.

Tests included, and all usage of cheshire.core has now been cutover to
com.puppetlabs.cheshire.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #712 from kbarber/ticket/master/recursive-sort-parameters

Ticket/master/recursive sort parameters
(#21083) Adding insert/update/delete logic to replace-facts!

Previously when facts for a certificate were replaced, all previous
facts for that certificate name were deleted and all new facts were
inserted. Now existing facts are updated, old facts (no longer present)
are deleted and new facts are inserted.
Minor docstring changes
Moved the in-clause function from scf/storage to jdbc
Added a docstring to scf.storage/insert-facts!
Pushed down the timestamp checking of the fact metadata table. Changed
the isolation level of replace-facts! to ensure there are no
silent write/write failures when there are two replace-facts! commands
running concurrently for the same node. In that scenario, a potentially
older set of facts could overwrite a newer set of facts. Added a test
with an example of that scenario to ensure it's covered.

Moved the transaction for replace-facts! up to command.clj as you can't
change the transaction isolation of an already running transaction.
Fixed a bug when replacing facts has only new facts (no existing facts changed)
caused an NPE, also added a test where no facts were changed
Moved the concurrent fact updating test up a level to the command tests.
This is needed now that the repeatable read isolation happens at a higher level
(in the command execution).
Added a with-transacted-connection' that allows specifying transaction
isolation level right after getting the connection, the existing
with-transacted-connection uses the same code and uses the JDBC
default isolation level