How to submit a patch to OpenEmbedded: Difference between revisions

From Openembedded.org
Jump to navigation Jump to search
(--subject-prefix usage fixed)
(Moved to YP docs)
 
(41 intermediate revisions by 14 users not shown)
Line 1: Line 1:
== A task-oriented guide to creating a patch ==
This page has moved to the [https://docs.yoctoproject.org/dev/contributor-guide/submit-changes.html Yocto Documentation Contributors Guide]
 
'''Note''': More details are available on the policy pages, but this document is good enough for most beginners.
 
* [[Patchwork]]
* [[Commit Policy]]
 
Let's say you [[How to create a bitbake recipe for dummies|create a new bitbake recipe for OpenEmbedded]] and you'd like to submit it for inclusion (and you've already tested that it works, of course).
 
=== Set up git ===
 
Properly configuring git (using tekkub@gmail.com as an example user)
 
On Debain / Ubuntu (Note: Fedora uses `yum` OpenSuse uses zypper or yast)
 
sudo aptitude install git-core git-email
 
These are important to the commit meta-data
 
git config --global user.name "Tekkub"
git config --global user.email "tekkub@gmail.com"
 
Any Google Apps account
 
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@gmail.com
 
=== Create and Commit your patch ===
 
1. First you have to subscribe to the mailing-list '''openembedded-devel@lists.openembedded.org''' to be able to post your patch. See [[Mailing lists]]
 
2. Commit with a concise and descriptive message - one that explains your changes in a way others get a short overview without
looking at the code.
 
cd org.openembedded.dev/ # or whereever you keep your clone of the repo
git add recipes/nodejs/
git commit -s # don't use the -m option but include my signature
 
nodejs: added recipe for v0.2.1
* included libev-cross patch which prevents wscript from executing cross-compiled code
* included node-cross patch which forwards DEST_CPU to v8's ARCH
 
3. Create your patch. '''Use -N for N commits''' to be included in the patch. '''Use -s to add a signoff line''' like "Signed-off-by: Tekku B. <tekkub@gmail.com>"
 
git format-patch -1 # creating a patch for my only commit
 
If you are submitting a second version also add
--subject-prefix="PATCH v2"
 
4. Send your patch to patchwork
 
git send-email --to=openembedded-devel@lists.openembedded.org 001-nodejs-added-recipe-for-v0.2.1
 
Your patch will be immediately visible on http://patchwork.openembedded.org/
5. Once your patch has been accepted or rejected, create an account and update the status to "accepted" or "rejected"
 
5++. If you get '''soft-rejected (a lot of feedback)''', you should make changes according to the feedback, submit the next version, and update the status of the previous patch to "superseded". Remember to use `--subject-prefix` to mark the patch iteration.
 
== Appendix ==
 
=== steps for people which don't have smtp access for git ===
 
Patches should not be set as attachment but inline.
 
If you do not have smtp access to your email account you have two options:
 
1. use a different account (e.g. gmail). you can make one especially
for this. Note that the account may differ from the one in signed-off
(although that is inconvenient)
 
2. just include the patch in the body of your email. Make sure you use
an email client that does not touch the message (turn spaces in tabs,
wrap lines etc etc).
 
A good mail client to do so is '''pine''' (or '''alpine''') or mutt.
For more information refer to Documentation/email-clients.txt in linux
kernel sources.
 
[[Category:FAQ]]
[[Category:User]]

Latest revision as of 15:31, 30 August 2023

This page has moved to the Yocto Documentation Contributors Guide