From 1456891f7e75b280a630a99f578351503a59ca38 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Mon, 10 Sep 2012 10:47:53 +0000 Subject: [PATCH] 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) --- share/mk/web.site.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/share/mk/web.site.mk b/share/mk/web.site.mk index 70e6a6fd62..7306c50c33 100644 --- a/share/mk/web.site.mk +++ b/share/mk/web.site.mk @@ -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