Staging and read-only /usr/ports [PATCH]

Stefan Bethke stb at
Tue Oct 1 19:11:15 UTC 2013

Am 01.10.2013 um 15:45 schrieb Bryan Drewery <bdrewery at>:

> On 9/26/2013 4:52 PM, Stefan Bethke wrote:
>> Guys,
>> I've noticed that more and more ports are trying to build a package /usr/ports/category/port/port-version.tgz. Since my /usr/ports is mounted read-only (via nullfs), this fails. I've looked through Mk/*.mk trying to figure out how I can redirect this to another dir. Is PACKAGES the way to go? What if I don't want to keep packages around?
> Please try this patch:

Work great! Thanks a million!

PACKAGE not set in make.conf, WRKDIR:
WRKDIRPREFIX?=  /var/ports/work

--->  Deinstalling 'btpd-0.16_2'
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 207 packages found (-1 +0) (...) done]
--->  Installing the new version via the port
===>  Staging for btpd-0.16_2
===>   Generating temporary packing list
 /bin/mkdir -p '/var/ports/work/net-p2p/btpd/stage/usr/local/bin'
  install  -s -o root -g wheel -m 555 btpd/btpd cli/btcli cli/btinfo '/var/ports/work/net-p2p/btpd/stage/usr/local/bin'
 /bin/mkdir -p '/var/ports/work/net-p2p/btpd/stage/usr/local/man/man1'
 install  -o root -g wheel -m 444 doc/btcli.1 doc/btinfo.1 doc/btpd.1 '/var/ports/work/net-p2p/btpd/stage/usr/local/man/man1'
install  -o root -g wheel -m 444 /var/ports/work/net-p2p/btpd/btpd-0.16/README /var/ports/work/net-p2p/btpd/stage/usr/local/share/doc/btpd/
====> Compressing man pages
===>  Building package for btpd-0.16_2
Creating package /var/ports/work/net-p2p/btpd/btpd-0.16_2.tbz
Registering depends:.
Creating bzip'd tar ball in '/var/ports/work/net-p2p/btpd/btpd-0.16_2.tbz'
===>  Installing for btpd-0.16_2


Stefan Bethke <stb at>   Fon +49 151 14070811

More information about the freebsd-ports mailing list