Change WEBGRP and CGIGRP defaults.

The web build uses WEBGRP and CGIGRP to determine group ownership
during the build phase.  When left unset, the default group is 'www'.
The problem is that if $USER is not in group 'www', the build will
fail due to lack of permissions via chgrp(1).

This change sets default values for WEBGRP and CGIGRP to $USER, unless
explicitly set during build time to prevent chgrp(1)-invoked build
failure.

Note:  This change has no effect for users currently setting WEBGRP
and CGIGRP, either via command-line or within scripts.

Reviewed by:	-www@ (silence)
This commit is contained in:
Glen Barber 2012-09-10 10:47:53 +00:00
parent e9c4808356
commit 1456891f7e
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=39517

View file

@ -19,12 +19,23 @@ WEBDIR?= ${.CURDIR:T}
CGIDIR?= ${.CURDIR:T}
DESTDIR?= ${HOME}/public_html
_ID?= /usr/bin/id
_UID!= ${_ID} -u
WEBOWN?= ${USER}
.if (${_UID} > 0)
WEBGRP?= ${USER}
.else
WEBGRP?= www
.endif
WEBMODE?= 664
CGIOWN?= ${USER}
.if (${_UID} > 0)
CGIGRP?= ${USER}
.else
CGIGRP?= www
.endif
CGIMODE?= 775
BUNZIP2?= /usr/bin/bunzip2