Greg KH offered a short "kernel maintainer's HOWTO for quilt and -mm", offering instructions on how one can utilize quilt to create patchsets intended to be merged into Andrew Morton [interview]'s -mm tree [story]. He begins:
"So, You're a kernel maintainer faced with the fact that you are having people send you loads of patches, but don't know how to stage them in a fashion that others can see what you have and have not accepted. You also want to have them show up in the -mm releases and need to provide some hint as to the order in which they should be applied. This small document and script will provide one solution to this."
From: Greg KH [email blocked] To: linux-kernel Subject: kernel maintainer's HOWTO for quilt and -mm Date: Thu, 28 Apr 2005 15:34:14 -0700 Kernel Developer's guide to using quilt so everyone else benefits. Note, this is just one way to do this, if you have a different process for dealing with patches and making them public for others to view and test, by all means, please do it. I'm offering this up as one possible way to achieve this goal, as a starting place for others to work off of. So, You're a kernel maintainer faced with the fact that you are having people send you loads of patches, but don't know how to stage them in a fashion that others can see what you have and have not accepted. You also want to have them show up in the -mm releases and need to provide some hint as to the order in which they should be applied. This small document and script will provide one solution to this. The script is also at: http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/make_patchsets First off, you need to be using quilt to manages the patches sent to you. I'm not going to try to explain how to use quilt, or set it up. The only suggestion that I have is to use subdirectories for different types of patches that you want to have rolled up together. For example, in my patches directory, I have the following structure: $ ls -F ~/linux/patches/ driver/ gregkh/ i2c/ pci/ series usb/ I place all usb related patches in the usb/ subdir, PCI related patches in the pci/ subdir, and so on. I leave the gregkh/ subdir for patches that no one else would care about, and don't maintain for anyone else. To export this mess of patches, the script below, make_patchsets, can be used. At the top of this script are a few items that you should edit to customize for your own use. They are: # AUTHOR is your name, it will be pre-appended to all patches AUTHOR=gregkh # KERNEL is the base kernel version your quilt series is # against. You need to have this kernel tree already # uncompressed and waiting in the TMP directory KERNEL=2.6.12-rc3 # TMP is where you want everything to happen. You need to have # a base kernel version (specified by KERNEL) in here, all # unpacked. This is also where the end result files will be # placed. TMP=~/linux/tmp # PATCH_DIR is the location of your quilt patches. There should # be a file in here called "series" and a bunch of patches in # subdirectories below that (the subdirs are how you divide # stuff up by TREES) PATCH_DIR=~/linux/patches # TREES is a list of the different sets of kernel patches you # wish to produce. If you only have one set of patches, this # can be a single value. The strings here need to have a # subdirectory in the PATCH_DIR to get the patches from. TREES="driver i2c pci usb" When this script is run, individual "summary" patches are generated, one per TREES value, and a directory is created with all of the individual patches that were used to generate this bigger patch. In my case, this looks like: $ ls -F ~/linux/tmp/ | grep gregkh gregkh-01-driver/ gregkh-01-driver-2.6.12-rc3.patch gregkh-02-i2c/ gregkh-02-i2c-2.6.12-rc3.patch gregkh-03-pci/ gregkh-03-pci-2.6.12-rc3.patch gregkh-04-usb/ gregkh-04-usb-2.6.12-rc3.patch All of these patches are now safe to copy up to some public directory somewhere and have others use them. I suggest using something like: rsync -avP -e ssh --delete tmp/gregkh-* gregkh@some_public_box:/pub/linux/kernel/people/gregkh/gregkh-2.6/ Examples of the output of this script can be seen at: http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/