Using bsd.prog.mk in source Makefile

Reid Linnemann linnemannr at gmail.com
Thu Sep 8 16:00:40 UTC 2016


I really don't want to use autotools for this project, as it is only for a
freebsd product, and bsd.prog.mk and bsd.lib.mk make things very easy,
especially when I want to build and install the project outside of the
context of a port. What alternatives would you suggest? Others in my group
have overridden the do-install port target to avoid invoking the source
install target, but I think that's a little kludgey.

On Thu, Sep 8, 2016 at 9:50 AM, Mathieu Arnold <mat at freebsd.org> wrote:

> 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
>
>
>


More information about the freebsd-ports mailing list