Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 May 2012 23:14:37 +0200
From:      Mel Flynn <rflynn@acsalaska.net>
To:        Chris Rees <crees@freebsd.org>
Cc:        Warren Block <wblock@wonkity.com>, Mark Linimon <linimon@lonesome.com>, Scot Hetzel <swhetzel@gmail.com>, freebsd-ports@freebsd.org, Andriy Gapon <avg@freebsd.org>
Subject:   UID/GID_OFFSET (Was: Re: WITH_GCC)
Message-ID:  <4FBFF63D.7010404@acsalaska.net>
In-Reply-To: <CADLo838i1pydvZrzMbq=kJrg%2BHHyGvSp%2Bxr2=piCLMaWaajq2Q@mail.gmail.com>
References:  <CAGFTUwPUFdP=Z20%2BbL59qFuh_V6R1R-GcyrK03dxESL6ZyGz7A@mail.gmail.com> <4F578AA7.4060008@FreeBSD.org> <4F990D9A.3090100@FreeBSD.org> <4FA643FA.3050206@FreeBSD.org> <4FAB6E01.50108@FreeBSD.org> <CACdU%2Bf_77t7GCH2hm3hwcK2i%2BTcHUq_aBP4a7SeghQhGz3soDg@mail.gmail.com> <4FAC2EC1.8040708@FreeBSD.org> <20120517014743.GB5348@lonesome.com> <alpine.BSF.2.00.1205172027340.62885@wonkity.com> <CADLo838i1pydvZrzMbq=kJrg%2BHHyGvSp%2Bxr2=piCLMaWaajq2Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 20-5-2012 14:06, Chris Rees wrote:

> Usually.  Sometimes it's (ab)used to include the relevant bsd.*.mk
> file without adding dependencies (WANT_GNOME), but normally that's
> what WANT_ is used for.
> 
> Definitely add a warning that if you want to use a WANT_ variable you
> should also check the relevant Mk/ files to check for syntax.

What's also not consistent is the use of:
USE_FOO=	42+
which is shorthand for:
USE_FOO=	yes
WANT_FOO_VER=	42+

Anyway, since Warren is on the job, on one of my travels through pmk, I
turned a corner and met these totally awesome user settable variables:
UID_OFFSET
GID_OFFSET

No docs on them in pmk itself or share/examples/etc/make.conf. What they
do is add the specified number to the UID and GID that a port defines by
using /usr/ports/{UIDS,GIDS}. This is extremely useful if you are using
multiple jails on one machine and don't want the uid's to clash (shared
memory for example).
It's also useful, if you have different providers for uid/gid
information through the use of NSS modules. Knowing that ports won't
ever get into your "module range" makes you sleep better.
Example in /etc/make.conf
UID_OFFSET=	20000
GID_OFFSET=	${UID_OFFSET} # best to keep them equal

Installing for example postgresql, will now use uid/gid 20070 instead of 70.
-- 
Mel



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FBFF63D.7010404>