Your message dated Wed, 31 May 2023 13:04:19 +0000
with message-id <[email protected]>
and subject line Bug#1030534: fixed in git-buildpackage 0.9.31
has caused the Debian Bug report #1030534,
regarding gbp pq import fails with series file containing form feed
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1030534: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030534
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: git-buildpackage
Version: 0.9.30
Severity: normal
File: /usr/lib/python3/dist-packages/gbp/scripts/supercommand.py

Steps to reproduce:

   dget 
https://deb.debian.org/debian/pool/main/p/python-coverage/python-coverage_6.5.0+dfsg1-2.dsc
   dpkg-source --skip-patches -x python-coverage_6.5.0+dfsg1-2.dsc
   cd python-coverage-6.5.0+dfsg1/
   git init
   git add -Af .
   git commit -m import
   # Now we are on a patches-unapplied packaging branch (without .pc
   # directory, at least in the version of dpkg-source I have here)
   gbp pq import

Expected behaviour:

   Imports the patch queue, leaving me on patch-queue/master,
   with two patches applied.

Actual behaviour:

   Python stack backtrace.  (Transcript below.)

   It leaves me on a broken patch-queue/master branch - one without
   the patches applied.  Even to go back to where I was before,
   I must
      git checkout master; git-branch -D patch-queue/master

The root cause is that the debian/patches/series file contains a line
containing only a form feed (ctrl-L).  I think this is deranged.
Perhaps you don't want to support it.  Maybe you want to at least
detect and reject it

Empirically, deleting the form feed works around the problem.


Background:

As you know: when dgit must import a .dsc (no proper dgit branch
available) that is in "3.0 (quilt)" format it uses gbp pq import to
convert the patches in the source package to a series of commits.

Because dgit wants to be able to work on every package ever uploaded
and accepted by Debian, this means that dgit in principle exposes gbp
pq to every strange package.  This resulted in #1030093, where
Peter Green reports that dgit failed on python-coverage_6.5.0+dfsg1-2.dsc.

Maybe you recall that dgit already has a horrific workaround mode:
when it has trouble importing a package, it resorts to running gbp pq
with a fake version of "git apply" (which redirects to dpkg-source).

I have added an additional countermeasure to this "absurd git-apply"
mode: dgit now also launders the series file to eliminate anything
that doesn't look reasonable.  So it is not a problem for dgit if gbp
pq continues to break on these strange series files.

But I thought you would appreciate the report.


Transcript of run with --verbose:

$ gbp pq import --verbose
gbp:debug: ['git', 'rev-parse', '--show-cdup']
gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
gbp:debug: ['git', 'rev-parse', '--git-dir']
gbp:debug: ['git', 'symbolic-ref', 'HEAD']
gbp:debug: ['git', 'show-ref', 'refs/heads/master']
gbp:debug: ['git', 'status', '--porcelain']
gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/patch-queue/master']
gbp:debug: ['git', 'log', '--pretty=format:%H', '--no-show-signature', '-1', 
'--first-parent', '--']
gbp:info: Trying to apply patches at '9a4d19efaf43dc9e010ae54c3aaf199d97cd577d'
gbp:debug: ['git', 'branch', 'patch-queue/master', 
'9a4d19efaf43dc9e010ae54c3aaf199d97cd577d']
gbp:debug: ['git', 'symbolic-ref', 'HEAD']
gbp:debug: ['git', 'show-ref', 'refs/heads/master']
gbp:debug: ['git', 'checkout', 'patch-queue/master']
gbp:debug: Applying 
/home/ian/things/Dgit/Bugs/1030093/gbp/python-coverage-6.5.0+dfsg1/debian/patches/01.omit-resource-files-from-distutils-setup.patch
gbp:debug: ['git', 'mailinfo', '-k', '/tmp/gbp_ohuew56u', '/dev/null']
gbp:debug: ['git', 'apply', '--index', 
'/home/ian/things/Dgit/Bugs/1030093/gbp/python-coverage-6.5.0+dfsg1/debian/patches/01.omit-resource-files-from-distutils-setup.patch']
gbp:debug: ['git', 'write-tree']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'HEAD']
gbp:debug: ['git', 'commit-tree', 'be024c39ac0f909b34cf31fd9835175660a37d4a', 
'-p', '9a4d19efaf43dc9e010ae54c3aaf199d97cd577d']
gbp:debug: ['git', 'update-ref', '-m', 'gbp-pq import 
/home/ian/things/Dgit/Bugs/1030093/gbp/python-coverage-6.5.0+dfsg1/debian/patches/01.omit-resource-files-from-distutils-setup.patch',
 'HEAD', '85a324791cd65b1852ae8373a6b152fa97143a2d']
