tools/git-buildpackage.git
3 years agopush: Make --debian-tag='' match the documentation
Guido Günther [Wed, 26 Jan 2022 07:57:12 +0000 (08:57 +0100)]
push: Make --debian-tag='' match the documentation

An empty Debian tag indicates "don't care" about the packaging branch.
Don't fail in that case but rather push out up to the branch tip:

  Currently we'd fail like

  $ gbp push --debian-tag='' guido
  Traceback (most recent call last):
    File "/usr/bin/gbp", line 149, in <module>
      sys.exit(supercommand())
    File "/usr/bin/gbp", line 145, in supercommand
      return module.main(args)
    File "/usr/lib/python3/dist-packages/gbp/scripts/push.py", line 153, in main
      to_push['refs'].append((ref, get_push_src(repo, ref, dtag)))
  UnboundLocalError: local variable 'dtag' referenced before assignment

this make it simple to push the current development work via

  gbp  push --debian-tag='' <remote>

3 years agotests: Fix "test_push_failure" with newer git
Guido Günther [Fri, 11 Feb 2022 13:13:05 +0000 (14:13 +0100)]
tests: Fix "test_push_failure" with newer git

The test created a broken tag on the remote side to avoid that being
pushed in the test however git 2.34 and newer fail every push to that
repo so rather create a non-ff branch instead to make the push fail.

3 years agoHACKING: Document how to keep test repos around
Guido Günther [Fri, 11 Feb 2022 11:04:22 +0000 (12:04 +0100)]
HACKING: Document how to keep test repos around

3 years agoHACKING: mention how to rerun a single test
Guido Günther [Fri, 11 Feb 2022 11:02:31 +0000 (12:02 +0100)]
HACKING: mention how to rerun a single test

3 years agouscan: Remove pre-devscripts 2.10.70 compat code
Unit 193 [Fri, 17 Dec 2021 00:58:11 +0000 (19:58 -0500)]
uscan: Remove pre-devscripts 2.10.70 compat code

We can rely on the <target> element being present in dehs output.

The output it looks for from uscan no longer matches anyway.

3 years agoconfig: Add missing comma
Andrej Shadura [Sat, 3 Apr 2021 16:42:40 +0000 (18:42 +0200)]
config: Add missing comma

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
3 years agoexport-orig: Consistently refer to the pristine-tar branch
Andrej Shadura [Sat, 3 Apr 2021 12:44:34 +0000 (14:44 +0200)]
export-orig: Consistently refer to the pristine-tar branch

Since we’re checking pristine_tar_branch, not pristine_tar.branch,
use the same expression in the log even though it’s not supposed
to be different.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
3 years agoimport-orig: Don’t hardcode the pristine-tar branch
Andrej Shadura [Fri, 2 Apr 2021 14:23:09 +0000 (16:23 +0200)]
import-orig: Don’t hardcode the pristine-tar branch

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
3 years agorpm: Avoid devscript dependency
Quanah Gibson-Mount [Thu, 11 Nov 2021 08:13:25 +0000 (09:13 +0100)]
rpm: Avoid devscript dependency

The package is currently not available everywhere.

3 years agoDocument changes and release 0.9.25
Guido Günther [Fri, 5 Nov 2021 09:24:44 +0000 (10:24 +0100)]
Document changes and release 0.9.25

3 years agotests: Make sure DEBEMAIL is set
Guido Günther [Fri, 5 Nov 2021 09:12:20 +0000 (10:12 +0100)]
tests: Make sure DEBEMAIL is set

Otherwise dch based tests fail

Closes: #998573
3 years agobuildpackage: Map 'debian/latest' and 'debian/main' to sid too
Guido Günther [Thu, 28 Oct 2021 07:34:54 +0000 (09:34 +0200)]
buildpackage: Map 'debian/latest' and 'debian/main' to sid too

This avoids having to specify a suite with more modern common branch
names.

3 years agoDocument changes and release 0.9.24
Guido Günther [Tue, 26 Oct 2021 07:46:45 +0000 (09:46 +0200)]
Document changes and release 0.9.24

