chiark / gitweb /
Ian Jackson [Sun, 17 Jul 2016 13:21:42 +0000 (14:21 +0100)]
Tag change: Declare intent in docs etc.
Provide debiantag_new as well as debiantag_old. Change the docs
and an important comment.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 17 Jul 2016 12:51:46 +0000 (13:51 +0100)]
Tag change: Rename debiantag to debiantag_old
We are going to change the tag name of the main signed tag used by
dgit to signal the user's intent to the archive server.
Prepare for this by changing debiantag to debiantag_old and changing
all call sites outside dgit itself.
dgit will want to be able to generate either, depending on whether
it's cooperating in an rpush with a new or old dgit so reintroduce a
wrapper called debiantag there. This will also allow us to have dgit
generate old tags for testing.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 17 Jul 2016 13:12:56 +0000 (14:12 +0100)]
TODO.BRANCH search whole tree for "tag"
Ian Jackson [Sun, 24 Jul 2016 18:41:07 +0000 (19:41 +0100)]
changelog: Document test suite better info
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 24 Jul 2016 18:40:20 +0000 (19:40 +0100)]
Test suite: Print better info on t-ref-same failure
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 24 Jul 2016 18:40:06 +0000 (19:40 +0100)]
Test suite: Print better info on failures
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 30 Jul 2016 12:12:12 +0000 (13:12 +0100)]
dgit: rpush protocol comment: Add some missing protocol elements
progress, supplementary-message, previously, and param csuite, were
all missing. Document them.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 31 Jul 2016 17:12:59 +0000 (18:12 +0100)]
Dgit.pm: cmdoutput: Handle undef in arg crash better
Use `confess' which produces a stack trace. And don't forget to use
Data::Dumper;
Bug introduced in
e6ce71a87a1c "Move various useful functions into
Dgit.pm [...]".
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 16 Jul 2016 23:12:35 +0000 (00:12 +0100)]
Split brain: When pushing, find the dgit view in the cache
We now do set $split_brain, and we don't do anythig with the cached
dgit view, so we'll crash at the die, in a moment.
Ian Jackson [Sat, 16 Jul 2016 23:00:06 +0000 (00:00 +0100)]
Innards: Improve mktree_in_ud_from_only_subdir message
When it finds multiple subdirs, print them.
Ian Jackson [Sat, 16 Jul 2016 22:10:27 +0000 (23:10 +0100)]
Subprocess error handling: Initialise $? to -1
When system(3perl) fails due to syscall error, it sets only $!. When
it succeeds it sets only $? and sometimes trashes $!. Conversely,
close of a popened filehandle always sets both in all cases.
Document this in a comment.
So when using system and relying on $?/$! (rather than looking at
system's return value), such as when about to use failedcmd, it's
necessary to initialise $? to -1.
Fix the three call sites where system might be followed by failedcmd
but this wasn't done.
Ian Jackson [Sat, 16 Jul 2016 22:35:21 +0000 (23:35 +0100)]
Subprocess error handling: Fix when divert check fails
If the remote command failed, do not try to match the undef value
against the various regexps.
Ian Jackson [Sat, 16 Jul 2016 22:34:32 +0000 (23:34 +0100)]
Subprocess error handling: Do not call faildcmd when open fails
failecmd wants to look at $? too and anyway the full command is not of
much interest in these cases.
Ian Jackson [Sat, 16 Jul 2016 17:22:07 +0000 (18:22 +0100)]
Split brain: Fix grammar in a message
Ian Jackson [Sat, 16 Jul 2016 17:20:57 +0000 (18:20 +0100)]
Split brain: In dopush, get HEAD earlier (nfc)
Ian Jackson [Sat, 16 Jul 2016 17:19:36 +0000 (18:19 +0100)]
Split brain: Do not look at all of %INC for cache key
Look only at dgit and Debian/Dgit.
The prompt for this is that some of our submodules seem to dynamically
load some of their components depending on what dgit does, making the
cache key unstable.
Ian Jackson [Sat, 16 Jul 2016 16:59:07 +0000 (17:59 +0100)]
quilt innards: Change calling convention for quilt_check_splitbrain_cache
Ian Jackson [Sat, 16 Jul 2016 16:50:17 +0000 (17:50 +0100)]
quilt innards: Break out quilt_check_splitbrain_cache (nfc)
Ian Jackson [Sat, 16 Jul 2016 16:35:37 +0000 (17:35 +0100)]
quilt innards: Break out uilt_make_fake_dsc (nfc)
Ian Jackson [Sat, 16 Jul 2016 16:31:58 +0000 (17:31 +0100)]
quilt innards: Remove a couple of stray blank lines
Ian Jackson [Sat, 16 Jul 2016 16:15:26 +0000 (17:15 +0100)]
quilt innards: Fix a formatting glitch
Ian Jackson [Sat, 16 Jul 2016 15:59:51 +0000 (16:59 +0100)]
Quilt mode reporting: Only print warning about quilt once
Ian Jackson [Sat, 4 Jun 2016 21:23:47 +0000 (22:23 +0100)]
Test suite: quilt-gbp: New test (not yet complete)
This test does not yet do all that we want, but it does some things
and then exits 0.
The current intent for the future is written in prose in the rest of
the file.
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