On Fri, 09 May 2025 13:25:40 +0200 Dag-Erling Smørgrav <[email protected]> wrote:
> "Dan Mahoney (Ports)" <[email protected]> writes: > > I’m doing some work on Jared Mauch’s efforts to make Mailman2 work > > under Python3 (because mailman3 is….a problem child that I don’t want > > to talk to)…. > > > > And I notice the original port uses something in > > /usr/ports/Mk/users/fakeroot. > > You mean Mk/Uses/fakeroot.mk, which contains this: > > .if !defined(_INCLUDE_USES_FAKEROOT_MK) > _INCLUDE_USES_FAKEROOT_MK= yes > BUILD_DEPENDS+= fakeroot:security/fakeroot > . if ${UID} != 0 > FAKEROOT?= fakeroot > . endif > .endif > > This means that if a port has `fakeroot` in its USES variable, the > security/fakeroot port will be added as a build dependency, and if the > port is being built by an unprivileged user, the variable FAKEROOT is > defined to `fakeroot`. > > You will find more information about what this is for in the > security/fakeroot port. > > DES > -- > Dag-Erling Smørgrav - [email protected] And in do-install target of Mk/bsd.port.mk, variable FAKEROOT is used as below. If somehow defined, make is called via the executable the variable defines. do-install: @(cd ${INSTALL_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} $ {FAKEROOT} \ ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} $ {INSTALL_TARGET}) https://cgit.freebsd.org/ports/tree/Mk/bsd.port.mk#n3419 -- Tomoaki AOKI <[email protected]>
