Skip to contentSkip to conversation

Add file describing rules for submitting patches

RFC PATCH In review Blue Swirl 8 participants 28 messages Apr 19, 2009 – Apr 20, 2009

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

RFC PATCH 1/1 Add file describing rules for submitting patches

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Comments, objections?

SUBMITTING_PATCHES new file +100 -0
Index: qemu/SUBMITTING_PATCHES
===================================================================
@@ -0,0 +1,100 @@
+Whereas the QEMU developers highly appreciate any patches, it would be
+most helpful for all parties if the following rules were followed in
+order to simplify mechanical extraction and applying of the patches.
+
+1. Format of e-mail subject
+
+SP1.1: The e-mail subject must contain "PATCH" in brackets, followed
+by white space and a short summary of the change
+
+SP1.2: The bracketed text may also include other commonly used tags
+separated with a comma and white space, including "RFC" (Request for
+Comments, for patches submitted for discussion and review purposes
+only) and "RFT" (Request for Testing, for patches which are suspected
+to introduce problems in use cases which have not been tested by the
+submitter) as well as the serial number of the patch in the patch
+sequence
+
+SP1.3: The summary must be suitable for changelog as is (start with a
+capital letter etc.) after deleting the bracketed text, white space
+after it and any text preceding it
+
+2. Format of e-mail body
+
+SP2.1: The e-mail body must contain a description of the change,
+suitable for changelog without any editing
+
+SP2.2: The patch description must be selfstanding (not depend on other
+patches, other messages or background discussion)
+
+SP2.3: The description must be followed by one blank line and a
+"Signed-off-by:" line
+
+SP2.4: Optionally, the "Signed-off-by:" line may be followed with a
+line with only "---" and on the following lines, other comments not
+intended for changelog (for example diffstat, location of a git tree,
+whether the patch is also directed towards stable tree, witty
+signature etc.)
+
+SP2.5: Exception: For extremely short and trivial patches (one-line
+fixes etc.), the description and "Signed-off-by:" lines may be
+omitted, in which case the subject must be appended with the
+submitter's name in parenthesis
+
+SP2.6: Exception: The rules in this section are not applicable for
+patches tagged with "RFC" or "RFT"
+
+3. Attaching patches to e-mail
+
+SP3.1: Each message may contain only one patch
+
+SP3.2: If possible, please send the patch inlined (to make commenting
+easier) and also attached (to make it easier to apply)
+
+SP3.3: Please ensure in advance that your e-mail tool does not mangle
+white space or break long lines
+
+4. About patches
+
+SP4.1: It must be possible to apply the patch with quilt (equivalent
+to patch -p1) and "git am" without any editing or extra flags
+
+SP4.2: The patch must be in unified diff format
+
+SP4.3: The patch must be based in the QEMU root directory (not for
+example KVM, Xen or lower level subdirectory)
+
+SP4.4: The patches targeted for development branch must be based on
+the current development repository
+
+SP4.5: The patches targeted for stable branch must be based on the
+current stable repository
+
+5. Changes made by the patch
+
+SP5.1: Do not combine formatting changes with functional changes
+
+SP5.2: Do not combine several independent functional changes to one
+patch unless required by the logic of the changes
+
+SP5.3: The changes may not introduce new violations of CODING_STYLE
+
+SP5.4: If the changes involve new or changed user interface,
+documentation and help messages must be changed as well
+
+SP5.5: If the changes add new files, make sure that the patch includes
+them (for example, use diff flag -N)
+
+SP5.6: Any new files or merges from other sources must be licenced
+with licence compatible with QEMU licencing (for example, GPLv3 or
+CDDL are not compatible)
+
+SP5.7: When sending a series of multiple patches, no changes in a
+single patch in the series may break the ability to bisect (make sure
+that when applying the patches sequentially step by step, working
+executables can be produced at each step and not only at the final
+step)
+
+SP5.8 Please check that the changes do not introduce new warnings to
+be emitted when compiling the sources, preferably not even when
+compiling with Sparse checker
#1 lore raw

SUBMITTING_PATCHES line 31

Quoted 10 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

SUBMITTING_PATCHES new file +3 -0
+
+SP2.3: The description must be followed by one blank line and a
+"Signed-off-by:" line

A signoff is more than a format; it is a legal declaration, see the Linux Documentation/SubmittingPatches. It should be clear to the submitter that this is so.