3 years agoUse collections.abc.Iterable instead of collections.Iterable
Anthony Sottile [Thu, 21 Oct 2021 13:30:59 +0000 (15:30 +0200)]
Use collections.abc.Iterable instead of collections.Iterable

since Python 3.10 dropped the alias.

3 years agod/control: Depend on dh-sequence-python3
Guido Günther [Wed, 13 Oct 2021 07:32:36 +0000 (09:32 +0200)]
d/control: Depend on dh-sequence-python3

This makes the requirement more obvious since dh-python does
multiple things

3 years agod/control: Add RulesRequiresRoot
Guido Günther [Wed, 13 Oct 2021 07:12:32 +0000 (09:12 +0200)]
d/control: Add RulesRequiresRoot

3 years agod/control: Drop versioned python3 dep
Guido Günther [Wed, 13 Oct 2021 07:09:22 +0000 (09:09 +0200)]
d/control: Drop versioned python3 dep

Even oldoldstable is recent enough

3 years agod/rules: Drop trailing whitespace
Guido Günther [Wed, 13 Oct 2021 07:13:05 +0000 (09:13 +0200)]
d/rules: Drop trailing whitespace

Gbp-Dch: Ignore

3 years agod/changelog: Drop trailing whitespace
Guido Günther [Wed, 13 Oct 2021 07:10:06 +0000 (09:10 +0200)]
d/changelog: Drop trailing whitespace

Gbp-Dch: Ignore

3 years agoAdd translation infrastructure
Guido Günther [Fri, 1 Oct 2021 14:20:55 +0000 (16:20 +0200)]
Add translation infrastructure

Make it simple to create/update the pot file and provide an initial
po file for de.

3 years agoFix import-dsc on empty repo if defaultBranch!=master
Emanuele Aina [Mon, 5 Apr 2021 20:43:16 +0000 (22:43 +0200)]
Fix import-dsc on empty repo if defaultBranch!=master

When importing a dsc on a empty repository when `ìnit.defaultBranch` is
set to something like `main` in `~/.gitconfig` we failed with:

    gbp:debug: ['git', 'update-ref', '-m', 'gbp: Import Upstream version 0.5.10.2', 'refs/heads/master', '95172aee8d1a4e6c69494e4f158f904111710168']
    gbp:debug: ['git', 'symbolic-ref', 'HEAD']
    gbp:debug: ['git', 'show-ref', 'refs/heads/main']
    gbp:debug: ['git', 'symbolic-ref', 'HEAD']
    gbp:debug: ['git', 'show-ref', 'refs/heads/main']
    gbp:debug: ['git', 'branch', '-m', 'None', 'debian/buster']
    gbp:error: Git command failed: Error running git branch: error: refname refs/heads/None not found
    fatal: Branch rename failed
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/dist-packages/gbp-0.9.22-py3.9.egg/gbp/scripts/import_dsc.py", line 519, in main
        commit = import_upstream(repo, sources[0], dsc, options)
      File "/usr/local/lib/python3.9/dist-packages/gbp-0.9.22-py3.9.egg/gbp/scripts/import_dsc.py", line 269, in import_upstream
        repo.rename_branch(repo.branch, options.debian_branch)
      File "/usr/local/lib/python3.9/dist-packages/gbp-0.9.22-py3.9.egg/gbp/git/repository.py", line 333, in rename_branch
        self._git_command("branch", args.args)
      File "/usr/local/lib/python3.9/dist-packages/gbp-0.9.22-py3.9.egg/gbp/git/repository.py", line 245, in _git_command
        raise GitRepositoryError("Error running git %s: %s" % (command, detail.decode().strip()))
    gbp.git.repository.GitRepositoryError: Error running git branch: error: refname refs/heads/None not found
    fatal: Branch rename failed

That's because we created the commit on `refs/heads/master` and then
tried to rename it from `refs/heads/main`.

To avoid that, if the repository is empty look at the name of the
current branch as reported by the symbolic ref pointed by `HEAD`.

Closes: #906600
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
3 years agogit: Actually include the missing key name in the KeyError message
Emanuele Aina [Mon, 5 Apr 2021 20:40:57 +0000 (22:40 +0200)]
git: Actually include the missing key name in the KeyError message

Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
3 years agodch: Require EMAIL or DEBEMAIL to be set
Guido Günther [Thu, 30 Sep 2021 14:06:39 +0000 (16:06 +0200)]
dch: Require EMAIL or DEBEMAIL to be set

