Add a `puppet storeconfigs export` command to dump the database

This command can be used to export a copy of the ActiveRecord
storeconfigs database (only exported resources, and only nodes with
exported resources) which can be imported into PuppetDB.  This is useful
when migrating from old-school storeconfigs to PuppetDB, as it allows
agents to run without losing any of their exported resources for a time.
Once every agent has run once, the database should be up-to-date in any
case.
Don't export catalog environment

This isn't actually a legal key on the catalog, so exclude it.
Write the storeconfigs database dump as a .tar.gz

Previously this was a single file containing many JSON objects, for the
catalogs. Now it's a .tar.gz (or .tar if gzip can't be found [or
directory if tar can't be found]) containing one file per node. The
tarball also includes a metadata file specifying the nodes which are
present, the timestamp of the export, and the version of the "replace
catalog" command which ought to be used to submit the catalogs to
PuppetDB.
Add a pending acceptance test for storeconfigs export

This test can't be finished until the import functionality for PuppetDB
proper is complete, but it seems better to have this start than nothing.
Add a product-name setting to the config file

This allows either puppetdb or pe-puppetdb, defaulting to the former.
This will let us know (basically) whether we're running on PE or not,
although it does use the honor system.
(#17839) Disable update checking when product is pe-puppetdb

This will allow us to prevent having individual components of PE
checking for updates at the same time as PE itself.
Don't set product-name on OSS PuppetDB

This setting shouldn't really be tampered with, and "puppetdb" is
already the default. No need to tempt users.
Conform to the PuppetDB export format
[packaging] Remove stray # in install.rake

install.rake has two lines with '#' in them that appears to be left over from a
variable -> hard path change. This commit removes them so the directory strings
are constructed correctly.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(maint) Ignore ext/packaging

This commit adds ext/packaging to the .gitignore for puppetdb and also excludes
it during tarball creation in the tar rake task.
(maint) Copy filesystem utility methods from packaging tasks

As the install task uses cp_p, cp_pr and ln_sfT, this commit copies them back
into the top level Rakefile for use during build, as the external packaging
tasks will not be available at that time.
Merge pull request #448 from MosesMendoza/maint/master/packaging_fixups

[packaging] Remove stray # in install.rake
Merge pull request #447 from haus/fix_package_building

Fix package building
Document the `puppet storeconfigs export` command

This also forms the beginnings of a migration guide.
Merge branch 'master' into disable-version-check
Add PE_VER to variables exported for deb package builds

Because we need this in the packaging repo rake tasks for determing ship
targets and dependency resolution.

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

Add PE_VER to variables exported for deb package builds
Use testutils.logging when capturing log output

This avoids having to rebind logger factory with an atom logger
manually, and prevents the test from having to understand the log
format.
Merge pull request #438 from nicklewis/storeconfigs-migration

Add a `puppet storeconfigs export` command to dump the database
Fix SO MANY Ruby 1.8.7 issues in storeconfigs spec

When reading our export tarball back and mapping it to a hash, we were
trying to omit directories, which are indicated by a trailing slash.
Unfortunately, on Ruby 1.8.7, indexing into a string returns the integer
value of the character at that position. So we need to use
filename[-1,1] to tell Ruby to get a 1-character long substring instead.

Also, we had been reusing the variable (filename) containing the
location of our tarball as a block variable. In Ruby 1.8, this clobbers
the original variable outside the block, which caused us to be unable to
read the tarball later.

Finally, we were retrieving the content of the tarball using
String#lines. This returns an Enumerator, which for some reason in Ruby
1.8.7 won't implicitly convert to an array when passed as an argument to
zip, so we have to do it manually.