Subject: Re: Creating .patch files on 1.5, and applying them to 1.5.1?
To: Bruce Martin <brucem@cat.co.za>
From: Luke Mewburn <lukem@wasabisystems.com>
List: netbsd-help
Date: 04/18/2001 22:46:09
On Wed, Apr 18, 2001 at 02:21:11PM +0200, Bruce Martin wrote:
> We are currently using NetBSD/i386 very happily. We use a customised kernel,
> because we have a number of PCI/ISA cards produced in-house, and so we write
> device drivers for them for NetBSD. So, at the moment, we take a generic
> /usr/src/sys tree, add a few of our own files, and then add a few lines to
> conf.h, conf.c, files.pci, and those sorts of files so that the system will
> "see" the new devices when compiling a kernel.
> 
> So, we can make these changes under, let's say 1.5, and create .patch files
> for all files we modified. This makes it quite easy for any other developers
> here to modify their generic /sys tree in the same way by applying the
> .patches. All good and well.
> 
> The problem now arises: NetBSD 1.5.1 comes out, with all sorts of new
> features, bugfixes, bells and whistles :) So now we want to upgrade to it,
> and include all our own drivers and customizations. I obviously can't use
> the .patch file anymore, because it changes from 1.5 to our customized, and
> will probably get way confused if the source has changed between 1.5 and
> 1.5.1.
> 
> Do we have to make all the changes in each file manually again, and generate
> new .patch files? Is there any way to perhaps use the previous .patch files
> (say, in conjunction with a 1.5->1.5.1 .patch) to get a 1.5.1 version, with
> our customizations?
> 
> This used to be a simple process, as we only had to change 10 or so files,
> but we are looking more like 100 files to change now, so it becomes very
> non-trivial!

Have you considered using CVS to help you? Importing NetBSD 1.5 on a
vendor branch (e.g, `NetBSD') , making local changes, and then
importing 1.5.1 onto the vendor branch (`NetBSD') again, and using
cvs get -j old-release-tag -j new-release-tag to merge the differences
between the previous and current vendor import into your local
versions?

CVS is pretty good at maintaining this type of thing. You can also
easily generate patches between the NetBSD branch at a given point and
your own local changes.

Hope that helps,
Luke.