From nobody@FreeBSD.org  Fri Mar 19 18:53:25 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 31AB7106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 19 Mar 2010 18:53:25 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 20D5B8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 19 Mar 2010 18:53:25 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JIrOE1016956
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 19 Mar 2010 18:53:24 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o2JIrO2h016955;
	Fri, 19 Mar 2010 18:53:24 GMT
	(envelope-from nobody)
Message-Id: <201003191853.o2JIrO2h016955@www.freebsd.org>
Date: Fri, 19 Mar 2010 18:53:24 GMT
From: Jason Helfman <jhelfman@e-e.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc: tomasv@megalogika.lt
Subject: tomcat55 uid is hardcoded to 80
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         144878
>Category:       ports
>Synopsis:       [patch] www/tomcat55 uid is hardcoded to 80
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 19 19:00:08 UTC 2010
>Closed-Date:    Tue Jun 29 10:40:03 UTC 2010
>Last-Modified:  Tue Jun 29 10:40:07 UTC 2010
>Originator:     Jason Helfman
>Release:        7.2-p7
>Organization:
Experts Exchange
>Environment:
FreeBSD eggman.experts-exchange.com 7.2-RELEASE-p7 FreeBSD 7.2-RELEASE-p7 #0: Fri Feb 26 19:51:57 UTC 2010     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
The user and group for tomcat are configurable, however the id has to be 80. This didn't make sense to me, so I put a configurable option in for the id as well.
>How-To-Repeat:

>Fix:
patch included

Patch attached with submission follows:

--- tomcat55/Makefile.orig	2010-03-19 11:32:45.000000000 -0700
+++ tomcat55/Makefile	2010-03-19 11:41:38.000000000 -0700
@@ -29,6 +29,7 @@
 APP_SHORTNAME=	tomcat${MAJOR_VER:S/.//}
 TOMCAT_USER?=	www
 TOMCAT_GROUP?=	www
+TOMCAT_UID?=	80
 HTTP_PORT?=	8180
 SHUTDOWN_PORT?=	8005
 AJP_1_3_PORT?=	8009
@@ -58,7 +59,8 @@
 		STDOUT_LOG=${STDOUT_LOG} \
 		TOMCAT_HOME=${APP_HOME} \
 		TOMCAT_VERSION=${MAJOR_VER:S/.//} \
-		USER=${TOMCAT_USER}
+		USER=${TOMCAT_USER} \
+		UID=${TOMCAT_UID}
 
 .include <bsd.port.pre.mk>
 
@@ -74,7 +76,7 @@
 	@${ECHO_MSG} "   Destination directory:    ${APP_HOME}"
 	@${ECHO_MSG} "   Location of JDK:          ${JAVA_HOME}"
 	@${ECHO_MSG} "   Location of Java port:    ${JAVA_PORT}"
-	@${ECHO_MSG} "   Running as (user/group):  ${TOMCAT_USER}/${TOMCAT_GROUP}"
+	@${ECHO_MSG} "   Running as (user/group/uid):  ${TOMCAT_USER}/${TOMCAT_GROUP}/${TOMCAT_UID}"
 	@${ECHO_MSG} "   HTTP port:                ${HTTP_PORT}"
 	@${ECHO_MSG} "   Shutdown listener port:   ${SHUTDOWN_PORT}"
 	@${ECHO_MSG} "   AJP 1.3 connector port:   ${AJP_1_3_PORT}"
--- tomcat55/files/pkg-install.in.orig	2010-03-19 11:32:09.000000000 -0700
+++ tomcat55/files/pkg-install.in	2010-03-19 11:32:34.000000000 -0700
@@ -12,7 +12,7 @@
 fi
 
 # Set some constants
-UID=80
+UID=%%UID%%
 GID=${UID}
 USER=%%USER%%
 GROUP=%%GROUP%%


>Release-Note:
>Audit-Trail:
Date: Fri, 19 Mar 2010 19:19:28 -0700
From: Jason Helfman <jhelfman@e-e.com>
To: bug-followup@FreeBSD.org, jhelfman@e-e.com
Subject: Re: [patch] ports/144878: www/tomcat55 uid is hardcoded to 80

 Forgot to include the "patch" prefix.
 
 To expand on the description a bit... I believe having the choice of a
 user/group introduced a bug
 
 The 'www' user is the default user and group, however there is a choice
 to use something other than the default. However,  the uid is not an
 option to tune, and has to be '80'.
 
 The 'www' user is in /usr/ports/UPDATING, so in order to add a different
 user, you would need to remove the www user, but this causes a warning
 when doing a 'make index' under /usr/ports.
 
 You could simply change the id of www on your system, but I don't think
 this is the best solution, therefore the patch I submitted.

From: Jason Helfman <jhelfman@e-e.com>
To: bug-followup@FreeBSD.org, jhelfman@e-e.com
Cc:  
Subject: Re: ports/144878: www/tomcat55 uid is hardcoded to 80
Date: Mon, 22 Mar 2010 17:45:09 -0700

 Correction: 'www' uid is in /usr/ports/UIDs
State-Changed-From-To: open->feedback 
State-Changed-By: pgollucci 
State-Changed-When: Wed May 5 20:51:43 UTC 2010 
State-Changed-Why:  
cc'ed maintainer, ask for approval 

http://www.freebsd.org/cgi/query-pr.cgi?pr=144878 
State-Changed-From-To: feedback->closed 
State-Changed-By: stefan 
State-Changed-When: Tue Jun 29 10:39:44 UTC 2010 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=144878 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/144878: commit references a PR
Date: Tue, 29 Jun 2010 10:39:40 +0000 (UTC)

 stefan      2010-06-29 10:39:30 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/tomcat55         Makefile 
     www/tomcat55/files   pkg-install.in 
   Log:
   Make the UID as configurable as the user/group.
   
   PR:             144878
   Submitted by:   Jason Helfman <jhelfman@e-e.com>
   Approved by:    maintainer timeout (>3 months)
   Feature safe:   yes
   
   Revision  Changes    Path
   1.50      +4 -2      ports/www/tomcat55/Makefile
   1.2       +2 -2      ports/www/tomcat55/files/pkg-install.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
