chiark / gitweb /
dgit.git
3 years agochangelog: start 9.13
Ian Jackson [Wed, 19 Aug 2020 16:27:45 +0000 (17:27 +0100)]
changelog: start 9.13

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agochangelog: finalise 9.12
Ian Jackson [Wed, 19 Aug 2020 16:25:51 +0000 (17:25 +0100)]
changelog: finalise 9.12

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agodgit-mirror-ssh-wrap: Cope with yet another new rsync rune.
Sergio Durigan Junior [Wed, 19 Aug 2020 15:46:16 +0000 (16:46 +0100)]
dgit-mirror-ssh-wrap: Cope with yet another new rsync rune.

Closes:#968635.
Signed-off-by: Sergio Durigan Junior <sergiodj@debian.org>
3 years agochangelog: start 9.12
Ian Jackson [Mon, 22 Jun 2020 18:10:27 +0000 (19:10 +0100)]
changelog: start 9.12

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agochangelog: finalise 9.11
Ian Jackson [Mon, 22 Jun 2020 18:09:22 +0000 (19:09 +0100)]
changelog: finalise 9.11

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agochangelog: update for further changes
Ian Jackson [Mon, 22 Jun 2020 18:09:01 +0000 (19:09 +0100)]
changelog: update for further changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agodgit-mirror-ssh-wrap: Cope with new rsync rune
Ian Jackson [Mon, 22 Jun 2020 16:07:47 +0000 (17:07 +0100)]
dgit-mirror-ssh-wrap: Cope with new rsync rune

rsync 3.2 passes -I and -v to the remote process.  These options are
no problem.

Rather than making this into an single mess of a regexp, add a new
regexp for the new rune.  That's clearer and I think probably just
about as future-proof.

Closes: #963489
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agodgit-mirror-ssh-wrap: Fix syntax for multiple patterns
Ian Jackson [Mon, 22 Jun 2020 16:06:52 +0000 (17:06 +0100)]
dgit-mirror-ssh-wrap: Fix syntax for multiple patterns

We don't want to repeat $command =~ so we need to assign the command
to $_;

No functional change with the current single pattern.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agodgit-mirror-ssh-wrap: Clarify the error message
Ian Jackson [Mon, 22 Jun 2020 16:03:32 +0000 (17:03 +0100)]
dgit-mirror-ssh-wrap: Clarify the error message

When we get an unexpected command, it would be nice to say who is
reporting this problem and what has probably happened.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agogit-debrebase(1): Fix new-upstream -i docs
Ian Jackson [Tue, 4 Feb 2020 10:42:37 +0000 (10:42 +0000)]
git-debrebase(1): Fix new-upstream -i docs

Firstly, the -i must come at the end.  (After -i come more git-rebase
options.)

Secondly, this wasn't mentioned at all in the main section for
new-upstream - only in the synopsis.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agogit-debrebase: new-upstream: Do not treat late options as version
Ian Jackson [Tue, 4 Feb 2020 10:38:31 +0000 (10:38 +0000)]
git-debrebase: new-upstream: Do not treat late options as version

Instead of a new upstream version, the user may wish to pass -i.
(Or other git-rebase options.)

This is handled correctly when we are deciding whether to treat
further arguments as additional piece specifications, but the new
optional upstream version commitish was mishandled in this respect.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agogit-debrebase: Fix error message for wrong use of -i
Ian Jackson [Tue, 4 Feb 2020 10:25:07 +0000 (10:25 +0000)]
git-debrebase: Fix error message for wrong use of -i

Getopt::Long with "i:s" parses "-i something" as "-i" with a value of
"something".  Maybe I didn't know this when I wrote this code,
and thought the check for $val would only reject "-isomething".

But "git-rebrebase ... -i something" is wrong because it would mean
"git-rebase -i something" and we do not permit the user to specify
their own base.  So it is right to bail out in this case.

However, the message was wrong, since it refers to cuddling, and it
can be caused by a non-cuddled non-option argument.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agotests: Print pwd in failure trap
Ian Jackson [Tue, 28 Apr 2020 11:27:23 +0000 (12:27 +0100)]
tests: Print pwd in failure trap

This will help debugging.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agotest suite: Provide navigation banner when exiting nonzero
Ian Jackson [Fri, 27 Mar 2020 22:16:03 +0000 (22:16 +0000)]
test suite: Provide navigation banner when exiting nonzero

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agotest suite: manpages-format: Cope with buster & eatmydata
Ian Jackson [Mon, 22 Jun 2020 14:31:27 +0000 (15:31 +0100)]
test suite: manpages-format: Cope with buster & eatmydata