IIRC, one of the requirements is to use your real name :)

SUBMITTING_PATCHES line 52

Quoted 4 lines
SUBMITTING_PATCHES new file +3 -0
+
+SP3.2: If possible, please send the patch inlined (to make commenting
+easier) and also attached (to make it easier to apply)

If the patch is attached (and not inlined) it should be marked as text/plain content type.

SUBMITTING_PATCHES line 71

Quoted 7 lines
SUBMITTING_PATCHES new file +6 -0
+
+SP4.4: The patches targeted for development branch must be based on
+the current development repository
+
+SP4.5: The patches targeted for stable branch must be based on the
+current stable repository

Suggest instead: patches should state which branch they are based on, and should be based on a recent version of the branch.

In addition:

When sending multiple patches, patches should be numbered (inside the brackets: [PATCH 09/17]) and should include a cover letter describing the patchset in general (as opposed to infividual patch descriptions). Patch management utilities (git send-email, quilt, and similar) can do this, so their use is recommended.

Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
#9 lore raw
In reply to Blue Swirl
Quoted 5 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Don't drink and patch. Oh, wait, this was: "Don't drink and derive!" So this is probably ok.

Quoted 2 lines

Comments, objections?

SP3.2: If you only attach, pleeeease don't use base64 encoding etc. And there should be no maintainer exception...

Jan

author
#2 lore raw
In reply to Avi Kivity
Quoted 8 lines · Avi Kivity
Quoted 6 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Quoted 8 lines
Quoted 4 lines

+
+SP2.3: The description must be followed by one blank line and a +"Signed-off-by:" line

A signoff is more than a format; it is a legal declaration, see the Linux
Documentation/SubmittingPatches. It should be clear to the submitter that this is so.

I added this to a new section together with the licensing stuff.

Quoted 1 line

IIRC, one of the requirements is to use your real name :)

I can't find such a requirement :)

Quoted 7 lines

Review

Quoted 4 lines
(quoted diff) +3 -0
+
+SP3.2: If possible, please send the patch inlined (to make commenting
+easier) and also attached (to make it easier to apply)

If the patch is attached (and not inlined) it should be marked as
text/plain content type.

Added.

Quoted 10 lines

Review

Quoted 7 lines
(quoted diff) +6 -0
+
+SP4.4: The patches targeted for development branch must be based on
+the current development repository
+
+SP4.5: The patches targeted for stable branch must be based on the
+current stable repository

Suggest instead: patches should state which branch they are based on, and
should be based on a recent version of the branch.

I'd suppose most of the patches are for the development branch, so one of the subject tags could be "STABLE" indicating stable branch. Without it dev branch is assumed.

Quoted 7 lines

In addition:

When sending multiple patches, patches should be numbered (inside the
brackets: [PATCH 09/17]) and should include a cover letter describing the patchset in general (as opposed to infividual patch descriptions). Patch management utilities (git send-email, quilt, and similar) can do this, so their use is recommended.

I collected the patch series stuff to a new section.

