On Sat, Mar 06, 2004 at 09:33:32PM -0600, adp wrote: > So this means I can't really just dump our custom packages to packages/All > since files will get overwritten. So I wanted to do something like: > > /repos/ftp.freebsd.org/.../packages/All > /repos/ftp.freebsd.org/.../packages/mail-custom > /repos/ftp.freebsd.org/.../packages/db-custom > /repos/ftp.freebsd.org/.../packages/web-custom > > The All are the original packages from ftp.freebsd.org and everything else > is custom compiled packages. I then create symlinks for everything in All to > mail-custom/, db-custom/, and so on. > > This doesn't work. When I pkg_add -r it always ends up looking in All/.
pkg_add(1) has an environment variable PKG_PATH which should help with what you want to do. So what you'ld do is maintain a copy of the default packages in, say: /repos/ftp.freebsd.org/.../packages/All Then have your own package repository structures: /repos/mail-custom/.../packages/All/ .../mail/ etc. /repos/db-custom/.../packages/All .../databases/ /repos/web-custom/.../packages/All/ .../www/ (Actually, if I was doing this, and only had to support one OS version and one system architecture, I'd probably dispense with all those intermediate directories shown as '...' and just keep a nice shallow directory tree). Although I've shown other port category directories here, you're not really interested in them: however, when you're building the packages, say for a mail server, you can just set the PACKAGES environment variable to /repos/mail-custom/.../packages and the package will be automatically installed to the right directory -- but the extra package category stuff will be created at the same time. The copy of the package collection from ftp.freebsd.org needs no local modification, so you could just setup an automated job to synchronise your copy with the FTP server and download any updated packages -- with the permission of the administrators of the server you mirror from, obviously. Then on your mail server machines, just set: PKG_PATH=/repos/mail-custom/.../packages/All:/repos/ftp.freebsd.org/.../packages/All" and similarly for the other classes of machines you're maintaining. Now pkg_add(1) will search the current working directory, and then, in order that list of directories on PKG_PATH to locate the package you want to install. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK
Description: PGP signature