On Tue, Sep 04, 2007 at 04:15:23AM +0200, Adriaan wrote:
> On 9/4/07, John Nietzsche <[EMAIL PROTECTED]> wrote:
> > Dear gentleman,
> >
> > i would like to set a single box in my network to keep syncronized to
> > the ports collection infra structure. My ideia is to export the
> > directory "/usr/ports" to all my local connected machines. So, there
> > would be no need to sync them all. I would like to be able to build
> > the utilities/lib/etc once and be able to install them every machine
> > with the same hardware/OS version.
> >
> > Is that possible?
> > How show be my /etc/exports control configuration file?
> >
> 
> An alternative would be to use one box to create binary packages from
> ports. Copy or link the packages to one directory which you make
> available to the clients by NFS, scp or ftp.
> 
> You now can install the binary packages on the clients by setting
> their PKG_PATH to that directory of the building machine.

Depends if all your boxes are the same architecture.
In any case, this is more or less sketched out in ports(7) (BULK PACKAGE 
BUILDING, in particular).

Roughly sketched:
- there are distinct areas in /usr/ports. There's the main stuff, there are
the distfiles, there are the packages, there are the cookies, and there are 
the working directories. You will want to use separate rules for each.
- You probably want to fetch the distfiles on the NFS server itself 
(using the mechanism described in mirroring-ports(7)
- keep the work directory local. That's what WRKOBJDIR is for.
- the ports tree has some mechanism to ensure that two thingies do not build
the same package at the same time. With separate workdirs, this is less of
an issue, as the chances of collision are less... but be careful. it's
probably a good idea to lock stuff on machines that share some not read-only
stuff (e.g., packages for the same architecture).
- you might want to put the built packages on a separate partition with
distinct rules: they're all that's needed if you just want to install stuff
on a machine.
- think about what you do with the various update and bulk cookies.

There. The only thing we do not handle at all is shared installation through
NFS. pkg_add really does not cope with machines which share only /usr/local
and not /etc, for instance...

Reply via email to