| 1 |
[[meta title="DEP-3: Patch Tagging Guidelines"]] |
[[!meta title="DEP-3: Patch Tagging Guidelines"]] |
| 2 |
|
|
| 3 |
Title: Patch Tagging Guidelines |
Title: Patch Tagging Guidelines |
| 4 |
DEP: 3 |
DEP: 3 |
| 5 |
State: DRAFT |
State: CANDIDATE |
| 6 |
Date: 2009-06-12 |
Date: 2009-11-26 |
| 7 |
Drivers: Raphael Hertzog <hertzog@debian.org> |
Drivers: Raphael Hertzog <hertzog@debian.org> |
| 8 |
URL: http://dep.debian.net/deps/dep3 |
URL: http://dep.debian.net/deps/dep3 |
| 9 |
Abstract: |
Abstract: |
| 31 |
upstream, if they are meant to be debian specific or not, etc.). Thus the |
upstream, if they are meant to be debian specific or not, etc.). Thus the |
| 32 |
first step is to include those information in the patches when they are |
first step is to include those information in the patches when they are |
| 33 |
available so that tools like the [Patch Tracking |
available so that tools like the [Patch Tracking |
| 34 |
System](http://patch-tracking.debian.net) can display them. |
System](http://patch-tracker.debian.org) can display them. |
| 35 |
|
|
| 36 |
Scope and application |
Scope and application |
| 37 |
--------------------- |
--------------------- |
| 47 |
|
|
| 48 |
Structure |
Structure |
| 49 |
--------- |
--------- |
| 50 |
The meta-information would be stored in a set of RFC-2822-like |
|
| 51 |
fields (the difference with RFC-2822 is that newlines are meaningful in |
The meta-information would be stored in one or two headers: sets of |
| 52 |
the Description field, they are not simple continuation characters). |
RFC-2822-like fields. (The difference with RFC 2822 is that newlines |
| 53 |
Those fields should start on the first non-empty line (after having |
are meaningful in the Description field, they are not simple |
| 54 |
stripped whitespace characters at the start and end of |
continuation characters). The first header should start on the first |
| 55 |
lines). |
non-empty line (after having stripped whitespace characters at the |
| 56 |
|
start and end of lines). |
| 57 |
|
|
| 58 |
For patch-systems like dpatch that require the patch to be a standalone |
For patch-systems like dpatch that require the patch to be a standalone |
| 59 |
script, the shebang line is ignored and it is possible to put those fields |
script, the shebang line is ignored and it is possible to put those fields |
| 63 |
they start with a space once "`#` " (hash followed by a space) has been |
they start with a space once "`#` " (hash followed by a space) has been |
| 64 |
stripped from the beginning. |
stripped from the beginning. |
| 65 |
|
|
| 66 |
The set of fields ends on the first empty line. Free-form comments can |
A header always ends on the first empty line. Free-form comments can |
| 67 |
follow and be used for any other information that does not fit in the |
follow and should be considered as supplementary lines of the long |
| 68 |
structured content. |
description (see detailed explanations of the field). A second header |
| 69 |
|
(the “pseudo-header”) can start on any new paragraph. A line |
| 70 |
|
containing 3 dashes (`---`) should stop the parsing: lines after it are |
| 71 |
|
not relevant part of the meta-information. |
| 72 |
|
|
| 73 |
Any parser that expect those fields in patch headers should also |
Any parser that expect those fields in patch headers should also |
| 74 |
accept non-structured content and simply consider the whole content |
accept non-structured content and simply append the non-structured |
| 75 |
to be the value of the `Description` field. |
content to the value of the `Description` field. |
| 76 |
|
|
| 77 |
|
All the meta-information must be UTF-8 encoded. When the patch itself |
| 78 |
|
contains non-UTF-8 characters, it's recommended to stick to ASCII for the |
| 79 |
|
meta-information. |
| 80 |
|
|
| 81 |
Standard fields |
Standard fields |
| 82 |
--------------- |
--------------- |
| 86 |
names are case-insensitive ("Fedora" and "fedora" refer to the same |
names are case-insensitive ("Fedora" and "fedora" refer to the same |
| 87 |
vendor). |
vendor). |
| 88 |
|
|
| 89 |
* `Description` (required) |
* `Description` or `Subject` (required) |
| 90 |
|
|
| 91 |
This obligatory field contains at least a short description on the |
This obligatory field contains at least a short description on the |
| 92 |
first line. Supplementary lines can be used to provide a longer |
first line. When `Subject` is used, it is expected that the long |
| 93 |
|
description is outside of the structured fields. With `Description` it |
| 94 |
|
is possible to embed them in the field using continuation lines. |
| 95 |
|
|
| 96 |
|
In both cases, the long description allows for a more verbose |
| 97 |
explanation of the patch and its history. |
explanation of the patch and its history. |
| 98 |
|
|
| 99 |
This field should explain why the patch is vendor-specicific (ex: |
This field should explain why the patch is vendor-specicific (ex: |
| 155 |
be "not-needed" to indicate that the patch must not be forwarded |
be "not-needed" to indicate that the patch must not be forwarded |
| 156 |
upstream (whereas "no" simply means that it has not yet been done). |
upstream (whereas "no" simply means that it has not yet been done). |
| 157 |
|
|
| 158 |
* `Author` (optional) |
* `Author` or `From` (optional) |
| 159 |
|
|
| 160 |
This field can be used to record the name and email of the patch author |
This field can be used to record the name and email of the patch author |
| 161 |
(ex: "`John Bear <foo@bar.net>`"). Its usage is recommended when the |
(ex: "`John Bear <foo@example.com>`"). Its usage is recommended when the |
| 162 |
patch author did not add copyright notices for his work in the patch |
patch author did not add copyright notices for his work in the patch |
| 163 |
itself. It's also a good idea to add this contact information when |
itself. It's also a good idea to add this contact information when |
| 164 |
the patch needs to be maintained over time because it has very little |
the patch needs to be maintained over time because it has very little |
| 165 |
chance of being integrated upstream. This field can be used multiple |
chance of being integrated upstream. This field can be used multiple |
| 166 |
times if several people authored the patch. |
times if several people authored the patch. |
| 167 |
|
|
| 168 |
* `Reviewed-by` (optional) |
* `Reviewed-by` or `Acked-by` (optional) |
| 169 |
|
|
| 170 |
This field can be used to document the fact that the patch has been |
This field can be used to document the fact that the patch has been |
| 171 |
reviewed by someone. It should list her name and email in the standard |
reviewed and approved by someone. It should list her name and email in |
| 172 |
format (similar to the example given for the `Author` field). This |
the standard format (similar to the example given for the `Author` |
| 173 |
field can be used multiple times if several people reviewed the |
field). This field can be used multiple times if several people |
| 174 |
patch. |
reviewed the patch. |
| 175 |
|
|
| 176 |
* `Last-Update` (optional) |
* `Last-Update` (optional) |
| 177 |
|
|
| 178 |
This field can be used to record the date when the meta-information |
This field can be used to record the date when the meta-information |
| 179 |
was last updated. It should use the ISO date format `YYYY-MM-DD`. |
was last updated. It should use the ISO date format `YYYY-MM-DD`. |
| 180 |
|
|
| 181 |
|
* `Applied-Upstream` (optional) |
| 182 |
|
|
| 183 |
|
This field can be used to document the fact that the patch has been |
| 184 |
|
applied upstream. It may contain the upstream version expected to |
| 185 |
|
contain this patch, or the URL or commit identifier of the upstream |
| 186 |
|
commit (with commit identifiers prefixed with "commit:", as in the |
| 187 |
|
`Origin` field), or both separated by a comma and a space. |
| 188 |
|
|
| 189 |
Sample DEP-3 compliant headers |
Sample DEP-3 compliant headers |
| 190 |
------------------------------ |
------------------------------ |
| 191 |
|
|
| 192 |
A patch cherry-picked from upstream: |
A patch cherry-picked from upstream: |
| 193 |
|
|
| 194 |
Description: Fix regex problems with some multi-bytes characters |
From: Ulrich Drepper <drepper@redhat.com> |
| 195 |
Origin: upstream: http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdb56bac |
Subject: Fix regex problems with some multi-bytes characters |
| 196 |
|
|
| 197 |
|
* posix/bug-regex17.c: Add testcases. |
| 198 |
|
* posix/regcomp.c (re_compile_fastmap_iter): Rewrite COMPLEX_BRACKET |
| 199 |
|
handling. |
| 200 |
|
|
| 201 |
|
Origin: upstream, http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdb56bac |
| 202 |
Bug: http://sourceware.org/bugzilla/show_bug.cgi?id=9697 |
Bug: http://sourceware.org/bugzilla/show_bug.cgi?id=9697 |
| 203 |
Bug-Debian: http://bugs.debian.org/510219 |
Bug-Debian: http://bugs.debian.org/510219 |
| 204 |
|
|
| 205 |
A patch created by the the Debian maintainer John Doe, which got forwarded |
A patch created by the Debian maintainer John Doe, which got forwarded |
| 206 |
and rejected: |
and rejected: |
| 207 |
|
|
| 208 |
Description: Use FHS compliant paths by default |
Description: Use FHS compliant paths by default |
| 211 |
But we will continue using them in Debian nevertheless to comply with |
But we will continue using them in Debian nevertheless to comply with |
| 212 |
our policy. |
our policy. |
| 213 |
Forwarded: http://lists.example.com/oct-2006/1234.html |
Forwarded: http://lists.example.com/oct-2006/1234.html |
| 214 |
Author: John Doe <john@foobar.com> |
Author: John Doe <johndoe-guest@users.alioth.debian.org> |
| 215 |
Last-Update: 2006-12-21 |
Last-Update: 2006-12-21 |
| 216 |
|
|
| 217 |
A vendor specific patch not meant for upstream submitted on |
A vendor specific patch not meant for upstream submitted on |
| 221 |
The correct fix will be done in etch and it will require toolchain |
The correct fix will be done in etch and it will require toolchain |
| 222 |
fixes. |
fixes. |
| 223 |
Forwarded: not-needed |
Forwarded: not-needed |
| 224 |
Origin: vendor: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=80;bug=265678 |
Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=80;bug=265678 |
| 225 |
Bug-Debian: http://bugs.debian.org/265678 |
Bug-Debian: http://bugs.debian.org/265678 |
| 226 |
Author: Thiemo Seufer <ths@debian.org> |
Author: Thiemo Seufer <ths@debian.org> |
| 227 |
|
|
| 228 |
|
A patch submitted and applied upstream: |
| 229 |
|
|
| 230 |
|
Description: Fix widget frobnication speeds |
| 231 |
|
Frobnicating widgets too quickly tended to cause explosions. |
| 232 |
|
Forwarded: http://lists.example.com/2010/03/1234.html |
| 233 |
|
Author: John Doe <johndoe-guest@users.alioth.debian.org> |
| 234 |
|
Applied-Upstream: 1.2, http://bzr.example.com/frobnicator/trunk/revision/123 |
| 235 |
|
Last-Update: 2010-03-29 |
| 236 |
|
|
| 237 |
Related links |
Related links |
| 238 |
------------- |
------------- |
| 239 |
|
|
| 250 |
if Author is present. |
if Author is present. |
| 251 |
* 2009-08-24: Add samples and mention difference with RFC-2822 related to |
* 2009-08-24: Add samples and mention difference with RFC-2822 related to |
| 252 |
the Description field. |
the Description field. |
| 253 |
|
* 2009-09-07: Move to CANDIDATE status. |
| 254 |
|
* 2009-09-26: Modified structure to allow for 2 set of fields (the header and |
| 255 |
|
pseudo-header). Make Subject an alias of Description, From an alias of |
| 256 |
|
Author and Acked-by an alias of Reviewed-by. All those changes allow for |
| 257 |
|
a better compatibility with patches that are VCS changesets embedded in |
| 258 |
|
mails (notably those generated by git format-patch). |
| 259 |
|
* 2009-10-05: Clarify the distinction between header and field, by the |
| 260 |
|
precedent set in RFC 2822. |
| 261 |
|
* 2009-11-09: Clarify how non-structured paragraph are merged in the |
| 262 |
|
Description. Make it explicit that Reviewed-by and Acked-by imply |
| 263 |
|
approval of the change. |
| 264 |
|
* 2009-11-26: Enforce UTF-8 usage for the meta-information and recommend |
| 265 |
|
ASCII when the patch contains non-UTF-8 characters. |
| 266 |
|
* 2010-04-16: Add the Applied-Upstream field. |