(packaging) Fully qualify variables supplied by the packaging repo in templates

Part of the variable scoping overhaul within the packaging repo was ensuring
the data about builds lives inside module Pkg::Config. In other projects, we
only use variables set by the packaging repo in templates, which means we can
pass the binding of the packaging repo Pkg::Config class into the template
engine and keep using "@" variables like we always have. But in puppetdb, we
mix data supplied by the packaging repo and data supplied by puppetdb itself in
the same template, which means we can't use just the Pkg::Config scope. Since
there are far more variables supplied by puppetdb in the templates than the
packaging repo, we opt to use the puppetdb scope and fully qualify access to
the variables supplied by the packaging repo, by referencing them as
Pkg::Config wherever we use them.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
redirect to moses - remove this commit
(packaging) set project to pe-puppetdb when building pe-puppetdb

Until we split out the packaging of pe-puppetdb from puppetdb, with the new
packaging system we need to explicitly tell the automation that the project
we're building is called 'pe-puppetdb' instead of 'puppetdb.'

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(packaging) Evaluate rpm spec file just like debian templates

Prior to this commit, we evaluated all of the debian templates when creating a
tarball, resulting in a 'ext/debian' directory containing usable debian
artifacts. On the other hand, we didn't bother creating the redhat spec from
the corresponding template, leaving that as an exercise left to the reader.
This seems odd. All of our other projects have fully usable spec files in their
tarball, and puppetdb should to. This also has the added benefit of allowing us
to control the binding context like we do on debian, instead of letting the
packaging repo do it. This means we can still mix puppetdb-defined '@'
variables with 'Pkg::Config' accessors supplied by the packaging repo.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Replace non-portable shell calls in spec and changelog with ruby

Prior to this commit, we shelled out to `hostname` and `date` in the redhat
spec template and the debian changelog, which is poor practice if we expect to
template that file anywhere else. This commit updates these calls to use their
most simpl ruby equivalents, though we risk that we may not get a FQDN for
hostname. This doesn't really matter a ton by rpm standards, so I'm fine with
it.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>