I upgraded tomcat to 6.0.13-r3 from -r1 just some minutes ago. I had a ROOT (under / path) application and it disappeared, i had a simple tomcat welcome screen instead. When I used etc-update, I had no sign of this change.
Steps to Reproduce:
1. upgrade to tomcat-6.0.13-r3 with emerge
The problem was, that the under install in the webapps/ROOT the index.html and the web.xml had been overwritten
This is a scenario we have yet to address. It does not really make sense I don't think to config protect stuff in webapps. Which would be required for etc-update to detect changes and etc.
I can surely see the problem with the root webapp being over written. Not exactly ideal. Will look into a solution or options as time permits. I might introduce a flag like nodefaultwebapp, or something like that but shorter :) Considering most won't use or possible even want the default webapp. I used to not provide it, but people did not like a blank page as a response to see if tomcat worked. Although blank != 404, most didn't like that. They want to see a Hey Tomcat is running page after emerge and start :)
*** Bug 188887 has been marked as a duplicate of this bug. ***
Yes that fine, 18887 is pretty much a duplicate, with the exception that it happened to me with and upgrade of Tomcat 5.5.23-rX to 5.5.23-rY
Mostly commenting so I don't forget. Looks like I will do what is done with Apache wrt to Apache's webroot. Introducing a pkg_config to install the root webapp. Then using pkg_postinst to detect if it's been installed or not. If not install it, if so alert that it was not installed and pkg_config can be run to install it.
Reassigning to herd since wltjr has left Gentoo, bug #135927.
Added possible resolution to this issue in [java-experimental] overlay.
Fixed ebuilds for both tomcat:5.5 and tomcat:6
*** Bug 257376 has been marked as a duplicate of this bug. ***
Sorry for the duplicate. I somehow missed this bug although I searched the buglist.
Maybe this bug could be solved by an explicit --configure option, like the one provided for e.g. MySQL and Apache?
I will checkout the ebuild from the overlay anyway.
Currently the files of webapps/ROOT in a standard Tomcat installation are put in Gentoo directly into /usr/share/tomcat-6/webapps/. Why not simply follow the default procedure of Tomcat and keep them in /usr/share/tomcat-6/webapps/ROOT also? For a new installation simply create a link in /var/lib/tomcat-6/webapps/ROOT (if it does not exist yet) and a new Tomcat installation works like everywhere else!
with latest tomcat ebuilds, files are correctly put in webapps/ROOT. anyway, this seems to be done both on fresh install and upgrade.
The checks whether to deploy an instance as part of the install were to fragile and so sufficiently deviating from the default could well have lead to unexpected breakage on each upgrade.
tomcat >=6.0.35-r1 and >=7.0.29-r1 no longer deploy an instance as part of the install instead there is a dedicated script to deploy one or more instances in an uniform way. In comment 2 William mentions using pkg_config which would be a natural place to handle this. I decided for the dedicated script as it has the ability to take arguments unlike 'emerge --config'. Supporting a large set of use cases pkg_config would only be possible with a highly interactive ui and duplication of the code across each ebuild.
Whether to copy a ROOT or use the same for all instances and create a corresponding context on bootstrapping, which Joerg brought up in comment 10 I see as a different issue. Guess one can argue here one way or another so I left it as it was. If you want please file a separate bug for it.
The change went stable. For more information see https://wiki.gentoo.org/wiki/Apache_Tomcat.
As a side effect of this change this is no longer possible. Thanks for the report.