tools/git-buildpackage.git
9 years agoDocument changes and release 0.6.25
SoonKyu Park [Tue, 21 Jul 2015 06:04:59 +0000 (15:04 +0900)]
Document changes and release 0.6.25

Change-Id: I03a3dc5bdb419ca3eaff6993989b260b5ef2e960

9 years agoTizen release 0.6.15-20150303 release-for-gbsV0.23
Markus Lehtonen [Tue, 3 Mar 2015 14:03:11 +0000 (14:03 +0000)]
Tizen release 0.6.15-20150303

Change-Id: I631e30aff42fd5acd90b1b3d535a0e38f00aaa12
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoRevert "buildpackage-rpm: always create tarball for native packages"
Markus Lehtonen [Mon, 2 Mar 2015 15:38:44 +0000 (17:38 +0200)]
Revert "buildpackage-rpm: always create tarball for native packages"

Fixes: DEVT-215

This reverts commit efc490c4a8da5ce7a0bd1bf4a20009c3a445bb47.

Change-Id: I2109f7ff48384a3b1190a73a3471bdc67f6d2427
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agodebian packaging: fix rpm build deps for Ubuntu 14.10
Markus Lehtonen [Tue, 3 Mar 2015 15:23:42 +0000 (17:23 +0200)]
debian packaging: fix rpm build deps for Ubuntu 14.10

Dependencies of python-rpm got broken in Ubuntu 14.10 at the update to
rpm v4.11.2-3ubuntu0.1. This change is a work around for that.

Change-Id: I76a912e6e68b83e8e0d667fa881c6f35450c8b2c
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoTizen release 0.6.15-20140828 debian/0.6.25 tizen/0.6.15-20140828
Markus Lehtonen [Thu, 28 Aug 2014 12:02:28 +0000 (12:02 +0000)]
Tizen release 0.6.15-20140828

Change-Id: Ida5b65020a0e9f566aef3d86f5536c7581fdbd01
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm packaging: use macro for python binary
Li Jinjing [Wed, 20 Aug 2014 06:25:02 +0000 (14:25 +0800)]
rpm packaging: use macro for python binary

For fedora distro, when building git-buildpackage rpm packages in the buildroot,
/bin/python is called to do python setup.py actions during rpmbuild,which leads
to /bin/python is taken as requirement of git-buildpackage-rpm-0.6.15-0.noarch.rpm
automatically, resulting in:

Install gbs with dnf command in fedora distro will raise error:
nothing provides /bin/python needed by git-buildpackage-rpm-0.6.12-59.1.noarch

Fixes: DEVT-197

Change-Id: I30169a506d7f92aed759124c40beb2803c196218
Signed-off-by: Li Jinjing <jinjingx.li@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoAdd PKGBUILD to support arch linux
Junchun Guan [Wed, 16 Jul 2014 03:28:29 +0000 (11:28 +0800)]
Add PKGBUILD to support arch linux

Three split packages: git-buildpackage-{common,rpm,doc}

Signed-off-by: Junchun Guan <junchunx.guan@intel.com>
10 years agorpm tests: add unit tests for buildpackage-rpm
Markus Lehtonen [Fri, 18 Jul 2014 13:18:58 +0000 (16:18 +0300)]
rpm tests: add unit tests for buildpackage-rpm

Change-Id: If8a5cce2d43a8dffed6999059a84b3f6040eebdd
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm tests: disable one anomalous pylint error
Markus Lehtonen [Mon, 21 Jul 2014 09:46:40 +0000 (12:46 +0300)]
rpm tests: disable one anomalous pylint error

Change-Id: Ic9b1d4fefaf1062b752c55e372b3644630747d36
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: depend/recommend rpmbuild
Markus Lehtonen [Fri, 18 Jul 2014 14:27:03 +0000 (17:27 +0300)]
packaging: depend/recommend rpmbuild

