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: [email protected]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to