#720448 git-dpm update-patches wipes out dep-3 headers on previous patches

#720448#5
Date:
2013-08-22 02:11:12 UTC
From:
To:
Dear Maintainer,

When ever I call git-dpm update-patches for a new patch,
the dep-3 headers on old patches get replaced with inferior
non dep-3 stuff.

Here is sample part of diff from such an update-patches
----------------------
- Description: Harden libarary against buffer overflow attack against sprintf
-  calls to sprintf with '%s' in format replaced with snprint calls.
- Forwarded: privately
- Author: Paul Elliott <pelliott@blackpatchpanel.com>
++From c722a348197dce0c48c23e5ed5438d92d229944a Mon Sep 17 00:00:00 2001
++From: Paul Elliott <pelliott@blackpatchpanel.com>
++Date: Wed, 21 Aug 2013 02:09:27 -0500
++Subject: =?UTF-8?q?harden=20library=20against=20buffer=20overflow=20attack?=
++ =?UTF-8?q?s=20on=20sprintf=0Acalls=20to=20sprintf=20with=20'%s'=20in=20fo?=
++ =?UTF-8?q?rmat=20string=20replaced=20with=20snprintf?=
----------------------

Notice that the lines deleted were dep-3, because I hand edited it
to be dep-3. When the new patch installed, this dep-3 was
removed and replaced with unreadable stuff that is not dep-3!

dep-3 patch headers are highly recommended but not required by debian.
http://dep.debian.net/deps/dep3/

#720448#10
Date:
2013-08-28 19:04:30 UTC
From:
To:
* Paul Elliott <pelliott@blackpatchpanel.com> [130822 04:15]:

I cannot reproduce that here. Do you have anything active that could
cause git-format's patch to garble that subject line (or rather why does
it try to put the newline =0A in the subject itself?)

If you use update-patches you have to put the dep-3 headers in the
commit message, so they end up in the generated patches.
a Subject: for parts of the description.

        Bernhard R. Link

#720448#15
Date:
2013-08-29 18:26:12 UTC
From:
To:
* Paul Elliott <pelliott@blackpatchpanel.com> [130829 03:35]:

Yes, it is helpful. That seems to be a ugly effect of git wanting to
allow multi-line short descriptions.

As a workaround till this is fixedI suggest starting each commit with
a single line followed by an empty line. (As suggested by the DISCUSSION
section of git-commit(1)).

Thanks for your example,
        Bernhard R. Link

#720448#20
Date:
2013-08-29 20:21:21 UTC
From:
To:
	"A header always ends on the first empty line."

So the result would loose some of the dep-3.

#720448#25
Date:
2013-08-30 16:29:28 UTC
From:
To:
* Paul Elliott <pelliott@blackpatchpanel.com> [130829 22:24]:

Please take a look at http://dep.debian.net/deps/dep3/
at the the "Fix regex problems" sample DEP-3 header.
That's the kind of DEP-3 header you can create with git-dpm.

        Bernhard R. Link

#720448#30
Date:
2014-09-05 14:04:48 UTC
From:
To:
I'm not seeing the headers get wiped out, but I think I do see a non-DEP-3
compliant header.  From a recent git-dpm experiment with tox:

debian/patches/0003-Various-fixes-to-get-some-semblance-of-the-test-suit.patch
From d6134c49c0cceacc1dd461e8f1573cfc73579016 Mon Sep 17 00:00:00 2001
From: Barry Warsaw <barry@debian.org>
Date: Sat, 21 Jun 2014 18:44:45 -0400
Subject: Various fixes to get some semblance of the test suite passing at

 package build time.  This isn't perfect because tox's tests depend on tox
 being built and installed - a catch 22.  However, we can do a lot and there
 are DEP-8 tests to handle the rest of it.
Forwarded: not-needed
---

Is the "unix-from" header allowed by DEP-3?  This is not an "RFC-2822-like"
field.