summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-03debian packaging: HACK: disable test in Debian buildsMarkus Lehtonen1-3/+3
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03TODO: add rpm todoMarkus Lehtonen1-0/+17
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03buildpackage-rpm: fail patch-export if local patches foundMarkus Lehtonen1-0/+9
Make patch export fail if local patch files (not marked for manual maintenance) exist. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03import-srpm: return 2 if patch import failsMarkus Lehtonen1-4/+11
A new return value for failed patch import. If the patch import fails the repo is left in clean and buildable state so one might want to distinguish that from other failures. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03docs: update rpm documentationMarkus Lehtonen6-152/+347
Sync with the latest version of the git-buildpackage RPM tools. Also add more content to the "building" and "development" sections. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03tests: add unittests for gbp.rpmMarkus Lehtonen22-0/+418
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: circumvent a bug in python-rpmMarkus Lehtonen1-3/+16
Which caused the packager tag to be incorrect in some cases. Rpm-python doesn't seem to reset spec.sourceHeader[rpm.RPMTAG_PACKAGER] if no packager tag is defined in the spec file. Thus, if we (in the same context) first parse spec A (which has a packager tag) and then spec B (which doesn't have a packager tag) python-rpm will give the packager of A for B as well. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03import-srpm: suppress some pylint warningsMarkus Lehtonen1-63/+89
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: Add doctests to RpmPkgPolicyMarkus Lehtonen1-1/+36
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03buildpackage-rpm: return 2 for patch-export or tarball generation errorsMarkus Lehtonen1-14/+28
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: implement file path filters in patch exportMarkus Lehtonen3-17/+51
Implements a filter option allows one to filter out changes to certain files/paths in the patch-generation. A commit is totally ignored if all files would be filtered out. The path filter is given as a Python regexp. This option is useful for example in filtering out the changes to packaging files when maintaining packaging and sources in the same branch. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm-pq: rework patch generation code, againMarkus Lehtonen1-85/+96
Get rid of text file parsing and regenerating of patches. Instead, commits are examined, filtered and generated one-by-one. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: enhance patch generation in generate_git_patches()Markus Lehtonen1-10/+29
Check that the start and end points are found in the git tree. And, check that the start commit is part of end commits history. This helps mitigate the risk that spec file and branch are out of sync. Also, if end point is a plain tree object we still generate patches normally up to the current branch HEAD, and, only the big diff from HEAD to the tree object. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03packaging: add .dsc file and Makefile for updating itMarkus Lehtonen3-0/+37
Tizen-specific packaging for easy buildability on Deb-based distros. Dsc and Makefile based on originals from Eduard Bartosh. Also, adds a postexport hook to gbp.conf and set default builder to osc so that package maintenance with gbp is easier. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Olev Kartau <olev.kartau@intel.com>
2013-04-03buildpackage-rpm: support special tree-ish names in --git-upstream-treeMarkus Lehtonen1-13/+23
Support special 'WC*' and 'INDEX' values for the --git-upstream-tree option. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: support to define filename of squashed diffsMarkus Lehtonen3-9/+22
Adds the ability to define the filename of the monolithic diff generated with the --patch-export-squash-until option. The new format of the cmdline option filename is commit-ish followed by (optionally) a colon and the desired filename base. Suffix '.diff' is added by GBP. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03Universal configurable base tmpdir for all gbp rpm toolsMarkus Lehtonen4-76/+87
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03import-srpm: support for patch importMarkus Lehtonen4-21/+102
Adds a new commandline option '--patch-import' for importing patches into the source tree in packaging branch. When enabled, gbp applies and commits all patches (not marked for manual maintenance) into the packaging branch. If this succeeds, it also removes all imported patch files from the packaging directory and the spec file. Currently only supported for non-orphan-packaging. This setting is true by default which should make more sense as the developer wants to do code development in the packaging branch (if he/she selects to use non-orphan packaging). However, patch-import is force-disabled if in bare git repository. We cannot support this, currently. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: bigger refactor of import-srpmMarkus Lehtonen2-243/+190
Import source rpms in the same way as unpacked sources: that is, first unpack the srpm and then use the same code for importing. Also, tries to make tmpdir handling a bit better: all temporary directories are created under one "base tmpdir". Also, get rid of the orig tarball guessing and unpackging in SrcRpmFile class in gbp.rpm. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: refactor patch-generation codeMarkus Lehtonen2-93/+84
Now both pq-rpm and buildpackage-rpm use the same patch generation code. Also, add --patch-export-ignore-regex option to pq-rpm. Changes write_patch() to use the systems gzip command via a subprocess call. This is needed because we want to use the '-n' option which prevents gzip from storing the timestamp (and filename) into the compressed file. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: support squashing commits in patch generationMarkus Lehtonen4-18/+74
Implements an option for git-buildpackage-rpm and gbp-pq to squash commits (from upstream) up to certain tree-ish into one monolithic diff. Useful e.g. if you wan't to auto-generate a stable update patch. Also, does some refactoring/consolidation of the patch generation code between buildpackage-rpm and pq. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: add --orig-prefix optionMarkus Lehtonen3-23/+70
Adds a new option --orig-prefix that affects the prefix of the generated/imported orig tarballs. For git-buildpackage-rpm, it defines the prefix of tarballs generated by the tool, 'auto' (default) makes gbp to guess the prefix, as before. NOTE: this doesn't affect the tarballs checked out from pristine-tar (i.e. if --pristine-tar is defined) or tarballs that are already present (see --git-tarball-dir option). For git-import-orig, this new option affects the prefix of tarballs imported into pristine-tar branch. If set to 'auto' (default) gbp doesn't mangle the prefix. Other tools (e.g. git-import-srpm) are not affected. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: enhance logic in guessing the prefix of source archivesMarkus Lehtonen3-37/+137
Now a prefix is guessed for all source archives (not for the one and only "orig archive"). By default it is '<archive_name>-<archive_version>/' if name and version can be determined from the filename. If not, the archive basename (i.e. filename less archive and compression extensions) is used. In addition, more logic is applied to the "orig archive": gbp examines the setup macro (if found) for the source and takes the prefix from there. If some macros (in the '-n' option of the setup macro) cannot be expanded archive basename us used as the prefix. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: support generating compressed patchesMarkus Lehtonen5-83/+76
This patch adds the support to generate compressed patches. User can define the patch file size limit after which patches gzipped. Re-writes the write_patch() function(s) and now uses the same-and-only write_patch() for buildpackage-rpm and pq-rpm. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03pq-rpm: support importing compressed patchesMarkus Lehtonen1-4/+20
Adds support for importing compressed patches. NOTE: Only gzip is supported, for the time being, other compression methods shouldn't be to hard to add, if needed. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm helpers: add support for gbp-specific rpmlibMarkus Lehtonen2-2/+12
Adds support to use a special rpmlib, defined by rpm packaging policy. This makes it possible to use the target distro's rpmlib. That is, parse spec files for target distros (and architectures) incompatible with your host system. With the default RpmPkgPolicy, GBP tries to import "rpmlibgbp". Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: move RpmPkgPolicy class into a separate moduleMarkus Lehtonen6-93/+120
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03buildpackage-rpm: add more tagging optionsMarkus Lehtonen2-0/+44
Add new possible keywords to be used in packaging-tag format string: 'nowtime', 'authortime', 'committime', 'nowtimenum', 'authortimenum' and 'committimenum'. The '*timenum' keyword denote the corresponding '*time' keyword appended with an additional incremental serial number. E.g. if 'nowtime' would produce '20120531', 'nowtimenum' would (the first time) produce '20120531.1'. What is completely missing is a way to support these new tag keywords in git-import-srpm tool. So, if you use these tags, git-import-srpm is not able to reproduce the tags, (and, it is not necessarily able to correctly tell if you've already imported a certain version of the package). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03RpmGitRepository: make version-tag methods more flexibleMarkus Lehtonen5-29/+32
Simplifies version_to_tag() and find_version() so that all string fields (for the format string) are given in one dict. Now it's easier to add support for new string fields (e.g. commitdate etc). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2013-04-03rpm helpers: make SpecFile and SrcRpmFile give (full) version as dict.Markus Lehtonen5-19/+35
The Dictionary contains different "version components", such as upstreamversion, release and epoch. Makes e.g. tag creation consistent, now. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: add version parsing functions to pkg policyMarkus Lehtonen6-31/+94
Adds functions for version string generation and parsing. These are intended for parsing version strings taken e.g. from rpm filename or changelogs. Also, take these new version parsing functions into use in the rpm gbp scripts. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2013-04-03buildpackage-rpm: add option --git-ignore-untrackedMarkus Lehtonen3-3/+9
Adds a new commandline option to ignore untracked files, when running git-buildpackage-rpm. When this option is given, the git-buildpackage-rpm command fails if there are changes to tracked files, but, succeeds if there are untracked files present. Normally it fails in either case. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03buildpackage-rpm: implement patch export filtersMarkus Lehtonen3-1/+16
Implements a filter option which can be used to filter out certain commits from the patch-generation. A commit is ignored if any line of the commit message matches the given regex. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03debian packaging: split Debian package into subpackagesEd Bartosh12-8/+66
Split Debian package into three packages, following the introduction of RPM tools. Now the Debian packaging resembles the default RPM packaging: - git-buildpackage-common contains the common code for Deb and RPM tools - git-buildpackage contains the Debian-specific modules/tools - git-buildpackage-rpm contains the RPM-specific modules/tools Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03debian packaging: fix package build for Ubuntu OneiricEd Bartosh1-2/+2
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2013-04-03Add rpm packaging filesMarkus Lehtonen2-0/+167
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Olev Kartau <olev.kartau@intel.com> Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03README: mention RPM supportMarkus Lehtonen1-0/+7
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03docs: revamp RPM docsMarkus Lehtonen3-39/+54
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03docs: add initial RPM documentationMarkus Lehtonen6-0/+213
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03rpm: add 'vendor' config optionMarkus Lehtonen7-22/+33
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>
2013-04-03rpm: add rpm-specific example config fileMarkus Lehtonen1-0/+126
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-03Introduce git-import-orig-rpm toolMarkus Lehtonen5-2/+345
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>
2013-04-03Introduce git-buildpackage-rpm toolMarkus Lehtonen5-4/+620
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>
2013-04-03pq-rpm: add new --pq-branch optionMarkus Lehtonen2-1/+8
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>
2013-04-03gbp-pq-rpm: add 'export-rev' optionMarkus Lehtonen1-4/+12
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>
2013-04-03Introduce gbp-pq-rpm toolMarkus Lehtonen5-2/+404
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> Signed-off-by: Olev Kartau <olev.kartau@intel.com>
2013-04-03Introduce git-import-srpm toolMarkus Lehtonen4-1/+434
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>
2013-04-03Add 'packaging-tag' option to config.pyMarkus Lehtonen1-0/+3
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>
2013-04-03Rename internal var debian_tag -> packaging_tagMarkus Lehtonen3-10/+10
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>
2013-04-03Add 'packaging-branch' cmdline optionMarkus Lehtonen5-2/+31
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>