Change-Id: Ifd5402f93a078eb97ff504eab1dbbf1e2d7c6ca1
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: fix one error message
Markus Lehtonen [Wed, 16 Jul 2014 19:13:29 +0000 (22:13 +0300)]
buildpackage-rpm: fix one error message

Change-Id: I1985f1c4dc208e1b9c18d0b4dc570d1c73c4c0e0
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: drop unneeded exception
Markus Lehtonen [Wed, 16 Jul 2014 14:16:48 +0000 (17:16 +0300)]
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>
10 years agobuildpackage-rpm: handle invalid keys in orig prefix
Markus Lehtonen [Wed, 16 Jul 2014 14:15:44 +0000 (17:15 +0300)]
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>
10 years agobuildpackage-rpm: minor refactor
Markus Lehtonen [Wed, 16 Jul 2014 14:15:03 +0000 (17:15 +0300)]
buildpackage-rpm: minor refactor

Change-Id: Ibe43e3e948cb8854dadfc03449854ef044370237
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: get rid of prepare_export_dir()
Markus Lehtonen [Tue, 15 Jul 2014 10:45:06 +0000 (13:45 +0300)]
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>
10 years agobuildpackage-rpm: remove some outdated/unnecessary exception handling
Markus Lehtonen [Mon, 14 Jul 2014 07:41:36 +0000 (10:41 +0300)]
buildpackage-rpm: remove some outdated/unnecessary exception handling

Change-Id: I01b75b3ff1ba7f483cb6c9b5648b11dde858ed80
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: add '--git-native' option
Markus Lehtonen [Tue, 15 Jul 2014 11:54:44 +0000 (14:54 +0300)]
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>
10 years agobuildpackage: refactor tarball compression
Markus Lehtonen [Mon, 14 Jul 2014 07:25:19 +0000 (10:25 +0300)]
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>
10 years agobuildpackage-rpm: remove some unused variables
Markus Lehtonen [Mon, 21 Jul 2014 12:57:57 +0000 (12:57 +0000)]
buildpackage-rpm: remove some unused variables

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: add missing docstrings
Markus Lehtonen [Mon, 21 Jul 2014 12:39:12 +0000 (12:39 +0000)]
buildpackage-rpm: add missing docstrings

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: remove unused imports
Markus Lehtonen [Mon, 21 Jul 2014 12:29:36 +0000 (12:29 +0000)]
buildpackage-rpm: remove unused imports

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: recommend/require zipmerge
Markus Lehtonen [Tue, 15 Jul 2014 05:54:48 +0000 (08:54 +0300)]
packaging: recommend/require zipmerge

Needed by CatenateZipArchive().

Change-Id: I8f25d9da418414bbcc2eff7797b4f57ee5c69e1f
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm-packaging: recommend/require unzip
Markus Lehtonen [Tue, 15 Jul 2014 05:46:41 +0000 (08:46 +0300)]
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>
10 years agorpm tests: update component test data
Markus Lehtonen [Fri, 18 Jul 2014 12:48:29 +0000 (15:48 +0300)]
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>
10 years agorpm tests: remove RepoManifest.add_project()
Markus Lehtonen [Tue, 10 Jun 2014 13:20:02 +0000 (16:20 +0300)]
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>
10 years agoComponentTestBase: add dirs argument to _check_repo_state()
Markus Lehtonen [Fri, 18 Jul 2014 12:37:48 +0000 (15:37 +0300)]
ComponentTestBase: add dirs argument to _check_repo_state()

Change-Id: I01a421921c8783864d2a5c06d3299fc1ec5d13eb
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agolog: fix auto colorizing for custom streams
Markus Lehtonen [Thu, 10 Jul 2014 08:26:19 +0000 (11:26 +0300)]
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>
10 years agolog: don't automatically setup gbp-specific logger
Markus Lehtonen [Thu, 10 Jul 2014 06:42:35 +0000 (09:42 +0300)]
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>
10 years agobuildpackage-rpm: remove too general exception catching
Markus Lehtonen [Fri, 11 Jul 2014 12:41:45 +0000 (15:41 +0300)]
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>
10 years agobuildpackage-rpm: don't crash on invalid vcs format strings
Markus Lehtonen [Fri, 11 Jul 2014 12:40:59 +0000 (15:40 +0300)]
buildpackage-rpm: don't crash on invalid vcs format strings

