perform builds on a different drive

Dominic Fandrey kamikaze at bsdforen.de
Fri Sep 10 07:20:29 EDT 2010


On 09/09/2010 17:39, Dominic Fandrey wrote:
> On 09/09/2010 16:22, Alexey V. Degtyarev wrote:
>>
>> On 16:02 Thu 09 Sep, Dominic Fandrey wrote:
>>
>>> I intend to perform builds on a different drive similar to
>>> setting WRKDIRPREFIX on a regular system. I have a drive I want
>>> to dedicate to the task and which is mounted async, this is why
>>> I don't want the more permanent files stored there.
>>>
>>> On this list I found the suggestion to just make ${tb}/<BUILD>
>>> a symlink. However whenever I start a new build the symlink is
>>> removed and the directory recreated.
>>>
>>> Is there any /working/ way to perform the builds somewhere else?
>>
>> You may try to mount_nullfs ${tb}/<BUILD> to your different drive space
>> either permanently or with preBuildExtract hook. This would work.
>>
> 
> Thanks a lot, I prefer the hook solution - only, I don't find a
> suitable hook to unmount once the tinderbuild has completed.

OK, I went with that hook thing and worked around the need to umount.

Just for reference here is the little script I use for mounting:

#!/bin/sh -f
WRKDIR=/pool/4wrk/tinderbox
if /sbin/mount -p | /usr/bin/grep -qF "${WRKDIR}/${BUILD} ${DESTDIR}"; then
	/sbin/umount ${WRKDIR}/${BUILD} || return 1
fi
/bin/mkdir -p ${DESTDIR}
/bin/mkdir -p ${WRKDIR}/${BUILD}
exec /sbin/mount -t nullfs ${WRKDIR}/${BUILD} ${DESTDIR}


More information about the tinderbox-list mailing list