an introduction
Waldekranz & Wiberg
January 25, 2022
integration.patch
Maybe we need to start with the obvious question –
who wants to participate in upstreaming?
First-timers should select a simple one to start with
rather than the ones most important to Company
To: and Cc: of the correct people--rfc, or ready for mainline?~/.gitconfig later):
Organization: Company IncSigned-off-by, Reviewed-by, … tagsscripts/checkpatch.pl detects most style issuesscripts/get_maintainer.pl figures out who to send patches tomake C=1 will run the static code analyzer (sparse)Signed-off-by, Reviewed-by, … tagsMake your changes on an up-to-date branch from Buildroot master
$ git checkout -b package/foo
$ git fetch --all --tags
$ git rebase origin/masterUse logical commits; upgrade package as one, changing/extending behavior as another, etc.
Use commit messages to record why changes are made. First line is a summary referencing the sub-system, followed by an empty line and the message body, and concluded by your sign-off
package/foo: bump version to v1.2.3
Signed-off-by: Your Name <your.name@example.com>Verify formatting of package files; .in, .mk, etc.
$ ./utils/check-package package/foo/*Test your package/change with a set of cross-compilation toolchains
$ ./utils/test-pkg -c foo.config -p foo
The foo.config menuconfig snippet enabling BR2_PACKAGE_FOO=y and deps.
Format your patches, with --cover-letter for patch sets
$ git format-patch --cover-letter -M -n -s -o mail origin/master
Remember to edit the cover letter — it serves as an introduction and explains the reasoning behind your changes. Focus on the why, not the how, the patches have separate commit messages
Figure out DEVELOPERS to Cc in your correspondence to the mailing list
$ ./utils/get-developers mail/*
git send-email --to buildroot@buildroot.org --cc foo@example.comAt the very least, the script should output
$ git send-email --to buildroot@buildroot.orgAppend mail/* to send. You and others in Signed-off-by, Reviewed-by: are Cc:ed by default
$ git send-email --to buildroot@buildroot.org --cc foo@example.com mail/*https://troglobit.com/post/2022-01-04-buildroot-development-checklist/
Signed-off-by, Reviewed-by, … tagsgit format-patch to create patch emails from commits
--cover-letter when there’s 2+ commitsgit send-email to send patches
git-email package on Debian/Ubuntu/Mintgit format-patch -vN for, e.g., v2 of a patch or --rfcReviewed-by: tags in follow-up patches
https://www.kernel.org/doc/html/latest/process/email-clients.html
yourusername+oss@gmail.com[user]
name = YOUR NAME
email = yourusername+oss@gmail.com
[format]
headers = "Organization: Company Inc\n"
signoff = true
[sendemail]
chainreplyto = false
smtpserver = smtp.gmail.com
smtpuser = yourusername@gmail.com
smtpencryption = tls
smtpserverport = 587
smtpPass = yourapplicationspecificpassword
aliasesfile = ~/.config/mutt/aliases
aliasfiletype = mutt
[sendemail.netdev]
to = "davem@davemloft.net, kuba@kernel.org"
cc = "netdev@vger.kernel.org"
cccmd = "./scripts/get_maintainer.pl --norolestats"
# You can also use "alias-foo" in to= and cc=, expands from ~/.config/mutt/aliases
# git send-email --identity netdev mail/*
→ https://troglobit.com/post/2021-05-11-emacs-gmail-and-lore-mailing-lists/
→ https://bostonenginerd.com/posts/notmuch-of-a-mail-setup-part-2-notmuch-and-emacs/
enableddisabled# .muttrc -- remember to chmod 0600 due to password
set editor="vi"
set imap_user = 'yourusername@gmail.com'
set imap_pass = 'yourapplicationspecificpassword'
set spoolfile = imaps://imap.gmail.com/INBOX
set folder = imaps://imap.gmail.com/
set record="imaps://imap.gmail.com/[Gmail]/Sent Mail"
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
set mbox="imaps://imap.gmail.com/[Gmail]/All Mail"
set smtp_url = "smtp://username@smtp.gmail.com:587/"
set smtp_pass = $imap_pass
set ssl_force_tls = yes
set editor = `echo \$EDITOR`
set edit_headers = yes
set charset = UTF-8
unset use_domain
set realname = "YOUR NAME"
set from = "username+oss@gmail.com"
set use_from = yes
format=flowed & wraplengthOr … use the External Editor option
You can also use variants of diff or git show:
$ diff -Nru old.c new.c | xclip
$ git show gHASH | xclip
select Preformat, then paste with the middle button.
GitHub can give contribution hints
if project has aCONTRIBUTING.md
https://github.com/jleclanche/fireplace/pull/344
→ https://stackoverflow.com/questions/36944055/fixing-a-bad-pull-request