summaryrefslogtreecommitdiff
path: root/gbp/scripts
AgeCommit message (Collapse)Author
2013-11-05import-dsc: allow to skip Debian tag creationGuido Günther
Closes: #636368
2013-10-31pq: support 'Topic' patch-export commandMarkus Lehtonen
Topic can be defined with either 'Gbp: Topic <topic>' or 'Gbp-Pq: Topic <topic>' in the commit message. This is to replace the "gbp-pq-topic: <topic>" command. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq: listen to 'Gbp-Pq:' commands, tooMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq: add format_diff() functionMarkus Lehtonen
For generating a patch file from a diff between two arbitrary commits. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq: support patch-export commandsMarkus Lehtonen
Support giving commands to pq as a meta tag in commit message. The format is "Gbp: <command> [args]". Currently, only one command is supported. namely 'ignore'. That is, one can use 'Gbp: Ignore' in the commit message for ignoring the commit in patch-generation. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq: properly generate non-ascii patch filesMarkus Lehtonen
Encode non-ascii email headers properly. Also, set MIME headers correctly for the message body if the commit message body contains non-ascii characters. The reason for constructing the message in a little bit "clumsy" way is the intention is to match the output of git-format-patch as closely as possible. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq.format_patch: support file path filteringMarkus Lehtonen
Implements a filter option that allows filtering 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. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq: rewrite patch export functionalityMarkus Lehtonen
Use our own function for constructing the patch files instead of using the format-patch command of git. This way, we get the desired output format directly, without the need for the error-prone "format-patch, parse patch files, mangle and re-write patch files" cycle. Also, fix patch naming in patch generation when '--no-patch-numbers' is used. Previously, multiple commits with the same subject resulted in multiple patches having the same filename. This lead into broken series with missing patches as patch files were overwritten by the topmost commit. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-22gbp-clone: support cloning to a specific directoryGuan Junchun
Closes: #725666 Signed-off-by: Guan Junchun <junchunx.guan@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-16pq: Only print number or tries if we try more than onceGuido Günther
2013-09-16pq: print which patch failed to applyGuido Günther
2013-09-10common/buildpackage: fix handling of empty tarball prefixMarkus Lehtonen
Previously empty prefix in tarball generation introduced a leading slash in all filenames in the archive. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-05Remove unused importGuido Günther
2013-09-04import-orig: import readline in the common moduleMarkus Lehtonen
Useful common functionality. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-08-28Use open() instead of file()Guido Günther
since the later doesn't exist in python3
2013-08-24pq: exclude patches from Debian packaging branchGuido Günther
When regenerating the patch queue including patches from the Debian branch is not useful. Addresses parts of See #680705. Thanks: Benjamin Cama for the detailed analysis
2013-08-22Minor docstring updatesGuido Günther
2013-08-21dch: make automatic adding of new sections more robustGuido Günther
This code that determined if we found a snapshot header was obuscated by the code that determines the commits to add. Split those and better document their purpose. Also always return the commit to start from so we don't need to repeat the logic in the uper levels.
2013-06-27Use has_keyGuido Günther
It's shorter and get's rid of the unused dummy variable.
2013-06-26import-dsc: print filename instead of object nameGuido Günther
2013-06-26gbp-import-dscs: invoke gbp import-dscGuido Günther
instead of git-import-dsc
2013-06-26Consistently call gbp the supercommandGuido Günther
and robustify against invalid modules names.
2013-06-26gbp: support --helpGuido Günther
2013-06-18Add wrapper for all gbp commandsGuido Günther
So like git you can now use gbp <command> instead of git-<command> or gbp-<command>. The manpages and docs aren't adjusted yet.
2013-06-11Simplify expressionGuido Günther
Git-Dch: Ignore
2013-06-11buildpackage: use get_commit_info() instead of get_subject()Markus Lehtonen
Utilize the get_commit_info() method of GitRepository instead of the deprecated get_subject(). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-06-06import-orig: keep working copy in sync with branch HEADMarkus Lehtonen
Update working copy and index (to branch HEAD) if we modify the currently checked-out branch. Otherwise the repository is left in unclean state when the current branch is upstream or pristine-tar and the '--no-merge' option is used. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-05-17git-buildpackage: Unbreak overlay modeGaudenz Steinlin
Signed-off-by: Guido Günther <agx@sigxcpu.org> Closes: #708636
2013-05-04gbp-pull: Fix typo in help outputGuido Günther
2013-05-02Add --ignore-branch to gbp-pullGuido Günther
This allows us to fetch upstream and pristine-tar even when in detached head state. This can be usefull when e.g. building in jenkins which uses a detached head by default.
2013-05-02dch: make sure branch is always definedGuido Günther
This fixes a problem when running git-dch form a detached HEAD
2013-04-29Make parse_dsc a classmethod of DscFileGuido Günther
so we have the object creation close to the object itself.
2013-04-29dch: Use DebianSource.is_nativeGuido Günther
instead of ChangeLog.is_native since the former used debian/source/format in favor of debian/changelog.
2013-04-27GitRepository.commit_dir: raise GitRepositoryError instead of GbpErrorGuido Günther
and make sure the callers forward the error properly
2013-04-26Silence GitRepository.has_treeishGuido Günther
This also silences 10_test_get_upstream_tree
2013-04-26buildpackage: implement --[no-]hooks optionMarkus Lehtonen
For enabling/disabling all hooks. This option does not affect the builder command, though. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-25buildpackage: catch and handle DebianSourceError gracefullyMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-13Don't try access source before it's filledGuido Günther
2013-04-13Add gbp.git.source.Source.sourcepkgGuido Günther
to easily fetch the source package name Git-Dch: Ignore
2013-04-13Honor debian/source/formatGuido Günther
when checking if a package is a native package Closes: #669267
2013-04-06Add urgency management.Daniel Dehennin
* tests/11_test_dch_main.py: test the new --urgency option to dch.main(). Add only meaningful tests, i.e. options alone and combined with --release and --snapshot. * git-dch (fixup_section): Manage "urgency" option. (main): Add version_group option "-U" and "--urgency" to set the urgency level of the entry. * docs/manpages/git-dch.sgml: Update documentation for new option.
2013-04-06Add option to manage distribution fields for non snapshot mode.Daniel Dehennin
The snapshot mode fails to merge two "debian/changelog" entries if the distribution is not "UNRELEASED". * tests/11_test_dch_main.py: test the new --distribution option to dch.main(). Add only meaningful tests, i.e. options alone and combined with --release and --snapshot. * git-dch (fixup_section): Rename as it's used to fix header in addition to trailer, this require a new named parameter "options". (main): Add version_group option "-D" and "--distribution" to specify the distribution name. Add version_group option "--force-distribution" to force the provided distribution to be used, used by "dch". Rename fixup_trailer() to fixup_section() and add options as parameters. * docs/manpages/git-dch.sgml: Update documentation for new options. Closes: #646684
2013-03-29Move debian/changelog manipulation to gbp.deb.changelog.ChangeLog.Daniel Dehennin
spawn_dch switch gbp.command.wrappers.Command. * gbp/deb/changelog.py (ChangeLog.spawn_dch): static method adapted from gbp.scripts.dch and converted to gbp.command_wrappers.Command. (add_entry): New method adapted from gbp.scripts.dch.add_changelog_entry. (add_section): New method adapted from gbp.scripts.dch.add_changelog_entry. Remove DebianGitRepository and options, this has nothing to do with changelog management. * tests/test_Changelog.py: Test new methods. * gbp/scripts/dch.py: Remove useless functions: system(), spawn_dch(), add_changelog_section() and add_changelog_entry(). Update calls accordingly. (fixup_trailer): Use spawn_dch() method of ChangeLog class. (process_options): dch_options became a list. (main): Use add_section() and add_entry() methods of ChangeLog object. Take care of upstream version since ChangeLog.add_section() does not manage it anymore. Update exception handling, ChangeLog.spawn_dch() can raise "CommandExecFailed" exception. Closes: #672954
2013-03-29Include the name of the package being built in the debian tag messageDaniel Kahn Gillmor
Currently, the message in the debian tag is just: "Debian release %s" % cp.version This is a bad idea, because it means that the signed message itself contains no mention of the project that is being worked on. Since all git repositories are conceptually the same git repository (some just have commits that others don't have), a malicious attacker could inject tags from project A into the repository for project B and the original developer's signature on those tags would be intact. This is potentially a security problem. For example: if there are automated build systems that pull from a repo and verify signed tags made by a known developer (and that developer contributes to multiple projects), this conflation could be used to make those systems build packages from an entirely other project. The attached patch enforces the inclusion of the name of the package into the tag's message. Closes: #704018
2013-03-27Split out building a debian version from an upstream commitGuido Günther
based on a patch by Daniel Dehennin Needed for #672954, #646684, #669171
2013-03-22gbp-pull: update tags, tooMarkus Lehtonen
To make sure that the tags are in sync with the remote. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-22Purging of the build dir should be configurable via a config fileGuido Günther
so introdice --git[-no]-purge which is consistent with the other boolean options and deprecate --git-dont-purge. Closes: #702200
2013-01-17gbp-pull: fix --depth cmdline optionMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-01-17gbp-clone: fix return value in case of GitRepositoryErrorMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-01-16pq/apply_and_commit_patch: fix date parsingMarkus Lehtonen
GitModifier doesn't support dates in the format used in git format-patch emails. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>