tomcat8 for 10.7

Jack Howarth <[email protected]>
Newsgroups gmane.os.apple.fink.devel
Message-ID <CAP5Ds0B4mxrbV8ebd0qAXzgh8=EMc_WvocRoYDcon9kxgN6QyA@mail.gmail.com>
Alexander,
         Attached is a first attempt of recrafting the old tomcat6 packages
in 10.5-EOL into JDK-1.7 based tomcat8 packages.The main change, other than
the upgrade to tomcat 8.0.5 is the change
to…

JAVA_HOME=@JAVA_SDK_HOME@               export JAVA_HOME

in the tomcat8.patch so that the PostInstScript can use

        # Locate locat Java 1.7 SDK
        JDK_LOCATION=`/usr/libexec/java_home`
        perl -pi -e "s|\@JAVA_SDK_HOME\@|$JDK_LOCATION|"
%p/etc/%N/tomcat.conf

to set the proper location for the SDK.
      Are there any particular issues with the tomcat6 packaging that I
should be aware of?
                Jack

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce

_______________________________________________
Fink-devel mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel
tomcat8.info (application/octet-stream, 4.2 KB) - not displayed
tomcat8.patch (application/octet-stream, 2.1 KB)
diff -uNr jakarta-tomcat-4.1.31/tomcat jakarta-tomcat-4.1.31-new/tomcat
--- jakarta-tomcat-4.1.31/tomcat	1969-12-31 19:00:00.000000000 -0500
+++ jakarta-tomcat-4.1.31-new/tomcat	2006-06-29 21:36:20.000000000 -0400
@@ -0,0 +1,58 @@
+#!/bin/sh
+# wrapper script for tomcat startup
+
+if [ `id -u -n` != 'tomcat' ]; then
+	chown -R tomcat:tomcat @PREFIX@/var/tomcat8/logs >/dev/null 2>&1 || :
+	sudo -u tomcat $0 "$@"
+	exit $?
+fi
+
+for file in @PREFIX@/etc/tomcat8/*.conf; do source "$file"; done
+
+chown -R tomcat:tomcat "$CATALINA_HOME"/work "$CATALINA_HOME"/logs >/dev/null 2>&1
+
+tcproccount() {
+	ps -auxwww | grep TOMCAT6LAUNCH | grep -v grep | wc -l
+}
+
+case "$1" in
+	start)
+		/bin/echo "Starting Tomcat: \c"
+		$CATALINA_HOME/bin/catalina.sh start >>@PREFIX@/var/tomcat8/logs/tomcat.log 2>&1
+		/bin/echo "ok"
+		;;
+
+	stop)
+		$CATALINA_HOME/bin/catalina.sh stop >>@PREFIX@/var/tomcat8/logs/tomcat.log 2>&1
+		;;
+
+	restart)
+		$0 stop
+
+		# wait 20 seconds and if tomcat hasn't shut down, error out
+		TCDONE=0
+		for i in 1 2 3 4 5 6 7 8 9 10; do
+			if [ "`tcproccount`" -ge 1 ]; then
+				sleep 2
+			else
+				TCDONE=1
+				break
+			fi
+		done
+		if [ "$TCDONE" = "1" ]; then
+			$0 start
+		else
+			/bin/echo ""
+			/bin/echo "Tomcat is not shutting down properly.  Please check"
+			/bin/echo "your logs and try again."
+			/bin/echo ""
+			exit 1
+		fi
+		;;
+
+	*)
+		/bin/echo "Usage: $0 {start|stop|restart}"
+		exit 1
+		;;
+
+esac
diff -uNr jakarta-tomcat-4.1.31/tomcat.conf jakarta-tomcat-4.1.31-new/tomcat.conf
--- jakarta-tomcat-4.1.31/tomcat.conf	1969-12-31 19:00:00.000000000 -0500
+++ jakarta-tomcat-4.1.31-new/tomcat.conf	2006-06-29 21:36:20.000000000 -0400
@@ -0,0 +1,11 @@
+# location of your JDK
+JAVA_HOME=@JAVA_SDK_HOME@               export JAVA_HOME
+JSSE_HOME=$JAVA_HOME/lib/ext            export JSSE_HOME
+
+# location of Tomcat
+CATALINA_HOME=@PREFIX@/var/tomcat8      export CATALINA_HOME
+
+# any extra options to pass to tomcat startup
+# feel free to add to this, but please don't remove the TOMCAT5LAUNCH,
+# it is used for finding tomcat processes
+CATALINA_OPTS="-DTOMCAT6LAUNCH=true"     export CATALINA_OPTS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.