Introduce rpm helpers

Preparation for RPM support.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
config: add rpm-specific option parser class

Adds a new GbpOptionParserRpm class for handling rpm-specific options.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp-pull: similar update strategy for all branches

Treat non-checked-out branches similarly to the current branch when
forcing update. That is, do git merge, instead of just setting the ref.

Also, renames fast_forward_branch() to update_branch() to better match
the functionality.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp-pull: two modes for --force

The 'force' option now has two possible values:
'merge': upstream branch is merged, even if fast-forward is not
possible.

'clean': check out a clean copy from the upstream if fast-forward is not
possible (i.e. no merge). Local changes are lost in this case.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add 'packaging-dir' option to config.py

Needed by the upcoming rpm tools.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Rename internal var debian_branch -> packaging_branch

This is done in sake of more general purpose naming, intended for
enabling rpm support.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add 'packaging-branch' cmdline option

This is the counterpart of 'debian-branch' (basically identical to that)
to not confuse rpm maintainers.

Also, adds this option to gbp-clone and gbp-pull commands (as an
alternative to the 'debian-branch option), which are usable for RPM in
their current form.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Rename internal var debian_tag -> packaging_tag

This is done in sake of more general purpose naming, intended for
enabling rpm support: to allow logical naming for rpm and to
share as much code between debian and rpm tools as possible.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add 'packaging-tag' option to config.py

This is the counterpart of 'debian-tag' (basically identical to that) to
not confuse rpm maintainers.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Introduce git-import-srpm tool

Initial version of the git-import-srpm: a tool for importing source
rpms.

Unit tests: created a separate method in TestHelp for RPM-specific
commands.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Introduce gbp-pq-rpm tool

Initial version of gbp-pq-rpm: a tool for managing patch queues for rpm
packages.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp-pq-rpm: add 'export-rev' option

This option allows generating patches from any git tree-ish (instead of
the default that is HEAD of patch-queue branch).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
pq-rpm: add new --pq-branch option

Adds a new command line option '--pq-branch' to set the name of
patch-queue branches. Changes the defaults pq-branch name for rpm tools
to 'development/%(branch)s' (instead of the old
'patch-queue/%(branch)s').

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Introduce git-buildpackage-rpm tool

Initial version of git-buildpackage-rpm: git-buildpackage tool for rpms.

Also adds some new options to config.py that are exclusively used in
this tool.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
Introduce git-import-orig-rpm tool

Initial version of the git-import-orig-rpm: version of git-import-orig
intended for maintaining rpm packages.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
rpm: add rpm-specific example config file

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
rpm: add 'vendor' config option

Intended to represent the distribution vendor (e.g. 'Debian'). This can
be used in tag and branch name formatting.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
TODO: add rpm todo

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
docs: add initial RPM documentation

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
docs: revamp RPM docs

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