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?


5 Answers 5


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.

  • I didn't see the link from LKML since I was looking at the header email from the patch set with no diff. Thanks. This is pretty darn unpleasant: I was hoping for something that would let me select a set of messages and save them as a raw mbox, or even let me download a day's worth as a raw mbox (I can edit it locally). For any patch set of significant size this will be very painful. But, it will work! Thanks. Jun 24, 2013 at 18:54
  • I also found this: patchwork.kernel.org which is a LITTLE simpler to download, but still a lot of clicking etc. Plus there's no good search I can find, and if you jump into a patch set in the middle after a google search it doesn't seem like there're any "next / previous" links Jun 24, 2013 at 19:16
  • For some reason patchwork.kernel.org seems not to have the devicetree mailing list that I'm interested in. Oct 29, 2014 at 6:18

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.


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.


  • 1
    Yes, of course. As I mentioned in my question, I'm very familiar with patching and building the kernel. But my question is, where do I get the file containing the patches (the "/tmp/mbox" file in your example)? The post says "save the mail", but save it from where? You can't just save it from the web-based mail archives (at least not the ones I've found) because you get a big bunch of HTML-encoded stuff that can't be used for patching. Jun 24, 2013 at 18:03
  • @MadScientist - yes I agree that it's sub-optimal. The above saves you a step of saving a file out if you're using something like mutt, the mbox files can be setup if you're subscribed to a mailing list where the patches are being emailed to. Still seems like there has to be a better way, I'll keep digging.
    – slm
    Jun 24, 2013 at 18:07
  • 2
    As I mentioned, I'm NOT subscribed to the mailing list. Jun 24, 2013 at 18:43
  • ketchup cannot extract patch sets from the mailing list as far as I can tell. It's just able to download patch sets that are already bundled and available as patch files on kernel.org. Jun 24, 2013 at 18:59
  • @MadScientist - I believe you're correct. I was thinking you could use it to download patches that have been tagged outside of the emails, using the emails only as a reference to the tags that you're interested in. You should've held off accepting the answer. Seems like there has to be a better method than manually copying them down? Knowing programmer types, they're lazy and would never put up with that workflow for too long 8-).
    – slm
    Jun 24, 2013 at 19:08

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.


There are two ways I know.

  1. patchwork (https://patchwork.kernel.org/) pwclient (https://www.varnish-cache.org/patchwork/help/pwclient/) working with patchwork can download patches from emailing list.
  2. git am
    very simple to use.
    1. save your email sent from git send-email (the extension of Thunderbird is .eml).
    2. run git am xxx.eml
  • pwclient link is now broken - a casual search hasn't found a new source. Jan 30, 2019 at 11:36

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .