I don’t subscribe to the linux-kernel mailing list, but I want to get a set of patches that were posted a few weeks ago and apply them to my kernel for testing. I’m very familiar with patching, building, etc. My question is, what’s the best way to get a copy of this patch set? It’s not applied to any Git repo that I’m aware of, it’s just been posted to the mailing list for discussion.
I find a number of sites that archive the linux-kernel mailing list and I can see the set of patches there, but none of these sites have any method (that I can find) of downloading the raw email so I can use “git apply” or “patch” or whatever. Just copy/pasting the content from my web browser seems like it will not be very successful due to whitespace differences etc.
How do people manage this?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
http://marc.info/ has a link for each message to get the raw body, and https://lkml.org/ has (in the sidebar) links to download any contained diffs.
There are also archives with NNTP access that may provide raw messages, though I haven’t tried this.
Method 2
I found part of the answer. It looks like git can take the following switch to apply a set of patches you have in an email to a code base you’ve previously checked out:
$ git applymbox /tmp/mbox
This article titled: Git for the newbie, had several other examples for dealing with the Linux Kernel using git & patching.
ketchup
I think the tool you’re looking for is called ketchup. Main site appears to be here. There’s a blog post about it here, titled: ketchup, or how to manage your kernel sources more efficiently. There’s also an example of it’s usage in the OReilly book titled: Helpful Utilities: Appendix A – Linux Kernel in a Nutshell.
References
- Releasing to Linux kernel using patches and emails
- Git – ti.com tutorial for dealing with processor development
Method 3
There are two ways I know.
- patchwork (https://patchwork.kernel.org/)
pwclient (https://www.varnish-cache.org/patchwork/help/pwclient/) working with patchwork can download patches from emailing list. git am
very simple to use.- save your email sent from git send-email (the extension of Thunderbird is
.eml). - run
git am xxx.eml
- save your email sent from git send-email (the extension of Thunderbird is
Method 4
If the mailing list for the project you want to apply patches from uses public-inbox, which is the case for most Linux subprojects and Git, you can use the b4 am tool to download the most recent version of a patch series and pipe it to git am:
b4 am -o- $url | git am
where url is the URL of any message in the thread.
Method 5
https://www.kernel.org/lore.html has archives of many Linux-related lists, including linux-kernel. The archives are searchable and it’s easy to download a raw message or an mbox of an entire thread.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0