Making a local branch of the ports tree

Lowell Gilbert freebsd-ports-local at be-well.ilk.org
Wed Apr 25 18:32:46 UTC 2007


Bill Moran <wmoran at potentialtech.com> writes:

> I know I've seen this discussed a dozen times, but google is letting me
> down right now.

It's not heavily documented, but most people who need it seem to be
able to figure it out pretty easily.  The trick for a full-net search
might be using "bsd.local.mk".

> Basically, I want to create a private branch of the ports tree for
> scripts and other stuff that isn't suitable to submit back to the main
> ports tree, and use portupgrade and other ports tools to maintain this
> across a bunch of systems that mount their ports tree via NFS.

Right.  Plenty of people do that.

> My thought is to make /usr/ports/private (or similar) and teach cvsup
> not to blow it away.  Then I just need to make sure that portupgrade
> and other tools see it.

Exactly right.  cvsup won't blow anything away unless it put it there
in the first place, so that's not an issue for your local tree.  For
the tools to see it, you just need the directory included in the
SUBDIR variable in the main ports Makefile, and everything else will
follow.  

> Does anyone have a HOWTO or list of steps to get this going?  I know
> this has been discussed before but I can't find any reference to it now.

Just put your 
SUBDIR += private
line into bsd.local.mk, and you should be off to the races.
That file *is* in the cvs tree, so cvsup will normally smash it unless
I'm overlooking something.  Using an exclude file seems like the
easiest way to fix that, although separate version control might work
better in the long run (there are plenty of other options, too; I
don't know which is the "normal" choice).

Be well.


More information about the freebsd-ports mailing list