SUBMITTING_PATCHES new file +119 -0
Index: qemu/SUBMITTING_PATCHES
===================================================================
@@ -0,0 +1,119 @@
+Whereas the QEMU developers highly appreciate any patches, it would be
+most helpful for all parties if the following rules were followed in
+order to simplify mechanical extraction and applying of the
+patches. Patch management utilities (git send-email, quilt, and
+similar) can assist in producing compatible patches and patch sets
+with correct formatting etc., so their use is recommended.
+
+1. Format of e-mail subject
+
+SP1.1: The e-mail subject must contain "PATCH" in brackets, followed
+by white space and a short summary of the change
+
+SP1.2: The bracketed text may also include other commonly used tags
+separated with a comma and white space, including "RFC" (Request for
+Comments, for patches submitted for discussion and review purposes
+only) and "RFT" (Request for Testing, for patches which are suspected
+to introduce problems in use cases which have not been tested by the
+submitter)
+
+SP1.3: The summary must be suitable for changelog as is (start with a
+capital letter etc.) after deleting the bracketed text, white space
+after it and any text preceding it
+
+2. Format of e-mail body
+
+SP2.1: The e-mail body must contain a description of the change,
+suitable for changelog without any editing
+
+SP2.2: The patch description must be selfstanding (not depend on other
+patches, other messages or background discussion)
+
+SP2.3: The description must be followed by one blank line and a
+"Signed-off-by:" line
+
+SP2.4: Optionally, the "Signed-off-by:" line may be followed with a
+line with only "---" and on the following lines, other comments not
+intended for changelog (for example diffstat, location of a git tree,
+whether the patch is also directed towards stable tree, witty
+signature etc.)
+
+SP2.5: Exception: For extremely short and trivial patches (one-line
+fixes etc.), the description and "Signed-off-by:" lines may be
+omitted, in which case the subject must be appended with the
+submitter's name in parenthesis
+
+SP2.6: Exception: The rules in this section are not applicable for
+patches tagged with "RFC" or "RFT"
+
+3. Attaching patches to e-mail
+
+SP3.1: Each message may contain only one patch
+
+SP3.2: If possible, please send the patch inlined (to make commenting
+easier) and also attached (to make it easier to apply)
+
+SP3.2: If the patch is attached (and not inlined) it should be marked
+as text/plain content type
+
+SP3.3: Please ensure in advance that your e-mail tool does not mangle
+white space or break long lines
+
+4. About patches
+
+SP4.1: It must be possible to apply the patch with quilt (equivalent
+to patch -p1) and "git am" without any editing or extra flags
+
+SP4.2: The patch must be in unified diff format
+
+SP4.3: The patch must be based in the QEMU root directory (not for
+example KVM, Xen or lower level subdirectory)
+
+SP4.4: The patches targeted for development branch must be based on
+the current development repository
+
+SP4.5: The patches targeted for stable branch must be based on the
+current stable repository
+
+5. Changes made by the patch
+
+SP5.1: Do not combine formatting changes with functional changes
+
+SP5.2: Do not combine several independent functional changes to one
+patch unless required by the logic of the changes
+
+SP5.3: The changes may not introduce new violations of CODING_STYLE
+
+SP5.4: If the changes involve new or changed user interface,
+documentation and help messages must be changed as well
+
+SP5.5: If the changes add new files, make sure that the patch includes
+them (for example, use diff flag -N)
+
+SP5.6 Please check that the changes do not introduce new warnings to
+be emitted when compiling the sources, preferably not even when
+compiling with Sparse checker
+
+6. Series of patches
+
+SP6.1 Patch series should be numbered with the number included inside
+the brackets in the subject (for example "[PATCH 09/17]")
+
+SP6.2: The patch series should include a cover letter describing the
+patchset in general (as opposed to individual patch descriptions)
+
+SP6.3: No changes in a single patch in the patch series may break the
+ability to bisect (make sure that when applying the patches
+sequentially step by step, working executables can be produced at each
+step and not only at the final step)
+
+
+7. Legal aspects
+
+SP7.1: Any new files or merges from other sources must be licenced
+with licences compatible with QEMU licencing (for example, GPLv3 or
+CDDL are not compatible)
+
+SP7.2: The "Signed-off-by:" line is a form of legal declaration which
+the submitter must be aware of (please see Linux
+Documentation/SubmittingPatches)
#3 lore raw

Am 19.04.2009 um 18:59 schrieb Blue Swirl:

Quoted 20 lines · Avi Kivity
Quoted 8 lines
Quoted 5 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Quoted 10 lines

SUBMITTING_PATCHES line 76

Quoted 7 lines
SUBMITTING_PATCHES new file +6 -0
+
+SP4.4: The patches targeted for development branch must be based on
+the current development repository
+
+SP4.5: The patches targeted for stable branch must be based on the
+current stable repository

Suggest instead: patches should state which branch they are based on, and should be based on a recent version of the branch.

Quoted 3 lines

I'd suppose most of the patches are for the development branch, so one of the subject tags could be "STABLE" indicating stable branch. Without it dev branch is assumed.

4.5. -- I'd suspect that for most patches for STABLE it's not necessary to send them twice, once against the stable branch, when they can easily be cherry-picked or patch -p1'ed. Please consider "should" or "must ... if it differs from devel branch" there.

2.4 -- Do comments after --- line have to be space-indented or not for inline patches?

6.2 -- "as opposed to individual patch descriptions" may sound misleading, suggest "in addition to individual patch descriptions".

Andreas

#10 lore raw
In reply to Jan Kiszka