Change-Id: I307c82600b0e1336e54016c95cac6ea955adc337
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: add --git-no-build option
Markus Lehtonen [Fri, 11 Jul 2014 12:23:19 +0000 (15:23 +0300)]
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>
10 years agobuildpackage_rpm: always run cleaner hook
Markus Lehtonen [Mon, 30 Jun 2014 14:46:41 +0000 (17:46 +0300)]
buildpackage_rpm: always run cleaner hook

Change-Id: Ia13115e40a186e83c93cee3fe559005eb85858a3
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage_rpm: fix crash when running prebuild hook
Markus Lehtonen [Mon, 30 Jun 2014 14:12:48 +0000 (17:12 +0300)]
buildpackage_rpm: fix crash when running prebuild hook

GitRepository.git_dir is not callable.

Change-Id: Ibc2040b8a36e60a9499b29ea675caa7a8fc8c968
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotests/testutils: add directories arg to ls_* functions
Markus Lehtonen [Fri, 27 Jun 2014 05:39:15 +0000 (08:39 +0300)]
tests/testutils: add directories arg to ls_* functions

With this you can exclude directories from the listing returned by the
ls_tar(), ls_zip() and ls_dir() functions.

Change-Id: I8d586489a277c227a7fb61801e0b774f11e7a67e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage_rpm: check submodules from the exported treeish
Markus Lehtonen [Fri, 27 Jun 2014 05:42:33 +0000 (08:42 +0300)]
buildpackage_rpm: check submodules from the exported treeish

And not from the current working copy.

Change-Id: I5320bd977073e7d69c02782a8a232b4a622553e1
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoGitRepository/has_submodules: add treeish argument
Markus Lehtonen [Fri, 27 Jun 2014 05:36:29 +0000 (08:36 +0300)]
GitRepository/has_submodules: add treeish argument

For defining a Git treeish which to look into, instead of the current
working copy.

Change-Id: I27abd99f0416bd4300953d3c1bae2d99de3ab6c0
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoComponentTestBase: ignore system and user config
Markus Lehtonen [Thu, 26 Jun 2014 10:35:19 +0000 (13:35 +0300)]
ComponentTestBase: ignore system and user config

User might have a system and/or user specific gbp config files. Disable
these config files so that they don't affect the component tests.

Change-Id: I04b83680016690ffa5a2433ad16e9968e54f6f4a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoComponentTestBase: add ls_tree() method
Markus Lehtonen [Thu, 26 Jun 2014 07:05:01 +0000 (10:05 +0300)]
ComponentTestBase: add ls_tree() method

Change-Id: I53b06b41f613baad038117f55c27e7ebdaaadd7e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoComponentTestBase: add check_files() method
Markus Lehtonen [Thu, 26 Jun 2014 07:01:18 +0000 (10:01 +0300)]
ComponentTestBase: add check_files() method

Change-Id: If23365cde15c2659aad039f19984a97968cd4545
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoimport-orig-rpm: download tarball into parent directory
Markus Lehtonen [Tue, 17 Jun 2014 08:08:38 +0000 (11:08 +0300)]
import-orig-rpm: download tarball into parent directory

Prevents dirtying of the current Git working directory.

Change-Id: I6eca70b647130a380ba67d5b90fc23354b3974ea
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: always create tarball for native packages
Markus Lehtonen [Fri, 13 Jun 2014 10:31:48 +0000 (13:31 +0300)]
buildpackage-rpm: always create tarball for native packages

