#968315 dgit fails at serializing quilt patches in pam source

Package:
dgit
Source:
dgit
Submitter:
Steve Langasek
Date:
2021-09-07 23:00:03 UTC
Severity:
normal
Tags:
#968315#5
Date:
2020-08-12 19:58:12 UTC
From:
To:
I've been working on converting the pam source package to properly use 3.0
(quilt) format where patches are in debian/patches, instead of the legacy
system that uses a different directory for patches and applies them at build
time with quilt.

Unfortunatley, dgit is throwing errors at me about quilt serialization.  I
initially tried to move the entire patch series to debian/patches in one go
and hit the error; then since it talked about "serialization" I tried
moving them one at a time, but hit the same error again on the 4th patch.

$ dgit build
Format `3.0 (quilt)', need to check/update patch stack
dpkg-buildpackage: info: source package pam
dpkg-buildpackage: info: source version 1.4.0-1
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Steve Langasek <vorlon@debian.org>
 fakeroot debian/rules clean
dh clean --with quilt,autoreconf
dh: warning: Compatibility levels before 10 are deprecated (level 9 in use)
   dh_quilt_unpatch
Removing patch 007_modules_pam_unix
Removing modules/pam_unix/obscure.c
Restoring modules/pam_unix/pam_unix.8.xml
Restoring modules/pam_unix/Makefile.am
Restoring modules/pam_unix/pam_unix.8
Restoring modules/pam_unix/support.h
Restoring modules/pam_unix/README
Restoring modules/pam_unix/pam_unix_passwd.c

Removing patch make_documentation_reproducible.patch
Restoring configure.ac

Removing patch pam_unix_dont_trust_chkpwd_caller.patch
Restoring modules/pam_unix/unix_chkpwd.c

Removing patch pam_unix_fix_sgid_shadow_auth.patch
Restoring modules/pam_unix/passverify.c

No patches applied
   dh_clean
dh_clean: warning: Compatibility levels before 10 are deprecated (level 9 in use)
examining quilt state (multiple patches, linear mode)
gzip: warning: GZIP environment variable is deprecated; use an alias or script
Tree already contains .pc - will use it then delete it.
dgit: base trees orig=058b0c4bd5049b9214d5 o+d/p=da5e6a7de7ec5d1c7619
dgit: quilt differences: src:  ## orig ##     gitignores:  == orig ==
dgit: quilt differences:      HEAD ## o+d/p               HEAD == o+d/p
starting quiltify (multiple patches, linear mode)

dgit: error: quilt fixup cannot be linear.  Stopped at:
dgit:  6f4c661d..e8d14c81: changed .pc/007_modules_pam_unix/.timestamp,.pc/007_modules_pam_unix/modules/pam_unix/Makefile.am,.pc/007_modules_pam_unix/modules/pam_unix/README,.pc/007_modules_pam_unix/modules/pam_unix/obscure.c,.pc/007_modules_pam_unix/modules/pam_unix/pam_unix.8,.pc/007_modules_pam_unix/modules/pam_unix/pam_unix.8.xml,.pc/007_modules_pam_unix/modules/pam_unix/pam_unix_passwd.c,.pc/007_modules_pam_unix/modules/pam_unix/support.h,.pc/applied-patches,debian/patches/007_modules_pam_unix,debian/patches/series

dgit: Maybe you need one of --[quilt=]gbp --[quilt=]dpm --quilt=unapplied ?
dgit: Maybe orig tarball(s) are not identical to git representation?

dgit: error: quilt history linearisation failed.  Search `quilt fixup' in dgit(7).
$

It's not an unapplied tree; I probably would've preferred that, but
--quilt=unapplied was useless here and I only started to make any progress
at all when I applied the patches to the tree and committed.

I've pushed the branch to
https://salsa.debian.org/vorlon/pam/-/tree/dgit-quilt-breakage for
inspection if that helps.

#968315#10
Date:
2020-08-12 21:05:09 UTC
From:
To:
I tried that first as well and it didn't work either (actually I think it
failed at an earlier point).  I'll go back and double-check.

#968315#15
Date:
2020-08-12 20:39:58 UTC
From:
To:
Steve Langasek writes ("Bug#968315: dgit fails at serializing quilt patches in pam source"):
...
..

I haven't actually looked at your branch or anything but just looking
at this error message:

I think if you delete the .pc directory from your git tree it will be
directly in dgitc format.

If you want to keep the .pc directory in your master branch then dgit
doesn't support that right now.  I'm not sure whether there ought to
be a quilt mode for "maintainer view has .pc directory".

Ian.