In message: <[email protected]>
Jan Kiszka <[email protected]> writes:
: Blue Swirl wrote:
: > Hi,
: >
: > I gathered a few common complaints about patch submission, hopefully : > not too much affected by my consumption of small amounts of various : > alcoholic substances.
:
: Don't drink and patch. Oh, wait, this was: "Don't drink and derive!" So : this is probably ok.
:
: >
: > Comments, objections?
:
: SP3.2: If you only attach, pleeeease don't use base64 encoding etc. And : there should be no maintainer exception...

How can you attach a patch with MIME and not do that?

Warner

#13 lore raw
In reply to Blue Swirl

In message: <[email protected]>
Blue Swirl <[email protected]> writes:
: +SP2.4: Optionally, the "Signed-off-by:" line may be followed with a : +line with only "---" and on the following lines, other comments not : +intended for changelog (for example diffstat, location of a git tree, : +whether the patch is also directed towards stable tree, witty : +signature etc.)
: +
: +SP2.5: Exception: For extremely short and trivial patches (one-line : +fixes etc.), the description and "Signed-off-by:" lines may be : +omitted, in which case the subject must be appended with the : +submitter's name in parenthesis

Signed-off-by: is at least an implied contract that the patch submitted conforms to the Developer's Certificate of Origin 1.1:

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

At least that's what it means for the Linux world. I believe that QEMU also follows that, but we should likely make it explicit in this document.

That's why trivial patches don't necessarily need this: There's no IP associated with them, so no need to diligently track it.

Warner

#11 lore raw
In reply to M. Warner Losh
Quoted 18 lines · M. Warner Losh

In message: <[email protected]>
Jan Kiszka <[email protected]> writes:
: Blue Swirl wrote:
: > Hi,
: >
: > I gathered a few common complaints about patch submission, hopefully : > not too much affected by my consumption of small amounts of various : > alcoholic substances.
:
: Don't drink and patch. Oh, wait, this was: "Don't drink and derive!" So : this is probably ok.
:
: >
: > Comments, objections?
:
: SP3.2: If you only attach, pleeeease don't use base64 encoding etc. And : there should be no maintainer exception...

Quoted 1 line

How can you attach a patch with MIME and not do that?

Mime doesn't imply base64. Binary data enforces base64. Otherwise plain 7bit encoding is fine, and at least my probably rarely used mail client is no longer skeptical about the printability of the attachment.

Jan

#6 lore raw
In reply to Blue Swirl
Quoted 5 lines · Blue Swirl
Quoted 2 lines
Quoted 1 line

IIRC, one of the requirements is to use your real name :)

I can't find such a requirement :)

From [1]:

Quoted 13 lines

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD#l320>then you just add a line saying

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD#l321>

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD#l322> Signed-off-by: Random J Developer <[email protected]>

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD#l323>

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD#l324> using your real name (sorry, no pseudonyms or anonymous contributions.)

Quoted 6 lines
Quoted 3 lines

If the patch is attached (and not inlined) it should be marked as
text/plain content type.

Added.

Your own message has

--001485f87bbc990faa0467eb577c
Content-Type: plain/text; name="submitting_patches.diff"
Content-Disposition: attachment; filename="submitting_patches.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ftpzesul

So my client won't display it inline :)

A local misconfiguration, or is plain/text legal?

Quoted 8 lines
Quoted 3 lines

Suggest instead: patches should state which branch they are based on, and
should be based on a recent version of the branch.

I'd suppose most of the patches are for the development branch, so one of the subject tags could be "STABLE" indicating stable branch. Without it dev branch is assumed.

Right.

