Re: UID/GID_OFFSET (Was: Re: WITH_GCC)

2012-06-13 Thread Mel Flynn
On 12-6-2012 2:38, Warren Block wrote:
 On Fri, 25 May 2012, Mel Flynn wrote:
 
 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=2
 GID_OFFSET=${UID_OFFSET} # best to keep them equal

 Installing for example postgresql, will now use uid/gid 20070 instead
 of 70.
 
 Okay, I've finally cleared some room to work on this; sorry about the
 delay.
 
 My main question is where to add these descriptions.  Should they go in
 existing sections where possible?  Or are we talking about a new
 section, and if so, where?  At the end of the Dependencies section?

Ideally in man7/ports.7, but I see that is quite outdated. It shouldn't
be in the porters handbook. The variables are useful for end users. The
handbook maybe?

-- 
Mel
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: UID/GID_OFFSET (Was: Re: WITH_GCC)

2012-06-13 Thread Warren Block

On Wed, 13 Jun 2012, Mel Flynn wrote:


On 12-6-2012 2:38, Warren Block wrote:

On Fri, 25 May 2012, Mel Flynn wrote:


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=2
GID_OFFSET=${UID_OFFSET} # best to keep them equal

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


Okay, I've finally cleared some room to work on this; sorry about the
delay.

My main question is where to add these descriptions.  Should they go in
existing sections where possible?  Or are we talking about a new
section, and if so, where?  At the end of the Dependencies section?


Ideally in man7/ports.7, but I see that is quite outdated. It shouldn't
be in the porters handbook. The variables are useful for end users. The
handbook maybe?


I understood this to be definitions of the WITH_, USE_, and WANT_ 
variables in the Porter's Handbook to help maintainers understand when 
they should use which style.  The UID/GID_OFFSET variables should 
possibly be a separate thing.

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: UID/GID_OFFSET (Was: Re: WITH_GCC)

2012-06-11 Thread Warren Block

On Fri, 25 May 2012, Mel Flynn wrote:


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= 2
GID_OFFSET= ${UID_OFFSET} # best to keep them equal

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


Okay, I've finally cleared some room to work on this; sorry about the 
delay.


My main question is where to add these descriptions.  Should they go in 
existing sections where possible?  Or are we talking about a new 
section, and if so, where?  At the end of the Dependencies section?

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


UID/GID_OFFSET (Was: Re: WITH_GCC)

2012-05-25 Thread Mel Flynn
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= 2
GID_OFFSET= ${UID_OFFSET} # best to keep them equal

Installing for example postgresql, will now use uid/gid 20070 instead of 70.
-- 
Mel
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org