Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Sep 2012 10:47:53 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r39517 - head/share/mk
Message-ID:  <201209101047.q8AAlrrM040205@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Mon Sep 10 10:47:53 2012
New Revision: 39517
URL: http://svn.freebsd.org/changeset/doc/39517

Log:
  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)

Modified:
  head/share/mk/web.site.mk

Modified: head/share/mk/web.site.mk
==============================================================================
--- head/share/mk/web.site.mk	Mon Sep 10 10:39:27 2012	(r39516)
+++ head/share/mk/web.site.mk	Mon Sep 10 10:47:53 2012	(r39517)
@@ -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



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