Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Feb 2002 22:02:47 +0200
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Cliff Sarginson <cliff@raggedclown.net>
Cc:        FreeBSD List <freebsd-questions@freebsd.org>
Subject:   Re: Elegant solution to local kernel modification sought
Message-ID:  <20020210200246.GA16874@hades.hell.gr>
In-Reply-To: <20020210085403.GA2597@raggedclown.net>
References:  <20020210085403.GA2597@raggedclown.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-02-10 09:54, Cliff Sarginson wrote:
> Hello,
> I submitted a PR a while back for a small change to a kernel module that has
> not yet surfaced in Stable .. that's ok, I am not complaining about
> that.. but since I track STABLE, what is the easiest way to
> automatically infiltrate my change (I am looking for a generic kind
> of answer) when I cvsup (which I do once a week).
> 
> In this case, it is not such a big deal, since it is only 2 lines !
> But I would like to know for reference how this can be dealt with
> elegantly.

You can always keep a change in diff files, and apply the change with
patch(1) manually, after you CVSup.  This means you will have too manually
resolve any possible conflicts, or even make from scratch the changes that
the patch contains to a file that changed radically though.

If your diffs are saved with commands like:

	# cd /usr/src
	# diff -u sys/sys/errno.h.orig sys/sys/errno.h > /patch/errno

then you can easily apply the patch after CVSUP with:

	# cd /usr/src
	# patch -p0 < /patch/errno

An alternative solution is the CVS mirror described in a previous post.
You don't CVSup into /usr/src directly, but mirror everything in /home/ncvs
or some place else.  Then, you update the sources with:

a) Updating the sources, using 'clean' versions from the FreeBSD tree

	# cd /usr/src
	# cvs -R -d /home/ncvs update -APCd

b) Updating the sources, merging files of the local tree with FreeBSD
   versions of the same file:

	# cd /usr/src
	# cvs -R -d /home/ncvs update -APd

(The important difference between a) and b) is the use (or lack) of the -C
option.  Read the description of -C in cvs help to find out why :-)


Giorgos Keramidas                           FreeBSD Documentation Project
keramida@{freebsd.org,ceid.upatras.gr}      http://www.FreeBSD.org/docproj/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020210200246.GA16874>