How to reference /var/foo in pkg-plist?
Scot Hetzel
swhetzel at gmail.com
Mon Oct 28 05:16:34 UTC 2013
On Fri, Oct 25, 2013 at 3:06 PM, Christian Weisgerber
<naddy at 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.
More information about the freebsd-ports
mailing list