aboutsummaryrefslogtreecommitdiffhomepage
path: root/debian
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-02-19 23:15:05 +0100
committerGuido Günther <agx@sigxcpu.org>2014-02-19 23:15:05 +0100
commit59b7c1ea8c99fc25e2390cee6c1558a689402ad6 (patch)
treec3df8339729c43ff95c77fa751323a6f1da51b06 /debian
parentda620efb6a36c459c088b464176e114d8978897e (diff)
parent48cfeda32589f002c489fc820c22691a84a06a7c (diff)
Merge tag 'debian/0.6.9' into bpo/wheezy
git-buildpackage Debian release 0.6.9 Conflicts: debian/changelog
Diffstat (limited to 'debian')
-rw-r--r--debian/NEWS8
-rw-r--r--debian/changelog265
-rw-r--r--debian/compat2
-rw-r--r--debian/control10
-rw-r--r--debian/git-buildpackage.bash-completion12
-rw-r--r--debian/git-buildpackage.zsh-completion488
-rw-r--r--debian/links6
-rwxr-xr-xdebian/rules6
8 files changed, 790 insertions, 7 deletions
diff --git a/debian/NEWS b/debian/NEWS
index 57c47405..51949892 100644
--- a/debian/NEWS
+++ b/debian/NEWS
@@ -1,3 +1,11 @@
+git-buildpackage (0.6.9) unstable; urgency=medium
+
+ This version changes the default of the cleaner options from 'debuild clean'
+ to a noop ('/bin/true'). If you want to retain the old behaviour you can still
+ configure it via gbp.conf. For more details see #670624.
+
+ -- Guido Günther <agx@sigxcpu.org> Sun, 05 Jan 2014 15:52:39 +0100
+
git-buildpackage (0.6.0) unstable; urgency=low
In order to provide a more consistent and git like interface a new gbp super
diff --git a/debian/changelog b/debian/changelog
index dfc1f1b5..168e4145 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,274 @@
+git-buildpackage (0.6.9) unstable; urgency=medium
+
+ [ Guido Günther ]
+ * [78f3673] Depend on newer devscripts.
+ These contain a uscan that handles repackaging at the right level and
+ won't let us pick up the wrong tarball name.
+ Thanks to gregor herrmann and all others involved (Closes: #635920)
+ * [7c64575] Avoid backtrace on config file parse errors
+ "gbp buildpackage" did this already but others didn't (Closes: #733759)
+ * [7b1eadd] Make parsing config file sections symmetric.
+ Always read the legacy command's config file section prior to the
+ subcommand's config file section.
+ Until now 'gbp <subcommand>' would read '[subcommand]' as well as
+ '[gbp-<subcommand>]' sections while 'gbp-<subcommand>' would only read
+ '[gbp-<subcommand>]' sections. (Closes: #733759)
+ * [49f0e44] Change the default of cleaner to /bin/true.
+ Running a clean command within version control by default nowadays
+ causes more trouble than it helps. It's unnecessary with
+ pbuilder/cowbuilder/sbuild and with export-dir. So change the default
+ from 'debuild clean' to a noop ('/bin/true'). (Closes: #670624)
+ * [d93c89f] import_orig: test error paths of find_source
+ * [daf249f] docs: improve docs on using upstream's git repo.
+ The documentation on using upstream's git directly instead of tarballs
+ was very terse. Add a step by step guide on how to get started and
+ how to update to new upstream versions.
+
+ [ Markus Lehtonen ]
+ * [e876beb] tests: adapt dch tests for older devscripts.
+ Determine the default urgency level by determining the version number of
+ the dch tool from command line.
+
+ -- Guido Günther <agx@sigxcpu.org> Sat, 15 Feb 2014 11:45:00 +0100
+
+git-buildpackage (0.6.8) unstable; urgency=medium
+
+ * [f5718b8] No need to document --verbose. Properly document --help
+ instead.
+ Thanks to Olivier Berger for pointing this out (Closes: #731149)
+ * [e746d5f] Adjust test cases to newer devscripts (Closes: #732384)
+ * [ca93ccb] Run nosetest on executables too.
+ They're all well behaved and this allows us to use doctests in them
+ * [eec8ce3] Determine changes file name based on dpkg-buildpackage options
+ (Closes: #732678)
+
+ -- Guido Günther <agx@sigxcpu.org> Fri, 20 Dec 2013 17:21:20 +0100
+
+git-buildpackage (0.6.7) unstable; urgency=low
+
+ * [ab5a708] import-dsc; Merge upstream version by tag
+ 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)
+ * [2042144] log: add error and warning aliases since I tend to use them
+ instead of err and warn. (Closes: #728896)
+ * [bc5ce39] Fix description of backports branches
+ * [00d830c] Use --distribution instead of --dist (Closes: #730788)
+
+ -- Guido Günther <agx@sigxcpu.org> Fri, 29 Nov 2013 20:52:03 +0100
+
+git-buildpackage (0.6.6) unstable; urgency=low
+
+ [ Guan Junchun ]
+ * [284eea5] gbp-clone: support repo URLs like "host:repo.git" Previously,
+ gbp didn't correctly parse this kind of URL and clone failed.
+ * [d52abf3] gbp-clone: support cloning to a specific directory
+ (Closes: #725666)
+
+ [ Guido Günther ]
+ * [3092623] Add missing bash completion for gbp import-dscs
+ (Closes: #727749)
+ * [fc5b485] import-dsc: allow to skip Debian tag creation
+ (Closes: #636368)
+ * [6f0c8f9] Update to git-pbuilder 1.30 that resyncs with what we shipped in
+ gbp.
+ * [3e09958] Disable html coverage generation until python-nose is fixed.
+
+ [ Markus Lehtonen ]
+ * [c661c71] pq: rewrite patch export functionality.
+ 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.
+ * [017fac3] pq.format_patch: support file path filtering.
+ 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.
+ * [a0d6eb7] pq: properly generate non-ascii patch files.
+ 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.
+ * [91fbdc1] pq: support patch-export commands.
+ 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.
+ * [3dccca6] pq: add format_diff() function.
+ For generating a patch file from a diff between two arbitrary commits.
+ * [34e85f7] pq: listen to 'Gbp-Pq:' commands, too
+ * [99c6995] pq: support 'Topic' patch-export command.
+ 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.
+ * [0c0086b] docs: update pq manpages regarding pq command meta tags
+
+ [ Felipe Sateler ]
+ * [babbc5e] Add zsh completion.
+ (Closes: #717002)
+
+ -- Guido Günther <agx@sigxcpu.org> Wed, 06 Nov 2013 08:21:55 +0100
+
+git-buildpackage (0.6.5) unstable; urgency=low
+
+ [ Etienne Millon ]
+ * [ba4f778] doc: Fix git-pbuilder example (Closes: #725875)
+
+ [ Guido Günther ]
+ * [3be2947] Be more robust about git status output changes by using
+ --porcelain. Heavily based on a patch by rian m. carlson
+ (Closes: #726260)
+ * [ae460e1] Bump standards version
+
+ [ Andrew Starr-Bochicchio ]
+ * [4368694] Don't export DEB_VENDOR="Debian"
+ Tests now take Ubuntu versions into consideration. (Closes: #723756)
+
+ -- Guido Günther <agx@sigxcpu.org> Wed, 16 Oct 2013 10:29:58 +0200
+
+git-buildpackage (0.6.4) unstable; urgency=low
+
+ [ Guido Günther ]
+ * [0385dc5] docs: having an upstream branch is a recommendation rather than
+ a hard requirement, we can use any treeish to build the upstream tarball
+ from.
+ * [e398469] Remove unused import
+ * [f738be3] Add link to online docs
+ * [ec7bd94] pq: print which patch failed to apply
+ * [820100d] pq: Only print number or tries if we try more than once
+ * [a86ccb7] Update to git-pbuilder 1.29
+ * [b494801] Backports got integrated into the main archive. From wheezy on
+ we can use the main archive
+
+ [ Markus Lehtonen ]
+ * [4030c19] docs: minor sgml syntax fix
+ * [e72a1e2] config: restore mangled env in doctests.
+ * [0eeafba] GitRepository/diff: add 'stat' and 'summary' options.
+ * [8cdc06f] ComponentTestBase: more verbose output in case of branch mismatch
+ * [af2034c] ComponentTestBase: fix env restore in teardown
+ * [54099f5] import-orig: import readline in the common module.
+ * [6c478a6] ComponentTestBase: keep tmpdir if GBP_TESTS_NOCLEAN is in env
+ * [bc40956] GitRepository: Add clean() method
+ * [e48f0a0] GitRepository.diff: add 'text' option. for generating textual
+ diffs.
+ * [3c0a022] GitRepository.diff: prevent usage of external diff. External
+ diff might break patch generation, for example.
+ * [6f3d63a] ComponentTestBase: use eq_() ok_() from nose.tools for better
+ assert messages.
+ * [e54289e] common/buildpackage: fix handling of empty tarball prefix as
+ needed for rpm builds
+ * [39f581e] GitRepository.diff: add 'ignore_submodules' option
+ * [b9b9eea] GitRepository.list_tree: add 'paths' option.
+ * [3eb401d] git: new class and method for remote repositories.
+ * [28fdf4c] GitRepository.has_remote_repo: use get_remotes method.
+ * [b4e5b73] GitRepository: deprecate the get_remote_repos method.
+ * [c222197] tests: add test for archiving without git submodules
+ * [92f29be] tests: use eq_ and ok_ from nose tools in submodule tests.
+ For consistency and better assert error messages.
+ * [f858f87] tests: add some docstrings to git submodule tests.
+ * [1d92bfe] tests: upper case global variables in submodule tests.
+ * [6b8037e] tests: remove unused import in submodule tests.
+
+ [ Lingchaox Xin ]
+ * [07b3054] GitRepository.has_treeish: minor pylint fix
+ * [eca5a33] GitRepository.describe: add 'tags' and 'extra-match' options
+ * [1320de2] GitRepository.fetch: Add 'refspec' option
+ * [171579f] GitRepository.fetch: Add 'all_remotes' option
+ * [68baa9a] GitRepository.push: Add 'force' option
+ * [d28c7cc] GitRepository.push: Add 'tags' option
+ * [db79c5d] GitRepository.pull: Add 'all_remotes' option.
+ Also changes the method to utilize the GitArgs class.
+
+ [ Osamu Aoki ]
+ * [8441bba] typo s/bei/be/ (Closes: #722359)
+
+ -- Guido Günther <agx@sigxcpu.org> Sun, 06 Oct 2013 17:35:14 +0200
+
+git-buildpackage (0.6.3) unstable; urgency=low
+
+ * [60ffe95] --git-hooks doesn't take an argument
+ * [7a29e42] Move MockedChangelog to testutils and allow to specify the
+ content so we can reuse it for other dch tests.
+ * [938e4cd] dch: make automatic adding of new sections more robust.
+ The code that determined if we found a snapshot header was obfuscated 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 upper levels.
+ * [d0fb6d8] Minor docstring updates
+ * [388cfb8] docs: Add recommended branch layout.
+ It'd be nice to have similar branch layouts among packages so recommend
+ one that worked well so far.
+ * [34b2079] GitRepository: allow to use '..' instead of '...'
+ The symmetric difference isn't always useful since it includes changes
+ from both branches. See #680705.
+ * [f793ed0] pq: exclude patches from Debian packaging branch.
+ When regenerating the patch queue including patches from the Debian
+ branch is not useful. Addresses parts of #680705.
+ Thanks to Benjamin Cama for the detailed analysis.
+ * [283c847] docs: Refert to gbp in the introduction since this wraps all
+ commands now.
+ Thanks to Ross Boylan for pointing out that the current wording is
+ confusing.
+ * [8f073eb] docs: remove superfluous at
+ * [c9d3d93] Use open() instead of file() since the later doesn't exist in
+ python3
+
+ -- Guido Günther <agx@sigxcpu.org> Wed, 28 Aug 2013 19:35:34 +0200
+
+git-buildpackage (0.6.2) unstable; urgency=low
+
+ * [194d396] Document gbp's help option
+ * [56068e5] Git.Repository.__git_inout: properly set stdin.
+ We should set stdin to subprocess.PIPE when piping input according
+ to the subprocess docs.
+ * [585439e] Git.Repository.__git_inout: Close all other file descriptors.
+ No need to leak fds to the child.
+ * [9af1868] gbp.git.Repository.get_branch(): use _git_command
+ instead of the deprecated _git_inout and clarify the return codes and
+ exceptions raised.
+ * [a2ce387] gbp.git.GitRepository.has_branch(): use _git_command instead of
+ the deprecated _git_getoutput
+ * [2145c58] Test succesful import too and make sure we don't spew to stderr
+ during this test
+ * [8d2ceba] Make sure we keep our test coverage
+ * [00a4162] Switch to debhelper level 9 which is available in Wheezy
+ * [55ba9b8] Update Vcs-Browser URL
+ * [e829dc5] Add symlinks to the manpages for the deprecated commands and
+ make lintian happy (Closes: #714489)
+ * [fc74aa2] Fix broken xrefs
+ * [2a233a7] Add examples for importing upstream sources
+ * [cef5bae] Add gbp buildpackage example showing git-pbuilder invocation
+ * [1b38d90] Remove duplicate config files section in the "gbp buildpackage"
+ man page
+ * [a22eee2] GitRepository.set_upstream_branch: Newer git wants a valid
+ remote repo entry so set one in the tests before trying to set the
+ upstream branch. Found with git 1.8.3.2
+ * [7762b17] GitRepository.set_upstream_branch: don't try to set upstream
+ twice. Move setting of the upstream branch out of the loop. This worked
+ by accident so far.
+ * [b615db5] GitRepository.set_upstream_branch: Catch errors to set upstream
+ branch
+ * [b8e921e] GitRepository.set_upstream_branch: use --set-upstream-to if
+ available since --set-upstream is deprecated.
+
+ -- Guido Günther <agx@sigxcpu.org> Tue, 09 Jul 2013 21:46:00 +0200
+
git-buildpackage (0.6.1~bpo70+1) wheezy-backports; urgency=low
* Rebuild for wheezy-backports.
-- Guido Günther <agx@sigxcpu.org> Mon, 08 Jul 2013 20:05:18 +0200
+
git-buildpackage (0.6.1) unstable; urgency=low
* [42769e3] Split {Build-,}Deps per line
diff --git a/debian/compat b/debian/compat
index 7f8f011e..ec635144 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index 0e5b54f6..a5dad37b 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Guido Günther <agx@sigxcpu.org>
Build-Depends:
bash-completion,
- debhelper (>= 7.0.50~),
+ debhelper (>= 9~),
docbook-utils,
gtk-doc-tools,
jade,
@@ -21,13 +21,13 @@ Build-Depends:
sgml2x,
# For the testsuite
bzip2,
- devscripts,
+ devscripts (>= 2.13.8~),
git (>= 1:1.7.9.1-1~),
pristine-tar,
unzip,
-Standards-Version: 3.9.3
+Standards-Version: 3.9.4
Vcs-Git: git://honk.sigxcpu.org/git/git-buildpackage.git
-Vcs-Browser: http://git.debian.org/?p=users/agx/git-buildpackage.git
+Vcs-Browser: https://honk.sigxcpu.org/gitweb/?p=git-buildpackage.git
Homepage: https://honk.sigxcpu.org/piki/projects/git-buildpackage/
X-Python-Version: >= 2.6
@@ -36,7 +36,7 @@ Architecture: all
Depends: ${python:Depends},
${shlibs:Depends},
${misc:Depends},
- devscripts (>= 2.10.66~),
+ devscripts (>= 2.13.5~),
git (>= 1:1.7.9.1-1~),
man-db,
python-dateutil,
diff --git a/debian/git-buildpackage.bash-completion b/debian/git-buildpackage.bash-completion
index 40625326..c0127041 100644
--- a/debian/git-buildpackage.bash-completion
+++ b/debian/git-buildpackage.bash-completion
@@ -146,6 +146,18 @@ _gbp_import_dsc ()
}
[ "${have:-}" ] && complete -F _gbp_import_dsc -o default git-import-dsc
+have git-import-dscs &&
+_gbp_import_dscs ()
+{
+ local options="$(_gbp_options git-import-dscs) $(_gbp_options git-import-dsc)"
+ local branch_opts="--debian-branch\= --upstream-branch\="
+ local tag_opts="--debian-tag\= --upstream-tag\="
+ local tristate_opts="--color\="
+
+ _gbp_comp "$options" "$branch_opts" "$tag_opts" "$tristate_opts"
+}
+[ "${have:-}" ] && complete -F _gbp_import_dscs -o default git-import-dscs
+
have gbp-pq &&
_gbp_pq ()
{
diff --git a/debian/git-buildpackage.zsh-completion b/debian/git-buildpackage.zsh-completion
new file mode 100644
index 00000000..3ff1e7e0
--- /dev/null
+++ b/debian/git-buildpackage.zsh-completion
@@ -0,0 +1,488 @@
+#compdef gbp
+#description build debian packages from a git repository
+
+__gbp_common_options() {
+ local prefix="$1"
+ # these can't be prefixed
+ _arguments '--help[Show help]' \
+ '--version[Show version information]'
+
+ _arguments "--${prefix}verbose[Verbose execution]" \
+ "--${prefix}color=-[Use colored output]:color:(on auto off)"
+
+}
+
+__gbp_branch_options() {
+ local prefix="$1"
+ _arguments \
+ "--${prefix}debian-branch=-[The branch the Debian package is being developed on]" \
+ "--${prefix}upstream-branch=-[The branch the upstream sources are put onto]" \
+ "--${prefix}pristine-tar[Track pristine tar branch]"
+}
+
+__gbp_tag_format_options() {
+ local prefix="$1"
+ _arguments \
+ "--${prefix}debian-tag=-[format string for debian tags]" \
+ "--${prefix}upstream-tag=-[format string for upstream tags]"
+}
+
+__gbp_tag_sign_options() {
+ local prefix="$1"
+ _arguments \
+ "(--${prefix}sign-tags --${prefix}no-sign-tags)--${prefix}sign-tags[GPG sign all generated tags]" \
+ "(--${prefix}sign-tags --${prefix}no-sign-tags)--${prefix}no-sign-tags[Do not GPG sign generated tags]" \
+ "--${prefix}keyid=-[GPG keyid to sign tags with]:GPG key:"
+}
+
+_gbp() {
+ local curcontext="$curcontext" state line
+ typeset -A opt_args
+ _arguments -C \
+ ':command:->command' \
+ '*::options:->options' \
+
+ case $state in
+ (command)
+ #breaks if defined outside the func
+ local -a subcommands
+ subcommands=(
+ 'buildpackage:Build a Debian package'
+ 'clone:Clone a Git repository from a remote and set up the necessary branch tracking.'
+ 'create-remote-repo:Create a remote Git repository'
+ 'dch:Generate the debian/changelog from Git commit history'
+ 'import-dsc:Import a single Debian source package'
+ 'import-dscs:Import multiple Debian source packages'
+ 'import-orig:Import a new upstream tarball'
+ 'pq:Manage debian/patches using Git rebase'
+ 'pull:Update a Git repository from a remote'
+ )
+
+ _describe -t commands gbp subcommands
+ ;;
+ (options)
+ local funcname
+ funcname=_gbp-$line[1]
+ if type $funcname | grep -q "shell function" ; then
+ $funcname
+ fi
+ ;;
+ esac
+}
+
+_gbp-buildpackage() {
+ __gbp_common_options git-
+ __gbp_branch_options git-
+ __gbp_tag_format_options git-
+ __gbp_tag_sign_options git-
+ _arguments \
+ '--git-ignore-new[build with uncommited changes in the source tree]' \
+ '--git-no-ignore-new[negates --git-ignore-new]' \
+ '--git-tag[create a tag after a successful build]' \
+ '--git-tag-only[do not build, only tag and run the posttag hook]' \
+ '--git-retag[do not fail if the tag already exists]' \
+ '--git-force-create[force creation of orig.tar.gz]' \
+ '--git-no-create-orig[do not create orig.tar.gz]' \
+ '--git-tarball-dir=-[location to look for external tarballs]:tarball directory:_files -/' \
+ '--git-compression=-[compression type]:compression:(auto gzip bzip2 lzma xz)' \
+ '--git-compression-level=-[set compression level]:level:(1 2 3 4 5 6 7 8 9)' \
+ '--git-ignore-branch[build although debian-branch != current branch]' \
+ '--git-no-ignore-branch[negates --git-ignore-branch]' \
+ '--git-builder=-[command to build the Debian package]:command:' \
+ '--git-cleaner=-[command to clean the working copy]:command:' \
+ '--git-prebuild=-[command to run before a build]:command:' \
+ '--git-postbuild=-[hook run after a successful build]:command:' \
+ '--git-posttag=-[hook run after a successful tag operation]:command:' \
+ '--git-pbuilder[invoke git-pbuilder for building]' \
+ '--git-no-pbuilder[negates --git-pbuilder]' \
+ '--git-dist=-[build for this distribution when using git-pbuilder]:distribution:' \
+ '--git-arch=-[build for this architecture when using git-pbuilder]:architecture:' \
+ '--git-export-dir=-[before building the package export the source into this directory]:directory:_files -/' \
+ '--git-export=-[export treeish object instead of HEAD]:treeish:' \
+ '--git-dont-purge[retain exported package build directory]' \
+ '--git-overlay[extract orig tarball when using export-dir option]' \
+ '--git-no-overlay[negates --git-overlay]' \
+ '--git-notify=-[Send a desktop notification after build]:notify:(on auto off)' \
+ '*:Other options:_dpkg-buildpackage'
+}
+
+_gbp-clone() {
+ __gbp_common_options
+ __gbp_branch_options
+ _arguments \
+ '--all[Track all branches, not only debian and upstream]'
+}
+
+_gbp-create-remote-repo() {
+ __gbp_common_options
+ _arguments \
+ '--remote-url-pattern=-[Where to create remote repository]' \
+ '--remote-name=-[What name git will use when refering to that repository]' \
+ '--template-dir=-[Template dir to pass to git init]' \
+ '--remote-config=-[Name of config file section to specify params]' \
+ '(--track --no-track)--track[Set up branch tracking]' \
+ '(--track --no-track)--no-track[Do not set up branch tracking]'
+
+}
+
+_gbp-dch () {
+ __gbp_common_options
+ __gbp_branch_options
+ __gbp_tag_format_options
+
+ _arguments \
+ '--git-ignore-branch[build although debian-branch != current branch]' \
+ '--since=-[Start point for reading commits]:commitish:' \
+ '--auto[Guess the last commit documented in the changelog]' \
+ '(--meta --no-meta)--meta[Parse meta tags]' \
+ '(--meta --no-meta)--no-meta[Do not parse meta tags]' \
+ '--meta-closes=-[What meta tags to look for to generate bug-closing changelog entries]' \
+ '(--full --no-full)--full[Include the full commit message]' \
+ '(--full --no-full)--no-full[Do not include the full commit message]' \
+ '(--snapshot -S)'{-S,--snapshot}'[Create a snapshot release entry]' \
+ '--snapshot-number=-[Python expression that gets eval()ed to the new snapshot number]' \
+ '(--release -R)'{-R,--release}'[Remove any snapshot release banners]' \
+ '(--new-version -N)'{-R,--release}'=[Specify changelog version]' \
+ '--team[Create a team upload entry]' \
+ '--bpo[Increment the release number for a backports upload]' \
+ '--nmu[Increment the release number for a NMU upload]' \
+ '--qa[Increment the release number for a QA upload]' \
+ '--distribution=-[Set the distribution field]' \
+ '--force-distribution[Force distribution]' \
+ '--urgency=-[Set the upload urgency]' \
+ '--git-log=-[Options passed to git log]' \
+ '--id-length=-[Number of commit id digits to include]' \
+ '--ignore-regex=-[Ignore matching commit lines]' \
+ '--git-author[Use git name configuration for changelog signature]' \
+ '(--multimaint-merge --no-multimaint-merge)--multimaint-merge[Merge commits by maintainer]' \
+ '(--multimaint-merge --no-multimaint-merge)--multimaint-merge[Do not merge commits by maintainer]' \
+ '--spawn-editor=[Spawn an editor]:when:(always snapshot release)' \
+ '--commit-msg=[Commit message format string]' \
+ '--commit[Commit the generated changelog]' \
+ '*:Paths:_files -/'
+}
+
+_gbp-import-dsc() {
+ __gbp_common_options
+ __gbp_branch_options
+ __gbp_tag_format_options
+ __gbp_tag_sign_options
+ _arguments \
+ '--filter=-[Filter out files]' \
+ '--download=-[Download the source package]' \
+ '--allow-unauthenticated[Skip signature verification on downloads]' \
+ '--allow-same-version[Import a package with the same debian version]' \
+ '--author-is-committer[Use the author identity as committer identity]' \
+ '--author-date-is-committer-date[Use author date as commit date]' \
+ '*:package:_files -g "*.dsc"'
+ # TODO: complete source package names
+ # TODO: pass only one tarball/source package name
+}
+
+_gbp-import-dscs() {
+ # same options
+ _gbp-import_dsc
+ _arguments \
+ '--debsnap[Fetch snapshots from snapshots.debian.org]' \
+ '--ignore-repo-config[Ignore options in gbp.conf]'
+ # TODO: multiple dscs or one source package name + debsnap
+}
+
+_gbp-import-orig() {
+ __gbp_common_options
+ __gbp_branch_options
+ __gbp_tag_format_options
+ __gbp_tag_sign_options
+ _arguments \
+ '(--upstream-version -u)'{--upstream-version,-u}'=[The upstream version number]' \
+ '--merge[Merge the upstream branch into the debian branch]' \
+ '--upstream-vcs-tag=-[Add a tag as an additional parent to the upstream tarball commit]' \
+ '--import-msg=-[Commit message format string]' \
+ '--filter=-[Filter out files]' \
+ '--filter-pristine-tar[When filtering also filter out of pristine-tar tarballs]' \
+ '(--symlink-orig --no-symlink-orig)--symlink-orig=[Create a symlink with a debian-compliant name]' \
+ '(--symlink-orig --no-symlink-orig)--no-symlink-orig=[Do not create a symlink with a debian-compliant name]' \
+ '--postimport=-[Run a command after import]' \
+ '--uscan[Use uscan to fetch the new upstream version]' \
+ '*:file:_files'
+
+ # TODO: pass only one tarball
+ # TODO: Do not complete files when uscan option is enabled
+}
+
+_gbp-pq() {
+ __gbp_common_options
+ _arguments \
+ '(--patch-numbers --no-patch-numbers)--patch-numbers[Add numbers to patch files]' \
+ '(--patch-numbers --no-patch-numbers)--no-patch-numbers[Do not add numbers to patch files]' \
+ '--topic=-[Topic to use when importing a single patch]' \
+ '--time-machine=-[Go back N commits trying to apply patch queue]'
+
+ local -a pqcommands
+ pqcommands=(
+ 'import:Create a patch queue branch'
+ 'export:Export the patches on the patch-queue branch'
+ 'rebase:Rebase the patch-queue branch against the current branch'
+ 'drop:Drop the patch queue'
+ 'apply:Add a single patch to the patch-queue'
+ 'switch:Switch to the patch-queue branch if on the base branch and viceversa'
+ )
+ # TODO: only display these commands once
+ _describe -t pqcommands gbp-pq pqcommands
+}
+
+_gbp-pull() {
+ __gbp_common_options
+ __gbp_branch_options
+ _arguments \
+ '--force[Update even non fast-forward]' \
+ '--redo-pq[Rebuild the patch queue]' \
+ '--ignore-branch[Dont care if on a detached state]' \
+ '--depth=-[Depth for deepening shallow clones]'
+}
+
+_gbp "$@"
+
+
+
+__gbp_common_options() {
+ local prefix="$1"
+ # these can't be prefixed
+ _arguments '--help[Show help]' \
+ '--version[Show version information]'
+
+ _arguments "--${prefix}verbose[Verbose execution]" \
+ "--${prefix}color=-[Use colored output]:color:(on auto off)"
+
+}
+
+__gbp_branch_options() {
+ local prefix="$1"
+ _arguments \
+ "--${prefix}debian-branch=-[The branch the Debian package is being developed on]" \
+ "--${prefix}upstream-branch=-[The branch the upstream sources are put onto]" \
+ "--${prefix}pristine-tar[Track pristine tar branch]"
+}
+
+__gbp_tag_format_options() {
+ local prefix="$1"
+ _arguments \
+ "--${prefix}debian-tag=-[format string for debian tags]" \
+ "--${prefix}upstream-tag=-[format string for upstream tags]"
+}
+
+__gbp_tag_sign_options() {
+ local prefix="$1"
+ _arguments \
+ "(--${prefix}sign-tags --${prefix}no-sign-tags)--${prefix}sign-tags[GPG sign all generated tags]" \
+ "(--${prefix}sign-tags --${prefix}no-sign-tags)--${prefix}no-sign-tags[Do not GPG sign generated tags]" \
+ "--${prefix}keyid=-[GPG keyid to sign tags with]:GPG key:"
+}
+
+_gbp() {
+ local curcontext="$curcontext" state line
+ typeset -A opt_args
+ _arguments -C \
+ ':command:->command' \
+ '*::options:->options' \
+
+ case $state in
+ (command)
+ #breaks if defined outside the func
+ local -a subcommands
+ subcommands=(
+ 'buildpackage:Build a Debian package'
+ 'clone:Clone a Git repository from a remote and set up the necessary branch tracking.'
+ 'create-remote-repo:Create a remote Git repository'
+ 'dch:Generate the debian/changelog from Git commit history'
+ 'import-dsc:Import a single Debian source package'
+ 'import-dscs:Import multiple Debian source packages'
+ 'import-orig:Import a new upstream tarball'
+ 'pq:Manage debian/patches using Git rebase'
+ 'pull:Update a Git repository from a remote'
+ )
+
+ _describe -t commands gbp subcommands
+ ;;
+ (options)
+ local funcname
+ funcname=_gbp-$line[1]
+ if type $funcname | grep -q "shell function" ; then
+ $funcname
+ fi
+ ;;
+ esac
+}
+
+_gbp-buildpackage() {
+ __gbp_common_options git-
+ __gbp_branch_options git-
+ __gbp_tag_format_options git-
+ __gbp_tag_sign_options git-
+ _arguments \
+ '--git-ignore-new[build with uncommited changes in the source tree]' \
+ '--git-no-ignore-new[negates --git-ignore-new]' \
+ '--git-tag[create a tag after a successful build]' \
+ '--git-tag-only[do not build, only tag and run the posttag hook]' \
+ '--git-retag[do not fail if the tag already exists]' \
+ '--git-force-create[force creation of orig.tar.gz]' \
+ '--git-no-create-orig[do not create orig.tar.gz]' \
+ '--git-tarball-dir=-[location to look for external tarballs]:tarball directory:_files -/' \
+ '--git-compression=-[compression type]:compression:(auto gzip bzip2 lzma xz)' \
+ '--git-compression-level=-[set compression level]:level:(1 2 3 4 5 6 7 8 9)' \
+ '--git-ignore-branch[build although debian-branch != current branch]' \
+ '--git-no-ignore-branch[negates --git-ignore-branch]' \
+ '--git-builder=-[command to build the Debian package]:command:' \
+ '--git-cleaner=-[command to clean the working copy]:command:' \
+ '--git-prebuild=-[command to run before a build]:command:' \
+ '--git-postbuild=-[hook run after a successful build]:command:' \
+ '--git-posttag=-[hook run after a successful tag operation]:command:' \
+ '--git-pbuilder[invoke git-pbuilder for building]' \
+ '--git-no-pbuilder[negates --git-pbuilder]' \
+ '--git-dist=-[build for this distribution when using git-pbuilder]:distribution:' \
+ '--git-arch=-[build for this architecture when using git-pbuilder]:architecture:' \
+ '--git-export-dir=-[before building the package export the source into this directory]:directory:_files -/' \
+ '--git-export=-[export treeish object instead of HEAD]:treeish:' \
+ '--git-dont-purge[retain exported package build directory]' \
+ '--git-overlay[extract orig tarball when using export-dir option]' \
+ '--git-no-overlay[negates --git-overlay]' \
+ '--git-notify=-[Send a desktop notification after build]:notify:(on auto off)' \
+ '*:Other options:_dpkg-buildpackage'
+}
+
+_gbp-clone() {
+ __gbp_common_options
+ __gbp_branch_options
+ _arguments \
+ '--all[Track all branches, not only debian and upstream]'
+}
+
+_gbp-create-remote-repo() {
+ __gbp_common_options
+ _arguments \
+ '--remote-url-pattern=-[Where to create remote repository]' \
+ '--remote-name=-[What name git will use when refering to that repository]' \
+ '--template-dir=-[Template dir to pass to git init]' \
+ '--remote-config=-[Name of config file section to specify params]' \
+ '(--track --no-track)--track[Set up branch tracking]' \
+ '(--track --no-track)--no-track[Do not set up branch tracking]'
+
+}
+
+_gbp-dch () {
+ __gbp_common_options
+ __gbp_branch_options
+ __gbp_tag_format_options
+
+ _arguments \
+ '--git-ignore-branch[build although debian-branch != current branch]' \
+ '--since=-[Start point for reading commits]:commitish:' \
+ '--auto[Guess the last commit documented in the changelog]' \
+ '(--meta --no-meta)--meta[Parse meta tags]' \
+ '(--meta --no-meta)--no-meta[Do not parse meta tags]' \
+ '--meta-closes=-[What meta tags to look for to generate bug-closing changelog entries]' \
+ '(--full --no-full)--full[Include the full commit message]' \
+ '(--full --no-full)--no-full[Do not include the full commit message]' \
+ '(--snapshot -S)'{-S,--snapshot}'[Create a snapshot release entry]' \
+ '--snapshot-number=-[Python expression that gets eval()ed to the new snapshot number]' \
+ '(--release -R)'{-R,--release}'[Remove any snapshot release banners]' \
+ '(--new-version -N)'{-R,--release}'=[Specify changelog version]' \
+ '--team[Create a team upload entry]' \
+ '--bpo[Increment the release number for a backports upload]' \
+ '--nmu[Increment the release number for a NMU upload]' \
+ '--qa[Increment the release number for a QA upload]' \
+ '--distribution=-[Set the distribution field]' \
+ '--force-distribution[Force distribution]' \
+ '--urgency=-[Set the upload urgency]' \
+ '--git-log=-[Options passed to git log]' \
+ '--id-length=-[Number of commit id digits to include]' \
+ '--ignore-regex=-[Ignore matching commit lines]' \
+ '--git-author[Use git name configuration for changelog signature]' \
+ '(--multimaint-merge --no-multimaint-merge)--multimaint-merge[Merge commits by maintainer]' \
+ '(--multimaint-merge --no-multimaint-merge)--multimaint-merge[Do not merge commits by maintainer]' \
+ '--spawn-editor=[Spawn an editor]:when:(always snapshot release)' \
+ '--commit-msg=[Commit message format string]' \
+ '--commit[Commit the generated changelog]' \
+ '*:Paths:_files -/'
+}
+
+_gbp-import-dsc() {
+ __gbp_common_options
+ __gbp_branch_options
+ __gbp_tag_format_options
+ __gbp_tag_sign_options
+ _arguments \
+ '--filter=-[Filter out files]' \
+ '--download=-[Download the source package]' \
+ '--allow-unauthenticated[Skip signature verification on downloads]' \
+ '--allow-same-version[Import a package with the same debian version]' \
+ '--author-is-committer[Use the author identity as committer identity]' \
+ '--author-date-is-committer-date[Use author date as commit date]' \
+ '*:package:_files -g "*.dsc"'
+ # TODO: complete source package names
+ # TODO: pass only one tarball/source package name
+}
+
+_gbp-import-dscs() {
+ # same options
+ _gbp-import_dsc
+ _arguments \
+ '--debsnap[Fetch snapshots from snapshots.debian.org]' \
+ '--ignore-repo-config[Ignore options in gbp.conf]'
+ # TODO: multiple dscs or one source package name + debsnap
+}
+
+_gbp-import-orig() {
+ __gbp_common_options
+ __gbp_branch_options
+ __gbp_tag_format_options
+ __gbp_tag_sign_options
+ _arguments \
+ '(--upstream-version -u)'{--upstream-version,-u}'=[The upstream version number]' \
+ '--merge[Merge the upstream branch into the debian branch]' \
+ '--upstream-vcs-tag=-[Add a tag as an additional parent to the upstream tarball commit]' \
+ '--import-msg=-[Commit message format string]' \
+ '--filter=-[Filter out files]' \
+ '--filter-pristine-tar[When filtering also filter out of pristine-tar tarballs]' \
+ '(--symlink-orig --no-symlink-orig)--symlink-orig=[Create a symlink with a debian-compliant name]' \
+ '(--symlink-orig --no-symlink-orig)--no-symlink-orig=[Do not create a symlink with a debian-compliant name]' \
+ '--postimport=-[Run a command after import]' \
+ '--uscan[Use uscan to fetch the new upstream version]' \
+ '*:file:_files'
+
+ # TODO: pass only one tarball
+ # TODO: Do not complete files when uscan option is enabled
+}
+
+_gbp-pq() {
+ __gbp_common_options
+ _arguments \
+ '(--patch-numbers --no-patch-numbers)--patch-numbers[Add numbers to patch files]' \
+ '(--patch-numbers --no-patch-numbers)--no-patch-numbers[Do not add numbers to patch files]' \
+ '--topic=-[Topic to use when importing a single patch]' \
+ '--time-machine=-[Go back N commits trying to apply patch queue]'
+
+ local -a pqcommands
+ pqcommands=(
+ 'import:Create a patch queue branch'
+ 'export:Export the patches on the patch-queue branch'
+ 'rebase:Rebase the patch-queue branch against the current branch'
+ 'drop:Drop the patch queue'
+ 'apply:Add a single patch to the patch-queue'
+ 'switch:Switch to the patch-queue branch if on the base branch and viceversa'
+ )
+ # TODO: only display these commands once
+ _describe -t pqcommands gbp-pq pqcommands
+}
+
+_gbp-pull() {
+ __gbp_common_options
+ __gbp_branch_options
+ _arguments \
+ '--force[Update even non fast-forward]' \
+ '--redo-pq[Rebuild the patch queue]' \
+ '--ignore-branch[Dont care if on a detached state]' \
+ '--depth=-[Depth for deepening shallow clones]'
+}
+
+_gbp "$@"
diff --git a/debian/links b/debian/links
index 803c8fee..0a561b02 100644
--- a/debian/links
+++ b/debian/links
@@ -1 +1,7 @@
/usr/share/doc/git-buildpackage/manual-html/gbp.html /usr/share/doc/git-buildpackage/manual-html/index.html
+# As long as we keep the old aliases
+/usr/share/man/man1/gbp-import-orig.1.gz /usr/share/man/man1/git-import-orig.1.gz
+/usr/share/man/man1/gbp-buildpackage.1.gz /usr/share/man/man1/git-buildpackage.1.gz
+/usr/share/man/man1/gbp-import-dsc.1.gz /usr/share/man/man1/git-import-dsc.1.gz
+/usr/share/man/man1/gbp-import-dscs.1.gz /usr/share/man/man1/git-import-dscs.1.gz
+/usr/share/man/man1/gbp-dch.1.gz /usr/share/man/man1/git-dch.1.gz
diff --git a/debian/rules b/debian/rules
index d09a7c2f..a80bd520 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,8 @@ EXAMPLE_SCRIPTS=\
DEB_COMPRESS_EXCLUDE=$(EXAMPLE_SCRIPTS)
+ZSH_COMPDIR = /usr/share/zsh/vendor-completions/
+
PYCHECKER_ARGS=-boptparse --no-override --no-shadowbuiltin
%:
@@ -17,7 +19,6 @@ PYCHECKER_ARGS=-boptparse --no-override --no-shadowbuiltin
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test
- export DEB_VENDOR="Debian"; \
export GIT_AUTHOR_NAME="Gbp Tests"; \
export GIT_AUTHOR_EMAIL=tests@example.com; \
export GIT_COMMITTER_NAME=$$GIT_AUTHOR_NAME; \
@@ -39,6 +40,9 @@ override_dh_auto_build:
override_dh_auto_install:
dh_auto_install
dh_bash-completion
+ mkdir -p debian/git-buildpackage/$(ZSH_COMPDIR)
+ install -m644 debian/git-buildpackage.zsh-completion \
+ debian/git-buildpackage/$(ZSH_COMPDIR)/_gbp
override_dh_auto_clean:
dh_auto_clean