[oe] Patch procedure for dummies

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Wed Aug 25 16:56:16 UTC 2010


2010/8/25 Paul Menzel <paulepanter at users.sourceforge.net>:
> Am Mittwoch, den 25.08.2010, 08:43 -0600 schrieb AJ ONeal:
>> Please give me feedback and I'll post this on the wiki.
>>
>> A task-oriented guide to creating a patch:
>>
>> > Let's say you create a new recipe and you'd like to submit it for inclusion
>> > (and you've already tested that it works, of course).
>> >
>> > 1. Now commit with a good strong helpful message
>
> … explaining your changes in a way others get a short overview without
> looking at the code.

See http://wiki.openembedded.net/index.php/Commit_Policy on what
should be in the commit message.
>
>> >     git add recipes/nodejs/
>> >     git commit # don't use the -m option
>> >
>> > 2. The message should look like this
>> >
>> >     added recipe for node.js
>
> The rule is to give the recipe name at the beginning followed by a
> colon.
>
>> >     * added recipe for node.js (bug #5555 - no nodejs recipe)
>> >     ** patched libev's wscript to not try to execute code
>> >     ** patched node's wscript to not search in '/usr/include'
>> >
>> >     Signed-off-by: AJ ONeal <coolaj86 at gmail.com>
>> >
>> > 3. Create your patch
>> >
>> >     git format-patch -1 # or however many commits are part of this change
>
> Signed-off-by line can be added automatically either using `-s` either
> in 1. or 3.. I would recommend 3..
>
>> > 3++. If you are submitting a second version also add "--subject-prefix
>> > [v2]"
>
> … to `git format-patch`.
>
>> >     git send-email

with the names of the files generated by git format-patch as argument.
e.g. git format-patch 0001-this-is-an-example.patch
>> >
>> > Your patch will be immediately visible on
>> > http://patchwork.openembedded.org/patch/
>> >
>>
>>
>> > 4. Once your patch has been accepted or rejected, create an account and
>> > update the status to "accepted" or "rejected"
>> >
>> > 4++. If you get soft-rejected (a lot of feedback), make the changes, submit
>> > the next version,
>
> … using `--subject-prefix` to mark the patch iteration.
>
>> > and update the status of the previous patch to
>> > "superseded"
>> >
>> > Appendix: Properly configuring git (using tekkub at gmail.com as an example
>> > user)
>> >
>> >     sudo apt-get install git-core git-email
>
> Please use `sudo aptitude install git-core git-email` since it is the
> recommended package tool by Debian. People preferring `apt-get` know how
> to use it instead.

Note that this is specific for debian variants (including ubuntu).
Fedora and openSuse have different packet managers
>
>> >     git config --global user.name "Tekkub"
>> >     git config --global user.email "tekkub at gmail.com"
>
> These two should be given in 0. or 1. as they are also important for the
> commit meta data.

Agree (otherwise git commit -s is not going to work)
>
>> >     git config --global sendemail.smtpserver smtp.gmail.com
>> >     git config --global sendemail.smtpserverport 587
>> >     git config --global sendemail.smtpencryption tls
>> >     git config --global sendemail.smtpuser tekkupl at gmail.com
>
> Thank you for your work. I would suggest to include links to more in
> depth information (commit policy, patchwork) after each section for a
> clarification.
>
>
Fully agree.

Thanks for writing this.

Frans




More information about the Openembedded-devel mailing list