Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180519 - www-servers/tomcat upgrade kills the ROOT (/) application
Summary: www-servers/tomcat upgrade kills the ROOT (/) application
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Java team
: 188887 257376 (view as bug list)
Depends on: 428002
Blocks: 322979
  Show dependency tree
Reported: 2007-06-01 06:54 UTC by John Doe
Modified: 2012-12-07 13:03 UTC (History)
4 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description John Doe 2007-06-01 06:54:13 UTC
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.

Reproducible: Always

Steps to Reproduce:
1. upgrade to tomcat-6.0.13-r3 with emerge
Comment 1 John Doe 2007-06-01 15:21:07 UTC
The problem was, that the under install in the webapps/ROOT the index.html and the web.xml had been overwritten
Comment 2 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-08-02 07:00:22 UTC
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 :)

Comment 3 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-08-14 19:49:40 UTC
*** Bug 188887 has been marked as a duplicate of this bug. ***
Comment 4 gtl4407 2007-08-15 08:46:37 UTC
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
Comment 5 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-09-07 16:17:28 UTC
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.
Comment 6 Łukasz Damentko (RETIRED) gentoo-dev 2008-10-30 16:21:02 UTC
Reassigning to herd since wltjr has left Gentoo, bug #135927.
Comment 7 Mike Weissman 2009-01-21 23:34:10 UTC

Added possible resolution to this issue in [java-experimental] overlay.

Fixed ebuilds for both tomcat:5.5 and tomcat:6

Comment 8 Alistair Bush (RETIRED) gentoo-dev 2009-02-02 18:04:23 UTC
*** Bug 257376 has been marked as a duplicate of this bug. ***
Comment 9 Phillip Merensky 2009-02-03 13:30:26 UTC
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. 
Sorry again...
Comment 10 Joerg Schaible 2011-01-20 22:33:07 UTC
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!
Comment 11 Miroslav Šulc gentoo-dev 2011-01-20 22:38:29 UTC
with latest tomcat ebuilds, files are correctly put in webapps/ROOT. anyway, this seems to be done both on fresh install and upgrade.
Comment 12 Ralph Sennhauser (RETIRED) gentoo-dev 2012-07-25 15:36:27 UTC
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.
Comment 13 Ralph Sennhauser (RETIRED) gentoo-dev 2012-12-07 13:03:36 UTC
The change went stable. For more information see

As a side effect of this change this is no longer possible. Thanks for the report.