Note:
I'm cloning this bug a couple of times for clearly defined
action items. Let us leave this original bug #1107219 for user
support, and discussion of further options.
Andrea Pappacoda writes ("Bug#1107219: git-debpush: upload failing when source has submodules"):
I'm glad you're enjoying it :-).
Sadly, git submodules are a complete disaster. I wrote a blog post
with a rant: https://diziet.dreamwidth.org/14666.html
But, I think our tooling could have served you better. Let me try to
give you some advice, and discuss possible improvement options.
Aha.
Yes, that is the workflow we would normally recommend. It is more
faithful and more traceable to upstream. Unfortunately the
faithfulness also exposes you to the submodules.
This is a reasonable thing for you to have attempted, even though it
was never going to work.
Our tooling ought to have detected this problem much sooner; and,
I think there are opportunities for making the workaround more
convenient.
tag2upload uses dgit to do a lot of the work, and this error is
basically #726953 "dgit fails with submodules".
I don't know your local building workflow, but many approaches for
local builds omit certain important consistency checks.
One of the key properties of our git transition tools, like tag2upload
and dgit, is that the source package (.dsc) is *completely identical*
to the (canonical) git view. That makes it possible to replace .dsc
with git without changing what source code you get, to convert in both
directions, and so on.
For a git submodule it's not quite clear what "identical" means here,
but it probably means the submodule is populated. This is discussed
at much greater length in another bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726953#64
With our current tooling, I suggest treating the submodule the same
way we would treat nonfree materials. Ie, this part of the workflow
manpage:
https://manpages.debian.org/bookworm/dgit/dgit-maint-debrebase.7.en.html#DFSG-non-free:_When_upstream_tags_releases_in_git
It's not quite clear to me what you mean by "repacked". With
tag2upload you do not, in fact, ever need to have a terball on your
system. So you don't need to run git deborig.
As for our tooling and docs:
* git-debpush should definitely reject a submodule.
That would have detected the problem locally. (clone -2)
* git-debrebase should detect upstream trees that have
submodules and call that situation a snag. (clone -3)
* #726953 discusses more comprehensive submodule support
for dgit (which, if implemented, would extend to tag2upload too).
* Is there good tooling for doing DFSG-filtering entirely in git?
Eg is there some git tooling that will read uscan config?
* We need workflow manpages for tag2upload. Separately we want more
opinionated documentation of a git-first flow - that does not
involve gbp import-orig.
* I'm tempted to suggest an interim version of #726953 that makes it
possible to simply filter out submodules during canonicalisation.
That would improve convenience when upstream has submodules but the
Debian package wants to ignore all of them completely. How common
do we think this situation is?
(Note that it's easy to speak of doing this "as a quilt mode" or
"in quilt fixup" but it's not a "3.0 (quilt)" thing - it might
apply to native format source packages.)
Ian.