Document repl 'host' setting

The [repl] block also supports setting 'host' to change where the repl service
is listening to. This documents this setting, while also warning that changing
it from 127.0.0.1 is not recommended for a production environment.

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-377) Disabling JAR repacking when creating RPMS

The manipulation of the class files causes issues with AOT compiled
Clojure code, specifically around defrecords/deftypes. Disabling
repacking prevents the issue.
Merge pull request #827 from senior/ticket/1.6.x/pdb-377-fedora-jar-repacking-fix

(PDB-377) Disabling JAR repacking when creating RPMS
(maint) Update RPM spec for RHEL 7
Invalid namespaces for tests http/nodes|fact_names masking failures

The test files http/fact_names.clj and nodes.clj had incorrect namespace
declarations that were overridden in other files. This caused these tests
to be skipped and in fact mask a couple of failures.

Luckily these were testing failures only, once fixed this is all passing
again.

Signed-off-by: Ken Barber <ken@bob.sh>
(maint) Remove Sid from package build defaults

Removing Sid to prevent package builds from wedging
Merge pull request #828 from haus/maint/1.6.x/update_spec_for_rhel_7

(maint) Update RPM spec for RHEL 7
Merge pull request #830 from mckern/1.6.x

(maint) Remove Sid from package build defaults
Merge pull request #824 from kbarber/maint/1.5.x/repl-host-documentation

DOCS: Document repl 'host' setting
Merge pull request #829 from kbarber/maint/1.6.x/invalid-test-namespaces

Invalid namespaces for tests http/nodes|fact_names masking failures
Don't use global schema validation

Prior to this commit, the `puppetdb.schema` namespace contained
a top-level call to primsatic's `set-fn-validation!` fn.  This
enabled strict schema validation for every occurence of a schema
annotation anywhere inside the JVM.

This behavior means that other libraries that use schemas lose
control over when strict validation occurs and when it does not,
which can cause unexpected behavior and potentially even bugs.

This commit removes the global toggle and instead prefers
explicit metadata to enforce validation on the various functions
that require it.
(PDB-425) Move daemon-reload out of install-only

On upgrades, systemd service files may not have already been present, and they
might have changed. To address this, this commit moves the daemon-reload call
to systemctl out of the install only section of the %post, so that it is always
invoked. This will register the systemd service on upgrade from a sysv service
(as happens on fedora 18 through fedora 20) as well as register any changes to
the service file.
(packaging) Update top-level Rakefile's version and pe determination

Prior to the commit, the versioning in puppetdb would fail from a rake
perspective if the packaging repo wasn't present. This commit updates it to
fall back to git describe and if that fails to a hardcoded string, so that we
always have a version. We also set the @version variable to
Pkg::Config.version, which is how we access data provided by the packaging repo
in the new library-format.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(PDB-425) Try SysV and SystemD on upgrades

On upgrades from PuppetDB < 1.6.0, even on platforms that support systemd, only
sysv will be in place. This means that when the status is queried in the %pre,
there won't be a systemd service file yet, so puppetdb will appear to not be
running even if it is. Next, when the service is stopped, also in the pre,
again there will be no systemd service to stop, even if there is a sysv service
running. This commit addresses that by testing for the existence of the systemd
service file, and if that is present, use the systemd service calls. Otherwise
it calls out to the sysv init system.
(packaging) Update template task for new erb_file method

The packaging repo will have all utilities split out into different classes for
sanity's sake, and one of the tools that got an overhaul is erb. This commit
updates puppetdb to use the new utility.
(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>
(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>
(packaging) 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>
Merge pull request #833 from haus/ticket/1.6.x/pdb_425_fix_systemd_upgrades

SystemD upgrade improvements