[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD

Signature · 1 line
error compiling committee.c: too many arguments to function
#14 lore raw
In reply to Blue Swirl

SUBMITTING_PATCHES line 42

Quoted 12 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Comments, objections?

SUBMITTING_PATCHES new file +4 -0
+SP2.5: Exception: For extremely short and trivial patches (one-line
+fixes etc.), the description and "Signed-off-by:" lines may be
+omitted, in which case the subject must be appended with the
+submitter's name in parenthesis

Signed-off-by can never be omitted--even for one line fixes.

Regards,

Anthony Liguori

#18 lore raw
In reply to Blue Swirl

SUBMITTING_PATCHES line 60

Quoted 11 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Comments, objections?

SUBMITTING_PATCHES new file +2 -0
+SP4.1: It must be possible to apply the patch with quilt (equivalent
+to patch -p1) and "git am" without any editing or extra flags

svn diff generates -p0 patches so both -p1 and -p0 should be accepted.

Regards,

Anthony Liguori

#4 lore raw
In reply to Andreas Färber
Quoted 2 lines · Andreas Färber

4.5. -- I'd suspect that for most patches for STABLE it's not necessary to send them twice, once against the stable branch, when they can easily be cherry-picked or patch -p1'ed. Please consider "should" or "must ... if it differs from devel branch" there.

I consider all patches for the stable branch. [STABLE] is just a hint as far as I'm concerned. If a set of patches are too difficult to apply to the stable branch, I reserve the right to bounce the series, even for trunk, asking for two submissions but then again, if this ever happened, it suggests that either we need a new release (because things have changed too much since the last release) or that the patch probably shouldn't be in stable.

Regards,

Anthony Liguori

#12 lore raw
In reply to M. Warner Losh
Quoted 13 lines · M. Warner Losh

In message: <[email protected]>
Jan Kiszka <[email protected]> writes:
: Blue Swirl wrote:
: > Hi,
: > : > I gathered a few common complaints about patch submission, hopefully : > not too much affected by my consumption of small amounts of various : > alcoholic substances.
: : Don't drink and patch. Oh, wait, this was: "Don't drink and derive!" So : this is probably ok.
: : > : > Comments, objections?
: : SP3.2: If you only attach, pleeeease don't use base64 encoding etc. And : there should be no maintainer exception...

Quoted 2 lines

How can you attach a patch with MIME and not do that?

If you tolerate MIME, you have to accept different encoding types (including base64). Right now, just accepting text/plain and text/x-diff seems to work well enough. The most common failure for my scripts wrt attachments is with mailers that do application/binary or some similarly opaque mime type. What's particularly bad are mailers that send a plain text descriptions, HTML descriptions, and then the patch. This last two categories are too difficult to handle correctly in scripts so that's where I want to bounce. It's not a huge problem though. It only happens in < %1 of patches.

Regards,

Anthony Liguori

Quoted 4 lines

Warner

#15 lore raw
In reply to Anthony Liguori
Quoted 7 lines · Anthony Liguori
Quoted 6 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Quoted 7 lines

SUBMITTING_PATCHES line 42

Quoted 5 lines

Comments, objections?
+SP2.5: Exception: For extremely short and trivial patches (one-line

SUBMITTING_PATCHES new file +3 -0
+fixes etc.), the description and "Signed-off-by:" lines may be
+omitted, in which case the subject must be appended with the
+submitter's name in parenthesis

Signed-off-by can never be omitted--even for one line fixes.

Oh, and you don't need the author's name if we switch to git.

Signature · 1 line
error compiling committee.c: too many arguments to function
author
#7 lore raw
In reply to Avi Kivity
Quoted 21 lines · Avi Kivity
Quoted 8 lines · Blue Swirl
Quoted 4 lines
Quoted 2 lines

IIRC, one of the requirements is to use your real name :)

I can't find such a requirement :)

From [1]:

Quoted 1 line

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD#l320>then
you just add a line saying

Quoted 2 lines

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD#l321>

Quoted 1 line
Quoted 9 lines

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD#l322>

Quoted 2 lines

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD#l323>

Quoted 1 line

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=f309d3c6221c3699a0c0b97fbe689faed09e4d2f;hb=HEAD#l324>
using your real name (sorry, no pseudonyms or anonymous contributions.)

Quoted 1 line

OK, I looked at too old version (2.6.16) that had at hand.

Quoted 20 lines
Quoted 9 lines
Quoted 5 lines

If the patch is attached (and not inlined) it should be marked as
text/plain content type.

Added.

Your own message has

--001485f87bbc990faa0467eb577c
Content-Type: plain/text; name="submitting_patches.diff"
Content-Disposition: attachment;
filename="submitting_patches.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ftpzesul

Quoted 3 lines

So my client won't display it inline :)

A local misconfiguration, or is plain/text legal?

I think it's a bug in gmail, I don't know if it can be configured.

author
#16 lore raw
In reply to Anthony Liguori
Quoted 9 lines · Anthony Liguori
Quoted 7 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Quoted 8 lines

SUBMITTING_PATCHES line 42

Quoted 6 lines

Comments, objections?
+SP2.5: Exception: For extremely short and trivial patches (one-line

SUBMITTING_PATCHES new file +3 -0
+fixes etc.), the description and "Signed-off-by:" lines may be
+omitted, in which case the subject must be appended with the
+submitter's name in parenthesis