The alternative would be to set a dummy address in case of
--git-author but that again can use $EMAIL so just fail if
both are unset.

Closes: #987611
4 years agoDocument changes and release 0.9.23
Guido Günther [Tue, 8 Jun 2021 15:35:56 +0000 (17:35 +0200)]
Document changes and release 0.9.23

4 years agospec: Fix rpm build on centos7 and centos8
Quanah Gibson-Mount [Sun, 30 May 2021 10:16:20 +0000 (12:16 +0200)]
spec: Fix rpm build on centos7 and centos8

4 years agospec: Ignore byte-compiled python files
Quanah Gibson-Mount [Sun, 30 May 2021 10:13:43 +0000 (12:13 +0200)]
spec: Ignore byte-compiled python files

4 years agodocs: Check for docbook2man too
Quanah Gibson-Mount [Sun, 30 May 2021 10:12:28 +0000 (12:12 +0200)]
docs: Check for docbook2man too

4 years agodocs: Use either python3 or python
Guido Günther [Fri, 28 May 2021 09:06:07 +0000 (11:06 +0200)]
docs: Use either python3 or python

Some distros (such as Debian) don't ship a /usr/bin/python anymore

4 years agosetup.py: Explicitly open the changelog file as utf-8
Quanah Gibson-Mount [Mon, 24 May 2021 17:26:28 +0000 (13:26 -0400)]
setup.py: Explicitly open the changelog file as utf-8

4 years agoFix gbp-builder-mock to honor configured options for mock
Quanah Gibson-Mount [Fri, 14 May 2021 22:33:42 +0000 (18:33 -0400)]
Fix gbp-builder-mock to honor configured options for mock

4 years agogbp-builder-mock: Update to work with current mock releases
Quanah Gibson-Mount [Mon, 3 May 2021 16:07:30 +0000 (12:07 -0400)]
gbp-builder-mock: Update to work with current mock releases

4 years agospec: Swtich requires to python3 too
Guido Günther [Fri, 30 Apr 2021 07:03:46 +0000 (09:03 +0200)]
spec: Swtich requires to python3 too

Thanks: Quanah Gibson-Mount

4 years agospec: Install setup-git-attributes command
Guido Günther [Wed, 28 Apr 2021 09:12:08 +0000 (11:12 +0200)]
spec: Install setup-git-attributes command

This unbreaks the autopkgtest

4 years agosetup.py: Allow for more liberal version numbers
Guido Günther [Wed, 28 Apr 2021 08:26:22 +0000 (10:26 +0200)]
setup.py: Allow for more liberal version numbers

Otherwise this causes trouble for backports, downstreams, etc.

4 years agosetup.py: Avoid dpkg-parsechangelog
Guido Günther [Wed, 28 Apr 2021 07:03:28 +0000 (09:03 +0200)]
setup.py: Avoid dpkg-parsechangelog

This helps on non-debian systems

4 years agorepo_setup: fix documentation generation
Arnaud Ferraris [Wed, 24 Mar 2021 14:58:20 +0000 (15:58 +0100)]
repo_setup: fix documentation generation

docstring format for bullet lists requires a leading dash. This fix
prevents build failures when running `make docs`.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
4 years agomanpages: fix gbp-setup-gitattributes
Arnaud Ferraris [Wed, 24 Mar 2021 14:35:01 +0000 (15:35 +0100)]
manpages: fix gbp-setup-gitattributes

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
4 years agotests/11_test_dch_main.py: Fix OS release check for Ubuntu.
Logan Rosen [Mon, 15 Mar 2021 13:42:02 +0000 (14:42 +0100)]
tests/11_test_dch_main.py: Fix OS release check for Ubuntu.

Closes: #983204
4 years agoAdd tests for setup-gitattributes functionality
Andrej Shadura [Fri, 19 Feb 2021 10:21:57 +0000 (11:21 +0100)]
Add tests for setup-gitattributes functionality

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agoInstall the setup_gitattributes script
Andrej Shadura [Thu, 18 Feb 2021 20:45:05 +0000 (21:45 +0100)]
Install the setup_gitattributes script

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agoscripts: Make setup_gitattributes future-proof
Andrej Shadura [Tue, 16 Feb 2021 15:41:24 +0000 (16:41 +0100)]
scripts: Make setup_gitattributes future-proof

