summaryrefslogtreecommitdiff
path: root/gbp/scripts
AgeCommit message (Collapse)Author
2014-12-28config: read the right config if run from subdirMarkus Lehtonen
A step towards being able to run GBP tools from subdirectories. Now expands '%(top_dir)s' and '%(git_dir)s' in config file path to root of the working directory and git metadata directory, respectively. Also, adds a new method _read_config_file() in preparation for supporting per-tree config files. Fixes tests.test_Config: currently the only correct way to define the config file(s) to be parsed is by using the GBP_CONF_FILES environment variable. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-28buildpackage/dump_tree: add 'recursive' optionMarkus Lehtonen
For selecting whether to dump all the files recursively or just the top level directory of the tree. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-28pq: print which patch got just appliedGuido Günther
2014-12-05pq: move switch_pq() to commonMarkus Lehtonen
So that it can be re-used by the upcoming pq-rpm tool. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-10-17Improve change reporting a bitGuido Günther
2014-10-14pq: Don't fail commit if the series file is empty on the source branchGuido Günther
2014-10-12pq: Add "pq export --commit" optionGuido Günther
This commits the changes in the pq right away. This is currently experimental and subject to change.
2014-09-26meta-closes: Move help text to GbpOptionParser.helpGuido Günther
2014-09-12Allow to always drop pq branch after exportGuido Günther
Closes: #761160
2014-08-23Unify doc strings a bitGuido Günther
since they now show up with --list-cmds
2014-08-23Allow to list all available commandsGuido Günther
2014-08-23gbp: add --version optionGuido Günther
Closes: #758909
2014-08-19Improve error messages on formatting errorsGuido Günther
Make it easier for the user to detect misformated replacement strings in config files and command line options.
2014-08-19buildpackage: Make debian-tag message configurableKamal Mostafa
New config option --git-debian-tag-msg allows for the specification of the message format string for signed debian-tags. When left unset, the default debian-tag-msg format is still: %(pkg)s Debian release %(version)s Signed-off-by: Kamal Mostafa <kamal@whence.com>
2014-08-11dch: Only modify the mainttrailer when --git-author is in useBla Fasel
2014-08-11Use better variable nameBla Fasel
It's a boolean indicating wether we fetch the author information from git not the author information itself. Git-Dch: Ignore
2014-08-11Brown paper bag, pleaseBla Fasel
Gbp-Dch: Ignore
2014-08-11Make sure we fixup the changelog trailer with newer devscriptsGuido Günther
We don't change any mainttrailer options if already given. Thanks: James McCoy for the detailed explanation Closes: #740566
2014-07-24import-srpm: add 'vendor' config optionMarkus Lehtonen
Intended to represent the distribution vendor (e.g. 'Debian'). Currently, this can be used in tag format strings. NOTE: the vendor name is converted to lowercase when used in tag names. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-07-24Introduce git-import-srpm toolMarkus Lehtonen
Initial version of the git-import-srpm: a tool for importing source rpms. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2014-07-24UpstreamSource: move version guessing logic to PkgPolicyMarkus Lehtonen
PkgPolicy is more logical context, for example if guessing version from a plain filename and not a real file. Also, changes guess_version() to always return a tuple to simplify checking its return value. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Conflicts: gbp/pkg/__init__.py
2014-07-24Change UpstreamSource to have PkgPolicyMarkus Lehtonen
The UpstreamSource class now gets a PkgPolicy in it's initialization. Also, introduces new DebiaUpstreamSource class which is taken in use in the scripts. The PkgPolicy is not yet used for anything in UpstreamSource. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-07-24Move get_compression() out of pkg.PkgPolicy classMarkus Lehtonen
Renames the function to parse_archive_filename() and changes it's return values. Filename parsing is merely generic functionality, not tied to any packaging policy. The function now returns the base name of the file (that is, filename without, archive and compression extensions), archive format and compression method. Adds supported archive formats 'tar' and 'zip' and file extension aliases, e.g. 'tgz'. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-06-14buildpackage: Also print tag name when tagging the Debian releaseGuido Günther
Based on a patch by Kamal Mostafa
2014-05-24Revert "Determine build_dir upfront"Guido Günther
This reverts commit b2549fac19f2d666552291a4fcf2020ca0570834.
2014-05-22Improve error reporting on hooksGuido Günther
Make it obvious that a hook failed and not a gbp internal function
2014-05-22Determine build_dir upfrontGuido Günther
so it's available to all hooks
2014-05-19pq: Try harder to cleanup after a failed patchGuido Günther
If we fail to apply the patch the tree is left in a dirty state so reset to the last head. This avoids irritating errors like: gbp:error: Failed to apply 'debian/patches/poison+remember_trash': Failed to commit tree: fatal: invalid date format: 1998/03/21 following files would be overwritten by checkout: doc/hosts.nntp.5 innd/art.c innd/innd.h innd/rc.c Please, commit your changes or stash them before you can switch branches. Aborting Thanks: Marco d'Itri for the repo to debug this
2014-05-19pq: Print proper error message if we fail to apply the treeGuido Günther
e.g. instead of gbp:error: Failed to apply 'debian/patches/poison+remember_trash' we now have gbp:error: Failed to apply 'debian/patches/poison+remember_trash': Failed to commit tree: fatal: invalid date format: 1998/03/21
2014-05-16Fix comitter vs committer typosGuido Günther
Thanks: Sandro Tosi Closes: #748339
2014-05-07Handle version format errors more gracefullyGuido Günther
So far if a package claimed to be non native but the version number didn't contain a '-' we failed like: Traceback (most recent call last): File "/usr/bin/gbp", line 9, in <module> load_entry_point('gbp==0.6.13', 'console_scripts', 'gbp')() File "/usr/lib/python2.7/dist-packages/gbp/scripts/supercommand.py", line 82, in supercommand return module.main(args) File "/usr/lib/python2.7/dist-packages/gbp/scripts/buildpackage.py", line 541, in main output_dir) File "/usr/lib/python2.7/dist-packages/gbp/scripts/buildpackage.py", line 96, in prepare_upstream_tarball upstream_tree = git_archive_build_orig(repo, cp, output_dir, options) File "/usr/lib/python2.7/dist-packages/gbp/scripts/buildpackage.py", line 270, in git_archive_build_orig upstream_tree = get_upstream_tree(repo, cp, options) File "/usr/lib/python2.7/dist-packages/gbp/scripts/buildpackage.py", line 245, in get_upstream_tree cp['Upstream-Version']) File "/usr/lib/python2.7/dist-packages/gbp/deb/git.py", line 107, in version_to_tag return format % dict(version=DebianGitRepository._sanitize_version(version)) File "/usr/lib/python2.7/dist-packages/gbp/deb/git.py", line 122, in _sanitize_version return version.replace('~', '_').replace(':', '%') It shouldn't be like that.
2014-04-04Slightly improve usage outputGuido Günther
2014-04-03config: add decorator to add_option_* functionsGuido Günther
This allows us to build an internal list of valid options and print these.
2014-04-03Import command not moduleGuido Günther
This matches the function name
2014-04-01Add minimal 'config' commandGuido Günther
This only allows to print single config values so far. Closes: #733470
2014-03-29Use a much simpler version to fix the command name in --helpGuido Günther
mostly reverting e1780f0. Closes: #742907
2014-03-27Fix command outputGuido Günther
The first line lacked the subcommand like: $ gbp pull --help Usage: gbp [options] - safely update a repository from remote instead of $ gbp pull --help Usage: gbp pull [options] - safely update a repository from remote ^^^^
2014-03-27pq: minor log message typo fixMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-02-23import_dsc: Create missing debian branch with --create-missing-branchesGuido Günther
Closes: #739888
2014-01-07import_orig: test error paths of find_sourceGuido Günther
2014-01-05Avoid backtrace on config file parse errorsGuido Günther
"gbp buildpackage" did this already but others didn't Closes: #733759
2013-12-20Determine changes file name based on dpkg-buildpackage optionsGuido Günther
Closes: #732678
2013-11-06import-dsc; Merge upstream version by tagGuido Günther
instead of simply using the upstream branch name. THis makes sure we also merge upstream versions that were imported previously with e.g. "gbp import-orig". Closes: #698222
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>