buildpackage-rpm: add --git-no-build option

Replaces and deprecates --git-export-only. The new option name is way
better in line with the other option names.

Change-Id: If54edf46eccaad4449ffe6b895b4958395e55c2e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: don't crash on invalid vcs format strings

Change-Id: I307c82600b0e1336e54016c95cac6ea955adc337
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: remove too general exception catching

There should be no reason to catch general Exception here.

Change-Id: I1857bf7010365cc6044ff2783eda55dda35e6507
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
log: don't automatically setup gbp-specific logger

This makes it nicer to use gbp.* modules (e.g. gbp.git) in other
software projects which may have their own logging setup. Now, importing
gbp.* modules won't force-setup logging.

Change-Id: I3e9cfe27c67cdd74c32ceba5dad786cc694ad7b6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
log: fix auto colorizing for custom streams

Check for existence of isatty() method in the stream object. Some custom
streams (e.g. in nose) do not necessarily have this.

Change-Id: I4c8386dfd6f016f926f2eb70b953b19095d585c2
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
ComponentTestBase: add dirs argument to _check_repo_state()

Change-Id: I01a421921c8783864d2a5c06d3299fc1ec5d13eb
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
rpm tests: remove RepoManifest.add_project()

This functionality is moved to the rpm testdata submodule.

Change-Id: I0824dbabe84fa75e1053c2508cc86d894dc295e6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
rpm tests: update component test data

Adds pq/devel branch and .gitignore file to gbp-test package.

Change-Id: Ia6dcbe875433bba00559bd65d9547a8b43e15e97
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
rpm-packaging: recommend/require unzip

Unzip is needed for handling zipped upstream sources.

Change-Id: I21bb57ad96edece7041d209b1f8264e6ec8465de
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
packaging: recommend/require zipmerge

Needed by CatenateZipArchive().

Change-Id: I8f25d9da418414bbcc2eff7797b4f57ee5c69e1f
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: remove unused imports

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: add missing docstrings

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: remove some unused variables

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage: refactor tarball compression

Introduce a new function for running the compressor commands. Unifies
exception/error handling - GbpError will be returned if the compressor
fails.

Change-Id: I7d876f01d1855a7b6264f6298a16313045dc6873
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: add '--git-native' option

Can be used to explicitly configure a package as native or non-native.
Default behavior is still to guess based on the existence of upstream
branch.

Change-Id: I09c3797fd3d88285ee1e920f4c40e3b22c06916a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: remove some outdated/unnecessary exception handling

Change-Id: I01b75b3ff1ba7f483cb6c9b5648b11dde858ed80
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: get rid of prepare_export_dir()

No need to mangle the export directory.

Change-Id: I686cb9d23ea9e95206cdd1c55627b3ca14e83dad
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: minor refactor

Change-Id: Ibe43e3e948cb8854dadfc03449854ef044370237
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: handle invalid keys in orig prefix

Gracefully handle invalid keys in the --git-orig-prefix format string.

Change-Id: I1948ed7b34cdd806a0154d8cf354c5095388988f
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage-rpm: drop unneeded exception

We will never get here as parse_spec() always returns GbpError.

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