Using bsd.prog.mk in source Makefile

Mathieu Arnold mat at FreeBSD.org
Thu Sep 8 15:51:02 UTC 2016


Le 08/09/2016 à 17:38, Reid Linnemann a écrit :
> All,
>
> I'm having issues with an internal port in which the source tree makefile
> uses bsd.prog.mk. Using poudriere to build packages as a non-root user, any
> targets in the source makefiles which use *OWN and *GRP (such as the
> install target) will fail during staging because of an attempt to
> chown/chgrp that the non-privileged build user cannot perform. I'm
> wondering what the proper resolution for this problem is?
>
> I've tried setting WITH_INSTALL_AS_USER=yes to my port's MAKE_ENV and
> BUILD_ENV, and that did not appear to have any effect.

First, let me say that a port should really not use the base system
bsd.prog.mk bsd.lib.mk, and such, because they are moving targets, and
can break your port in no time.

Now, you need to remove all user/groups from the software's Makefile so
that it does not try to chown/grp things, and you must put all the
user/group things in the pkg-plist file using @owner and @group.

-- 
Mathieu Arnold


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


More information about the freebsd-ports mailing list