* Add --all (default) and --[no-]dgit-defuse-attrs to enable
  adding more options in future.
* Rewrite the manual page to reflect the change in approach.
* Error out when running with no presets enabled

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agod/control: Capitalise Git throughout the package descriptions
Andrej Shadura [Sun, 14 Feb 2021 20:12:18 +0000 (21:12 +0100)]
d/control: Capitalise Git throughout the package descriptions

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agod/control: Add the new subcommand to the package description
Andrej Shadura [Sun, 14 Feb 2021 20:11:37 +0000 (21:11 +0100)]
d/control: Add the new subcommand to the package description

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agodocs: Add a manpage for gbp setup-gitattributes
Andrej Shadura [Sat, 13 Feb 2021 19:11:19 +0000 (20:11 +0100)]
docs: Add a manpage for gbp setup-gitattributes

Describle how and why the attributes are being disabled, refer
to dgit, git-deborig and Git documentation; add a reference to
the gbp-clone manpage.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agodocs: gbp-clone: Document --defuse-gitattributes
Andrej Shadura [Sat, 13 Feb 2021 19:10:46 +0000 (20:10 +0100)]
docs: gbp-clone: Document --defuse-gitattributes

Describe concisely what the option does; a longer description
will go into a separate manpage.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agoscripts: Add setup-gitattributes subcommand
Andrej Shadura [Sun, 7 Feb 2021 19:06:40 +0000 (20:06 +0100)]
scripts: Add setup-gitattributes subcommand

The setup-gitattributes subcommands overrides Git attributes
unconditionally, without verifying first the package ships any
.gitattributes files.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agoclone: Add --defuse-gitattributes
Andrej Shadura [Sun, 7 Feb 2021 18:31:00 +0000 (19:31 +0100)]
clone: Add --defuse-gitattributes

On clone, disable Git attributes that may interfere with building
packages shipping .gitattributes *iff* they ship those files.
Set to auto by default, can also be turned off completely or
can be performed unconditionally.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agorepo_setup: Add check/setup_gitattributes
Andrej Shadura [Sun, 7 Feb 2021 18:30:12 +0000 (19:30 +0100)]
repo_setup: Add check/setup_gitattributes

setup_gitattributes() sets up .git/info/attributes in a way to prevent
transformations from interfering with packaging, because the working tree
files can differ from the Git revision history (and from the source packages).

Similar functionality has been implemented by dgit and git-deborig, so we try
to stay compatible and re-use the name of the attribute macro. Since dgit doesn’t
disable export-subst and export-ignore, which may interfere with export-orig, we
add this on top the same way git-deborig does.

dgit used to have an older preset missing some of the attributes, so if
we find those, we disable them.

The user, should they choose so, still can re-enable the attributes
disabled in this way by adding more specific rules further in the
.git/info/attributes file.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agogbp.git: Add support for long listing format (with object sizes)
Andrej Shadura [Sun, 7 Feb 2021 12:16:00 +0000 (13:16 +0100)]
gbp.git: Add support for long listing format (with object sizes)

This is useful to be able to scan a tree for a specific file
but only act if it’s non-empty.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agogbp.git: Change list_tree to return an iterator
Andrej Shadura [Sun, 7 Feb 2021 10:11:16 +0000 (11:11 +0100)]
gbp.git: Change list_tree to return an iterator

When working with huge trees, we want to avoid consuming large amounts
of memory just to throw away most of it almost immediately when we only
need one entry or a few of them.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agotests: Match the correct files in filter tests
Guido Günther [Mon, 1 Mar 2021 13:57:43 +0000 (14:57 +0100)]
tests: Match the correct files in filter tests

Verify we match at all by adding a positive test as well

