How to reference /var/foo in pkg-plist?
Tijl Coosemans
tijl at coosemans.org
Sat Nov 2 11:33:17 UTC 2013
On Fri, 1 Nov 2013 22:14:31 +0000 (UTC) Christian Weisgerber wrote:
> Scot Hetzel <swhetzel at gmail.com> wrote:
>
> > > @exec mkdir -pm 770 /var/spool/bsmtp; chown uucp:uucp /var/spool/bsmtp
> > > @dirrmtry /var/spool/bsmtp
> > >
> > The correct way to handle this is to have the port create
> > ${STAGEDIR}/var/spool/bsmtp. This could be created in the
> > post-install target or in the ${WRKSRC}/Makefile
>
> Okay, but how do I package this directory then? What entry would
> I put in pkg-plist?
>
> Hmm, actually, this
>
> @owner uucp
> @group uucp
> @mode 770
> @dirrmtry /var/spool/bsmtp
> @mode
> @group
> @owner
>
> produces the desired entry in the package's tar archive
>
> drwxrwx--- 0 uucp uucp 0 Nov 1 23:07 /var/spool/bsmtp/
>
> However, I'm not sure if I'm using this as intended or if it just
> happens to work out.
Try something like this in pkg-plist:
@unexec rm -d /var/foo 2>/dev/null || true
@exec install -d -o uucp -g uucp -m 0770 /var/foo
The directory is created on installation and removed (if empty) on
deletion, but is not actually part of the package archive.
More information about the freebsd-ports
mailing list