Signed-off-by can never be omitted--even for one line fixes.

I disagree. Changes that are small enough do not create any copyrightable material, thus they may come from any source.

author
#19 lore raw
In reply to Anthony Liguori
Quoted 13 lines · Anthony Liguori
Quoted 9 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Comments, objections?

Quoted 5 lines

SUBMITTING_PATCHES line 60

Quoted 3 lines
SUBMITTING_PATCHES new file +2 -0
+SP4.1: It must be possible to apply the patch with quilt (equivalent
+to patch -p1) and "git am" without any editing or extra flags

svn diff generates -p0 patches so both -p1 and -p0 should be accepted.

Quilt does not accept -p0 patches without extra work. Remember, the idea is to reduce our burden, make it easier to test and apply patches.

Diff can generate other types of diffs besides the unified type but we don't want any other.

#20 lore raw
Quoted 13 lines · Blue Swirl
Quoted 12 lines · Anthony Liguori
Quoted 9 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Comments, objections?

Quoted 8 lines
Quoted 4 lines

SUBMITTING_PATCHES line 60

Quoted 3 lines
SUBMITTING_PATCHES new file +2 -0
+SP4.1: It must be possible to apply the patch with quilt (equivalent
+to patch -p1) and "git am" without any editing or extra flags

svn diff generates -p0 patches so both -p1 and -p0 should be accepted.

Quilt does not accept -p0 patches without extra work. Remember, the idea is to reduce our burden, make it easier to test and apply patches.

I think you'll survive the extra work of adding a -p0 to your series file from time to time. Currently SVN is the official solution of qemu and it's not obvious how you would create -p1 patches with svn diff. And nowadays most patches are generated with git anyway.

Kevin

#22 lore raw
In reply to Blue Swirl
Quoted 19 lines
Quoted 11 lines
Quoted 9 lines

I gathered a few common complaints about patch submission, hopefully
not too much affected by my consumption of small amounts of various
alcoholic substances.

Comments, objections?

Quoted 7 lines
Quoted 4 lines

+SP4.1: It must be possible to apply the patch with quilt (equivalent
+to patch -p1) and "git am" without any editing or extra flags

svn diff generates -p0 patches so both -p1 and -p0 should be
accepted.

Quoted 3 lines

Quilt does not accept -p0 patches without extra work. Remember, the idea is to reduce our burden, make it easier to test and apply patches.

Isn't it some opensource thingy ? Then you can fix it, right ?

I don't enjoy the perspective of taking the burden of switching from svn to git just because of it.

François.

author
#21 lore raw
In reply to Kevin Wolf
Quoted 31 lines · Kevin Wolf
Quoted 24 lines · Blue Swirl
Quoted 15 lines · Anthony Liguori
Quoted 10 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Comments, objections?

Quoted 6 lines

SUBMITTING_PATCHES line 60

Quoted 4 lines
SUBMITTING_PATCHES new file +2 -0
+SP4.1: It must be possible to apply the patch with quilt (equivalent
+to patch -p1) and "git am" without any editing or extra flags

svn diff generates -p0 patches so both -p1 and -p0 should be accepted.

Quoted 4 lines

Quilt does not accept -p0 patches without extra work. Remember, the idea is to reduce our burden, make it easier to test and apply patches.

Quoted 4 lines

I think you'll survive the extra work of adding a -p0 to your series file
from time to time. Currently SVN is the official solution of qemu and it's not obvious how you would create -p1 patches with svn diff. And nowadays most patches are generated with git anyway.

If (when?) we switch to git, references to quilt can be dropped and the whole document can be made much shorter.

Supporting -p0 does not reduce maintainer burden (resulting in valuable patches getting lost etc.). Making the submitter's life easier is OK and nice, but that is secondary.

#23 lore raw
In reply to François Revol
Quoted 2 lines · François Revol

I don't enjoy the perspective of taking the burden of switching from svn to git just because of it.

Aren't we switching to git anyway? Then all this will be moot.

I suggest writing these instructions to suit the new world order, not subversion.

Signature · 1 line
error compiling committee.c: too many arguments to function
#17 lore raw
In reply to Blue Swirl
Quoted 21 lines · Blue Swirl
Quoted 9 lines · Anthony Liguori
Quoted 6 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Quoted 9 lines

SUBMITTING_PATCHES line 42

Quoted 7 lines

