FreeBSD Bugzilla – Attachment 117597 Details for
Bug 159695
[patch] www/tomcat6: configurable user/groups breaks if configured
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
tomcat6.patch.txt
tomcat6.patch.txt (text/plain; charset=us-ascii), 5.09 KB, created by
Jason
on 2011-08-11 18:50:44 UTC
(
hide
)
Description:
tomcat6.patch.txt
Filename:
MIME Type:
Creator:
Jason
Created:
2011-08-11 18:50:44 UTC
Size:
5.09 KB
patch
obsolete
>Index: www/tomcat6/Makefile >=================================================================== >RCS file: /home/jhelfman/ncvs/ports/www/tomcat6/Makefile,v >retrieving revision 1.63 >diff -u -r1.63 Makefile >--- www/tomcat6/Makefile 12 Jun 2011 13:55:39 -0000 1.63 >+++ www/tomcat6/Makefile 11 Aug 2011 17:42:08 -0000 >@@ -7,6 +7,7 @@ > > PORTNAME= tomcat > PORTVERSION= 6.0.32 >+PORTREVISION= 1 > CATEGORIES= www java > MASTER_SITES= ${MASTER_SITE_APACHE} > MASTER_SITE_SUBDIR= tomcat/tomcat-6/v${PORTVERSION}/bin >@@ -23,14 +24,11 @@ > NO_BUILD= YES > > USE_RC_SUBR= tomcat6.sh >-SUB_FILES= pkg-install > > MAJOR_VER= ${PORTVERSION:R} > APP_HOME?= ${PREFIX}/${DISTNAME:R} > LOG_DIR= ${APP_HOME}/logs > APP_SHORTNAME= ${PORTNAME}${MAJOR_VER:S/.//} >-TOMCAT_USER?= www >-TOMCAT_GROUP?= www > HTTP_PORT?= 8180 > SHUTDOWN_PORT?= 8005 > AJP_1_3_PORT?= 8009 >@@ -41,7 +39,7 @@ > logging.properties server.xml tomcat-users.xml web.xml > CONF_EXT= sample > PLIST_SUB= T=${APP_HOME:S/^${PREFIX}\///} CONF_EXT=${CONF_EXT} \ >- WWWOWN=${TOMCAT_USER} WWWGRP=${TOMCAT_GROUP} >+ WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} > LATEST_LINK= ${APP_SHORTNAME} > > SUB_LIST= AJP_1_3_PORT=${AJP_1_3_PORT} \ >@@ -54,8 +52,7 @@ > STDERR_LOG=${STDERR_LOG} \ > STDOUT_LOG=${STDOUT_LOG} \ > TOMCAT_HOME=${APP_HOME} \ >- TOMCAT_VERSION=${MAJOR_VER:S/.//} \ >- USER=${TOMCAT_USER} >+ TOMCAT_VERSION=${MAJOR_VER:S/.//} > > .include <bsd.port.pre.mk> > >@@ -64,7 +61,6 @@ > @${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} " HTTP port: ${HTTP_PORT}" > @${ECHO_MSG} " Shutdown listener port: ${SHUTDOWN_PORT}" > @${ECHO_MSG} " AJP 1.3 connector port: ${AJP_1_3_PORT}" >@@ -78,9 +74,6 @@ > @${MV} ${WRKSRC}/conf/${f} ${WRKSRC}/conf/${f}.${CONF_EXT} > .endfor > >-pre-install: >- @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL >- > do-install: > @${ECHO_MSG} -n ">> Creating destination directory..." > @${MKDIR} ${APP_HOME} >@@ -105,7 +98,7 @@ > @${ECHO_MSG} " [ DONE ]" > > @${ECHO_MSG} -n ">> Fixing ownership settings..." >- @${CHOWN} -R ${TOMCAT_USER}:${TOMCAT_GROUP} ${APP_HOME}/conf ${APP_HOME}/logs \ >+ @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${APP_HOME}/conf ${APP_HOME}/logs \ > ${APP_HOME}/temp ${APP_HOME}/webapps ${APP_HOME}/work > @${ECHO_MSG} " [ DONE ]" > >Index: www/tomcat6/files/pkg-install.in >=================================================================== >RCS file: www/tomcat6/files/pkg-install.in >diff -N www/tomcat6/files/pkg-install.in >--- www/tomcat6/files/pkg-install.in 7 Feb 2006 08:50:09 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,53 +0,0 @@ >-#!/bin/sh >-# >-# Checks if the '%%USER%%' user and '%%GROUP%%' group exist. If they don't, then >-# an attempt is made to create both. >-# >-# $FreeBSD: ports/www/tomcat6/files/pkg-install.in,v 1.1 2006/02/07 08:50:09 lawrance Exp $ >-# >- >-# Make sure we're called during the 'make install' process >-if [ "$2" != "PRE-INSTALL" ]; then >- exit 0 >-fi >- >-# Set some constants >-UID=80 >-GID=${UID} >-USER=%%USER%% >-GROUP=%%GROUP%% >- >-# See if the group already exists >-if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then >- >- # If not, try to create it >- if pw groupadd "${GROUP}" -g ${GID}; then >- echo "Added group \"${GROUP}\"." >- elif pw groupadd "${GROUP}"; then >- echo "Added group \"${GROUP}\"." >- else >- echo "Adding group \"${GROUP}\" failed..." >- exit 1 >- fi >-fi >- >-# See if the user already exists >-if ! pw usershow "${USER}" 2>/dev/null 1>&2; then >- >- # If not, try to create it >- if pw useradd "${USER}" -u ${UID} -g "${GROUP}" -h - \ >- -s "/sbin/nologin" -d "/nonexistent" \ >- -c "World Wide Web Owner"; >- then >- echo "Added user \"${USER}\"." >- elif pw useradd "${USER}" -g "${GROUP}" -h - \ >- -s "/sbin/nologin" -d "/nonexistent" \ >- -c "World Wide Web Owner"; >- then >- echo "Added user \"${USER}\"." >- else >- echo "Adding user \"${USER}\" failed..." >- exit 1 >- fi >-fi >-exit 0 >Index: www/tomcat6/files/tomcat6.sh.in >=================================================================== >RCS file: /home/jhelfman/ncvs/ports/www/tomcat6/files/tomcat6.sh.in,v >retrieving revision 1.10 >diff -u -r1.10 tomcat6.sh.in >--- www/tomcat6/files/tomcat6.sh.in 6 Jul 2011 13:29:09 -0000 1.10 >+++ www/tomcat6/files/tomcat6.sh.in 11 Aug 2011 17:46:32 -0000 >@@ -57,7 +57,6 @@ > > tomcat%%TOMCAT_VERSION%%_enable="${tomcat%%TOMCAT_VERSION%%_enable:-"NO"}" > tomcat%%TOMCAT_VERSION%%_java_version="${tomcat%%TOMCAT_VERSION%%_java_version:-"%%JAVA_VERSION%%"}" >-tomcat%%TOMCAT_VERSION%%_user="${tomcat%%TOMCAT_VERSION%%_user:-"%%USER%%"}" > tomcat%%TOMCAT_VERSION%%_catalina_home="${tomcat%%TOMCAT_VERSION%%_catalina_home:-"%%TOMCAT_HOME%%"}" > tomcat%%TOMCAT_VERSION%%_catalina_base="${tomcat%%TOMCAT_VERSION%%_catalina_base:-"%%TOMCAT_HOME%%"}" > tomcat%%TOMCAT_VERSION%%_catalina_tmpdir="${tomcat%%TOMCAT_VERSION%%_catalina_tmpdir:-"%%TOMCAT_HOME%%/temp"}" >@@ -110,7 +109,7 @@ > > pid_touch() { > touch $pidfile >- chown $tomcat%%TOMCAT_VERSION%%_user $pidfile >+ chown www $pidfile > } > > tomcat_stop() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 159695
:
117596
| 117597