chiark / gitweb /
dgit.git
13 months agodgit build: Warn if --build-products-dir is not `..'. wip
Ian Jackson [Sun, 29 Jul 2018 04:31:37 +0000 (05:31 +0100)]
dgit build: Warn if --build-products-dir is not `..'.

Closes:#904859.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit(1): Improve and correct --build-products-dir description.
Ian Jackson [Sun, 29 Jul 2018 04:27:45 +0000 (05:27 +0100)]
dgit(1): Improve and correct --build-products-dir description.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: Test dgit import-dsc --build-products-dir.
Ian Jackson [Sun, 29 Jul 2018 04:13:15 +0000 (05:13 +0100)]
test suite: Test dgit import-dsc --build-products-dir.

Add t-buildproductsdir-config to import-nonnative, which will do as a
test I think.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: lib-import-chk: Honour $bpd
Ian Jackson [Sun, 29 Jul 2018 04:06:15 +0000 (05:06 +0100)]
test suite: lib-import-chk: Honour $bpd

No functional change because none of the import tests set this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agoRemove // from inside conditionals
Ian Jackson [Sun, 29 Jul 2018 03:51:02 +0000 (04:51 +0100)]
Remove // from inside conditionals

This idiom is terse, but quite confusing.  Instead, handle the undef
case explicitly.

While we are editing these:
 * Change two internal errors from die to confess
 * Fix a die in git-debrebase which ought to be badusage

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agochangelog: start 6.2
Ian Jackson [Sun, 29 Jul 2018 02:55:52 +0000 (03:55 +0100)]
changelog: start 6.2

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agochangelog: finalise 6.1 archive/debian/6.1 debian/6.1
Sean Whitton [Sat, 28 Jul 2018 12:14:29 +0000 (20:14 +0800)]
changelog: finalise 6.1

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agochangelog: close bug requesting pbuilder support
Sean Whitton [Sat, 28 Jul 2018 12:13:26 +0000 (20:13 +0800)]
changelog: close bug requesting pbuilder support

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit(1): replace use of 'recalled'
Sean Whitton [Sat, 28 Jul 2018 10:22:29 +0000 (18:22 +0800)]
dgit(1): replace use of 'recalled'

Suggested-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit(1): don't have pbuilder description refer to sbuild description
Sean Whitton [Sat, 28 Jul 2018 10:22:08 +0000 (18:22 +0800)]
dgit(1): don't have pbuilder description refer to sbuild description

Suggested-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agotest suite: add stubbed test for pbuilder subcommand
Sean Whitton [Fri, 27 Jul 2018 06:30:13 +0000 (14:30 +0800)]
test suite: add stubbed test for pbuilder subcommand

pbuilder requires root, but we want to be able to test the subcommand
outside of autopkgtest too.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agotest suite: add t-pushed-good-check-changes
Sean Whitton [Sat, 28 Jul 2018 04:26:04 +0000 (12:26 +0800)]
test suite: add t-pushed-good-check-changes

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agotest suite: add t-push-included
Sean Whitton [Sat, 28 Jul 2018 04:26:24 +0000 (12:26 +0800)]
test suite: add t-push-included

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodebian: suggest sbuild | pbuilder | cowbuilder
Sean Whitton [Fri, 27 Jul 2018 04:35:57 +0000 (12:35 +0800)]
debian: suggest sbuild | pbuilder | cowbuilder

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit(1): document new pbuilder and cowbuilder subcommands
Sean Whitton [Fri, 27 Jul 2018 02:48:30 +0000 (10:48 +0800)]
dgit(1): document new pbuilder and cowbuilder subcommands

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: move cmd_sbuild
Sean Whitton [Sat, 28 Jul 2018 10:18:36 +0000 (18:18 +0800)]
dgit: move cmd_sbuild

No functional change.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: new 'pbuilder' and 'cowbuilder' subcommands
Sean Whitton [Fri, 27 Jul 2018 04:35:12 +0000 (12:35 +0800)]
dgit: new 'pbuilder' and 'cowbuilder' subcommands

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: remove dead $need_split_build_invocation code path
Sean Whitton [Fri, 27 Jul 2018 02:08:57 +0000 (10:08 +0800)]
dgit: remove dead $need_split_build_invocation code path