When man-db runs under eatmydata on buster, it (at least sometimes)
prints this message
  ERROR: ld.so: object 'libeatmydata.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

(This is #963508 which I have just filed against glibc.)

Obviously it would be better if this just worked, but for now we can
definitely ignore this as it doesn't represent a bug in src:dgit's
manpages.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agotest suite: manpages-format: Provision for always-expected msgs
Ian Jackson [Mon, 22 Jun 2020 14:29:42 +0000 (15:29 +0100)]
test suite: manpages-format: Provision for always-expected msgs

Currently there are none, so no functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoFix upstream_commitish_search API
Ian Jackson [Mon, 22 Jun 2020 15:09:15 +0000 (16:09 +0100)]
Fix upstream_commitish_search API

upstream_commitish_search used to return a commit.  If it succeeded
The caller could find the tag in $tried[-1].  Both callers relied on
this unpleasant and error-prone API.

In
   0bb8e2a87e3c8b5be0fce5c2491b292e9273056e
   Dgit::upstream_commitish_search: fail if more than one tag exists

the algorithm was changed to keep looking, so it can reject ambiguous
situations.  The result is that $tried[-1] is entirely wrong in the
success case.  (This is spotted by the tagupl-baredebian test.)

It would have been possible to fix this by making
upstream_commitish_search synthesise a suitable return value for
putting in $tried, but that is absurd.

Instead give this function a sensible calling convention.  It now
returns a list of the tag name (for messages etc.) and the
commitish (for use).  Change both call sites.

CC: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agogit-debrebase: Rename a variable $ups_tag to $ups_rev
Ian Jackson [Mon, 22 Jun 2020 15:05:37 +0000 (16:05 +0100)]
git-debrebase: Rename a variable $ups_tag to $ups_rev

This is a commit, not a tag.  This is prepping for a change where
the tag will be here in a variable too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agochangelog: Update
Sean Whitton [Thu, 28 May 2020 01:00:10 +0000 (18:00 -0700)]
changelog: Update

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
3 years agoDgit::upstream_commitish_search: fail if more than one tag exists
Sean Whitton [Wed, 27 May 2020 20:49:07 +0000 (13:49 -0700)]
Dgit::upstream_commitish_search: fail if more than one tag exists

We should not assume we know which the user wants to merge, as
git-deborig does not.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Reported-by: David Bremner <bremner@debian.org>
Reviewed-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agodgit-maint-debrebase(7): Drop bad advice about upstream/ tag case
Sean Whitton [Wed, 27 May 2020 20:57:47 +0000 (13:57 -0700)]
dgit-maint-debrebase(7): Drop bad advice about upstream/ tag case

The first argument to the new-upstream subcommand is a version number,
not a tag name, so this instruction could never have been correct.

The user should not need usually to pass both the upstream version
number and the upstream/ tag name, either, because git-debrebase
should find it for them.

Reported-by: David Bremner <bremner@debian.org>
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: Start 9.11
Ian Jackson [Mon, 3 Feb 2020 08:55:40 +0000 (08:55 +0000)]
changelog: Start 9.11

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: Finalise 9.10
Ian Jackson [Mon, 3 Feb 2020 08:41:23 +0000 (08:41 +0000)]
changelog: Finalise 9.10

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: Document changes so far since 9.9
Ian Jackson [Sun, 2 Feb 2020 16:55:52 +0000 (16:55 +0000)]
changelog: Document changes so far since 9.9

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoi18n-commit - autogenerated
Ian Jackson [Sun, 2 Feb 2020 16:50:41 +0000 (16:50 +0000)]
i18n-commit - autogenerated

4 years agoi18n: Updated nl.po file
Frans Spiesschaert [Sun, 2 Feb 2020 16:48:50 +0000 (16:48 +0000)]
i18n: Updated nl.po file

Closes: #945356
4 years agodgit-maint-debrebase(7): Import tarball before committing gbp.conf
Sean Whitton [Thu, 25 Jul 2019 06:03:36 +0000 (07:03 +0100)]
dgit-maint-debrebase(7): Import tarball before committing gbp.conf

The workflow given previously fails to produce a history that can work
with git-debrebase, because it has the first commit introducing
debian/ be an ancestor of the first import of the upstream source.

This is the final part of #932954.

Closes: #932954.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
4 years agod-m-{merge,debrebase}(7): Set 'merge' in gbp.conf
Sean Whitton [Wed, 24 Jul 2019 19:08:23 +0000 (20:08 +0100)]
d-m-{merge,debrebase}(7): Set 'merge' in gbp.conf

This enables simplifying runes which are more frequently to be typed.

'merge-mode' no longer need be set since in the only case where the
manpages recommend allowing `gbp import-orig` to perform a merge, a
different merge mode is required (and specified in that rune).

This is part of #932954.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
4 years agod-m-{merge,debrebase}(7): Use an 'upstream/' tag prefix in gbp.conf
Sean Whitton [Wed, 24 Jul 2019 19:05:34 +0000 (20:05 +0100)]
d-m-{merge,debrebase}(7): Use an 'upstream/' tag prefix in gbp.conf

This is a useful convention to distinguish actual upstream tags from
upstream tarball-representing tags created by the Debian package
maintainer.

Note that use of this convention is already recommended in section
"Using untagged upstream commits".

This is part of #932954.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
4 years agodgit(1): Do not talk about `intermediate' uploads
Ian Jackson [Sun, 2 Feb 2020 16:40:09 +0000 (16:40 +0000)]
dgit(1): Do not talk about `intermediate' uploads

Incorporate Sean's review comment in
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=928473#57

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoTerminology: Change "rewind" to "rewrite" where appropriate
Ian Jackson [Thu, 5 Sep 2019 10:26:16 +0000 (11:26 +0100)]
Terminology: Change "rewind" to "rewrite" where appropriate

In #928473, Colin Watson writes:
>   the use of "rewind" as a synonym for "non-fast-forwarding", while
> somewhat common in git terminology, is unfortunate.  The terms seem
> to be borrowed from video playback systems, where "rewind" is often
> just the exact opposite of "fast-forward", and so when I see
> "rewinding history" in a few places in dgit(1) my initial
> interpretation is that it must mean "updating a ref to point to an
> ancestor of the commit that it previously pointed to", whereas I
> think dgit(1) means "any push that isn't a fast-forward".  I don't
> know if I'm the only one for whom it has that connotation.

This makes sense.  So, I am changing uses of "rewind" which do not
mean precisely going back to an ancestor.

I think we can often use the word "rewrite" for the more general
case, but there are some places where another wording is better.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit(1): Cover more cases of --overwrite and --deliberately
Ian Jackson [Thu, 5 Sep 2019 10:21:35 +0000 (11:21 +0100)]
dgit(1): Cover more cases of --overwrite and --deliberately

Closes: #928473
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agogit-debpush: avoid a pipefail problem in get_file_from_ref
Sean Whitton [Sat, 19 Oct 2019 17:33:10 +0000 (10:33 -0700)]
git-debpush: avoid a pipefail problem in get_file_from_ref

`grep -q` exits as soon as it finds a matching line, potentially
sending a SIGPIPE to git-ls-tree.  We have pipefail turned on, so that
can make the whole pipeline exit nonzero, which is wrong when grep did
in fact find a match.

This solution is more readable than disabling pipefail just for this
line (as is done elsewhere in git-debpush).

Closes: #940588
Reported-by: Andrej Shadura <andrewsh@debian.org>
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
4 years agotests: import-dsc: Test corrupted ENV (#950446)
Ian Jackson [Sun, 2 Feb 2020 12:34:04 +0000 (12:34 +0000)]
tests: import-dsc: Test corrupted ENV (#950446)

Closes: #950326
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: absurd: Work around mangled env metadata from gbp
Ian Jackson [Sat, 1 Feb 2020 21:12:25 +0000 (21:12 +0000)]
dgit: absurd: Work around mangled env metadata from gbp

Some versions of gbp pq will pass broken metadata from patch files
into the env vars for git-commit-tree.  Eg, #950446/#950326 where gbp
pq from buster cannot cope with binutils_2.33.90.20200122-2.dsc,
setting GIT_AUTHOR_DATE to "???" (literally, three ? marks, as copied
from the patch file libctf-soname.diff).

Work around this as follows:
 * Try git-commit-tree of an empty commit message.  Does it work?
   If so, workaround is not needed.
 * Try resetting GIT_AUTHOR_* to GIT_COMMITTER_*.  Does it work now?
   Ah, that is the fix!
 * Otherwise, just run git-commit-tree as usual.

This code makes some perhaps-unreasonable assumptions:
 * gbp's git commit-tree has the tree object as 2nd argument
   (really shonky command line parsing).  However, if this
   assumption is violated, the result is that the git-commit-tree
   attempts either fail harmlessly, or succeed harmlessly, defeating
   the workaround but with no other implications.
 * if a workaround is needed, it is best to throw away all the
   author information, rather that try to pick and choose, or to
   fix it up.
These are IMO tolerable because I think it's gbp's job to get this
right.  The output from dgit (if it succeeds) will be right in terms
of tree and even in terms of commit structure.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: absurd: Break out PATH filtering
Ian Jackson [Sat, 1 Feb 2020 21:08:02 +0000 (21:08 +0000)]
dgit: absurd: Break out PATH filtering

Actually this function just sets it to the already-computed $npath,
but this is an implementation detail.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: absurd: Provide a way for absurd git to print warnings
Ian Jackson [Sat, 1 Feb 2020 21:04:56 +0000 (21:04 +0000)]
dgit: absurd: Provide a way for absurd git to print warnings

The file ../../absurd-apply-warnings is dumped to dgit's stderr.

Nothing writes to it yet, so no overall functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: start 9.10
Ian Jackson [Sat, 14 Sep 2019 20:37:15 +0000 (21:37 +0100)]
changelog: start 9.10

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: finalise 9.9 archive/debian/9.9 debian/9.9
Ian Jackson [Sat, 14 Sep 2019 20:35:03 +0000 (21:35 +0100)]
changelog: finalise 9.9

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: Document changes since 9.8
Ian Jackson [Sat, 14 Sep 2019 19:42:11 +0000 (20:42 +0100)]
changelog: Document changes since 9.8

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoi18n-commit - autogenerated
Ian Jackson [Sat, 14 Sep 2019 19:40:33 +0000 (20:40 +0100)]
i18n-commit - autogenerated

4 years agodgit-maint-bpo(7): Mention occasional need for --new
Ian Jackson [Thu, 5 Sep 2019 15:50:28 +0000 (16:50 +0100)]
dgit-maint-bpo(7): Mention occasional need for --new

Closes: #935443
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agogit-debpush(1): warning about use of forcing options
Sean Whitton [Sat, 14 Sep 2019 16:54:34 +0000 (09:54 -0700)]
git-debpush(1): warning about use of forcing options

Suggested-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Closes: #935084
4 years agogit-debpush(1): note that --quilt=baredebian+git is an alias
Sean Whitton [Sat, 14 Sep 2019 16:54:10 +0000 (09:54 -0700)]
git-debpush(1): note that --quilt=baredebian+git is an alias

Suggested-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Relates-to: #935084
4 years agoinfra: dgit-mirror-ssh-wrap: Fix $package_re
Ian Jackson [Fri, 13 Sep 2019 17:22:58 +0000 (18:22 +0100)]
infra: dgit-mirror-ssh-wrap: Fix $package_re

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: Add missing dependency on liburl-perl
Ian Jackson [Fri, 13 Sep 2019 15:37:01 +0000 (16:37 +0100)]
test suite: Add missing dependency on liburl-perl

This is only a Recommends in dgit.deb so we need to pull it in
explicitly for the tests that need it.

We add the dependency unconditionally to the test suite tests that
depend on dgit, since that avoids having to track exactly when it's
needed.  (This module has an Installed-Size of 228.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodebian/control: Add missing dependency on liburl-perl
Ian Jackson [Fri, 13 Sep 2019 15:33:46 +0000 (16:33 +0100)]
debian/control: Add missing dependency on liburl-perl

dgit uses URI::Escape for archive_query_aptget.

This is a Recommends, because if you never use the aptget method you
don't need it.  (But few installations can do without the aptget
method entirely.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: Test dgit-mirror-ssh-wrap
Ian Jackson [Fri, 13 Sep 2019 15:02:26 +0000 (16:02 +0100)]
test suite: Test dgit-mirror-ssh-wrap

This script will break if rsync changes the way it passes arguments to
the peer.  We need to catch that.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoinfra: New script dgit-mirror-ssh-wrap
Ian Jackson [Fri, 13 Sep 2019 15:02:22 +0000 (16:02 +0100)]
infra: New script dgit-mirror-ssh-wrap

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agolintian: Override source format warnings
Ian Jackson [Fri, 13 Sep 2019 14:41:59 +0000 (15:41 +0100)]
lintian: Override source format warnings

I also don't agree that missing source format is a problem.
The semantics are well defined.

There are difficulties with 3.0 native (for example, that it forbids
non-native versions) so 1.0 must continue to be used so that it
continues to exist.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoi18n-commit - autogenerated
Ian Jackson [Sun, 8 Sep 2019 19:11:31 +0000 (20:11 +0100)]
i18n-commit - autogenerated

4 years agolintian: Override some checks
Ian Jackson [Sun, 8 Sep 2019 19:11:15 +0000 (20:11 +0100)]
lintian: Override some checks

The mannpage message on line 51 is
  warning: file `<standard input>', around line 51:
    table wider than line width
and refers to this line
  dgit-maint-gbp(7) for maintainers already using git-buildpackage
which does in fact fit (just) in an 80-column xterm.

I hope dgit-badcommit-fixup is never going to be needed enough again
to need a manpage.

I don't agree that trailing whitespace in changelog is a problem.

Remaining messages from

  lintian -EI --pedantic --no-tag-display-limit --suppress-tags=syntax-error-in-debian-changelog,changelog-empty-entry ../bpd/dgit_9.9~_multi.changes

are as follows:

  W: dgit source: missing-debian-source-format
  I: dgit source: older-source-format 1.0

I don't agree that source format 1.0 is wrong.  There are difficulties
with 3.0 native (for example, that it forbids non-native versions) so
1.0 must continue to be used so that it continues to exist.

I also don't agree that missing source format is a problem.  The
semantics are well defined.

  P: dgit source: package-uses-old-debhelper-compat-version 9
  W: dgit source: unnecessary-testsuite-autopkgtest-field

I like to keep things backwards compatible for a much longer time than
most people.  jessie is currently oldoldstable and has dh 9.

  P: dgit source: no-dep5-copyright

I don't have effort for this.  I think it is largely busywork but I
would accept a patch.

  I: dgit: package-contains-empty-directory usr/share/man/man5/

Avoiding this is awkward.

  W: dgit-infrastructure: binary-without-manpage usr/bin/dgit-mirror-rsync
  W: dgit-infrastructure: binary-without-manpage usr/bin/dgit-repos-admin-debian
  W: dgit-infrastructure: binary-without-manpage usr/bin/dgit-repos-policy-debian
  W: dgit-infrastructure: binary-without-manpage usr/bin/dgit-repos-policy-trusting
  W: dgit-infrastructure: binary-without-manpage usr/bin/dgit-repos-server
  W: dgit-infrastructure: binary-without-manpage usr/bin/dgit-ssh-dispatch

In principle manpages for some of all of these would be good.  But the
usefuless of these programs is largely limited to people whose
requirements are extremely similar to Debian's.  Most people can just
use a normal git server.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocontrol: update Vcs-Git to end in .git
Ian Jackson [Sun, 8 Sep 2019 19:28:47 +0000 (20:28 +0100)]
control: update Vcs-Git to end in .git

In
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888809
Paul Wise writes
  Salsa redirects git to URLs ending in ".git/" and redirects browsers
  to the URL not ending in ".git/" or ".git".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocontrol: Drop redundant Priority field
Ian Jackson [Sun, 8 Sep 2019 19:19:43 +0000 (20:19 +0100)]
control: Drop redundant Priority field

Found by lintian.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agogit-debrebase: Extend extended description.
Ian Jackson [Sun, 8 Sep 2019 19:16:19 +0000 (20:16 +0100)]
git-debrebase: Extend extended description.

Mentioning what the competition is may help both discoverability and
useability.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit(1): Fix a typo (found by lintian)
Ian Jackson [Sun, 8 Sep 2019 19:16:08 +0000 (20:16 +0100)]
dgit(1): Fix a typo (found by lintian)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocontrol: Bump Standards-Version
Ian Jackson [Sun, 8 Sep 2019 18:50:52 +0000 (19:50 +0100)]
control: Bump Standards-Version

I have been through the upgrading checklist.

I came across two things which were mentioned but which I haven't
implemented:

 * nodoc build option.  It's not clear to me whether this is
   superseded by the nodocs build profile.  If we wanted to bootstrap
   using dgit, the build profile would probably be better.

 * using ${perl:Depends}.  I looked into this briefly and dh_perl
   doesn't seem to DTRT right now: it doesn't spot any of the modules
   we use.  I'm not sure why and have decided to punt on this for now.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocontrol: Change priority of dgit-infrastruture to extra
Ian Jackson [Sun, 8 Sep 2019 18:42:57 +0000 (19:42 +0100)]
control: Change priority of dgit-infrastruture to extra

Pursuant to policy upgrading checklist.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit-maint-{merge,debrebase}(7): Use git fetch --tags upstream
Sean Whitton [Sat, 7 Sep 2019 16:32:21 +0000 (09:32 -0700)]
dgit-maint-{merge,debrebase}(7): Use git fetch --tags upstream

We recommend using a remote called 'upstream' and so we can recommend
a command which will be faster and less likely to error out.

Closes: #939679
Suggested-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
4 years agochangelog: start 9.9
Ian Jackson [Fri, 6 Sep 2019 22:59:01 +0000 (23:59 +0100)]
changelog: start 9.9

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: finalise 9.8 archive/debian/9.8 debian/9.8
Ian Jackson [Fri, 6 Sep 2019 22:42:22 +0000 (23:42 +0100)]
changelog: finalise 9.8

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: Document changes since 9.7
Ian Jackson [Fri, 6 Sep 2019 21:39:06 +0000 (22:39 +0100)]
changelog: Document changes since 9.7

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoi18n-commit - autogenerated
Ian Jackson [Fri, 6 Sep 2019 22:47:23 +0000 (23:47 +0100)]
i18n-commit - autogenerated

4 years agotest suite: Check that archive skew machinery reports warning
Ian Jackson [Fri, 6 Sep 2019 21:14:53 +0000 (22:14 +0100)]
test suite: Check that archive skew machinery reports warning

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: Check that archive skew machinery succeeds
Ian Jackson [Fri, 6 Sep 2019 20:01:59 +0000 (21:01 +0100)]
test suite: Check that archive skew machinery succeeds

This is actually the point of this test case.

perling $tmp/aq/package... is a bit of a bodge, but fine.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: Once again cope with archive skew
Ian Jackson [Fri, 6 Sep 2019 20:03:57 +0000 (21:03 +0100)]
dgit: Once again cope with archive skew

Since our http rearrangements, we have lost the ability to try
multiple dsc versions which means we cope badly with archive skew.

This was an editing error: in 7821907696db
   dgit: Abolish url_get in favour of url_fetch
we omitted to notice that url_get implicitly does what url_fetch needs
Ok404 to do.  So we didn't add the Ok404 parameter.

Fix this by adding it now.

Closes: #935874
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: clone-skew: Test for accessing mirror via http
Ian Jackson [Fri, 6 Sep 2019 20:00:11 +0000 (21:00 +0100)]
test suite: clone-skew: Test for accessing mirror via http

This test is misnamed right now, but really we are going to make it do
something interesting.

Right now it just sets everything up to access the mirror via http
rather than file://.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: t-archive: Honour t_archive_ln_s
Ian Jackson [Fri, 6 Sep 2019 20:56:54 +0000 (21:56 +0100)]
test suite: t-archive: Honour t_archive_ln_s

This will let us arrange to use cp instead.

No functional change for existing callers.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: curl: pass CURLOPT_FOLLOWLOCATION
Ian Jackson [Fri, 6 Sep 2019 19:37:28 +0000 (20:37 +0100)]
dgit: curl: pass CURLOPT_FOLLOWLOCATION

This was accidentally dropped in the 9.6 http changes.

Closes: #939564
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit-maint-{merge,debrebase}(7): Use git fetch --all --tags
Sean Whitton [Thu, 5 Sep 2019 16:08:48 +0000 (09:08 -0700)]
dgit-maint-{merge,debrebase}(7): Use git fetch --all --tags

`git remote update` doesn't fetch tags unless remote branches include
the commits at which those tags point.  Thus, if upstream pushes their
release tag but fails to push their master branch, `git remote update`
will not fetch the release tag.

I've been in this situation more than once when following the
workflows detailed in these manpages, so let's just recommend a
command which will definitely try to fetch the latest release tag.

Closes: #939504
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: Test already-tagged check
Ian Jackson [Thu, 5 Sep 2019 15:36:27 +0000 (16:36 +0100)]
test suite: Test already-tagged check

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: Fail early when the archive/ tag already exists.
Ian Jackson [Thu, 5 Sep 2019 15:34:33 +0000 (16:34 +0100)]
dgit: Fail early when the archive/ tag already exists.

Suggest using a new version number.

We need a new --force option to override this check.

Closes: #935802
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: Add --force-reusing-version to many tests
Ian Jackson [Thu, 5 Sep 2019 17:13:27 +0000 (18:13 +0100)]
test suite: Add --force-reusing-version to many tests

This is going to be needed in a moment.  Unknown --force options are
harmless and just generate warnings, so we do this in advance.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit(1): Another semantic linefeed
Ian Jackson [Thu, 5 Sep 2019 13:50:01 +0000 (14:50 +0100)]
dgit(1): Another semantic linefeed

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: Warn when we see what look like our options passed too late
Ian Jackson [Thu, 5 Sep 2019 13:48:19 +0000 (14:48 +0100)]
dgit: Warn when we see what look like our options passed too late

Closes: #934807
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: Use distro-info-data to resolve unknown suites to distros
Ian Jackson [Thu, 5 Sep 2019 11:59:16 +0000 (12:59 +0100)]
dgit: Use distro-info-data to resolve unknown suites to distros

Closes: #931212
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit(1): Some semantic linefeeds
Ian Jackson [Thu, 5 Sep 2019 10:20:15 +0000 (11:20 +0100)]
dgit(1): Some semantic linefeeds

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: Use $tarball_f_ext_re for test_source_only_changes
Ian Jackson [Thu, 5 Sep 2019 08:39:51 +0000 (09:39 +0100)]
dgit: Use $tarball_f_ext_re for test_source_only_changes

The old ad-hoc regexp doesn't match .tar.gz.{asc,sig}.

Closes: #939280
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoDgit: Break out $tarball_f_ext_re.
Ian Jackson [Thu, 5 Sep 2019 08:34:06 +0000 (09:34 +0100)]
Dgit: Break out $tarball_f_ext_re.

We are going to reuse this.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agogit-debrebase(5): Tiny typo fix
Ian Jackson [Sat, 18 May 2019 11:49:09 +0000 (12:49 +0100)]
git-debrebase(5): Tiny typo fix

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: Start 9.8
Ian Jackson [Sun, 11 Aug 2019 00:12:05 +0000 (01:12 +0100)]
changelog: Start 9.8

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: finalise 9.7 archive/debian/9.7 debian/9.7
Ian Jackson [Sun, 11 Aug 2019 00:11:06 +0000 (01:11 +0100)]
changelog: finalise 9.7

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: Document chages since 9.6
Ian Jackson [Sat, 10 Aug 2019 19:00:40 +0000 (20:00 +0100)]
changelog: Document chages since 9.6

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoi18n-commit - autogenerated
Ian Jackson [Sat, 10 Aug 2019 18:42:36 +0000 (19:42 +0100)]
i18n-commit - autogenerated

4 years agodgit: vcs-git handling: Strip [...] a la Haskell Team
Ian Jackson [Sat, 10 Aug 2019 18:22:24 +0000 (19:22 +0100)]
dgit: vcs-git handling: Strip [...] a la Haskell Team

The final syntax of this is not yet agreed but this regexp ought to do
the right thing in all reasonable cases.  (Ie, no [ ] inside the [ ].)

See also #932696 against policy, which is discussing the spec.

Closes: #932699
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: update-vcs-git: Use vcs_git_url_of_ctrl
Ian Jackson [Sat, 10 Aug 2019 18:24:00 +0000 (19:24 +0100)]
dgit: update-vcs-git: Use vcs_git_url_of_ctrl

So we strip -b fragments as we ought.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: update-vcs-git: Print a less confusing message if unchanged
Ian Jackson [Sat, 10 Aug 2019 18:20:30 +0000 (19:20 +0100)]
dgit: update-vcs-git: Print a less confusing message if unchanged

Previously, we would say it was "already configured" which is
unspecific and sounds a bit like an error.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: update-vcs-git: Do not crash if url is unchanged
Ian Jackson [Sat, 10 Aug 2019 18:18:03 +0000 (19:18 +0100)]
dgit: update-vcs-git: Do not crash if url is unchanged

Previously, we would pass an empty command array to runcmd, causing a
mysterious-looking failure.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: Break out vcs_git_url_of_ctrl
Ian Jackson [Sat, 10 Aug 2019 18:11:57 +0000 (19:11 +0100)]
dgit: Break out vcs_git_url_of_ctrl

This should have been done before.  No functional change so far.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: Fix on NFS (avoid leaking an open file in a directory to rm)
Stéphane Glondu [Fri, 9 Aug 2019 05:16:46 +0000 (07:16 +0200)]
dgit: Fix on NFS (avoid leaking an open file in a directory to rm)

The file debian/source/format was open by "dgit fetch" but never
closed, causing failure to remove the extracted tree on NFS.

Closes: #933827
Signed-off-by: Stéphane Glondu <glondu@debian.org>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: alternating-dgit: New test
Ian Jackson [Thu, 8 Aug 2019 11:31:46 +0000 (12:31 +0100)]
test suite: alternating-dgit: New test

This tests alternating dgit and non-dgit uploads.  These were broken
by the bug #934126 (check_for_git always returns false), in the http
rework, and not detected by the test suite (!)

This test *does* break if check_for_git always returns false.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: Use http git check for three existing tests
Ian Jackson [Thu, 8 Aug 2019 11:33:22 +0000 (12:33 +0100)]
test suite: Use http git check for three existing tests

At the very least we want at least one test which fails when
check_for_git is nobbled ad-hoc [1] to return 1.  "clone-nogit" fits
that bill (verified experimentally).

Pick two other tests to enable this for, roughly arbitrarily.
(Two tests which chain to clone-nogit are affected too.)

Of course we also want a test which fails when check_for_git falsely
returns 0.  We don't have one right now.  Coming up...

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: WWW::Curl: Double check that $response_body was set
Ian Jackson [Thu, 8 Aug 2019 11:30:56 +0000 (12:30 +0100)]
dgit: WWW::Curl: Double check that $response_body was set

We are making some assumptions about how WWW::Curl behaves. This
confess, with appropriate tests, should catch any future problems.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: WWW::Curl Set $response_body to '' explicitly
Ian Jackson [Thu, 8 Aug 2019 11:30:46 +0000 (12:30 +0100)]
dgit: WWW::Curl Set $response_body to '' explicitly

check_for_git calls url_fetch with a WWW::Curl parameter
CURLOPT_NOBODY which suppresses saving the body.  The result is that
CURLOPT_WRITEDATA does not update $response_body.  Then, even on
success, url_fetch returns undef (which ought to mean 404).

Strictly this is a bit sneaky of check_for_git.  But, rather than
trying to make this interface more formal, just make url_fetch set
$response_body to ''.  It does return this except in the success case,
so the error cases are still handled right.

Closes: #934126
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: examplegit: Call t-select-package
Ian Jackson [Thu, 8 Aug 2019 11:10:33 +0000 (12:10 +0100)]
test suite: examplegit: Call t-select-package

This can save our importers from havig to t-select-package themselves.

Drop the now-redundant call from the one importer that had it.
Various of the importers call t-archive-* or t-git-* that also call
t-select-package, but this is not a problem.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: Break out t-non-dgit-upload
Ian Jackson [Thu, 8 Aug 2019 11:32:16 +0000 (12:32 +0100)]
test suite: Break out t-non-dgit-upload

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: http-git-check: New provision
Ian Jackson [Thu, 8 Aug 2019 10:41:37 +0000 (11:41 +0100)]
test suite: http-git-check: New provision

Importing this makes us use a local http server for the git check.
It's a setup so that it can imply the http-git-check dependency.

Right now nothing imports this so no functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: Honour new DGIT_TEST_KEEP_MUSTCLEAN
Ian Jackson [Thu, 8 Aug 2019 10:38:58 +0000 (11:38 +0100)]
test suite: Honour new DGIT_TEST_KEEP_MUSTCLEAN

FTR, using this typically results in runes like

  DGIT_TEST_KEEP_MUSTCLEAN=y tests/using-intree tests/tests/ftpmasterapi-http 2>&1 | tee tests/tmp/log

hanging instead of exiting, because the http server is still running
and its stderr is still going to tee.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agotest suite: Rename http-static-server from ftpmasterapi-
Ian Jackson [Thu, 8 Aug 2019 10:10:44 +0000 (11:10 +0100)]
test suite: Rename http-static-server from ftpmasterapi-

We are going to use this for other things too.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohttp[s] tests: Add http test case
Ian Jackson [Thu, 25 Jul 2019 02:52:53 +0000 (03:52 +0100)]
http[s] tests: Add http test case

Maybe we will turn this into a TLS test case in due course.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>