summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-26pq_rpm: add 'options' to some functionsbuildpackage-rpmTzafrir Cohen
Various functions in scripts/pq_rpm.py did not have the extra options parameter. Add it.
2015-03-26gbp rpm: mock chroot builderTzafrir Cohen
Initial version. Very rough and many shortcuts taken. Try: gbp buildpackage-rpm --git-mock --git-dist=epel-6 Results will be under ../rpmbuild/results/
2015-03-26Add buildpackage-rpmTzafrir Cohen
2015-03-26buildpackage/git_archive_single: use GitRepository.archive()Markus Lehtonen
Use GitRepository.archive() method like git_archive_submodules() does. This makes it possible to call git_archive_single() independent of the callers current working directory. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> With some adjustments (e.g.: comp_opts) Signed-off-by: Tzafrir Cohen <tzafrir@debian.org>
2015-03-26common/buildpackage: support for different archive formatsMarkus Lehtonen
Adds support for defining the archive format of the output of git_archive_single(), e.g. 'zip'. Defaults to 'tar', as before. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26notifications: make notify() more genericMarkus Lehtonen
In order to be able to re-use it in other tools than git-buildpackage. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26rpm: add version parsing functions to pkg policyMarkus Lehtonen
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> Left only the changes in policy.py itself, Signed-off-by: Tzafrir Cohen <tzafrir@debian.org>
2015-03-26gbp-pq: readiness to configure the pq branch nameMarkus Lehtonen
All other gbp branches have configurable names. This commit adds the readiness for user to configure/change the name of the patch-queue branches, as well. Patch-queue is defined in options as a format string, where '%(branch)s' refers to the debian/packaging branch. If the pq-branch format string does not contain '%(branch)s', there is only one patch-queue branch and the debian/packaging branch is used as its base branch. That is, e.g. a 'gbp-pq switch' operation from the patch-queue branch always switches to the debian/packaging branch. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Olev Kartau <olev.kartau@intel.com> Minor adjustments, Signed-off-by: Tzafrir Cohen <tzafrir@debian.org>
2015-03-26buildpackage: fix exporting of working copy when run from a subdirMarkus Lehtonen
Exporting sources failed when git-buildpackage was run from a subdirectory of the git working directory because the path of the custom index file was not handled correctly. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26buildpackage: add 'untracked' option to write_wc()Markus Lehtonen
Whether to ignore untracked files (untracked=False) or not (untracked=True). Now, clones the temporary index file from the actual index, in order to correctly update files. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2015-03-26config: support for per-tree config filesMarkus Lehtonen
Add support for reading the local config file(s) from a given git tree-ish. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26buildpackage: new "working copy" choices for --git-exportMarkus Lehtonen
Add support for building different kind of "working copies", when using the --git-export option: - 'WC.TRACKED': only use files that are already tracked - 'WC.UNTRACKED': use untracked files, too - 'WC.IGNORED': also add files that'd normally be ignored Using '--git-export=WC' beaves like before. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26rpm-pq: Include in command-line testTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir@debian.org>
2015-03-26Fix typo in pydoc: treeish's type twiceTzafrir Cohen
Fix a documentation typo that broke running epydoc at package build time. Signed-off-by: Tzafrir Cohen <tzafrir@debian.org>
2015-03-26pq: allow running actions in repo subdirMarkus Lehtonen
This should make the usage of gbp-pq more flexible and prevent mistakes caused by e.g. running gbp-pq import under some subdirectory. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26buildpackage/dump_tree: use GitRepository.archive()Markus Lehtonen
Make dump_tree() utilize the GitRepository.archive() method - similarly to git_archive_submodules() - instead of ad-hoc Python pipes. This makes dump_tree() work independent of the callers current working directory. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26GitRepository.archive: add 'paths' optionMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26GitRepository.archive: support getting tar data as return valueMarkus Lehtonen
Return tar data as a generator object, if the 'output' option is not defined. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26GitRepository.__git_inout: prevent blocking of stdinMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26GitRepository: new method for getting git output as generatorMarkus Lehtonen
Add a new _git_inout2() helper method that returns the git output (stdout) as a generator - instead of all stdout data in one string. Useful for handling git commands that are expected to have a lot of stdout data, like git-archive. Also, changes the private __git_inout() method to return a generator. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26GitRepository: allow repo inititialization from subdirMarkus Lehtonen
This allows initialization of a GitRepository object, even if the current working directory (or path given to GitRepository) is not the top level directory of the git repository. Don't guess the git meta data dir, but, take it as reported by git itself. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-26GitRepository: implemet checkout_files() methodMarkus Lehtonen
Makes it possible to only checkout certain files from a branch, instead of switching to the branch. Add a new method instead of extending checkout() in order to keep it consistent. That is, otherwise checkout() would have totally different outcome depending on whether paths were defined of not. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-03-20Fix paragraph indentation for epydocGuido Günther
2015-03-18Add %(hversion)s to version_to_tag to support some upstreamsDaniel Kahn Gillmor
enigmail upstream uses tags named enigmail-1-8 for 1.8. Other upstreams have used similar conventions, likely as holdovers from CVS (e.g. gnupg 1.4.2 was tagged with V1-4-2). This patch helps packagers work with these upstreams. Closes: #780679 Signed-off-by: Guido Günther <agx@sigxcpu.org>
2015-03-16Allow to set upstream-vcs-tag via gbp.confDaniel Kahn Gillmor
Also pass it through version_to_tag so upstream-vcs-tag = libgpg-error-%(version)s properly expands the version replacement. Closes: #780602
2015-02-25GitRepository/has_submodules: add treeish argumentMarkus Lehtonen
For defining a Git treeish which to look into, instead of the current working copy. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-25tests: one more testcase for GitRepository.diff()Markus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-25config: modify configparser import statementMarkus Lehtonen
Usage of six.moves.configparser in the previous way failed at least with some versions of python-six (e.g. 1.4.1) like > >>> from six.moves.configparser import SafeConfigParser > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ImportError: No module named configparser Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-21Remove unused importGuido Günther
and pylint exception that doesn't trigger
2015-02-21Remove unused variableGuido Günther
2015-02-21Ignore first part of type outputGuido Günther
Types are classes in python3 so we get 'class' instead of 'type'. Ignore that detail in the matcher since it's not relevanthere.
2015-02-20gbp.format: fix one typo and indentationMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-20tristate: implement __nonzero__() methodMarkus Lehtonen
Returns False if tristate is 'off', otherwise True ('on' or 'auto'). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-20rpm tests: use eq_ and ok_ from nose toolsMarkus Lehtonen
Provides better error messages as is more consistent as eq_ was already used in some test cases. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-20tests: add tests for UpstreamSource.guess_version()Markus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-20UpstreamSource.guess_version: recognise debian native tarballsMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-02-20Document changes and release 0.6.24Guido Günther
2015-02-20Don't output additional newlinesGuido Günther
introduced by 0a4725c045a5a55592dafd41c6ef6f9bab4791cd
2015-02-20Development now on masterGuido Günther
Gbp-Dch: Ignore
2015-02-20bash-completion: Avoid a pointless forkGuido Günther
2015-02-20Move requests import to downloadsGuido Günther
The requests import takes ages and therefore considerably slows down program start up. This is very much noticeably during bash completion. Before: $ time gbp --list-cmds >/dev/null real 0m0.559s user 0m0.528s sys 0m0.028s After: $ time gbp --list-cmds >/dev/null real 0m0.092s user 0m0.088s sys 0m0.000s
2015-02-20Only use absolute importGuido Günther
since searching both isn't supported in Python3. Since the tests are run from the toplevel dir we'll pick up the right scripts.
2015-02-20Don't use basestringGuido Günther
to work toward Python3 support
2015-02-20Use verbose outputGuido Günther
so we see all git commands
2015-02-20Handle renamed urlparse in Python3Guido Günther
to work towards Python3 support Gbp-Dch: Ignore
2015-02-20Use six.iteritems() and six.iterkeys()Guido Günther
to work towards Python3 support Gbp-Dch: Ignore
2015-02-20Handle Python3's changed octal literal syntaxGuido Günther
2015-02-20Use relative importGuido Günther
so Python3 can cope as well
2015-02-20Convert result to listGuido Günther
Python3 returns a dict_items obj
2015-02-20Use email.utils instead of email.UtilsGuido Günther
works with python 2 and 3