I. Linux kernel articles
8. Send patch to Linux
You made a patch to add a new feature or to solve an issue ? Nice ! But it'd be better to send it to the Linux foundation now ! I'll explain you how in this chapter.
First, we need to add the missing tools:
> apt-get update > apt-get install git git-email gitk
Then you'll need to configure your git if you haven't done it yet:
git config --add user.name "Guillaume Gomez" git config --add user.email "firstname.lastname@example.org"
Once this done, we need to add the configuration for git-email. Add the following lines to your
[sendemail] smtpencryption = tls stmpserver = smtp.gmail.com smtpuser = email@example.com smtpserverport = 587 from = Guillaume Gomez <firstname.lastname@example.org> suppresscc = self
Of course, change the information to make them match your own configuration. Please note that some smtp servers might not accept very well git-email so you'll need to do some additional change. For example, on gmail, I had to go to my account and set "Authorize less secured applications" parameter to true.
Once you have done this, we can continue !
The commit messages have to be very explicit to make the work of linux developers easier. For example, if you worked on tty and solved an issue, your commit message should look like:
tty: solved [description of issue]
Once you have commited your changes, you'll need to create the patch file to send. It's very easy to do:
> git format-patch -s -n master..fix_branch
fix_branch is the branch where you made the changes (never modify master directly!). You should now have a file called
Before sending the patch, it would be nice to check if there is any error in it, right? A script does it for you:
> scripts/checkpatch.pl 000x-something.patch
The output should look like this:
total: 0 errors, 0 warnings, 14 lines checked 000x-something.patch has no obvious style problems and is ready for submission.
If you have warnings, it's *generally* OK, but please check if there is nothing serious before going forward.
You can't just send your patch to anyone! Once again, a script is provided to get the concerned people list:
> scripts/get_maintainer.pl 000x-something.patch
And so you should get something like this:
Greg Kroah-Hartman <email@example.com> (supporter:TTY LAYER) Jiri Slaby <firstname.lastname@example.org> (supporter:TTY LAYER) email@example.com (open list)
Before going any further, please test your patch!
Good! Before sending the mail, it would be nice to test if everything is working fine, right? Let's send an email to ourselves!
> git send-email --to "firstname.lastname@example.org" 000x-something.patch
If you have some issue with Perl, please install the missing libraries/packages through a Perl package manager.
If you received the mail, congrats! It means you're now ready to send it to the Linux foundation:
> git send-email --cc "email@example.com" --cc "firstname.lastname@example.org" --to "email@example.com" --to "firstname.lastname@example.org" 000x-something.patch
Once this done, you can follow your patch status on mailing list. There are a few websites where you can see them. I usually go on marc.info, but there is also Linux Kernel Mailing Lists and others... I'll let you check. Hope it helped!