Your message dated Thu, 21 Mar 2019 10:04:06 +0000
with message-id <[email protected]>
and subject line Bug#924478: fixed in git-buildpackage 0.9.14
has caused the Debian Bug report #924478,
regarding gbp pq import regression: duplicates MIME-Version, Content-Type, 
Content-Transfer-Encoding as pseudo-header
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.)


-- 
924478: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=924478
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: git-buildpackage
Version: 0.9.13
Severity: normal
Tags: patch

Steps to reproduce:

* Have a package in git, with patches containing non-ASCII metadata.
  Good examples include https://anonscm.debian.org/git/pkg-utopia/policykit.git
  master, at commit 4f1d21c3 (debian/0.105-25), and
  https://salsa.debian.org/gnome-team/gnome-keyring.git debian/buster,
  at commit ab353ae9 (debian/3.28.2-5).
  The same issue seems to be visible in the unblock diff quoted in
  <https://lists.debian.org/debian-release/2019/03/msg00456.html>,
  so this isn't only affecting me.
* gbp pq drop
* gbp pq import
* Look at git log. In policykit-1, affected commits include
  "CVE-2015-3218: backend: Handle invalid object paths in
  RegisterAuthenticationAgent". In gnome-keyring, affected commits include
  "gkm-mock: Also store objects in the order they are taken".
* gbp pq export
* Look at the patches. In policykit-1, affected patches include
  debian/patches/0.113/00git_invalid_object_paths.patch.
  In gnome-keyring, affected patches include
  debian/patches/gkm-mock-Also-store-objects-in-the-order-they-are-taken.patch.

Expected result:

No semantically significant changes to patches

Actual result:

`gbp pq import` treats the MIME-Version, Content-Type and
Content-Transfer-Encoding as though they were semantically significant
parts of the patch metadata (rather than merely an artifact of the email
transport) and prepends them to the long commit message:

> $ git log patch-queue/debian/buster
...
> commit 4169ffaaf4498facee2bbf8c65292761b1d740e2
> Author: Iain Lane <[email protected]>
> Date:   2019-01-30 14:34:51 +0000
> 
>     gkm-mock: Also store objects in the order they are taken
> 
>     MIME-Version: 1.0
>     Content-Type: text/plain; charset="utf-8"
>     Content-Transfer-Encoding: 8bit
> 
>     With GLib 2.59, the `test-login-auto` test fails:
...

As a result, after `gbp pq export`, the MIME-Version, Content-Type and
Content-Transfer-Encoding in the email header get duplicated into new
pseudo-headers, like this (note the same fields still present in the
email header, just before the added lines):

> $ git diff
...
> --- 
> a/debian/patches/gkm-mock-Also-store-objects-in-the-order-they-are-taken.patch
> +++ 
> b/debian/patches/gkm-mock-Also-store-objects-in-the-order-they-are-taken.patch
> @@ -5,6 +5,10 @@ MIME-Version: 1.0
>  Content-Type: text/plain; charset="utf-8"
>  Content-Transfer-Encoding: 8bit
>
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset="utf-8"
> +Content-Transfer-Encoding: 8bit
> +
>  With GLib 2.59, the `test-login-auto` test fails:
>
>    Gcr-CRITICAL **: 14:34:24.126: expected prompt property 'choice-label'

Proposed patch attached.