4 years agoclone: Don’t check out the Debian branch if it doesn’t exist
Andrej Shadura [Sun, 7 Feb 2021 18:31:23 +0000 (19:31 +0100)]
clone: Don’t check out the Debian branch if it doesn’t exist

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
4 years agodch: Add support for the --local=suffix option
Emanuele Aina [Mon, 8 Feb 2021 14:17:35 +0000 (15:17 +0100)]
dch: Add support for the --local=suffix option

Closes: #857370
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
4 years agoAdd info about --git-ignore-branch when not on branch
Jonathan Rubenstein [Wed, 2 Sep 2020 02:53:47 +0000 (22:53 -0400)]
Add info about --git-ignore-branch when not on branch

Closes: #956491
4 years agoimport-dsc: Delete NULs from dpkg-parsechangelog output before parsing
Andrej Shadura [Thu, 4 Feb 2021 17:33:20 +0000 (18:33 +0100)]
import-dsc: Delete NULs from dpkg-parsechangelog output before parsing

Commit messages may not contain NUL characters; in practice,
Debian changelogs sometimes do, usually as the result of
incorrectly used encoding for non-ASCII personal names.

As a safety net, delete all NULs from the output of dpkg-parsechangelog
before parsing it, so that they don’t get fed into Git or anything else
further in the processing.

Closes: #981340
4 years agozsh completion: update completion for "pull" and further new commands
Michael Prokop [Wed, 3 Feb 2021 11:31:09 +0000 (12:31 +0100)]
zsh completion: update completion for "pull" and further new commands

Provide zsh completion for new commands:

* config
* export-orig
* import-ref
* pristine-tar
* push
* tag

While at it, also extend completion for `gbp pull`.

Signed-off-by: Michael Prokop <mika@debian.org>
4 years agoDocument changes and release 0.9.22
Guido Günther [Mon, 1 Feb 2021 10:05:06 +0000 (11:05 +0100)]
Document changes and release 0.9.22

4 years agotests: Don't be fooled by 32bit userspace on amd64
Guido Günther [Mon, 1 Feb 2021 10:12:47 +0000 (11:12 +0100)]
tests: Don't be fooled by 32bit userspace on amd64

This unbreaks salsa-ci

4 years agomanpages: Fix typo in gbp-buildpackage-rpm.1
Guido Günther [Mon, 1 Feb 2021 10:02:47 +0000 (11:02 +0100)]
manpages: Fix typo in gbp-buildpackage-rpm.1

4 years agoDrop maintainer scripts
Guido Günther [Mon, 1 Feb 2021 10:00:26 +0000 (11:00 +0100)]
Drop maintainer scripts

They were needed for the oldstable -> stable upgrade

4 years agod/control: Bump supported python3 version
Guido Günther [Mon, 1 Feb 2021 09:57:38 +0000 (10:57 +0100)]
d/control: Bump supported python3 version

We specify current stable as a lower bound.

4 years agodh_missing: Ignore __pycache_
Guido Günther [Mon, 1 Feb 2021 08:33:11 +0000 (09:33 +0100)]
dh_missing: Ignore __pycache_

4 years agod/control: Switch to dh-compat 13
Guido Günther [Mon, 1 Feb 2021 08:17:49 +0000 (09:17 +0100)]
d/control: Switch to dh-compat 13

4 years agoUpdate rpm component test submodule
Guido Günther [Mon, 1 Feb 2021 08:15:01 +0000 (09:15 +0100)]
Update rpm component test submodule

4 years agorpm: Fix tags in rpm spec files
Jochen Sprickerhof [Sun, 31 Jan 2021 21:40:00 +0000 (22:40 +0100)]
rpm: Fix tags in rpm spec files

4 years agod/control: Require newer rpm
Guido Günther [Wed, 27 Jan 2021 09:23:36 +0000 (10:23 +0100)]
d/control: Require newer rpm

The version changed API and parsing strictness in multiple places,
don't try to cater for older versions.

4 years agotests: Honor GBP_TESTS_NOCLEAN in rpm tests too
Guido Günther [Wed, 27 Jan 2021 09:24:59 +0000 (10:24 +0100)]
tests: Honor GBP_TESTS_NOCLEAN in rpm tests too

4 years agorpm: Fix tags in rpm spec files
Jochen Sprickerhof [Sat, 30 Jan 2021 15:02:59 +0000 (16:02 +0100)]
rpm: Fix tags in rpm spec files

