piuparts_wrapper: quote scriptsdir in piuparts cmd

scriptsdir can be filled by the user and might ends up containing
spaces. Make sure its content is passed as one argument by double
quoting the variable when passing it to the piuparts call.
piuparts_wrapper: unset scripts dir when non existent

On Ubuntu Precise (Long Term Support release), the piuparts script does
not comes with /etc/piuparts/scripts which causes the piuparts output to
report:

 0m0.0s ERROR: Scripts directory is not a directory:
 /etc/piuparts/scripts/

Add a check to make sure it is a directory, if it is not, fallback to an
empty string passed to piuparts.
Make sure to also support linux-any as valid Architecture field

A package which e.g. uses "linux-any" should be handled as
if "any" was set.

Thanks: Jean Baptiste Favre
Added a virtual package for repo only slaves

jenkins-debian-glue is the base package containing all required scripts
 - jenkins-debian-glue-repoenv  - virtual package for repo only slaves
 - jenkins-debian-glue-buildenv - virtual package for build only slaves
Merge branch 'master' of https://github.com/bmiklautz/jenkins-debian-glue

https://github.com/mika/jenkins-debian-glue/pull/75
puppet: install scm-api plugin, required for git plugin

| SEVERE: Failed Loading plugin git
| java.io.IOException: Dependency scm-api (0.1) doesn't exist
wrap-and-sort debian/control file

Git-Dch: ignore
Add jenkins-debian-glue-repoenv to Recommends and default installation list

We want to have jenkins-debian-glue-repoenv by default on
automatically installed machines and users typically want it,
though they don't strictly need it, so add it to Recommends.
Drop trailing dot in package descriptions of jenkins-debian-glue-{repoenv,buildenv}

Make lintian happy
Release new version 0.7.0
Drop jenkins-debian-glue-repoenv package + add dependency on "reprepro | freight" to jenkins-debian-glue

reprepro should be present on every system to avoid failures with
package inclusion in repository. Depending on reprepro in the
main jenkins-debian-glue package avoids that problem while still
supporting setups where cowbuilder etc aren't necessary on
repository-only systems.

Closes: #76
Add jenkins-debian-glue-buildenv-git to Recommends
Release new version 0.7.1
generate-reprepro-codename: refer to /etc/jenkins/debian_glue

We don't use/ship /usr/share/jenkins-debian-glue/examples/debian_glue
any longer, it's provided as /etc/jenkins/debian_glue instead.
piuparts_wrapper: only expand scriptsdir when it is set

We started quoting $scriptsdir in 841b4b2 in case it is being passed a
string containing spaces.  That caused an issue whenever the scriptsdir
is empty: piuparts would be given an empty string as an argument which
does not play well.

This script makes $scriptdir to only contains the path, and expand it to
"--scriptsdir $scriptsdir" only if $scriptsdir exist.  That would let
the wrapper works properly whenever the scriptdir is empty by simply
discarding the option, but still quoting it properly when it is set.

Change-Id: I48c8e86ac007108ca6b650673087160a99d18a21
Lock access to conf/incoming file

With really bad timing we might run into something like this:

| + sudo reprepro -v -b /srv/repository/release/release-42-rc1 --waitforlock 1000 --ignore=wrongdistribution processincoming release-42-rc1 foo_23.1_amd64.changes
| Multiple definitions of 'release-42-rc1': first started at line 2 of /srv/repository/release/release-42-rc1/conf/incoming, second at line 11 of /srv/repository/release/release-42-rc1/conf/incoming!

Use flock(1) from util-linux to lock access to the
conf/incoming file.

Closes: MT#4751
Development sponsored by Sipwise GmbH
Allow debian-glue to read gbp.conf

For generate-git-snapshot, try read upstream branch, debian branch, and
status of pristine tar.
build-and-provide-package: get rid of dependency on dcmd

When running via PROVIDE_ONLY the build-and-provide-package would need
the dcmd from devscripts, but we'd like to avoid dependency on devscripts
for repository hosting hosts. Since dcmd is quite a trivial script overall
let's just replace it with our own code.
Rework new gbp.conf handling

In commit 9d5366f9db7 the gbp_opts function was reused, so rename
it to gbp_conf instead. Also do not fail if 'git config --file ...'
calls fail.

Additionally support the IGNORE_GBP_CONF setting to allow skipping
execution of gbp_conf.
Provide yaml setup files for usage with jenkins-job-builder

NOTE: I've filed a report against upstream's BTS to (hopefully)
get a new release of jenkins-job-builder, see
https://bugs.launchpad.net/openstack-ci/+bug/1251201
In the meanwhile be aware that the unsupported settings
(see jjb/README for details) are just ignored.

The piuparts job currently doesn't work out-of-the-box when set up
via jenkins-job-builder without the patch from
https://review.openstack.org/#/c/56412/ because the CopyArtifact
plugin applies a rewrite of the config.xml on first *build* of
the Jenkins job.