Regards,
    smcv

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'buildd-unstable'), (500, 
'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental-debug'), (1, 
'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-3-amd64 (SMP w/2 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), 
LANGUAGE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages git-buildpackage depends on:
ii  devscripts             2.19.3
ii  git                    1:2.20.1-2
ii  man-db                 2.8.5-2
ii  python3                3.7.2-1
ii  python3-dateutil       2.7.3-3
ii  python3-pkg-resources  40.8.0-1
ii  sensible-utils         0.0.12

Versions of packages git-buildpackage recommends:
ii  cowbuilder        0.88
ii  pbuilder          0.230.2
ii  pristine-tar      1.46
ii  python3-requests  2.21.0-1
ii  sbuild            0.78.1-1

Versions of packages git-buildpackage suggests:
pn  python3-notify2  <none>
ii  sudo             1.8.27-1
ii  unzip            6.0-22

-- no debconf information
>From 7f74448f8688d18e87b74543041392dd32261d15 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Wed, 13 Mar 2019 10:19:03 +0000
Subject: [PATCH] Dep3Patch: Ignore MIME headers

Otherwise, if we import a patch containing non-ASCII characters
exported by `gbp pq export` or `git format-patch` using DEP-3
syntax, we'd misinterpret these fields as semantically significant
and copy them into pseudo-headers, causing them to be duplicated
in the commit's long description.

Signed-off-by: Simon McVittie <[email protected]>
---
 gbp/patch_series.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gbp/patch_series.py b/gbp/patch_series.py
index c47f4b6..7b561e6 100644
--- a/gbp/patch_series.py
+++ b/gbp/patch_series.py
@@ -255,6 +255,16 @@ class Dep3Patch(Patch):
                 changes += add_date(v)
             elif k == 'long_desc':
                 pass
+            elif k in (
+                'content-transfer-encoding',
+                'content-type',
+                'mime-version',
+            ):
+                # These can appear in `git format-patch` or `gbp pq export`
+                # output. They are not semantically significant: they're
+                # part of the encoding of the patch as an email, rather
+                # than real patch metadata.
+                pass
             else:
                 pseudo_headers += ''.join(v)
                 changes += 1
-- 
2.20.1


--- End Message ---
--- Begin Message ---
Source: git-buildpackage
Source-Version: 0.9.14

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: Thu, 21 Mar 2019 10:33:34 +0100
Source: git-buildpackage
Architecture: source
Version: 0.9.14
Distribution: unstable
Urgency: medium
Maintainer: Guido Günther <[email protected]>
Changed-By: Guido Günther <[email protected]>
Closes: 919677 923087 924478
Changes:
 git-buildpackage (0.9.14) unstable; urgency=medium
 .
   [ Michael Prokop ]
   * [4142928] docs: update examples for pristine-tar usage, requiring commit
     action
     (Closes: #919677)
 .
   [ Roberto C. Sánchez ]
   * [d3f67c8] docs: Fix typo
 .
   [ Gabriel Filion ]
   * [34b9da1] Disable PGP signatures when retrieving list of commits
     (Closes: #923087)
 .
   [ Guido Günther ]
   * [3e3458f] setup.py: Move version parser into setup.py.
     This makes sure it ends up in the sdist tarball.
 .
   [ Simon McVittie ]
   * [74669f0] Dep3Patch: Ignore MIME headers.
     Otherwise, if we import a patch containing non-ASCII characters exported
     by `gbp pq export` or `git format-patch` using DEP-3 syntax, we'd
     misinterpret these fields as semantically significant and copy them into
     pseudo-headers, causing them to be duplicated in the commit's long
     description. (Closes: #924478)
Checksums-Sha1:
 a4facd832351a1ddf591be07c7e774019a1f2689 2277 git-buildpackage_0.9.14.dsc
 ed0bfd61cba44b9768f8ed8c39ed40e574418f53 2361976 git-buildpackage_0.9.14.tar.xz
 d7ab27f786a40180ff29a21a28834047fede813b 12713 
git-buildpackage_0.9.14_amd64.buildinfo
Checksums-Sha256:
 93db4dfbd1e32a85a90f1d1d97242d37f6dc2a8e63e0d45f6c146094789772d6 2277 
git-buildpackage_0.9.14.dsc
 5dbb6b2afa8ed973da2e7df45989dbc97e9dfba9051bb4d6401c44ed8b6f04eb 2361976 
git-buildpackage_0.9.14.tar.xz
 6c63cc753371b8aed19faf25ba47141c2abeb800bee3eee61208d6416939fa7f 12713 
git-buildpackage_0.9.14_amd64.buildinfo
Files:
 dd407ee1b6cff185474d8319776d1598 2277 vcs optional git-buildpackage_0.9.14.dsc
 5ea4d8f5485d8bfdcc9ce31484cba1dd 2361976 vcs optional 
git-buildpackage_0.9.14.tar.xz
 1e71f00126df0c1dee3993276bcbe1f4 12713 vcs optional 
git-buildpackage_0.9.14_amd64.buildinfo

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

iQIzBAEBCAAdFiEEvHzQcjh1660F3xzZB7i3sOqYEgsFAlyTXyUACgkQB7i3sOqY
Egs4hQ/+KRVCrGQQ5OVeeMo5pAk0nFPqUUSaoGfQKjUCFY+RWnJ3bj4Ue/TU4HQ3
C7bDJmd9nbo8KM1IcyOxBK4WEdhZxpob60V8qA6F4PgxEy6wm0VRNKdMAu7KGzPH
Y21BKdEYcrqC37qEn3Fk4XgP1TBhX/7dFr186yYRQHO5kascUITn9adz3rYFAaSb
eCBwN4/43UqqrwRI90wtHz/CbtOT0seLocwKt4hC7j7LrfD/FkSNiHdT/NhBzox8
ahrPkQ5SruUNLZQMS7hr94SHCR3upN9FiRQnAoxyM0nm8zYOkPXBmL0owmznu636
06ODlLC81KT0cqyax/OdFgv/l08uG9jPXqoRSEo8L2xO2SRO6lDDOBgLRxZxzp97
1DZrDzPXHspqAI5Jjs/0G09Ixqw2g+gHqZcBEqNKgswlE/XSSe6G9PV14I4qjDd/
0zTqHMdfJj7fCkCKNWpOnIFuqUFghr0bPgCvmxoTxUf6VHv4yMDWnZRNiEt5QR4R
QSHPvdPXVXlXzHbn8DVb8++z5vTsnfvKq3he7nB104byZqptXZwmr0x8hpfu9Ygx
3mg1kp03XeUlwwX8iTmrQZa9GM4mU/5LAEaRm/yPDkdp8sy4booXHWKtmDObiEAR
178NMkzWvH+pVS3T7YbUc5jOGNLo7IT30NHOSS3yPkcjq1nSTMs=
=xfcH
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to