packaging: start development of version 0.7

Change-Id: I0ffc8ea5ef1d0abea64063d7f5c1942693f1eec6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
utils: handle child exceptions in fork_call() more gracefully

Create a new exception type GbpChildBTError for handling exceptions that
happen in the function that is called in fork_call(). Allows us to catch
exceptions in the called "child" function and print out correct
traceback.

Change-Id: Ib99630df0fa788dc0ec86450460f9daede0a4f59
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Handle gbp crashes gracefully

Catch unhandled exceptions in gitbuildpackage[-rpm] in which case print
a traceback and return an error.

Change-Id: I9d3f51ee5a2f63e1656ae06c1f808a1f418829d6
Don't read default config files if --config is given

Only read the default config files if the user does not provide any
config files via the --config command line option.

Change-Id: If816bd325ab96f9ba218bd7dbda96c2e10225e34
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
utils: internal refactor of fork_call()

Utilize functools.partial to get rid of some function argument magic.

Change-Id: I6ed699dfa955217f51119bfc9b5b50d790a1a278
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
utils: change fork_call() to return a callable

Hopefully making its usage easier to read.

Change-Id: I7facc91ace28b4e83783453d8f72ca14316b827a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
setup.py: take summary from spec file

Utilize a new more generic function for parsing packaging data from the
spec file.

Change-Id: I746fd29755435d997ed2943e9a93835c447d4813
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
setup.py: add license and url information

That are parsed from the spec file.

Change-Id: Icf91346a7d2f02c8ee751462a87c24b6ae984dbf
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
packaging: -utils subpackage depends on gbp-repocache

Require the same version in order to avoid breakage caused by possible
API changes.

Change-Id: I1489e09833d6d8714d23b4ea1e0f190f51cfd6d0
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Remove duplicate gbp command line option

It is already added once few lines above.

Change-Id: Ie018250edc9ef1fe69efc4919379a9003b7af18a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Include tag name in the git treeish meta data

Add tag name to the information returned by the
MirrorGitRepository.get_tag_info() method.  This information will also
be automatically written by the write_treeish_meta() function, and thus,
available in the meta data exported when using --git-meta.

Change-Id: Ibc20ac137c1102fea15a39a222f7dd228f5f5f99
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Disable git-buildpackage desktop notifications

They are not useful in the service context. And, disabling them removes
one possible point of failure.

Change-Id: I09f66439c1cd128a5f5260073919180db184231f
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
MirrorGitRepository: add list_tags() method

For getting tags pointing at a certain object.

Change-Id: I5e952d912c79e0ed8ba22061e484a88866d0fc27
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Include tag list in the git treeish meta data

List all annotated tags pointing at the exported commit. Adds a new
'tags' key (an array) to the metadata.

Change-Id: I0271130807f3af8e3e112360842fcac095d07fd5
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add git-meta option in to the .service file

This was accidentally missing in
e6764abc191888adf4b31c9d865958c5acba5e88 which introduced the new
option.

Change-Id: Id8a71d37be1373ad2b2af8ec863d079b7449be02
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
MirrorGitRepository.set_ref: fix error handling

For some reason git-symbolic-ref does not have non-zero exit code in
failure cases. Thus, look at stderr instead of exit code for determining
if the command fails.

Add error handling for case where we write directly to the ref file
(i.e. non-symbolic refs).

Also, add test cases for the above failure modes.

Change-Id: I2fb185d91ac57e3757964dd3edd5d21173ca568d
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: test case for internal service errors

Change-Id: If52270d8375e3cb2fc4f4198c7a1bdab782651f4
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
CachedRepo: remove redundant initialization code

Remove the creation of repo parent directory in _init_git_repo(). The
parent directory is created in _init_cache_dir() - with proper error
handling.

Change-Id: I840b0166b6f7463e7119a43edf68507419322f89
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add deployment instructions

Change-Id: I404ea8f35b3604473c6955b08c58fb9309935684
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Change location of tag list in treeish meta data

Move the 'tags' array under the 'commit' key.

Also, add a similar 'tags' array to the 'tag' key - this will list all
annotated tags (if any) pointing to the tag object.

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