Support function calls with demoted privileges

Implement base functionality to do function calls with different
UID/GID. This is done by spawning a child process, then changing UID/GID
and doing the function call there.

The functionality is added in a new python module, in a new RPM
subpackage - in order to be easily utilize this in the GBS source
service, too.

Change-Id: I1ac345501d692fa11fdb83d3d8ea563780bafcbb
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
utils: set $HOME when doing fork_call()

Change-Id: I9d8bf770536e34c8a9d6495aa39327cc7a6bd6c2
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Run GBP in a separate thread

Change-Id: I26e2d194fd3243b703ff741f3d0a12c6a5770cba
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
refactor: move gbp export into a separate function

Change-Id: I51b0ed18e20558e29a9e362aa0f741052864c944
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Config option to set user/group for running GBP

Add new options to the configuration file to be able to set the
user/group under which git-buildpackage(-rpm) is being run.

Change-Id: Ife74047c08ca02177ce23ea4a3bbaf4d1b08c767
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: utilize ok_() and eq_() from nose tools

In order to getter better assert messages.

Change-Id: Ibb57a3d2f71884e63e0f9294f26eb1b38e32d962
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Config file option for gbp tmp directory

Add a new config file option for configuring the temporary directory
that git-buildpackage uses when it is run.

Change-Id: I6d52c522b217ee1473931b1011fe7e679048903e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Remove one unneeded/broken debug output

Change-Id: I5042a61a12c859818557d7d58acf8b49bb648904
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
cosmetic: give log string arguments as function parameters

Change-Id: Ib4975532931850964804e2763f945b8ca3ae110e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>