chiark / gitweb /
Ian Jackson [Sat, 16 Jul 2016 11:52:47 +0000 (12:52 +0100)]
Test suite: t-gbp-example-prep: Arrange to be FF from the archive
Otherwise pushes will necessarily (spuriously) fail.
Ian Jackson [Sat, 16 Jul 2016 11:52:05 +0000 (12:52 +0100)]
When synthesing a commit from a .dsc from the archive, stop internal git reset from printing a confusing message about HEAD.
Ian Jackson [Sat, 16 Jul 2016 11:33:51 +0000 (12:33 +0100)]
Split brain: Use GZIP -1n to avoid spurious timestamp
Otherwise the cache entry's .dsc contains the hash of a fake
debian.tar.gz which has had a timestamp put in it by gzip, defeating
the cache.
Ian Jackson [Sat, 16 Jul 2016 11:33:31 +0000 (12:33 +0100)]
Split brain: Improve and rationalise progress messages
Ian Jackson [Sat, 16 Jul 2016 11:30:42 +0000 (12:30 +0100)]
Split brain: Provide --gbp= and --gbp:
Not documented yet.
Ian Jackson [Sat, 16 Jul 2016 10:54:45 +0000 (11:54 +0100)]
Split brain: With patches-unapplied trees, apply before running rules
Everywhere we invoke dpkg-buildpackage, check if we need to apply the
patches. And at the end of every command that might have done this,
check if we did, and unapply them if so.
We don't try to unapply patches in case of error. That seems likely
to be quite fragile.
Print a warning when we apply patches, suggesting ways to avoid the
need.
Ian Jackson [Sat, 16 Jul 2016 10:54:06 +0000 (11:54 +0100)]
Split brain: Show progress message when dgit view created OK
Ian Jackson [Sat, 16 Jul 2016 10:53:08 +0000 (11:53 +0100)]
Split brain: Do not leave STDOUT redirected to /dev/null (!)
We use runcmd shell_cmd for gbp pq import, and the other commands not
produce undesirable output.
Ian Jackson [Sat, 16 Jul 2016 10:39:05 +0000 (11:39 +0100)]
Split brain: Use `gbp pq' (which exists) not `gbp-pq' (which doesn't)
Ian Jackson [Sun, 10 Jul 2016 18:48:47 +0000 (19:48 +0100)]
Test suite: unapplied-pq2qc: leave us on the qc/ branch
The patch queue branch is not really very useful. Certainly, the
build tests will require the patch queue branch.
Ian Jackson [Sun, 10 Jul 2016 18:47:57 +0000 (19:47 +0100)]
Split brain: Include quilt mode in cache key
This can make a radical difference!
Ian Jackson [Sun, 10 Jul 2016 18:46:40 +0000 (19:46 +0100)]
Split brain: Fix unapplied tree handling
Do the quiltify_splitbrain_needed if there _are_ patches, not if there
aren't. And if we're told it was an unapplied tree, check that HEAD
and orig are indeed the same (excluding debian/*, of course) and print
a useful message if not.
Ian Jackson [Sun, 3 Jul 2016 23:30:46 +0000 (00:30 +0100)]
Test suite: When sbuild log file missing, make a note
This updates "Test suite: When sbuild fails, do not crash", to arrange
that in this situation we do leave a message in the $bmlog, where it
will be reported (eg) by diff. This makes debugging less confusing in
cases where the log is indeed missing.
Ian Jackson [Sat, 16 Jul 2016 14:57:01 +0000 (15:57 +0100)]
Test suite: Provide t-gbp-example-prep [FOLD INTO QUILT-GBP TEST?]
This function is useful for setting up a test case --quilt=gbp working
tree and corresponding archive contents, ready for substantive tests.
Ian Jackson [Sun, 3 Jul 2016 23:00:55 +0000 (00:00 +0100)]
Test suite: Move bm-quirk-sbuild-after-act to lib-build-modes
This will allow other tests to check dgit sbuild.
Ian Jackson [Sun, 3 Jul 2016 22:57:50 +0000 (23:57 +0100)]
Test suite: build-modes: Move sbuild knowledge to lib
Teach bm-guess-e-source-e-targets about sbuild, so this knowledge can
be reused.
Ian Jackson [Sun, 3 Jul 2016 22:56:50 +0000 (23:56 +0100)]
Test suite: build-modes: Move `build-source' knowledge to lib
Teach bm-guess-e-source-e-targets about dgit build-source, so this
knowledge can be reused.
Ian Jackson [Sun, 3 Jul 2016 22:55:47 +0000 (23:55 +0100)]
Test suite: Break out bm-prep-ownpackage-branches
We are going to want to run some build modes tests on other exciting
trees.
Ian Jackson [Sat, 16 Jul 2016 14:53:41 +0000 (15:53 +0100)]
Test suite: quilt gbp: Provide example worktree tarball
This working tree has some patch queues etc. in it, which will be
useful for testing --quilt=gbp.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 19 Jun 2016 15:16:12 +0000 (16:16 +0100)]
Test suite: unapplied-pq2qc: move into lib as a t- subroutine
Ian Jackson [Sat, 4 Jun 2016 21:22:41 +0000 (22:22 +0100)]
Test suite: Provide tests/unapplied-pq2qc
Utility script for invoking gbp pq. I think I will want to swallow
this into a t-* function in tests/lib.
Ian Jackson [Mon, 7 Dec 2015 00:45:21 +0000 (00:45 +0000)]
Provide 3.0 (quilt) patches-unapplied with .gitignore test case
Ian Jackson [Sun, 6 Dec 2015 23:36:24 +0000 (23:36 +0000)]
Split build: Add a bit more debugging output
Ian Jackson [Sun, 6 Dec 2015 20:58:13 +0000 (20:58 +0000)]
Split brain: Run source build in dgit view directory
And, after the source build is done, copy the resulting files out into
the invocation directory's parent, where people expect to find them.
Ian Jackson [Sun, 6 Dec 2015 20:12:20 +0000 (20:12 +0000)]
Split build: Split clean from source build in split build mode
Ian Jackson [Sat, 28 Nov 2015 17:43:33 +0000 (17:43 +0000)]
Split brain: some work on integration into the rest of dgit
* Move the fast forward die to where we will need to make the
synthetic commit, so that the tree equality check is done on the
thing we will actually push.
* Crash if we are trying to do split brain without split build.
(This should never happen.)
* Set split build if we need split brain.
Ian Jackson [Sat, 4 Jun 2016 17:31:53 +0000 (18:31 +0100)]
dgit: Rename $suppress_clean to $clean_using_builder (nfc)
This variable name was very confusing. Also, add a comment explaining
the semantics.
Ian Jackson [Sun, 6 Dec 2015 20:57:55 +0000 (20:57 +0000)]
Split brain: Quieten dgit-view checkout
Ian Jackson [Sun, 29 Nov 2015 18:29:42 +0000 (18:29 +0000)]
Split brain: introduce quiltmode_splitbrain() (nfc)
Ian Jackson [Sat, 4 Jun 2016 16:10:17 +0000 (17:10 +0100)]
Split brain: Memoise (cache) split brain dgit-view in a reflog
Ian Jackson [Sat, 28 Nov 2015 17:40:53 +0000 (17:40 +0000)]
Split brain: Actually get gbp pq output back onto dgit-view branch
And explain why in a comment.
Ian Jackson [Sat, 4 Jun 2016 16:08:23 +0000 (17:08 +0100)]
Split brain: Transfer gbp-pq patch application output to dgit-view branch
This code does not work properly yet; it will be fixed soon.
Ian Jackson [Sat, 4 Jun 2016 16:03:41 +0000 (17:03 +0100)]
Split brain: Generate .gitignore patch in deterministic order
Ian Jackson [Sat, 4 Jun 2016 16:01:40 +0000 (17:01 +0100)]
Split brain: Actually generate .gitignore patch
Close our FH onto the file, and run git diff to fill it with the
actual diff. Add the file to series. Use git add and git commit to
commit the patch to the private git branch.
Now most of the code to generate the .gitignore properly is present, I
think, but not debugged.
Ian Jackson [Sat, 4 Jun 2016 16:00:51 +0000 (17:00 +0100)]
Split brain: Create debian/patches in case it does not exist
When we need to make the .gitignore patch, there may not yet be any
debian/patches directory.
Ian Jackson [Sat, 4 Jun 2016 16:00:08 +0000 (17:00 +0100)]
Split brain: Add [dgit version ] tag to autogenerated .gitignore patch header
So far we still don't generate the patch.
Ian Jackson [Sat, 4 Jun 2016 15:59:26 +0000 (16:59 +0100)]
Split brain: Provide a lot more information to quiltify_splitbrain (nfc)
It is going to need this extra info in a moment.
Ian Jackson [Sat, 4 Jun 2016 15:57:35 +0000 (16:57 +0100)]
Split brain: Provide optional $ignorenamesr argument to quiltify_trees_differ
We are going to need this information to construct the substantive
diff for the .gitignores patch.
Ian Jackson [Sat, 4 Jun 2016 15:56:06 +0000 (16:56 +0100)]
Split brain: quiltify_trees_differ: document $ignorenamesr
Ian Jackson [Wed, 25 Nov 2015 22:44:45 +0000 (22:44 +0000)]
Split brain: Print $unapplied tree hash to debug log, too
Ian Jackson [Sat, 4 Jun 2016 15:49:20 +0000 (16:49 +0100)]
Split brain: Start work on generating gitignore patch
Generate a patch header, for now. Still not finished.
Ian Jackson [Sat, 4 Jun 2016 15:48:43 +0000 (16:48 +0100)]
Split brain: Move GIT_COMMITTER_* setting to quiltify_splitbrain toplevel (nfc)
We want this to apply to any commits we use git to make, not just
gbp-pq.
Ian Jackson [Sat, 4 Jun 2016 15:45:06 +0000 (16:45 +0100)]
Split brain: Further improvements to split brain patch application
* Direct gbp-pq's stdout to /dev/null
* Specify GIT_COMMITER_* so that the results are reproducible
* Detect .gitignore problem
Ian Jackson [Sat, 4 Jun 2016 15:44:19 +0000 (16:44 +0100)]
Split brain: Pass $clogp to quiltify_splitbrain (nfc)
We are going to want this in a moment.
Ian Jackson [Thu, 19 Nov 2015 01:10:47 +0000 (01:10 +0000)]
Split brain: Make clogp_authline capable of returning individual pieces (nfc)
We are going to want this (so that we can set GIT_... variables to the
pieces to make git construct commits the way we want).
Both current call sites provide scalar context, so no functional
change.
Ian Jackson [Thu, 19 Nov 2015 01:10:23 +0000 (01:10 +0000)]
Split brain: Break out $git_authline_re
This will make it a bit easier to reuse it. Actually AFAICT it turns
out (looking at the rest of the branch) that this is not needed, but
it's nicer for the future I think.
Ian Jackson [Thu, 19 Nov 2015 00:32:00 +0000 (00:32 +0000)]
Split brain: Start work on determining split brain necessity
`Split brain' means the situation where `dgit push' makes private
commits, to push to the dgit repos server, which are not left on the
user's actual branch.
Check whether the quilt mode and tree differences, taken together,
mean that we need split brain.
If we do need split brain, use gbp pq to apply the patch series.
.gitignore changes are mishandled, still. And we don't actually
follow through much yet.
Also, fix a case where quilt mode `apply' hadn't been changed to
`unapplied'.
Ian Jackson [Wed, 18 Nov 2015 18:59:35 +0000 (18:59 +0000)]
Split brain: Introduce $diffbits (nfc)
Replace ${user,{,un}applied}2${,un}applied with $diffbits->{[HOA]2[HOA]}
This encapsulates the info it nicely and makes it easy to pass
it to quiltify_splitbrain, which is going to need it.
Ian Jackson [Sat, 4 Jun 2016 11:58:32 +0000 (12:58 +0100)]
Split brain: quiltify_trees_differ: Improve doc comment
Ian Jackson [Tue, 17 Nov 2015 01:28:04 +0000 (01:28 +0000)]
Split brain: Rename quilt mode `apply' to `unapplied'
Ian Jackson [Sat, 4 Jun 2016 14:25:23 +0000 (15:25 +0100)]
Split brain: Start introducing gbp (split brain) quilt mode
* Replace quilt_could_gbp with new calculation based on three calls to
quiltify_trees_differ.
* Reworked messages about quilt differences.
* Start to provide the `gbp', `apply' and `dpm' quilt modes.
Currently we crash with a die if any of these are used.
Nevertheless, we allow `gbp' and `apply' to be specified.
Ian Jackson [Sat, 4 Jun 2016 14:04:28 +0000 (15:04 +0100)]
Split brain: Make quiltify_trees_differ cleverer
Have it be able to explain what was different, by returning a bitmask.
Update the call sites.
Incidentally, fix a bug where .gitignores other than in the toplevel
would not be ignored when they ought to have been.
Ian Jackson [Sat, 4 Jun 2016 11:47:36 +0000 (12:47 +0100)]
Split brain: Include debian/tests/control in fake dsc
Found this in a commit "WIP SPLIT BRAIN NEW DIFFS SEEM GOOD". Not
sure why (I thought) it was needed. Maybe it should be reverted, but
it's probably harmless.
Ian Jackson [Sat, 4 Jun 2016 11:41:23 +0000 (12:41 +0100)]
Split brain: Improve quiltify() message
Actually --quilt=gbp and --quilt=unapplied (well, what's called
--quilt=apply here) aren't going to be quite identical.
Ian Jackson [Mon, 16 Nov 2015 23:05:55 +0000 (23:05 +0000)]
Split brain: Move $oldtiptree calculation out of quiltify (nfc)
And pass the result as an argument. Code outside quiltify is going
to want this information.
Ian Jackson [Sat, 4 Jun 2016 11:23:16 +0000 (12:23 +0100)]
Split brain: Detect patches-unapplied tree and print a suitable message
Note that the message refers to `--quilt=gbp' aka `--quilt=apply'
which do not exist yet (and which we're going to call something else,
later in this series). Oh well.
Ian Jackson [Sat, 4 Jun 2016 11:22:03 +0000 (12:22 +0100)]
Split brain: quiltify_trees_differ supports $ignoregitignore (nfc)
We are going to want to handle this specially.
Ian Jackson [Sat, 4 Jun 2016 11:19:21 +0000 (12:19 +0100)]
Split brain: Rename $origtree to $unapplied (nfc)
This is clearer.
Ian Jackson [Sat, 4 Jun 2016 10:44:47 +0000 (11:44 +0100)]
Split brain: Capture patches-unapplied tree object
No functional change as yet. But, now the correct value for $origtree
is passed to quiltify.
Ian Jackson [Sat, 4 Jun 2016 10:40:06 +0000 (11:40 +0100)]
Split brain: Run dpkg-source --before-build separately (nfc)
We are going to want to capture the patches-unapplied state of the
tree as a git tree object. So split out the patch application part of
the fake .dsc extraction.
No functional change as yet.
Ian Jackson [Sat, 4 Jun 2016 10:36:22 +0000 (11:36 +0100)]
Split brain: Fake .dsc contains d/control and d/changelog too
We will want these because we're going to be doing more exciting
dpkg-source and gbp operations etc.
Ian Jackson [Sat, 4 Jun 2016 10:35:58 +0000 (11:35 +0100)]
Split brain: Add $origtree argument to quiltify (nfc)
Currently not used, nor any sensible value passed.
Ian Jackson [Sun, 8 Nov 2015 23:00:15 +0000 (23:00 +0000)]
Split brain: Document the plan
Ian Jackson [Sun, 8 Nov 2015 22:59:46 +0000 (22:59 +0000)]
Split brain: Make git tree in fake sooner (nfc)
No overall functional change.
Ian Jackson [Sun, 8 Nov 2015 15:13:36 +0000 (15:13 +0000)]
Split brain: Make prep_ud be able to make a different dir (nfc)
We will want this later. No users yet, so no functional change.
Ian Jackson [Wed, 18 May 2016 20:21:03 +0000 (21:21 +0100)]
dgit: Add a comment about reason for commit_quilty_patch in push
Ian Jackson [Sat, 4 Jun 2016 18:46:42 +0000 (19:46 +0100)]
Test dgit-repos-policy-debian with multiple (identical, as it happens) existing taints.
Ian Jackson [Sat, 4 Jun 2016 18:46:07 +0000 (19:46 +0100)]
dgit-repos-policy-debian.: fix git-cat-file-handling with multiple taints in db (!).
Ian Jackson [Sat, 4 Jun 2016 18:45:12 +0000 (19:45 +0100)]
dgit-repos-policy-debian: Better error handling
Show more info when git-cat-file --batch goes wrong
Ian Jackson [Sat, 4 Jun 2016 17:56:59 +0000 (18:56 +0100)]
debian/changelog: Fix a formatting bug
Ian Jackson [Sat, 28 Nov 2015 15:56:10 +0000 (15:56 +0000)]
Dgit.pm: Provide hashfile()
Call site(s) will come later.
Ian Jackson [Sat, 7 Nov 2015 17:28:10 +0000 (17:28 +0000)]
Test suite: Provide test for nonexistent --always-split-source-build
We are going to introduce this option soon. It is not supposed to
actually have very much overall effect, although it will replumb the
way dgit goes about making the source package.
So the tests are just the same as the normal tests only with the
additional option.
Ian Jackson [Fri, 21 Aug 2015 16:27:40 +0000 (17:27 +0100)]
dgit: Internal change: Support forcing split source builds
We are going to start handling weirder kinds of git tree, which will
require a kind of `split brain': the dgit-using maintainer's view will
be a git tree which is not a dgit git tree. dgit will convert them
during push.
For this to work we will have to have dgit always (in these cases)
generate the source package itself (with a separate invocation of
dpkg-source). This will involve some dis- and re-entangling of the
way we generate arguments to dpkg-buildpackage.
We can profitably split this up into this pre-patch, which has no
overall functional change for normal users.
We do here provide a new --always-split-source-build option which
allows the new approach to be explicitly requested. This allows us to
use the test suite to not only test that we didn't break any of the
existing building strategies, but also that the new strategies all do
what we expect.
But this option is not really semantically useful for users so we do
not document it.
Ian Jackson [Sun, 3 Jul 2016 22:12:02 +0000 (23:12 +0100)]
Test suite: tartree-edit: document gitfetchinfo-merge in usage message
Ian Jackson [Sun, 3 Jul 2016 22:01:25 +0000 (23:01 +0100)]
Test suite: run-all should use make -k
Otherwise one failure causes the tests to be abandoned, which is not
usually desirable.
Ian Jackson [Sun, 3 Jul 2016 22:00:16 +0000 (23:00 +0100)]
Test suite: lib t-untar of an edited tartree: do not hardlink
Some of the tools we use, it turns out, do not update properly: they
overwrite in place. This can cause inadvertant changes to a tartree
opened for editing.
Ian Jackson [Sun, 3 Jul 2016 22:03:17 +0000 (23:03 +0100)]
Tests: tartree-edit: gitfetchinfo: Better commit messages for dirty tress
Ian Jackson [Sun, 3 Jul 2016 22:02:37 +0000 (23:02 +0100)]
Test suite: tartree-edit: gitfetchinfo generates remote/TT-HEAD
Simply HEAD is not displayed by gitk, which is rather a shame.
Ian Jackson [Sat, 2 Jul 2016 10:34:03 +0000 (11:34 +0100)]
Test suite: tartree-edit: gitfetchinfo: Remerge on fetch
When we unmerged some old A+B merged refs, make a note to merge them
again. This saves the user calling gitfetchinfo-merge again.
Ian Jackson [Sat, 2 Jul 2016 10:33:26 +0000 (11:33 +0100)]
Test suite: tartree-edit: gitfetchinfo: Be a bit more careful
* Turn on perl warnings
* Use strict
* When removing old merged refs, insist that we aren't handling A+A
Ian Jackson [Sat, 2 Jul 2016 10:25:54 +0000 (11:25 +0100)]
Test suite: tartree-edit: gitfetchinfo: Unmerge merged refs
The sequence
gitfetchinfo-merge A B
gitfetchinfo A
gitfetchinfo-merge A B
might leave inappropriate A+B refs, because nothing would delete them.
So, have gitfetchinfo A unmerge any A+B or B+A refs. (This does mean
that the user of gitfetchinfo A is now promising that any remotes A+B
or B+A were made with gitfetchinfo-merge.)
Ian Jackson [Sat, 2 Jul 2016 10:24:28 +0000 (11:24 +0100)]
Test suite: tartree-edit: gitfetchinfo: Specify commit timestamps
We want the commit timestamps to be predictable (ie, to depend on the
source info only), so that we don't show spurious disagreement between
two working trees. So, use the timestamp of the HEAD commit.
Ian Jackson [Sat, 2 Jul 2016 09:54:19 +0000 (10:54 +0100)]
Test suite: tartree-edit: Provide facility for comparing sets of git refs
Ian Jackson [Sat, 2 Jul 2016 09:53:25 +0000 (10:53 +0100)]
Test suite: tartree-edit: break out git_manip_play (nfc)
Ian Jackson [Sat, 2 Jul 2016 09:23:01 +0000 (10:23 +0100)]
Test suite: Provide `tartree-edit gitfetchinfo'
Help with comparing different test case git working tree tarballs.
Ian Jackson [Sun, 8 Nov 2015 14:02:01 +0000 (14:02 +0000)]
Test suite: Test build modes -g and -G
Ian Jackson [Tue, 17 Nov 2015 01:23:35 +0000 (01:23 +0000)]
quilt fixup: When using git-reset, pass -q
Ian Jackson [Sat, 7 Nov 2015 15:45:53 +0000 (15:45 +0000)]
dgit-repos-policy-debian: better error message when git-cat-file produces unexpected output
Ian Jackson [Sat, 7 Nov 2015 13:41:15 +0000 (13:41 +0000)]
dgit sbuild no longer deletes extranious .changes files; instead we rely on --rm-old-changes, or failing that, fail early.
Ian Jackson [Sat, 7 Nov 2015 13:13:59 +0000 (13:13 +0000)]
No longer tolerate a multitude of .changes files when doing push.
Instead, insist on a single one. This eliminates a potential for a
variety of surprises, where dgit would upload something different to
the user expected.
We no longer need to behave this way because nowadays the sbuild build
(which was the real use case, because it would generate a .source and
a .ARCH changes as well as the final .multi) renames the intermediate
changes files.
Also --rm-old-changes helps.
Ian Jackson [Sat, 7 Nov 2015 13:13:00 +0000 (13:13 +0000)]
Remove any pre-existing _source.changes file before building source, as a safety check.
Ian Jackson [Sat, 7 Nov 2015 15:46:25 +0000 (15:46 +0000)]
Tests: Use --rm-old-changes in build-mode tests
Soon, we are going to be stricter about detecting ambiguity about
which .changes file is intended when different build modes have been
used.
Ian Jackson [Sat, 7 Nov 2015 13:09:56 +0000 (13:09 +0000)]
Introduce --rm-old-changes to delete previous builds' changes files.
Ian Jackson [Sat, 7 Nov 2015 12:59:49 +0000 (12:59 +0000)]
dgit(1): Document the dgit-distro.DISTRO.quilt-mode config setting.
Ian Jackson [Sat, 7 Nov 2015 11:10:39 +0000 (11:10 +0000)]
Break out changespat (no functional change)
Ian Jackson [Fri, 6 Nov 2015 16:10:51 +0000 (16:10 +0000)]
When running dpkg-buildpackage, cope if user specified -g or -G.
Ian Jackson [Fri, 6 Nov 2015 14:32:03 +0000 (14:32 +0000)]
sbuild: Check that the binary .changes file doesn't contain a .dsc.
Ian Jackson [Fri, 6 Nov 2015 14:23:18 +0000 (14:23 +0000)]
sbuild: Rename the used-up .changes files to `.inmulti'
This avoids accidental use of the wrong one (by software, or by users).
Ian Jackson [Fri, 6 Nov 2015 14:21:54 +0000 (14:21 +0000)]
sbuild:: check that we have the right number of .changes files
Check that the set of .changes files found is as we expect, before
calling mergechanges.
Ian Jackson [Fri, 21 Aug 2015 15:40:37 +0000 (16:40 +0100)]
Test suite: Test quilt single-debian-patch