[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

Filed under: General — Thomas @ 13:34

2003-12-31
13:34

Patch management

I need some help/input and this is the right place to ask for these kinds of things.

For some of my projects, I need to modify original sources and maintain some sort of fork of the original project. I want to set up some simple Makefile-based system to keep track of patch sets.

I'll braindump a little what I want to do and how I currently intend to do it, and feel free to comment or mail me directly with suggestions.

Suppose I want to modify anaconda, the Red Hat installer. There are a whole set of modifications to make; changing instances of Red Hat to something different, adding new pages for installation, and so on. Some of these patches are worth sending upstream for inclusion in anaconda mainline, some aren't, and so on.

So the goal is to actively work in a modified copy of the anaconda source tree that I keep around on my hard disk. I'd be working on one sort of change at a time, and when I'm happy with the change I would generate a patch that would only contain those changes, give it a name, and store it in a directory with specific patch files. So basically, what I need is:

  • a way to check if the pristine source, with the given set of patches applied, adds up to form my local modified copy; I'd think this would be easy by just creating a temporary directory as a copy of the source, apply the patches in order, and diff.
  • a way to customize an already created patch; my hope is that by applying all patches to the source tree, then reverse-applying the specific patch, this ought to work as well.

For now I'm going to try and tackle this by having a set of directories:

  • src: the original source directory
  • work: the working directory, in which I build and modify stuff
  • custom: the customized source directory, which would be "work" minus alld of the build files (because I need to sometimes add new source files, and doing diffs with new files is painful if you do it in build directories)
  • patched: the temporary directory created by starting from src and applying patches from "patches" in order
  • patches: the set of patches I have generated

I'm probably going to do the management of these through some Makefile-based system that allows me to generate a patch for the current work dir (by diffing custom against work and listing differences, syncing custom with work, then making a diff against custom and patched). Then I also need to figure out an easy way of doing N-1 patches, when I want to work on a patch.

As you can see, I'm not yet sure how to proceed, and all advice is welcome. I'm sure someone else must have been in the same situation before me. I've asked around a bit, tried to see how tools like arch/cvs/svn could do this for me, and tried to google (but "patch set management" turns up a lot of stuff that has nothing to do with what I want), to no avail.

Dave/Dina

Taking out the whole extended weekend to work on Dave/Dina. Kristof has been adding so much recently that I feel I have to catch up and get some things moving.

First thing to do is to update the whole system to Red Hat 9 and work on anaconda again to take it up there too. Will be quite some work, there has been a lot of changes in the install procedure between RH73 and RH9. This probably also explains why I want a patch set tool :)

Uraeus

Happy birthday big guy. Was this why you were pushing for a release ? :)

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.

picture