FreeBSD Bugzilla – Attachment 117596 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]
[patch]
file.diff
file.diff (text/plain), 4.11 KB, created by
Jason Helfman
on 2011-08-11 18:40:07 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Jason Helfman
Created:
2011-08-11 18:40:07 UTC
Size:
4.11 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:27:48 -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,13 @@ > 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 >+USERS= www >+GROUPS= www > HTTP_PORT?= 8180 > SHUTDOWN_PORT?= 8005 > AJP_1_3_PORT?= 8009 >@@ -41,7 +41,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=${USERS} WWWGRP=${GROUPS} > LATEST_LINK= ${APP_SHORTNAME} > > SUB_LIST= AJP_1_3_PORT=${AJP_1_3_PORT} \ >@@ -54,8 +54,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 +63,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): ${USERS}/${GROUPS}" > @${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 +77,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 +101,7 @@ > @${ECHO_MSG} " [ DONE ]" > > @${ECHO_MSG} -n ">> Fixing ownership settings..." >- @${CHOWN} -R ${TOMCAT_USER}:${TOMCAT_GROUP} ${APP_HOME}/conf ${APP_HOME}/logs \ >+ @${CHOWN} -R ${USERS}:${GROUPS} ${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
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 159695
: 117596 |
117597