CHROOT and prePortBuild hook

Joe Marcus Clarke marcus at marcuscom.com
Mon May 26 18:34:31 EDT 2008


On Tue, 2008-05-27 at 08:12 +1000, Alexander Logvinov wrote:
> Hello!
> 
> Where is CHROOT environment variable in the prePortBuild hook?
> 
> # uname -r
> 7.0-RELEASE
> 
> # pkg_info -Ix tinder
> tinderbox-2.4.2_2   Port build tinderbox system
> 
> # ./tc listHooks
> Name       : prePortBuild
> Command    : hookbuild.sh
> Description:
> Hook to run before building a port.
> If this command returns a non-zero value, the port will not be built.
> The following environment will be passed to the hook command:
>         PACKAGE_NAME : Package name of the port
>         BUILD : Build name for this port
>         JAIL : Jail name for this Build
>         PORTSTREE : PortsTree name for this Build
>         CHROOT : Location of the Build root
>         PORTDIR : Directory origin of this port
>         PB : Tinderbox root
> 
> 
> # cat hookbuild.sh
> #!/bin/sh
> 
> major_version=$(echo ${JAIL} | sed -E -e 's|(^.).*$|\1|')
> if [ ${major_version} -lt 7 ]; then
>     cp ${PB}/scripts/misc/libmap.conf ${CHROOT}/etc
>     echo 1 > /home/test
>     echo ${CHROOT} >> /home/test
>     echo 2 >> /home/test
> fi
> 
> # cat /home/test
> 1
> 
> 2

Good catch!  Fixed in CVS.  I'll be rolling a new version soon.

Joe

-- 
PGP Key : http://www.marcuscom.com/pgp.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://marcuscom.com/pipermail/tinderbox-list/attachments/20080526/bbea6524/attachment.bin 


More information about the tinderbox-list mailing list