If the package is native, always (re-)create the source tarball, even if
--git-no-create-orig is used. Not creating the tarball does not make
much sense (and most probably just causes problems and confusion): for
native packages there is no place for external tarball and no patches so
we need to always have the correct sources (i.e. the exported revision)
in the tarball.

Change-Id: I3d4a46150a017de499d19ec4ae168e6f642325bd
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: fix exit code in case of GitRepositoryError
Markus Lehtonen [Thu, 12 Jun 2014 12:42:21 +0000 (15:42 +0300)]
buildpackage-rpm: fix exit code in case of GitRepositoryError

Change-Id: I0afa3d5b744a912c63af66f2add9eb68bdc48f5b
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agonotify: catch RuntimeError when importing pynotify
Markus Lehtonen [Thu, 12 Jun 2014 09:04:09 +0000 (12:04 +0300)]
notify: catch RuntimeError when importing pynotify

Work around a problem in some distros (e.g. Fedora) where "import
pynotify" crashes in RuntimeError in some cases, e.g. when DISPLAY env
variable is not set.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agogbp-dch: fix handling of the '--meta' option
Markus Lehtonen [Fri, 6 Jun 2014 07:22:31 +0000 (10:22 +0300)]
gbp-dch: fix handling of the '--meta' option

Make it effective again - previously it was totally ignored. Also,
change it's default value to True to match the current behavior.

Change-Id: I0fb1b5bb99aa8f622a7c52316e9320973333bad5
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm-ch: implement --meta-bts option
Markus Lehtonen [Fri, 6 Jun 2014 09:40:32 +0000 (12:40 +0300)]
rpm-ch: implement --meta-bts option

This gives the user the possibility to define what meta tags (in git
commit message) git-rpm-ch recognizes as bug tracking system references.
Or, makes it possible to disable bts meta tag tracking altogether.

Change-Id: I7125ac951bf13816d43f1854868b15188bb92042
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm.policy: don't allow leading whitespace in bts meta tags
Markus Lehtonen [Fri, 6 Jun 2014 09:39:15 +0000 (12:39 +0300)]
rpm.policy: don't allow leading whitespace in bts meta tags

Change-Id: Ib2d39739b4609c088b04b286adfb6aeb5e07f78a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm-ch: implement --commit-msg option
Markus Lehtonen [Thu, 5 Jun 2014 14:25:25 +0000 (17:25 +0300)]
rpm-ch: implement --commit-msg option

Change-Id: I10e2d4ad30dfd02c73fd0f318375715202ec36c2
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm-ch: implement --commit option
Markus Lehtonen [Thu, 5 Jun 2014 13:37:25 +0000 (16:37 +0300)]
rpm-ch: implement --commit option

Change-Id: I89b05175d3c4f3def796b20b4e65c53af7d96d13
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: new 'commitish' keyword for spec vcs tag
Markus Lehtonen [Mon, 2 Jun 2014 08:57:34 +0000 (11:57 +0300)]
buildpackage-rpm: new 'commitish' keyword for spec vcs tag

Add a new keyword '%(commitish)s' that can be used in the
--git-spec-vcs-tag option. This will be translated to the sha1 of the
commitish (i.e. tag or commit). That is, if you export a tag you will
get the sha1 of the tag object - not resolving to a commit object unlike
'%(commit)s' does.

Change-Id: Ia764e15ac0dc090dde9f8e709f31f66e62120abb
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotristate: implement __nonzero__() method
Markus Lehtonen [Mon, 2 Jun 2014 07:14:52 +0000 (10:14 +0300)]
tristate: implement __nonzero__() method

Returns False if tristate is 'off', otherwise True ('on' or 'auto').

