Debian Bug report logs - #910687
dgit: crash with perl backtrace

version graph

Package: dgit; Maintainer for dgit is Ian Jackson <ijackson@chiark.greenend.org.uk>; Source for dgit is src:dgit (PTS, buildd, popcon).

Reported by: Mattia Rizzolo <mattia@debian.org>

Date: Tue, 9 Oct 2018 20:36:02 UTC

Severity: important

Tags: patch

Found in version dgit/7.0

Fixed in version dgit/8.0

Done: Ian Jackson <ijackson@chiark.greenend.org.uk>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson <ijackson@chiark.greenend.org.uk>:
Bug#910687; Package dgit. (Tue, 09 Oct 2018 20:36:04 GMT) (full text, mbox, link).


Message #3 received at submit@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@debian.org>
To: submit@bugs.debian.org
Subject: dgit: crash with perl backtrace
Date: Tue, 9 Oct 2018 20:48:32 +0200
[Message part 1 (text/plain, inline)]
Package: dgit
Version: 7.0
Severity: important

with a frash `dgit clone mason` (with an added d/source/format):

mattia@warren ~/devel/debian/QA/mason/mason (git)-[dgit/sid] % git status
On branch dgit/sid
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	debian/source/

nothing added to commit but untracked files present (use "git add" to track)
mattia@warren ~/devel/debian/QA/mason/mason (git)-[dgit/sid] % dgit -wc build-source
Format `3.0 (quilt)', need to check/update patch stack
Use of uninitialized value $objname in print at /usr/share/perl5/Debian/Dgit.pm line 461, <GEN3> line 11.
 at /usr/share/perl5/Debian/Dgit.pm line 145, <GEN3> line 11.
	Debian::Dgit::__ANON__("Use of uninitialized value \$objname in print at /usr/share/pe"...) called at /usr/share/perl5/Debian/Dgit.pm line 461
	Debian::Dgit::git_cat_file(undef, "commit") called at /usr/bin/dgit line 347
	main::branch_is_gdr("96b36c25fd7adade36a62fa8c63cdff8b22c7475") called at /usr/bin/dgit line 5699
	main::build_maybe_quilt_fixup() called at /usr/bin/dgit line 6245
	main::build_prep(1) called at /usr/bin/dgit line 6596
	main::cmd_build_source() called at /usr/bin/dgit line 7359
255 mattia@warren ~/devel/debian/QA/mason/mason (git)-[dgit/sid] % 

more debug:

mattia@warren ~/devel/debian/QA/mason/mason (git)-[dgit/sid] % dgit -wc -DDD build-source
| git config -z --get-regexp --local '.*'
=> core.repositoryformatversion\n0
=> core.filemode\ntrue
=> core.bare\nfalse
=> core.logallrefupdates\ntrue
=> merge.dpkg-mergechangelogs.name\ndebian/changelog merge driver
=> merge.dpkg-mergechangelogs.driver\ndpkg-mergechangelogs -m %O %A %B %A
=> user.email\nmattia@debian.org
=> user.name\nMattia Rizzolo
=> remote.origin.url\nhttps://git.dgit.debian.org/mason
=> remote.origin.fetch\n+refs/heads/*:refs/remotes/origin/*
=> remote.dgit.skipdefaultupdate\ntrue
| git config -z --get-regexp --local '.*'
=> core.repositoryformatversion\n0
=> core.filemode\ntrue
=> core.bare\nfalse
=> core.logallrefupdates\ntrue
=> merge.dpkg-mergechangelogs.name\ndebian/changelog merge driver
=> merge.dpkg-mergechangelogs.driver\ndpkg-mergechangelogs -m %O %A %B %A
=> user.email\nmattia@debian.org
=> user.name\nMattia Rizzolo
=> remote.origin.url\nhttps://git.dgit.debian.org/mason
=> remote.origin.fetch\n+refs/heads/*:refs/remotes/origin/*
=> remote.dgit.skipdefaultupdate\ntrue
| git config -z --get-regexp --global '.*'
=> core.pager\ndiff-highlight | less
=> push.default\ncurrent
=> push.followtags\ntrue
=> user.email\nmattia@debian.org
=> user.name\nMattia Rizzolo
=> user.signingkey\n66AE2B4AFCCF3F52DA184D184B043FCDB9444540
=> transfer.fsckobjects\ntrue
=> fetch.fsckobjects\ntrue
=> receive.fsckobjects\ntrue
=> commit.gpgsign\ntrue
=> commit.verbose\ntrue
=> tag.sort\nv:refname
=> rebase.autosquash\ntrue
=> rebase.abbreviatecommands\ntrue
=> rebase.missingcommitscheck\nwarn
=> diff.renames\ntrue
=> diff.compactionheuristic\ntrue
=> stash.showpatch\ntrue
=> color.ui\nauto
=> pager.branch\nless -FX
=> pager.grep\nless -FX
=> pager.tag\nless -FX
=> interactive.difffilter\ndiff-highlight
=> merge.dpkg-mergechangelogs.name\ndebian/changelog merge driver
=> merge.dpkg-mergechangelogs.driver\ndpkg-mergechangelogs -m %O %A %B %A
=> filter.lfs.smudge\ngit-lfs smudge -- %f
=> filter.lfs.process\ngit-lfs filter-process
=> filter.lfs.required\ntrue
=> filter.lfs.clean\ngit-lfs clean -- %f
=> dgit.default.build-products-dir\n/home/mattia/pbuilder/result/unstable/amd64
=> alias.c\ncommit --signoff
=> alias.co\ncheckout
=> alias.s\nshow --show-signature --pretty=fuller
=> alias.wdiff\ndiff --color-words
=> alias.lg\nlog --color --graph --abbrev-commit --pretty=format:'%Cred%h%Creset %C(bold green)%G?%Creset%C(yellow)%d%Creset %s %Cgreen(%ar)%C(blue) %an <%ae>%Creset'
=> alias.mr\n!sh -c 'git fetch $1 $2 && tig HEAD..FETCH_HEAD && git merge --no-commit --no-ff FETCH_HEAD' -
=> url.git+ssh://mapreri@git.launchpad.net/.insteadof\nlp:
=> url.git+ssh://mapreri@git.launchpad.net/~mapreri/+git/.insteadof\nlpme:
=> url.git@salsa.debian.org:.insteadof\nhttps://salsa.debian.org/
=> url.git@salsa.debian.org:.insteadof\nsalsa:
=> url.git@salsa.debian.org:python-team/modules/.insteadof\ndpmt:
=> url.git@salsa.debian.org:python-team/applications/.insteadof\npapt:
=> url.git@github.com:.insteadof\nhttps://github.com/
=> url.git@github.com:.insteadof\ngit://github.com/
| git config -z --get-regexp --system '.*'
+ git diff --quiet HEAD
Format `3.0 (quilt)', need to check/update patch stack
checking for vendor-specific debian/patches/debian.series (Dpkg::Vendor `current vendor')
checking for vendor-specific debian/patches/debian.series ((base) distro being accessed)
checking for vendor-specific debian/patches/debian.series ((nominal) distro being accessed)
| git rev-parse 'HEAD~0'
=> `96b36c25fd7adade36a62fa8c63cdff8b22c7475'
| git symbolic-ref -q HEAD
=> `refs/heads/dgit/sid'
branch_is_gdr 96b36c25fd7adade36a62fa8c63cdff8b22c7475...
GCF| git cat-file --batch
GCF>| 96b36c25fd7adade36a62fa8c63cdff8b22c7475:debian/patches
GCF<| 96b36c25fd7adade36a62fa8c63cdff8b22c7475:debian/patches missing
GCF>| 96b36c25fd7adade36a62fa8c63cdff8b22c7475
GCF<| 96b36c25fd7adade36a62fa8c63cdff8b22c7475 commit 641
GCF>| 96b36c25fd7adade36a62fa8c63cdff8b22c7475:debian/patches
GCF<| 96b36c25fd7adade36a62fa8c63cdff8b22c7475:debian/patches missing
GCF>| 96b36c25fd7adade36a62fa8c63cdff8b22c7475:debian
GCF<| ec8ccbb627252cdd098a185211bf56c814feaf3d tree 489
branch_is_gdr  96b36c25fd7adade36a62fa8c63cdff8b22c7475 plain
GCF>| 58a8bf0d08a433b320d4cb0ecc8b49e2a61db449
GCF<| 58a8bf0d08a433b320d4cb0ecc8b49e2a61db449 commit 271
GCF>| 58a8bf0d08a433b320d4cb0ecc8b49e2a61db449:debian/patches
GCF<| 58a8bf0d08a433b320d4cb0ecc8b49e2a61db449:debian/patches missing
GCF>| 58a8bf0d08a433b320d4cb0ecc8b49e2a61db449:debian
GCF<| 3980057eaa182009b11e83f99fc4251162672c68 tree 290
branch_is_gdr  58a8bf0d08a433b320d4cb0ecc8b49e2a61db449 plain
Use of uninitialized value $_[1] in print at /usr/share/perl5/Debian/Dgit.pm line 184, <GEN3> line 11.
 at /usr/share/perl5/Debian/Dgit.pm line 145, <GEN3> line 11.
	Debian::Dgit::__ANON__("Use of uninitialized value \$_[1] in print at /usr/share/perl5"...) called at /usr/share/perl5/Debian/Dgit.pm line 184
	Debian::Dgit::printdebug("GCF>| ", undef, "\x{a}") called at /usr/share/perl5/Debian/Dgit.pm line 460
	Debian::Dgit::git_cat_file(undef, "commit") called at /usr/bin/dgit line 347
	main::branch_is_gdr("96b36c25fd7adade36a62fa8c63cdff8b22c7475") called at /usr/bin/dgit line 5699
	main::build_maybe_quilt_fixup() called at /usr/bin/dgit line 6245
	main::build_prep(1) called at /usr/bin/dgit line 6596
	main::cmd_build_source() called at /usr/bin/dgit line 7359
GCF>| %                                                                                                                                                                               255 mattia@warren ~/devel/debian/QA/mason/mason (git)-[dgit/sid] %                                                                                                                 :(


(as an aside, the last line outputed by -DDD lacks a \n)

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#910687; Package dgit. (Tue, 09 Oct 2018 22:48:03 GMT) (full text, mbox, link).


Acknowledgement sent to Ian Jackson <ijackson@chiark.greenend.org.uk>:
Extra info received and forwarded to list. (Tue, 09 Oct 2018 22:48:03 GMT) (full text, mbox, link).


Message #8 received at 910687@bugs.debian.org (full text, mbox, reply):

From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: Mattia Rizzolo <mattia@debian.org>, 910687@bugs.debian.org
Subject: Re: Bug#910687: dgit: crash with perl backtrace
Date: Tue, 9 Oct 2018 23:44:34 +0100
Control: tags -1 + patch

Mattia Rizzolo writes ("Bug#910687: dgit: crash with perl backtrace"):
> Package: dgit
> Version: 7.0
> Severity: important

Sorry about this.

I think this diff will fix it.  You can apply it directly with patch
to dgit in your /usr/bin if you like.

I will make a release with the fix RSN.

Regards,
Ian.

diff --git a/dgit b/dgit
index 4cc56845..19b9eb2c 100755
--- a/dgit
+++ b/dgit
@@ -379,6 +379,10 @@ sub branch_is_gdr ($) {
 	    printdebug "branch_is_gdr  $walk ?-octopus NO\n";
 	    return 0;
 	}
+	if (!@parents) {
+	    printdebug "branch_is_gdr  $walk origin\n";
+	    return 0;
+	}
 	if ($get_patches->($walk) ne $tip_patches) {
 	    # Our parent added, removed, or edited patches, and wasn't
 	    # a gdr make-patches commit.  gdr make-patches probably



Added tag(s) patch. Request was from Ian Jackson <ijackson@chiark.greenend.org.uk> to 910687-submit@bugs.debian.org. (Tue, 09 Oct 2018 22:48:03 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson <ijackson@chiark.greenend.org.uk>:
Bug#910687; Package dgit. (Tue, 09 Oct 2018 22:51:08 GMT) (full text, mbox, link).


Acknowledgement sent to Mattia Rizzolo <mattia@debian.org>:
Extra info received and forwarded to list. Copy sent to Ian Jackson <ijackson@chiark.greenend.org.uk>. (Tue, 09 Oct 2018 22:51:08 GMT) (full text, mbox, link).


Message #15 received at 910687@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@debian.org>
To: 910687@bugs.debian.org
Subject: Re: Bug#910687: dgit: crash with perl backtrace
Date: Wed, 10 Oct 2018 00:48:02 +0200
[Message part 1 (text/plain, inline)]
No rush from my side.

I'm now already falling asleep, I'll try to apply your patch tomorrow and
report back :)
Thanks for the quick turnaround!

On Wed, 10 Oct 2018, 12:44 a.m. Ian Jackson, <
ijackson@chiark.greenend.org.uk> wrote:

> Control: tags -1 + patch
>
> Mattia Rizzolo writes ("Bug#910687: dgit: crash with perl backtrace"):
> > Package: dgit
> > Version: 7.0
> > Severity: important
>
> Sorry about this.
>
> I think this diff will fix it.  You can apply it directly with patch
> to dgit in your /usr/bin if you like.
>
> I will make a release with the fix RSN.
>
> Regards,
> Ian.
>
> diff --git a/dgit b/dgit
> index 4cc56845..19b9eb2c 100755
> --- a/dgit
> +++ b/dgit
> @@ -379,6 +379,10 @@ sub branch_is_gdr ($) {
>             printdebug "branch_is_gdr  $walk ?-octopus NO\n";
>             return 0;
>         }
> +       if (!@parents) {
> +           printdebug "branch_is_gdr  $walk origin\n";
> +           return 0;
> +       }
>         if ($get_patches->($walk) ne $tip_patches) {
>             # Our parent added, removed, or edited patches, and wasn't
>             # a gdr make-patches commit.  gdr make-patches probably
>
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#910687; Package dgit. (Wed, 10 Oct 2018 00:54:02 GMT) (full text, mbox, link).


Acknowledgement sent to Ian Jackson <ijackson@chiark.greenend.org.uk>:
Extra info received and forwarded to list. (Wed, 10 Oct 2018 00:54:02 GMT) (full text, mbox, link).


Message #20 received at 910687@bugs.debian.org (full text, mbox, reply):

From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: Mattia Rizzolo <mattia@debian.org>, 910687@bugs.debian.org
Subject: Re: Bug#910687: dgit: crash with perl backtrace
Date: Wed, 10 Oct 2018 01:51:44 +0100
Control: clone -1 -2
Control: retitle -2 build-source and push-source disregard -wc
Control: tags -2 - patch
Control: severity -2 normal

Mattia Rizzolo writes ("Bug#910687: dgit: crash with perl backtrace"):
> I'm now already falling asleep, I'll try to apply your patch tomorrow and
> report back :)

FYI, I discovered some other weirdness with what you were trying to
do.

Firstly, from your transcript, you didn't commit debian/source/format.
It's an un-ignored un-tracked file.  dgit nowadays always builds
source packages in a private area and bases them on your git tree.
The result is that if you do what you did it will (i) notice the
debian/source/format in the working tree and decide to do quilt
linearisation (ii) call dpkg-source --commit in the private area in a
clean tree with no debian/source/format.  The result is a 1.0 package.
This is arguably a bug.  But the only thing dgit could sensibly do
would be to spot that yuu did this and stop with a complaint.

I experimented with committing debian/source/options.  If I do that
dgit makes a hamfisted attempt at quilt linearisation: again, it
attempts to call dpkg-source --commit starting at a commit which does
not have debian/source/format.  I will fix dgit to stop quilt
linearisation when it encounters a change to debian/source/format, and
you would then get this error message:
  dgit: error: quilt fixup cannot be linear.  Stopped at:
  dgit:  45a228db..d5c44c79: changed debian/source/format
along with some essentially useless suggestions.

What you are asking dgit to do is rather outside of its scope.  The
quilt linearisation feature is intended to support an NMUer or user
adding a few commits on top.  It is not intended as a general puprose
git workflow and delta queue management tool.  It certainly isn't
intended for converting from 1.0-with-diff to `3.0 (quilt)'.

I infer that you want to do `3.0 (quilt)' with this package, and
you're using git, so you will need a git workflow tool.  Which one are
you intending to use ?  Perhaps the real problem is that you intend to
use git-debrebase but forgot to convert the branch (with git-debrebase
convert-from-dgit-view) ?  Or that you intend to use gbp pq but didn't
make a pq branch and export it ?

Having said all that, I experimented with rebasing the little stub
branch so that the dgit-generated diff import commit was *after* my
change to add debian/source/format.  That resulted in a branch that
dgit was able to do quilt linearisation on.  The single patch that
comes out is of course the patch form of the dgit diff import commit.

But having done that IDK how you would rebase onto a new upstream
version.  You'll definitely need a workflow tool for that (or I guess
you could do it by hand with raw git runes if you had iron
concentration and an iron constitution).

Also, arguably something should have stopped you proceeding with an
untracked unignored files (perhaps, especially as you specified -wc).
But the clean mode is basically ignored with build-source (and
push-source) since the tree does not need to be cleaned.  But spotting
uncommitted files is important.  I'm not sure exactly what to do about
this but I have cloned this bug to track this issue.  It seems odd to
say that --clean=check ought to make build-source and push-source
check for loose files, even though they usually don't actually clean
the tree at all.  Perhaps there should be a separate check which
doesn't depend on the clean mode ?

Regards,
Ian.



Bug 910687 cloned as bug 910705 Request was from Ian Jackson <ijackson@chiark.greenend.org.uk> to 910687-submit@bugs.debian.org. (Wed, 10 Oct 2018 00:54:02 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson <ijackson@chiark.greenend.org.uk>:
Bug#910687; Package dgit. (Wed, 10 Oct 2018 10:27:03 GMT) (full text, mbox, link).


Message #25 received at 910687@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@debian.org>
To: Ian Jackson <ijackson@chiark.greenend.org.uk>
Cc: 910687@bugs.debian.org
Subject: Re: Bug#910687: dgit: crash with perl backtrace
Date: Wed, 10 Oct 2018 12:23:38 +0200
[Message part 1 (text/plain, inline)]
On Tue, Oct 09, 2018 at 11:44:34PM +0100, Ian Jackson wrote:
> I think this diff will fix it.  You can apply it directly with patch
> to dgit in your /usr/bin if you like.

Right, with your patch I see it's not crashing anymore.

However I also see that:
 * without --include-dirty, it's completely ignoring the added
   d/source/format file
 * with --iclude-dirty is giving up with
    error: tree contains uncommitted files and --clean=check specified
 * without -wc and with --include-dirty, it tries to its quilt
   linearisation, but it fails with:

mattia@warren ~/devel/debian/QA/mason/mason (git)-[remotes/dgit/dgit/sid] % dgit --include-dirty  build-source
dpkg-buildpackage: info: source package mason
dpkg-buildpackage: info: source version 1.0.0-12.4
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Mattia Rizzolo <mattia@debian.org>
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
debconf-updatepo
# Add here commands to clean up after the build process.
#-/usr/bin/make clean
dh_clean
dh_clean: Compatibility levels before 9 are deprecated (level 5 in use)
Format `3.0 (quilt)', need to check/update patch stack
examining quilt state (multiple patches, linear mode)
gzip: warning: GZIP environment variable is deprecated; use an alias or script
dgit: base trees orig=5df2f64c4d67150c7768 o+d/p=5df2f64c4d67150c7768
dgit: quilt differences: src:  ## orig ==     gitignores:  == orig ==
dgit: quilt differences:      HEAD ## o+d/p               HEAD == o+d/p
starting quiltify (multiple patches, linear mode)
quiltify linearisation planning successful, executing...
dpkg-source: warning: --include-removal is not a valid option for Dpkg::Source::Package::V1
dpkg-source: info: 'dpkg-source --commit' is not supported by the source format '1.0'
nothing quilty to commit, ok.
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building mason using existing ./mason_1.0.0.orig.tar.gz
dpkg-source: info: local changes detected, the modified files are:
 mason/Makefile
 mason/baserules.sample
 mason/firewall
 mason/mason
 mason/mason-decide
 mason/mason-gui-text
 mason/mason-gui-text.1
 mason/mason.1
 mason/masonlib
 mason/masonrc
 mason/samlib
 mason/ttt
dpkg-source: info: you can integrate the local changes with dpkg-source --commit
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/mason_1.0.0-12.4.diff.EP2mGJ
dgit: failed command: dpkg-source '-i(?:^|/)'\\'.git(?:/|$)' -I.git -b -- mason

dgit: error: subprocess failed with error exit status 2


I'm not sure if I'm doing something in a way I'm not supposed to do
here.
Note that I already worked around this bug yesterday by manually calling
dpkg-source --commit and git commit the resulting quilt patch, at which
point dgit goes back behaving the way I know it.

> I will make a release with the fix RSN.

I don't think there is a need to rush out a release just for this :)

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#910687; Package dgit. (Wed, 10 Oct 2018 10:54:04 GMT) (full text, mbox, link).


Acknowledgement sent to Ian Jackson <ijackson@chiark.greenend.org.uk>:
Extra info received and forwarded to list. (Wed, 10 Oct 2018 10:54:04 GMT) (full text, mbox, link).


Message #30 received at 910687@bugs.debian.org (full text, mbox, reply):

From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: Mattia Rizzolo <mattia@debian.org>
Cc: 910687@bugs.debian.org
Subject: Re: Bug#910687: dgit: crash with perl backtrace
Date: Wed, 10 Oct 2018 11:51:24 +0100
Mattia Rizzolo writes ("Re: Bug#910687: dgit: crash with perl backtrace"):
> On Tue, Oct 09, 2018 at 11:44:34PM +0100, Ian Jackson wrote:
> > I think this diff will fix it.  You can apply it directly with patch
> > to dgit in your /usr/bin if you like.
> 
> Right, with your patch I see it's not crashing anymore.
> 
> However I also see that:
>  * without --include-dirty, it's completely ignoring the added
>    d/source/format file

This is indeed wrong.  I think fixing "dgit: build-source and
push-source disregard -wc" the way I plan to would fix this too.

>  * with --iclude-dirty is giving up with
>     error: tree contains uncommitted files and --clean=check specified

That seems coherent.  Unless you think --include-dirty should turn
--clean=check into --clean=none ?  That seems unwise.

Consider --clean=dpkg-source --ignore-dirty, which means to run the
rules clean target and then tolerate uncommitted stuff.

>  * without -wc and with --include-dirty, it tries to its quilt
>    linearisation, but it fails with:

I think this is because the algorithm used by dgit for quilt
linearisation implicitly assumes that it can use the
debian/source/format from your git tree.  I think trying to work with
an uncommitted change to debian/source/format is sufficiently weird
that I don't mind that it goes wrong.

The other question is what you expected dgit's quilt linearisation to
do for you.  If you use --include-dirty with a tree with
dpkg-source-uncommitted changes, I think you'll get the same error.
There is no way round this because dgit's quilt fixup generates
a *commit* containing the added patches.  It wouldn't make sense to
commit patches for uncommitted changes.

That --include-dirty does not cause dgit to try to do quilt fixup for
uncommitted changes is perhaps implicit in
  https://manpages.debian.org/unstable/dgit/dgit.7.en.html#FORMAT_3.0_(QUILT)
and the description of `dgit quilt-fixup' in
  https://manpages.debian.org/unstable/dgit/dgit.1.en.html
but perhaps something should be included in the discussion of
--include-dirty, maybe something like this:

  Changes not committed to git are not taken into account by dgit's
  quilt fixup (see `FORMAT 3.0 (QUILT)' in dgit(7).  So you may need
  to run dpkg-source --commit yourself.

?

> I'm not sure if I'm doing something in a way I'm not supposed to do
> here.
> Note that I already worked around this bug yesterday by manually calling
> dpkg-source --commit and git commit the resulting quilt patch, at which
> point dgit goes back behaving the way I know it.

Right, that was you manually constructing the patches-applied git branch
which is what dgit works with.

Thanks,
Ian.



Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson <ijackson@chiark.greenend.org.uk>:
Bug#910687; Package dgit. (Wed, 10 Oct 2018 11:45:09 GMT) (full text, mbox, link).


Message #33 received at 910687@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@debian.org>
To: Ian Jackson <ijackson@chiark.greenend.org.uk>
Cc: 910687@bugs.debian.org
Subject: Re: Bug#910687: dgit: crash with perl backtrace
Date: Wed, 10 Oct 2018 13:42:07 +0200
[Message part 1 (text/plain, inline)]
On Wed, Oct 10, 2018 at 11:51:24AM +0100, Ian Jackson wrote:
> > However I also see that:
> >  * without --include-dirty, it's completely ignoring the added
> >    d/source/format file
> 
> This is indeed wrong.  I think fixing "dgit: build-source and
> push-source disregard -wc" the way I plan to would fix this too.

ACK.

> >  * with --iclude-dirty is giving up with
> >     error: tree contains uncommitted files and --clean=check specified
> 
> That seems coherent.  Unless you think --include-dirty should turn
> --clean=check into --clean=none ?  That seems unwise.

ACK

> Consider --clean=dpkg-source --ignore-dirty, which means to run the
> rules clean target and then tolerate uncommitted stuff.

That's -wd/-wdd.  Mhh, You have a point here, I should try that in the
future.  I like -wc because it's impossibly quick and usually it's the
state I find myself in while working.

> >  * without -wc and with --include-dirty, it tries to its quilt
> >    linearisation, but it fails with:
> 
> I think this is because the algorithm used by dgit for quilt
> linearisation implicitly assumes that it can use the
> debian/source/format from your git tree.  I think trying to work with
> an uncommitted change to debian/source/format is sufficiently weird
> that I don't mind that it goes wrong.

That's a fair assumption.
You mentioned somewhere that you could add at least a warning when
d/source/format has uncommitted changes (or is present but untracked).
I think I would find that useful.

> The other question is what you expected dgit's quilt linearisation to
> do for you.  If you use --include-dirty with a tree with
> dpkg-source-uncommitted changes, I think you'll get the same error.
> There is no way round this because dgit's quilt fixup generates
> a *commit* containing the added patches.  It wouldn't make sense to
> commit patches for uncommitted changes.

Right, now I get this.  I think I didn't realize the not-so-little
detail about linearising commits, not changes.

> That --include-dirty does not cause dgit to try to do quilt fixup for
> uncommitted changes is perhaps implicit in
>   https://manpages.debian.org/unstable/dgit/dgit.7.en.html#FORMAT_3.0_(QUILT)
> and the description of `dgit quilt-fixup' in
>   https://manpages.debian.org/unstable/dgit/dgit.1.en.html
> but perhaps something should be included in the discussion of
> --include-dirty, maybe something like this:
> 
>   Changes not committed to git are not taken into account by dgit's
>   quilt fixup (see `FORMAT 3.0 (QUILT)' in dgit(7).  So you may need
>   to run dpkg-source --commit yourself.
> 
> ?

I must admit that I haven't recently read dgit's documnetation (as I did
last year, and costantly re-reading documentation you already read is
quite boring), so I wouldn't have noticed.
But perhaps making that point explicit could help others in the future.

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#910687; Package dgit. (Wed, 10 Oct 2018 11:54:04 GMT) (full text, mbox, link).


Acknowledgement sent to Ian Jackson <ijackson@chiark.greenend.org.uk>:
Extra info received and forwarded to list. (Wed, 10 Oct 2018 11:54:04 GMT) (full text, mbox, link).


Message #38 received at 910687@bugs.debian.org (full text, mbox, reply):

From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: Mattia Rizzolo <mattia@debian.org>, 910687@bugs.debian.org
Subject: Re: Bug#910687: dgit: crash with perl backtrace
Date: Wed, 10 Oct 2018 12:50:25 +0100
Mattia Rizzolo writes ("Bug#910687: dgit: crash with perl backtrace"):
> On Wed, Oct 10, 2018 at 11:51:24AM +0100, Ian Jackson wrote:
> > That seems coherent.  Unless you think --include-dirty should turn
> > --clean=check into --clean=none ?  That seems unwise.
> 
> ACK
> 
> > Consider --clean=dpkg-source --ignore-dirty, which means to run the
> > rules clean target and then tolerate uncommitted stuff.
> 
> That's -wd/-wdd.  Mhh, You have a point here, I should try that in the
> future.  I like -wc because it's impossibly quick and usually it's the
> state I find myself in while working.

Err, sorry, when I said "consider" I meant "think about this case in
the context of the interaction between --clean=* and --ignore-dirty".
Not "please think about using -wd yourself".

-wd is v. annoying :-).  It's slow and with anyone else's package it's
likely to be buggy too.  Now that we have version control and *ignore
files, clean targets in makefiles are IMO obsolete.

