Problem building ports in a sandbox/jail using DESTDIR

Vincent Stemen vince.bsd at hightek.org
Sun Jun 30 22:52:32 UTC 2013


On Sun, Jun 30, 2013 at 11:29:53AM -0500, Vincent Stemen wrote:
> Hi.  I am trying to compile ports in a sandbox environment on
> FreeBSD-9.1-RELEASE using a snapshot of ports from 06/27/2013.
> 
> I have a jail file system I setup using my own scripts that I am pointing
> $DESTDIR to.  I am using 'zip' as the port for testing.
> 
> The problem is, I get an error like this and it immediately aborts.
> cd: /tmp/mountpoint.TJizHb/data/freebsd/ports/ports-20130627/archivers/zip: No such file or directory

Disregard.  I resolved it. 

I figured out what the variable expansion is doing for the 'cd' command.
The problem was due to the fact that my /usr/ports is a sym-link to
/data/freebsd/ports/ports-20130627 so ${.CURDIR} didn't coincide with
the default setting of '/usr/ports' for $PORTSDIR, so the substitution,
$${PORTSDIR}${.CURDIR:S|^${PORTSDIR}||}, returned the wrong path.
I just had to set $PORTSDIR to the full real path of the ports
directory.

It would be a nice enhancement to the make file though, to handle
/usr/ports being a sym-link without having to set $PORTSDIR to the full
real path :-).



More information about the freebsd-ports mailing list