/[dep]/web/deps/dep3.mdwn
ViewVC logotype

Diff of /web/deps/dep3.mdwn

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 70 by hertzog, Wed Jul 15 22:11:47 2009 UTC revision 109 by hertzog, Thu Nov 5 07:45:35 2009 UTC
# Line 2  Line 2 
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-10-05
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:
# Line 31  information about them (their origin/aut Line 31  information about them (their origin/aut
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  ---------------------  ---------------------
# Line 47  information. Line 47  information.
47    
48  Structure  Structure
49  ---------  ---------
50  The meta-information would be stored in a set of RFC-2822 compliant  
51  fields. Those fields should start on the first non-empty line (after  The meta-information would be stored in one or two headers: sets of
52  having stripped whitespace characters at the start and end of lines).  RFC-2822-like fields. (The difference with RFC 2822 is that newlines
53    are meaningful in the Description field, they are not simple
54    continuation characters). The first header should start on the first
55    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
# Line 59  multi-line fields, the subsequent lines Line 63  multi-line fields, the subsequent lines
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 consider the whole content
# Line 71  Standard fields Line 78  Standard fields
78  ---------------  ---------------
79    
80  In the following section, `<Vendor>` can be "Debian" or the name  In the following section, `<Vendor>` can be "Debian" or the name
81  of any other distribution that tracks the same problem/patch.  of any other distribution that tracks the same problem/patch. Vendor
82    names are case-insensitive ("Fedora" and "fedora" refer to the same
83    vendor).
84    
85    * `Description` (required)    * `Description` or `Subject` (required)
86    
87      This obligatory field contains at least a short description on the      This obligatory field contains at least a short description on the
88      first line. Supplementary lines can be used to provide a longer      first line. When `Subject` is used, it is expected that the long
89        description is outside of the structured fields. With `Description` it
90        is possible to embed them in the field using continuation lines.
91    
92        In both cases, the long description allows for a more verbose
93      explanation of the patch and its history.      explanation of the patch and its history.
94    
95      This field should explain why the patch is vendor-specicific (ex:      This field should explain why the patch is vendor-specicific (ex:
# Line 84  of any other distribution that tracks th Line 97  of any other distribution that tracks th
97      upstream but has been rejected, the description should also document      upstream but has been rejected, the description should also document
98      why it's kept and what were the reasons for the reject.      why it's kept and what were the reasons for the reject.
99    
100    * `Origin` (required)      It's recommended to keep each line shorter than 80 characters.
101    
102      * `Origin` (required except if `Author` is present)
103    
104      This field should document the origin of the patch. It starts with a      This field should document the origin of the patch. In most cases, it
105      single keyword that can have the following standard values: "upstream"      should be a simple URL. For patches backported/taken from upstream, it
106      (in the case of a patch cherry-picked from the upstream VCS),      should point into the upstream VCS web interface when possible,
107      "backport" (in the case of an upstream patch that had to be modified      otherwise it can simply list the relevant commit identifier (it should
108      to apply on the current version), "vendor" for a patch created      be prefixed with "commit:" in that case). For other cases, one should
109      by Debian or another distribution vendor, or "other" for all other      simply indicate the URL where the patch was taken from (mailing list
110      kind of patches. It can be optionally followed by a colon with      archives, distribution bugtrackers, etc.) when possible.
111      leading/trailing spaces before/after it. In that case, all the content  
112      after the colon contains supplementary information defining in more      The field can be optionaly prefixed with a single keyword followed by
113      details the origin of the patch. In most cases, it should be a simple      a comma and a space to categorize the origin. The allowed keywords are
114      URL. For patches backported/taken from upstream, it should point into      "upstream" (in the case of a patch cherry-picked from the upstream
115      the upstream VCS web interface when possible, otherwise it can simply      VCS), "backport" (in the case of an upstream patch that had to be
116      list the relevant commit identifier (it should be prefixed with      modified to apply on the current version), "vendor" for a patch
117      "commit:" in that case). For other cases, one should simply indicate      created by Debian or another distribution vendor, or "other" for all
118      the URL where the patch got grabbed (mailing list archives,      other kind of patches.
     distribution bugtrackers, etc.) when possible.  
119    
120      In general, a user-created patch grabbed in a BTS should be tagged      In general, a user-created patch grabbed in a BTS should be
121      as "other". When copying a patch from another vendor, the      categorized as "other". When copying a patch from another vendor, the
122      meta-information (and hence this field) should be kept if present, or      meta-information (and hence this field) should be kept if present, or
123      created if necessary with a "vendor" origin.      created if necessary with a "vendor" origin.
124    
125        If the `Author` field is present, the `Origin` field can be omitted
126        and it's assumed that the patch comes from its author.
127    
128    * `Bug-<Vendor>` or `Bug` (optional)    * `Bug-<Vendor>` or `Bug` (optional)
129    
130      It contains one URL pointing to the related bug (possibly fixed by the      It contains one URL pointing to the related bug (possibly fixed by the
# Line 134  of any other distribution that tracks th Line 151  of any other distribution that tracks th
151      be "not-needed" to indicate that the patch must not be forwarded      be "not-needed" to indicate that the patch must not be forwarded
152      upstream (whereas "no" simply means that it has not yet been done).      upstream (whereas "no" simply means that it has not yet been done).
153    
154    * `Author` (optional)    * `Author` or `From` (optional)
155    
156      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
157      (ex: "`John Bear <foo@bar.net>`"). Its usage is recommended when the      (ex: "`John Bear <foo@example.com>`"). Its usage is recommended when the
158      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
159      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
160      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
161      chance of being integrated upstream.      chance of being integrated upstream. This field can be used multiple
162        times if several people authored the patch.
163    
164    * `Reviewed-by` (optional)    * `Reviewed-by` or `Acked-by` (optional)
165    
166      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
167      reviewed by someone. It should list her name and email in the standard      reviewed by someone. It should list her name and email in the standard
168      format (similar to the example given for the `Author` field). This      format (similar to the example given for the `Author` field). This
169      field can be used mutiple times if several persons reviewed the      field can be used multiple times if several people reviewed the
170      patch.      patch.
171    
172    * `Last-Update` (optional)    * `Last-Update` (optional)
173    
174      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
175      have been last updated. It should use the ISO date format      was last updated. It should use the ISO date format `YYYY-MM-DD`.
176      `YYYY-MM-DD`.  
177    Sample DEP-3 compliant headers
178    ------------------------------
179    
180    A patch cherry-picked from upstream:
181    
182        From: Ulrich Drepper <drepper@redhat.com>
183        Subject: Fix regex problems with some multi-bytes characters
184    
185        * posix/bug-regex17.c: Add testcases.
186        * posix/regcomp.c (re_compile_fastmap_iter): Rewrite COMPLEX_BRACKET
187          handling.
188    
189        Origin: upstream, http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdb56bac
190        Bug: http://sourceware.org/bugzilla/show_bug.cgi?id=9697
191        Bug-Debian: http://bugs.debian.org/510219
192    
193    A patch created by the Debian maintainer John Doe, which got forwarded
194    and rejected:
195    
196        Description: Use FHS compliant paths by default
197         Upstream is not interested in switching to those paths.
198         .
199         But we will continue using them in Debian nevertheless to comply with
200         our policy.
201        Forwarded: http://lists.example.com/oct-2006/1234.html
202        Author: John Doe <johndoe-guest@users.alioth.debian.org>
203        Last-Update: 2006-12-21
204    
205    A vendor specific patch not meant for upstream submitted on
206    the BTS by a Debian developer:
207    
208        Description: Workaround for broken symbol resolving on mips/mipsel
209         The correct fix will be done in etch and it will require toolchain
210         fixes.
211        Forwarded: not-needed
212        Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=80;bug=265678
213        Bug-Debian: http://bugs.debian.org/265678
214        Author: Thiemo Seufer <ths@debian.org>
215    
216  Related links  Related links
217  -------------  -------------
# Line 170  Changes Line 225  Changes
225  * 2009-06-19: Replace Origin/Status/Patch with Origin/Forwarded. Add new  * 2009-06-19: Replace Origin/Status/Patch with Origin/Forwarded. Add new
226    fields Author and Last-Update. Rename Signed-off-by in Reviewed-by.    fields Author and Last-Update. Rename Signed-off-by in Reviewed-by.
227    Add a paragraph about the scope of the proposal.    Add a paragraph about the scope of the proposal.
228    * 2009-07-15: Make categorization in Origin optional. Make Origin optional
229      if Author is present.
230    * 2009-08-24: Add samples and mention difference with RFC-2822 related to
231      the Description field.
232    * 2009-09-07: Move to CANDIDATE status.
233    * 2009-09-26: Modified structure to allow for 2 set of fields (the header and
234      pseudo-header). Make Subject an alias of Description, From an alias of
235      Author and Acked-by an alias of Reviewed-by. All those changes allow for
236      a better compatibility with patches that are VCS changesets embedded in
237      mails (notably those generated by git format-patch).
238    * 2009-10-05: Clarify the distinction between header and field, by the
239      precedent set in RFC 2822.

Legend:
Removed from v.70  
changed lines
  Added in v.109

  ViewVC Help
Powered by ViewVC 1.1.5