Notes about Domen's kernel janitor scripts. [ This document is very much beta, how can I improve it? ] Okay, these scripts are ugly and make some assumptions, I'll try to cover them, but I might forget something. Assumptions ----------- - there may be assumption about $HOME being /home/domen/ - ~/kernel/quilt - clean kernel tree used for quilt patching - ~/kernel/kj-quilt - quilt patches, series, merged, dropped, patches.dontsend files - ~/kernel/kj-tag (-kj tag; silly location, I know) - kj_* scripts dir is in $PATH - empty directories ~/kernel/kj-new and ~/kernel/kj-new-not-clean - a bit hacked quilt mail (don't forget to add it) Getting patches into quilt -------------------------- Pipe patches to kj_patch (in mutt: |kj_patch), it might tell you the patch is already merged, there's whitespace, rejects etc. It puts patch in ~/kernel/kj-new (or kj-new-not-clean if there are rejects). Patches name is something like -drivers_net_3c59x (I use dash only as separator between description and path, so I can easily sort patches by path /hmm... I can no longer remember why this was useful/). So, now either use 'kj_short_desc msleep' (which will result in msleep-drivers_net_3c59x) or just "mv --" it. Do this for as many patches as you like. Now cd ~/kernel/quilt, quilt import ../kj-new/*, possibly edit ../kj-quilt/series, and that's it. Refreshing -kj tree ------------------- cd ~/kernel/quilt kj_push_refresh_all (basically just quilt push, quilt refresh until some reject or the end occurs). Fix rejects. I usually do this by editing patch file, it's time consuming, and I hate it. Another option is 'quilt push -f' and then some hand editing. Btw. to unapply all patches use 'quilt pop -a'. Releasing -kj tree ------------------ cd ~/kernel/quilt kj_push_refresh_all kj_release Now you have a kj release in ie. ~/kernel/kj-quilt/2.6.13-kj. kj_release also generates kj-quilt/mail file, for that it needs dropped, merged, series and series.old files. series.old is series from previous release. Compile testing (this is one of the neatest tricks :-) ). cd some_already_built_tree kj_compile_test your_patchset.bz2 Execute last line it prints. I also use osdl's plm for compile testing, it's very handy since it compiles on many architectures. Sending patches --------------- I have this script ~/kernel/kj_prepare_for_bombing.pl, which generates patch lists and where they should go. I'm quite proud of it. :-) How it works? It takes patches from pbomb (cp series pbomb), and sorts patches (excluding ones from patches.dontsend) into pbomb.blah files, it also creates mbox.blah files (mbox containing all of them, nice for fast 'mutt -f mbox' review). This usualy needs some tweaking of kj_prepare_for_bombing, but it sure cuts down time of tracking maintainers. When you are satisfied with mbox files, execute (or just pipe to sh) scripts output. Beware, this uses a-bit-hacked quilt, with options --series (for series file) --nofile (no original attachment filename in patch or something) --nointr (no 0/n mail; it still outputs it to stdout, but it does not mail it [well... anymore, it did once :-) ] ) And don't send more than 20 or so patches to LKML at the same time. Wait a bit in between. Consider scripts public domain, unless otherwise stated inside. Feel free to mail me about any questions regarding them. Domen