Theodore Tso writes ("Re: Bug#1127616: developers-reference: should document
using git-debpush to upload"):
> I *think* I am using the procedures docuimented in dgit-maint-gbp.
dgit-maint-gbp(7) is describing patches-unapplied, which is the usual
way that people use gbp (and gbp pq etc.)
Perhaps the problem is that you are passing --gbp for a
patches-applied branch?
> But it appears that gbp and patches-applied has some potential
> challenges where the safety checks trying to make sure that the
> patches that were cherry picked and the patches in debian/patches are
> consistent fail. The problem seems to be that dgit gets confused
> about what the base commit that should be used for its git diff, and
> so it refuses to do the dgit push.
The base it is using is an import of your .orig tarball.
> > How are you keeping the upstream files in the main part of your git
> > tree in sync with the debian/patches/ ? Typically with
> > patches-applied and "3.0 (quilt)" one needs a tool to do this
> > (git-debrebase, git-dpm, git-debcherry).
>
> I do a git cherry pick, and then manually do a "git am -o
> debian/patches" and then edit the resulting file to meet the DEP-3
> standards.
Gosh. Don't you find that tiresome?
> See my branches at debian/backports and debian/master at the e2fsprogs
> git tree at
>
> https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
> or
> https://github.com/tytso/e2fsprogs.git
I cloned that and WFM. See transcript below, but basically
git checkout debian/master
origtargz
dgit build-source
Note that I didn't pass any --quilt or --gbp option, so I'm using the
default mode of --linear. That is for patches-applied trees which may
have had additional commits to upstream files on top, and it will make
patch files in debian/patches out of commits, and commit those patch
files in turn, if necessary.
If you're sure it's correct as-is there's --quilt=nofix which will
check that you have a consistent patches-applied branch but never make
changes.
> By the way, do you have a reference to git-debcherry? If that's
> something that automate creating a DEP-3 complaint patch file from the
> git cherry-pick that would save me a bit of time for each patch.
dgit itself, in --quilt=linear, can do this patch file generation for
you. dgit build-source or dgit quilt-fixup will do it, and commit the
result automatically.
I tried it with your debian/master branch, manually committing a test
change to INSTALL dgit build-source worked as I expected. See 2nd
transcript below.
I don't use git-debcherry personally but it has a manpage:
https://manpages.debian.org/trixie/gitpkg/git-debcherry.1.en.html
My understanding of git-debcherry is that it's kind of a more relaxed
version of dgit's --quilt=linear fixup. dgit wants the commits to
definitely be nicely linearisable into patches. AIUI git-debcherry
*tries* to make patches that correspond to commits but falls back to
portmanteau patches automatically, or something. Some of dgit's quilt
modes do something similar, but perhaps not as well as git-debcherry.
It would be nice if dgit supported running git-debcherry, as a quilt
fixup mode. That's #930881.
BTW IMO you should stop worrying so much about DEP-3 and just use
git-format-patch. That's what gbp pq does - and is very common
practice in Debian. There was some discussion somewhere recently
about updating DEP-3 to recommend output like git-format-patch's.
> > Can you point me to an example DEP-14 tag of an upload where you fell
> > back to dput? Examining the state in git might enlighten me.
>
> See the debian/backports branch. I just use "git-buildpackage"
> followed by a dupload on that branch.
I ran
dgit build-sourceq
and even
dgit --damp-run push-source
on that branch and its only complaint was that the version was already
in the archive.
I added a new changelog stanza and then it complained that the thing
wasn't git fast forward from the previous upload. That's expeccted
because you didn't do the last bookworm-backports upload with dgit.
The error message suggested --trust-changelog so passed that and then
dgit --damp-run --trust-changelog push-source
worked.
(tag2upload uses --trust-changelog by default, for Reasons.)
> > The only thing it insists on is that your git and your .dsc
> > correspond; that's the property that enables it to be a bidirectional
> > gateway. That's also the property that means you can look only at
> > your git and then be confident that "dgit push" will DTRT without
> > needing to examine source packages, run debdiff on dscs, etc.
>
> That's the check which it is failing. Since *I* can recreate the
> packages using gbp, and the branch that I use is published on
> git.kernel.org and github.com, whether or not dgit thinks it's
> possible.... isn't worth my trying to figure out how to make dgit
> happy.
I think you probably just need to stop passing it --gbp aka
--quilt=gbp, which is documented as follows:
--gbp (short for --quilt=gbp) is for use with git-buildpackage.
Your HEAD is expected to be a patches-unapplied git branch, ex‐
cept that it might contain changes to upstream .gitignore files.
This is the default for dgit gbp-build.
Ian.
zealot:e2fsprogs> git checkout debian/master
Switched to a new branch 'debian/master'
zealot:e2fsprogs> origtargz
pristine-tar: successfully generated ../e2fsprogs_1.47.2.orig.tar.gz
zealot:e2fsprogs> dgit build-source
Format `3.0 (quilt)', need to check/update patch stack
examining quilt state (multiple patches, linear mode)
dgit: base trees orig=27115b86317ff58b9611 o+d/p=eba09dad8707b197354f
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...
nothing quilty to commit, ok.
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: warning: upstream signing key but no upstream tarball signature
dpkg-source: info: building e2fsprogs using existing
./e2fsprogs_1.47.2.orig.tar.gz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: building e2fsprogs in e2fsprogs_1.47.2-3.debian.tar.xz
dpkg-source: info: building e2fsprogs in e2fsprogs_1.47.2-3.dsc
changelog will contain changes since 1.47.2-3
dpkg-genchanges: warning: 'since' option specifies most recent version
'1.47.2-3', ignoring
dpkg-genchanges: info: not including original source code in upload
checking that e2fsprogs_1.47.2-3.dsc corresponds to HEAD
dpkg-source: warning: extracting unsigned source package
(/volatile/ian/d/e2fsprogs/../bpd/e2fsprogs_1.47.2-3.dsc)
dpkg-source: info: extracting e2fsprogs in unpacked
dpkg-source: info: unpacking e2fsprogs_1.47.2.orig.tar.gz
dpkg-source: info: unpacking e2fsprogs_1.47.2-3.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying
0001-e2fsck-fix-logic-bug-when-there-are-no-references-to.patch
dpkg-source: info: applying
0002-test-fix-expect-files-which-changed-after-EA-bugfix.patch
dpkg-source: info: applying
0003-libext2fs-teach-ext2fs_extent_set_bmap-to-update-ext.patch
dpkg-source: info: applying 0004-e2image.8-add-missing-comma.patch
dpkg-source: info: applying
0005-debugfs-byteswap-dirsearch-dirent-buf-on-big-endian-.patch
dpkg-source: info: applying 0006-fuse2fs-refuse-unsupported-features.patch
dpkg-source: info: applying
0007-fuse2fs-return-EOPNOTSUPP-when-we-don-t-recognize-a-.patch
dpkg-source: info: applying 0008-fuse2fs-remove-posix-acl-translation.patch
dpkg-source: info: applying
0009-fuse2fs-clamp-timestamps-that-are-being-written-to-d.patch
dpkg-source: info: applying
0010-fuse2fs-update-new-child-timestamps-during-mkdir-sym.patch
dpkg-source: info: applying 0011-fuse2fs-disable-renameat2.patch
dpkg-source: info: applying
0012-debugfs-abort-reading-a-file-on-failure-when-dumping.patch
dpkg-source: info: applying 0013-mke2fs-disallow-O-verity-without-extents.patch
dpkg-source: info: applying
0014-e2fsck-fix-e2fsck-E-unshare_blocks-when-there-are-no.patch
dpkg-source: info: applying
0015-e2freefrag-require-that-the-chunksize-must-be-greate.patch
dpkg-source: info: applying 0016-mke2fs-add-range-checks-for-E-desc_size.patch
dpkg-source: info: applying
0017-debugfs-return-after-printing-the-usage-message-in-t.patch
dpkg-source: info: applying
0020-mke2fs-fix-a-misindentation-in-the-man-page.patch
dpkg-source: info: applying
0021-libext2fs-fix-a-extent-tree-corruption-bug-in-ext2fs.patch
dpkg-source: info: applying
0022-libext2fs-fix-integer-overflow-in-ext2fs_punch-when-.patch
dgit ok: source built, results in e2fsprogs_1.47.2-3.dsc and
e2fsprogs_1.47.2-3_source.changes
zealot:e2fsprogs>
zealot:e2fsprogs> git commit -m TESTING INSTALL
[debian/master 8d9c53ec] TESTING
1 file changed, 4 insertions(+)
zealot:e2fsprogs> dgit build-source
Format `3.0 (quilt)', need to check/update patch stack
examining quilt state (multiple patches, linear mode)
dgit: base trees orig=27115b86317ff58b9611 o+d/p=eba09dad8707b197354f
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...
Commit Debian 3.0 (quilt) metadata
[dgit (13.14) quilt-fixup]
[master 56a72f3c] Commit Debian 3.0 (quilt) metadata
2 files changed, 24 insertions(+)
create mode 100644 debian/patches/testing.patch
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: verifying ./e2fsprogs_1.47.2.orig.tar.gz.asc
No acceptable signatures found
dpkg-source: warning: cannot verify upstream tarball signature for
./e2fsprogs_1.47.2.orig.tar.gz: no acceptable signature found
dpkg-source: info: building e2fsprogs using existing
./e2fsprogs_1.47.2.orig.tar.gz
dpkg-source: info: building e2fsprogs using existing
./e2fsprogs_1.47.2.orig.tar.gz.asc
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: building e2fsprogs in e2fsprogs_1.47.2-3.debian.tar.xz
dpkg-source: info: building e2fsprogs in e2fsprogs_1.47.2-3.dsc
changelog will contain changes since 1.47.2-3
dpkg-genchanges: warning: 'since' option specifies most recent version
'1.47.2-3', ignoring
dpkg-genchanges: info: not including original source code in upload
checking that e2fsprogs_1.47.2-3.dsc corresponds to HEAD
dpkg-source: warning: extracting unsigned source package
(/volatile/ian/d/e2fsprogs/../bpd/e2fsprogs_1.47.2-3.dsc)
dpkg-source: info: extracting e2fsprogs in unpacked
dpkg-source: info: unpacking e2fsprogs_1.47.2.orig.tar.gz
dpkg-source: info: unpacking e2fsprogs_1.47.2-3.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying
0001-e2fsck-fix-logic-bug-when-there-are-no-references-to.patch
dpkg-source: info: applying
0002-test-fix-expect-files-which-changed-after-EA-bugfix.patch
dpkg-source: info: applying
0003-libext2fs-teach-ext2fs_extent_set_bmap-to-update-ext.patch
dpkg-source: info: applying 0004-e2image.8-add-missing-comma.patch
dpkg-source: info: applying
0005-debugfs-byteswap-dirsearch-dirent-buf-on-big-endian-.patch
dpkg-source: info: applying 0006-fuse2fs-refuse-unsupported-features.patch
dpkg-source: info: applying
0007-fuse2fs-return-EOPNOTSUPP-when-we-don-t-recognize-a-.patch
dpkg-source: info: applying 0008-fuse2fs-remove-posix-acl-translation.patch
dpkg-source: info: applying
0009-fuse2fs-clamp-timestamps-that-are-being-written-to-d.patch
dpkg-source: info: applying
0010-fuse2fs-update-new-child-timestamps-during-mkdir-sym.patch
dpkg-source: info: applying 0011-fuse2fs-disable-renameat2.patch
dpkg-source: info: applying
0012-debugfs-abort-reading-a-file-on-failure-when-dumping.patch
dpkg-source: info: applying 0013-mke2fs-disallow-O-verity-without-extents.patch
dpkg-source: info: applying
0014-e2fsck-fix-e2fsck-E-unshare_blocks-when-there-are-no.patch
dpkg-source: info: applying
0015-e2freefrag-require-that-the-chunksize-must-be-greate.patch
dpkg-source: info: applying 0016-mke2fs-add-range-checks-for-E-desc_size.patch
dpkg-source: info: applying
0017-debugfs-return-after-printing-the-usage-message-in-t.patch
dpkg-source: info: applying
0020-mke2fs-fix-a-misindentation-in-the-man-page.patch
dpkg-source: info: applying
0021-libext2fs-fix-a-extent-tree-corruption-bug-in-ext2fs.patch
dpkg-source: info: applying
0022-libext2fs-fix-integer-overflow-in-ext2fs_punch-when-.patch
dpkg-source: info: applying testing.patch
dgit ok: source built, results in e2fsprogs_1.47.2-3.dsc and
e2fsprogs_1.47.2-3_source.changes
zealot:e2fsprogs> git --no-pager show
commit 56a72f3c2fb034a77c92af96b1d56cc1b1687681 (HEAD -> debian/master)
Author: Ian Jackson <[email protected]>
Date: Thu Feb 12 17:30:15 2026 +0000
Commit Debian 3.0 (quilt) metadata
[dgit (13.14) quilt-fixup]
diff --git a/debian/patches/series b/debian/patches/series
index 36a98306..9e0d5cf5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -18,3 +18,4 @@
0020-mke2fs-fix-a-misindentation-in-the-man-page.patch
0021-libext2fs-fix-a-extent-tree-corruption-bug-in-ext2fs.patch
0022-libext2fs-fix-integer-overflow-in-ext2fs_punch-when-.patch
+testing.patch
diff --git a/debian/patches/testing.patch b/debian/patches/testing.patch
new file mode 100644
index 00000000..70500b30
--- /dev/null
+++ b/debian/patches/testing.patch
@@ -0,0 +1,23 @@
+From: Ian Jackson <[email protected]>
+Date: Thu, 12 Feb 2026 17:28:59 +0000
+X-Dgit-Generated: 1.47.2-3 8d9c53ecc64b47267c3ac4380eaadd0f547796d3
+Subject: TESTING
+
+
+---
+
+diff --git a/INSTALL b/INSTALL
+index 2dd08f53..c664e8e9 100644
+--- a/INSTALL
++++ b/INSTALL
+@@ -1,6 +1,10 @@
+ To install the second extended file system management programs,
+ just follow the steps:
+
++
++TESTING TESTING
++
++
+ 1) Change directory into the top of the e2fsprogs source tree
+
+ 2) Create a build directory and cd into it:
zealot:e2fsprogs>
--
Ian Jackson <[email protected]> These opinions are my own.
Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.