gbp:debug: Applying 
/home/ian/things/Dgit/Bugs/1030093/gbp/python-coverage-6.5.0+dfsg1/debian/patches/02.rename-public-programs.patch
gbp:debug: ['git', 'mailinfo', '-k', '/tmp/gbp_3ahdctdw', '/dev/null']
gbp:debug: ['git', 'apply', '--index', 
'/home/ian/things/Dgit/Bugs/1030093/gbp/python-coverage-6.5.0+dfsg1/debian/patches/02.rename-public-programs.patch']
gbp:debug: ['git', 'write-tree']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'HEAD']
gbp:debug: ['git', 'commit-tree', '3741634a3978ff6c1e920b4eef9b80097ff465f8', 
'-p', '85a324791cd65b1852ae8373a6b152fa97143a2d']
gbp:debug: ['git', 'update-ref', '-m', 'gbp-pq import 
/home/ian/things/Dgit/Bugs/1030093/gbp/python-coverage-6.5.0+dfsg1/debian/patches/02.rename-public-programs.patch',
 'HEAD', '35d1ffd97c6cf0b070bf0f15591940446973a88c']
gbp:debug: Applying 
/home/ian/things/Dgit/Bugs/1030093/gbp/python-coverage-6.5.0+dfsg1/debian/patches/
Traceback (most recent call last):
  File "/bin/gbp", line 149, in <module>
    sys.exit(supercommand())
             ^^^^^^^^^^^^^^
  File "/bin/gbp", line 145, in supercommand
    return module.main(args)
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gbp/scripts/pq.py", line 499, in main
    import_pq(repo, current, options)
  File "/usr/lib/python3/dist-packages/gbp/scripts/pq.py", line 372, in 
