How do I get a linux kernel patch set from the mailing list?

18,564

Solution 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.

Solution 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

Solution 3

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

Solution 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.

Solution 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.

Share:
18,564

Related videos on Youtube

MadScientist
Author by

MadScientist

Hacker diver skier biker runner husband father ... not necessarily in that order.

Updated on September 18, 2022

Comments

  • MadScientist
    MadScientist almost 2 years

    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?

  • MadScientist
    MadScientist about 11 years
    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.
  • slm
    slm about 11 years
    @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.
  • MadScientist
    MadScientist about 11 years
    As I mentioned, I'm NOT subscribed to the mailing list.
  • MadScientist
    MadScientist about 11 years
    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.
  • MadScientist
    MadScientist about 11 years
    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.
  • slm
    slm about 11 years
    @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-).
  • MadScientist
    MadScientist about 11 years
    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
  • Ohmen
    Ohmen over 9 years
    For some reason patchwork.kernel.org seems not to have the devicetree mailing list that I'm interested in.
  • Ciro Santilli Путлер Капут 六四事
    Ciro Santilli Путлер Капут 六四事 over 6 years
    How to you get the mbox file in the first place usually?
  • Adam Baxter
    Adam Baxter over 5 years
    pwclient link is now broken - a casual search hasn't found a new source.