(maint) Deprecate gpg_name in favor of gpg_key

gpg_name and gpg_key are both used in our signing interactions, and
gpg_key is always what we want to use, as gpg_name (an email address),
isn't guaranteed unique in the same way that they key (if long id is
being used) is. This commit deprecated gpg_name in favor of gpg_key, and
updates the loading to automatically populate gpg_key with the contents
of gpg_name if gpg_key is not set.
(maint) Update task descriptions in sign.rake to be more truthful

The task descriptions in sign.rake referenced environment variables
incorrectly, recommending users set KEY to override the gpg key when the
correct environment variable is GPG_KEY. This commit updates those
descriptions to reflect reality.
(maint) Add signing_server config parameter

With the nightly repos, having a signing server that is distinct from
the distribution server is essential. This is currently implemented in a
hack in enterprise-dist's package promotion by temporarily setting the
distribution server to the signing server, but for the nightly repo we
need to have both config settings populated. This commit adds
signing_server as a new config setting with a SIGNING_SERVER environment
variable override.
(CPR-52) Parameterize sign_rpms task

To better reuse some of the existing tasks, adding parameters is
necessary. One such example is the sign_rpms task, which previously
assumed all rpms to be signed would be rooted under pkg. This assumption
fails when the rpms are in a directory called repos, which will be the
case when signing repos. This commit addresses that by adding a
parameter to the sign_rpms task which defaults to the current behavior
of pkg, but can be set to 'repos' or anything else as needed.
(CPR-52) Parameterize retrieve rake task

The pl:jenkins:retrieve rake task is limited in that it only stages
whatever it fetches in the pkg directory. This is not always the desired
behavior, such as for signing repos, so this commit adjusts that
behavior to be parameterized and default to the current behavior. This
will allow repos to be locally staged as repos instead of in a 'pkg'
directory.
(maint) Add utility to list all directories in a directory

For the deb repo signing, it will be useful to be able to list all
directories at the top level of a given directory. This commit adds such
a utility to Pkg::Util::File.
(CPR-52) Add deb repo signing method

The nightly repo work is working on already created repos, so all the
sign repos method for debian needs to do is to update the reprepro
configs for the repos and re-export them with signing enabled. This
commit adds a sign_repos method to Pkg::Deb::Repo to accomplish this.
(CPR-52) Parameterize Pkg::Deb::Repo repo_config methods

In signing nightly repos, it is important to keep the old repos and the
signed repos and their configs separate. This means that certain
assumptions that were baked into the repo config generation no longer
apply. The source and target of these methods need to be dynamic so that
they can be used on signed repos or repos in any path. This commit
applies those changes to Pkg::Deb::Repo to accomplish this.
(CPR-52) Add create_repos method to Pkg::Rpm::Repo

To mirror the debian counterpart, this commit adds a method to
Pkg::Rpm::Repo to create repos from a directory. It is more atomic than
the other rpm repo creation in that we don't rsync, ship, or generate
repo configs in this method, just run createrepo on all the dirs.
(CPR-56) Migrate rpm repo tasks into Pkg::Rpm::Repo

This commit moves the current tasks in tasks/rpm_repos.rake into the
Pkg::Rpm::Repo module. The old tasks now simply forward the request on
to the equivalent method call. This commit also includes a minimum of
refactoring.
(CPR-52) Add nightly_repos rake tasks

This commit is the first incantation of a task set to sign and ship
nightly repos. The main task nightly_repos, handles getting the repos
signed remotely, and then also ships and generates repo configs. As
many of the tasks as possible are ruby calls instead of rake task
invocations.
(maint) Improve deb repo config tests

This commit applies an improvement to the generate repo configs method
in the deb repo module, similar to the rpm tests. It includes some
garbage in the wget results that should be filtered in the process of
generating the repo configs.
(CPR-56) Update base_url to repo_base in Pkg::Rpm::Repo.generate_repo_configs
(maint) Update Pkg::Util::Tool::GIT to use check_tool
(CPR-52) Allow generated rpm repo configs to set gpgcheck=1

For the nightly repos, the rpm repos will be signed, so the repo configs
should set gpgcheck to 1. This commit adds that ability via a parameter
to the method. When signed is true, the gpgkey field is also set in the
repo config and points to the builds_server root and a file named after
the gpg_key used. This commit also turns this setting on for the nightly
repos.
(maint) Update directories method to inline a select block
(CPR-56) Move comment block to more appropriate method
Merge pull request #321 from haus/ticket/master/cpr-52-nightly-repos

(CPR-52) Add support for the automatic building of nightly signed repos