OPNsense Forum

English Forums => Development and Code Review => Topic started by: interfaSys on January 29, 2016, 12:49:29 pm

Title: Why is WRKDIRPREFIX set to /usr/obj for all ports?
Post by: interfaSys on January 29, 2016, 12:49:29 pm
make.conf contains
Code: [Select]
WRKDIRPREFIX= /usr/obj
which builds ports in /usr/obj/usr/ports/folder/port/work

The comment says "move work area out of unionfs".

What does it mean?
Title: Re: Why is WRKDIRPREFIX set to /usr/obj for all ports?
Post by: franco on January 29, 2016, 01:33:13 pm
This is a true story... /usr/ports is mounted into the chroot via unionfs. Building packages on top of a unionfs corrupts the package so that package installation on ZFS partitions fails. We don't know the details or have the time to inspect this further, so we have this workaround.
Title: Re: Why is WRKDIRPREFIX set to /usr/obj for all ports?
Post by: interfaSys on January 29, 2016, 02:13:48 pm
I'm confused... I didn't mount /usr/ports, I cloned it from the opnsense ports repo.

and I don't see any unionfs partitions
Code: [Select]
# mount
/dev/ada0s1a on / (ufs, local, soft-updates)
devfs on /dev (devfs, local, multilabel)
devfs on /var/dhcpd/dev (devfs, local, multilabel)


Maybe we're talking about 2 different things. I'm not trying to build an image. I just want to use ports to add or recompile some packages.
Title: Re: Why is WRKDIRPREFIX set to /usr/obj for all ports?
Post by: franco on January 29, 2016, 02:28:35 pm
You can zap WRKDIRPREFIX for local builds. It is only used for tools.git "make ports", which runs in a chroot with the unionfs trick
Title: Re: Why is WRKDIRPREFIX set to /usr/obj for all ports?
Post by: interfaSys on January 29, 2016, 02:38:37 pm
Got it, thanks!