Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

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.

share|improve this answer
    
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 Jun 24 '13 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 –  MadScientist Jun 24 '13 at 19:16
    
For some reason patchwork.kernel.org seems not to have the devicetree mailing list that I'm interested in. –  Craig McQueen Oct 29 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.

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

share|improve this answer
    
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. –  MadScientist Jun 24 '13 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 '13 at 18:07
1  
As I mentioned, I'm NOT subscribed to the mailing list. –  MadScientist Jun 24 '13 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. –  MadScientist Jun 24 '13 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 '13 at 19:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.