Comments, objections?
+SP2.5: Exception: For extremely short and trivial patches (one-line

SUBMITTING_PATCHES new file +3 -0
+fixes etc.), the description and "Signed-off-by:" lines may be
+omitted, in which case the subject must be appended with the
+submitter's name in parenthesis

Signed-off-by can never be omitted--even for one line fixes.

Quoted 3 lines

I disagree. Changes that are small enough do not create any copyrightable material, thus they may come from any source.

It's not just an issue of copyright. It's also a statement that you are allowed to be submitting patches to a given project. Before DCO, some projects used to require forms from employers stating that contributions were allowed because some employers have non-compete contracts that would prevent an employee from working on a project.

Regards,

Anthony Liguori

#27 lore raw
In reply to Blue Swirl
Quoted 23 lines · Blue Swirl
Quoted 14 lines · Anthony Liguori
Quoted 10 lines · Blue Swirl

Hi,

I gathered a few common complaints about patch submission, hopefully not too much affected by my consumption of small amounts of various alcoholic substances.

Comments, objections?

Quoted 6 lines

SUBMITTING_PATCHES line 60

Quoted 4 lines
SUBMITTING_PATCHES new file +2 -0
+SP4.1: It must be possible to apply the patch with quilt (equivalent
+to patch -p1) and "git am" without any editing or extra flags

svn diff generates -p0 patches so both -p1 and -p0 should be accepted.

Quoted 4 lines

Quilt does not accept -p0 patches without extra work. Remember, the idea is to reduce our burden, make it easier to test and apply patches.

guilt does ;-)

FWIW, I'm working on getting the email commit script in place for the Savannah git repo. That's the last bit needed to switch from svn -> git.

After that, a git-send-email requirement (or equiv) would make a lot of sense as it significantly reduces the maintainers work via git-am.

Regards,

Anthony Liguori

Quoted 5 lines

Diff can generate other types of diffs besides the unified type but we don't want any other.

#26 lore raw
In reply to François Revol
Quoted 2 lines · François Revol

I don't enjoy the perspective of taking the burden of switching from svn to git just because of it.

Switching from svn->git is independent of this set of guidelines, but...

I really want it to happen and I believe that unless something has changed recently, it's going to happen in the near future. For dealing with a project like QEMU, svn is actually pretty painful to work with. I've had to write a large number of scripts to simulate behavior similar to git whereas I can commit a large number of patches at once. Of course, this isn't always perfect and if you watch the mailing list, you'll see that sometimes svn adds don't happen when they should.

This is just one of the many reasons to switch to git.

Regards,

Anthony Liguori

Quoted 4 lines

François.

#24 lore raw
In reply to Avi Kivity
Quoted 5 lines · Avi Kivity
Quoted 2 lines · François Revol

I don't enjoy the perspective of taking the burden of switching from svn to git just because of it.

Aren't we switching to git anyway? Then all this will be moot.

I've got a working commit hook for generating emails (thanks to Avi). I have to submit this as a ticket to Savannah to have it installed. This can take anywhere from a day to a couple weeks depending on how busy they are. I'm going to have the script send to a dedicated mailing list.

Once that is setup, I'll have the current git tree mirror SVN for a while. Perhaps a few weeks? Enough time to give the current mirrors time to switch over from doing git-svn to doing a straight git pull.

Then we'll do a flag day and shut down the SVN repo and start committing to git.

Regards,

Anthony Liguori

Quoted 3 lines

I suggest writing these instructions to suit the new world order, not subversion.

#25 lore raw
Quoted 3 lines · Anthony Liguori

Once that is setup, I'll have the current git tree mirror SVN for a while. Perhaps a few weeks? Enough time to give the current mirrors time to switch over from doing git-svn to doing a straight git pull.

I recommend about 15 minutes. It's not like the git mirrors are useful for anything once you have a git master. If anyone uses a mirror, they should just switch to the main repository for less latency.

Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
#8 lore raw
In reply to Blue Swirl
Quoted 6 lines · Blue Swirl
Quoted 4 lines

So my client won't display it inline :)

A local misconfiguration, or is plain/text legal?

I think it's a bug in gmail, I don't know if it can be configured

A little experimenting showed that gmail derives attachment mime types from the browser. On my system (firefox/linux) that is taken from /etc/mime.types. Once I added diff and patch as text/plain, gmail attachments started to appear inline.

Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.