Own ports organization
m.seaman at infracaninophile.co.uk
Wed Apr 4 20:36:36 UTC 2007
Alex Zbyslaw wrote:
> Milan Knizek wrote:
>> are there any recommendation how to organize own ports?
>> Should I keep them within official /usr/ports structure or rather
>> separately? If kept separately, how does it work with pkg* commands then?
> For what it's worth, if you use cvsup then you can store your own ports
> safely under /usr/ports. You can also store extra files (like extra
> patches, for example), though I'm not sure what would happen if that
> port got deleted. Probably just your patch would remain.
> I have no idea if csup is safe in this regard, and portsnap was
> definitely not safe, last I heard.
> I'm sure you could easily concoct a solution where you kept new ports in
> a separate tree, and had something like a Makefile to make links into
> /usr/ports after each time you used say portsnap. A symlink to a
> directory should work just as well as a real directory. I find it
> easier to stick with cvsup.
There's already support in the tree for adding local ports, or even
entire local categories of ports.
Simply create /usr/ports/Makefile.local containing eg:
SUBDIR += my-ports
and make /usr/ports/my-ports a link to your directory of local ports.
Or you can tack another port into the existing hierarchy -- eg.
suppose you have a customised version of apache22. Then you can create
SUBDIR += my-apache22
and /usr/ports/www/my-apache22 either as a link to, or as a directory
containing your modified apache22 port.
The SUBDIR links are probably only really necessary if you're going to
try and build an INDEX incorporating your custom stuff. As the mods go
into separate files, this is cvsup proof.
This approach generally works OK with the pkg_* tools -- so long as
each of your homegrown ports has an origin accessible within the ports
tree. You may find you need a bit of 'pkgdb -F' action to sort out
dependencies if one of your custom ports replaces a port that others
depend on. On the whole though, it should work nicely.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20070404/c2b54381/signature.pgp
More information about the freebsd-questions