Change-Id: I6ade27fc85c6d05ed69dc694495b70725070d9c5
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agodocs: manpages for the rpm tools
Markus Lehtonen [Tue, 27 May 2014 07:09:36 +0000 (10:09 +0300)]
docs: manpages for the rpm tools

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: rebase on top of upstream version 0.6.15
Markus Lehtonen [Thu, 5 Jun 2014 10:56:16 +0000 (13:56 +0300)]
packaging: rebase on top of upstream version 0.6.15

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoTizen release 0.6.12-20140521
Markus Lehtonen [Wed, 19 Mar 2014 13:31:19 +0000 (15:31 +0200)]
Tizen release 0.6.12-20140521

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopq-rpm: don't create pq branch when switching
Markus Lehtonen [Wed, 9 Apr 2014 13:48:45 +0000 (16:48 +0300)]
pq-rpm: don't create pq branch when switching

Pq branch must be created with 'import'.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: Prepare for next Tizen tools release
Markus Lehtonen [Thu, 7 Nov 2013 11:54:08 +0000 (13:54 +0200)]
packaging: Prepare for next Tizen tools release

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopq-rpm: implement --retain-history option
Markus Lehtonen [Mon, 31 Mar 2014 12:18:34 +0000 (15:18 +0300)]
pq-rpm: implement --retain-history option

With this option defined gbp tries to preserve the history when
converting. That is, for each commit in the old branch create one
corresponding commit in the new orphan packaging branch. This works by
dumping packaging files and updating patches for each commit. However,
empty commits are not generated - these are caused e.g. by changes in
files that are ignored by patch-generation.

NOTE! Only valid for the 'convert' action.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopq-rpm: implement --new-packaging-dir cmdline option
Markus Lehtonen [Tue, 11 Feb 2014 08:18:47 +0000 (10:18 +0200)]
pq-rpm: implement --new-packaging-dir cmdline option

Used for setting the packaging directory to be used in the new orphan
packaging branch. Defaults to --packaging-dir so that the gbp.conf files
are more likely to work without modification.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopq-rpm: implement 'convert' subcommand
Markus Lehtonen [Mon, 10 Feb 2014 08:49:29 +0000 (10:49 +0200)]
pq-rpm: implement 'convert' subcommand

The new subcommand is intended to be a one-time-callable command for
converting a package to use the "orphan-packaging" development model and
git layout (where packaging files are maintained in a separate branch
and code development in another branch).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: patch-export from development branch
Markus Lehtonen [Thu, 6 Feb 2014 13:24:54 +0000 (15:24 +0200)]
buildpackage-rpm: patch-export from development branch

Adds git-buildpackage-rpm --patch-export support for the 'orphan
packaging' development model (where packaging files and development sources are kept in separate
branches).

New functionality:
1. If patch-export is enabled and gbp detects that the current branch
   has a development/patch-queue branch it exports the patches from there,
   instead of the tip of the packaging branch.
