Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148331 - Tomcat 5.5 install doesn't use CATALINA_BASE properly
Summary: Tomcat 5.5 install doesn't use CATALINA_BASE properly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: William L. Thomson Jr. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-20 04:22 UTC by Chris Lear
Modified: 2006-09-20 08:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lear 2006-09-20 04:22:07 UTC
[tomcat-5.5.17-r4]

The /etc/init.d/tomcat-5.5 file (which has mostly similar functionality to /usr/share/tomcat-5.5/bin/catalina.sh) doesn't seem to treat CATALINA_BASE quite right.

Here's a diff that should fix it (no guarantees). I've taken the code from catalina.sh. Why doesn't the init file just call catalina.sh like it used to?

# diff -u /etc/init.d/tomcat-5.5 /etc/init.d/tomcat-5.5.fixed
--- /etc/init.d/tomcat-5.5      2006-09-20 11:14:13.000000000 +0100
+++ /etc/init.d/tomcat-5.5.fixed        2006-09-20 12:15:09.000000000 +0100
@@ -12,7 +12,7 @@
        # Activate Logging
        if [[ -r "${CATALINA_HOME}"/bin/tomcat-juli.jar ]]; then
                JAVA_OPTS="${JAVA_OPTS} -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-                                                               -Djava.util.logging.config.file=/etc/tomcat-5.5/logging.properties"
+                                                               -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
        fi

        # Populate the classpath
@@ -56,7 +56,7 @@
                start-helper $JAVA_HOME/bin/jdb \
                        -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share \
                        -Djava.security.manager \
-                       -Djava.security.policy=/etc/tomcat-5.5/catalina.policy
+                       -Djava.security.policy=$CATALINA_BASE/conf/catalina.policy
        elif [[ "${TOMCAT_START}" == "jpda start" ]] ; then
                start-helper $JAVA_HOME/bin/java ${JPDA_OPTS}
        elif [[ "${TOMCAT_START}" == "start" ]] ; then
@@ -64,7 +64,7 @@
        elif [[ "${TOMCAT_START}" == "start -security" ]] ; then
                start-helper $JAVA_HOME/bin/java \
                        -Djava.security.manager \
-                       -Djava.security.policy=/etc/tomcat-5.5/catalina.policy
+                       -Djava.security.policy=$CATALINA_BASE/conf/catalina.policy
        else
                eerror "Invalid TOMCAT_START variable value, or one is not set"
                eerror "Please see /etc/conf.d/tomcat-5.5 for more information"
Comment 1 William L. Thomson Jr. (RETIRED) gentoo-dev 2006-09-20 08:25:54 UTC
The catalina.sh was to problematic to patch and to call reliably from the init script. Replacing it entirely was the best option, and in the future the init script will get replaced by one developed by a Tomcat dev.

In the mean time I have corrected the hard coded path to use ${CATALINA_BASE} per your suggestion. It's been committed to tree so closing this bug.

Please provide patches as a plain text attachment in the future. Thank you.
Comment 2 Chris Lear 2006-09-20 08:43:35 UTC
[...]
> 
> In the mean time I have corrected the hard coded path to use ${CATALINA_BASE}
> per your suggestion. It's been committed to tree so closing this bug.

Thanks.

> 
> Please provide patches as a plain text attachment in the future. Thank you.
> 

Will do.