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>
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.
Guido Günther [Fri, 11 Feb 2022 11:04:22 +0000 (12:04 +0100)]
HACKING: Document how to keep test repos around
Guido Günther [Fri, 11 Feb 2022 11:02:31 +0000 (12:02 +0100)]
HACKING: mention how to rerun a single test
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.
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>
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>
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>
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.
Guido Günther [Fri, 5 Nov 2021 09:24:44 +0000 (10:24 +0100)]
Document changes and release 0.9.25
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
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.
Guido Günther [Tue, 26 Oct 2021 07:46:45 +0000 (09:46 +0200)]
Document changes and release 0.9.24
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.
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
Guido Günther [Wed, 13 Oct 2021 07:12:32 +0000 (09:12 +0200)]
d/control: Add RulesRequiresRoot
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
Guido Günther [Wed, 13 Oct 2021 07:13:05 +0000 (09:13 +0200)]
d/rules: Drop trailing whitespace
Gbp-Dch: Ignore
Guido Günther [Wed, 13 Oct 2021 07:10:06 +0000 (09:10 +0200)]
d/changelog: Drop trailing whitespace
Gbp-Dch: Ignore
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.
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>
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>
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
Guido Günther [Tue, 8 Jun 2021 15:35:56 +0000 (17:35 +0200)]
Document changes and release 0.9.23
Quanah Gibson-Mount [Sun, 30 May 2021 10:16:20 +0000 (12:16 +0200)]
spec: Fix rpm build on centos7 and centos8
Quanah Gibson-Mount [Sun, 30 May 2021 10:13:43 +0000 (12:13 +0200)]
spec: Ignore byte-compiled python files
Quanah Gibson-Mount [Sun, 30 May 2021 10:12:28 +0000 (12:12 +0200)]
docs: Check for docbook2man too
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
Quanah Gibson-Mount [Mon, 24 May 2021 17:26:28 +0000 (13:26 -0400)]
setup.py: Explicitly open the changelog file as utf-8
Quanah Gibson-Mount [Fri, 14 May 2021 22:33:42 +0000 (18:33 -0400)]
Fix gbp-builder-mock to honor configured options for mock
Quanah Gibson-Mount [Mon, 3 May 2021 16:07:30 +0000 (12:07 -0400)]
gbp-builder-mock: Update to work with current mock releases
Guido Günther [Fri, 30 Apr 2021 07:03:46 +0000 (09:03 +0200)]
spec: Swtich requires to python3 too
Thanks: Quanah Gibson-Mount
Guido Günther [Wed, 28 Apr 2021 09:12:08 +0000 (11:12 +0200)]
spec: Install setup-git-attributes command
This unbreaks the autopkgtest
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.
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
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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
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
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>
Guido Günther [Mon, 1 Feb 2021 10:05:06 +0000 (11:05 +0100)]
Document changes and release 0.9.22
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
Guido Günther [Mon, 1 Feb 2021 10:02:47 +0000 (11:02 +0100)]
manpages: Fix typo in gbp-buildpackage-rpm.1
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
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.
Guido Günther [Mon, 1 Feb 2021 08:33:11 +0000 (09:33 +0100)]
dh_missing: Ignore __pycache_
Guido Günther [Mon, 1 Feb 2021 08:17:49 +0000 (09:17 +0100)]
d/control: Switch to dh-compat 13
Guido Günther [Mon, 1 Feb 2021 08:15:01 +0000 (09:15 +0100)]
Update rpm component test submodule
Jochen Sprickerhof [Sun, 31 Jan 2021 21:40:00 +0000 (22:40 +0100)]
rpm: Fix tags in rpm spec files
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.
Guido Günther [Wed, 27 Jan 2021 09:24:59 +0000 (10:24 +0100)]
tests: Honor GBP_TESTS_NOCLEAN in rpm tests too
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
Jochen Sprickerhof [Sat, 30 Jan 2021 14:03:25 +0000 (15:03 +0100)]
rpm: Open tempfile in text mode
Jochen Sprickerhof [Sat, 30 Jan 2021 14:02:58 +0000 (15:02 +0100)]
rpm: Stop decoding strings
Fails with newer rpmlib
Jochen Sprickerhof [Sat, 30 Jan 2021 19:38:05 +0000 (20:38 +0100)]
autopkgtest: Set %_arch
Seems to be needed on armhf.
Closes: #980256
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).
Guido Günther [Thu, 7 Jan 2021 10:30:25 +0000 (11:30 +0100)]
Document changes and release 0.9.21
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
Guido Günther [Mon, 21 Dec 2020 09:37:01 +0000 (10:37 +0100)]
gitlab-ci: Use a more recent Ubuntu LTS
nicoo [Sun, 20 Dec 2020 22:43:27 +0000 (23:43 +0100)]
doctests/test_Changelog: Don't expect /etc/lsb-release
Closes: #976914
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
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
Chris Lamb [Mon, 12 Oct 2020 10:47:49 +0000 (11:47 +0100)]
docs: Correct "option" typo in gbp-buildpackage manpage
Closes: #972081
Guido Günther [Mon, 12 Oct 2020 08:24:35 +0000 (10:24 +0200)]
buildpackage: Fix tests and test arch override
Heiko Schlittermann [Sun, 29 Sep 2019 09:56:33 +0000 (11:56 +0200)]
buildpackage: Honor --git-arch for GBP_CHANGES_FILE
Closes: #941345
Guido Günther [Wed, 9 Sep 2020 11:23:19 +0000 (13:23 +0200)]
docs: Add example for exporting the source tree
See #969952
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.
Richard Laager [Thu, 13 Aug 2020 02:58:31 +0000 (21:58 -0500)]
import-orig: Refactor vcs_tag_parent
This eliminates an indentation level.
Richard Laager [Thu, 13 Aug 2020 02:54:06 +0000 (21:54 -0500)]
import-orig: Fix a comment typo
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.
Guido Günther [Tue, 25 Aug 2020 16:32:27 +0000 (18:32 +0200)]
test_import_orig: Drop unused variable
This makes flake8 happy
Guido Günther [Tue, 25 Aug 2020 16:31:40 +0000 (18:31 +0200)]
test_import_orig: Fix typo
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
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.
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
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'.
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.
Guido Günther [Tue, 25 Aug 2020 07:59:08 +0000 (09:59 +0200)]
spec: Don't fail on empty cache dir
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.
Guido Günther [Wed, 12 Aug 2020 09:38:21 +0000 (11:38 +0200)]
policy: Fix typos
Thanks: Andrius Merkys
Closes: #966130
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
Guido Günther [Wed, 12 Aug 2020 09:26:00 +0000 (11:26 +0200)]
docs: Drop --git- from dch invocation
Thanks Pierre Equoy
Guido Günther [Wed, 1 Jul 2020 12:49:42 +0000 (14:49 +0200)]
Document changes and release 0.9.20
Guido Günther [Wed, 1 Jul 2020 12:46:11 +0000 (14:46 +0200)]
Make flake8 E741 happy
Closes: #964040