No functional change.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: factor out build_with_binary_builder()
Sean Whitton [Fri, 27 Jul 2018 04:08:53 +0000 (12:08 +0800)]
dgit: factor out build_with_binary_builder()

The pbuilder and cowbuilder subcommands will reuse this code.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: fix a reference to parent directory
Sean Whitton [Fri, 27 Jul 2018 04:40:07 +0000 (12:40 +0800)]
dgit: fix a reference to parent directory

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: set $dscfn in build_or_push_prep_early()
Sean Whitton [Fri, 27 Jul 2018 02:51:55 +0000 (10:51 +0800)]
dgit: set $dscfn in build_or_push_prep_early()

No functional change.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: opts_opt_multi_cmd: New @$extra feature
Ian Jackson [Sat, 28 Jul 2018 02:58:32 +0000 (03:58 +0100)]
dgit: opts_opt_multi_cmd: New @$extra feature

Adjust the existing call sites.  NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agoUpdate copyright years
Sean Whitton [Fri, 22 Jun 2018 07:04:35 +0000 (08:04 +0100)]
Update copyright years

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agochangelog: start 6.1
Ian Jackson [Thu, 26 Jul 2018 13:47:08 +0000 (14:47 +0100)]
changelog: start 6.1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agochangelog: finalise 6.0, and document remaining things archive/debian/6.0 debian/6.0
Ian Jackson [Thu, 26 Jul 2018 13:44:20 +0000 (14:44 +0100)]
changelog: finalise 6.0, and document remaining things

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agochangelog: categorise, and add a few missing things
Sean Whitton [Thu, 26 Jul 2018 10:10:37 +0000 (18:10 +0800)]
changelog: categorise, and add a few missing things

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: Abolish move_dsc_to_bpd
Ian Jackson [Thu, 26 Jul 2018 12:08:25 +0000 (13:08 +0100)]
dgit: Abolish move_dsc_to_bpd

This subroutine only has one caller.  It also contains a bit of
duplication both within itself and compared to its caller - the calls
to mv and its error handling - which is annoying to remove as it is.

Instead, put its code into build_source, and break out a private
subroutine $mv for the rename.

No functional change other than to messages.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: Add t-buildproductsdir-config to some sbuild tests
Ian Jackson [Thu, 26 Jul 2018 12:01:55 +0000 (13:01 +0100)]
test suite: Add t-buildproductsdir-config to some sbuild tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agoRevert "dgit: Move up $sourcechanges"
Ian Jackson [Thu, 26 Jul 2018 11:40:28 +0000 (12:40 +0100)]
Revert "dgit: Move up $sourcechanges"

This reverts commit 07437a3fe514da7990300b2fd594adff49685de5.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: Move cmd_push_source down the file
Ian Jackson [Thu, 26 Jul 2018 11:41:50 +0000 (12:41 +0100)]
dgit: Move cmd_push_source down the file

Pure code motion.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: Add a couple of t-buildproductsdir-config
Ian Jackson [Wed, 25 Jul 2018 04:34:26 +0000 (05:34 +0100)]
test suite: Add a couple of t-buildproductsdir-config

