Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Oct 2013 00:16:33 -0500
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Christian Weisgerber <naddy@mips.inka.de>
Cc:        FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: How to reference /var/foo in pkg-plist?
Message-ID:  <CACdU%2Bf9iy2bmv6yxyGyDoEODqfk38oGVTGqxHPEFJgr4cASuQg@mail.gmail.com>
In-Reply-To: <l4eive$e4e$1@lorvorc.mips.inka.de>
References:  <l4eive$e4e$1@lorvorc.mips.inka.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 25, 2013 at 3:06 PM, Christian Weisgerber
<naddy@mips.inka.de> 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?
>
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 (if it supports
DESTDIR).

I had a look at the ${WRKSRC}/Makefile.in and the generated
${WRKSRC}/Makefile, but I didn't see support for DESTDIR in the
install section.  You will need to fix that so that the port will be
able to properly install into the STAGEDIR.

You can consider that STAGEDIR is similar to a chroot.  When the
package is created by either pkg or pkg_create, the files/directories
will be relative to / (not to STAGEDIR).

-- 
DISCLAIMER:

No electrons were maimed while sending this message. Only slightly bruised.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACdU%2Bf9iy2bmv6yxyGyDoEODqfk38oGVTGqxHPEFJgr4cASuQg>