[packaging] use packaging repo data to determine PE build

Part of the new Release packaging workflow involves sending builds to jenkins
to do our work for us. However, when we build with the packaging repo via
jenkins, we don't pass environment variables up in anyway. Instead, all data is
stored in a build parameters file. With puppetdb, we store whether or not we
are building PE in the build parameters file. This is lost though, because
currently we only check for PE build in the top-level Rakefile by querying the
environment variable PE_BUILD. To enable builds to succeed with the packaging
repo jenkins workflow, we need to also attempt to query the data in the build
parameters which is made available via the @build object via its build_pe
instance variable. This commit updates the Rakefile to query this first if set,
and then fall back to environment variable.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
[packaging] Update clobber task for lein 2 target

Lein 2 builds jars in `target` rather than in the top-level of the project.
This commit updates the clobber job to remove jars in `target` rather than at
the top level.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Merge pull request #439 from MosesMendoza/maint/master/address_pe_builds

[packaging] Update PE package building for new workflow
(#19239) Work around EOFException upon journal corruption

We discovered a bug in KahaDB that when the journal is corrupted there might be
a stray EOFException that is not caught by the KahaDB store, however upon
broker restart it corrects itself.

This patch will automatically restart the broker when that state is detected,
avoiding the need for an administrator to intervene.

This also adds a section to documentation to explain how to recover from
KahaDB corruption errors manually.

Signed-off-by: Ken Barber <ken@bob.sh>