import_pq
    num = import_quilt_patches(repo, branch, series, tries,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gbp/scripts/pq.py", line 335, in 
import_quilt_patches
    apply_and_commit_patch(repo, patch, maintainer, patch.topic, name)
  File "/usr/lib/python3/dist-packages/gbp/scripts/common/pq.py", line 316, in 
apply_and_commit_patch
    author = {'name': patch.author,
                      ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gbp/patch_series.py", line 181, in author
    return self._get_info_field('author')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gbp/patch_series.py", line 164, in 
_get_info_field
    self._read_info()
  File "/usr/lib/python3/dist-packages/gbp/patch_series.py", line 196, in 
_read_info
    super(Dep3Patch, self)._read_info()
  File "/usr/lib/python3/dist-packages/gbp/patch_series.py", line 62, in 
_read_info
    self._read_git_mailinfo()
  File "/usr/lib/python3/dist-packages/gbp/patch_series.py", line 81, in 
_read_git_mailinfo
    for line in open(self.path, 'rb'):
                ^^^^^^^^^^^^^^^^^^^^^
IsADirectoryError: [Errno 21] Is a directory: 
'/home/ian/things/Dgit/Bugs/1030093/gbp/python-coverage-6.5.0+dfsg1/debian/patches/'
$

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-0.deb10.16-amd64 (SMP w/8 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages git-buildpackage depends on:
ii  devscripts             2.22.2
ii  git                    1:2.39.1-0.1
ii  man-db                 2.11.2-1
ii  python3                3.11.1-3
ii  python3-dateutil       2.8.2-1
ii  python3-pkg-resources  66.1.1-1
ii  python3-yaml           6.0-3+b2
ii  sensible-utils         0.0.17+nmu1

Versions of packages git-buildpackage recommends:
ii  cowbuilder        0.89
ii  pbuilder          0.231
ii  pristine-tar      1.50
ii  python3-requests  2.28.1+dfsg-1

Versions of packages git-buildpackage suggests:
pn  python3-notify2  <none>
ii  sudo             1.9.12p2-1
ii  unzip            6.0-27

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: git-buildpackage
Source-Version: 0.9.31
Done: Guido Günther <[email protected]>

We believe that the bug you reported is fixed in the latest version of
git-buildpackage, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guido Günther <[email protected]> (supplier of updated git-buildpackage 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 [email protected])


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

Format: 1.8
Date: Wed, 31 May 2023 10:59:35 +0200
Source: git-buildpackage
Architecture: source
Version: 0.9.31
Distribution: experimental
Urgency: medium
Maintainer: Guido Günther <[email protected]>
Changed-By: Guido Günther <[email protected]>
Closes: 968329 1030534 1032932 1035838
Changes:
 git-buildpackage (0.9.31) experimental; urgency=medium
 .
   [ Guido Günther ]
   * Upload to experimental.
     gbp-import-orig when used with --upstream-vcs-tag now strips extensions 
like
     'dfsg', 'ds' or 'repack' from upstream version numbers and handles the
     'really' convention. Let's test this in experimental before uploading to
     unstable.
   * [cf5b2ad] config: Print sensible error message on duplicate sections.
     Don't confuse users with a backtrace.
   * [a420bc9] gbp/deb/git: Don't strip ~ patterns unconditionally.
     They're needed when packaging upstream beta versions. So use
     a positive list instead.
     Fixes: a5575e178639a8e167c7f3090263a03b362e05e7
   * [9c4841e] d/rules: Check for DEB_BUILD_OPTIONS
   * [e358254] dch: Catch d/control parse errors too.
     Print a clear error message instead of hiding it in the backtrace.
     Thanks to Mechtilde Stehmann for the report
   * [4f909d2] pq: Roll back on all errors.
     Drop the pq branch on all exceptions not only on the ones gbp throws
     itself. This makes sure the result is consistent in such situations (no
     patches applied).
   * [8dfec59] patch_series: Ignore whitespace lines.
     E.g. python-coverage has a form feed in the series file.
     Thanks to Ian Jackson for the detailed report (Closes: #1030534)
   * [c72464b] gbp-upload: Check if remote exists
 .
   [ Akbarkhon Variskhanov ]
   * [afcd15b] create-remote-repo.xml: Fix minor typo
 .
   [ Samuel Henrique ]
   * [11728ec] rpm/policy: Add missing dash before version in RPM changelog 
header.
 .
   [ Huw Jones ]
   * [3434531] repository.create_tag: Explicitly don't sign when sign=False.
     This avoids `tag.gpgsign = true` from git-config leaking through.
     (Closes: #1032932)
 .
   [ Richard Laager ]
   * [29370b5] import-orig: Parse various Debian version patterns.
     This parses common Debian version patterns into the "real" upstream
     version.  For example, 1.1.8+dfsg1 becomes 1.1.8.  This strips epochs,
     handles the +really convention, finds git revisions, and strips other +
     or ~ patterns. (Closes: #968329)
 .
   [ Junichi Uekawa ]
   * [f0e9d41] docs: gbp-pq manpage: refer to the moved location
     gbp-pq manpage refers to a page that says the content has moved.
     I think it can refer to the local html copy[1], or the internet copy.
     [1] /usr/share/doc/git-buildpackage/manual-html/gbp.patches.html
     (Closes: #1035838)
Checksums-Sha1:
 e18c5f44c56c6c8c8c6c3a62b2300f7b48038947 2372 git-buildpackage_0.9.31.dsc
 0d37aad346857f61cdc57129108ea4aed84ad3f4 3532384 git-buildpackage_0.9.31.tar.xz
 917e0095c3ca650aa6aece10e91f2f085ac4f323 13345 
git-buildpackage_0.9.31_amd64.buildinfo
Checksums-Sha256:
 cc87f1ede300deacc44386494aac30d9fd02dd0f22e5a17543207b859f321df6 2372 
git-buildpackage_0.9.31.dsc
 cb293e00e425e7e9c3af0a41154602be012d78fd9a6ffecd53b7f702c72436a8 3532384 
git-buildpackage_0.9.31.tar.xz
 d3ae2bedc7a039c3f4aab24888884ae2c9582c51039e41c919048ec5aa3de912 13345 
git-buildpackage_0.9.31_amd64.buildinfo
Files:
 8dd024d7b687b43eaf529e0e77bebb22 2372 vcs optional git-buildpackage_0.9.31.dsc
 ea33bf627378dfa63f788dfd95b57215 3532384 vcs optional 
git-buildpackage_0.9.31.tar.xz
 0f3669c6c4ad2149ddcbf591aa645d82 13345 vcs optional 
git-buildpackage_0.9.31_amd64.buildinfo

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

iQIzBAEBCAAdFiEEY/bM35YinQkoayrDJb+GUkr8weMFAmR3QbIACgkQJb+GUkr8
weOyLA/9EDwiWO0vA4yYphh/A5fTDVGuKGnIG2F7eAE0LZKMqBOS4wCgsxpLWYDj
7g6zMP5kjSelvOmFfkIt4xHk9gRDVaxoHS21vNvtVjYKriIWFPuu6erhiIs1ErQ/
FmdtjfldmsScQ/9QELHIyYM9TkuUQtfCBiM1k/9Q6nk+TJfeWGsD3+vEfgsS0Svh
PeY0K1+jlmQ26NbiIL0LRh1wqK1JjkcmGp/HRfs9m1QbfwO8Ab4eSwyu5u7Rg3MW
GxXCQYY5QE0Sw68MJWXQFTyzK5lrbGaJ7rwCVDHiEqA0UjQ66UfxdS5qzLxk2Xmn
cUI5IJBb78O87KFMcKgoM8n82i8hj8hthNIk/BqR5kUs49+bQ5qOUMORWBjmXeOc
66xeIFmUsmlL9DJak5JG0ZDWEgZhG1VNSUcfXWnrtzjQ+h1WnQY4eNVt9IBrawNp
4bTN0MuKY/Smzju3aUk5VJ6JIbfby2YJufYSDo+nKvArT03JnvOcxQZWK1hxrN6E
voEgIoEG+58ma9RiRDUbwYWGg6RDjk+OW7SisnjhBWGT9DDVF2GQ/gTgOvpDD5YM
5i+ZDg/dpFDGlI6wNP7MF3zHOh0EyYieSh4xnihHe9QmgBDic8YvPoK5hqFcUEcs
/D/fyzVvelLsP6ywILErd3lsfZenWiR9Fzwf8DLOq/K2AkQbLH4=
=+cAR
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to