tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Replacing NFS-shared DISTDIR

Hello all,
a common problem in bulk builds using multiple chroots or even machines
is the need to share distfiles. If you have ten chroots, you simply don't
want to waste bandwidth or storage for ten copies of all the files. The
normal solution to that was a shared filesystem, either null mounts
(locally) or NFS (remotely). This works quite well once the cache has
been populated, but it runs into problems when multiple instances tries
to fetch the same distfile.

I've added a new option to the fetch phase that allows an alternative
approach. I'm providing a local distfile mirror both for my bulk builds
and other machines like my laptop via HTTP. This is normally hooked up
via MASTER_SITE_OVERRIDE in mk.conf. What is missing is pushing back new
files to the mirror. This is exactly what the new POST_FETCH_HOOK
provides. I'm pointing it to a script like:

    case "$2" in
	rsync -av -e "ssh -i .../distfile_id_rsa" "$1" "public@192.168...:/public/$1"

For the bulk builds, I can now use DISTDIR=${WRKDIR}/.distfiles and
use_unprivileged_checksum=yes in pbulk.conf. No shared DISTDIR needed


Home | Main Index | Thread Index | Old Index