Bug#399184: tomcat5.5: remove requirement of tomcat5.5-webapps
[patch]
Adrian Bridgett
adrian at smop.co.uk
Sat Nov 18 11:25:42 UTC 2006
Package: tomcat5.5
Version: 5.5.17
I've previously sent this to Arnaud Vandyck who asked me to resync
against SVN which I've finally done. The only things that seemed to
entail was dropping two fixes. There is an off-by-one error in a file
since it's actually the same diff as 5.5.15.
This patch moves the webapps out of /var/lib/ into /usr/share and
creates symlinks upon a fresh install. If you have a production
machine, ATM each upgrade will reenable all the example webapps which
isn't very nice.
I've not tried a package built with this patch recently due to work
commitments I'm afraid, thought it only fair to warn you.
Adrian
--
Adrian Bridgett - adrian at smop.co.uk
GPG key available on public key servers
-------------- next part --------------
diff -Naur old/tomcat5.5-5.5.17/debian/policy/04webapps.policy new/tomcat5.5-5.5.17/debian/policy/04webapps.policy
--- old/tomcat5.5-5.5.17/debian/policy/04webapps.policy 2006-09-14 10:28:03.000000000 +0100
+++ new/tomcat5.5-5.5.17/debian/policy/04webapps.policy 2006-09-14 10:28:32.000000000 +0100
@@ -57,7 +57,7 @@
};
// The permissions granted to the balancer WEB-INF/classes directory
-grant codeBase "file:${catalina.home}/webapps/balancer/WEB-INF/classes/-" {
+grant codeBase "file:/usr/share/tomcat5.5-webapps/balancer/WEB-INF/classes/-" {
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester.*";
};
diff -Naur old/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.install new/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.install
--- old/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.install 2006-09-14 10:28:03.000000000 +0100
+++ new/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.install 2006-09-14 10:28:32.000000000 +0100
@@ -1,11 +1,15 @@
-build/build/webapps/balancer /var/lib/tomcat5.5/webapps/
-build/build/webapps/ROOT /var/lib/tomcat5.5/webapps/
-build/build/webapps/jsp-examples /var/lib/tomcat5.5/webapps/
-build/build/webapps/servlets-examples /var/lib/tomcat5.5/webapps/
-build/build/webapps/tomcat-docs /var/lib/tomcat5.5/webapps/
-build/build/webapps/webdav /var/lib/tomcat5.5/webapps/
-debian/webapps/balancer.xml /var/lib/tomcat5.5/conf/Catalina/localhost/
-debian/webapps/tomcat-docs.xml /var/lib/tomcat5.5/conf/Catalina/localhost/
+build/build/webapps/balancer /usr/share/tomcat5.5-webapps/
+build/build/webapps/ROOT /usr/share/tomcat5.5-webapps/
+build/build/webapps/jsp-examples /usr/share/tomcat5.5-webapps/
+build/build/webapps/servlets-examples /usr/share/tomcat5.5-webapps/
+build/build/webapps/tomcat-docs /usr/share/tomcat5.5-webapps/
+build/build/webapps/webdav /usr/share/tomcat5.5-webapps/
+debian/webapps/balancer.xml /usr/share/tomcat5.5-webapps/
+debian/webapps/tomcat-docs.xml /usr/share/tomcat5.5-webapps/
+debian/webapps/ROOT.xml /usr/share/tomcat5.5-webapps/
+debian/webapps/jsp-examples.xml /usr/share/tomcat5.5-webapps/
+debian/webapps/servlets-examples.xml /usr/share/tomcat5.5-webapps/
+debian/webapps/webdav.xml /usr/share/tomcat5.5-webapps/
-servletapi/jsr152/examples/WEB-INF/lib/jstl.jar /usr/share/tomcat5.5/server/webapps/jsp-examples/WEB-INF/lib
-servletapi/jsr152/examples/WEB-INF/lib/standard.jar /usr/share/tomcat5.5/server/webapps/jsp-examples/WEB-INF/lib
+servletapi/jsr152/examples/WEB-INF/lib/jstl.jar /usr/share/tomcat5.5-webapps/jsp-examples/WEB-INF/lib
+servletapi/jsr152/examples/WEB-INF/lib/standard.jar /usr/share/tomcat5.5-webapps/jsp-examples/WEB-INF/lib
diff -Naur old/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.links new/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.links
--- old/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.links 2006-09-14 10:28:03.000000000 +0100
+++ new/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.links 2006-09-14 10:28:32.000000000 +0100
@@ -1,2 +1,2 @@
-/usr/share/doc/libservlet2.4-java/api-servlet /var/lib/tomcat5.5/webapps/tomcat-docs/servletapi
-/usr/share/doc/libservlet2.4-java/api-jsp /var/lib/tomcat5.5/webapps/tomcat-docs/jspapi
+/usr/share/doc/libservlet2.4-java/api-servlet /usr/share/tomcat5.5-webapps/tomcat-docs/servletapi
+/usr/share/doc/libservlet2.4-java/api-jsp /usr/share/tomcat5.5-webapps/tomcat-docs/jspapi
diff -Naur old/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.postinst new/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.postinst
--- old/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.postinst 2006-09-14 10:28:03.000000000 +0100
+++ new/tomcat5.5-5.5.17/debian/tomcat5.5-webapps.postinst 2006-09-14 10:28:32.000000000 +0100
@@ -6,6 +6,11 @@
configure)
if [ -z "$2" ]; then
# New installation, not a package upgrade
+ # create context links
+ for context in /usr/share/tomcat5.5-webapps/*.xml; do
+ ln -s $context /var/lib/tomcat5.5/conf/Catalina/localhost/
+ done
+
if [ -x /etc/init.d/tomcat5.5 ]; then
# Only restart tomcat if it is already running
if /etc/init.d/tomcat5.5 status >/dev/null; then
diff -Naur old/tomcat5.5-5.5.17/debian/webapps/balancer.xml new/tomcat5.5-5.5.17/debian/webapps/balancer.xml
--- old/tomcat5.5-5.5.17/debian/webapps/balancer.xml 2006-09-14 10:28:03.000000000 +0100
+++ new/tomcat5.5-5.5.17/debian/webapps/balancer.xml 2006-09-14 10:28:32.000000000 +0100
@@ -2,6 +2,6 @@
Context configuration file for the Tomcat Balancer Web App
-->
-<Context path="/balancer" docBase="/usr/share/tomcat5.5/webapps/balancer"
+<Context path="/balancer" docBase="/usr/share/tomcat5.5-webapps/balancer"
debug="0" privileged="true" allowLinking="true">
</Context>
diff -Naur old/tomcat5.5-5.5.17/debian/webapps/jsp-examples.xml new/tomcat5.5-5.5.17/debian/webapps/jsp-examples.xml
--- old/tomcat5.5-5.5.17/debian/webapps/jsp-examples.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/tomcat5.5-5.5.17/debian/webapps/jsp-examples.xml 2006-09-14 10:28:32.000000000 +0100
@@ -0,0 +1,7 @@
+<!--
+ Context configuration file for the Tomcat jsp-examples Web App
+-->
+
+<Context path="/jsp-examples" docBase="/usr/share/tomcat5.5-webapps/jsp-examples"
+ debug="0" privileged="true" allowLinking="true">
+</Context>
diff -Naur old/tomcat5.5-5.5.17/debian/webapps/ROOT.xml new/tomcat5.5-5.5.17/debian/webapps/ROOT.xml
--- old/tomcat5.5-5.5.17/debian/webapps/ROOT.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/tomcat5.5-5.5.17/debian/webapps/ROOT.xml 2006-09-14 10:28:32.000000000 +0100
@@ -0,0 +1,7 @@
+<!--
+ Context configuration file for the Tomcat Web App Root
+-->
+
+<Context path="/" docBase="/usr/share/tomcat5.5-webapps/ROOT"
+ debug="0" privileged="true" allowLinking="true">
+</Context>
diff -Naur old/tomcat5.5-5.5.17/debian/webapps/servlets-examples.xml new/tomcat5.5-5.5.17/debian/webapps/servlets-examples.xml
--- old/tomcat5.5-5.5.17/debian/webapps/servlets-examples.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/tomcat5.5-5.5.17/debian/webapps/servlets-examples.xml 2006-09-14 10:28:32.000000000 +0100
@@ -0,0 +1,7 @@
+<!--
+ Context configuration file for the Tomcat servlets-examples Web App
+-->
+
+<Context path="/servlets-examples" docBase="/usr/share/tomcat5.5-webapps/servlets-examples"
+ debug="0" privileged="true" allowLinking="true">
+</Context>
diff -Naur old/tomcat5.5-5.5.17/debian/webapps/tomcat-docs.xml new/tomcat5.5-5.5.17/debian/webapps/tomcat-docs.xml
--- old/tomcat5.5-5.5.17/debian/webapps/tomcat-docs.xml 2006-09-14 10:28:03.000000000 +0100
+++ new/tomcat5.5-5.5.17/debian/webapps/tomcat-docs.xml 2006-09-14 10:28:32.000000000 +0100
@@ -3,6 +3,6 @@
Needed to allow linking to the JSP/Servlet API documentations
-->
-<Context path="/tomcat-docs" docBase="/usr/share/tomcat5.5/webapps/tomcat-docs"
+<Context path="/tomcat-docs" docBase="/usr/share/tomcat5.5-webapps/tomcat-docs"
debug="0" privileged="false" allowLinking="true">
</Context>
diff -Naur old/tomcat5.5-5.5.17/debian/webapps/webdav.xml new/tomcat5.5-5.5.17/debian/webapps/webdav.xml
--- old/tomcat5.5-5.5.17/debian/webapps/webdav.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/tomcat5.5-5.5.17/debian/webapps/webdav.xml 2006-09-14 10:28:32.000000000 +0100
@@ -0,0 +1,7 @@
+<!--
+ Context configuration file for the Tomcat webdav Web App
+-->
+
+<Context path="/webdav" docBase="/usr/share/tomcat5.5-webapps/webdav"
+ debug="0" privileged="true" allowLinking="true">
+</Context>
More information about the pkg-java-maintainers
mailing list