Patches are named similar to sources, counting from 0.

https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s03s04.html

4 years agorpm: Open tempfile in text mode
Jochen Sprickerhof [Sat, 30 Jan 2021 14:03:25 +0000 (15:03 +0100)]
rpm: Open tempfile in text mode

4 years agorpm: Stop decoding strings
Jochen Sprickerhof [Sat, 30 Jan 2021 14:02:58 +0000 (15:02 +0100)]
rpm: Stop decoding strings

Fails with newer rpmlib

4 years agoautopkgtest: Set %_arch
Jochen Sprickerhof [Sat, 30 Jan 2021 19:38:05 +0000 (20:38 +0100)]
autopkgtest: Set %_arch

Seems to be needed on armhf.

Closes: #980256
4 years agoDefine %python_sitelib for autopkgtest
Jochen Sprickerhof [Sat, 30 Jan 2021 15:18:10 +0000 (16:18 +0100)]
Define %python_sitelib for autopkgtest

The rpm package no longer defines this, instead there is python3_sitelib
in /usr/lib/rpm/macros.d/macros.python3 provided by the
python3-rpm-macros package (not in Debian).

4 years agoDocument changes and release 0.9.21
Guido Günther [Thu, 7 Jan 2021 10:30:25 +0000 (11:30 +0100)]
Document changes and release 0.9.21

4 years agotests: Fixup changelog test on Ubuntu
Guido Günther [Mon, 21 Dec 2020 09:56:12 +0000 (10:56 +0100)]
tests: Fixup changelog test on Ubuntu

The keys in os-release differ from lsb-release

4 years agogitlab-ci: Use a more recent Ubuntu LTS
Guido Günther [Mon, 21 Dec 2020 09:37:01 +0000 (10:37 +0100)]
gitlab-ci: Use a more recent Ubuntu LTS

4 years agodoctests/test_Changelog: Don't expect /etc/lsb-release
nicoo [Sun, 20 Dec 2020 22:43:27 +0000 (23:43 +0100)]
doctests/test_Changelog: Don't expect /etc/lsb-release

Closes: #976914
4 years agotests/11_test_dch_main.py: Don't expect /etc/lsb-release on Debian
nicoo [Sun, 20 Dec 2020 22:35:57 +0000 (23:35 +0100)]
tests/11_test_dch_main.py: Don't expect /etc/lsb-release on Debian

4 years agoimport-ref: Fix help
Guido Günther [Fri, 18 Dec 2020 16:06:07 +0000 (17:06 +0100)]
import-ref: Fix help

We want an upstream version, not  path

4 years agodocs: Correct "option" typo in gbp-buildpackage manpage
Chris Lamb [Mon, 12 Oct 2020 10:47:49 +0000 (11:47 +0100)]
docs: Correct "option" typo in gbp-buildpackage manpage

Closes: #972081
4 years agobuildpackage: Fix tests and test arch override
Guido Günther [Mon, 12 Oct 2020 08:24:35 +0000 (10:24 +0200)]
buildpackage: Fix tests and test arch override

4 years agobuildpackage: Honor --git-arch for GBP_CHANGES_FILE
Heiko Schlittermann [Sun, 29 Sep 2019 09:56:33 +0000 (11:56 +0200)]
buildpackage: Honor --git-arch for GBP_CHANGES_FILE

Closes: #941345
4 years agodocs: Add example for exporting the source tree
Guido Günther [Wed, 9 Sep 2020 11:23:19 +0000 (13:23 +0200)]
docs: Add example for exporting the source tree

See #969952

4 years agoimport-orig: Refactor vcs_tag_parent
Richard Laager [Thu, 13 Aug 2020 02:59:23 +0000 (21:59 -0500)]
import-orig: Refactor vcs_tag_parent

This makes the "tag" variable just the tag.  This improves the
human-readability of the error message if the tag cannot be found.

4 years agoimport-orig: Refactor vcs_tag_parent
Richard Laager [Thu, 13 Aug 2020 02:58:31 +0000 (21:58 -0500)]
import-orig: Refactor vcs_tag_parent

This eliminates an indentation level.

