Section A.4. ketchup


A.4. ketchup

ketchup is a very handy tool used to update or switch between different versions of the Linux kernel source tree. It has the ability to:

  • Find the latest version of the kernel, download it, and uncompress it.

  • Update a currently installed version of the kernel source tree to any other version, by patching the tree to the proper version.

  • Handle the different development and stable branches of the kernel tree, including the -mm and -stable trees.

  • Download any patches or tarballs needed to do the update, if they are not present on the machine already.

  • Check the GPG signatures of the tarball and patches to verify that it has downloaded a correct file.

ketchup can be found at http://www.selenic.com/ketchup/ and has lots of additional documentation in the wiki at http://www.selenic.com/ketchup/wiki/.

Here is a set of steps that show how simple it is to use ketchup to download a specific kernel version, and then have it switch the directory to another kernel version with only a minimal number of commands.

To have ketchup download the 2.6.16.24 version of the kernel source tree into a directory, and rename the directory to be the same as the kernel version, enter:

 $ mkdir foo $ cd foo $ ketchup -r 2.6.16.24 None -> 2.6.16.24 Unpacking linux-2.6.17.tar.bz2 Applying patch-2.6.17.bz2 -R Applying patch-2.6.16.24.bz2 Current directory renamed to /home/gregkh/linux/linux-2.6.16.24 

Now, to upgrade this kernel to contain the latest stable kernel version, just enter:

 $ ketchup -r 2.6 2.6.16.24 -> 2.6.17.11 Applying patch-2.6.16.24.bz2 -R Applying patch-2.6.17.bz2 Downloading patch-2.6.17.11.bz2 --22:21:14--  http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.17.11.bz2            => `/home/greg/.ketchup/patch-2.6.17.11.bz2.partial' Resolving www.kernel.org... 204.152.191.37, 204.152.191.5 Connecting to www.kernel.org|204.152.191.37|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 36,809 (36K) [application/x-bzip2] 100%[====================================>] 36,809        93.32K/s 22:21:14 (92.87 KB/s) - `/home/greg/.ketchup/patch-2.6.17.11.bz2.partial' saved [36809/36809] Downloading patch-2.6.17.11.bz2.sign --22:21:14--  http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.17.11.bz2.sign            => `/home/greg/.ketchup/patch-2.6.17.11.bz2.sign.partial' Resolving www.kernel.org... 204.152.191.37, 204.152.191.5 Connecting to www.kernel.org|204.152.191.37|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 248 [application/pgp-signature] 100%[====================================>] 248           --.--K/s 22:21:14 (21.50 MB/s) - `/home/greg/.ketchup/patch-2.6.17.11.bz2.sign.partial' saved [248/248] Verifying signature... gpg: Signature made Wed Aug 23 15:01:04 2006 PDT using DSA key ID 517D0F0E gpg: Good signature from "Linux Kernel Archives Verification Key >ftpadmin@kernel.org<" gpg: WARNING: This key is not certified with a trusted signature! gpg:          There is no indication that the signature belongs to the owner. Primary key fingerprint: C75D C40A 11D7 AF88 9981  ED5B C86B A06A 517D 0F0E Applying patch-2.6.17.11.bz2 Current directory renamed to /home/greg/linux/tmp/x/linux-2.6.17.11 

This shows that ketchup automatically determined that the newest stable version was 2.6.17.11 and downloaded the needed patch files in order to get to that version.

It is highly recommended that you use ketchup if you want to download any Linux kernel source trees. It takes all of the work in finding where on the server the correct patch file is, and automatically applies the patch in the proper format, after checking that the downloaded file is properly signed. Combine ketchup with quilt and you have a very powerful setup that contains everything that you need in order to deal effectively with kernel sources as a Linux kernel developer.



Linux Kernel in a Nutshell
Linux Kernel in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596100795
EAN: 2147483647
Year: 2004
Pages: 113

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net