How to reference /var/foo in pkg-plist?

Matthew Seaman m.seaman at
Fri Oct 25 22:12:51 UTC 2013

On 25/10/2013 21:06, Christian Weisgerber wrote:
> For a crufty port of mine that I'm converting to staging, I'm trying
> this in pkg-plist:
>   @exec mkdir -pm 770 /var/spool/bsmtp; chown uucp:uucp /var/spool/bsmtp
>   @dirrmtry /var/spool/bsmtp
> Alas, it doesn't package:
>   ===>  Building package for bsmtp-1.02_5
>   pkg-static: lstat(/usr/ports/mail/bsmtp/work/stage/var/spool/bsmtp/):
>   No such file or directory
> This isn't meant to reference ${STAGEDIR}/var/spool/bsmtp, I really
> want the absolute path /var/spool/bsmtp.  Adding @cwd / doesn't
> help.
> What's the correct way to handle this?

Use a script, or add code to an rc script to create any
necessary directory structure when a daemon is first started.  Usually
working data stored under /var (and any necessary directory structure to
hold it) is not counted as part of the port and not deleted on package
deinstallation or upgrade.



Dr Matthew J Seaman MA, D.Phil.

JID: matthew at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-ports mailing list