4 years agoimport-orig: Fix a comment typo
Richard Laager [Thu, 13 Aug 2020 02:54:06 +0000 (21:54 -0500)]
import-orig: Fix a comment typo

4 years agosalsa-ci: Skip reprotest
Guido Günther [Wed, 26 Aug 2020 07:54:45 +0000 (09:54 +0200)]
salsa-ci: Skip reprotest

It triggers a tess failure since a test can write to a
destinatino it should not be able to write too.

4 years agotest_import_orig: Drop unused variable
Guido Günther [Tue, 25 Aug 2020 16:32:27 +0000 (18:32 +0200)]
test_import_orig: Drop unused variable

This makes flake8 happy

4 years agotest_import_orig: Fix typo
Guido Günther [Tue, 25 Aug 2020 16:31:40 +0000 (18:31 +0200)]
test_import_orig: Fix typo

4 years agoimport-orig: Allow the post-unpack hook to filter tarball files
Marco Trevisan (Treviño) [Thu, 5 Mar 2020 15:14:23 +0000 (16:14 +0100)]
import-orig: Allow the post-unpack hook to filter tarball files

With post-unpack scripts is currently possible to filter out files that are
not needed from the upstream branch, however it is not possible to use it to
filter files that will end up in the orig file, and in some scenarios this
is not easily doable just using a filter list.

So, run the post-unpack hook just after unpacking and before repacking the
tar.

Add tests to verify this both when using with regular --filter option
and by itself.

Closes: #812721
4 years agoimport-orig: expose unpacked sources dir to the postunpack hook
Marco Trevisan (Treviño) [Thu, 5 Mar 2020 15:04:49 +0000 (16:04 +0100)]
import-orig: expose unpacked sources dir to the postunpack hook

Use an $GBP_SOURCES_DIR to expose the post-unpack sources dir to the hook.
Include a test that checks that all the expected env variables are set.

4 years agoautopkgtests: Depend on @builddep@
Guido Günther [Tue, 25 Aug 2020 08:49:05 +0000 (10:49 +0200)]
autopkgtests: Depend on @builddep@

Otherwise gbp is not able to build itself.

Closes: #968982
Thanks: Lukas Märdian for the detailed report

4 years agosmoketest: Avoid writing to ..
Guido Günther [Tue, 25 Aug 2020 08:38:48 +0000 (10:38 +0200)]
smoketest: Avoid writing to ..

Use a temporary directory to avoid 'allow-root'.

4 years agoautopkgtest: Pass RPM macros on command line
Guido Günther [Tue, 25 Aug 2020 08:34:33 +0000 (10:34 +0200)]
autopkgtest: Pass RPM macros on command line

This avoids the need to modify files in the home directory.

4 years agospec: Don't fail on empty cache dir
Guido Günther [Tue, 25 Aug 2020 07:59:08 +0000 (09:59 +0200)]
spec: Don't fail on empty cache dir

4 years agospec: Include the correct file
Guido Günther [Tue, 25 Aug 2020 07:51:53 +0000 (09:51 +0200)]
spec: Include the correct file

export_ref.py does not exist.

4 years agopolicy: Fix typos
Guido Günther [Wed, 12 Aug 2020 09:38:21 +0000 (11:38 +0200)]
policy: Fix typos

Thanks: Andrius Merkys
Closes: #966130
4 years agodocs: Clarify that only tarball creation is affected.
Guido Günther [Wed, 12 Aug 2020 09:35:02 +0000 (11:35 +0200)]
docs: Clarify that only tarball creation is affected.

Thanks: Pierre Equoy

4 years agodocs: Drop --git- from dch invocation
Guido Günther [Wed, 12 Aug 2020 09:26:00 +0000 (11:26 +0200)]
docs: Drop --git- from dch invocation

Thanks Pierre Equoy

4 years agoDocument changes and release 0.9.20
Guido Günther [Wed, 1 Jul 2020 12:49:42 +0000 (14:49 +0200)]
Document changes and release 0.9.20

4 years agoMake flake8 E741 happy
Guido Günther [Wed, 1 Jul 2020 12:46:11 +0000 (14:46 +0200)]
Make flake8 E741 happy

Closes: #964040