Add t-buildproductsdir-config to all build-modes tests and to
push-source.  This will probably catch almost all of the ../
bugs (#863582).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: Use $bpd in several places where it is needed
Ian Jackson [Thu, 26 Jul 2018 06:28:59 +0000 (07:28 +0100)]
test suite: Use $bpd in several places where it is needed

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: Provide a gbp.conf which sets --export-dir to $bpd
Ian Jackson [Thu, 26 Jul 2018 06:28:46 +0000 (07:28 +0100)]
test suite: Provide a gbp.conf which sets --export-dir to $bpd

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: Introduce $bpd variable (nfc)
Ian Jackson [Thu, 26 Jul 2018 06:28:30 +0000 (07:28 +0100)]
test suite: Introduce $bpd variable (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite lib: add t-buildproductsdir-config
Sean Whitton [Tue, 24 Jul 2018 03:15:56 +0000 (11:15 +0800)]
test suite lib: add t-buildproductsdir-config

No users yet so NFC.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: push_source no longer cleans the tree.
Ian Jackson [Thu, 26 Jul 2018 10:16:54 +0000 (11:16 +0100)]
dgit: push_source no longer cleans the tree.

This is no longer needed because we always build in a playtree.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: build_source mostly uses a playtree, not $maindir
Ian Jackson [Thu, 26 Jul 2018 10:08:45 +0000 (11:08 +0100)]
dgit: build_source mostly uses a playtree, not $maindir

In particular, it uses a playtree unless we are trying to include
uncommitted changes in the source package (which is not supported in
split brain mode).

This change allows build_source to respect $buildproductsdir.  It will
also enable, later, building a source package from HEAD, or arbitrary
git ref, when the working tree is dirty.

This change also requires modifying build_prep to only conditionally
clean $maindir.  It should clean $maindir only when it's $maindir that
we're packing into a source package, or when we are running any
builder in $maindir.

When we are using a playtree we must build the changes file there too,
because dpkg-genchanges cannot be persuaded to look for the .dsc
anywhere but ../.

Right now build-source still cleans the tree needlessly.

We need to change the test suite to not expect a clean unless running
a builder:

dgit now cleans the tree only when including uncommitted changes in a
source package, and when running a builder in $maindir.  The code in
lib-build-modes does not test the including of uncommitted changes in
a source package.  Thus, it should expect the tree to be cleaned only
when running a builder.

Also, we need to not expect a clean with sbuild, for the same reason.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: Drop alwayssplit tests
Ian Jackson [Thu, 26 Jul 2018 11:48:42 +0000 (12:48 +0100)]
test suite: Drop alwayssplit tests

Since
  dgit: make $need_split_build_invocation always true
this option has had no effect, so these tests are redundant.

And change the comment in dgit near the option parsing.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: quilt-splitbrains: Drop non-wgf dpm test of gbp package
Ian Jackson [Thu, 26 Jul 2018 07:55:32 +0000 (08:55 +0100)]
test suite: quilt-splitbrains: Drop non-wgf dpm test of gbp package

Soon, dgit push-source will no longer clean the tree.  So this test
will be of no use.  Also, it will fail because the error message changes.

Delete it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: build_prep: Provide it with $wantsrc
Ian Jackson [Thu, 26 Jul 2018 09:36:01 +0000 (10:36 +0100)]
dgit: build_prep: Provide it with $wantsrc

No functional change yet as it doesn't use it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: build_source: drop call to build_prep
Ian Jackson [Thu, 26 Jul 2018 07:09:32 +0000 (08:09 +0100)]
dgit: build_source: drop call to build_prep

We want the callers to do this so they can control it better.  They
mostly already do.  In detail:

* cmd_push_source

  This one is most complicated.  It already calls prep_push, which
  does a variety of things which overlap with build_prep.  The things
  which are in build_prep but not in prep_push are:
   - notpushing (via build_prep_early), which seems to be a mistake
   - clean_tree(), which is needed, so we add it (for now...)
   - build_maybe_quilt_fixup, which is needed, so we add it
   - remove old changes, which is not actually needed

* cmd_build, cmd_gbp_build

  build_prep was already called by the if arm which didn't call
  build_source; so we can just move it up outside the if.  No
  functional change here.

* cmd_build_source, cmd_sbuild

  We need to replace the call.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: build_source: Drop call to build_prep_early
Ian Jackson [Thu, 26 Jul 2018 07:02:09 +0000 (08:02 +0100)]
dgit: build_source: Drop call to build_prep_early

build_prep starts with a call to build_prep_early so this is redundant
(and confusing).

Effect is to sometimes no longer duplicate some effort.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: Abolish build_source_for_push
Ian Jackson [Thu, 26 Jul 2018 06:59:30 +0000 (07:59 +0100)]
dgit: Abolish build_source_for_push

This sub has only one caller and the indirection is not really
helpful IMO.

NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: build_source_for_push does not try to unapply patches
Sean Whitton [Wed, 25 Jul 2018 11:36:52 +0000 (19:36 +0800)]
dgit: build_source_for_push does not try to unapply patches

build_source_for_push should now always build in a worktree, so
patches should never be applied dirtily to $maindir.  Die if it turns
out they were.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: Move up $sourcechanges
Ian Jackson [Thu, 26 Jul 2018 07:20:54 +0000 (08:20 +0100)]
dgit: Move up $sourcechanges

This is not really ideal, but cmd_push_source needs it.  For now do it
like this.  I may move cmd_push_source further down the file, later,
and then we can revert this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: Support run-all -p, DGIT_TESTS_PROGRESSIVE
Ian Jackson [Thu, 26 Jul 2018 05:36:51 +0000 (06:36 +0100)]
test suite: Support run-all -p, DGIT_TESTS_PROGRESSIVE

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: Drop dependency arrangement for tests/tmp
Ian Jackson [Thu, 26 Jul 2018 08:56:37 +0000 (09:56 +0100)]
test suite: Drop dependency arrangement for tests/tmp

run-all makes the directory now adays so this is not needed.  It's
going to be harmful for --progressive, since it would make make want
to rerun things every time tests/tmp/ is updated.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: run-all: Minor refactoring etc.
Ian Jackson [Thu, 26 Jul 2018 05:35:31 +0000 (06:35 +0100)]
test suite: run-all: Minor refactoring etc.

* Makefile: Move the DGIT_TEST_RETRY_COUNT if/else into the rule.
  This removes a small amount of duplication.

* run-all: Document the option to pass explicitly list of scripts.

* run-all: Add an option parser, which currently supports no options.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: Honour DGIT_SCHROOT_CHROOT to set the schroot to use for the sbuild tests.
Ian Jackson [Thu, 26 Jul 2018 04:00:51 +0000 (05:00 +0100)]
test suite: Honour DGIT_SCHROOT_CHROOT to set the schroot to use for the sbuild tests.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: make $need_split_build_invocation always true
Sean Whitton [Wed, 25 Jul 2018 13:05:28 +0000 (21:05 +0800)]
dgit: make $need_split_build_invocation always true

dgit will always build the source package.

One minor consequence is that dgit will usualliy generate
*_multi.changes rather than *_$arch.changes, so we need to update the
one test that makes the contrary assumption.

Bump the dgit major version number as this is quite a significant
change in implementation and also a behavioural change.

This change makes a lot of code dead.  Removing that is left as a task
for the future.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: Move WANTSRC_* definitions up the file
Ian Jackson [Wed, 25 Jul 2018 14:11:04 +0000 (15:11 +0100)]
dgit: Move WANTSRC_* definitions up the file

We are going to want these a bit earlier.  NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: Disregard *_multi.changes for .changes ambiguity purposes
Ian Jackson [Thu, 26 Jul 2018 02:15:24 +0000 (03:15 +0100)]
dgit: Disregard *_multi.changes for .changes ambiguity purposes

The changes file ambiguity problem arises because dgit does not know
what architecture changes file the build is going to generate.  (To
know that it would have to delve even more into the command line
options the user is passing through dgit to the builder.)

dgit --always-split-build generally makes a _multi.changes file,
because it merges source changes with binaries from the build.  We are
going to make --always-split-build the only way things are done.  This
would result in lots more situations where --rm-old-changes is needed.

However, actually, we can assume that the builder does not generate a
*_multi.changes.  That will allow us to spot the builder-generated
changes file even if there is already a dgit-generated *_multi.changes
file from a previous build.

So: disregard _multi.changes, both when pre-checking for confusing
files, and when actually figuring out what the build produced.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: push-source dies if user tried to include uncommitted changes
Sean Whitton [Wed, 25 Jul 2018 11:34:56 +0000 (19:34 +0800)]
dgit: push-source dies if user tried to include uncommitted changes

This does not make sense because you cannot dgit push uncommitted
changes.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: don't let the user pass --include-dirty in split brain mode
Sean Whitton [Wed, 25 Jul 2018 13:04:00 +0000 (21:04 +0800)]
dgit: don't let the user pass --include-dirty in split brain mode

It is not supported.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: Rename --ignore-dirty to --include-dirty
Ian Jackson [Thu, 26 Jul 2018 03:22:42 +0000 (04:22 +0100)]
dgit: Rename --ignore-dirty to --include-dirty

Leaving the old name supported as a deprecated alias.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: linkorigs: Fix error handling when bpd missing
Ian Jackson [Thu, 26 Jul 2018 03:11:10 +0000 (04:11 +0100)]
dgit: linkorigs: Fix error handling when bpd missing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: bpd_abs(): Fix return value when bpd is absolute.
Ian Jackson [Thu, 26 Jul 2018 03:10:47 +0000 (04:10 +0100)]
dgit: bpd_abs(): Fix return value when bpd is absolute.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: massage_dbp_args: Make names for $wantsrc values
Ian Jackson [Wed, 25 Jul 2018 13:59:27 +0000 (14:59 +0100)]
dgit: massage_dbp_args: Make names for $wantsrc values

   0 - source will NOT need to be built separately by caller
  +1 - source will need to be built separately by caller
  +2 - source will need to be built separately by caller AND

So:

   0 => WANTSRC_BUILDER
  +1 => WANTSRC_SOURCE | WANTSRC_BUILDER
  +2 => WANTSRC_SOURCE

No functional change except to debugging output.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agochangelog: Document some recent changes
Ian Jackson [Wed, 25 Jul 2018 09:46:44 +0000 (10:46 +0100)]
changelog: Document some recent changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: rename $ignoredirty -> $includedirty
Sean Whitton [Wed, 25 Jul 2018 09:17:08 +0000 (17:17 +0800)]
dgit: rename $ignoredirty -> $includedirty

This better reflects the effects that the option has.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: rename two quilt_fixup_ functions
Sean Whitton [Thu, 28 Jun 2018 10:25:56 +0000 (11:25 +0100)]
dgit: rename two quilt_fixup_ functions

They are useful for doing things other than quilt fixup.

No functional change.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
13 months agodgit: actually respect $buildproductsdir in many places
Sean Whitton [Wed, 25 Jul 2018 09:02:16 +0000 (10:02 +0100)]
dgit: actually respect $buildproductsdir in many places

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: Provide $bpd_glob
Ian Jackson [Wed, 25 Jul 2018 09:01:28 +0000 (10:01 +0100)]
dgit: Provide $bpd_glob

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agodgit: add dgit.default.build-products-dir git configuration key
Sean Whitton [Mon, 23 Jul 2018 04:10:02 +0000 (12:10 +0800)]
dgit: add dgit.default.build-products-dir git configuration key

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agomessages: Be a lot more friendly about NEW in particular
Ian Jackson [Wed, 25 Jul 2018 06:23:18 +0000 (07:23 +0100)]
messages: Be a lot more friendly about NEW in particular

And also add a couple of `please's.  Closes:#904448.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agoapt-get method: when apt does not update release files, print hint
Ian Jackson [Mon, 23 Jul 2018 10:00:09 +0000 (11:00 +0100)]
apt-get method: when apt does not update release files, print hint

Unconditionally print hint about noatime.  This problem seems to occur
quite rarely (noatime is out of fashion nowadays, and I haven't seen
any other causes) so it doesn't seem worth fiddling about writing code
to determine the mount options.  Instead, print a hint and let the
user investigate.

Closes:#851873.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
13 months agotest suite: unset VISUAL, which interferes.
Ian Jackson [Mon, 23 Jul 2018 09:38:30 +0000 (10:38 +0100)]
test suite: unset VISUAL, which interferes.

Closes:#904308.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agochangelog: start 5.11
Ian Jackson [Sat, 14 Jul 2018 17:13:49 +0000 (18:13 +0100)]
changelog: start 5.11

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agochangelog: finalise 5.10 archive/debian/5.10 debian/5.10
Ian Jackson [Sat, 14 Jul 2018 17:07:16 +0000 (18:07 +0100)]
changelog: finalise 5.10

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoinfrastructure: Run git gc --auto before mirroring. Closes:#841414.
Ian Jackson [Sat, 14 Jul 2018 16:23:37 +0000 (17:23 +0100)]
infrastructure: Run git gc --auto before mirroring.  Closes:#841414.

This would not have avoided the trouble reported here
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841414#74

Empirically, I managed to work around the problem by running `git gc'
(rather than `git gc --auto') and then rsyncing the result to the
mirror.  I will request that DSA increase the RAM (or swap) size on
the relevant host.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: Drop a couple of useless test log output lines.
Ian Jackson [Sat, 14 Jul 2018 15:58:04 +0000 (16:58 +0100)]
test suite: Drop a couple of useless test log output lines.

We don't need these (((((((((( )))))))))) now that it's just one line
inside them.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agochangelog: rework for merging experimental tests into master
Ian Jackson [Sat, 14 Jul 2018 15:57:17 +0000 (16:57 +0100)]
changelog: rework for merging experimental tests into master

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agochangelog: finalise 5.9+exp4 archive/debian/5.9+exp4 debian/5.9+exp4
Ian Jackson [Fri, 13 Jul 2018 11:10:37 +0000 (12:10 +0100)]
changelog: finalise 5.9+exp4

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: tar up the artifacts, and name the tarball after the test
Ian Jackson [Fri, 13 Jul 2018 10:38:36 +0000 (11:38 +0100)]
test suite: tar up the artifacts, and name the tarball after the test

Naming the output after the test works around #903696.

tarring the whole lot up turns out to make it a lot smaller.
Before:
    $ du -sk ; du -sk --apparent-size
    1640    .
    853     .
After:
    236     .
    235     .

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: chmod a+r $AUTOPKGTEST explicitly. archive/debian/5.9+exp3 debian/5.9+exp3
Ian Jackson [Thu, 12 Jul 2018 23:54:27 +0000 (00:54 +0100)]
test suite: chmod a+r $AUTOPKGTEST explicitly.

14 months agotest suite: Do not save non-world-readable artifacts archive/debian/5.9+exp2 debian/5.9+exp2
Ian Jackson [Thu, 12 Jul 2018 23:42:26 +0000 (00:42 +0100)]
test suite: Do not save non-world-readable artifacts

Save things to $AUTOPKGTEST_ARTIFACTS without preserving access
control information.

Works around #903680.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agochangelog: finalise 5.9+exp1 archive/debian/5.9+exp1 debian/5.9+exp1
Ian Jackson [Thu, 12 Jul 2018 12:45:17 +0000 (13:45 +0100)]
changelog: finalise 5.9+exp1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: Save much stuff to $AUTOPKGTEST_ARTIFACTS.
Ian Jackson [Thu, 12 Jul 2018 11:57:32 +0000 (12:57 +0100)]
test suite: Save much stuff to $AUTOPKGTEST_ARTIFACTS.

We take some care to make this of reasonable size.  In particular,
we delete raw tarballs (typically, IMPORT) and .git's sample hooks.

And, we git gc the git trees.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: Introduce playtree-save-refs
Ian Jackson [Thu, 12 Jul 2018 12:32:11 +0000 (13:32 +0100)]
test suite: Introduce playtree-save-refs

Arranges for all the refs in each playtree to be saved in the parent's
ref namespace.

This is going to be used when running git-gc when saving artifacts.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: Drop t-ok from setup/*
Ian Jackson [Thu, 12 Jul 2018 12:27:19 +0000 (13:27 +0100)]
test suite: Drop t-ok from setup/*

t-ok is going to save artifacts, which we don't want these to do.

It is not actually needed.  All it does that is useful is the fsck,
which the actual tests will do.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: Use dch -r -D sid '' not dch -r sid.
Ian Jackson [Thu, 12 Jul 2018 11:48:32 +0000 (12:48 +0100)]
test suite: Use  dch -r -D sid ''  not  dch -r sid.

Bizarrely,
   dch -r [-D suite]
runs $EDITOR but
   dch -r [-D suite] weevils
ignores `weevils' but does not run $EDITOR.  This is #903598.

Apparently, this is well known, and convention is to pass ''.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903598#8.

So use that.

Closes:#903441.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: Factor out t-dch-commit-r
Ian Jackson [Thu, 12 Jul 2018 11:37:45 +0000 (12:37 +0100)]
test suite: Factor out t-dch-commit-r

The pattern `dch -r sid' is actually wrong and we will want to change
it.  See #903441 and #903598.  For future-proofing, factor this out
before we fix it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agochangelog: start 5.9+exp1
Ian Jackson [Thu, 12 Jul 2018 12:43:07 +0000 (13:43 +0100)]
changelog: start 5.9+exp1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agochangelog: finalise 5.9 archive/debian/5.9 debian/5.9
Ian Jackson [Thu, 12 Jul 2018 12:37:29 +0000 (13:37 +0100)]
changelog: finalise 5.9

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): Suggest `gitk -- :.' too
Ian Jackson [Mon, 9 Jul 2018 00:21:11 +0000 (01:21 +0100)]
git-debrebase(5): Suggest `gitk -- :.' too

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): Document best gitk options. Closes:#901927.
Ian Jackson [Sun, 8 Jul 2018 23:53:54 +0000 (00:53 +0100)]
git-debrebase(5): Document best gitk options.  Closes:#901927.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase(5): Add new subsection DISCUSSION
Ian Jackson [Sun, 8 Jul 2018 23:51:19 +0000 (00:51 +0100)]
git-debrebase(5): Add new subsection DISCUSSION

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoNOTES.dgit-downstream-dsc.7.pod: WIP for #810829
Ian Jackson [Sun, 8 Jul 2018 23:47:02 +0000 (00:47 +0100)]
NOTES.dgit-downstream-dsc.7.pod: WIP for #810829

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agodgit-downstream-dsc(7): New manpage.
Ian Jackson [Sun, 8 Jul 2018 23:44:09 +0000 (00:44 +0100)]
dgit-downstream-dsc(7): New manpage.

Closes:#842643,#851194.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agochangelog: Document reorganisations
Ian Jackson [Sun, 8 Jul 2018 23:30:23 +0000 (00:30 +0100)]
changelog: Document reorganisations

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agotest suite: gdr-convert-gbp: drop --overwrite
Ian Jackson [Sun, 8 Jul 2018 17:37:56 +0000 (18:37 +0100)]
test suite: gdr-convert-gbp: drop --overwrite

With #903132 properly fixed, this is no longer needed.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase convert-from-gbp: Add ffq check
Ian Jackson [Sun, 8 Jul 2018 19:05:26 +0000 (20:05 +0100)]
git-debrebase convert-from-gbp: Add ffq check

Check that the result will not count as having diverged.  This will
usually turn failures to make the ff pseudomerge into -fdiverged.

Related to #903132.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase convert-from-gbp: Make it ff of dgit view, if we can.
Ian Jackson [Sun, 8 Jul 2018 17:37:34 +0000 (18:37 +0100)]
git-debrebase convert-from-gbp: Make it ff of dgit view, if we can.

Look for dgit-generated tags so we can usually make the new branch ff
of the dgit view.

Specifically, we fish the most recent released version out of
debian/changelog and look for a DISTRO/VSN tag and a corresponding
archive/DISTRO/VSN tag.  If this all looks good, we declare ff of
archive/.

This should avoid the need for dgit push --overwrite in most cases.

We do not check the DISTRO name.  In principle dgit could find the
distro name from the suite name, but that makes the software layering
quite complicated.  (For example, we would have to provide a way to
tell gdr what program to run for dgit, for the benefit of the test
suite.)  I think the current approach is good enough; there are not
likely to be any tag pairs that look like the right kind of thing but
are in fact something else entirely, so we're not likely to
accidentally trash some wanted changes.

Closes:#903132.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Set $|
Ian Jackson [Sun, 8 Jul 2018 22:57:01 +0000 (23:57 +0100)]
git-debrebase: Set $|

This will avoid pepeering everything with calls to flush.  Without it
some messages from ffq_check, say, can arrive after the stderr output
from a subsequent snags_maybe_bail, which is quite confusing.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Provide snags_maybe_bail_early
Ian Jackson [Sun, 8 Jul 2018 18:43:06 +0000 (19:43 +0100)]
git-debrebase: Provide snags_maybe_bail_early

No callers yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: Replace `die badusage' with `badusage'.
Ian Jackson [Sun, 8 Jul 2018 18:42:08 +0000 (19:42 +0100)]
git-debrebase: Replace `die badusage' with `badusage'.

badusage contains a call to finish.  So the die is redundant and never
gets called.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agogit-debrebase: ffq_check: Move defaults for $ff and $notff into sub
Ian Jackson [Sun, 8 Jul 2018 18:40:35 +0000 (19:40 +0100)]
git-debrebase: ffq_check: Move defaults for $ff and $notff into sub

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoDgit.pm: Move debinatag_maintview from dgit
Ian Jackson [Sun, 8 Jul 2018 17:32:09 +0000 (18:32 +0100)]
Dgit.pm: Move debinatag_maintview from dgit

git-debrebase is about to want this for convert-from-gbp dgit split
brain fixup.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoDgit.pm: Break out parsechangelog_loop from dgit
Ian Jackson [Sun, 8 Jul 2018 19:01:50 +0000 (20:01 +0100)]
Dgit.pm: Break out parsechangelog_loop from dgit

git-debrebase is going to want this.

No functional change except to some debugging messages.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
14 months agoDgit.pm: Move parsecontrol etc. out of dgit
Ian Jackson [Sun, 8 Jul 2018 18:51:39 +0000 (19:51 +0100)]
Dgit.pm: Move parsecontrol etc. out of dgit

No functional change.

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