[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jpackage-announce
Subject:    [JPackage-announce] [RPM (1.7)] tomcat5-5.5.20-2jpp
From:       Jason Corley <jpackage () zarb ! org>
Date:       2006-10-31 14:41:15
Message-ID: 20061031144115.13B5D625F09 () ryu ! zarb ! org
[Download RAW message or body]

Name        : tomcat5                      Relocations: (not relocatable)
Version     : 5.5.20                            Vendor: JPackage Project
Release     : 2jpp                          Build Date: Tue 31 Oct 2006 03:30:43 PM \
CET Install Date: (not installed)               Build Host: rhel4test.csc.ncsu.edu
Group       : Networking/Daemons            Source RPM: (none)
Size        : 4878195      License: Apache Software License
Signature   : DSA/SHA1, Tue 31 Oct 2006 03:31:29 PM CET, Key ID f79a683124ebe640
Packager    : Jason Corley <jason.corley@gmail.com>
URL         : http://tomcat.apache.org/
Summary     : Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API
Description :
Tomcat is the servlet container that is used in the official Reference
Implementation for the Java Servlet and JavaServer Pages technologies.
The Java Servlet and JavaServer Pages specifications are developed by
Sun under the Java Community Process.

Tomcat is developed in an open and participatory environment and
released under the Apache Software License. Tomcat is intended to be
a collaboration of the best-of-breed developers from around the world.
We invite you to participate in this open development project. To
learn more about getting involved, click here.

---------------
Jason Corley <jason.corley@gmail.com> 0:5.5.20-2jpp
- some more init script changes
- re-add java-devel Requires
---------------
W: tomcat5 non-standard-group Networking/Daemons
E: tomcat5 unknown-key GPG#24ebe640
W: tomcat5 strange-permission tomcat5-5.5.init 0755
E: tomcat5 prereq-use %{name} = %{epoch}:%{version}-%{release}
E: tomcat5 prereq-use %{name} = %{epoch}:%{version}-%{release}
E: tomcat5 prereq-use %{name}-servlet-%{servletspec}-api = \
                %{epoch}:%{version}-%{release}
E: tomcat5 lib-package-without-%mklibname
W: tomcat5 patch-not-applied Patch15: %{name}-%{majversion}-skip-native.patch

---------------
Index: tomcat5-5.5.init
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/tomcat5/Attic/tomcat5-5.5.init,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 tomcat5-5.5.init
--- tomcat5-5.5.init	4 Oct 2006 19:05:06 -0000	1.1.2.4
+++ tomcat5-5.5.init	31 Oct 2006 14:41:14 -0000
@@ -1,271 +1,280 @@
-#!/bin/sh
+#!/bin/bash
 #
-# Startup script for Tomcat 5.0, the Apache Servlet Engine
+# tomcat5      This shell script takes care of starting and stopping Tomcat
 #
 # chkconfig: - 80 20
-# description: Tomcat 5.0 is the Apache Servlet Engine RI for Servlet 2.4/JSP 2.0
+# description: Tomcat 5.5 is the Servlet Engine RI for Servlet 2.4/JSP 2.0
 # processname: tomcat
 # pidfile: /var/run/tomcat5.pid
-# config:  /etc/tomcat5/tomcat5.conf
+# config: /etc/tomcat5/tomcat5.conf
 #
-# Gomez Henri <hgomez@users.sourceforge.net>
-# Keith Irwin <keith_irwin@non.hp.com>
-# Nicolas Mailhot <nicolas.mailhot@one2team.com>
-#
-# version 1.02 - Removed initlog support
-# version 1.03 - Removed config:
-# version 1.04 - tomcat will start before httpd and stop after httpd
-# version 1.05 - jdk hardcoded to link /usr/java/jdk and tomcat runs as "nobody"
-# version 1.06 - split up into script and config file
-# version 1.07 - Rework from Nicolas ideas
-# version 1.08 - Fix work dir permission at start time, switch to use tomcat4
-# version 1.09 - Fix pidfile and config tags
-# version 1.10 - Fallback to su direct use on systems without Redhat/Mandrake init.d \
                functions
-# version 1.11 - Fix webapps dir permissions
-# version 1.12 - remove initial start/stop level for chkconfig (- 80 20)
-# version 1.13 - remove chown of logs/work/temp/webapps dir, owned by tomcat4 at \
                install time
-# version 1.14 - correct the start/stop ugly hack by waiting all the threads stops
-# version 1.15 - ensure we're looking for TOMCAT_USER running catalina
-# version 1.16 - Add support for CATALINA_PID env var
-# version 1.17 - Remove run files only tomcat started correctl
-#                in start area, check that tomcat is not allready running
-# version 1.18 - Fix kill typo (thanks Kaj J. Niemi)
-# version 1.19 - Add jar relinking
-# version 1.20 - Check there is no stalling tomcat4.pid
-# version 1.20tc5 - Changed all instances of tomcat4 to tomcat5 except TOMCAT_USER
-# version 1.20tc5rh - Changed TOMCAT_USER from tomcat4 to tomcat
+# - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
+# - heavily rewritten by Deepak Bhole and Jason Corley
 #
 
-# Source function library.
-if [ -x /etc/rc.d/init.d/functions ]; then
-. /etc/rc.d/init.d/functions
-fi
+# commented out until the RHEL and FC daemon functions converge
+# Source the function library
+#if [ -r "/etc/rc.d/init.d/functions" ]; then
+    #. /etc/rc.d/init.d/functions
+#fi
 
-NAME=`basename $0`
+NAME="$(basename $0)"
 unset ISBOOT
-if [ ${NAME:0:1} = "S" -o ${NAME:0:1} = "K" ]
-then
-        NAME=${NAME:3}
-        ISBOOT=1
+if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then
+    NAME="${NAME:3}"
+    ISBOOT="1"
 fi
 
 # For SELinux we need to use 'runuser' not 'su'
-if [ -x /sbin/runuser ]
-then
-	SU=runuser
+if [ -x "/sbin/runuser" ]; then
+    SU="/sbin/runuser"
 else
-	SU=su
+    SU="su"
 fi
 
-# Get Tomcat config
-
+# Get the tomcat config (use this for environment specific settings)
 TOMCAT_CFG="/etc/tomcat5/tomcat5.conf"
-
-[ -r "$TOMCAT_CFG" ] && . "${TOMCAT_CFG}"
+if [ -r "$TOMCAT_CFG" ]; then
+    . ${TOMCAT_CFG}
+fi
 
 # Get instance specific config file
-[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
+if [ -r "/etc/sysconfig/${NAME}" ]; then
+    . /etc/sysconfig/${NAME}
+fi
 
-#define which connector port to use
-CONNECTOR_PORT=${CONNECTOR_PORT:-"8080"}
+# Define which connector port to use
+CONNECTOR_PORT="${CONNECTOR_PORT:-8080}"
 
-# Path to the tomcat launch script (direct don't use wrapper)
-TOMCAT_SCRIPT=/usr/bin/dtomcat5
+# Path to the tomcat launch script
+TOMCAT_SCRIPT="/usr/bin/dtomcat5"
 
 # Path to the script that will refresh jar symlinks on startup
-TOMCAT_RELINK_SCRIPT="$CATALINA_HOME/bin/relink"
+TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink"
 
-# Tomcat name :)
-TOMCAT_PROG=$NAME
+# Tomcat program name
+TOMCAT_PROG="$NAME"
         
-# if TOMCAT_USER is not set, use tomcat5 like Apache HTTP server
-if [ -z "$TOMCAT_USER" ]; then
-    TOMCAT_USER="tomcat"
-fi
+# Define the tomcat username
+TOMCAT_USER="${TOMCAT_USER:-tomcat}"
+
+# Define the tomcat log file
+TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat5/catalina.out}"
+
+RETVAL="0"
+
+# remove when the RHEL and FC daemon functions converge
+# (pulled from /etc/rc.d/init.d/functions)
+function checkpid() {
+    local i
+    for i in $* ; do
+        if [ -d "/proc/${i}" ]; then
+            return 0
+        fi
+    done
+    return 1
+}
 
-# Since the daemon function will sandbox $tomcat
-# no environment stuff should be defined here anymore.
-# Please use the /etc/tomcat.conf file instead ; it will
-# be read by the $tomcat script
-
-RETVAL=0
-
-function findFreePorts {
-   lower=8000
-   randomPort1=0
-   randomPort2=0
-   randomPort3=0
-   for ((  i = 0 ;  i <= 20;  i++  )); do
-      RANDOM=$(date +%s)
-      randomPort1=$((RANDOM%2000+lower))
-      randomPort2=$((RANDOM%2000+lower))
-      randomPort3=$((RANDOM%2000+lower))
-      `netstat -apntl|grep $randomPort1`
-      ret1=$?
-      `netstat -apntl|grep $randomPort2`
-      ret2=$?
-      `netstat -apntl|grep $randomPort3`
-      ret3=$?
-      if [ $ret1 -eq 1 ] && [ $ret2 -eq 1 ] && [ $ret3 -eq 1 ]; then
-         return
-      fi
-   done
-   randomPort1=0
-   randomPort2=0
-   randomPort3=0
+# remove when the RHEL and FC daemon functions converge
+# (pulled from /etc/rc.d/init.d/functions)
+function echo_failure() {
+    echo -en "\\033[60G"
+    echo -n "[  "
+    echo -n $"FAILED"
+    echo -n "  ]"
+    echo -ne "\r"
+    return 1
 }
 
-# See how we were called.
-start() {
-    echo -n "Starting $TOMCAT_PROG: "
+# remove when the RHEL and FC daemon functions converge
+# (pulled from /etc/rc.d/init.d/functions)
+function echo_success() {
+    echo -en "\\033[60G"
+    echo -n "[  "
+    echo -n $"OK"
+    echo -n "  ]"
+    echo -ne "\r"
+    return 0
+}
 
-	if [ -f /var/lock/subsys/$NAME ] ; then
- 		if [ -f /var/run/$NAME.pid ]; then
-   	      		read kpid < /var/run/$NAME.pid
-         		if checkpid $kpid 2>&1; then
-             			echo "process allready running"
-             			return -1
-         		else
-             			echo "lock file found but no process running for pid $kpid, \
                continuing"
- 			fi
- 		fi
- 	fi
- 
- 	export CATALINA_PID=/var/run/$NAME.pid
- 	touch $CATALINA_PID
- 	chown $TOMCAT_USER:$TOMCAT_USER $CATALINA_PID
-
-        if [ $CATALINA_HOME != "/usr/share/tomcat5" ]; then
-            # if CATALINA_HOME does not exist
-            if [ ! -d "$CATALINA_HOME" ]; then
-                if [ ! -d "/var/lib/$NAME" ]; then
-                    mkdir -p /var/lib/$NAME
-                    cp -pL -R /var/lib/tomcat5/* /var/lib/$NAME
-                fi
-                mkdir -p $CATALINA_HOME
-                cp -pL -R /usr/share/tomcat5/bin $CATALINA_HOME
-                ln -fs /var/lib/$NAME/common $CATALINA_HOME/common
-                mkdir -p $CATALINA_HOME/conf
-                cp -pL -R /etc/tomcat5/* $CATALINA_HOME/conf/
-                mkdir -p /var/log/$NAME
-                chown $TOMCAT_USER:$TOMCAT_USER /var/log/$NAME
-                ln -fs /var/log/$NAME $CATALINA_HOME/logs
-                ln -fs /var/lib/$NAME/server $CATALINA_HOME/server
-                ln -fs /var/lib/$NAME/shared $CATALINA_HOME/shared
-                mkdir -p /var/cache/$NAME/temp
-                ln -fs /var/cache/$NAME/temp $CATALINA_HOME/temp
-                ln -fs /var/lib/$NAME/webapps $CATALINA_HOME/webapps
-                mkdir -p /var/cache/$NAME/work
-                ln -fs /var/cache/$NAME/work $CATALINA_HOME/work
-                cp -pL -R /var/cache/tomcat5/work/* $CATALINA_HOME/work/
+# Look for open ports, as the function name might imply
+function findFreePorts() {
+    local isSet1="false"
+    local isSet2="false"
+    local isSet3="false"
+    local lower="8000"
+    randomPort1="0"
+    randomPort2="0"
+    randomPort3="0"
+    local -a listeners="( $(
+                        netstat -ntl | \
+                        awk '/^tcp/ {gsub("(.)*:", "", $4); print $4}'
+                    ) )"
+    while [ "$isSet1" = "false" ] || \
+          [ "$isSet2" = "false" ] || \
+          [ "$isSet3" = "false" ]; do
+        let port="${lower}+${RANDOM:0:4}"
+        if [ -z `expr " ${listeners[*]} " : ".*\( $port \).*"` ]; then
+            if [ "$isSet1" = "false" ]; then
+                export randomPort1="$port"
+                isSet1="true"
+            elif [ "$isSet2" = "false" ]; then
+                export randomPort2="$port"
+                isSet2="true"
+            elif [ "$isSet3" = "false" ]; then
+                export randomPort3="$port"
+                isSet3="true"
             fi
-            # modify port number so that multiple instances doesn't
-            # interfere with each other.
-            findFreePorts
-            if [ $randomPort1 -eq 0 ] || [ $randomPort2 -eq 0 ] || [ $randomPort3 \
                -eq 0 ]; then
-                failure $"${NAME} startup"
-                echo "Can't find free ports"
-                return 1;
-            fi
-            cp $CATALINA_HOME/conf/server.xml $CATALINA_HOME/conf/server.xml.orig
-            sed -e "s/8005/$randomPort1/g" -e "s/8080/$CONNECTOR_PORT/g" -e \
"s/8009/$randomPort2/g" -e "s/8443/$randomPort3/g" \
$CATALINA_HOME/conf/server.xml.orig >  $CATALINA_HOME/conf/server.xml  fi
+    done
+}
 
-        options=""
-        for i in `grep -v "^#" /etc/tomcat5/tomcat5.conf |grep -v "^$"`; do
-            j=`echo $i| sed 's/\"//g'`
-            export $j
-            options="${options} export $j ;"
-        done
-        if [ -r /etc/sysconfig/$NAME ]; then
-            for i in `grep -v "^#" /etc/sysconfig/$NAME |grep -v "^$"`; do
-                j=`echo $i| sed 's/\"//g'`
-                export $j
-                options="${options} export $j ;"
-            done
+function makeHomeDir() {
+    if [ ! -d "$CATALINA_HOME" ]; then
+        echo "$CATALINA_HOME does not exist, creating"
+        if [ ! -d "/var/lib/${NAME}" ]; then
+            mkdir -p /var/lib/${NAME}
+            cp -pLR /var/lib/tomcat5/* /var/lib/${NAME}
         fi
+        mkdir -p $CATALINA_HOME ${CATALINA_HOME}/conf /var/cache/${NAME}/temp \
+                 /var/cache/${NAME}/work /var/log/${NAME}
+        for i in temp work; do
+            ln -fs /var/cache/${NAME}/${i} ${CATALINA_HOME}/${i}
+        done
+        for i in common server shared webapps; do
+            ln -fs /var/lib/${NAME}/${i} ${CATALINA_HOME}/${i}
+        done
+        ln -fs /var/log/${NAME} ${CATALINA_HOME}/logs
+        cp -pLR /etc/tomcat5/* ${CATALINA_HOME}/conf/
+        cp -pLR /usr/share/tomcat5/bin $CATALINA_HOME
+        cp -pLR /var/cache/tomcat5/work/* ${CATALINA_HOME}/work/
+        chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME}
+    fi
+}
 
-        $TOMCAT_RELINK_SCRIPT
-
-        TOMCAT_SCRIPT="$options $TOMCAT_SCRIPT"
+function parseOptions() {
+    options=""
+    options="$options $(
+                 awk '!/^#/ && !/^$/ { ORS=" "; print "export ", $0, ";" }' \
+                 $TOMCAT_CFG
+             )"
+    if [ -r "/etc/sysconfig/${NAME}" ]; then
+        options="$options $(
+                     awk '!/^#/ && !/^$/ { ORS=" "; 
+                                           print "export ", $0, ";" }' \
+                     /etc/sysconfig/${NAME}
+                 )"
+    fi
+    TOMCAT_SCRIPT="$options $TOMCAT_SCRIPT"
+}
 
-        if [ -x /etc/rc.d/init.d/functions ]; then
-        	daemon --user $TOMCAT_USER "$TOMCAT_SCRIPT" start 
-    	else
-        	$SU - $TOMCAT_USER -c "$TOMCAT_SCRIPT start"
-    	fi
-
-    	RETVAL=$?
-    	echo
-    	[ $RETVAL = 0 ] && touch /var/lock/subsys/$NAME
-    	return $RETVAL
+# See how we were called.
+function start() {
+    echo -n "Starting ${TOMCAT_PROG}: "
+    if [ -f "/var/lock/subsys/${NAME}" ] ; then
+        if [ -f "/var/run/${NAME}.pid" ]; then
+            read kpid < /var/run/${NAME}.pid
+                if checkpid $kpid 2>&1; then
+                    echo "$NAME process already running"
+                        return -1
+                    else
+                        echo "lock file found but no process running for"
+                        echo "pid $kpid, continuing"
+                fi
+        fi
+    fi
+    export CATALINA_PID="/var/run/${NAME}.pid"
+    touch $CATALINA_PID
+    chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID
+    if [ "$CATALINA_HOME" != "/usr/share/tomcat5" ]; then
+        # Create a tomcat directory if it doesn't exist
+        makeHomeDir
+        # If CATALINA_HOME doesn't exist modify port number so that
+        # multiple instances don't interfere with each other
+        findFreePorts
+        sed -i -e "s/8005/${randomPort1}/g" -e "s/8080/${CONNECTOR_PORT}/g" \
+            -e "s/8009/${randomPort2}/g" -e "s/8443/${randomPort3}/g" \
+            ${CATALINA_HOME}/conf/server.xml
+    fi
+    $TOMCAT_RELINK_SCRIPT
+    $SU - $TOMCAT_USER -c "$TOMCAT_SCRIPT start" >> $TOMCAT_LOG 2>&1
+    RETVAL="$?"
+    if [ "$RETVAL" -eq 0 ]; then 
+        echo_success
+        touch /var/lock/subsys/${NAME}
+    else
+        echo_failure
+    fi
+    echo
+    return $RETVAL
 }
 
-stop() {
+function stop() {
     echo -n "Stopping $TOMCAT_PROG: "
-
-    if [ -f /var/lock/subsys/$NAME ] ; then
-      if [ -x /etc/rc.d/init.d/functions ]; then
-          daemon --user $TOMCAT_USER "$TOMCAT_SCRIPT" stop
-      else
-          $SU - $TOMCAT_USER -c "$TOMCAT_SCRIPT stop"
-      fi
-      RETVAL=$?
-
-      if [ $RETVAL = 0 ]; then
-        count=0;
-
-        if [ -f /var/run/$NAME.pid ]; then
-
-            read kpid < /var/run/$NAME.pid
-            let kwait=$SHUTDOWN_WAIT
-
-            until [ `ps --pid $kpid | grep -c $kpid` = '0' ] || [ $count -gt $kwait \
                ]
-            do
-                echo -n -e "\nwaiting for processes to exit";
-                sleep 1
-                let count=$count+1;
-            done
-
-            if [ $count -gt $kwait ]; then
-                echo -n -e "\nkilling processes which didn't stop after \
                $SHUTDOWN_WAIT seconds"
-                kill -9 $kpid
-            fi
-
-            if [ $count -gt 0 ]; then
-                echo -n -e "\n"
+    if [ -f "/var/lock/subsys/${NAME}" ]; then
+        $SU - $TOMCAT_USER -c "$TOMCAT_SCRIPT stop" >> $TOMCAT_LOG 2>&1
+        RETVAL="$?"
+        if [ "$RETVAL" -eq "0" ]; then
+            count="0"
+            if [ -f "/var/run/${NAME}.pid" ]; then
+                read kpid < /var/run/${NAME}.pid
+                until [ "$(ps --pid $kpid | grep -c $kpid)" -eq "0" ] || \
+                      [ "$count" -gt "$SHUTDOWN_WAIT" ]; do
+                    echo -n -e "\nwaiting for processes $kpid to exit"
+                    sleep 1
+                    let count="${count}+1"
+                done
+                if [ "$count" -gt "$SHUTDOWN_WAIT" ]; then
+                    echo -n -e "\nkilling processes which didn't stop after "
+                    echo -n "$SHUTDOWN_WAIT seconds"
+                    kill -9 $kpid
+                fi
+                echo_success
+                if [ "$count" -gt "0" ]; then
+                    echo -n -e "\n"
+                fi
             fi
+            rm -f /var/lock/subsys/$NAME /var/run/$NAME.pid
+        else
+            echo_failure
         fi
-    
-		rm -f /var/lock/subsys/$NAME /var/run/$NAME.pid
-    fi
-
     fi
 }
 
 
 # See how we were called.
 case "$1" in
-  start)
+    start)
+        parseOptions
         start
         ;;
-  stop)
+    stop)
+        parseOptions
         stop
         ;;
-  restart)
+    restart)
+        parseOptions
         stop
-        sleep 2	
+        sleep 2    
         start
         ;;
-  condrestart)
-        if [ -f /var/run/$NAME.pid ] ; then
-                stop
-                start
+    condrestart)
+        if [ -f "/var/run/${NAME}.pid" ]; then
+            parseOptions
+            stop
+            start
         fi
         ;;
-  *)
-        echo "Usage: $TOMCAT_PROG {start|stop|restart|condrestart}"
+    version)
+        parseOptions
+        "${JAVA_HOME}/bin/java" \
+            -classpath "${CATALINA_HOME}/server/lib/catalina.jar" \
+            org.apache.catalina.util.ServerInfo
+        ;;
+    *)
+        echo "Usage: $TOMCAT_PROG {start|stop|restart|condrestart|version}"
         exit 1
 esac
 
 exit $RETVAL
+
Index: tomcat5.spec
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/tomcat5/tomcat5.spec,v
retrieving revision 1.3.2.11
diff -u -r1.3.2.11 tomcat5.spec
--- tomcat5.spec	4 Oct 2006 19:05:06 -0000	1.3.2.11
+++ tomcat5.spec	31 Oct 2006 14:41:14 -0000
@@ -68,12 +68,10 @@
 
 Summary: Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API
 Name: tomcat5
-Version: 5.5.17
-Release: 8jpp
+Version: 5.5.20
+Release: 2jpp
 Epoch: 0
 License: Apache Software License
-Vendor: JPackage Project
-Distribution: JPackage
 Group: Networking/Daemons
 URL: http://tomcat.apache.org/
 BuildArch: noarch
@@ -110,6 +108,7 @@
 Requires: jakarta-commons-daemon >= 1.0.1
 Requires: jakarta-commons-launcher >= 0:0.9
 # alternatives
+Requires: java-devel >= 0:1.4.2
 Requires: jndi-ldap
 # And it needs its own API subpackages for running
 Requires: %{name}-common-lib = %{epoch}:%{version}-%{release}
@@ -120,7 +119,7 @@
 
 Buildrequires: jpackage-utils >= 0:1.6.0
 BuildRequires: ant >= 0:1.6.2
-%if %{with_apisonly}
+%if %{without_apisonly}
 BuildRequires: java-devel >= 0:1.4.2
 %endif
 %if %{without_apisonly}
@@ -593,14 +592,15 @@
          $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name} \
          $RPM_BUILD_ROOT%{bindir}/relink \
          $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}; do
-    perl -pi -e "s|\@\@\@TCCONF\@\@\@|%{confdir}|g;" $i
-    perl -pi -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g;" $i
-    perl -pi -e "s|\@\@\@TCBIN\@\@\@|%{bindir}|g;" $i
-    perl -pi -e "s|\@\@\@TCCOMMON\@\@\@|%{commondir}|g;" $i
-    perl -pi -e "s|\@\@\@TCSERVER\@\@\@|%{serverdir}|g;" $i
-    perl -pi -e "s|\@\@\@TCSHARED\@\@\@|%{shareddir}|g;" $i
-    perl -pi -e "s|\@\@\@TCAPP\@\@\@|%{appdir}|g;" $i
-    perl -pi -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g;" $i
+    sed -i -e 's|\@\@\@TCCONF\@\@\@|%{confdir}|g' \
+           -e "s|\@\@\@TCCONF\@\@\@|%{confdir}|g" \
+           -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
+           -e "s|\@\@\@TCBIN\@\@\@|%{bindir}|g" \
+           -e "s|\@\@\@TCCOMMON\@\@\@|%{commondir}|g" \
+           -e "s|\@\@\@TCSERVER\@\@\@|%{serverdir}|g" \
+           -e "s|\@\@\@TCSHARED\@\@\@|%{shareddir}|g" \
+           -e "s|\@\@\@TCAPP\@\@\@|%{appdir}|g" \
+           -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" $i
 done
 # Remove local JARs (to be replaced with jpp links in post)
 pushd $RPM_BUILD_ROOT%{serverdir}/lib
@@ -1093,6 +1093,16 @@
 %ghost %doc %{_javadocdir}/%{name}-jsp-%{jspspec}-api
 
 %changelog
+* Tue Oct 31 2006 Jason Corley <jason.corley@gmail.com> 0:5.5.20-2jpp
+- some more init script changes
+- re-add java-devel Requires
+
+* Tue Oct 17 2006 Jason Corley <jason.corley@gmail.com> 0:5.5.20-1jpp
+- 5.5.20
+- completely rewritten init script
+- remove Vendor and Distribution (should be defined in ~/.rpmmacros)
+- replace perl -pi -e with sed -i -e
+
 * Wed Oct 4 2006 Permaine Cheung <pcheung@redhat.com> 0:5.5.17-8jpp
 - Fix condrestart in init script and location of init script in the spec file.
 


_______________________________________________
JPackage-announce mailing list
JPackage-announce@zarb.org
https://www.zarb.org/mailman/listinfo/jpackage-announce


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic