RT Patch Manager

From RTwiki
Revision as of 21:58, 6 October 2006 by Clark (Talk | contribs)

Jump to: navigation, search

This is a python script written by User:Clark to track, fetch, and apply Ingo's -rt patches to a git kernel tree

Add documentation for using the script

External Links

This python script started life as a convenience script that would tell me when Ingo released a new -rt patch, since there have been times when Ingo churned out four or more -rt patch spins in a twelve hour period :).

The script presumes the existance of two directories:

   1. A Patch directory for storing the patch
   2. A Linux git tree from kernel.org

Here's the usage message:

 $ rtpatch --help
 usage: rtpatch [options] <cmd>
  where [options] is one of:
      --gittree=<path> - specify git tree to apply [./linus-kernel.git]
      --patchdir=<path> - specify patch directory [./sources]
  where <cmd> is one of:
      check - get the latest version of the patch
      get   - fetch the latest version of the patch
      apply - fetch and apply the latest version of the patch
  running with no arguments checks for existance of the patch

So, to just check the current version available:

 $ rtpatch
 Available RT patch:

If you want to fetch this version of the patch:

 $ rtpatch get

You'll see a progress bar while the script retrieves the patch and saves it in your current directory

If you want to track the -rt patches using a git tree, make sure you have git installed on your system, make sure you have lots of disk space somewhere, change directories to that place and type:

 $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

Then go away for a long time. When the command finishes you will have a clone of Linus's git tree and you're ready to fetch and apply the -rt patch.

Assuming that you are in a directory that contains two subdirectories named source and linus-kernel.git, you can issue the command:

 $ rtpatch apply

This will fetch the current -rt patch to the source directory and will then apply the patch to the linux-kernel.git git tree, (assuming that the patch hasn't already been applied). Your git tree will end up with a branch that is named after the -rt patch (e.g. if you issue the apply command and the current -rt patch is patch-2.6.18-rt5, you will end up with a branch named v2.6.18-rt5 in the git tree).

Personal tools