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

Matthew Seaman m.seaman at infracaninophile.co.uk
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 pkg-install.sh 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.

	Cheers,

	Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew at infracaninophile.co.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20131025/eef9c7ae/attachment.sig>


More information about the freebsd-ports mailing list