2. If gbp detects that the current (or exported) branch is a
   development/patch-queue branch it automatically enables patch-export
   and exports packaging files from the base branch (instead of the
   development/patch-queue branch.

Also, add a new '--git-patch-export-rev' command line option with which
the user can explicitly set the treeish from which patches are generated
(i.e. HEAD..<patch-export-rev>)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoimport-orig-rpm: get archive from spec file
Markus Lehtonen [Thu, 13 Feb 2014 10:41:39 +0000 (12:41 +0200)]
import-orig-rpm: get archive from spec file

Try to get archive path/filename from spec file if no file name is given
on the command line.  This should make version bumps more
straightforward: just update version number in the spec file and run
'git-import-orig-rpm'.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoimport-orig-rpm: implement automatic downloading
Markus Lehtonen [Thu, 13 Feb 2014 10:41:39 +0000 (12:41 +0200)]
import-orig-rpm: implement automatic downloading

Automatically try to download the archive if the archive filename points
to a remote location.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoimport-orig-rpm: implement --create-missing-branches option
Markus Lehtonen [Wed, 12 Feb 2014 13:11:30 +0000 (15:11 +0200)]
import-orig-rpm: implement --create-missing-branches option

Create the upstream branch if it does not exist. Use the same option
name that import-srpm has.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm-ch: add unit tests for the command line tool
Markus Lehtonen [Tue, 25 Feb 2014 10:20:24 +0000 (12:20 +0200)]
rpm-ch: add unit tests for the command line tool

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm-ch: implement '--all' option
Markus Lehtonen [Fri, 16 May 2014 11:26:49 +0000 (14:26 +0300)]
rpm-ch: implement '--all' option

If defined, git-rpm-ch uses all commits in the Git history. Also,
'--since' option is omitted.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm-ch: add --message cmdline option
Markus Lehtonen [Wed, 26 Mar 2014 07:01:28 +0000 (09:01 +0200)]
rpm-ch: add --message cmdline option

For giving the text for new changelog entry/entries, skipping git commit
messages entirely.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm-ch: make it possible to commit/tag the changes
Markus Lehtonen [Thu, 6 Feb 2014 09:35:42 +0000 (11:35 +0200)]
rpm-ch: make it possible to commit/tag the changes

Implement '--tag' command line option (and other related options for
signing) for creating and tagging a release. These correspond the
tagging options in git-buildpackage-rpm.

The git-buildpackage-rpm tool does not commit anything to git. However,
in rpm-ch the '--tag' option causes the changelog modifications (and,
all other staged changes) to be committed to git before creating the
tag. This makes it possible to create a release and document the
packaging/release tag name in the rpm changelog.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoIntroduce git-rpm-ch tool
Markus Lehtonen [Tue, 4 Feb 2014 15:54:36 +0000 (17:54 +0200)]
Introduce git-rpm-ch tool

Initial version of the git-rpm-ch tool which is intended for maintaining
RPM changelogs. Supports both spec files and separate "OBS style"
changelog files.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm: add gbp.rpm.changelog module
Markus Lehtonen [Tue, 4 Feb 2014 15:49:28 +0000 (17:49 +0200)]
rpm: add gbp.rpm.changelog module

This new module contains basic containers and functionality for parsing
and updating rpm changelogs. It is coupled with the rpm packaging policy
class which now has definitions for rpm changelog formatting.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm: support for getting/setting changelog in spec
Markus Lehtonen [Wed, 5 Feb 2014 10:12:38 +0000 (12:12 +0200)]
rpm: support for getting/setting changelog in spec

SpecFile objects now support reading and writing of the %changelog
section.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopq-rpm: add unit tests for the command line tool
Markus Lehtonen [Fri, 27 Sep 2013 08:16:39 +0000 (11:16 +0300)]
pq-rpm: add unit tests for the command line tool

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm-tests: add RepoManifest class
Markus Lehtonen [Wed, 2 Oct 2013 09:35:22 +0000 (12:35 +0300)]
rpm-tests: add RepoManifest class

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopq-rpm: implement '--import-files' command line option
Markus Lehtonen [Tue, 10 Dec 2013 13:25:32 +0000 (15:25 +0200)]
pq-rpm: implement '--import-files' command line option

For defining the packaging file(s) that will be imported into the
development/patch-queue branch.

By default, the local gbp conf files are imported in order to try to
ensure that gbp sees the same settings on the development/pq branch as
on the packaging branch.

NOTE: This option does not affect the patch files that are imported. The
files defined with this option will appear as new files in one
monolithic commit in the development/patch-queue branch.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopq-rpm: bigger refactor of the code
Markus Lehtonen [Thu, 19 Sep 2013 13:22:57 +0000 (16:22 +0300)]
pq-rpm: bigger refactor of the code

Support '%(upstreamversion)s' as a replacable string in the pq branch
name.

Eliminate some unneeded branch switches that were only needed for
finding/parsing the spec file. Now, spec file is directly searched from
the git repository (from the 'base' branch) if the command is run when
on the pq branch - except for the 'export' subcommand which always
switches to the base branch.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: Prepare for next Tizen tools release
Markus Lehtonen [Mon, 2 Dec 2013 11:01:13 +0000 (13:01 +0200)]
packaging: Prepare for next Tizen tools release

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopq-rpm: create diff up to the last merge commit
Markus Lehtonen [Thu, 21 Nov 2013 15:25:37 +0000 (17:25 +0200)]
pq-rpm: create diff up to the last merge commit

Before, merge commits broke patch generation, or, (most probably) caused
the generated patches to be unapplicable (similar to how
git-format-patch behaves).

Now, changes up to the last merge commit are squashed into one diff if
merge commits are found in the revision list from which patches are to
be generated. Individual patches (one per commit) are generated from the
last merge commit up to the exported revision.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: Release, update changelogs
Markus Lehtonen [Wed, 16 Oct 2013 08:07:10 +0000 (11:07 +0300)]
packaging: Release, update changelogs

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm: support guessing spec file from git treeish
Markus Lehtonen [Fri, 6 Sep 2013 13:07:08 +0000 (16:07 +0300)]
rpm: support guessing spec file from git treeish

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm.SpecFile: support parsing spec as raw text data
Markus Lehtonen [Fri, 6 Sep 2013 14:15:52 +0000 (17:15 +0300)]
rpm.SpecFile: support parsing spec as raw text data

Instead of reading from a file.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm: change guess_spec() to return SpecFile object
Markus Lehtonen [Fri, 6 Sep 2013 13:43:23 +0000 (16:43 +0300)]
rpm: change guess_spec() to return SpecFile object

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoGitRepository/get_remote_repos: return URLs, too
Markus Lehtonen [Mon, 3 Dec 2012 08:21:43 +0000 (10:21 +0200)]
GitRepository/get_remote_repos: return URLs, too

In addition to the remote name, return remote URLs. Return value is now
a dict with remote name as the key and a list of URLs as the value. The
first value in the list is the effective fetch URL, the rest of the
values are push URLs.

NOTE! This patch is to be dropped, not going for upstream.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agodebian packaging: change to 1.0 source package format
Markus Lehtonen [Mon, 2 Sep 2013 11:56:57 +0000 (14:56 +0300)]
debian packaging: change to 1.0 source package format

Changes package to be non-native (assuming debian/changelog has version
in correct format).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: Update changelogs
Markus Lehtonen [Mon, 2 Sep 2013 11:46:30 +0000 (14:46 +0300)]
packaging: Update changelogs

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: Release, update changelogs
Markus Lehtonen [Thu, 25 Oct 2012 06:35:46 +0000 (09:35 +0300)]
packaging: Release, update changelogs

Add rpm changelog. Start providing proper changelogs for Tizen Tools
releases.

Also, make it easier to track Tizen releases:
- RPM: Add a 'Provides:' tag to the git-buildpackage-rpm subpackage in
  order to be able to track Tizen releases.
- DEB: Change the package to non-native, by adding a corresponding
  release number to the version field in changelog of Debian packaging.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm tests: slight modificatin of import-srpm tests
Markus Lehtonen [Tue, 3 Sep 2013 07:32:13 +0000 (10:32 +0300)]
rpm tests: slight modificatin of import-srpm tests

Use eq_() and ok() from nose.tools for better assert messages.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotests: add tests for git-import-orig-rpm
Markus Lehtonen [Wed, 31 Oct 2012 15:27:58 +0000 (17:27 +0200)]
tests: add tests for git-import-orig-rpm

Basic tests for virtually all features of import-orig-rpm.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm: Improve logging in case of rpmlib error
Markus Lehtonen [Fri, 16 Aug 2013 10:51:13 +0000 (13:51 +0300)]
rpm: Improve logging in case of rpmlib error

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm: print a warning if importing gbp-specific librpm fails
Markus Lehtonen [Mon, 19 Aug 2013 07:00:35 +0000 (10:00 +0300)]
rpm: print a warning if importing gbp-specific librpm fails

Fixes: #1177

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm: implement a wrapper module for rpm lib
Markus Lehtonen [Fri, 16 Aug 2013 10:26:54 +0000 (13:26 +0300)]
rpm: implement a wrapper module for rpm lib

Intended for capturing the rpm lib logging output.

NOTE! The new module is named 'lib_rpm.py' (and not 'librpm.py') because
of a bug in python-nose: some name clash makes nosetests --with-xunit
fail in this case.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoimport-srpm: support --upstream-vcs-tag cmdline option
Markus Lehtonen [Thu, 30 May 2013 14:35:57 +0000 (17:35 +0300)]
import-srpm: support --upstream-vcs-tag cmdline option

Similar to what the option does in git-import-orig-[rpm].

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm: support importing bzip2 compressed patches
Markus Lehtonen [Mon, 20 May 2013 07:45:25 +0000 (10:45 +0300)]
rpm: support importing bzip2 compressed patches

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm: give patches in the order they are applied in the spec
Markus Lehtonen [Wed, 15 May 2013 06:51:54 +0000 (09:51 +0300)]
rpm: give patches in the order they are applied in the spec

Fixes patch importing in situations when patch tag numbering in the spec
differs from the order they are applied.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorpm packaging: depend on pristine-tar
Markus Lehtonen [Mon, 13 May 2013 12:05:31 +0000 (15:05 +0300)]
rpm packaging: depend on pristine-tar

In practice, it is a weak dependency but upstream RPM doesn't support
weak dependencies so we put it to 'Requires:' for everything else than
openSUSE or Tizen (which do support weak deps).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: git-buildpackage (Debian) tool requires devscripts
Markus Lehtonen [Tue, 23 Apr 2013 13:41:52 +0000 (16:41 +0300)]
packaging: git-buildpackage (Debian) tool requires devscripts

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoCentOS compatibility: fix GitRepository.diff
Markus Lehtonen [Fri, 8 Nov 2013 10:37:51 +0000 (12:37 +0200)]
CentOS compatibility: fix GitRepository.diff

Remove the "all" parameter from --ignore-submodules which is not
supported by the old Git version of CentOS 6 (besides, it's the default,
anyway)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoCentOS compatibility: disable Debian tools
Markus Lehtonen [Wed, 24 Apr 2013 11:08:19 +0000 (14:08 +0300)]
CentOS compatibility: disable Debian tools

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoCentOS compatibility: fix GitRepository._cmd_has_feature()
Markus Lehtonen [Mon, 4 Mar 2013 11:17:24 +0000 (13:17 +0200)]
CentOS compatibility: fix GitRepository._cmd_has_feature()

Make it work in CentOS 6.3 with older git by removing backspace
characters when examining man page section names.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoCentOS compatibility: fix tests
Markus Lehtonen [Tue, 5 Mar 2013 15:49:56 +0000 (17:49 +0200)]
CentOS compatibility: fix tests

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoCentOS compatibility: make GBP work with older python2.6
Zhang Qiang [Fri, 8 Feb 2013 06:09:26 +0000 (14:09 +0800)]
CentOS compatibility: make GBP work with older python2.6

- use loops to generate dict/list
- Called logging.Logger.__init__ instead of using super(). In python 2.6
  logging.Logger is not new-style class, therefore supper() is failing.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agobuildpackage-rpm: implement --[no-]hooks option
Markus Lehtonen [Tue, 23 Apr 2013 12:45:38 +0000 (15:45 +0300)]
buildpackage-rpm: implement --[no-]hooks option

For enabling/disabling all hooks, similar to git-buildpackage (the
Debian tool). Does not affedt the builder.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoDisable xcover support for nose
Markus Lehtonen [Mon, 22 Apr 2013 11:11:32 +0000 (14:11 +0300)]
Disable xcover support for nose

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