> > I think this is because the algorithm used by dgit for quilt
> > linearisation implicitly assumes that it can use the
> > debian/source/format from your git tree.  I think trying to work with
> > an uncommitted change to debian/source/format is sufficiently weird
> > that I don't mind that it goes wrong.
> 
> That's a fair assumption.
> You mentioned somewhere that you could add at least a warning when
> d/source/format has uncommitted changes (or is present but untracked).
> I think I would find that useful.

OK, thanks for the feedback.  I'll see if that is straightforward.

> > --include-dirty, maybe something like this:
> > 
> >   Changes not committed to git are not taken into account by dgit's
> >   quilt fixup (see `FORMAT 3.0 (QUILT)' in dgit(7).  So you may need
> >   to run dpkg-source --commit yourself.
> > 
> > ?
> 
> I must admit that I haven't recently read dgit's documnetation (as I did
> last year, and costantly re-reading documentation you already read is
> quite boring), so I wouldn't have noticed.
> But perhaps making that point explicit could help others in the future.

Hah :-).  Thanks for your input.

Ian.



Added tag(s) pending. Request was from Ian Jackson <ijackson@chiark.greenend.org.uk> to control@bugs.debian.org. (Thu, 11 Oct 2018 00:12:05 GMT) (full text, mbox, link).


Reply sent to Ian Jackson <ijackson@chiark.greenend.org.uk>:
You have taken responsibility. (Sat, 13 Oct 2018 23:21:05 GMT) (full text, mbox, link).


Notification sent to Mattia Rizzolo <mattia@debian.org>:
Bug acknowledged by developer. (Sat, 13 Oct 2018 23:21:06 GMT) (full text, mbox, link).


Message #45 received at 910687-close@bugs.debian.org (full text, mbox, reply):

From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: 910687-close@bugs.debian.org
Subject: Bug#910687: fixed in dgit 8.0
Date: Sat, 13 Oct 2018 23:19:13 +0000
Source: dgit
Source-Version: 8.0

We believe that the bug you reported is fixed in the latest version of
dgit, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 910687@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ian Jackson <ijackson@chiark.greenend.org.uk> (supplier of updated dgit package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 13 Oct 2018 23:56:35 +0100
Source: dgit
Binary: dgit git-debrebase dgit-infrastructure
Architecture: all source
Version: 8.0
Distribution: unstable
Urgency: medium
Maintainer: Ian Jackson <ijackson@chiark.greenend.org.uk>
Changed-By: Ian Jackson <ijackson@chiark.greenend.org.uk>
Closes: 910687 910705 910724 910725 910730
Description: 
 dgit       - git interoperability with the Debian archive
 dgit-infrastructure - dgit server backend infrastructure
 git-debrebase - rebasing git workflow tool for Debian packaging
Changes:
 dgit (8.0) unstable; urgency=medium
 .
   dgit - Behavioural change with compatibility implications:
   * Check (with --clean=dpkg-source[-d], ie, by default) that rules
     clean does not leave untracked files (ie, trip if it looks like
     a `git add' may have been forgotten).  dgit will now fail in
     some situations where previously it would have just carried on.
   * Honour new clean modes --dpkg-source[-d],no-check aka -wdn / -wddn
     which suppress this check.  (Whether the untracked files are
     used or disregarded depends on --include-dirty.)
   * Honour new .clean-mode-newer access config option, to allow git
     configs to be compatible with both new and old dgits.
     See relevant parts of dgit(1) for more information.
 .
   dgit - Improved behaviours:
   * Better handling of cross-filesystem operations, including
     build-products-dir on a different fs.  Closes:#910730.
   * Change to git toplevel dir before starting.  Closes:#910724.
   * Provide --clean=check,ignores aka -wci.
   * Provide --clean=dpkg-source[-d],all-check aka -wda / -wdda.
 .
   dgit - Important bugfixes:
   * Check that tree does not contain untracked files (depending on clean
     mode) when building source using git branch rather than using working
     tree.  In particular, honour --clean=check.  Closes:#910705.
   * Also apply that new cleanliness check during build-source or
     push-source etc. with --clean=dpkg-source; even though rules
     clean was not run.  See above.  Again, -wdn / -wddn may be needed.
   * dgit: Forbid source building with --include-dirty and non-.. bpd,
     which can seriously malfunction.  Closes:#910725; see #910740.
 .
   dgit - Additional sanity checks:
   * quilt linearisation: Stop at debian/source/format changes.
   * quilt fixup: Cope if gdr analysis finds origin.  Closes:#910687.
   * Add missing error check in single-debian-patch handling.
   * Refuse to work if critical files have uncommitted changes.
   * Reject all git config options containing newlines.
   * Better error message for not in git tree.  (For git-debrebase too.)
 .
   dgit - Minor bugfixes:
   * Fix spelling errors etc. in messages.
   * Replace mention of alioth by salsa in a message.
   * clean_tree: confess rather than die on unknown clean mode.
   * Add missing \n to crash from git_cat_file.  (git-debrebase too.)
 .
   Documentation:
   * dgit(1): Document that cleaning is sometimes not needed and
     is therefore not done.
   * README.md: Add this document for the benefit of Salsa.
   * po/README: Mention -k10 threshold.
   * po/README: Give a pointer to salsa; remind the translator to commit.
   * dgit(1): Fix spelling errors.
   * dgit(7): Fix spelling errors.
   * dgit-sponsorship(7): Fix spelling error.
 .
   Consequential changes:
   * Internal refactoring to support all these changes.
   * Tests adjusted to correspond to, and somewhat test, these changes.
   * Slight reorganisation to documentation of --clean=dpkg-source etc.
 .
   Build system:
   * Makefile: Provide i18n-commit target.
   * po/list-documents: Set translation threshold to 10%.
Checksums-Sha1: 
 71b6c9a13ca5453465f8ecb7375c2a11e357b384 1660 dgit_8.0.dsc
 107c7329a3f6c0a0fad268bd54b835c0560b685d 625968 dgit_8.0.tar.gz
 ce6ce360aa2e66968f513277dc92e00a7b6f838b 62748 dgit-infrastructure_8.0_all.deb
 bd99567505010031543e22b5b31238be0b7c8718 176472 dgit_8.0_all.deb
 0df81b9b1c6970ee32243a061131cb6ac621083b 5857 dgit_8.0_amd64.buildinfo
 baac8d0b4558317af362d9287952473f16df784c 86252 git-debrebase_8.0_all.deb
Checksums-Sha256: 
 e2ade9bb45afb1544f0c4652ab7b83a2f83f998985176a0d001b7b512c531afd 1660 dgit_8.0.dsc
 6570bde24fa18460c1cb216f973ccacc824a5d02258a71a1f56f8b3478ccd231 625968 dgit_8.0.tar.gz
 8f0ca5f92ae99aa3ea4217c9a0d391f5c77c071880bb6f1af53ab28c6586201a 62748 dgit-infrastructure_8.0_all.deb
 0a3d7bdf9007e7159a080914ba89d7c5135d5c1ab3eb6810b43b023fb430ca45 176472 dgit_8.0_all.deb
 0548b8b6be06e950b79c0831c7a58c65a0bd83b43f51dc7ab7a89f0a97ac4398 5857 dgit_8.0_amd64.buildinfo
 89a2c5fa4b25f8ed3dea1ba2f8c8549765d8011fb1183161ad08ca01af3afbb6 86252 git-debrebase_8.0_all.deb
Files: 
 456bc06df11d42a39f0cb8754715d17d 1660 devel optional dgit_8.0.dsc
 7338560db4013c22d4a0666f527cecec 625968 devel optional dgit_8.0.tar.gz
 70470b83f8c43d65ee2e450ddbeed1d4 62748 devel extra dgit-infrastructure_8.0_all.deb
 81212d289dd1d39a32476a2cc2b8a719 176472 devel optional dgit_8.0_all.deb
 cdd46e0d7a9e6ae4e2144c8d134753dc 5857 devel optional dgit_8.0_amd64.buildinfo
 60c207aa7d19ef10e630f3813dbe0640 86252 devel optional git-debrebase_8.0_all.deb

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEVZrkbC1rbTJl58uh4+M5I0i1DTkFAlvCeWgACgkQ4+M5I0i1
DTn6xgf/QWjmpgI5hvKWP+z70XqySAY8QcB/hAMx2p87Zl46Bsx4n6i1P1p8II82
4Q0J83jwYUT1e/GmB+HR6yjNJLMkjGT1AU+YRtchwleS90Imf/GTICmghyjSBCm3
5rCKbSDfFEpXsB17n3Tf2Hm5we/7qpTRnpTv7sRiJYUAWDUoqXwIu2yR9rmfvUf2
X7gFqlnhYa+7qrVIFEKoyDxLvn/Xt4LJApXWsolMEUP0uyO/NPUXgXALlmZTF7ko
TJqi1XZQ8FjFZzz5XF84lfIPWgcFaUDummzGdPeUlFt1wDiwvfJm6VTggOiJLDEl
5gSPaKrvMV0KfEciDein5oOV3e/9vw==
=z68q
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 13 Nov 2018 07:30:47 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 25 21:46:23 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.