Allow user install

Simon J. Gerraty sjg at juniper.net
Tue Jun 26 20:28:33 UTC 2012


On Tue, 26 Jun 2012 14:42:53 -0500, Eric van Gyzen writes:
>>>
>>> +_uid!= id -u
>>> +.if ${MK_INSTALL_AS_USER} != "no"&&  ${_uid} != 0
>>> +_gid!= id -g
>>> +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE
>>> +$xOWN = ${_uid}
>>> +$xGRP = ${_gid}

>> I like this a lot more.
>
>Me too.  We're doing almost exactly that, directly in make.conf.  Yours 
>is cleaner, of course.

A final? tweak, I've moved the _uid!= id -u inside the first .if and
added another to avoid id -u if MK_INSTALL_AS_USER==no, the extra .if is
much cheaper than running 'id'.

+.if ${MK_INSTALL_AS_USER} != "no"
+_uid!= id -u
+.if ${_uid} != 0
+_gid!= id -g
+.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE
+$xOWN= ${_uid}
+$xGRP= ${_gid}


More information about the freebsd-arch mailing list